Ruby Editor/IDE Comparison

Last week I posted about my preference for IDEs. Well my adventures in Ruby continue and with them, my search for the right development environment. What's the best environment to get Ruby on Rails development done? Well, David Heinemeier Hansson (the architect of Rails) has sounded off on his preference for TextMate, but what about those of us not working on OS X? I took a little bit of time and played with jEdit, Eclipse, UltraEdit, gVim, ArachnoRuby, and SciTE. Read on for my initial thoughts on each.

Enemy Unit Testing

I'm a big advocate of Agile Methods and principles. I believe quite simply that an evolutionary design, refactoring, user stories, and especially Unit Testing. So when I came across the concept of Enemy Unit Tests, I was dumbstruck by the logic of it.

Think about it. When we right code, we write Unit Tests (hopefully!) and run them as often as necessary. You may not run all of them all the time, but you run the important ones as often as possible.

Now what about all those libraries you're using? When was the last time you tested those?

Open Source and Freeware Vs. Paying the Bills

Editor's Note: This is the first posting in our series of items from guest contributors. Since many of our current CodeSnipers are currently running or considering running their own software shop, I hope you find this perspective helpful. If you are interested in contributing to CodeSnipers, please check out the previous posting.

Nothing is totally free. No matter what you're trying to do, there are always going to be expenses. To continue your projects and create new ones, you need to know how your money flows. If you're not sure how your money is spent in relation to producing your release, you're headed for financial trouble.

Execution matters

Many entrepreneurs invest time contemplating great ideas, be it for building a better mouse trap or solving pernicious Information Technology issues, but the investment is often squandered. Put simply, ideas are a dime a dozen, while execution of ideas is a rarity. I draw inspiration from an excellent article in Business Pundit:

If you want to be an entrepreneur, stop believing that ideas matter. That isn't what entrepreneurship is about. Entrepreneurs aren't idea people, everybody and their brother has ideas. Entrepreneurs are people that exploit ideas by matching them to market needs, executing them despite scarce resources and designing a business model that makes the idea profitable.

Extending Objects - Ruby VS. PHP

Extending a base class to a more specific class is a good practice and is called "inheritance" Here's the process I go through to decide if I should make a base class and extend or not.
I make a list of the objects I will need for a game, for the VS game we have:

  • Character cards
  • Plot twist cards
  • Location cards
  • Equipment cards
  • Player
  • Board

Those items that have "card" that gives me a clue that maybe they are related and perhaps have some common attributes. Then I make a list of the attribute of each card. I'll just show two of the card types here:

How to Determine Text File Encoding

With the explosion of international text resources brought by the Internet, the standards for determining file encodings have become more important. This is my attempt at making the text file encoding issues digestible by leaving out some of the unimportant anecdotal stuff. I'm also calling attention to blunders in the MSDN docs.

For Unicode files, the BOM ("Byte Order Mark" also called the signature or preamble) is a set of 2 or so bytes at the beginning used to indicate the type of Unicode encoding. The key to the BOM is that it is generally not included with the content of the file when the file's text is loaded into memory, but it may be used to affect how the file is loaded into memory. Here are the most important BOMs and the encodings they indicate:

Do I have to go home? Great office space makes for a great place to work.

* * * * * * * * * * * * * * * *How would you like to work here?


No, not for the hotel; at the hotel.

Micro ISV Mistake #5

This is the fifth and final instalment of my series on Micro ISV mistakes. If you missed any of my earlier mistakes, they are all still available here on CodeSnipers: #1, #2, #3, and #4.

Starting a business on your own or with a small number of people will be a delicate balancing act. It’s very difficult to stay focused on the things that matter, avoid the plentiful unnecessary distractions, and maintain your momentum. It gets even harder when you realise that it’s not obvious what matters and what can wait.

Mistake #5 is worrying about success.

Greater Than, Less Than, What’s the Difference?

Thinking big by thinking small

I had a professor once (actually the finest I’ve ever known) who insisted to his students that “programming is all about the little details”. In my view, what he meant by this is that regardless of the project, methodology, people involved, or what-have-you, if the software doesn’t do what it’s supposed to do, it’s most likely the result of someone, somewhere, failing to account for a few little details. Not that those few details are necessarily easy or hard to identify (or rectify)—the point is that tiny discrepancies in code can have tremendous impact.

Case in point: our ship date is nigh, looming upon us like a brick wall in the middle of an interstate. We’re about ready to let this thing out the door, when we discover oops, that module X that we built two months ago, the one that we’ve had the requirements signed off on three separate times, isn’t quite right. Essentially,
Behavior ‘foo’ should result when incoming_date is > existing_date
should read:
Behavior ‘foo’ should result when incoming_date is >= existing_date

There are some additional details which only add to the headache, but I’ll spare you those.

Better Living Through IDEs

I’ve recently been playing with Ruby on Rails and Ruby in general. One of the first things I do when looking at a new language is check out what development tools exist. Coming from Visual Studio, I like to see that there is a fully featured IDE available for me to develop with. I did a little research, but came up short of exactly what I was looking for. So, I put out a question to the comp.lang.ruby group asking for help finding an IDE*. One result of my question was an ensuing debate about how useful IDEs are. How useful are they? Are they only for beginners?