6 ms·
This reminds me of the "Parable of the Two Programmers." [1] A story about what happens to a brilliant developer given an identical task to a mediocre developer
by SomeCallMeTim 3y ago
This reminds me of the "Parable of the Two Programmers." [1] A story about what happens to a brilliant developer given an identical task to a mediocre developer.
[1] I preserved a copy of it on my (no-advertising or monetization) blog here: https://realmensch.org/2017/08/25/the-parable-of-the-two-programmers/ https://realmensch.org/2017/08/25/the-parable-of-the-two-pro...
- mjevans 3y agoI can't seem to find it in a google search, maybe I'm just recalling entirely the wrong terms. In the early computing era there was a competition. Something like take some input and produce an output. One programmer made a large program in (IIRC) Fortran with complex specifications documentation etc. The other used shell pipes, sort, and a small handful or two of other programs in a pipeline to accomplish the same task in like 10 developer min.
- ianmcgowan 3y agoSounds like "Knuth vs McIlroy", which has been discussed on hn and elsewhere before, and the general take is that it was somewhat unfair to Knuth. [1] https://homepages.cwi.nl/~storm/teaching/reader/BentleyEtAl86.pdf https://homepages.cwi.nl/~storm/teaching/reader/BentleyEtAl8... [2] https://www.google.com/search?q=knuth+vs+mcilroy https://www.google.com/search?q=knuth+vs+mcilroy
- mjevans 3y agoThis is the competition I was thinking of. I must have read it in a dead-image PDF version some other time on HN. This paper isn't the one I recall but the solution is exactly the sort I vaguely recalled. I'm trying to copy-in the program as it might have existed, with some obvious updates to work in today's shells ... #!/bin/sh tr -cs A-Za-z ' ' "${2:-/dev/stdin}" |\ tr A-Z a-z |\ sort |\ uniq -c |\ sort -rn |\ sed ${1:-100}q Alternately (escapes not yet tested) $ tr -cs A-Za-z \012 "${INPUTFILEHERE:-/dev/stdin}" | tr A-Z a-z | sort | uniq -c | sort -rn | sed ${MAXWORDSHERE:-100}q Edited: Removed some errors likely induced by OCR / me not catching that in the initial transcription from the browser view of the file.
- svat 3y agoJust to be clear, it was not a competition. For more, please follow the links from some of the previous HN discussions, e.g. https://news.ycombinator.com/item?id=31301777 https://news.ycombinator.com/item?id=31301777. [For those who may not follow all the links: Bentley asked Knuth to write a program in Pascal (WEB) to illustrate literate programming—i.e. explaining a long complicated program—and so Knuth wrote a beautiful program with a custom data structure (hash-packed tries). Bentley then asked McIlroy to review the program. In the second half of the review, McIlroy (the inventor of Unix pipes) questioned the problem itself (the idea of writing a program for scratch), and used the opportunity to evangelize Unix and Unix pipes (at the time not widely known or available).]
- ramses0 3y agoThe Knuth link in the sibling comment is an original, but you're probably thinking of "The Tao of Programming" http://catb.org/~esr/writings/unix-koans/ten-thousand.html http://catb.org/~esr/writings/unix-koans/ten-thousand.html """“And who better understands the Unix-nature?” Master Foo asked. “Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?”"""
- SomeCallMeTim 3y agoI was both of those developers at different times, at least metaphorically. I drank from the OO koolaid at one point. I was really into building things up using OOD and creating extensible, flexible code to accomplish everything. And when I showed some code I'd written to my brother, he (rightly) scoffed and said that should have been 2-3 lines of shell script. And I was enlightened. ;) Like, I seriously rebuilt my programming philosophy practically from the ground up after that one comment. It's cool having a really smart brother, even if he's younger than me. :)
- rzzzt 3y agoThere was also the "Hadoop vs. unix pipeline running on a laptop"-story a few years back, a more modern take: https://adamdrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html https://adamdrake.com/command-line-tools-can-be-235x-faster-...
- ramses0 3y agoBash-Reduce: https://github.com/sorhus/bash-reduce https://github.com/sorhus/bash-reduce
- _a_a_a_ 3y agoWithout more backup I can only describe that as being fiction. Righteous fiction, where the good guy gets downtrodden and the bad guy wins to fuel the reader's resentment.
- 6510 3y agoTo me it is a story about managers clueless about the work. You can make all the effort in the world to imagine doing something but the taste of the soup is in the eating. I do very simple physical grunt work for a living, there it is much more obvious that it is impossible. It's truly hilarious. They probably deserve more praise when they do guess correctly but would anyone really know when it happens?
- SomeCallMeTim 3y agoIt's practically my life experience. Sometimes I'm appreciated, and managers actually realize what they have when I create something for them. Frequently I accomplish borderline miracles and a manager will look at me and say, "OK, what about this other thing?" My first job out of college, I was working for a company run by a guy who said to me, "Programmers are a dime a dozen." He also said to me, after I quit, after his client refused to give him any more work unless he guaranteed that I was the lead developer on it, "I can't believe you quit." I simply shrugged and thought, "Maybe you shouldn't have treated me like crap, including not even matching the other offer I got." I've also made quite a lot of money "Rescuing Small Companies From Code Disasters. (TM)" ;) Yes, that's my catch phrase. So I've seen the messes that teams often create. The "incompetent" team code description in the story is practically prescient. I've seen the results of exactly that kind of management and team a dozen times. Things that, given the same project description, I could have created in 1/100 the code and with much more overall flexibility. I've literally thrown out entire projects like that and replaced them with the much smaller, tighter, and faster code that does more than the original project. So all I can say is: Find better teams to work with if you think this is fiction. This resonates with me because it contains industry Truth.
- 6510 3y agoI had an idea once but when I tried to explain it people didn't understand. I revisited earlier thought: communication is a 2 man job, one is to not make an effort to understand while the other explains things poorly. It always manages to never work out. Periodically I thought about the puzzle and was eventually able to explain it such that people thought it was brilliant ~ tho much to complex to execute. I thought about it some more, years went by and I eventually managed to make it easy to understand. The response: "If it was that simple someone else would have thought of it." I still find it hilarious decades later. It pops to mind often when I rewrite some code and it goes from almost unreadable to something simple and elegant. Ah, this must be how someone else would have done it!
- drekipus 3y ago> Ah, this must be how someone else would have done it! This is a good exclamation :D And it's a poignant story. Thanks for sharing.
- lifeisstillgood 3y agoThat’s pretty good. It needs an Athena poster :-)
- HenryBemis 3y ago“Give me six hours to chop down a tree and I will spend the first four sharpening the axe.” ― Abraham Lincoln I have started to follow this 'lately' (for a decade) and it has worked miracles. As for the anxious managers/clients, I keep them updated of the design/documentation/though process, mentioning the risks of the path-not-taken, and that maintain their peace of mind. But this depends heavily on the client and the managers.
- strken 3y agoThis is unrelated to the excellent story, but it's annoying that the repost has the following "correction": > The manager of Charles has by now [become] tired of seeing him goof off. "The manager has tired of Charles" is as correct as "the manager has become tired of Charles". To tire is a verb. The square bracket correction is unnecessary and arguably makes the sentence worse.
- SomeCallMeTim 3y agoSure enough. Presumably my brain was switched off if I added that "correction" myself. Or it was already there in whatever source I managed to copy it from. No idea.