Extending C++’s using statement

November 30, 2010

If you’re using C++ as your principal programming language as I do, you certainly know some or most of its capabilities, some of its limitations, and you’re surprised once in a while by a new construct or feature you never thought of even trying in C++.

Having inherited most of its basic behavior from C, C++ still has many quirks and omissions that keeps C++ from becoming a true next-generation language. I’m thinking, as a best example of this, the absence of true arrays. Arrays are pointers to stuff, sometimes you can get the size of the array, most of the times you’re stuck with the size of the pointer, which is of no use and forces the user to manipulate explicitly array meta-data (curiously enough, it wouldn’t ask for much to be able to know the size of an array all the time because new[] and delete[] do hide meta-data to do exactly that).

Read the rest of this entry »


Suggested Reading: Mathematical Cranks

November 27, 2010

Underwook Dudley — Mathematical Cranks — The American Mathematical Association, 1992, 372 pp. ISBN 0-88385-507-0

(Buy at Amazon.com)

Everyone using the Internet knows about cranks. A typical crank is an individual putting forth a defective theory, usually mathematical or physical in nature, but refusing to see his errors or understanding what he missed; despite well intentioned explanations from (real) experts on the topic. The crank insists with denial and eventually aggressivity.

Read the rest of this entry »


Wallpaper: Summer’s End

November 27, 2010

Summer's End, (1920×1200)


Seriously.

November 23, 2010

When you’re used to work with people which with you get along well, team spirit builds rapidly. If you get along very well, then you will pass the point from being merely coworkers to being good pals, and that results in more casual demeanour and familiarity. While it is very good for a team, you also have to be careful to not let familiarity (and all its liberties) seep into your work, especially with customers.

The first manifestation of this familiarity is very often jokes (which eventually permeates the very language the team is using) and pranks, although they really have to be funny to be tolerated by the team. But changes in language to include anything from innuendo to inside jokes or inappropriate language can create problems.

Read the rest of this entry »


Scripting with Postfix/mail

November 16, 2010

Sometimes you’re automating tasks that requires you to be informed of changes at the moment they’re occurring (or at least, not too long after). Turns out if you’re planning only to send mail, it takes abouts 3 minutes to setup postfix and send your first automate mail message!

First, you have to install postfix and mailutils, two packages that are fortunately already (likely) installed and readily available from the default repository. In a shell, type:

Read the rest of this entry »


Lost+Found: Pong!

November 14, 2010

click to play

Inspired by the classic Pong, Eisenfunk gives us a great Industrial music video.


Scary Code

November 9, 2010

If you code a lot in a week, you’re bound to make some (possibly) amusing typos. Almost every time, the typo is detected by the compiler and an error is issued, but sometimes you manage to (mis)type valid code! And I recently make one of those typo and I started wondering how far we can push this idea in writing really, really, really, really ugly code.

Read the rest of this entry »