Friday 25 July 2014

Small Things - String Indexer

Great software doesn't just happen. It's a result of very many decisions of which some are small, others more vital, but all of them incrementally adding to the final solution. Any decisions taking you in the wrong direction (i.e. away from an amazing end product) is a poor decision. Even the small, seemingly insignificant ones. Here's one that I've seen recently.


String literals should be replaced with a string constant declared somewhere and re-used.


I realise this may seem pedantic and in a way it is. But this simple act of laziness (yes, lazy) is a decision taking you in the wrong direction. It results in code that is less robust. But almost more importantly it's a sign that bad decisions are being made. Be a good citizen and keep making good decisions.

(Now please look away as I dismount from my high horse)

Friday 4 July 2014

Save those Eyes

A few months ago I was listening to a Dave Asprey podcast about lighting and the effects it can have on us. The podcast goes into detail on why and how lighting can affect us negatively. Bottom line, staring at a computer screen bathed in fluorescence is not ideal. It puts our eyes and brains under unnecessary strain.

Some background. I had laser eye surgery about 4 years ago. The results have been nothing short of amazing! Perfect vision. But I noticed that by the end of each week, my eyes would feel a bit blurry. Nothing serious, but definitely noticeable (it would improve over weekends and holidays). I'd just accepted it as an occupational hazard.

So I started looking into anti-glare glasses. After some googling I found a brand called Gunnar. The reviews and forums were mixed (as they always are I guess) but there were a number of people who were adamant that they helped with eye strain. So I figured why not and bought myself a pair.

Money very, very well spent! At the end of a week I don't feel any strain and I don't notice any blurriness. If anything I'd swear my eyesight has improved since I started wearing them. I understand that this n = 1 experiment is extremely subjective. "My eyes feel better" is hardly a scientific measurement, but it has me sold. And even if it's just a placebo, that doesn't make it any less effective.

The only downside I noticed was the (very much expected) ridicule I received in the office for wearing tinted glasses. But that passed and was very quickly followed by "Hmmm, you say they work? Where can I get a pair".