29 Apr 2013

Goals and Giving Back: Creating Meaning in Life

[caption id=“attachment_599” align=“alignleft” width=“500”] By: John O’Nolan[/caption]

I’ve been in serious discussions with a new friend regarding the refinement of the self. The discussions started at RubyMidwest but since I don’t yet have their permission, I’ll leave the individual as a shadowy anonymous figure.

The evening of the discussion brought about a conversation regarding refactoring oneself through a constant process of testing and revising.

I shared my own experience of setting actionable goals related to various facets of my life, a choice that was influence by 7 Habits of Highly Effective People. These goals run the gamut of goals, anywhere from family, friendship, business, personal knowledge, technical skill acquisition, etc. Each of the goals is categorized and provides a broadly sketched roadmap of what I want to apply my energy to during 2013.

Without going into all of the details, I’d like to provide a couple of examples.

One of my larger goals for the year is to be less of a consumer and more of a producer. This applies both in the technical world, where I want to write more code and blog entries (rather than simply consuming them) and also in my online social experience where I’m moving out of my introverted shell and making connections with likeminded individuals. Thus far, this goal has been a smashing success. I made new Ruby friends at RubyMidwest and I’m a much more active member of the online community. I’m pleasantly surprised that this is such a natural goal to work on. It has become an outlet of my energy that’s relaxing and fulfilling.

In this same vein, I’ve become increasingly interested in giving back and contributing via teaching or volunteering in order to help others along their path. Pragmatic Thinking and Learning cites the Dreyfus Model of Learning, which loosely paraphrased, indicates that because I’m a beginning intermediate programmer, I’m uniquely prepared to lend a hand to beginners. The fact that I’ve been teaching myself Ruby for the past 3 years means that beginners’ struggles are fresh in my mind. So I’m taking what time I can out of my schedule to lend a hand to the next generation of passionate programmers.

Perhaps in the not too distant future, I’ll have a work setup that encourages and allows me to spend a portion of my time giving back to the community. The time’s approaching where I won’t be able to resist the allure of professionally joining the ranks of software developers.

If I may breach the fourth wall, what are your goals and aspirations gentle reader? I’d love to hear about them in the comments or in the walled garden of Twitter @_ZPH.

PS - Start mentoring someone, now!

20 Apr 2013

Increasing Productivity with Shortcuts

[caption id=“attachment_582” align=“alignleft” width=“500”] By: Dennis Hamilton[/caption] I’m writing this to the incessant tick-tock of a digital Pomodoro, which seems fitting as this post will discuss productivity hacks. We won’t be talking about run of the mill ones. I won’t berate my readers to modify their ‘/etc/hosts’ file in order to route Reddit or Twitter to localhost. No, these are real habits that help me be happier and more productive with the time that I spend on a computer.

Pre-Hack Step

Have a goal. Know where you’re heading and why. Act intentionally. This has been driven home to me by my own experiences in life. Recently, I’ve been reminded of this concept by the wonderful book, 7 Habits of Highly Effective People. In it, the author paints the picture of chopping through a forest without knowing what cardinal direction one is following. If you’re trying to learn a new technology, set actionable goals for yourself and talk about it with friends and colleagues. If you’re working on personal relationships, admit that to yourself and push yourself to be better.

Technological Hacks

  • Make everything a shortcut. I accomplished this by following Steve Losh’s article On the Cadet Keyboard. I configured my MacBook Air’s keyboard to use the right Alt key as a hyper key (a chord combination of 4 modifiers). This yields a unique key namespace for setting up non-conflicting keyboard shortcuts.
  • Use a program like Keyboard Maestro or BetterTouchTool to setup shortcuts for all of your regular programs. For me these are iTerm2, Chrome, Finder (or alternative), ThinkingRock, Email Client etc. My terminal is never further away than a HyperKey-T and possibly a Cmd-N to create a new window.
  • One keyboard shortcut that stands out on my system is a keybinding via Sparrow’s preferences. The combination alternately brings Sparrow to the front, or hides it. This is amazingly useful in order to not lose as much energy in context switching. In a matter of 4 seconds and by mashing the same key combination twice, I can check on a new email and then relegate Sparrow to the background.
  • Make great use of Alfred.app! Use custom searches for common items (ie Google search becomes “g searchterm”, note that this is built into Alfred). Add your own shell scripts for common tasks, ie checking for information on a public website via a prefilled URL. Use Alfred to execute regular shell commands by prefixing the command with a “>”. For example, I added a Ruby script to my ‘~/bin’ directory that sends an email to my dedicated GTD account. I access the script from Alfred, fire off a note for later, and am back to my current task without much distraction. This is a great way to keep your mind empty and receptive (just make sure to process the GTD tasks in a timely manner). Have more productivity hacks? I’d love to hear them in the comments below or via Twitter @_ZPH. I’ll post at some point about my experiences with the Pomodoro technique, but at this point it’s too early for me to comment.

18 Feb 2013

Making Thinking Rock v2.1 Work on OSX 10.8

So, PRODUCTIVITY, GTD, BUZZWORDS HERE. I’ve used ThinkingRock before when on a GTD kick a few years back. I liked how strictly it followed GTD. I liked being able to email myself thoughts to act on later, since email is the universal currency. I liked the tickle feature. I’m certainly willing to pay for software, as evidenced even by my donations to VIM, but I like the flexibility that’s available with open source software. The older version, v2.1, of ThinkingRock is available on SourceForge along with the source files. Given that I know zero Java, I thought it would be fun to have the source available for any program that I’m regularly using. So that leaves me with installing v2.1 on OSX 10.8 rather than the newer version. Unfortunately, while the newer version installs quite nicely and opens as you’d expect, v2.1 throws an error : unable to locate jdkhome, use –jdkhome switch. I Googled around and found this explanation of the JDK location and combined it with this explanation in order to come up with the following solution: hard code the bin/tr shell script to include the appropriate jdkhome location. Here’s the modified file:Note that line 21 is the modified line. Now on to revive my 3 year old GTD files, do some major deleting, get email dumps setup, and Get Things Done.

14 Feb 2013

Getting Started Configuring Bash/Zsh

I saw a post this afternoon by a member of Ruby Rogue’s Parley list asking how to write Ruby code to help them create a shorthand word for a longer commandline command. It takes moxy to ask questions on a list filled with many experienced developers. I was happy to see that positive responses flowed in. The immediate response was that the individual should perform the action by writing commandline aliases using the shell ‘alias’ command. But that only points the developer in the right direction. Instead of just pointing in the direction, the rest of this post will be walking a new developer through setting up helpful customizations in the shell environment. (Note, the generic information will be fairly compatible whether using the BASH environment or ZShell environment. Moving past general configurations into advanced configurations are where the two start to diverge, particularly with the environmental settings used in .bashrc or .zshrc files. I’ve found that the best remedy for this is reading through and gradually adopting a few lines here and there from well commented .bashrc/.zshrc files). Many of the customizations in the shell relate to minimizing repetitive keystrokes. Imagine the difference between typing

bundle exec rails server

and

be r s

If you’re typing this more than occasionally, it’s a large savings of keystrokes over a period of months. So how is it done? Aliases! Simply put, include the following code in your config file (a generic term that I’ll use for either .bashrc or .zshrc, depending on your shell): alias j="jobs" Or to help avoid dumb mistakes (it makes the remove command verbose and interactive =D. Even astute geeks fat finger the occasional keys ) alias rm="rm -iv".

I’ve taken to heart the adage, which I can’t attribute precisely, that anything typed more than a couple times on the commandline should be shortened to save future keystrokes. To prove this point, I currently have greater than 100 aliases and growing. Note that the following is from dumping all of my aliases to STDOUT via alias > jist -p -c and is not representative of one of my alias files. (For that, see the second inset codeblock).Here’s an example of one of my alias files… appropriately called ‘aliases.conf.zsh’:(Original code is at: https://github.com/zph/zph/blob/master/home/.zsh.d/aliases.conf.zsh) So that’s ‘aliases’. I find that they’re easier to keep organized if I setup a dedicated ‘.zsh.d’ folder. By which I mean that I created a folder called ‘.zsh.d’ in the base of my home directory with the following layout:

This folder contains all of the ‘zsh’ configuration files on my system other than ‘.zshrc’. Each general category of config files gets its own file, ie git.zsh, ruby.zsh, homebrew.zsh, etc. Helps me keep everything organized =D. I set the following lines in my ‘~/.zshrc’ to source each file within the ‘.zsh.d’ directory that has the extension of ‘.zsh’

_source_zshd(){
# Finally, source all the files in zsh.d (ALPHA order)
  for zshd in $(find ~/.zsh.d/*.zsh | sort );
    do source "${zshd}"
  done
}

This isn’t necessary, but it helps me keep the individual configurations nicely ordered. To recap, use aliases. Use the daylights out of them. Make your shell a finely honed tool that’s nicely crafted to your needs. Oh yeah… do the same with ‘functions’ which I can cover in a future blog post. And look into FASD because it’s awesome like Narwhals! Questions, thoughts, jeers, feedback… catch me on ‘ye ol Twitters’ @_ZPH

14 Feb 2013

Make the Shell Your $HOME

Let’s talk about how to use the shell. It’s a dirty secret that many of the repetitive commands used in the day-to-day world of developers are rudimentary shell commands.

Think of the activity of making a new folder and moving into that folder to start writing code, it looks something like this: mkdir new_project; cd new_project; vim new_project_code_file.rb.

Tighten it up and pay attention to simple improvements in the shell environment. ( My experiences are with BASH and ZSH ). That command becomes the following command with a little bit of improved shell configs: mkdircd new_project (makes dir and cds in the same command); e !!1_code_file.rb.

What’s in this shorter series of commands? Let’s break it down to parts:

  • mkdir and cd are replaced by a single new command mkdircd. We save the repetition of typing the folder name twice by compressing the command into a single request. It’s accomplished by setting up an alias in the shell configs.
  • vim new_project_code_file.rb is replaced with e !!1_code_file.rb. The e command is another shell tweak of mine. e is a shell function that steps in for the vim command and opens files for editing in a more intelligent way. See the source here: e (Note that it also depends upon the wonderful FASD utility available on Github.com).
  • !!1 becomes the first argument from the prior line, i.e. the first item after the command itself. Using !!1, !!2, !!3 has saved me countless seconds of retyping the same long folder/file names.

So, make the shell work for you! If you’re spending time in a new envionrment like the Linux Terminal or OSX’s Terminal, learn to configure that BASH or ZSH environment.

It will pay off nicely!

If you liked the article, follow me on Twitter at @_ZPH.