A 10,000-line C++ module for transmitting hundreds of different packets to a radio module from the driver, all cut-pasted copies of the same code with different structure name. Bugridden (bad copy-paste-edit bugs).
I worked on an Excel\vba swat team at an investment bank. Whenever someone in the various business units got themselves into more trouble than they could handle with an Excel model, we'd try to set things right. We saw a lot of wonderfully creative vba code from industrious programming beginners (or, as we liked to call them, "Macro Recording Cowboys". The most amusing I saw was a model where the vba code used a Greek mythology variable naming convention:
Dim Hermes As String, Artemis As Long, Odin As Range
A few weeks ago I had to reproduce one of the recent papers on deep learning theory. It had ~3000 lines of code over around 10 files, but when I just removed stale and unused calls and spaghetti (just like static analysis does), it reduced to ~1000 lines with identical functionality.
Original code also computed the most time-consuming routine twice to thrice each run and had many many typos, e. g. "calculte_infomration". Imagine this, but in every second function/variable. However, it worked.
Comments (578) 119 threads
Earlier commentsI replaced it with an 11-line template.
Dim Hermes As String, Artemis As Long, Odin As Range
Original code also computed the most time-consuming routine twice to thrice each run and had many many typos, e. g. "calculte_infomration". Imagine this, but in every second function/variable.
However, it worked.
The trophy should be a plate of spaghetti, in gold.
All comments shown.
Couldn't load more comments. Check your connection and try again.