Read about:

Archive for the ‘Programming’ Category

The True Spirit of Open Source

(Programming)

Very rarely does something completely disconnected from my day-to-day existence annoy me so much that I feel the need to say something, but this is something I feel very strongly about.

Robert Fischer wrote a post titled “Dear User of My Open Source Project” and many of the proggit comments were quite vicious. I noticed that some of these commentators seemed to have the same understanding of “open source”: that an open source project is a product, like any other product, that is simply distributed with its source code. Therefore, Robert is clearly creating and releasing “inferior” products and this behaviour should be punished. Being open source is not an excuse.

If this is your understanding of open source, you have missed the point. Entirely.

Yes, there are open source projects out there that are very well-documented, quite reliable, and have attracted large communities of contributors that tirelessly work to improve every aspect of the software. But by my count, that seems to be the exception rather than the rule. Most open source projects out there are maintained by just one person who scratched an itch and thought the solution might be useful to others. Some of these projects might be lucky enough to have a few passionate contributors. These projects may have some rough edges in their code or their documentation, and perhaps the contributors might be too busy to put on the appropriate polish.

You might think that irresponsible, or even reprehensible. How dare this person release this garbage and pollute the open source community!

News flash: it is these people who drive open source software. Those large, reliable open source projects with all of the sparkle and polish? They became that way because large groups of people found them useful enough that they decided to invest their time in making the project even better. But in all cases, for open source software to progress, people have to be willing to give up their time and energy for free and with no expectation of reward. Open source is driven by pure altruism.

And yes, as a programmer using open source software, you may sometimes have to roll up your sleeves, get into the code, and make the changes that you need. Or perhaps you can find other ways to contribute. But complaining like a petulant child that it doesn’t serve your particular purpose is, frankly, incredibly rude considering that you were given this software entirely for free and given the power to inspect its source code and change it to suit your needs. If that is the way that you’re going to approach these projects, go use something else.

Like Christmas, the true spirit of open source is giving.

Edit: Some one on proggit rightly pointed out that I’ve made a common mistake of grouping “open source” software with “free” software, a subtle distinction that this pagefrom the FSF makes very clear. However, I believe that Robert Fischer’s post and his complaints also referred more to “free” software than “open source” software. Consider, for example, that he prefers to use the WTFPL for his projects, the spirit of which is “I’ve decided to put this out here, and you guys can do whatever you’d like with it.”

This is not to say that all “open source” software doesn’t adhere to the values of “free” software or that all “open source” software necessarily follows the values of “free” software.

A Rails Puzzler

(Programming)

While I refuse to call this “magic”, the following has been confusing me for a long time now and I’ve finally decided to post it to my blog and see if anyone else gets it.

It turns out that ActiveScaffold and YARD don’t play nice together. In particular, if YARD has previously been loaded (say, to define a Rake task for it), ActiveScaffold initialization will fail with the following error:

uninitialized constant Helpers::ControllerHelpers

Using --trace and following the source code, I find out that this is happening during ActiveScaffold’s initialization, particularly at this statement:

ActionController::Base.send(:include, ActiveScaffold::Helpers::ControllerHelpers)

Debugging the ActiveScaffold initialization code yields this baffling result:

>> ActiveScaffold::Helpers
=> Helpers
>> ActiveScaffold::Helpers::ControllerHelpers
NameError: uninitialized constant ActiveScaffold::Helpers

It’s the weirdest thing that I’ve seen since I became a Rubyist and it is blocking me from using YARD to generate the documentation for my current Rails project. Unfortunately, cutting out ActiveScaffold isn’t going to fly because the deadline for initial release is so close and so much functionality is implemented using it already. It wasn’t my choice; if I had my way, I might never use ActiveScaffold ever again.

On “Magical” Ruby and Rails

(Programming)

Giles Bowkett wrote a post which, at the surface, seems to be a harsh criticism of the way that Pythonistas and, in particular, Django developers view Ruby and Rails but is actually much more general — he simply wanted to point out that the entire notion of calling language/framework features “magic” is silly for programmers, who should prefer to be rational than superstitious.

Read the rest of this entry »

Future Ruby – Day 3

(Programming)

Sunday, July 12th, 2009

While the previous two days had already blown my mind, it seems as though the best had been saved for last.  The day’s talks started with Collin T. Miller giving us his thoughts on how we can move away from text as the primary way of encoding computer programs and move towards other encodings that more closely resemble the domains in which we are trying to solve computing problems. While I found his ideas interesting, I don’t think I can agree with his notion that text should be replaced as the primary encoding for programs. I think that text is an excellent way of representing computer programs: it is concise, easy to manipulate, and easy to parse.

FutureRuby – Days 1 & 2

(Programming)

Edit: In my haste to post my write-up of these first two days of the conference, I didn’t do much in the way of linking and I forgot to write about one of the coolest things that happened on Saturday, the flying robot blimp. Bear with me as I edit this post to add some much needed links and visuals.

Friday, July 10, 2009

After work, I walked over to the Metropolitan Hotel to get my badge. My kit included a schedule, a large poster, a crimson t-shirt with black Russian-propaganda style Future Ruby logo, a bottle of water, a pack of matches, a patch with the Future Ruby logo on it (for sewing on to backpacks and the like) and a TTC pass valid for the length of the convention. All of this was stuffed inside of a rugged, dark green bag with the Future Ruby patch sewn on it. This is by and far the best swag I’ve ever received at a conference, ever.

After that, I got dinner and headed down to Unspace HQ for a wicked awesome patio party. Unspace HQ seems like an incredible place to work — prime location, lots of outdoor space, and a pretty nice collection of knick knacks, including a working pinball machine — but it is also an excellent space for a party. The highlight of the night for me was seeing two CF18′s doing a fly-by. Although I’m not a huge fan of military hardware, watching the way that they turned through the air was a unique experience.

I went home early to give myself enough time to commute home and get at least 5-6 hours of sleep for the next day.

GitHub Project Watch – 09/07/08

(Programming)

I’ve decided to create a new series of posts called “GitHub Project Watch” to highlight some of the projects on GitHub that I am watching. It’s kind of like GitHub Rebase, but with my own personal touch.

Here are some of the projects that I’m watching this week:

  • jmettraux/ruote: an open source workflow engine built with Ruby. I might be using this for a project I’m working on. Also see jmettraux/ruote-web2 for a demonstration of how to integrate ruote with Ruby on Rails.
  • brynary/webrat: automated acceptance testing with Ruby. It can simulate a simple browser on its own or drive a real browser via Selenium. Apparently there’s some work in progress on integrating with Watir and Celerity as well.
  • radiant/radiant: RadiantCMS, the lightweight web content management system for Ruby on Rails. I’m contributing a Japanese translation, the current version of which is currently available in the official i18n branch. (also see kbingman/radiant and enricob/radiant)
  • chriseppstein/compass: As I wrote previously, Compass is gaining new features at an incredible rate. It now sports improved Rails integration, Blueprint 0.9, an extension system, and asset hosts support. As an added bonus, it no longer depends on edge Haml; it will work with the newest stable release of Haml, 2.2.0. This is one of the most watched repositories on GitHub for a reason — if you’re not already using this, try it today!

I’m sure that I will hear of even more awesome projects at Future Ruby.

Compass: Still going on strong

(Programming, Web Design)

It’s no secret now that Compass is one of my favourite Ruby technologies. I wrote about it in great length on Tenthline’s blog and I spoke about it with Anita Kuno at Ruby Job Fair. It’s simply one of the best web design tools I’ve ever used, bar none. It offers all of the benefits of using CSS frameworks while allowing you to stay in control of your markup.

Future Ruby

(Programming)

Last year, I attended my first computing conference ever: RubyFringe. It was really more of an “un-conference”, organized by everybody’s favourite Toronto Ruby shop, Unspace.

The whole experience was fantastic. Giles Bowkett kept us in our seats past lunch with his thought-provoking presentation which mixed his slick Ruby MIDI generator, Archaeopteryx, with a call to action so moving that we could not help rising from our seats to give him a standing ovation. Nick Sieger threw us a curveball with a presentation on the history of jazz music and how it relates to programming. RubyFringe was a weekend to remember for everybody involved.

So, I was incredibly excited when Pete Forde and Meghann Millard announced that they would be running another Ruby conference in Toronto: Future Ruby. It’s not quite meant to be a RubyFringe sequel; really, something as uniquely awesome as RubyFringe will never be replicated again. But in any case I bought my ticket almost the very moment they went on sale.

Future Ruby will be next week and I will be there.  Hope to see you there too!

Radiant CMS in Japanese

(Japan, Programming)

Recently, I started a project to translate Radiant CMS into Japanese.  I started with Keith Bingman’s Radiant fork and added a Japanese message bundle.  Since then, Hirotaka Mizutani has been offering his help with the translation as well.

Ruby Job Fair

(Programming)

Ruby Job Fair will be held today from 11am to 6pm at the Gladstone Hotel in downtown Toronto.  At this job fair, Rubyists looking for work will be presenting themselves and their skills without computers or smartphones.  We’ve been asked to leave our MacBooks at home.  Instead, our presentations will be made in old-school Science Fair style.

It’s a unique premise for an event that I’m pretty sure only Pete Forde’s imagination could cook up and I’m proud to announce that I’ll be taking part in it.  I will have a posterboard and two binders showcasing my skills and previous work and I’ll also have an extra special surprise.  What’s the surprise?  Stop by and see!  =)

Hope to see you at the Job Fair!