- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Cargo cult programming at its finest.
Of course, "copy goofy thing without understanding why it's like that" infests far more than programming. See https://www.snopes.com/fact-check/grandmas-cooking-secret/ for a series of definitely non-programming examples. (Noteworthy because I was chasing a good example of the cut-end pot roast thing.)
Admin
Oh, yeah, and "make build" is a one line command to build your program, once you have the makefile set up.
Admin
This is why it's important to put in comments like that why it shouldn't be changed. Then, people copy/pasting for a new context can judge whether they need to keep it or not.
Admin
COW means copy on write, i.e. copy these lines right after creating the file.
Admin
Yes, I definitely believe that would happen
Admin
<please note this comment, do not change>
Admin
What Kai ought to do is moo-dify
newline
to include the cow in the definition ofnewline
. And correct the two places in the one makefile wherenewline
is actively used so they don't trip over the unexpected cow. Arrange a script to moo-dify a few makefiles every day.Soon there will be a whole herd of those cows spreading through the codebase. And long after Kai is gone to greener pastures (or been ground down to burger then flushed), more cargo cult programmers will be copying his cows into what ought to be greenfield makefiles.
Admin
Would be amusing. Unfortunately the only place that 'newline' is actively used is deep in the early version control history.
Admin
Reminds me of the story of the "We've always done it that way" experiment with monkeys: https://bright-am.com/because-that-s-the-way-we-ve-always-done-it/
Admin
Years ago, I watched a cow-orker laboriously noting each source file he changed so he could compile and link after. I extolled the virtues of 'make.' He declared he didn't have time to learn that. Repeat this several times over a period of months. Ultimately he's in my office talking me through some changes I was making. After saving the last file I typed 'make' and off it went. "Wait! How did you do that?" I replied, "it's what I've been trying to get you to use for months now." He looked a bit sheepish, but suddenly the whole department adopted using it.
Admin
The syntax for makefiles is among the most miserable out there, and the way to get a newline is one of the worst parts. It could have been worse though; when someone decides to use functions to write implicit dependency rules that are included and which depend on the correct
VPATH
…Stick to the simple stuff. It's verbose. It will have lots of cut-n-paste scripting code. You'll be able to debug it.
Admin
<noted this comment, changed>
Admin
So don't leave us on tenterhooks, did the cow go forth & multiply? Is there a herd out there grazing the vast make pastures?
Admin
Many many years back as a brand new COBOL programmer in a large Telco, I realised that I could have a template with all the Identification Division etc stuff there, so I could reuse it. The template also had my name in it as the program author, or whatever the syntax was. Go forward about ten years (yes I was still there, now suffering in management) I had an irate call from the ops manager. A program with my name as author was burning through precious mainframe cycles, walking disk packs around. . . Of course it wasn't mine. The template still lived, and was being copied blindly by quite a few of the developers. I had become the most prolific programmer in the shop.
Admin
Please note my name is Kai, do not change to Kay.
<Insert story>Dang it.
Admin
It gets worse! The e at the end of Not was accidentally added! There were never supposed to be two lines!!!
Admin
Ah yes, cargo cult laziness. Last week, I got a ticket "why does our registration page say '''example template for new design'''?"
Admin
Still using makefiles nowadays is the real WTF. That was funny 40 year ago, but it isn't anymore.
And yes, I still have to use them for some mainframe projects.
Admin
The Monkey experiment is made up. There was a slightly similar one but the methods, result and aim were all different
https://www.throwcase.com/2014/12/21/that-five-monkeys-and-a-banana-story-is-rubbish/
Admin
It's like one of those plays where the audience gets involved!