Search
Twitter Updates
Fitness
Monday
Apr302012

Git: Branch visualization on command-line

Many people use git exclusively through the command line. However, this means that most people keep their branch structure in their heads. This doesn't need to be the case! Git actually comes with great branch visualization on the command line in addition to the awkward gitk gui client. In this post, I'll walk you through a few simple steps that will allow you to visualize your branches by creating a few quick command aliases within your ~/gitconfig file.

Click to read more ...

Wednesday
Apr042012

iOS textfield should support swipe gestures

Textfields in iOS apps are often too short to display all of their contents.  Currently, you have to tap-hold to bring up the magnifying glass and then drag to the edge to get the textfield's contents to auto scroll.  Wouldn't it be great if you could simply swipe left-right on textfields instead?  I don't see how this would conflict with swipe gestures on the containing page.  As long as the swipe is over the textfield, this would be a great and simply extension to standard textfield interaction at the OS level.

Wednesday
Feb082012

Ruby: Caching Technique

In this article, we’re going to explore some of the issues involved in caching as they apply generically to programming. Then we’re going to suggest a novel solution, build some proof of concept code, and then finally implement the caching code. We’ll implement the caching in stages so that you can clearly understand the ruby constructs involved. Actually, you could think of this whole article as a vehicle by which to demonstrate the following concepts in ruby:

  • code blocks
  • thread local variables
  • nested hashes
  • accessing the stack trace
  • using bindings

The best approach to understanding these concepts would probably be to create a single ruby file and add the code snippets to it as we go. This way, you can run the tests and follow along with the development process. You can also twiddle with the code during the various stages to see how things work.

So, let’s dig in…

Click to read more ...

Thursday
Feb022012

Finding the OSX mouse cursor

Often developers have multiple high resolution screens.  Finding a tiny mouse cursor on this expanse can sometimes be anoying.  I propose that OSX add a new gesture such that when you shake your mouse back and forth or shake your finger back and forth on the trackpad that the mouse cursor will produce some sort of visual display that easily draws attention to its location.

Wednesday
Feb012012

We need DTerm for iOS

Most ssh terminal apps for iOS are sluggish due to fact that they attempt to work like a regular ssh terminal session.  I think DTerm (see video: http://decimus.net/DTerm) has the right idea.  Enter your command in a standard textarea field on OSX then execute.  It will toggle the display into output mode where the keyboard goes away and you can easily scroll around and select/copy text from the results.  Then when you tap command line field at the top it toggles back into command line entry mode featuring tab completion, left-right arrows to step back and forth through prior commands from the history (along with their results showing on the bottom half of the screen), and a list-mode display of command history only a tap away.  

This should handle 90% of what you do on the command-line.  For the other 10%, like curses apps, vi, things that require direct interaction / IO, the app would flip to a regular ssh terminal session mode.  Upon exit, it would go right back to normal DTerm mode.