Global Day of Code Retreat, Chennai

I spend the day on Saturday at ThoughtWorks Chennai attending a code retreat. This is the first time I've attended a code retreat and I had a lot of fun at the event. This code retreat was organized in many different cities across the world as part of the Global Day of Code Retreat (Dec [...]

Writing Object Oriented Code in ANSI C

I was trying to choose a language that I could use to practice implementation of different data structures and wanted something object oriented that had a syntax that wouldn't distract me away from what I'm trying to learn. Ruby/Python is too high level if you want to learn how to implement as a stack or [...]

Leave me alone when I’m coding

Recently, Roy Bahat, president of IGN Entertainment, wrote about why he's learning to code. This part of his post, coming from someone who isn't a programmer by profession, was especially insightful: Every time I open my editor, I’m reminded that I can’t just “jump in for a few minutes” the way I can with my [...]

Writing Ruby Gems – Part 5: Setting up Rspec

[This is the 5th part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Previous post - Setting up Test::Unit.] In the previous part of this tutorial we set up Test::Unit for writing our gem’s unit tests. In this part, [...]

Writing Ruby Gems – Part 4: Setting up Test::Unit

[This is the 4th part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Previous post - Publishing to Rubygems.org.] So far in this tutorial we haven’t written any code that would be useful in solving Sudoku. The reason is [...]

Writing Ruby Gems – Part 3: Publishing to rubygems.org

[This is the 3rd part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Previous post - Adding some code.] If you’re planning to share your gem with everyone, you have to publish the gem to two places - rubygems.org [...]

Writing Ruby Gems – Part 2: Adding some code

[This is a part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Previous post - Gem specifications.] In the previous post, we saw how to set up the gemspec and also installed the empty gem into our rubygems directory. [...]

Writing Ruby Gems – Part 1: Gem specifications

[This is the first part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Next post: Adding some code.] The first thing to do when creating a new gem is to create a file called gemspec that contains information about [...]

Writing Ruby Gems

Creating a Ruby gem is a lot easier than it seems. Many tutorials about writing gems recommend using something like Jeweler or Hoe to create the structure of the gem for you. Using such tools will make it much easier to get started with a gem, but building a gem from scratch will help you [...]

Tabs vs. spaces for indentation

A few days ago I was arguing with a friend about the right way to indent code. Being a spaces-for-indentation fanatic myself, I complained about the hard tabs he was using in one of his github repos and he in turn expressed shock that I actually waste time on this space-for-indentation thing. If you're an [...]