Giving Design Patterns a Second Chance: Ruby Edition

July 1, 2009 – 8:00 pm

Design Patterns in RubyI have a confession to make.

You know that really popular design patterns book that most software developers (especially in the Java world) claim to have read? You know the one I’m talking about. The one written by the “Gang of Four”. The one you were supposed to have read during your junior or senior year of college. Yeah, this one.

I’ve never read it.

Sure, I’ve owned it. I have even thumbed through it a few times. But I’ve never sat down with any real intention of absorbing the information within its covers. The problem for me personally was that when I first opened Design Patterns I was just starting my software development career. I was too young and hadn’t seen enough code to really comprehend the authors’ message or understand the need for such a book.

Read the rest

Ruby Screen Scraping with scRUBYt!

April 27, 2009 – 6:00 am

I am currently in the market to buy my first home so I’ve been spending a lot of time on various real estate websites searching through listings trying to find the perfect property. I live in a competitive housing market so it is important that I am informed whenever a new property becomes available. Logging onto any number of real estate websites to check for new listings each day is very repetitive and time consuming. Fortunately, it is possible to easily gather this information automatically using a technique called screen scraping.

Since most web pages are simply made of HTML it is easy for a computer to parse and store the information contained within these documents. Each programming language commonly has a host of libraries to assist in the screen scraping/parsing process and Ruby is no exception. To create simple screen scrapers in Ruby I have been using a library called scRUBYt!. scRUBYt! provides methods to access a given website and scrape its content. All the programmer needs to do is provide the XPath string to the desired information.

Using the scRUBYt! library has allowed me to write a small screen scraper script to access the FranklyMLS.com website, check for new listings, and then report back with the results. This has saved me a lot of time and effort. Let’s dive into some code to see how this is done.

Read the rest

Helpful Tips from Pragmatic Thinking and Learning

February 1, 2009 – 10:00 pm

Pragmatic Thinking and Learning

In order to stay up to speed in an industry that changes by the day developers must constantly be learning and acquiring new skills. As technology fads come and go it is important for developers to isolate and keep pace with the technologies that are in high demand. Because technologies change so rapidly it is important that we are able to learn as quickly and efficiently as possible. While there is certainly no shortage of information available on the latest technologies, making sense of this information, figuring out what is important, and putting this information to use can be a very challenging task. Therefore it is important that developers learn how to learn.

I recently finished the book Pragmatic Thinking and Learning: Refactor Your Wetware by Andy Hunt, co-author of the seminal book The Pragmatic Programmer. In this book Hunt discusses how people (specifically software developers) learn and offers tips on how we can set out to learn more effectively. Here are some useful tips I stumbled upon while reading Pragmatic Thinking and Learning:

Read the rest

5 Reasons VirtualBox Rocks My Socks

January 11, 2009 – 9:30 pm

The Productive ProgrammerLately I’ve been interested in learning about a variety of the Operating Systems that are available today. I’m a big advocate of using the right tool for the job so experimenting with the latest OSes is a must in order to figure out the strengths and weaknesses of each. While experimentation is a great way to learn it can be a bit of a pain to find an old machine, format the hard drive, and install an OS. Dual booting is an alternative option, but there is the inherent risk of messing up the current state of your machine.

Overcoming these issues was always a bit of a challenge for me until about six months ago when I stumbled upon VirtualBox. VirtualBox is Sun’s “family of powerful x86 virtualization products.” VirtualBox allows you to install and run “guest” operating systems in their own virtual environment on top of a “host” operating system. I know that virtualization has been around for a while, but until finding VirtualBox, I’ve never had much success running virtualization software. VirtualBox is different. It’s intuitive and easy to use. Here are the top 5 reasons why I love VirtualBox:

Read the rest

Book Review: The Productive Programmer

November 28, 2008 – 1:13 pm

The Productive Programmer

Author: Neal Ford
Rating: 3.5/5

As a developer I am constantly seeking ways in which I can improve my ability to quickly generate high quality code so I was excited to pick up Neal Ford’s latest book, The Productive Programmer. This book offers advice on how to accelerate the production and quality of code by exploring many tools and practices that developers can use on a daily basis. In the book, Ford introduces several productivity patterns that can be used immediately, but more importantly he defines a nomenclature that allows developers to construct additional productivity patterns on their own.

The Productive Programmer is broken up into two parts:

Read the rest

Getting it on with Git - Part 2

October 5, 2008 – 5:20 pm

In my previous post I introduced Git and discussed its distributed nature, speed, and powerful branching/merging capabilities. Today I’m going to continue the discussion on Git by writing about GitHub, Git in practice, and why Git may not be for everyone.

Read the rest

Getting it on with Git - Part 1

September 30, 2008 – 10:40 pm

When I first heard about Git a few months ago the first thing that popped in my mind was: “Why the hell would I ever want to learn a new version control system?” Subversion works perfectly fine, doesn’t it? I resisted at first, but after a few weeks I came around and decided to take Git for a test drive. This is what I discovered:

Read the rest

Groovy Domain Specific Language Tutorial

August 17, 2008 – 8:42 pm

Although it may seem like an advanced topic, writing a simple Domain Specific Language (DSL) in Groovy is actually pretty easy. Groovy’s dynamic nature and metaprogramming capabilities give developers all the tools they need to quickly and easily write their own DSL.

Read the rest

Ruby Nation: Day 2 Wrap Up

August 3, 2008 – 6:49 pm

Opening Keynote - Rich Kilmer

Rich Kilmer’s opening keynote was by far the best presentation of the day. Rich is an incredibly experienced and skilled Ruby developer who was one of the earlier adopters of the language. During his keynote, Rich walked through his experiences with Ruby dating all the way back to 2001. He has certainly worked on some interesting projects for impressive government agencies including DARPA and the United State Air Force. Rich also talked about projects he has created for the Ruby community including FreeRIDE - a Ruby IDE and RubyForge - a code repository for Ruby projects.

One particularly interesting thing Rich mentioned was that Ruby is becoming a mainstream language. I personally find this both exciting and scary. It is exciting that the community is growing at that there will likely be more opportunities to work on Ruby projects professionally, but it is a bit worrisome that the community could start to be overpopulated with run-of-the-mill developers transitioning from other dying mainstream languages.

Read the rest

Ruby Nation: Day 1 Wrap Up

August 1, 2008 – 11:59 am

Ruby experts and enthusiasts from around the country met in Washington, D.C. today for the first annual RubyNation conference. I always think it’s awesome to get together with industry leaders to absorb and share new information and insights. I’ve been to quite a few tech conferences in the past, but I’ve never been as engaged and attentive as I was today. There is an energy around Ruby and Rails that I have yet to witness with other technologies. I continue to be amazed by how passionate and open the community is as well. I met and talked with more people today than all of the other conferences I’ve attended combined.

In case you weren’t able to make it, here’s a quick rundown of today’s events:

Read the rest