Don’t be afraid of the tool box

| January 8, 2012

Last night I was browsing through questions on Stack Overflow when I came across the statement “I don’t want to use any modules, I want to learn.” I would counter with: learn to use modules. Reading this actually took me back to my early days of programming and falling into a very similar trap. It’s […]

The old adage on regular expressions

| September 5, 2011

A co-worker is fond of saying, “You have a problem so you solve it with a regular expression. Now you have two problems.” Regular expressions are powerful tools but they can easily cause unforeseen complications. The script I’ve been trying to improve contains a section for stripping HTML. It uses HTML::Strip to do this but […]

Let’s take the shortcut

| September 5, 2011

In my continuing adventures with legacy code I’ve come across a couple mistakes that I can only figure came from someone who didn’t really know the language. I have to extract information from several large gzipped files. These files will be filtered for specific IDs and the results kept in a new file. A pretty […]

Bad slipup with ternary operators

| September 1, 2011

I’m a fan of ternary operators. I’ve seen some people complain that they make code less readable but I don’t agree. I suppose it’s fair to say it’s not as plain to scan through but I think any decent programmer should understand them. The other day, however, I came across a legacy one in our […]

DBD:Mock

| August 31, 2011

Within about the last year unit testing became a big thing at the company I’ve been working for. Although the company has been around for awhile, most of its growth has been in the last year to two which means a lot of process has been evolving to ensure quality standards on a larger team. […]