Code Development Tools

By trade I’m a product manager, but I’m also a serial startup guy. That means I roll up my sleeves and dig into whatever needs doing, whether that be design work or code or whatever.

As far as technology goes, I tend to lean towards the front-end of the equation. I’m a UI guy at heart and as such I focus on CSS, HTML, and lots of JavaScript. I blog about that stuff over on my other site: Clientcide.

Anyway, here’s the stuff that I use that you might enjoy:

Software

I’m an Mac user after a few decades of windows usage. The Mac is really where it’s at if you do my kind of development. Here’s a laundry list of the stuff I use (not in any particular order really):

  • Photoshop – yes, it crashes every time you close it, but it’s still the best game in town.
  • Textmate – yes, it hasn’t really seen an update in ages, but I still prefer it with all it’s bundles. I won’t list all the bundles I have installed, but I recommend digging around for the stuff you write. There’s almost certainly stuff there to help you out.
  • Total Terminal – I love having my terminal a hot-key away. Instead of alt+tab+tab+tab to get to it, it’s always, always one command away. Plus it looks cool. See it’s cousin Total Finder which brings tabs to the finder.
  • AppFresh – (technically not related to development…) This little app inventories all your software and tells you what’s out of date and will update it for you. As if this weren’t enough, it integrates with iusethis.com which lets you quickly mark which apps you actually use. Then, when you move to a new computer (or your home machine or whatever) you can pull up AppFresh and it’ll show you which apps you use that aren’t installed. You can see all the apps I’ve marked on my profile page: http://osx.iusethis.com/user/anutron – you’ll find stuff there that I haven’t listed here (because they aren’t development related). I can’t sing the praises of most of this stuff enough. If it’s on that list, it’s worth installing.
  • On The Job – If you do any freelancing, you need this. It’ll manage your time tracking and your invoices.
  • GitX – If you aren’t using git for version control and you’re doing development (even by yourself) your’e missing out. Git is probably the most important development tool to show up in my life in the last decade. Maybe since the web browser (and I wasn’t developing before that). Anyway, assuming you are using it, GitX is the best Mac tool for visualizing your work. You can even use it to do partial commits and stuff. Totally worth it. I use git on the command line probably 90% of the time, but sometimes I want to commit unstaged work into numerous commits, so I want to stage some lines into one comment, and the rest into another. Or maybe I want to view the working tree, stuff like that. GitX makes all that easy. As a side note, don’t waste your time with the Github Mac app. It’s ok, but you’ll outgrow it in about 2 minutes.
  • Balsamiq – Not really a Mac app (it’s an Air app) but still amazingly useful for mocking stuff up. Highly recommended.
  • CloudApp – This little utility gets a lot of use. Anything on your clipboard is turned into a tiny url with a simple keystroke. This can be a chunk of text (like this!) or a file or a group of files (just select them, hit copy, and then hit whatever shortcut you set up for CloudApp and it zips them for you), or a screenshot (which OSX makes super easy for you by hitting command+contro+shift+4). My team and I fling files back and forth to each other all the time. Great for attaching images to pull requests or open tickets.
  • Jing – This is a lot like CloudApp but specifically aimed at screen capturing. You can capture images and annotate them like this or capture video and then easily share it. Note: you can turn off that stupid sun-icon thing and make it a menu item in the settings.
  • FileMerge – This is part of Xcode (free from Apple). You gotta go install all of Xcode even if this is all you use. Once installed, it’s your default diff-tool and it’s awesome. ‘git mergetool’ when facing a merge conflict just opens it up for you to manage the resolution. Save the file and quit the app to continue on your rebasing way. As a side note, it’s not obvious, but you can drag the bottom pane up to reveal a 3rd pane which is editable.
  • LessApp – If you’re still writing CSS by hand I feel for you. If you’re using Rails you can use it’s pipeline to have it compile CSS from Less files for you on the fly, which is awesome. If you aren’t, you need to compile it yourself, and that’s where this app comes in quite handy. What’s Less?
  • MAMP – The easiest way to run a LAMP stack on your Mac.
  • Reggy – What’s that you say? Writing regular expressions isn’t your favorite past time? Me either! Reggy at least makes it easier…
  • Sequel Pro – The easiest way to manage MYSQL on your Mac.
  • Tunnelblick – Dead simple VPN.

Ok that covers the software you should install. I’ll reiterate that if you’re looking for other stuff that isn’t related to development, go check out my iusethis profile – VLC, Adium, QuickSilver, etc. All good stuff.

A Few Textmate Tips

  • four finger draw down: recently opened files list
  • open a directory (“mate .” for example) will open a project view with a list of files in a drawer
  • ⌘t will let you find a file within the project – just hit it and type the file name and then hit enter to open it.
  • ⌘⇧t will let you find a method within the current file (assuming Textmate knows how to parse it)
  • when selecting text (shift plus arrows), tap the option key to switch to block selection. hold option when using the mouse to use it.
  • Remove whitespace on save: http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html

Bash

As I mention in the bash profile comments below, there are three scripts I use all the friggin time: hub (very useful command line tools for github), J (recently renamed to Z but I still call it J as in “jump”) and git command line completion. J is particularly awesome; it builds a little database of all the directories you switch to in the command line and weights them by how frequently and recently you went there. So let’s say you keep going back to `users/me/foo/bar/baz/blop/biz/flop` and it’s annoying to type that out all the time. Well, J just sees you going there and now you can type `j flop` and it’ll just go there. I know, my mind was blown away, too.

I’m not going to paste in my entire bash profile here, but here’s some stuff I use a lot:

# jumps to the git root of the current repository

alias gr='[ ! -z `git rev-parse --show-cdup` ] && cd `git rev-parse --show-cdup || pwd`'
               
# install hub tools for git: https://github.com/defunkt/hub
alias git=hub
  
# displays commits not on origin/master (or any other branch) that are on HEAD and vice versa
function cherry {
  TARGET=$1
  if [ $# -eq 0 ]; then
    echo "using default: origin/master"
    TARGET="origin/master"
  fi
  echo "~~~~~~~~~Not on $TARGET ~~~~~~~~~~~";
  git cherry -v "$TARGET";
  echo "~~~~~~~~~Not on HEAD~~~~~~~~~~~~~~~~~~~~";
  git cherry -v HEAD "$TARGET";
}
             
# directory jumping: https://github.com/rupa/z
# this was originally called "j" which I prefer, so I alias it back to j
alias j=z
 
# show's current git branch in command line:
PS1='[\u@\h \w$(__git_ps1 " (%s)")]\$ '
 
# git command line completion
# not going to paste it inline here, download at:
# http://cl.ly/code/1P1H3D1x0k3Z

git config

For git I have the following in my gitconfig file:

 [merge]
   # opendiff is part of XCode for osx
   tool = opendiff
 [core]                                 
   # default ignored files for OSX; see below
   excludesfile = /Users/aaron/.gitignore
 [alias]
   # git status shortcut
   st = status
   # git checkout shortcut
   co = checkout
   # given a username or an email address shows the name and email address of the author
   whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"  
   # given a commit name shows its hash and short log (i.e. git whatis someBranchName)
   whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
   # list all aliases
   aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
   # sexier looking shortlog; git lg FROM..TO
   lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
         count = shortlog -s -n             
   # short version of cherry-pick
   pick = cherry-pick           
   # show an ASCII version of the commit tree
   tree = log --graph --all --decorate --abbrev-commit --pretty=oneline -n10
   # browse the current head on github
   bro = !"hub browse -- commit/`git rev-parse HEAD`"
   ##
   # Quickly Commit / Uncommit Work-In-Progress
   # By David Gageot (http://gist.github.com/492227):
   wip = !"git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"wip\""
   unwip = !"git log -n 1 | grep -q -c wip && git reset HEAD~1"

What else?

I’m sure there’s something I’m forgetting. What do you use? What can’t you live without?

Leave a Reply