Skip to main content

Benjamin Oakes

Photo of Ben Oakes

Hi, I'm Ben Oakes and this is my geek blog. Currently, I'm a Ruby/JavaScript Developer at Liaison. Previously, I was a Developer at Continuity and Hedgeye, a Research Assistant in the Early Social Cognition Lab at Yale University and a student at the University of Iowa. I also organize TechCorridor.io, ICRuby, OpenHack Iowa City, and previously organized NewHaven.rb. I have an amazing wife named Danielle Oakes.

A Huge List of Free Programming Books

by Ben

A Huge List of Free Programming Books.

Lots of topics. Not all are suitable for offline- or tablet-reading (web-only). Many PDFs are marked with “(PDF)”.

MySQL console tip

by Ben

If you terminate statements with \G instead of ;, the MySQL console will print the result set vertically rather than as a horizontal table.

For example, instead of:

+----+--------+--------+
| id | foo_id | bar_id |
+----+--------+--------+
| 1  | 6      | 2      |
+----+--------+--------+

You will have:

*************************** 1. row ***************************
                         id: 186
                     foo_id: 6
                     bar_id: 2

It’s really useful for wide tables, or ones with text columns.

I’m always surprised that the MySQL docs don’t make it easier to find this — it’s one of the better tricks for using the database console.