Extending C++’s using statement

30/11/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

27/11/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

27/11/2010

Summer's End, (1920×1200)


Seriously.

23/11/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

16/11/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!

14/11/2010

click to play

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


Scary Code

09/11/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 »


Suggested Reading: Digital Landscape Photography

03/11/2010

Michael Frye — Digital Landscape Photography: In the Footsteps of Ansel Adams and the Great Masters — Focal Press, 2010, ISBN 978-0-240-81243-4

(Buy at Amazon.com)

(This is off-topic for this blog, but you may know that photography is one of my hobbies.)

Frye presents various techniques to create great landscape photography in a spirit inspired by the great masters, in particular Ansel Adams. He discusses many technical aspects, such as the zone system, but focusses on composition and on the ever elusive nature of light: is light too hard? is it soft? warm? Does the light produce the right constrasts? Are the shadows interesting? Are the bright regions in the right places?

Of course, most of the images used in the book are breathtaking!


Source-Level Versioning?

02/11/2010

When you develop software, you’re always dealing with dependencies, and, if you’re lucky (or have made a quite enlightened choice of dependencies), you don’t have to worry too much about version numbers. But what if you do?

Read the rest of this entry »