FAQ for 2013

This year I decided to collect and bundle all of the questions I am asked on a regular basis, whether it is through mentoring or conversations with other developers.

What is your favourite IDE?

I don't have a favourite IDE because I don't use one (caveat below). I develop code in Vi/Vim, which is a terminal-based text editor that has a lot of features hidden away that could turn it into a full-fledged IDE if one chose to use it that way. The reason I stuck with this editor is that I found myself helping numerous clients who had remote servers that I needed to login and perform work. If one only has experience using a GUI text editor or IDE, then being confined to a terminal environment will feel like a prison and work performance will slow to a crawl. Regardless, I stuck with the practice of using Vim even after the engagements ended and I have been quite happy ever since because it means that I can code anywhere that has an SSH terminal application. It also means that I can make changes to any text file quickly and with less keystrokes.

The one caveat is when I code in Java I tend to use Eclipse. This has been more out of the standards set forth by clients who are Java workshops, and not out of my own need. That said, when I use Eclipse I don't tend to use a lot of plugins or features (e.g. some people love Eclipse's refactoring features) and simply use Eclipse as a glorified GUI text editor. I even rarely use the intellisense functionality (pressing '.' and waiting for the method hints to be displayed), mainly because I dislike "dot-programmers" (which I will need to expand on in a later article).

What plugins do you regularly use?

None. Literally. No matter what text editor or IDE I use, my usage of plugins hovers between "rarely" and "never". The reason for this is that it takes away from me learning how to perform the tasks myself and, more importantly, if I do those tasks enough times my muscle memory will take over and I no longer have to think about it. But there is a secondary argument.

When I visited client sites I would work with other people that used plugins for everything: terminal aliases and macros, IDE plugins, Vim plugins, etc. What I noticed that was these people relied on the plugins so much that, once they were thrown into a situation where the plugin didn't exist, they didn't know how to navigate and their productivity declined. So what good are all those producitivity gains if they are predicated on the usage of a particular plugin, in a particular environment, and in a particular set of circumstances? My lack of plugins does mean I need to retain more information and use more keystrokes, but my solutions to these are to increase my short- and long-term memory space and learn to type faster, respectively.

What is your favourite operating system?

Specfiically, Linux. Do I use it as my main OS? No. In fact, I use Mac OSX because I do not want to worry about if I plug in my fancy new device whether it will work or not. What makes Linux my favourite is the same reason that I use OSX over Windows, I like a Unix-based terminal environment. Windows does not provide a (good enough, for my purposes) terminal environment for me to work in.

I also use Windows, usually when I am in a corporate environment, but also at home as a desktop if I am playing games or need to run multiple virtual machines. Windows machines are very cost-effective to build a powerhouse (huge RAM, huge SSD) whereas OSX is tightly controlled and more expensive.

What are your hobbies?

There's a reason I refer to myself as a renaissance man, because I have so many disparate hobbies. First and foremost I love to develop software, whether I am being paid for it or just whipping up a simple program to satisfy my curiosity. Apart from programming, I also like computer hardware (aka electronics), finance and the stock market, entrepreneurship, neurolinguistics, and photography. I'm certain there are more hobbies, but that is already a large list.

At the heart of it I am a genuinely curious person, gravitating towards anything that gives me a sense of wonder.

How do you manage to do so many different things?

The simple answer is: I don't. Like any system that is overloaded, it is going to start dropping packets to stay online. What this means for me is to accept the fact that I am not going to work on a project/hobby on a particular day and simply organize my schedule so that I can do it in the future. Some people use todo lists with some success, I have had mixed results. Todo lists tend to add a heavy weight on my shoulders when I see the list grow with all the things that I need do to. That being said, when I need to use a todo list I either use Trello (for online connectivity) or Taskwarrior (for offline connectivity).

What I find useful is to inject some facet of my hobby (or interest) into my daily life, so that I am both completing a daily task and also learning something new at the same time. For example, I run Ledger for my bookkeeping software because it fulfills my interests in (a) finance, (b) entrepreneurship, and (c) programming and software.

What is your favourite programming language?

I don't tend to have a "favourite" per se, but instead float around to whatever piques my interest at the time. However, Ruby has been a language that I go back to regularly because… well, I don't have a good answer other than that it makes me happy. And doing things that make you happy is part of what a good life is about. I tend to view programming languages like spoken languages, where there is a time and place for any language because they are simply tools to either get work done or communicate an idea to another person.

What are your personal coding standards?

My coding standards and best practices have been honed over many years. I have had to mix in the best practices with my coding standards because, at times, it is difficult to tell where one ends and the other begins.

  • short, simple code. The definitions of "short" and "simply" are omitted intentially because I use my best judgement at the time.
  • readable for me and a stranger.
  • descriptive variable names.
  • descriptive method names. The name should tell me what the method is doing.
  • 80 characters per line. It fits in a terminal and allows our brain to read an entire line without becoming tired/bored.
  • 2 space indents.
  • never use tabs.
  • don't make me think about what the code is doing.
  • try to avoid using frameworks or ORMs when appropriate. They are just abstractions that can confuse you.
  • realize if the code being written is going to help or hinder in the future. A simple utility class can do more damage in the long-term than first thought.
  • no magic. We programmers are the magicians so we should know how the trick works. It is our audience (the customer) that thinks it is magic.

Everyone has their own personal coding standard, and when working with a company's coding standard, it is important to know which personal standard is worth fighting for and which is not.

One last standard I have isn't really a standard but more of a rule to live by: Accept the fact that the code you write will look like garbage to you in the near future. Make every attempt to mitigate that.