Skip to content

Instantly share code, notes, and snippets.

@sleepyfox
Last active February 6, 2024 11:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sleepyfox/d8acd337ef6001e1e44dca44f28cf526 to your computer and use it in GitHub Desktop.
Save sleepyfox/d8acd337ef6001e1e44dca44f28cf526 to your computer and use it in GitHub Desktop.
The Code of Cthulhu

The Code of Cthulhu

I did not invent this, I have extensively searched for the original article but failed to find it, so I'll do my best to reproduce it here.

Imagine a large Enterprise software development company. A bright young programmer joins this company, and in their first few weeks sets about the non-trivial task of understanding the gigantic bloated code base for the company's flagship product.

Finally, the young programmer ascends the dizzy spire of the company's office building and storms into the CTO's gloomy office with a stack of fanfold computer printout, pausing as they become aware of the music playing: a cacophany of crazed flutes and pan-pipes emerging from an audiophile system with a turntable that looks like a medieval orrery and a speaker that bears more than a passing resemblance to the monstrous shell of some long-extinct cephalopod. The music stops, the silence replacing it redolent of some awful finality.

Still full of righteous indignation the programmer angrily declares: "This code for our flagship product is awful!"

The CTO slowly turns in their giant mahogany and leather office chair, pausing to turn their baleful gaze upon the programmer. "Go on..." Cthulhu says.

"The code is unreadable, it follows no known style guide, good God it even mixes tabs and spaces! It is a giant ball of mud and string. The architecture is bizarre and cyclopean, there are no tests and it even tries to parse HTML with regex!" the programmer explains breathlessly.

There is a pause, reminiscent of strange aeons. "What would you do about it?" Cthulhu slowly asks, stroking one tentacle of its beard.

"Er, well", the programmer stutters, then rallying declares with an evangelical zeal: "I will build a new product, it shall be clean and performant, it will follow the language inventor's own style guide, it will have 100% test coverage and be a shining tower of modern architecture, serving as an example of all our industry's best-practises!"

"Go then, and see what you can do" Cthulhu intones.

The programmer retreats from Cthulhu's office, the ponderous and forbidding slab of faintly tarnished bronze that serves as a door closing behind them by some unseen mechanism with hideous efficiency, the dull thud of its closing that of a tomb door, leaving the programmer only to wonder upon which side of the portal they now are standing?

They swiftly retreat to their office, and close their door. Time passes.

A week passes, and no one has seen the young programmer, though often upon passing their office door staff will hear the sound of furious typing, staccato bursts interspersed with profane mutterings.

More weeks pass, then a month, still with no sign of the programmer. Finally, late one evening under the wan glare of a gibbous moon the programmer, now haggard and worn, emerges from their office like some ghastly butterfly emerging from its coccoon to spread its dimly glistening wings of fanfold in the faint moonlight.

Ascending the stone staircase to the upper reaches of the company building, once more the programmer approaches the CTO's office, this time with an awful apprehension.

The programmer offers up the listing to Cthulhu, their scrawney pale malnourished arms shaking with the effort of holding the giant stack of paper, encrusted with eldritch scrawlings of barely legible code. Their bloodshot eyes, having seen things no mortal was ever meant to see, turned upwards; they speak with a cracked, dry voice "Behold, it is done!".

Now the company has two big balls of mud and string, and Cthulhu looks upon the programmer and quietly says "Welcome. Now you are one of us."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment