Archive for October, 2007

Explicitly Redundant

October 12th, 2007 Posted in Refactoring | Comments »

Today, I caught myself doing this:
bool f()
{
bool r;
if( x == y )
{
r = true;
}
else
{
r = false;
}

return r;
}

When I really should have written:
bool f()
{
return x == y;
}

In the actual code […]

Code Refinement

October 11th, 2007 Posted in Personal Development, Software Engineering | Comments »

Everyday is an opportunity to learn something new. Today, I learned how to set the tab width for vi (set tabstop=2) while trying to format the picture for this blog entry, for example. Daily learning is a form of personal refinement. Accumulated knowledge allows people to do things better.
If the lesson relates to development, then […]

Reinforcing Knowledge while Learning

October 3rd, 2007 Posted in Design Patterns, Python | Comments »

I just finished rereading Design Patterns: Elements of Reusable Object-Oriented Software. As a little experiment, I will explore how far I can get with the book’s fundamental design patterns with Python, an object-oriented scripting language that I am trying to pick up.
One of the first design patterns I came across even before reading DP is […]