|We don't bite newbies here... much|
Data structures drive logic! (was Re3: Passing / evaluating / dieing on one line...)by dragonchild (Archbishop)
|on Apr 05, 2002 at 16:05 UTC||Need Help??|
Your example is spurious, because it's bad code.
Now, adding a new column is a matter of changing the %Columns hash. In addition, it's much easier to factor out the %Columns hash to some configuration file this way than doing it your way.
In addition, this lends itself to even further improvements. For example, consider
THAT is self-documenting code!
Furthermore, any time I see
I was to do something like:
It's cleaner, more maintainable, and more extensible.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.