Author Archives: Faye

Offline

I’m taking a break in 2012 for a few months (maybe less, maybe more!). Two boys aged 2 and 4 months fill my days to capacity at the moment. Keep on coding!

Simple Programming | Unions in C

Unions – ew. As primarily a C++ programmer, I used to shy away from code that contained this kind of black magic. However, unions are actually very cool things and are really not that scary or weird. A union is basically a variable. But instead of being an int, or a float, or a double, [...]

Simple Programming | Boost Compiled Libraries in 3 Minutes

Boost is mostly made of just header files, as we saw last week, which means you include them in your source, add the correct namespace and you’re good to go. However, there are a handful of compiled libraries too, so let’s take a very quick look at how we can use these. If you haven’t installed [...]

Simple Programming | Get Started With Boost in 3 Minutes

Boost is simply a collection of C++ libraries that provide lots of fun things to do in C++ without you having to write the code yourself. For example, Boost contains libraries to help you with mathematical calculations, regular expressions, smart pointers and even python integration. Parts of Boost have already been integrated into C++11, but [...]

Simple Programming | Find Files Installed by Yum

Yum is great isn’t it? All you do is tell it the name of the program or library and off it goes, installing files all over your computer, ready for you to use at the drop of a hat. However, sometimes it’s nice to know a little bit more about what yum is up to. [...]

Doh!

Well folks, as mentioned in How To Learn From Your Programming Mistakes, here it is. The story that still makes me shudder when I think about it. When it comes to all time, super-duper, public cock-ups, this one is almost the programming equivalent of Ratners. Strictly speaking I wasn’t actually trying to program anything when [...]

How to Learn From Your Programming Mistakes (in 5 Easy Steps)

Once upon a time, I made a very big mistake on a project at work. It was astonishingly stupid of me. I’ll share that wonderful event with you tomorrow (see how I’m craftily tempting you to come back and visit me again?). In the meantime, here’s my take on how you can learn from those [...]

Simple Programming | Dynamic Memory in C++ (new and delete)

We looked at dynamic memory in C last week, so let’s compare it with dynamic memory in C++. Allocation In C++, if you want to allocate on the heap rather than the stack, you need to use the new operator. Just like the C equivalents, the new operator returns a void* pointer to the block [...]

Simple Programming | Dynamic Memory in C (malloc, calloc, realloc, free)

Let’s take a look at the four methods that allow us to utilize dynamic memory in C. Dynamic memory just means we are using memory on the heap, instead of on the stack. Why would you want to use dynamic memory? You might want to create a variable or object that persists beyond the scope [...]

Spotted in Game, Portsmouth

Windows failed to load because the kernel is missing, or corrupt. Doh.