My Tools of the Trade

I used to be somewhat settled, living my stationary life in a Brooklyn apartment. Circumstances have changed in 2009, when I started to spend a lot of time on the go. This was the point at which all of the commitments, contracts, and physical commodities I had been piling up over the years have emerged in the form of monumental pain. It felt like a greasy, sticky pile of goo keeping me in place. There were car lease, apartment rent, phone contract to name a few. Each one is very costly to terminate. Above realizations have effectively changed the way I think. What used to be a passive crawl towards comfort-in-the-goo has now morphed into an active strive to achieve compactness and simplicity. A strive for “life in a backpack” if you will.

Certainly these changes have reflected on my tools of trade.

Backpack

backpack

  • Incase backpack

    I had to search through half Manhattan for it (urgent at that moment). It fits everything I need to carry, which is essentially everything I listed here shy of the “Stationary Hardware” section.

Mobile Hardware

computers

  • Late 2007 17” MacBook Pro

    It has 2.6Ghz Core 2 Duo, 4GB RAM, and 200GB 7200RPM HDD. I do vast majority of the work on it.

  • Acer Aspire One

    My “backup” computer (with 16Gb SSD and 16Gb SD card) running both WinXP and Ubuntu Netbook Remix. I use it primarily for leisure as I happen to be a fan of pre-2004 computer RPGs and strategies which netbooks are perfect for. Acer is good for programming too, since it sports an incredible 9hr battery which is perfect for long travels (although most would hate the small size constraint.)

  • Logitech Optical Notebook Mouse Plus

    When it comes to mouse, I never understood wireless. Mouse is not a remote control, you only use it close to the screen, so why care about batteries or recharging? For me it’s just extra mental/physical weight. Therefore my choice is this neat, wire-wrapping simple mouse.

  • iPhone 3G

  • Nintendo DS

Stationary Hardware

Since I had some hardware accumulated over the years, and getting rid of it all wouldn’t make sense, I keep a couple of things in places where I spend most of the time. Mostly it comes down to the following two:

Misc

misc

In this small pocket I keep all kinds of misc SD cards, USB thumb drives, and DS games.

sketchbooks

  • Moleskine sketchbook — I’m not a proponent of using Balsamiq or other wireframe solutions, todo, or time management software. Instead I prefer a small sketchbook (notes and small drawings), a big sketchbook (wire-framing, mind-mapping), and a pencil. I like that particular linked sketchbook because IMHO reporter-style is more comfortable than normal book-style. Besides, I hate any kind of grid on the pages, hence plain.

Software

  • Firefox — I use it with (and because of) following extensions.

    • 1Password — no more looking for wallet, and no more reusing of the same password.
    • Adblock Plus — block ads (duh).
    • All-in-One Sidebar — replaces all the meddling firefox popups (downloads/extensions/history panels) with a neat sidebar.
    • CustomizeGoogle — tons of Google search customizations.
    • DownloadHelper — because sometimes online flash players suck.
    • Firebug — ultimate front-end debugger.
    • Flagfox — I always found it fun to know in which country a website is hosted.
    • GooglePreview — helps browse results and quickly know what to expect.
    • Server Spy — quick and convenient way to know which server is running on visited websites. One more curiosity satisfier.
    • Tab Kit — primary reason I’m sticking with Firefox. When you have > 30 tabs open at a time, and you’re using widescreen — vertical tabs are the way to go. Additionally, this plugin also does nesting and coloring which is incredibly useful for relating tabs to one-another (ie: links opened from this blog post will appear in tabs nested under the post’s tab).
    • Ubiquity — this extension contains tons of awesomeness – you better see their screencast. However, I primarily use it as QuickSilver of Firefox. Opt+Space, type some words from the needed tab, Enter, the tab focuses. Incredibly useful when you have >30 tabs open.
    • Web Developer — mostly for “disable cache” feature, different enable/disable shortcuts for javascript, css, etc, and cleaning cookies.
    • XMarks — former Foxmarks for bookmark sync across browsers and computers.
    • YSlow — a treasure chest of optimization tips and benchmarks for improving site performance.
  • TextMate — This is my code editor of choice. I also recently got interested in vim, and have been learning it, but haven’t really gotten comfortable enough to use it for most tasks.

  • NetNewsWire — This is a great RSS reader which syncs with Google Reader as well as its complementary iPhone app. Definitely my favorite.

  • Pwitter — I’m not a heavy twitterer. I want a simple, resource-friendly mac client which works with growl and has all basic features. Pwitter has met and exceeded (in a good way) everything I wanted from a twitter client. I think it’s pretty underestimated.

  • Thunderbird 3 — this is my shaky ground right now. I grew tired of how primitive Mail.app is. At the same time, I can’t keep gmail.com open. It runs flash which keeps crashing my browser under Snow Leopard. I was pleasantly surprised by the new features of Thunderbird 3. Among other additions, Mozilla taught it to speak the Gmail language (archiving, all mail, etc). This wasn’t the case in previous versions, which I disliked. It also serves as a great newsgroups reader, which I use to read comp.lang.ruby.

  • Terminal — this is another treasure chest of irreplaceable tools some of which have existed since Unix inception.

  • iTunes — helps me stay updated with podcasts such as Railscasts, RailsEnvy, and Ruby5.

  • GitX — Awesome git browser for mac with some repo-manipulating capabilities. However, I mostly use it for its staging convenience. Sometimes I do too much at once. GitX provides very convenient GUI to split all the unstaged mess into separate neat commits.

  • Photoshop — I’ve become quite comfortable with photoshop. Use it for any non-batch image tasks.

  • Cyberduck — this is my sftp client of choice. It’s free and works well for me.

  • Dropbox — great for quick file upload/sync/backup. Pics for this blog post were taken on iPhone, synced through dropbox, and are linked directly from there.

  • iCal — I tend to use reminders a lot. I also keep track of bills and projects this way. However, I prefer my physical notepad for daily goals.

  • QuickSilver — this is definitely my Swiss Army Knife. Irreplaceable for navigation and file operations.

  • ImageResizer — convenient little tool for batch image resizing.

  • Communication

    • Skype — I work remotely a lot as you can imagine.
    • Adium — looks like the best AOL/ICQ/YIM/MSN/GTK mac client out there.
    • LimeChat – I used to like Colloquy, but its resource-hogging habits forced me to look for better alternatives. So far this has been incredibly nice and lightweight sporting all the features I need in an IRC client.

Hosting

  • Dreamhost — this is my sandbox environment. I don’t use it for anything but hosting this blog and some personal side-projects. The occasional bumpy service is justified by the price though.
  • WebFaction — a very easy-to-use, affordable, and incredibly fast/stable shared hosting. Currently runs two projects (Scripteka and Wehike) on one account without any problems.
  • Linode — our first stage heavy-weight. If an app is expected to have any significant load, this is where we start developing.
  • Turnkey Internet — we use this for dedicated servers because they seem to be the most affordable while having well-performing network. However, most of sysadmin burden goes on your shoulders. There are options with more support, but they aren’t cheap.
  • Heroku — lately this is the place I go for my personal Rails projects. The deployment strategy there is pretty freaking incredible.

Simplifying and compacting your life is not easy. I mostly try to have fewer tools covering broader range of tasks. This helps portability and keeps me sane. As opposed to Mike Gunderloy’s Tools of Trade my set tends to have very little overlap in functionality. Single image editor, single organizational tool, etc. Interestingly, I don’t actively pursue this concept. I just don’t feel the need for more yet. Surely this list will expand in the future.

This post was inspired by Mike Gunderloy’s Tools of Trade. I’d like to join him in encouraging you to write your own “Tools of Trade” post.

Rake script for managing Rails plugins with Git submodules

Problem with gitmodules and rails plugins

Submodules aren’t very easy. You have to know a few things before messing with them. When installing you have to follow a bunch of steps in order to get them properly registered within git. Uninstalling is even sadder. You need to manually edit a couple of git config files, and perform some more git operations. When dealing with Rails plugins – you should also remember to check if plugin contains an install.rb/uninstall.rb hook and run them manually. This is enough repetitive crap for me to justify some automation.

Solution: Automation with Rake

Note: This solution is specifically for rails plugins hosted on github.

When I think automation in the context of Rails – I immediately think rake. Without further ado I present a rake script which takes care of all the aforementioned problems for you.

  • Automated module install – no need to run any git commands.
  • Automated module uninstall – no need to edit git config files by hand.
  • Automated running of install.rb/uninstall.rb plugin hooks.
  • Automated module updates.
  • Automatically uses github.

The usage is as simple as it gets. Read comments on top for list of available tasks.

Grab it here: http://gist.github.com/185746

Getting Rails 2.3.3 and Mocha >=0.9.6 to play nice with Test::Unit and Shoulda

Simultaneous changes in Rails 2.3.3 and Mocha >=0.9.6 have caused some headaches in test::unit (or shoulda) tests. In my case I saw anomalies such as expectations persisting across tests. You put expects(:foo).never in test A and get “unsatisfied expectation” failure in test B where you happen to call :foo. This is due to unfortunate dependency on load order which could cause runner logic to be erroneously overridden. Here’s the steps you need to take to tidy up this setup to make sure it works correctly.

Update mocha to >= 0.9.7

  ~% sudo gem update mocha

Install test-unit gem

  ~% sudo gem install test-unit

Don’t load mocha yourself

If you had anything like this line in your test environment, REMOVE IT.

config.gem "mocha"

Ensure correct load order

If using Shoulda, make sure your test.rb environment loads test-unit before shoulda.

  config.gem "test-unit", :lib => "test/unit", :version => ">=2.0.3"
  config.gem "thoughtbot-shoulda", :lib => "shoulda", :source => "http://gems.github.com", :version => ">=2.10.1"

This should hopefully fix mocha issues with rails 2.3.3.

For more explanation check out this message on mocha’s mail list and this lighthouse ticket.