Command that Terminal

In case somebody else is using the left and right arrows to navigate through typed commands, I’ve compiled a list of useful shortcuts for the Terminal:

  • Ctrl + A: Go to the beginning of the line.
  • Ctrl + E: Go to the end of line.
  • Ctrl + F: Move the cursor position one space forward.
  • Ctrl + B: Move the cursor position one space backward.
  • Alt + F: Move the cursor position one word forward.
  • Alt + B: Move the cursor position one word backward.
  • Ctrl + U: Clear the line before the cursor.
  • Ctrl + K: Clear the line after the cursor.
  • Alt + Del: Delete the word before the cursor.
  • Alt + D: Delete the word after the cursor.
  • Tab: Auto-complete file and directory names.
  • Ctrl + L: Clears the screen (same result as typing the clear command).
  • Ctrl + C: Terminate the running program; a timeless classic.

Edit: As noted by Parker Wightman (@parkerwightman), these same key bindings work in nearly every OSX text field.

As I grow older I found myself more and more comfortable working from the OSX Terminal, but I was annoyed by the “missing commands to navigate through the text”… Until I discovered them recently and my mind was blown.

Hope they are useful for somebody else too.

Software Engineering Radio

During the last few weeks, while commuting, I’ve been ditching music in favor of podcasts about software and programming.

Software Engineering Radio is one of my new favorites. It includes interviews with experts on hot topics like open source development or data visualization, while other episodes bring experienced points of view about classic topics like continuous integration, refactoring and so on.

It might be a little too stiff or academic for some listeners, but I definitively recommend it to any software engineer out there.

The data beyond the JPEG

JPEG files from a digital camera include lots of information beyond the actual picture. Camera settings, serial numbers, flash setups and more are included in one of many formats like Exif, IPTC, JFIF or TIFF.

To simplify the extraction and reading of all those properties, I’ve programmed Bravo, an Objective-C library that extracts all the metadata available from a JPEG image and compiles it under a single NSDictionary object.

It’s use requires calling a single method:

NSDictionary *metadataProperties = [[BRavoExifManager sharedManager] extractMetadataFromJPEG:imageData];

and the library is available under the MIT License.