RSSAmplifier

Blog

Jon Cairns / Blog

My journey through software development and management.

blog.joncairns.comRSS feed ↗10 posts

Latest posts

We Are All Managers Now

Recently, I’ve been reflecting on the past few years of my career, and how quickly things have changed. So quickly, in fact, that you could be forgiven for blinking and missing it. AI-driven development is here, and it’s here to stay forever.

A Fresh Start

It’s been 10 years since my last post. I can hardly believe it. In that time, my blog has laid in waiting, wondering when I would return (and install an SSL certificate). Well, that day has arrived, and I can officially declare this blog reopened.

Better Rails debugging with pry

Pry is an interactive console, like IRB, which can be used to pause execution and inspect the current scope in your Rails web requests or tests. I’m going to show you how simple it is to drop it into your Rails apps and get better visibility over bugs.

Communication: how to be a better software developer (via Medium)

Link: Communication: how to be a better software developer

Use git to comment your code (and stop writing rubbish commit messages, please)

Over recent years we’ve seen the software community debate the usefulness of comments (this article being an example), and rightly so. The main argument is against explanatory comments, i.e. “this code is doing X”, as the ideal situation is that the code is written in a way that means it’s readable and self-explanatory. The problem with comments like this is that they easily become out of date, as…

6 useful and lesser-known git commands

Git is such a complex tool that I often feel as if I’m barely using 10% of it’s complete functionality. The various commands range from the absolutely essential (commit, push, pull) to the more exotic (cherry-pick, rebase), to the downright obscure or scary (fsck, merge-octopus, quiltimport). You can generally get by with knowing the basic functions of a small set of commands, that allow you to…

Rescuing web apps (part 2)

In the second part of this post on rescuing web applications, I’ll go through some techniques for refactoring the codebase of an existing project. This is for the case where you’ve decided that there is hope for your project, and that the best course is to take the time to fix what’s already there, as opposed to starting again from scratch.

Rescuing web apps (part 1)

Most programmers have the best of intentions. We all like to produce code that: a) nails a particular feature; b) runs quickly; and c) reads well. Despite these intentions, we’ve all ended up in the situation where our code has degraded into something ugly, unperformant or useless (aliteration unintentional). Sometimes it’s out of our hands, e.g. when a client decides that yesterday’s critical…

Looking for another vdebug maintainer

Back in 2011 I created the Vdebug plugin for Vim, which provides a visual debugger interface for debuggers that support the DBGP protocol, the main one being Xdebug for PHP. I created it mostly for myself, as I wasn’t happy with the other plugins out there. At the time I was almost entirely developing in PHP, but Python was the first language that I really enjoyed, so Vdebug was an opportunity to…

Evaluate ruby (or any command) and insert into Vim buffers

Something I commonly want to do is evaluate a bit of code and insert the result into my Vim window. For example, if I want to generate a 40-character UID, I could use ruby’s SecureRandom class: