Latest Updates

How to use Function Pointers in C++
Category: Programming April 7, 2013 Tags: , ,

Function pointers in C++ have a somewhat obtuse syntax and similarly confusing semantics. This tutorial will lay out the syntax and semantics for the most common use cases in a way that is comprehensible and easy to get to grips with. The description here is by no means exhaustive but in my experience it should cover about 90% of the things you would want to do as long as you are making appropriate use of Boost.bind and Boost.function or their std equivalents (as you should be). read on
How to swap two integers without a temporary
Category: Programming October 28, 2012 Tags: , ,

This question is sometimes asked in interviews and it boils down to whether you know about and understand binary XOR. Binary XOR Binary XOR behaves in a slightly non intuitive way. Bits are compared between the two values and if they are the same the result is a 0 if they are different it is […] read on
How to use Boost.Program_options
Category: Programming August 2, 2012 Tags: , , , ,

If it so happens that you’re writing a console application, then chances are you will (or should) want to pass it some parameters at the command line. By default C++ has only the argc and argv parameters to the main function to facilitate this and I can assure you that working with them directly is […] read on
Monitoring router and internet uptime
Category: Programming July 14, 2012 Tags: , , ,

So recently I was playing my hardcore character in Diablo 3 (hardcore means that death is permanent and irreversible) when my router lost internet connection and my character promptly died. Understandably I was a little irritated by this. Blizzard take a bunch of the blame for making the game online only even for single player […] read on
Time for a factory pattern
Category: Games Programming January 3, 2012 Tags: , ,

I’ve finally been getting some solid C++ development time in over the holidays and just the other day I got around to implementing a Factory design pattern object for the Radman Games library. For those not in the know a Factory is a pattern that eases creation of many similar objects. Essentially it allows you […] read on
Successfully Integrating Qt and Ogre3D
Category: Programming December 10, 2011 Tags: , ,

Well at long last I have met my self assigned milestone of basic Ogre3D and Qt integration! I first wrote about my intentions months ago but as it turns out I got side tracked by writing my own build system, which I did because neither premake or cmake could satisfy my requirements. I may elaborate […] read on
3 Linux Command Line Programming Boosters
Category: Programming November 15, 2011 Tags: , , ,

The following is a description of three linux command line features I use on a regular basis that provide a strong boost to my productivity. Pipe to Clipboard. Find with Exec. Aggressive history for reverse-i-search. read on
How Futures Aid Task Based Multithreading
Category: Programming December 8, 2010 Tags: , , , ,

Task based multithreading makes a lot of sense and is a great way to break work into manageable parcels that can be processed in parallel. A task can be conceptualised as a finite piece of work that produces a result when complete. Using a thread to carry out a task is logical, but the problem […] read on
Function pointers for thread communication
Category: Programming December 8, 2010 Tags: , , , ,

When you program with thread objects (a thread bound to a class instance) in C++ you inevitably run into the need for an effective way of extracting information from them. At this point the dilemma becomes; do you ask the thread for the information or do you get the thread to report it to you? […] read on
How to use Boost.Bind
Category: Programming December 8, 2010 Tags: , , , , ,

Function pointers are a powerful programming tool but are extremely difficult to use with only the standard C++ syntax at your disposal. Boost.Bind steps into this breach, transforming the syntax from obtuse and confusing to intuitive and accessible. This tutorial will walk you through the basics of Boost.Bind in a way that will have you […] read on

Archive