All posts filed under: computing

Small teams and interruptions

computing / work

It’s hard for non-programmers to understand just how bad interruptions are when it comes to being a productive coder. While most jobs suffer from the same problems of “getting back into the flow” after being interrupted, programming is especially difficult as normally programmers are trying to hold a number of structures in their head at any one time so as to solve whatever problem it is that they are working on. In most small companies, […]

Ship It!


“Any fool with a text editor can write code, but only an amazing few can code and make good choices around trade-offs. That’s the most valuable skill a developer can possess: the ability to make hard decisions.” – Ship It! Shipping is hard. Perhaps even the hardest part when it comes to writing software. Opening yourself to real criticism is the most frightening and liberating thing you can do.

Rspec + Devise user and current_user different

computing / programming / rails

If you follow the Devise Wiki on setting up Rspec and Devise you may end up wanting to set an expecatation on the currently signed in user. Don’t fall into the trap of setting it on the original user model as your specs will still fail: user.should_receive(:blah).once # Won't work Rather, you should set it on the controller’s current_user: subject.current_user.should_receive(:blah).once # Will work!

OSX Copy/Paste in tmux


One of the big things that took me a while to get right in tmux was copy/pasting. The gripes of trying to get it to work were enough to nearly make me forget using it all together. Here’s what you need to know. Install reattach-to-user-namespace brew install reattach-to-user-namespace and then in your .tmux.conf set-option -g default-command "reattach-to-user-namespace -l zsh" Assign a binding to copy the current buffer In your .tmux.conf set a binding to copy […]

Switching to tmux


Not being one to jump on bandwagons, I just had to try tmux after hearing so many people talk about it. tmux is a terminal multiplexer allowing you to run a number of terminals within a single screen as well as allowing you to detach and reattach to the same session as you please. So what? I can just run multiple tabs and get the same effect! Yes and no. I had been running multiple […]

A day with Ubuntu Oneiric Ocelot (11.10)


I just started a short term contract doing some RoR and was given a PC to work with. While developing on RoR on Windows is possible, it’s not what I’m used to or best at. As there were no Macs I could use, I thought I would give Linux a go. Seeing as I use Vim as my editor of choice, switching over should have been relatively painless. I’ll just get to the point, that […]

Accessing values in your plist file from your iPhone/iPad app

computing / programming

Recently I’ve been coding some iPhone and iPad apps with multiple targets, all sharing the same codebase. Previously I had been using Preprocessor Macros to get the job done, but that soon turns messy and hard to maintain. I’ve since moved to just storing target specific values in each apps related plist file. Retrieving a value is as simple as: [crayon-5f978f598d202560195997/]

nginx SSL PEM_read_bio:bad end line

computing / programming

Installing the intermediate certificates on our server gave me the following error while trying to start up nginx again: [crayon-5f978f598d25d066652622/] The end of the file looked fine, but the problem was half way through it. Somehow the concatenation had joined two lines together: [crayon-5f978f598d262523777020/] This just needed a line break to fix: [crayon-5f978f598d265110731937/]

SSH Tunnels with Postgres & pgAdmin


One of my previous posts showed how to use an SSH Tunnel to connect to a remote MySQL server. Since moving to Postgres I’ve been wanting to do the same thing with pgAdmin, which sadly isn’t as simple. There’s no way of creating the tunnel automatically in the app so we need to resort to the terminal. The first step is as before, we create the SSH tunnel to our server: [crayon-5f978f598d323720074277/] Here I’m mapping […]

Tagging in Notational Velocity


Recently I switched from Evernote to Notational Velocity. I was so sick of the Evernote iPhone app and saw that Notational Velocity synced with Simplenote. Since trying them both out I haven’t looked back. Now, Notational Velocity supports tagging but Simplenote doesn’t, and as I like to search by tag, this was a bit of a problem. So taking the Twitter approach, I simply hashtag my notes, which makes them incredibly easy to find in […]

Essential reading for developers

computing / programming

I’ve been meaning to write up a list of what books I think every developer, aspiring or seasoned should read. So let’s cut to the chase, and in no particular order: Code Complete If there was ever a bible for coding, this is it. It’s even Bible sized. A nice size to chuck at those annoying developers who just have no clue. Clean Code I would consider this book the “Ten Commandments” of coding and […]