Web Developer v2 6

Posted by mikong on December 31, 2007

As a web developer, it was a year full of changes. My OS for work before was Windows 2000, now it’s Mac OS X. I used Java and a proprietary web framework and now I mainly program with Ruby and Ruby on Rails. I used a proprietary javascript framework, and now Prototype. I primarily used Eclipse as my IDE, now I use TextMate (I used emacs for about a month). My database was Oracle, now it’s MySQL or PostgreSQL. From CVS to SVN, and recently using Git on personal projects. That’s changes to my OS, programming language, web framework, IDE, database and version control system. And here’s more…

From the waterfall software development model to agile software development. And from working with large teams (of 20 to 50 or more) for more than a year on each project to a small team (of 1 to 4) working on 2 week iterations (see Scrum). And as described in this older article, I switched my keyboard layout from QWERTY to Dvorak a few months back.

I didn’t test a year ago. Instead, I passed my code to software testers. I’ve heard of JUnit but never used it. Now, I’m learning BDD with RSpec.

There are also other changes like starting this development blog, participating in the Philippine Ruby Users Group, and contributing to Rails. Using newer releases like Ruby 1.9 (only for playing around though) and Rails 2.0 for my new projects. From Ubuntu Dapper to Gutsy (I skipped Edgy Eft and Feisty Fawn). Et cetera.

2007 was fun! And I’m curious how this article will look like a year from now. :)

Learning Ruby 1.9 7

Posted by mikong on December 25, 2007

I’m not going to list down “improve Ruby skills” on my New Year’s resolution. With the newly released Ruby 1.9.0 (a development release) and beta book Programming Ruby 3 by Dave Thomas (or simply Pickaxe 3), what better time to dig deeper into Ruby than now?

When I setup Rails on my mac a few months back (before Leopard and Rails 2.0), I followed Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X by Hivelogic. Following the Ruby part of that but updated for Ruby 1.9:

  cd /usr/local
  sudo curl -O  ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
  sudo tar xzvf ruby-1.9.0-0.tar.gz
  cd ruby-1.9.0-0
  sudo ./configure --prefix=/usr/local/ruby-1.9.0 --enable-pthread --with-readline-dir=/usr/local
  sudo make
  sudo make install

I didn’t have to run ‘make install-doc’ because ‘make install’ already installed the documentation. Since I haven’t upgraded to Leopard yet, this has only been verified on Tiger. Running ‘/usr/local/ruby-1.9.0/bin/ruby -v’, I got

  ruby 1.9.0 (2007-12-25 revision 14709) [i686-darwin8.11.1]

Cool! And I just bought Pickaxe 3 (right after installing). Looking for the first 1.9 feature I can find in the book… a new hash syntax:

  $ /usr/local/ruby-1.9.0/bin/irb
  irb(main):001:0> inst_section = { cello: 'string', clarinet: 'woodwind' }
  => {:cello=>"string", :clarinet=>"woodwind"}
  irb(main):002:0> inst_section[:clarinet]
  => "woodwind"

It works! And let me just add that new hash syntax looks gorgeous. Now I have to end this article and try a 1.9 feature beyond mere syntax updates. Chapter 11: Fibers, Threads, and Processes looks like a good place to start… :)

Update 12/26/2007: I initially installed Ruby 1.9 on /usr/local. It installed rubygems 1.0.1 with it and messed up my gem installation for 1.8.6. I had to reinstall 1.8.6, and then reinstall ruby 1.9 in an isolated directory, /usr/local/ruby-1.9.0. I updated the article to use this directory. For now, I only use 1.9 to try the new features. If you need to work with multiple versions of Ruby, you might want to check out Dan Manges’ article.

My Git notes for Rails 1

Posted by mikong on December 17, 2007

From Toolman Tim’s blog entry Setting up a new Rails app with Git (with a few changes, and summarized for personal reference).

$ git init
$ mate .gitignore

Add in .gitignore:


Back to the command line:

$ cp config/database.yml config/database.yml.example
$ touch log/.gitignore
$ touch tmp/.gitignore
$ git add .
$ git commit -m "Initial commit"

Additional Notes:

  find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;

Blogging From TextMate, and RubyConf 2007 videos 439

Posted by mikong on December 13, 2007

This is a test post following an old TextMate screencast demonstrating the blogging bundle.

Continue reading…

PHRUG’s 2nd Rails Coding Session 2

Posted by mikong on December 07, 2007

Last Wednesday, I attended the 2nd Rails Coding Session of the Philippine Ruby Users Group (PHRUG). The small, informal gathering was planned for writing Rails apps with plugins like acts_as_solr, memcached, etc. None of us wrote a single line of code. Instead, we discussed several Rails and Ruby topics and gathered ideas for future Rails events.

Some of the topics discussed were:

The future Rails events planned are coding sessions (hopefully with actual coding involved), monthly meetups (with the next meetup probably in January and to be held at either the Ateneo de Manila University campus or Stratpoint Technologies office), and possibly a Philippine Rails Conference. Some notable issues covered were the challenges of organizing a large conference (including problems involved with having closed source companies as sponsors), and  problems with matching the level of explanation in your presentations with the knowledge of your audience.

The Rails community in the Philippines is only starting to grow. But I’m glad that the local Rails events are increasing in both frequency and number of participants. Previous Rails events I’ve attended are the First PHRUG Meetup last January, Rails Happy Hour last September, Rails Talk with the presentation by Guy Naor last October, and most recently this “coding session” (I missed the 1st Rails Coding Session 2 weeks ago).

Before I end this post, I’d like to thank Rad and the Development Executive Group for accommodating us for the session.