My life is not a math Olympiad
Graham King
https://www.darkcoding.net/ · 257 posts · history since 2005 · active
23 Aug 2025
5 May 2025
With many concurrent readers and a single occasional writer, which mutual exclusion primitive should you use? Let's look at the assembly to find out.
5 Apr 2025
Wherein our hero learns the arcane secrets of the u128 sword in the depths of the Underrust.
30 Mar 2025
Raw notes on Rust's HashMap design and implementation
29 Mar 2025
Raw notes on CPU optimization
A software system is transparent when you can look at it and immediately understand what it is doing and how.
7 Jul 2024
An overconfident genius personal assistant in my pocket
26 May 2024
Don't dismiss the statistically probable
29 Mar 2024
How does Rust allocate a zeroed Vec and what does it cost?
10 Jan 2024
A Rust object that survives program restart thanks to Rust allocators, systemd's file descriptor store, and syscall memfd_create.
20 Oct 2022
On Linux what can you turn into a file descriptor and then monitor with epoll?
18 Oct 2022
How does Rust return values, and does it make any difference to us programmers?
9 Oct 2022
When is the linear scan Two Sum solution faster than a map? What if we use AVX-512 instructions?
18 Sept 2022
In Rust, what is the performance cost of using sync::Once after the initial setup?
2 Sept 2022
In Rust, how does using a different primitive type (u8, i32, u64, ...) change the generated assembly?
31 Aug 2022
Assembly: In all the world of the programmer, there is no more important output.
1 Jul 2022
Can we make a Rust program that's as small as it's assembler equivalent?
5 Jun 2022
Thanks to Address Space Layout Randomization you can use the address of a stack variable as a zero-cost random number.
26 Feb 2022
Rust avoids memory copies by optimizing return value placement.
30 Jan 2022
On x86 it doesn't really matter what sync::atomic::Ordering you choose.
17 Jan 2022
Safety is boring, let's do pointer arithmetic.
3 Jan 2022
Linux's epoll API solved the C10K problem, enabling fast and afforable Internet services.
12 Dec 2021
Minecraft has an API. If you run your own server you can program it from Python.
16 Jun 2021
Is your Rust program CPU bound? Here are the very first things you can do on Linux.
9 Jun 2021
An adventure in CPU out-of-order instruction execution.
31 Jan 2021
Rust's traits are a single concept that unifies interfaces, abstract classes, mix-ins, operator overloading, contraints on generics, and more.
20 Dec 2020
Just a normal day reversing linked lists on the whiteboard.
19 Nov 2020
It will take longer to learn than most languages, the standard library is small so you'll need dependencies, and a lot of behavior is in traits.
11 Jun 2020
... because, at every new incident, your fortitude was to be called forth, and your courage exhibited; because danger and death surrounded it, and these you were to brave and overcome. For this was it a glorious, for this was it an honourable undertaking.
6 Jun 2020
In Go, what's the simplest possible way to put all your ad-hoc tools in one place?
22 May 2020
In Go, how do you run several operations that might return an error, and return those errors at the end? Here's how I do it.
13 Sept 2019
Two days at PDX DevOpsDays, a gathering of system administrators who use version control, and write a lot of YAML.
27 Jul 2018
Making like Theseus in the WEBM/MATROSKA/EBML audio maze
Unraveling the magic of async/await: From callbacks to linear code.
29 Mar 2018
Cultivating code: From seedling to flourishing software garden.
11 Nov 2017
Unveiling the hidden struggles behind a perfect facade.
22 May 2017
Unlock your learning potential: Practical tips for mastering any skill.
9 Apr 2016
"Unlock root-level ports without root privileges: A guide to systemd socket activation"
12 Jan 2016
Embracing the future: A quick guide to systemd for modern daemon management.
11 Dec 2015
Ada Lovelace: Debugging by horseback since 1843.
31 Oct 2015
"Move fast and break things: A cautionary tale from Facebook's code quality woes."
26 Oct 2015
Decrypt, inspect, and debug HTTPS traffic with mitmproxy and iptables.
26 Aug 2015
OSCON: Where open source meets commerce and connections bloom.
31 Jul 2015
"GopherCon 2015: Where infrastructure meets innovation and inclusivity"
30 Jul 2015
Equality in the digital realm: Where technology levels the playing field.
24 Jul 2015
Seamlessly bridging Go and C++: A practical guide to shared libraries.
15 Jul 2015
Unleash Go's power: Create shared libraries for seamless language integration!
10 Jul 2015
Diving deep: How to allocate memory without malloc in Linux assembly.
30 Jun 2015
Maps vs. slices: Choose wisely for optimal performance.
19 Jun 2015
Timeless wisdom for crafting better code: Essential software engineering practices.
17 Jun 2015
Decoding the programmer's job hunt: It's simpler than you think!
26 May 2015
Go's empty interface: Flexibility at a cost.
13 May 2015
"Unexpected compassion bridges divides in a world of conquest."
2 Mar 2015
"Wisdom from the masters: Insights on software engineering and language design."
31 Jan 2015
Diving deep into raw sockets and IP headers with Go: A technical exploration.
25 Jan 2015
Streamline your software delivery process with automation and collaboration.
10 Nov 2014
Design for disaster: Building software that survives production chaos.
4 Nov 2014
Surviving the Reddit hug of death: A tech tale of triumph.
23 Aug 2014
"Diving into the nitty-gritty of assembly: A programmer's adventure!"
28 Jun 2014
24 May 2014
"Unlock the power of Unix-style modular syncing and encryption."
4 May 2014
Gophers gather for insightful talks on Go's best practices and innovations.
1 Mar 2014
Diving Deep: Exploring Go's IP Layer Capabilities
Unlock the secrets of programming with these three essential reads!
12 Dec 2013
Uncover the hidden growth patterns of Go slices.
7 Dec 2013
"Geek chic: A witty tour of one programmer's hardware setup."
A keyboard love story: still typing after all these years.
22 Oct 2013
Realtime Conf 2013: Where innovation meets whimsy in the world of tech conferences.
17 Sept 2013
Unraveling the tangled web of WordPress pharma hacks.
11 Sept 2013
2 Sept 2013
Imagining a world where remote work reigns: the ripple effects on society and cities.
30 Jul 2013
Demystifying GPG encryption: A straightforward guide to the process.
21 Jul 2013
Upgrade your server without dropping connections: A guide to zero downtime upgrades.
14 Jun 2013
30 May 2013
27 May 2013
Sneezes, not buses: The hidden threat to your team's productivity.
2 May 2013
From serious to scripting: The evolution of programming languages.
26 Apr 2013
"From Rust rookie to pro: A comprehensive guide for beginners"
26 Mar 2013
Unlock Python's potential with these must-watch PyCon 2013 talks!
5 Mar 2013
Charting a young reader's journey through chapter books.
23 Feb 2013
"Google's grip on your digital life: A tongue-in-cheek journey through a day with the tech giant."
15 Jan 2013
C99 brings the magic: Keyword arguments in C!
31 Dec 2012
Optimize your life: Balancing career, family, and purpose with business-school wisdom.
23 Oct 2012
Harnessing the power of marketing for positive social change.
3 Oct 2012
Demystifying memory: RES is real, VIRT is virtual.
12 Sept 2012
8 Sept 2012
Unlock your creativity: A playful guide to entering the open mode.
4 Sept 2012
"High school success: A reliable predictor of life achievement, but not revolutionary thinking."
31 Aug 2012
Democracy at work: Is it time to vote for your boss?
12 Jul 2012
15 Jun 2012
14 Jun 2012
31 May 2012
Demystifying Unicode and UTF-8: A byte-sized guide to character encoding.
26 May 2012
Unveiling Go: Where Practicality Meets Innovation
9 Apr 2012
"Wise words from a programming legend: Embrace agile, keep learning, and code on!"
15 Mar 2012
"Boost your Django test coverage with ease: A practical guide"
13 Mar 2012
"Coder's paternity leave turns into polyglot key-value store adventure"
29 Feb 2012
A pragmatic journey through Go: From C-like roots to modern server powerhouse.
6 Feb 2012
2 Feb 2012
"Break the routine: Where real stories begin."
3 Jan 2012
22 Dec 2011
Streamline your SSL setup: Realtime and web on one port.
16 Nov 2011
Elevate your command-line scripts with these simple yet powerful tips.
3 Nov 2011
Small teams, big wins: The secret to programmer productivity.
2 Nov 2011
Machiavelli's timeless wisdom: Lessons for modern leadership.
25 Oct 2011
Uncover hidden iPad traffic and block pesky ads with this tech-savvy guide.
27 Sept 2011
"Uncover memory leaks with ease: objgraph to the rescue!"
26 Sept 2011
18 Sept 2011
Negotiating lives: Insights from an FBI hostage negotiator's memoir.
16 Sept 2011
Tame your git branch jungle with these handy tips.
15 Sept 2011
"Unleash the power of Django profiling with this easy guide."
10 Aug 2011
"Decoding the Python 2 Unicode puzzle: A practical guide."
3 Aug 2011
19 Jul 2011
Corruption, hacking, and a mysterious death: The News Corp scandal takes a dark turn.
7 Jul 2011
"Empowering Django developers: A step-by-step guide to setting up your environment."
30 Jun 2011
"Embracing simplicity: The Kobo Touch eReader for Linux users."
20 May 2011
Unlock the power of Django's class-based views with this practical guide.
29 Apr 2011
"Navigating the forest of django-mptt: A cautionary tale"
15 Mar 2011
Unlock Ubuntu's notification potential with this simple tweak!
7 Mar 2011
"Validate your market before building: The key to startup success."
1 Mar 2011
Empower anonymity: Run a Tor relay and make a difference.
20 Dec 2010
"Unlock your productivity: Why work thrives outside the office."
13 Dec 2010
"Keep your code clean with lintswitch's constant, unobtrusive background linting."
10 Dec 2010
"Unlock the power of remote work with Screen: Your terminal multitasking companion!"
20 Nov 2010
16 Nov 2010
"Freedom trumps frills: The real workplace revolution we need."
28 Oct 2010
22 Oct 2010
15 Oct 2010
Materialism: A fleeting fix for deeper insecurities.
26 Jul 2010
7 Jul 2010
Empowering users to become awesome: The key to great products.
30 Jun 2010
5 Jun 2010
Optimize your way to success: A guide for the web Renaissance person.
23 May 2010
13 May 2010
Turn off your TV and tune in to reality: your mental health will thank you.
5 Mar 2010
TV: The brain-altering medium that demands our attention.
1 Mar 2010
Sharing is caring
28 Feb 2010
"Monit: Your server's vigilant guardian and problem-solver."
17 Feb 2010
Streamline your server monitoring with Munin: A practical guide.
14 Feb 2010
"MySQL replication: The easy fix and the right way to rebuild."
27 Jan 2010
Debunking cold remedies: What science really says about Vitamin C and Echinacea.
16 Jan 2010
Unlocking the quirks of human behavior: A fascinating journey into irrationality!
16 Dec 2009
Unlock the secrets of persuasion with this eye-opening guide!
27 Nov 2009
"Uncover the biases that shape our beliefs"
20 Oct 2009
"Unlocking Memcached's Hidden Treasures: A Developer's Guide"
1 Oct 2009
17 Sept 2009
26 Aug 2009
Unmasking the psychology behind investment marketing: a cautionary tale.
10 Aug 2009
Queuing up the best message options: A straightforward comparison of popular message queues.
30 Jul 2009
20 Jul 2009
Distracted driving: A deadly habit we can't seem to hang up.
16 Jun 2009
11 Jun 2009
10 Jun 2009
Mastering Mercurial: A step-by-step guide to group-based repository setup.
27 May 2009
21 May 2009
The game gets a lot more fun once you can have complex track layouts
20 May 2009
"Fascism: As Tasteless as Its Graphic Design"
17 May 2009
10 May 2009
"From Micro Zooides to Civilization: A teenage coder's ambitious journey."
7 May 2009
6 May 2009
"GIMP: The Picasa replacement for advanced photo editing."
14 Apr 2009
"Breaking up with LinkedIn: A professional's guide to digital decluttering."
7 Apr 2009
21 Mar 2009
18 Mar 2009
Streamline your Reddit experience with Eddit: Less noise, more signal!
16 Mar 2009
Unraveling the Flex framework: A journey from button click to screen update.
15 Mar 2009
"Your guide to navigating the Flex learning curve – no fluff, just facts."
"Dude, like, totally dodge those math blobs in L.A.!"
23 Feb 2009
"Navigate the tricky waters of 'this' in JavaScript objects and callbacks."
22 Jan 2009
"Making Javascript look like Python: A whimsical Moose Observation Project"
19 Jan 2009
11 Dec 2008
9 Dec 2008
Heads I win, tails you lose: the tale of the corporate welfare state.
12 Nov 2008
"Unveiling the hidden dangers in our misguided fears"
11 Nov 2008
29 Oct 2008
Taming IE's trust issues: A quick fix for cross-domain NTLM authentication.
25 Aug 2008
Spice up your presentations with Keithnote: Where improvisation meets automation!
16 Aug 2008
"Your go-to MySQL command cheat sheet for quick reference."
16 Jul 2008
VoIP It's Cheap, It's Chic, It's Your New Communication Clique
30 May 2008
I'm just saying
20 May 2008
"From hosted services to self-hosted solutions: A geek's guide to digital independence."
2 May 2008
25 Feb 2008
12 Feb 2008
Building border walls one slogan at a time
10 Feb 2008
8 Feb 2008
27 Jan 2008
The web application revolution: blurring the line between websites and software.
27 Dec 2007
"Effortlessly migrate your Gallery2 photos to Flickr with this step-by-step guide."
19 Dec 2007
Finding the sweet spot: Pragmatic unit testing for optimal code quality.
18 Dec 2007
Mastering the console: Unlocking non-blocking input across platforms.
12 Dec 2007
XMPP and Flex: A developer's guide to instant messaging integration.
17 Nov 2007
16 Aug 2007
4 Apr 2007
Debunking fear-mongering: What really kills us, according to data.
25 Feb 2007
"Unconvention-al Conversations: A BarCampLondon2 Recap."
15 Feb 2007
A friend for your server: Jabber, the ultimate office wingman.
7 Jan 2007
A week in the wild with the Ray Mears School of Bushcraft
7 Nov 2006
24 Oct 2006
Automate your CV printing woes with a Python twist no VBA could ever conquer
16 Sept 2006
A grape-fully delicious journey through French wine grapes.
30 Jun 2006
I went to a talk about food and wine pairing, it was surprsingly interesting
From Bacon to Boxed: The Webgroup's Porky Punchlines.
15 May 2006
13 May 2006
Halliburton's SurvivaBall
9 May 2006
A markdown masterclass, where plain text shines.
Unsubscribing from inbox clutter, one feed at a time.
10 Apr 2006
31 Mar 2006
Amazon's star rating system lacks starlight
26 Mar 2006
"Unlock the secrets of Sage: A developer's guide to customizing your feed reader."
19 Mar 2006
"Enhance your Sage experience with these DIY tweaks."
12 Mar 2006
"Unlock the power of APIs: 10 reasons to embrace the future of web apps."
11 Mar 2006
Navigating the future: Web 2.0 insights from Tom Coates.
8 Mar 2006
18 Feb 2006
"Mastering the Art of Questioning: A Guide to Effective Communication"
Build Flickr: Lessons from the Web 2.0 Pioneer.
"Valuable insights from del.icio.us founder: Building web apps that users love."
16 Feb 2006
Cluster for better manageability.
15 Feb 2006
Modernizing Apache-Tomcat Proxy: A Streamlined Approach.
1 Feb 2006
2 Jan 2006
My favorite chemical reaction
1 Jan 2006
Awake, alert, and ready to tackle the day - a blog post on staying sharp during continuous operations
29 Nov 2005
Uncovering Java Project Dependencies: A Powerful Python Tool.
13 Nov 2005
"Embracing Contradictions: The Key to Unleashing Creativity"
9 Nov 2005
Humans, eh?
7 Nov 2005
30 Oct 2005
Re-publishing an article by Jeff Elkins
23 Oct 2005
Unraveling the mysteries of card verification values.
Unraveling the mystery behind credit card number validation.
Guerrilla Warfare: Subverting the Status Quo through Asymmetric Tactics
The Enduring Importance of Sea Power: Controlling Access, Enabling Global Trade.
Blending technology, tactics, and doctrine: The evolution of land warfare.
International law: Maintaining order amid global complexities.
Strategic mastery: Harnessing military might for political ends.
Commodities: From Pork Bellies to Bullion, a Captivating Exploration.
Derivatives: Unlocking financial flexibility through swaps, futures, and options.
Definitions and details of the financial world, with no guarantee of accuracy.
Designing intuitive user interfaces for effortless experiences.
Streamlining productivity: a system inspired by "Getting Things Done".
Unanimous decisions made easy with the Decider Protocol
Wear sunscreen and take life's advice with a grain of salt.
From Judea to the World: How a Jewish Sect Became a Global Faith
Unexpected Michaels: A World of Strange Wonders
Expiring Laws: Keeping Legislation Relevant and Accountable.
Grow Your Own Shrimp In Your Living Room
20 Oct 2005
"Credit card shenanigans: When flattery and desperation collide online!"