Stream from a String Instead of CIN in C++

TL;DR: You can stream from a string instead of STDIN. Code is simple and is listed below. A project I did recently had a requirement to overload the >> operator use and STDIN to load data. The problem was not the overload itself, but the fact that testing would introduce a manual side. To get […]

Simple Floating Point Equality Check in C++

TL;DR: Here you can see a handmade comparison function for floating point values. While working on a C++ project using templates, I had to perform an equality to see if two values are identical. While the == is OK for integer values, it is not really OK for floating point values. At that point, you […]

Build a Simple Makefile

TL;DR: If you don’t have anything better to do, create Makefiles by hand :) Gist here. The other day I went back to origins with building a small C++ project. With modern tools, all went OK. However, deployment was a bit of a problem, in the sense the host had an obsolete toolchain: Me: GCC […]

C Optimisation – 2005 style

TL;DR: This post is about an experience I had in 2004 and it’s part of my consolidating technical posts I wrote in time. It may or may not be relevant to today’s technologies. I was trying to optimize a bit of code and found out that 2 if() statements are quicker than a case with […]


Note: This is a really old post transferred from Laurii for historical and consolidation purposes. Last week I’ve got an iPhone! :) 8G. Cute little toy… I’ve managed to compile the toolchain for linux last night and installed my first compiled app: the I’m quite pleased with the results. Now I have the following […]

DBus and Qt programming

For the past few days I’ve been trying to get more complex data sent via D-Bus. As one would say here in Ireland: Je’zus H. Christ Playing with python was easy. There are lots of examples on communicating complex data structures. But with Qt… It’s a bit more complex, because there are only a set […]


Well, I’ve been writing a piece of code today and it took me 3 hours to realise that strcmp(txt, “message”) was giving me a segfault.. because it doesn’t accept implicit parameter. putting a:

works… My excuse today is that i feel very bad (have a horrible cold) and i’m staying @ home. First sick […]

Scroll to top