The Developer Mind and QA

Why is it that a software developer can hardly walk past a puzzle without stopping to try to solve it? Not only that, but they will be slightly angry if you interfere and offer them a suggestion as to the solution.

Compare this type of problem solving genius to what happens when a new bug report comes in for the software they work on. Inform that same developer that there is a defect somewhere in the ordering system, and they will require detailed step by step instructions on how to reproduce it. And after one minute of trying to reproduce it, they will quickly say that it “works on my machine” and call it good.

People hate to waste time on unsolvable problems. Developers don’t always trust people to give them a problem that is solvable. Think of how soul crushing it would be to give that developer a tavern puzzle that did not have a solution. It would be such a cruel trick (please don’t do this, no matter how sorely you are tempted).

On the other hand, when a developer knows the problem has a solution, they will accept the challenge and put all their focus and brain power into the problem until they get it. It’s like a switch that is flipped once we know we’re not on a wild goose chase.

Hmmm, not sure if there is a solution to anything in here…

SVN Eclipse Mountain Lion and Homebrew

I was frustrated trying to figure out how to get subversion installed on my OSX machine so that it would be compatible with Eclipse. I wanted to go with the JavaHL svn adapter but I had already installed svn using homebrew.
I tried to reinstall svn with homebrew like this but got an error:

$ brew install --universal --java subversion
Error: subversion dependency neon not installed with:

There are several dependencies that need to be uninstalled before installing subversion again with –univeral and –java options
For me it was this:

$ brew rm neon
$ brew rm sqlite
$ brew rm serf

Then this worked:
$ brew install --universal --java subversion

Updating Rubygems on an Old 10.5 Leopard Machine

I ran into this problem today when trying to update my ruby gems on a fresh OSX 10.5 machine for testing:

Updating RubyGems…
ERROR: While executing gem … (Gem::RemoteSourceException)
HTTP Response 302 fetching

After a little googling I saw where gems were stored on S3 so I just added the —source option and that worked. Here is the command for posterity.

gem update —system —source

Vim Compiled With Ruby Support on Lion

If you are a vim user on a Mac and you also like the Command-t plugin you have no doubt had to deal with the default vim, which does not come with ruby support out of the box. I have resorted to using MacVim for most of my needs but once in a while I wish Command-t was there for me in a vim terminal (read tmux).

Well, I just found out that MacVim ships with a Vim and MacVim executable, so just use that.

I added this alias to my bash profile and all was good:

alias vim='/Applications/'

That will take precedence over /usr/bin/vim (except if you do sudo vim, then you are back to the old /usr/bin/vim).

Good enough, is what I say.

PS. I made a symlink from /Applications/ into /usr/bin/vim and it didn't work quite right. I got a bunch of warnings about color scheme, etc. Not sure why, but I didn’t feel the need to dig deeper. That is why I went the alias route.

Using Git at Work on a Windows Network Drive

Rarely do I program without using some sort of version control. I’ve been using git locally on my Windows machine at work to manage some scripts and I use a network drive as my remote in case my machine dies. Here are the steps I used to get that up and running.

You will need to install git (try msysgit windows installer) and learn about git (try git immersion) before setting up your remote repository.

Create a folder that will hold your git repository on your network share.
I have a mapped drive on g: and my repository is g:\scripts so that is what my examples will use.

From a cmd prompt change to your mapped drive.
> cd g:

Then cd into your soon to be git repository.
> cd scripts

Then create an empty git repository. If you do not use the —bare option, you will have issues so don’t leave that out.
> git init —bare

Now if you don’t have a local git repository yet, then you can clone your new repository wherever you like by navigating back to your local drive.
> c:
> cd work/scripts

> git clone file://g:\scripts
(UNC paths also work file://\server\share\username\scripts)

When you clone, you automatically get a remote called “origin” and you can push to the server for safe keeping any time you make changes locally.
> git push origin master

If you already have a git repository and you just want to push out to the shared drive then you can do this from within your local git manged project.
> git remote add origin file://g:\scripts
> git push origin master

Mind Share (Part Two)

Exactly one year ago today I posted about “mind share” and how I was going to “punch out” of the tech world and enter fully into my home life with my full attention. Well, it has gone pretty well. There is definitely a correlation between programming too much and mind share issues. The biggest lesson I’ve learned is to recognize when I’ve been pushing too hard, and deliberately let go of the things I don’t have time for.

Here are a few thoughts about what has worked for me and what has not in my ever elusive quest for work life balance.

Things that worked:

  • Early mornings:
    I have been reading and working on projects by getting up really early in the morning. Working early in the morning has several benefits for me. 1) It is a natural time box that I can’t easily lengthen since I need to get ready for work eventually. 2) My mind is fresh and doesn’t feel tired like it can later in the evening. 3) I’m not taking away from time with anybody else (they are all still sleeping).
  • Family projects:
    My wife and I worked on a project together. It is a website that helps her keep track of things she buys in bulk to better understand which of those things are making her money and which are not worth the investment. This was fun because it was something we could work on in the evening but it wasn’t taking time away from us being together. It also was different than when I worked on a project by myself because now we were both thinking about the same thing, so if I had an idea for Homestore Lane ( it was something we could talk about, unlike if it was some project she was not interested in.

Things that didn’t work so well:
  • One night per week to work on projects:
    There are several reasons I don’t think this worked very well for me. 1) I was already mentally tired by the time I started on my projects. 2) It was hard to unwind and go to sleep after programming late into the night. 3) It was hard to get back into things after waiting for the whole week (or sometimes longer since it was easy to skip a week).
  • Trying harder to compartmentalize:
    It wasn’t mind over matter for me. I had to stop trying to do so much before I noticed the difference in my attention span and my engagement in my home life. Even though I would tell myself to stop thinking about projects, my brain just could not unwind enough because it was too tired (or engaged, or ?).

I’m going to stick with the morning thing and maybe some more family projects and see how it goes. If there is anything else along these lines I am sure I will blog about them next year. Or the year after, maybe. (I am already staying up too late to write this, so what am I doing? Time to stop.)

iPad Could Be for an Older Generation

Somehow, the complaints I am seeing about the iPad don’t resonate with me. No sd slot, no USB slot, too restrictive, too much DRM. What I mean is this: I think the iPad will be a huge success, just not among the peope we think it will.

There are a lot of people in the world who are not very tech savvy and who don’t even know what a micro SD card is and wouldn’t even know if they are buying DRM free music, video, etc. The baby boom generation, and the non-technical masses are going to love a device that “just works” for so many things. At the same time, it makes these same people look and feel like the geeks they know and admire (ha ha).

For example, I could see my Dad getting and iPad and a $15 monthly data plan so that he can do basic web browsing and email from home (he does not have internet right now). It would be the simplest solution for him, and he doesn’t have to use a mouse. Some people just hate mice.

Apple does such a great job of giving non-technical people fewer choices and a great experience. The same may hold true for the iPad. When the tech community criticizes Apple for the above mentioned things, they may be missing the point. Apple doesn’t care so much about developers, and alpha geeks as they might like to think.

Watch out for the iPad revolution coming to a senior center near you!

Objective-C Scarcity Continues

There is a lot of angst among developers of the iPhone/iPad community over the language restrictions of the new iOS 4.0 license, and rightfully so. Mobile Orchard closed shop because of it and there may be more high profile developers leaving the Apple platform in the future.

There is one positive for the Objective-C developers, though. The scarcity of their skill set will most likely continue. Objective-C developers have experienced a renaissance in their once obscure language and frameworks, but now they are the chosen ones and they get paid like it. Scarcity will give them the advantage in the market, driving up their rates/salaries as long as Apple continues to dominate in the arena of sales.

This may be the only positive that comes from Apple’s decision, and it is only a positive for a minority of developers, so in the end … blech.

Mind Share

After reading the pragmatic life post called Punch Out Log Off, I began thinking about a term I call “mind share”. Think of mind share in terms of twitter, but instead of asking “what are you doing right now”, you ask, “what are you thinking about right now?” If you ask yourself this question periodically, you will begin to see some patterns.

For example, let’s say you are spending some quality time with the family. What are you thinking about? Do any of the answers to the mind share question sound like the list below? If so, the people around you are not getting quality time from you and believe me, they can tell:

– “What is the killer feature for idea X that I should build?”
– “I wish my company used REST web services instead of SOAP?”
– “I should tweet that I am hanging out with the fam right now.”
– “Someone is talking to me, and I am looking at them, but I have no idea what they just said.”
– “What a cool idea for an iPhone App. I better write it down.”
– “I think I just heard my iPhone buzz. Was it email, SMS, ebay, Fring, or one of the 700 other possibilities?”

It takes a conscious effort to make sure the people in the room with you are given more priority than the virtual world we work and play in throughout the day. I have been analyzing this in my own life for the past couple years (mostly the negative effects) and have started to understand some of the ways that I can give more mind share to the people I love and compartmentalize my work better.

In part two of this post, I might try to explain some of the things I have been learning that help keep my mind from getting too absorbed in tech. Actually, I may never write part two, if I am successful at punching out and checking in to life at home better.

Legacy Code - Extract Interface

Micheal Feathers book “Working with legacy code ” has a chapter called Extract Interface. This is taken from Fowler’s Refactoring book and applied to legacy code.

The motivation for extracting an interface is different between the two books. Refactoring looks at this from the point of code organization and structure. Working With Legacy Code looks at this as a dependency breaking mechanism to get a class under test.

Both aims are to make the code more maintainable over time, and the use of interfaces to represent concepts in code is a great way to do that.

How would this play into something like ruby? Well, the dependency issue is virtually non-existent from a testing point of view. Getting a class under test is as easy as using a mocking library (Actually, the same can be said for Java in the example from Micheal’s book).