Why it's Easier to Get a Payrise by Switching Jobs

Published

Tags:

It’s an empirical fact that it’s easier to get a payrise if you’re negotiating a new job than if you’re negotiating within your current job. When I look back over my own career, every time I’ve worked somewhere longer term (over a year), payrises have been a hard struggle. Whenever I’ve switched jobs, my new pay has made all payrises at the previous job irrelevant. These days I make job switching upfront and official: I run my own business and most of my money comes from short contracts. Getting rewarded for new skills or extra work is nowhere near as difficult as before.

I know I’m not the only one to notice this effect, but I’ve never heard anyone explain why things might be this way.

Using D Features to Reimplement Inheritance and Polymorphism

Published

Tags: , and

Some months ago I showed how inheritance and polymorphism work in compiled languages by reimplementing them with basic structs and function pointers. I wrote that code in D, but it could be translated directly to plain old C. In this post I’ll show how to take advantage of D’s features to make DIY inheritance a bit more ergonomic to use.

Although I have used these tricks in real code, I’m honestly just writing this because I think it’s neat what D can do, and because it helps explain how high-level features of D can be implemented — using the language itself.

Hacking extern(C++) Classes to Work in betterC

Published

Tags: and

First up, here’s a big disclaimer if the title didn’t warn you enough: this is a hack. It’s just a proof-of-concept for getting extern(C++) classes working with betterC D. Also, DMD keeps getting better quickly, so if you’re reading this post when something more recent than version 2.080 is out, this hack is probably obsolete. Hopefully you’ll find this post interesting anyway if you’re either

If you haven’t read my earlier post about how polymorphism and inheritance work yet, I recommend doing that first.

Xanthe Doesn't Need Linker Hacking Now

Published

Tags: and

I finally got around to dusting off the code for Xanthe to test if it can work without linker hacking, now, too. Short answer: yes. I had to add an implementation of memcmp for the freestanding build, but other than that, all I had to do was throw away the linker hacking steps in the Makefile. Apart from the linker scripts for building the disk images, Xanthe now just compiles normally with -betterC.

Also, the old build was about twice as big as it needed to be because the media files were being packed into the binary twice for no good reason. That doesn’t seem to be a problem any more with the latest dmd.

How Inheritance and Polymorphism Work

Published

Tags: , , and

I’ve promised to write a blog post about the DIY polymorphic classes implementation in Xanthe, the experimental game I once wrote for bare-metal X86. But first, I decided to write a precursor post that explains how polymorphism and inheritance work in the first place.

The Seto Inland Sea Trip, Part 2

Published

Tags:

This is the second part of my backpacking trip through the Seto Inland Sea.

The Seto Inland Sea Trip, Part 1

Published

Tags:

I like exploring. A few months ago I finished a major contract, so I took the opportunity to do an adventure I’ve wanted to do for some time: backpacking across the Seto Inland Sea in Japan and exploring its tiny little rural islands.

(Warning: this post is image-heavy.)

Using the Bourne Shell as a Cheap and Nasty Templating Language

Published

Tags: , and

Sometimes you need a really simple way to generate parameterised text without pulling in a full-blown templating language as a dependency — for example, when writing an install script that needs to generate a simple configuration file. Using the classic *nix Bourne shell that’s installed on practically every *nix system is one option. To be honest, it can be a terrible option, but it often gets simple jobs done, so I think it’s a trick worth remembering.

Look, Ma! betterC Without Linker Hacking!

Published

Tags: and

Version 2.079 of the DMD compiler has just been released with improvements to the -betterC flag. I just gave it a try, and the D code I linked into a C executable with some horrible linker hacking in 2016 now works without any linker hacking at all. There’s still some more stuff to test out when I get around to it, but, hey, here’s some progress:

The Catch-22 of Risk-Averse Organisations

Published

Tags: and

Markets are supposed to make corporations efficient, so if you do consulting, you have to wonder why so many organisations (both private and government) are so absurdly dysfunctional. The way I see it, there’s no real paradox: organisations are pushed by both forces of efficiency (like market forces) and forces of dysfunction (like political drama). Corporations are only efficient if the forces of efficiency are stronger.

There are many forces of dysfunction that can affect an organisation, but there’s one that’s particularly important for risk-averse organisations (like banks and large government departments). Whenever I see people in an organisation doing something that doesn’t make any sense, I always ask if this catch-22 can explain it:

Every risk-averse organisation needs someone to take the initiative to eliminate risks. But in a risk-averse organisation, that’s exactly what no one does.