The Latest

Avoiding the Worst Technical Debt

..or, how not to paralyze your future self.

When we talk about technical debt, we’re talking about paralysis. It means an organization can’t do something good today, because it handcuffed itself in the past with a poor decision.

There is nothing inherently bad about old code. Over time, coding styles, architectures, and environments may change, but code can often be operational and maintainable for a surprisingly long time. In many cases, tech debt is a treatable condition. It might slow you down, but it needn’t paralyze you.


Explore the Russian Troll Tweet Dump

NBC has published a database of the deleted Russian troll tweets. There’s even a nifty graph database for exploring them, Neo4j.

But what if you want to explore the data in your own PostgreSQL database? Here is some SQL to create the database and tables, import the CSV files, and convert text data to more convenient formats:

Tested on PostgreSQL 9.3.21, may require adaptation to work with other RDBMSs or versions. Enjoy!

New Tool: SQL to CSV

I write a lot of SQL queries at work and, quite regularly, find myself exporting them to CSV files. PostgreSQL’s command line client, psql, has a command to handle this task – \COPY – that you can use to output the results of a SELECT statement to a local CSV file. It looks like this:

\COPY (SELECT * FROM foo) TO '~/output.csv' CSV

That works well, but it’s tedious to constantly convert commented, indented SQL into a one-line COPY command. Sure, I could create a macro in my text editor to handle this. Since I’m probably not the only person annoyed by this though, I created a simple tool anyone can use to automate the conversion: SQL to CSV. Give it a try!

Screenshot of SQL to CSV tool

Desk Hacks

My wife and I have, between us, four laptops, two phones, and a number of other USB accessories. It’s hard to keep them all charged, and traditional power strips located on the floor are inconvenient. There was definitely room for improvement. Here’s what I came up with! More…

Onboarding New Hires

Words every onboarder (and team member) should live by:

Treat every question as an opportunity for a conversation.

Cheers to for the delightful discussion that produced this bit of wisdom.