PHP Podcast Picks

There are a surprising number of PHP and web development podcasts available to us, which is a great sign of the language’s popularity and passionate developers. Podcasts are nice because they allow us to keep current and learn while on the go. My preference is listening to them while doing chores, turning otherwise boring time into a chance to improve my technical knowledge. Over the last year I’ve listened to several podcasts specifically about PHP and web development, and here are the ones I’ve been following: Continue reading “PHP Podcast Picks”

Bite Sized Code Refactoring – Redundant DB Connections

I maintain and work on a number of legacy code applications. One of them has earned itself some refactoring. So I’ll try to share some of the changes I’ve been making to improve it. Today, a problem that’s bothered me for a while: the DB class connects to the database even if no queries are being used.

I should be thankful that this legacy app doesn’t have a bunch of mysqli_* calls all over the place. Back when I wrote it I at least had the presence of mind to wrap SQL functions in an abstraction class. So this change was quite easy to make.

Continue reading “Bite Sized Code Refactoring – Redundant DB Connections”