Two types of software developers

The Free Dictionary defines a craftsman as; “someone who practises a craft with great skill“. A craft is defined as; “skill in doing or making something…“. I see two types of crafts-people in the software field today; tool creators and product creators. In┬ácarpentry, a carpenter uses a range of different tools to create furnitures for you and I, rarely does the carpenter create the tools she uses today, however if one traces back to the beginning, the carpenter did create her own tools before the industrial revolution and thankfully now, she can just focus her craft towards serving the customer’s vision.

Tool creators in the software field are the developers (usually hackers) that create the languages, development environments, protocols, etc. Product creators use the tools created, to make different web, GUI, mobile apps, etc that we all use to make our lives better. The beauty of the software industry is that, most at times, developers start as product creators and grow into tool creators because they might have an itch that current tools don’t scratch well or other reasons personal to them.

The plethora of tools available in the software field today is overwhelming. Personally, I enjoy writing software, specifically product based software, were problems for non-technical users are solved using the proper toolset. My current favourite are ruby, the rails framework and its surrounding stack for building web based applications. The intention is to really understand my current toolset at a higher level, in order to solve problems for users that meet specifications with the codebase remaining easy to maintain by other developers. I don’t have a need to create any tools, there are way too many that solve a huge amount of problems. Thank you all tool and product creators, your hard work have made the software industry a much better place today, I do hope someday, user’s I create for, will say the same thing.


How I am contributing to rubinius

I decided to contribute to rubinius over writing a rails application in order to improving my programming-fu. The choice was made after repeatedly asking the question on irc; “should I contribute to rubinius or write rails app since I have 6 months before my MSc programme is over”. Naturally I got different answers, but the one that helped me make this choice was from dbussink on irc. He said something on the lines of, “would you rather be known as a rubinius contributor or another rails programmer?”, that question helped me decide, so thanks again dbussink.

Rubinius is a large project and can be very overwhelming to dig into, however thanks to the team, they have written up a guide on different methods to contribute which can be found on the site’s contribute page.

For me, I chose to contribute by following the rubinius Coding Style Guide. Using this method, I go into as many *.rb files as I can and ensure that the coding style adheres to the guide. My first pull request using this method was adding a trailing new line to each file under the kernel/platform/ folder and it got merged, yay! Here’s a link to my contributions.

This has given me good feedback and more momentum to keep on contributing, so go on, start small and contribute to your choice of open source project.

How to populate your table with default values in rails

I have a Roles table with :name and :long_name columns. I have only 4 types of roles, with name i.e. short name and long name; :tm => Team member, lm => Line manager, :hr => Human resource and :admin => Administrator. In order to populate the values in my Roles table, all I need to do is put the logic in my db/seeds.rb file and run the rake db:seed command.

seed.rb —

role_collection = { 
  :hr => 'Human Resource', 
  :tm => 'Team Member', 
  :lm => 'Line Manager', 
  :admin => 'Administrator' 
role_collection.each do |key, value|
  @a_role = { :name => key.capitalize, :long_name => value }

rake db:seed

How to know what methods are available to an object in ruby

I was wondering if there was a plug-in for irb that allowed you to interrogate what methods were available to an object, but I found out thanks to the #ruby-lang channel on irc by Archiloque and drbrain, you can ask the object directly with the following code; my_object.public_methods.sort

Update: After a quick google search, found this stackoverflow.

Update: OOo, this even gets better, people are really willing to help, if only you ask. User “Kenichi” on #ruby irc gave this tip for tab completion in irb;

“raluxgaza: i have “require ‘irb/completion'” in my ~/.irbrc and i can hit tab-tab after a ‘Object.’ and it spits out all Object’s methods, similar to bash.”. Another sweet tip.

Then they suggested this gem