June 21st, 2007 - by MrSpooky

Larry Wall (of Perl fame) once wrote in the “Camel Book” that the three virtues of a great programmer are laziness, impatience, and hubris. Out of these three, laziness is my favorite. Wall defines this as “The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don’t have to answer so many questions about it. Hence, the first great virtue of a programmer.”

He goes on to talk about coding and documenting in such a way so as to not create more work for yourself down the road, but he never addresses how to make the initial effort easier. I want to give a few pointers as to how you might get off on a good start.

Let’s say you’ve got a great idea for a new feature on your website and are ready to get started. You can do one of the three B’s: build, buy, or borrow. Building from scratch offers the most flexibility, but will likely take the longest. If you’re like me and don’t always have time to roll your own a good choice is to buy a 3rd party application. A 3rd party application (in most cases) is the quickest option, but can cost you a pretty penny depending on what you’re looking for. Borrowing is a nice middle ground between the two. There’s a good chance that someone else has already done what you want to do so why reinvent the wheel if you don’t have to? You get all the benefits of a pre-built solution (minus the price tag) with the flexibility of a do-it-yourself project.

The best place to do our “borrowing” from is Free and Open Source Software (FOSS). “Open Source” means that when you get a copy of an application, you have full access to its underlying source code; what you can do with it greatly depends on the license under which it was distributed. The most widely used open source license is the GNU General Public License (GPL). The basic gist of this license is that you can take the source code and do whatever you want with it, with a few caveats. You can make any kind of changes you want, but if you distribute your application, you must distribute it under the GPL and make your source available as well. More details can be found in the GPL Wikipedia entry.

There are many places on the web to find and download open source applications. Here are a few of my favorites:

  • Google – You can never go wrong with Google. Just search for exactly what you are looking for. Be careful, because Google doesn’t distinguish between open source and proprietary, so be sure to review any licensing and costs before downloading anything.
  • SourceForge – SourceForge provides free hosting and development tools to over 100,000 open source projects. This is always one of my first stops in looking for code. I recommend using the advanced search instead of the front page search, as its search algorithm isn’t very sophisticated.
  • FreshMeat – The self-proclaimed “web’s largest index of preferably open source licensed projects”. This is a great backup to SourceForge for finding those obscure projects.
  • ohloh – A relative newcomer on the scene. This is the Web 2.0 version of an open source directory. Each project shows a lot of detail about the code and contributors as well as a lot of other statistics.

A couple of years ago, a site I was working on needed to integrate an event calendar. The requirements were very specific: allow users to have a calendar on their pages where they can add events. A fairly simple project from the outside looking in, but once I started to hash out all the details, it became a fairly involved project. I was given a pretty tight deadline, so my only real choice was to go out and find a pre-existing application that could meet my requirements yet be easy on the budget. A quick trip to SourceForge netted a few options, and I finally settled on an application called phpEventCalendar. It didn’t quite fit all the requirements, but did have the user authentication and basic calendaring/event handling functionality we were looking for. The code was clean and easy enough to understand, so extending it to have a mini-calendar view and upcoming event list was very simple. It’s a great example of open source software saving me and my business time and money.

If you want to have the programmer’s “great virtue” of being lazy, you can ease your initial effort by borrowing someone else’s source code. So save yourself time, energy and money!

7 Responses to “The Lazy Programmer – Open Source and You”

1 ses5909

Ohhhh, i like ohloh! I didn’t know about that one. Nice article Jeremy.

2 Golgotha

Lazyness = “The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don’t have to answer so many questions about it. Hence, the first great virtue of a programmer.”

There’s a whole lotta truth to that…

Good write up Jeremy – thanks for that.

I must double my laziness efforts 🙂

3 Dan Schulz

You forgot to mention http://www.krugle.com in your article as one of the newer code repositories.

4 Jelena

Oh, I can’t even count how many times I haven’t done anything on my personal ideas because of laziness and because I believed writing from scratch would be the best option. 😛

5 Introducing Jeremy Ashcraft - aka MrSpooky

[…] already read Jeremy’s first two articles: Simple Tips to Help Survive The Digg Effect and The Lazy Programmer – Open Source and You. And his next article will be out […]

[…] read more | digg story […]

7 What Programmers Do | Programming for Sports

[…] Ashcraft sums it best at http://www.search-this.com/2007/06/21/the-lazy-programmer-open-source-and-you/. The objective of writing a programmer is the end result. It is not about the journey, only the […]

mulberry sale spyder womens jacket cheap new balance 574 mulberry outlet cheap new balance 574 arcteryx outlet mulberry sale spyder womens jacket mulberry sale spyder womens jacket mulberry outlet mulberry outlet new balance 574

Popular Articles

Top 10 Commentators

Subscribe to this feed! Subscribe by Email!

Random Bits Podcast

You need to download the Flash player from Adobe

Other Sites