Evaluating zsh

I’ve always been a bash user but I’ve recently decided to give zsh a while. It has some pretty useful features such as path expansion and replacement (see this slideshare). And yes, I’m well aware of bash-completion thank you very much.

It also has a nice eco system of expansions including oh-my-zsh with which I’m using plugins for git, composer (php), laravel5, brew, bower, vagrant, node and npm. I went with the agnoster theme and for iTerm2 (my terminal application of choice) I installed the Solarized Dark and Light themes. Both work well with the agnoster theme. I also installed and use the Meslo font.

One issue I did find immediately is things like file type colourisation with ls were not as good as bash. To resolve this, I installed the warhol plugin (as well as brew install zsh-syntax-highlighting grc). Now I find my ls’, ping’s, traceroute’s etc all nicely coloured.

We use Dropbox with work and to keep my work and home office laptops in sync, I moved the configs into Dropbox and symlinked to them:

This all works really well. My bash aliases are fully compatible so I just pull them in at the end of .zshrc (source ~/.bash_aliases). Lastly – to prevent the prompt including my username and hostname on my local laptop, I set the following in .zshrc:

So far, so happy.

PhpStorm and Xdebug – macOS / Homebrew

After many years of Sublime Text and, latterly, Atom, I’ve decided to give an integrated IDE another look – this time PhpStorm. I’ve always dropped them in the past as they tended to crash (hello Zend Studio) and were slow as hell (hello again Zend Studio). But so far so good – I’m only a couple days into an evaluation license but it’s fast (admittedly I have fast laptops – Intel i7’s with four cores, PCI SSD and 16GB RAM) and it’s yet to crash.

One of the key advantages of IDE’s is integrated debugging. This was ridiculously easy with PhpStorm. I use Homebrew for PHP:

I’ve then configured xdebug as follows:

If you’re not using Laravel’s Valet for local development then you should check it out immediately: https://laravel.com/docs/5.3/valet. If you are using it, issue a valet restart.

Port 9001 was chosen above as Valet tends to use 9000 also. We now need to reconfigure PhpStorm to list on this port. Open preferences and type xdebug into the search box. Then find Languages & Frameworks -> PHP -> Debug on the left hand navigation pane and change the port to 9001.

That’s pretty much it for PhpStorm. They really mean zero-configuration debugging. When editing a project in the IDE, there’s a Start Listening for PHP Debug Connections toggle icon in the top left – it looks like a phone. Just turn it on.

The last thing we need to do is have an easy way to enable Xdebug when we want it when testing our applications in the browser. Chrome has a very useful plugin for this: Xdebug-helper. Just install it and edit its options and change the IDE form Eclipse to PhpStorm. You can now use this to start a debug session from within Chrome to your listening PhpStorm IDE.

Oh, just found this useful resource also covering similar topics with a CGI/CLI xdebug split.

Doing Us Wrong: The Independence Alliance

Shane Ross and John Halligan represent everything that’s wrong with the Irish multi-seat constituency system. 

Halligan got elected mostly on a local hospital issue. Numerous medical reviews clearly stated that maintaining or expanding a cardiac unit at Waterford University Hospital was unsafe due to lack of demand and, thus, development of local expertise. Despite this, it remains the primary plank of Halligan’s continued support of the Government. National politicians being lead by local issues. 

In a recent interview with The Irish Times, he was quoted as saying in reference to his position in Government:

“When he knew they were all going to be killed, King Leonidas went to them and whispered in their ears: ‘If we have to die, from them take everything and give them nothing.’ That is my motto, and it might come to that,” Mr Halligan said.

A dire reflection on the maturity and commitment to Government of the Independent Alliance. 

As an aside: the quote is attributed to King Leonidas at the Battle of Thermopylae. The only source of this quote I can find is from the film enactment of that battle called 300. Please correct me if my admittedly scant search was too shallow.

Another Alliance member – pseudo-leader in fact – is Shane Ross, my local constituency TD. Unlike Halligan, Ross was elected first in our Dublin Rathdown three-seater. He’s a man who on the national stage has spoken out against cronyism and tribal politics.

He’s main local issue is the closure of our local Garda station. At least one morning a week he could be found standing on the traffic island outside it with a banner to have it reopened. Local grandstanding. On the same issue, a local group invited local politicians to speak on the subject as the election approached. The motto: No Station, No Vote. To what should be Ross’s eternal shame, there he was on a trailer promising its re-opening. A suspected guarantee on his party, the independent Alliance, entering Government. As of writing, it remains closed but it’s early days in this Government.

Don’t get me wrong – many politicians get elected based on local issues. But they’re upfront about it – like Halligan. But, from watching Ross at work, it seems like he tries to cultivate one image for the national media and a different image locally. That’s what annoys me more than anything else.

Shane Ross comes to mind today as he made a very misjudged boast about how, as Minister for Transport, he’s finally taken the bus:

This led to some Twitter hilarity including the gem of an image at the top of this post.

This is a post in the series Daily January 2016 – generally rushed and unedited.

Star Trek: Voyager – The 2016 Rewatch

I watched the first episode of Star Trek: Voyager in my Junior Cert year in the function room of a pub with the local Star Trek fan club in early 1995. It was recorded in the US on a NTSC video tape, mailed over to the club runners in Limerick, copied and sent to local clubs around the country and then played on a compatible VCRs.

It was a different era – but, on reflection, a much more sociable one. These episodes, straight from the US, were enjoyed in groups with a few drinks. The new upcoming series will must likely be watched instead in darkened rooms, alone and as downloaded via BitTorrent (every bit as (il)legal as our Voyager viewing).

Voyager came around at a fairly hectic time for me. Started in my Junior Cert year, season 3 hitting my Leaving Cert year and the remaining seasons clashing with a fairly hectic college social life. I don’t think I ever missed an episode but it was certainly a non-linear erratic viewing. It left me with an overall poor impression of the show. So much so that I’ve never rewatched the series in order and in a short space of time until just these last two months. Almost twenty years later.

And that’s a pity. On rewatching, it was a great show. It also bodes well for what Bryan Fuller will do with the new series, Star Trek: Discovery. 

So, some early, unedited and initial reflections on the rewatch:

  • Janeway was a great captain. Played by a great actor, Kate Mulgrew, who was able to perfectly balance strength and compassion. Sisko will always win it for me but, bloody hell, Janeway is battling for number two pretty strongly right now in my head. I haven’t watched TNG in a while which may help, but, still, credit where credit is due here.
  • Why the fuck was the ship never at warp? This is a crew trying to get home. But every opening shot has them out of warp before diverting to check out whatever this weeks interest was. Sure, it was a financial decision as green screen f/x are expensive. But surely you can re-use the exterior of the ship at warp to set the scene ad infinitum and then don’t put the characters at a window! This broke my heart in nearly every episode. 
  • Character mental breakdowns: there were a few times were characters were effectively given mental breakdowns for the purposes of a story. This happens too often in Star Trek I think. For example Tom Paris in Thirty Days. The biggest culprit of all was Janeway in Equinox. Yeah, I get she’s pissed off at another Star Fleet captain going over the edge (massively). But turning her into an crazed Ahab (with his obsessive quest to catch the whale) was not credible. Nor was nearly-torturing a crewman and confining Chakotay to quarters believable. It just didn’t work for me.
  • The Doctor was brilliant. This was entirely down to the fantastic acting of Robert Picardo. I felt the writers discovered this themselves as we went through the first two seasons. The doctor episodes were always a joy.
  • The Year of Hell: I imagine some hoped for seven years of this. I did too before my rewatch. It was always my biggest criticism. This two-parter is one of the best episodes of the series. I’m not sure how much influence Ron Moore had on this (he’s not credited as a writer). But he went onto create the re-imaging Battlestar Galactica which – when I watched it – felt like what Voyager could have been.
  • The Borg. In the beginning it felt a bit lazy to bring them in. I don’t recall if it had been established in TNG is they were from the Delta Quadrant or not. If it had, it wasn’t lazy. But, if not, then vice-versa. In the end the Borg added to Voyager (none the least with Seven of Nine) but also the Borg Queen / Janeway playoffs.
  • The finale: ah, sigh. I just found the use of time travel a bit lazy here too. The Admiral/Captain playoffs were great as were many other elements. But, I don’t know, it would have been nice to solve it themselves without another time travel episode. And, speaking of mental breakdowns, I’m still not convinced Janeway’s character would have broken the temporal prime directive in the first place.
  • Q. Should never have made an appearance in Voyager as every time every viewer was just screaming “send them home!”.
  • Lastly, like the other series’: too much reliance on the holodeck for story telling. You’re in space for crying out loud! Plenty of stories out there.

This is a post in the series Daily January 2016 – generally rushed and unedited.

On Writing More – Daily January 2017

Over Christmas one of my brothers was toying with the idea of taking up a creative writing class when we got back to Dublin. He had even done a bit of research. My gut reaction was: if you want to write more, then write more. I felt that the muscle needed to be exercised by choice rather than forced through a class homework assignment. At least as a first step before taking up a class.

There was a stinging degree of hypocrisy in my assertions: I too should be writing more. And not the endless emails / technical documents / support documents / sales proposals from work every day but rather the stuff I always wish I took the time to write about. Why this blog was initially created: thoughts, rants and ramblings.

So, welcome to daily January. One post a day for one month on anything whatsoever.