Blogs

Agile Web Development with Rails

Many people (like me) want to start using Rails, but are a little intimidated by picking up a new language and framework. We don’t want to spend countless hours reading through online documentation and puzzling out how things work. We just want to get stuff done. Agile Web Development with Rails is written with this group in mind and it certainly delivers.

The book is targeted at people who are familiar with coding and object oriented design. While prior knowledge of Ruby is certainly helpful, the book works well for those who are new to the language as well as the framework of Rails (like me). For Ruby newcomers there is an appendix that covers some of the basics of the language. Let’s get on to the meat of the book.

Guide to Hiring Developers

Editor's Note: This is the second posting in our series of items from guest contributors. Since all of our current CodeSnipers and community have looked for a job, I thought this perspective would be helpful. If you are interested in contributing to CodeSnipers, please check out the previous posting.

This is the first of a three-article series that touch upon the subject of hiring developers. These articles reflect the procedure that I had established when I was working as R & D Manager in LogicDIS, having interviews for new hires as part of my job. Of course I'll be following the same procedures in my newly formed company, called think.BIG.

got something done

A meeting in a stuffy conference room, over lunch, no less. Issues were raised, some fingers were pointed, solutions were discussed. Nothing too unusual really, until the end, when the host cleared his throat and inquired: Alright, so what's the next action?

This, right then and there made my day.

I love Unit Testing

Alright, so I admit that I'm completely biased. I can't be impartial about it and I don't think you should be either. Once you begin writing Unit Tests - or better yet Test Driven Development - you don't want to go back. Once you have a series of Unit Tests for a particular class, method, etc, it's painful and scary to modify code lacking these tests...

But I also see the value in Unit Testing in a few other areas.

Off By 1 + Off By 1 = Off By 2

A while back, I was working on a particular project where the load was a magnitude higher than what we expected. It seemed to always be running and only rarely catch up with the backlog. The load on the system shot from nothing to 99% for long durations.

We hoped something was wrong, but the data was coming into the system just as expected. What was our problem? It was an Off By Two Error. Yes, normally they're called "Off By One Errors," but there's a bit more to it than that...

Attribute Accessors - Ruby VS. PHP

Typically in objects you don't set/get the attributes directly, you use a method. This allows you to do type checking when setting the data or to format it a certain way when getting the data. In php I would use something like this:

    function setAttack( $atk ) { $this->attack = $atk; }
    function getAttack() { return $this->attack; }

And used like this:

$testcard->setAttack(4);
echo $testcard->getAttack();

UTF-8 Versus Windows UNICODE

The term "Windows UNICODE" refers to the UCS-2 (and later UTF-16) encoding chosen by Microsoft for their standard Unicode encoding. For years, one of the recurrent thoughts in my head has been "what if Microsoft went with UTF-8 instead of UCS-2 as their Unicode encoding?" Many times I feel I would have preferred UTF-8, but it is by no means a simple issue. People often point to speed as the defining issue but even speed is not a slam dunk. Here are some points for comparison between UTF-8 and UTF-16.

PTO

Paid Time Off (PTO) is the answer to employee time administrators' dreams - one bank of hours accrued at a set rate for each employee to use for any reason they need to be out of the office.

The alternative, which is still quite common at many companies, is to track leave for each employee in separate accounts. One bank of vacation hours, one of sick leave, and one of personal leave - all accrued at different rates and with different rules for when an employee can use them.

Even with the simpler PTO account, the one excuse fits all, companies still manage to introduce arcane rules governing how an employee can use those hours. Few things shine a light into a company's bureaucracy brighter than examining their employee time off program; or better yet, living inside of it.

Mistakes So Far

I’ve spent the last five weeks on Codesnipers writing about some of the mistakes I made when starting my company, and during the development and marketing of my products. I doubt they’ll be the last, and I’m sure I’ve already made a few more that I just haven’t identified yet, but I’m done for now.

So, to round off this batch (and in case you missed any), I decided to do a quick rundown of the mistakes series so far.

Software Evolution Considered Harmful

There’s a common trope in CS education that goes something like this:
“All software evolves, so be prepared for it.”

Far be it from me to imply that one shouldn’t be able to respond to change; that’s not my intention. But the idea expressed above contains a flaw: software does not evolve.