The Life of a Programmer


All of the things labelled as Posts, so that crawlers have a place to find them.

Everything wrong with exceptions

In my previous article I looked at a basic reason why exceptions are necessary. In retrospect it was more of a look at why simple

The Necessity of Exceptions

Exceptions often get a bad rap. They are called ineffective, inefficient, and hard to work with. In a way such accusations aren’t unfair, as most

Performance is irrelevant

Asking questions about performance online universally invites scorn and accusation. A large number of programmers apparently feel that the efficiency of code is nowadays insignificant.

What is reference counting?

Objects are created, live for a while, and then destroyed. While creation is fairly clear, the when and how of destruction is fairly language dependent.

Dangerous and confusing casting

Casting in C++ is a confusing jumble of unclear and dangerous operations. It mixes unrelated concepts. It introduces ambiguities and redundancies. It’s an essential but

Implicit Type Promotion and Conversion

C introduced it and C++ mastered it. The hellish world of implicit conversion and type promotion. A system which silently modifies, truncates, rounds, and otherwise

The Ideal Language has “goto”

“goto”: the demonized programming construct. This little expression allows you to jump to somewhere else in the code while skipping the expressions in between. Opponents

How Polymorphism Works: Part 1

Polymorphism: the core of object oriented programming. Most modern languages have some concept of interfaces, virtual functions, and classes. Though each language differs in details,

What is an atomic operation?

We all know that operations in a computer happen one after the other. Having multiple CPUs and instruction reordering tends to obfuscate the issue. Technically

The Ideal Language cannot leak resources

The ideal programming language should not leak resources. Resources include not just memory, but also files, network connections, device locks, sound buffers, and anything needing

CPU Memory – Why do I need a mutex?

Multi-threaded programming calls for semaphores, synchronized blocks, mutexes, or whatever your language happens to call them. Most of us basically understand why we need them: