The Life of a Programmer

Search

Archives

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

Allowing unlimited access with CORS

Opening a REST service for browser use requires CORS. Browsers have a very strict cross-domain policy that will either block the request, or just block

Stop signing crappy contracts

Just because you’re given a bad contract doesn’t mean you have to sign it. I was recently offered a programming position that came with a

The Infernal Loop Iterator

Collection iteration is perhaps the most insidious language construct. Simple to create and easy to understand. Yet lurking within lies the ability to create random

Strings and Text are not the same

Thinking of text and strings as the same type is wrong. It leads to all kinds of errors and results in confusing or incomplete APIs.

JavaScript and 3d graphics don’t mix

Writing WebGL code in JavaScript has been very frustrating. There are numerous aspects of the language which make this task harder than it should be.

Is exception safe code truly possible?

It is important to write exception-safe code. A truly exception-safe function produces no side-effects when an error occurs. It returns to the caller with the

The string type is broken

My previous article, “We don’t need a string type“, caused a bit of stir. Though the feedback is mixed, there is a common theme of

Are explicit namespaces required?

I’m working on modules in Leaf, implementing namespace support. The moment I write my first test a feeling of uneasiness sets in. As I stare

The true cost of zero cost exceptions

Exceptions are a cornerstone of programming. If we intend to use them prolifically, as in C++, we need an efficient implementation. Thus was born the

We don’t need a string type

Should string be a distinct type or merely an alias for an array of characters? I’m considering the options for Leaf and can’t convince myself

Safely using enable_shared_from_this

Obtaining a ‘shared_ptr’ from ‘this’ is possible using the ‘enable_shared_from_this’ class. It’s a feature that allows a class to reference itself within a smart pointer

Please join me on Discord to discuss, or ping me on Mastadon.

Archives

A Harmony of People. Code That Runs the World. And the Individual Behind the Keyboard.

Mailing List

Signup to my mailing list to get notified of each article I publish.

Recent Posts

Search