The Mad Coder

The mad
coder

Tristan has been devouring code day and night since 1984. 42 years later, the loop is still running.

Do not feed after midnight. Except coffee.

1while (alive()) {2    eat();3    sleep();4    code();5    repeat();6}

    alive() = trueiteration no. —

    TC-1984 Power Sleep Disk

    The sacred function

    Handwritten in 1984, never changed since. It runs in production 24/7. Here is the code review it had to endure.

    while (alive()) {    eat();    sleep();    code();    repeat();}

    Original version, copied exactly as written: While Alive() {eat(); sleep(); code(); repeat();}

    • Line 1. alive() always returns true. The reviewer checked: it's intentional.
    • Line 3. sleep() is called but has never actually run. The monitor's "Sleep" light confirms it.
    • Line 5. repeat() is pointless inside a while loop. The author's reply: "You never know."
    • Overall. No social_life() function found anywhere in the project. Ticket opened in 1991, still pending.

    The counters don't lie

    Live readings since the first boot in 1984. The numbers go up while you read. So does he: he's coding while you read.

    —Uptime without a reboot
    —Keys pressed
    —Coffees drunk
    —Cans of Coke emptied (see the crime scene)
    —Bugs created
    —Bugs fixed
    ErrHours of sleep
    2.3MDownloads of his add-ons. That one is the only true number on this board.

    Calculation method: highly scientific. One coffee every five hours, one can every seven and a half hours, twelve bugs a day, and always one more bug than fixes.

    Tristan, messy hair and a worrying smile, in front of his screens
    Specimen photographed at 3 a.m. He mistook the flash for a system update and asked to reboot.
    Spec sheet Ref. TC-198454 years in service
    Model
    Mad coder TC-1984
    Manufactured
    1972, Valais (Switzerland)
    First boot
    1984, on his very first computer
    Power supply
    Coffee, Coke, cold pizza, crisps (in that order)
    Battery life
    Unlimited as long as there's Wi-Fi
    Sleep mode
    Not supported
    Cooling
    Sighing at other people's code
    Languages
    PHP, Python, C#, Swift, Lua, Windev, SQL, and fluent printer
    Systems
    Windows, Linux and macOS, often at the same time
    Peripherals
    Two screens minimum, three at weekends
    Warranty
    Expired in 1999 (survived the Y2K bug)

    Complies with no known standard. Do not update during a build. Do not throw away: still repairable with coffee.

    24 hours in the life of the mad coder

    Extract from the system log, printed on continuous paper. Not a single line was made up. Well, hardly any.

    1. Starts "a quick little fix before bed".
    2. The quick little fix now touches 47 files.
    3. Finally finds the bug. It was a semicolon. It had been there since 2009.
    4. Commit "fix". Then "fix the fix". Then "really the last fix".
    5. The birds are singing. He suspects they are notifications.
    6. The sun rises. Threat detected: blinds closed.
    7. Coffee no. 1. Officially.
    8. Can no. 1. Unofficially no. 6.
    9. Meeting. Camera off, IDE on.
    10. eat(): yesterday's pizza, eaten one-handed over the keyboard.
    11. sleep() called. Exception thrown. Back to code.
    12. "Works on my machine."
    13. Goes home. To code.
    14. Dinner. Thinks about an SQL query between mouthfuls.
    15. "Just one last commit."
    16. git push --force, with a little prayer in Lua.
    17. goto 00:00

    The git log of his life

    Full history, pulled from the main repository. No commit has been rewritten. He just did one or two push --force.

    $ git log --oneline --graph --all

    1. 3d3bc5a(HEAD -> main)wip
    2. f2849defeat: a whole website to make fun of me (coded at 3 a.m., obviously)
    3. 2d96e9brefactor: replace coffee with double coffee
    4. ce68becfeat: remote work. No need to go home to code any more
    5. 8152784merge: branch "holidays" into "code" (conflict resolved in favour of code)
    6. 9a0a967revert: "attempt to sleep 8 hours"
    7. b6004c2feat: add a line without a semicolon (nobody will notice)
    8. c1953d6(v2000)fix: Y2K bug. The world never thanked me
    9. 7e3edbfchore: manufacturer warranty expired
    10. f7ebcb6chore: open ticket no. 1 "social_life() not found"
    11. 960aa3afeat: discovered coffee. BREAKING CHANGE
    12. 94b0c53feat: memorise the Konami code (most useful skill of his life)
    13. 2493099(v1.0)feat: first computer. sleep() disabled
    14. 5e72e96Initial commit

    $ git status

    On branch main. Ahead of origin/sleep by 54 years.
    Changes not staged for commit: absolutely everything.

    Crime scene: the desk

    Forensics arrived at 4:12 a.m. after neighbours reported "continuous keyboard noise since 1984". Click the yellow markers to read the police report.

    The mad coder's desk, overrun with Coke cans and pizza boxes, with him smiling in the middle
    Police report no. 1984-42 Forensics, all-nighters unit
    1. 1
      The suspect

      Smiling at the camera. Claims to be "almost going to bed". Nobody believes him.

    2. 2
      The hair

      Ruffled by 42 years of "just one last commit". No comb was found at the scene.

    3. 3
      The cans

      Estimated quantity: 1,337. The suspect calls it his "liquid cooling system".

    4. 4
      The pizza boxes

      Stacked in chronological order. The oldest date back to version 1.0 of his first add-on.

    5. 5
      The four screens

      All switched on. One of them displays code written in 2009. Nobody dares touch it.

    6. 6
      The sticky note

      It reads "TODO: sleep". Status: pending since 1991.

    7. 7
      The notebook

      A hand-drawn API diagram. The pizza stains serve as anchor points.

    8. 8
      The chair

      Has taken on the exact shape of the suspect. Application for listed-monument status in progress.

    9. 9
      The mug

      Contains a coffee from 2019. It is believed to have developed its own consciousness. And a fork on GitHub.

    Conclusion. No casualties, apart from sleep. Case closed: the suspect failed to appear for questioning, he was "just finishing something".

    Ctrl + Alt + Del on his brain

    We opened his brain's task manager. Select a process, then click "End task". Good luck.

    Task Manager · BRAIN.SYS
    CPU: — · Memory: full · Sleep: 0 %

    The nutrition report since 1984

    The human body is 60 % water. His: 60 % coffee, 30 % Coke and 10 % cold pizza. Here are the numbers, calculated live since 1984, with highly questionable scientific rigour.

    — Coffees drunk
    • ≈ — litres of coffee
    • that's — bathtubs filled to the brim
    • including — kg of pure caffeine
    Goal: fill an Olympic swimming pool — % · pool expected to be full in the year —

    The Red Cross has reclassified his blood as "ristretto". Donation refused: too strong.

    — Pizzas devoured
    • ≈ — m² of dough, tomato and cheese
    • enough to cover — tennis courts
    • and zero side salads
    Stacked boxes vs the Grande Dixence dam — m of boxes · — × the Grande Dixence (285 m)

    The delivery guy has his own key, a mug with his name on it and a seat at the table at Christmas.

    — Cans of Coke
    • ≈ — litres of Coke
    • that's — kg of sugar
    • and — kg of aluminium to recycle (some day)
    Stacked cans vs the Matterhorn — m of cans · — × the Matterhorn (4,478 m)

    He calls it his "liquid cooling system". His dentist calls it early retirement.

    Infinite Loop Corner Shop

    404 Last-Commit Street · Valais
    Receipt no. 1984-∞ · open 24/7 since 1984

    ItemCHF
    Coffee, 2 dl mug
    — × 3.80—
    Pizza Ø 33 cm
    — × 19.50—
    Coke, 33 cl can
    — × 1.90—
    Sleep × 00.00
    Vegetables × 0not found
    Still water × 1in the coffee
    Loyalty discount since 1984-0.05
    TOTAL CHF—

    VAT 8.1 % included. Calories not included.
    Paid in: lines of code

    Thank you for your loyalty. See you later. Literally.

    Roughly the price of a chalet in Verbier. Well, a garage in Verbier.

    The nutritionist's comments

    • Coffee. The cardiologist asked to see the source code of his heart. Access denied: proprietary.
    • Pizza. We showed him the food pyramid. He thought it was a slice of pizza.
    • Coke. His dentist bought a boat. Then a second one, named "Can no. 1,337".
    • Vegetables. Only vegetable on record: the tomato sauce on the pizza. He counts it twice.

    Calculation method: one mug = 2 dl and 80 mg of caffeine; one can = 33 cl, 11.5 cm tall, 35 g of sugar and 13 g of aluminium; one pizza box = 4 cm; one pizza = 33 cm across. The numbers are wrong, but the orders of magnitude are terrifying.

    Lines of code written and debugged since 1984

    Official reading of his hard drive, obtained with the wc -l command. The drive asked for a break during the count. He didn't.

    $ wc -l ~/code/since-1984/**/*

    —lines written
    —lines debugged (yes, more than lines written: nobody knows how)
    —lines deleted the next morning, with a sigh
    —"temporary" lines, still in production
    —"// TODO: fix this" comments
    —lines nobody understands any more, himself included
    1missing semicolon (since 2009)
    —total: way too many, and not enough to finish TreasureQuest

    Printed on continuous paper, the unrolled listing would reach…

    — km of paper from Martigny. Expected to reach Brig in —, if the printer holds out.

    His keyboard applied for early retirement. Refused: a few lines were still missing.

    Computer logic: the 6 stages of debugging

    An algorithm proven since 1984, taught nowhere and applied everywhere. Complexity: O(∞). Exit condition: not found.

    Lap no. 1

    1. 1
      It doesn't work. Why?He opens 14 tabs and a coffee.
    2. 2
      It shouldn't work, but it does. Why?The most worrying moment of the day.
    3. 3
      I change something at random.Scientific method known as "the nudge".
    4. 4
      Now nothing works at all.At least it's consistent now.
    5. 5
      I put it back the way it was.Ctrl+Z, forty-seven times.
    6. 6
      It still doesn't work, and I no longer know why it worked in the first place.Back to step 1.

    goto 1

    Average cycle time: between five minutes and three weeks (see "Five minutes" in the dictionary).

    The museum of his keyboard's victims

    All these projects really exist. They were coded at night, shipped by day, and some are used by hundreds of thousands of people. Click a floppy disk to see the victim.

    Missing person

    Poster put up all over Valais, from Martigny to Brig. No witnesses have come forward so far. Police believe the missing party fled to people who go to bed at 10 p.m.

    Missing

    Missing since 1984

    Name
    Sleep (a.k.a. "sleep()")
    Missing since
    1 January 1984, around midnight
    Description
    About 8 hours long. Calm, quiet, smells of fresh pillow.
    Last seen
    On the sofa, one Sunday in 1983, during a film
    Distinguishing mark
    Vanishes as soon as a screen is switched on
    Reward
    1 coffee (cold) and a slice of pizza (yesterday's)

    If you see it, do not approach suddenly: it's shy. Call the mad coder. He won't pick up, but it's the thought that counts.

    Are you a mad coder?

    Tick honestly. Nobody's watching, except your webcam.

    0 / 10

    Standard human. You sleep at night. Strange, but respectable.

    The programming horoscope

    Forecasts calculated daily by a Stack Overflow–certified astrologer. Pick your sign. Predictions change every day at midnight, the time he starts coding.

    Horoscope for —

    —

    —

    —

    Bugs
    —
    Coffee
    —
    Sleep
    ☆☆☆☆☆

    Lucky number: —

    The excuse printer

    A bug in production? An unhappy client? The mad coder's dot-matrix printer supplies you with a certified excuse, printed in 1984 and never used twice. In theory.

    Waiting for a bug…

    The mad coder's dictionary

    1984 edition, revised and corrected at 3 a.m. Essential for understanding what he actually means.

    Five minutes phr.
    Unit of time ranging from two to six hours."Be there in five minutes, just finishing something."
    Sleep v., archaic
    Ancient human practice of closing one's eyes without compiling anything.No longer in use since 1984.
    Easy adj.
    Will take three weeks."It's easy, I'll do it tonight."
    Almost done phr.
    90 % done. Only the other 90 % left.
    Temporary adj.
    Permanent.// temporary fix (2009)
    Documentation n.
    Mythological creature. See also: unicorn, Yeti, sleep.
    Breakfast n.
    Meal eaten around 4 p.m., usually consisting of pizza.
    Weekend n.
    Two days of coding without meetings.
    Holidays n. pl.
    Coding somewhere else, with a view."The hotel Wi-Fi is rubbish." (only complaint on record)
    Sun n.
    Big lamp in the sky that causes glare on the screen.
    Backup n.
    Something you should have done yesterday.
    Coffee n.
    Fuel. Blood type. Reason to live (see eat()).

    Developer classics

    The classics. Tested, approved and repeated at every coffee break since 1984. Click a card to reveal the punchline.

    The answering machine

    Tried calling him? Of course he didn't pick up. His 1984 answering machine takes over. Press a key, there's a message for every situation.

    ● RECMessages: 9,999+

    Hello, you've reached the mad coder. He can't answer right now: he's coding. Press a key.

    What his belongings think

    We interviewed the direct witnesses. They agreed to talk, on condition of anonymity.