Hacker News new | past | comments | ask | show | jobs | submit login

The payroll check printer for my employer was once a couple thousand lines that generated raw PCL to be sent to a LaserJet that used magnetic toner to produce checks that had a working MICR number. It was rendered into spaghetti by multiple GOTOs that jumped to helpful labels like "666", and calls into other helper programs to generate more PCL that did things like change fonts and draw graphics. Of course none of it was commented, so you had to have a copy of the PCL spec on hand to know what any of it did. It was the product of a retired cowboy that had also written the rest of our custom payroll system over a number of years.

I attacked it by printing out and taping together each program into "scrolls" and tracing control flow with highlighters and sharpies. Had them all taped up on my office wall so I could refactor the whole thing from scratch, coworkers found that entertaining. Got a much more readable replacement working nicely. Then a couple years later HR bought a new system and we stopped printing our own checks. I was not sorry to see the whole thing go.




Reading your process I have that stereotypical TV series image in my mind of a person so deep into the subject matter that plaster every wall with notes and pull string all across the room at head height to hang up ever more notes kinda like that one NCIS episode (S8 E6 "Cracked"): https://img.sharetv.com/shows/episodes/standard/616591.jpg (although that image is only a small part of that whole view).


A printout of a one-file spaghetti code with gotos is the only case where I can imagine that trope of the wall of connected strings actually being a useful tool.


We call that a Murder Board in my office.

Here's a TV Tropes article on the cliche: https://tvtropes.org/pmwiki/pmwiki.php/Main/StringTheory


I went through something similarly during my PhD when my advisor printed the main code of the program that we were going to work on. At first I thought he was kidding (he's a very chill guy) but... Heck, after a few hours of "paper debugging" we discovered a lot of nasty issues, got new ideas and found redundant and spaghetti code that we didn't find when we debugged digitally (obviously, we were not a team of CS students/coders. Just a bunch of chemists kinda newbies to coding). It was a really useful and funny approach.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: