Saturday, March 16, 2013

Wow, that was f***ing fast!

Today I noticed a small error in a graphic included in section 5.2 of the Edge RailsGuide Getting Started with Rails. I raised an issue on the Rails Github project, figuring, OK, I've made my little contribution to the March of Open Source Goodness.

I was pleasantly surprised when Rails maintainer Steve Klabnik responded moments later that I had indeed caught a bug, as he'd done a couple of days before on another issue I'd raised (does this guy never leave his keyboard?). In the earlier case, the error was on my part, a semantic mismatch between using Rails 3.2.12 with the edge docs intended for the new Rails 4.0.0.

This time, after I read Steve's speedy response, I gave the RailsGuide page a reload, thinking, "OK, it' probably be a couple of days before that change gets committed."

I was astonished to see that not only had Steve committed a fix for the error, he'd used my screen grab to fix it. Major grin :)

Coming from a waterfall-ish project world where changes can take weeks and months to find their way to end users, I'd call this delight "moving at the speed of Rails".

Saturday, February 2, 2013

Preparing for Ruby on Rails job interviews

There are lots of excellent books and websites that provide general help with preparing for coding interviews, but few discuss the expectations of Ruby on Rails employers.

Here are a few links to fill in that gap:
Many of the ideas for Ruby job interviews could of course be extrapolated to any software development interview. Happy hunting!

Saturday, January 19, 2013

apropos and whatis for Cygwin

apropos and whatis are Unix-y commands that display a short description of other commands available on your system.

apropos is handy when you're looking for a particular function, say reading the contents of compressed files. It tends to be over-zealous with keywords, so for example, typing apropos compare compressed files returns 184 one line descriptions on my system. Typing just apropos compressed returns a more manageable 22 descriptions:

$ apropos compressed
bzcmp []             (1)  - compare bzip2 compressed files
bzdiff []            (1)  - compare bzip2 compressed files
...
zmore []             (1)  - file perusal filter for crt viewing of compressed text

whatis comes in when you know the name of an unfamiliar command, but you want a simple description of it's purpose:

$ whatis zmore
zmore []             (1)  - file perusal filter for crt viewing of compressed text

To use apropos (or man -k or whatis) in Cygwin, you must first create the whatis database by running the /usr/sbin/makewhatis command, probably with admin permissions to write the database.

Note (15 Jan 2014): apropos and whatis will not work from a Windows command prompt unless you've put the Cygwin bin directory ahead of the Windows and Windows\System32 directories in the PATH. Otherwise, apropos and whatis, which are shell scripts, will try to use the Windows 'find'command instead of the Cygwin 'find' command

Monday, November 12, 2012

After Oil - I'm published!


About a year ago, John Michael Greer, author of the Archdruid Report, challenged his readers to submit short stories envisioning life after the end of cheap petroleum, without descending into Mad Max apocalypse, nor relying on rescue by "alien space-bats."

My short story "Traveling Show" was among the twelve that John selected, and I'm happy to report that the book is now in publication and available from Amazon in Kindle, Nook, Smashwords and good old dead trees formats.

Many thanks to John for inspiring me to write a story, and to my fellow authors, without whom the book would not have been possible. Together we might part the mists to the kind of future where we'd like our children and descendants to live.

Tuesday, August 28, 2012

A Roadmap for Learning Web Development

Damien Roche gave some excellent advice (IMHO) to the question, "Which language to learn for Web Development Ruby or Javascript?". His last comment is the most critical: "If you don't enjoy learning new things, you're in the wrong game."

You know some Ruby, start there. Using RoR will have a positive impact on your ability to develop web applications. Although stuff like Compass, SCSS, Coffeescript isn't required, I'd certainly advise you delve into them once you're familiar with the underlying languages.

A good roadmap would be:
  • HTML, HTML5
  • CSS, CSS3
  • Javascript, jQuery
  • Ruby, Rails
  • SQL
Once you are familiar with the above, and if you plan to use RoR, these are essential:
  • RVM
  • Bundler
  • Capistrano
  • Rails console
Along with that, you will most definitely want to be able to use:
  • IDE - Eclipse, Rubymine
  • Git
  • Linux
A web developer who primarily works with Rails and Linux will have been exposed to and know (some more than others) all of the above. It is absolutely critical that you understand how these technologies compliment each other. 1,2,3 are evergreen - they will never 'go out of fashion'. So start there.

Once you've done all that, you might want to move up to the next level and learn:
  • HTML -> Haml or Slim
  • CSS -> SCSS and Compass
  • Javascript -> Coffeescript
  • Rspec and Cucumber
As you can see, there are tonnes of different tools at your fingertips. One skill which surpasses all others: the ability and enthusiasm to educate yourself. If you don't enjoy learning new things, you're in the wrong game.

Friday, August 3, 2012

apt-cyg: command line installer for Cygwin

apt-cyg  is a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository. The syntax is similar to apt-get.

Update Ruby from source for Cygwin

Edit: Added LibYAML and OpenSSL extension instructions from http://saltnlight5.blogspot.ca/2011/11/i-like-to-use-ruby-that-comes-with.html

Make sure Cygwin OpenSSL packages are installed.

Run Cygwin console as Administrator if using Windows 7, Cygwin was installed as Administrator and UAC is enabled, install may need admin permissions and Cygwin doesn't have a "sudo" command.

If you get fork errors, try rebasing Cygwin.

If rebasing fails, try deleting C:\cygwin\etc\rebase.*

http://permalink.gmane.org/gmane.os.cygwin/135305

> $ /bin/rebaseall
> /usr/lib/perl5/5.14/i686-cygwin-threads-64int/CORE/cygperl5_14_2.dll: skipped because nonexistent.

And this is caused by a minor perl packaging problem. You can simply
ignore this warning.
I'll fix it with the next perl update.
--



$ ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [i386-cygwin]
$ cd /tmp
$ wget http://pyyaml.org/wiki/LibYAML
$ tar xvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4/
$ ./configure && make && make install
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
$ tar xvf ruby-1.9.3-p392.tar.gz
$ cd ruby-1.9.3-p392.tar.gz/ext/openssl
$ ruby extconf.rb
$ make && make install
$ cd ruby-1.9.3-p392/
$ ./configure && make && make install
$ wget http://production.cf.rubygems.org/rubygems/rubygems-2.0.3.tgz
$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [i386-cygwin]