6 ms·
There is also a very thin difference between “technical debt” and “genius programmer”. If I invented half the programming concepts Carmack did and wrote it at t
by freehunter 7y ago
There is also a very thin difference between “technical debt” and “genius programmer”. If I invented half the programming concepts Carmack did and wrote it at the company I work for, it would be considered technical debt immediately. No one else would be able to understand it and no one would be able to fix it when it broke. But for various reasons (mostly since Carmack is actually a programming genius), people stopped what they were doing to learn from him and adopt some of his techniques. Fast inverse square root is genius but it would just be way-too-clever technical debt if Carmack hadn’t written it and others didn’t learn from him.
No one would take the time to learn from my way-too-clever code. They’d throw it away for more obvious code in a heartbeat. Because I’m not famous, I don’t work with other geniuses, and of course I’m not a genius so my way-too-clever code would just be annoying and uncharacteristic.
- lorenzhs 7y ago"Fast inverse square root is genius but it would just be way-too-clever technical debt if Carmack hadn’t written it and others didn’t learn from him." Carmack didn't come up with that: https://en.wikipedia.org/wiki/Fast_inverse_square_root#History_and_investigation https://en.wikipedia.org/wiki/Fast_inverse_square_root#Histo...
- klipt 7y agoMaybe the real secret to being a 10x programmer is being so charismatic that people attribute the work of 10 other programmers to you!
- tomlagier 7y agoI think there's a real truth there - the most lauded 10x programmers are typically the "face" of a group of talented and productive people. As their legend grows, more and more work of the group gets attributed to them. I think Elon Musk is another good example of this phenomenon. Certainly, there are programmers vastly more productive than the average, but I think when you think of any legendary programmer (Linus, Carmack, Knuth), you're also likely impressed by their significant supporting cast.
- beat 7y agoI'd exempt Knuth from that, as he's practically a monk in his loner ways, but I also think of him as "genius", rather than "10x".
- dragontamer 7y agoKnuth is famously a slow worker, but he "gets to the bottom" of any problem. He's basically a turtle (from the Tortoise vs Hare story). A giant "juggernaut" turtle. You can't stop his analysis, but it takes a long time to get anywhere. Its been over 40 years and he's still writing "Art of Computer Programming" books, and fixing errors in the text. Its an exceptionally well-crafted piece of writing. His solutions to various programming problems are excellent too, great analysis and deep thought applied to them. Definitely not the "10x programmer" of today's lore. Knuth is an older, gentler kind of genius that I have a huge amount of respect for. --------- For those who haven't read Knuth's works yet, I suggest starting with Knuth's analysis into Alpha Beta pruning: https://pdfs.semanticscholar.org/dce2/6118156e5bc287bca2465a62e75af39c7e85.pdf https://pdfs.semanticscholar.org/dce2/6118156e5bc287bca2465a... Knuth's writing style is just so much deeper and thorough than pretty much everything else. You have to give the guy mad respect. Of course, I also recommend reading "The Art of Computer Programming", but that's far more material to read through. The ~34 pages on Alpha-Beta pruning are a quicker introduction to Knuth's writing style. Even if you think you know how Alpha-Beta pruning works, Knuth goes far deeper into the subject than you might imagine. EDIT: In particular, the F -> F1 -> F2 algorithm (F being Minimax, F2 being Alpha-Beta, and F1 being an in-between algorithm to help describe F2) is brilliant writing. Only Knuth would spend so much effort describing F1. But all that effort into F1 helps both his analysis, as well as better describes what is going on in Alpha-Beta pruning (aka F2).
- petermcneeley 7y ago"The algorithm was originally attributed to John Carmack, but an investigation showed that the code had deeper roots in both the hardware and software side of computer graphics.". I would suggest this mis attribution help us further understand the 10x programmer conundrum.
- GGfpc 7y agoBut it was that genius coding ability that made him famous in the first place. You could do it if you worked at a company that needed those types of "hacks" like he did.
- whatshisface 7y agoFast inverse square root delivered business value that couldn't be obtained any other way, which means that it wasn't technical debt. It was a technical price. What's bad is when programmers make the system complicated purely to entertain themselves.
- nazka 7y agoAgree, I will also add that technical debt != complexity. As an example everybody uses an OS to code. An OS is incredibly complex. Maybe one of the most complex piece of software. But it doesn't mean that you should care about it. With the proper and clean interface it will have an abstraction of this complexity to its user (in your company or not) and they will be able to continue to code and never have to care about it. So of course an OS - or like OP said anything creating value - doesn't mean that it creates technical debt only because it's complex.
- magduf 7y agoExactly: you may not be able to fully understand the OS you're working with, but you can abstract it away and use it anyway. This isn't "technical debt", it's something you need to actually get your job done: without the OS, you simply would not be able to actually create the thing you're making. Similarly, whatever you're building likely uses a microprocessor somewhere. You probably don't really understand how that works, and would not be able to build one from scratch. But without that CPU, you wouldn't be doing your job at all. The phrase "standing on the shoulders of giants" comes to mind here.
- raiflip 7y agoThank you! Most people I've worked with end up so afraid of complexity that they create tech debt through crazy simplifications that require constant work arounds.
- dsego 7y ago"The Thirty Million Line Problem" by Casey Muratori might change your mind.
- 7y ago
- nostrademons 7y agoThe difference is largely money. Doom was revolutionary when it came out; id software made a whole lot of money from it. The rest of the industry took note, and, wanting to make a lot of money too, decided to emulate what they saw. If you want people to accept and learn from your clever programming techniques, try to find ways to turn them into products that only you can make that lots of people will pay money for. Even if you don't succeed in convincing the rest of the industry, at least you'll have lots of money.
- untog 7y agoI think that has a lot more to do with Carmack being at a small company where there was no-one to say no to him. If you were the CTO of a three-person startup you most definitely could do whatever weird, esoteric programming you liked.
- cushychicken 7y agoThere was a point in Carmack's career where he was not famous, and he (and his work output) wasn't given the benefit of the doubt of being a genius.
- bdamm 7y agoThere was no point in Carmack's career where he wasn't the focus of the company.
- cushychicken 7y agoSimilarly, there was no point in Carmack's career where his work and his views were accepted totally uncritically.
- selimthegrim 7y agoWhen he wrote Keen for those guys in Shreveport I doubt he was the straw that stirred the drink
- wtetzner 7y agoComing up with good abstractions can be very difficult, but those abstractions aren't necessarily difficult to understand. Similar to idea that it's hard to write simple, clear code, but easy to understand it.
- jerf 7y ago"Fast inverse square root is genius but it would just be way-too-clever technical debt if Carmack hadn’t written it and others didn’t learn from him." I think the difference here is that Carmack was working in a space where fast inverse square root was the difference between the program working and it not working. At that point, it doesn't really how matter "clever" in any bad sense of the term the code is. Carmack works in 3D engines, which even today is a space where people are trying to wring every last cycle out of them. It's perfectly appropriate when programming in a space where every last cycle counts to program as if you're in a space where every last cycle counts. I don't work in such a space, so I don't program that way. But while I haven't got anything as "clever" as FISR, I have got some things like non-obvious database schemas for certain performance reasons that if my successors don't find and read the comments I've left about why the schemas are that way, they could well get themselves into some trouble if they try to "fix" it.
- zild3d 7y agoagreed, you still see clever c hacks today in the embedded world, because resources are still constrained for many devices
- Const-me 7y ago> was working in a space where fast inverse square root was the difference between the program working and it not working Pentium 3 released in January 1999. That CPU, along with all newer ones, support SSE which has RSQRTPS instruction, faster, also much more precise approximation. AMD had it before, PFRSQIT1 / PFRCPIT2 in 3DNow from 1998. Quake 3 Arena released in December 1999. The point of using that approximation is running on older hardware, like Pentium and Pentium 2.
- seba_dos1 7y agoSo, basically a difference between the program working and not working for most users.
- gioele 7y ago> Fast inverse square root is genius but it would just be way-too-clever technical debt if Carmack hadn’t written it and others didn’t learn from him. FISR is a beautiful hack, but it hardly technical debt. This is the original code. Note how the trick has been hidden behind a normal API such as `Q_rsqrt`: float Q_rsqrt( float number ) { long i; float x2, y; const float threehalfs = 1.5F; x2 = number * 0.5F; y = number; i = * ( long * ) &y; // evil floating point bit level hacking i = 0x5f3759df - ( i >> 1 ); // what the fuck? y = * ( float * ) &i; y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration return y; } This is how you walk the fine line between technical debt and useful hack.
- dragontamer 7y agoNot really. If the comment "what the fuck" were instead "estimate floating-point exponent with bit-wise arithmetic" and "SingleStep forward with Newton's Method", then the code would be better documented The comment "what the fuck" and "evil floating point bit level hacking" don't help anybody. And "1st iteration" is only helpful if you knew it was an iteration of Newton's method.
- remram 7y agoAgreed, this is really far from technical debt. It's self-contained, the purpose of the function is clear. Add a comment or two, a unit test, and this is perfect. What I would call technical debt is if he had inlined those tricks all over his code, making it very hard to debug a wrong result or move away from this technique.
- rasz 7y ago>Fast inverse square root is genius but it would just be way-too-clever technical debt if Carmack hadn’t written it and others didn’t learn from him. Carmack didnt write it, 0x5f3759df constant landed at iD from 3Dfx/Silicon Graphics https://medium.com/hard-mode/the-legendary-fast-inverse-square-root-e51fee3b49d9 https://medium.com/hard-mode/the-legendary-fast-inverse-squa...
- frequentnapper 7y ago"The algorithm was originally attributed to John Carmack, but an investigation showed that the code had deeper roots in both the hardware and software side of computer graphics."