Programming Theory

Best practices, structuring of code, dissecting algorithms and talking about the “Why?”

Some Beginner Tips for Better Software Development

So you are new to programming and you want some quick and easy tips for making better software. Sure there are ton of sites out there talking about all these subjects on code structure and best practices, but which ones can give you some immediate bang for your buck? Which ones should you follow right out of the gate to get off to a great start? We have compiled 6 ...

Using Performance Counters in the C# Language

At any given time the Windows operating system is tracking statistics for the system and many of the processes / applications that are currently running on it. Things like the number of processors, how many threads are executing, how often the CLR is in garbage collection, the number of I/O operations being performed etc are all tracked through things called performance counters. One way you can look at these various ...

Transforming Shapes With Java AffineTransform

You, a retro gamer, are on a new quest to bring back a classic arcade hit to a whole new generation of space faring digital cosmonauts. But it is dangerous out there and you need to show these rookies the dangers of journeying their ships alone in the vastness of space. So you want to create your own game of Asteroids. For those unfamiliar with this game, and I can't ...

The Comma Operator in C++

When we think of the comma character we often think of it as a separator. It separates values in an CSV file, it separates items in lists, it may separate index values in multidimensional arrays (in other languages) and more. But in C++ an obscure way of using them was as an operator. The reason it never made it big as an operator and into the typical programming psyche is ...

My Love / Hate Relationship with PHP Traits

Anyone who knows me knows that I am a bit of a stickler when it comes to traditional software design principles. I do believe they lead to outstanding software products when they are followed correctly. This isn't to say I am not flexible when it comes to new ideas to improve traditional rules. When I saw the introduction of PHP traits in 5.4.0 I was eager to learn all about ...

5 Quick and Easy Refactoring Tips

You wouldn't believe how many programming questions I run across, on a daily basis, asking for help with programs that contain repetition, duplication and enough spaghetti code to feed half of Italy. Often times the person asking the question has a particular problem but they don't know exactly where the problem originates. So they plop down a bunch of code and say "It is somewhere in there... I think". Usually ...