L

Lawrence Kesteloot

teamten.com · Personal blog · on HN since 2009

Lawrence Kesteloot, a software developer, writes essays on programming practice and the short story Coding Machines.

What HN saysCommenters repeatedly recommend his short story Coding Machines, calling it an excellent, unsettling piece of fiction about compilers and trust.
132HN people shared it
70linked it in comments
82stories submitted
3.1Kstory points
4 months agolast shared
2009people per year2026

Most-shared posts

  1. 1
    Coding Machines
    52 people · 282 points · first shared 2009 · 29 comments on HN
  2. 2
    Java for Everything
    16 people · 654 points · first shared 2014 · 338 comments on HN
  3. 3
    Norris Numbers – Walls you hit in program size (2014)
    8 people · 411 points · first shared 2014 · 81 comments on HN
  4. 4
    Write Code Top-Down
    7 people · 20 points · first shared 2020 · 4 comments on HN
  5. 5
    Why I Don't Like Golang (2016)
    5 people · 569 points · first shared 2016 · 287 comments on HN
  6. 6
    Turbo Pascal Compiler (2013)
    5 people · 269 points · first shared 2013 · 93 comments on HN
  7. 7
    Don't write bugs
    4 people · 139 points · first shared 2021 · 108 comments on HN
  8. 8
    Slow assimilation works best
    4 people · 5 points · first shared 2010 · 1 comments on HN
  9. 9
    Dynamic_cast(C)++
    3 people · 47 points · first shared 2010 · 14 comments on HN
  10. 10
    Use singular nouns for database table names
    3 people · 47 points · first shared 2023 · 50 comments on HN
  11. 11
    Oscar
    3 people · 2 points · first shared 2013 · discussion on HN
  12. 12
    The Language Squint Test
    3 people · 2 points · first shared 2011 · discussion on HN
  13. 13
    Coding Machines
    3 people · 2 points · first shared 2018 · discussion on HN
  14. 14
  15. 15
    Show HN: My Turbo Pascal compiler in JavaScript
    2 people · 101 points · first shared 2013 · 81 comments on HN

What HN people wrote when they linked it

didgeoridoo · 2026-03-18
There’s also the excellent Coding Machines (2009): https://www.teamten.com/lawrence/writings/coding-machines/
tbensky · 2024-12-01
One of my favorite retro projects in this real-time TRS-80 (Model I assembler and emulator that assembles and runs Z80, literally with each key press. Mind boggling how today's CPUs can emulate and entire 8-bit computer dev-process all between key presses in a browser. https://www.teamten.com/lawrence/projects/assembly-language-ide/."… The author even says "How about: With every keystroke in the IDE’s code editor, we assemble the whole program, reset a virtual TRS-80 to a known state, install the program, and run it??
legobmw99 · 2024-03-30
One of my favorite short stories plays on the natural horror of this realization: https://www.teamten.com/lawrence/writings/coding-machines/
frogulis · 2023-01-22
That's a new SCP to count amongst my favourites. Reminds me of Coding Machines [1] and Second Variety [2] but with the added twist that it's not even a computer. There's something elegantly horrifying about it. [1] https://www.teamten.com/lawrence/writings/coding-machines/ [2] https://en.m.wikipedia.org/wiki/Second_Variety
NKosmatos · 2023-01-15
Read the following short story… Disclaimer: I’m not responsible for any paranoia, computer fear or conspiracy thoughts that might arise after reading it: https://www.teamten.com/lawrence/writings/coding-machines/
cxr · 2022-04-05
> That does not mean that we should always specify every type in program explicitly, like Java does. Unspecified types are great for interactive exploration, or a quick hack. It's also helpful to consider whether they constitute unnecessary requirements[1]. Most mainstream JS code is rife with problems like this—including rampant mis-/over-use of triple equals. (I call this "going out of your way to do the wrong thing".) 1. https://www.teamten.com/lawrence/programming/dont-invent-unnecessary-r…
cratermoon · 2021-10-06
Author has a lot of terrible advice on his site. Also this code is their recommend way to convert a double to float[1]: public float doubleToFloat(double d) { return (float) d; } 1 https://www.teamten.com/lawrence/programming/dont-invent-unnecessary-r…
legerdemain · 2021-10-06
I think the author put specific recommendations into their own sibling posts, accessible from this table of contents: https://www.teamten.com/lawrence/programming/
matklad · 2021-02-06
Yeah, I indeed spend some effort to steal the fonts from asciidoctor and https://www.teamten.com/lawrence/programming/ (highly recommend both). And yes, I myself am struggling with ragged right. I really wish to have proper text hyphenation and justification, to have a book-like feel. Sadly, justification without hyphenation looks ugly, and `hyphens: auto` doesn’t work well (and wasn’t supported in chrome last time I checked). I am pretty baffled that such basic (in terms of impact, not in terms of complexity of implementation) feature isn’t widely available. Although I am not a web designer, so I might be missing some simple way to solve this.
croh · 2020-07-12
If you enjoy Reflections on Trusting Trust, you will absolutely love Coding Machines by Lawrence Kesteloot. Same concept is explored further as fiction. (If you like, don't forget to buy it) https://www.teamten.com/lawrence/writings/coding-machines/
gryfft · 2020-04-21
I don't think this is what you're looking for, but Coding Machines[1] is a great little story in which the Ken Thompson hack[2] plays a role. [1]https://www.teamten.com/lawrence/writings/coding-machines/ [2]https://www.win.tue.nl/~aeb/linux/hh/thompson/trust.html
qznc · 2019-09-30
Coding Machines by Lawrence Kesteloot: https://www.teamten.com/lawrence/writings/coding-machines/ Lovecraft meets Trusting Trust.
rain1 · 2019-06-25
If you asked me what the 4 best documents regarding bootstrapping are i'd say: * Egg of the Phoenix (Blog post) - http://canonical.org/~kragen/eotf/ * The Cuniform Tablets of 2015 (Blue-sky academic research) - http://www.vpri.org/pdf/tr2015004_cuneiform.pdf * Preventing The Collapse of Civilization (Video) - https://www.youtube.com/watch?v=pW-SOdj4Kkk * Coding Machines (scifi story about trusting-trust attack) - https://www.teamten.com/lawrence/writings/coding-machines/
bibyte · 2019-03-17
https://www.teamten.com/lawrence/writings/coding-machines/ This is not a book but it is the best fiction featuring programmers I have ever seen. Edit: Looks like it is also available as an ebook.
nickpsecurity · 2018-10-07
Oh yeah, if any of you enjoyed Thompson's paper, you might enjoy this write-up that talks about discovering something like that: https://www.teamten.com/lawrence/writings/coding-machines/ It took me 30min-1hr to read. I can't recall specifically. Worth it. :)
carussell · 2018-01-30
Here are links to two of my favorite essays that make a similar point: Java for Everything[1] Too DRY[2] And then there's a third, which is not quite the same topic, but still in the same vein. It's arguably even more relevant today than three years ago when it was written, especially given how much attention is being captured by ecosystems that attract folks who end up generating a morass of terrible tooling: Helping my students overcome command-line bullshittery[3] 1. https://www.teamten.com/lawrence/writings/java-for-everything.html 2. http://jamie-wong.com/2013/07/12/grep-test/ 3. http://pgbovine.net/command-line-bullshittery.htm
peteforde · 2017-11-10
I am reminded of a most excellent piece of science fiction, "Coding Machines". https://www.teamten.com/lawrence/writings/coding-machines/
ganley · 2009-10-17
I feel obliged to point out a friend of mine's really great short story: http://www.teamten.com/lawrence/writings/coding-machines/
dahart · 2025-12-22
It’s superficially easy to bike-shed on use of clever code and debugging, but there is an interesting and fundamentally difficult question to answer underneath about what to spend your limited time learning, and how to think about it. Yes Kernighan was trying to pass along advice to future programmers about what he thinks is how to reduce unnecessary effort, and yes at the same time spending time debugging difficult code often/ideally increases your skill and avoiding that effort might mean you miss out on developing those skills. Both things are true, so how does one decide which way to go? Of course it depends on your goals, but it’s also worth asking what the opportunity cost is. What if instead of doing battle with complexity and debuggers, you could instead pick up different skills? It is possible that people should deliberately ignore Kernighan’s advice, and use clever code in order to gain the skills and experience needed to see that Kernighan was right. ;) It’s also possible that spending that valuable time learning how to scale to larger systems would pay off. Or, for some people, spending less time coding and more time devoted to other pursuits. The ‘stopped evolving’ comment seems like it might be designed to stir the pot, but the best programmers I’ve ever known tend to work hard at reducing complexity by thinking hard about dependencies and about how to write large systems. They don’t necessarily shy away from high performance tricks or hard problems. It’s…
techdragon · 2023-07-10
Oh absolutely... and that's a great analogy for the more computer oriented, "Reflections on Trusting Trust" highlights how it can be the supporting infrastructure of replication that passes on the relevant information... a compiler attack like that is equivalent to things like epigenetic information transfer... and for fun bonus measure since it came to mind... the short story Coding Machines goes well for really helping to never forget the idea behind "Reflections on Trusting Trust" https://www.teamten.com/lawrence/writings/coding-machines/ It definitely would be minimised data transfer, be it via an epigenetic nudge that just happens to work by sheer dumb luck because of some other existing mechanism or a sophisticated DNA driven growth of some very specific part of the mammalian connectome that we do not yet understand because we've barely got the full connectome maps of worms and insects, mammals are a mile away at the moment... no matter the mechanism evolution will have optimised it pretty heavily for simply information robustness reasons, fragile genetic/reproductive information transfer mistakes that work, break and get optimised out in favour of the more robust ones that don't break and more reliably pass on their advantage.
exikyut · 2021-09-18
This has prompted some unexpected reflection. If I may, I have a somewhat orthogonal (tangentially related), slightly soapbox-y, philosophical question about the meaning of meaningfulness, which may not make any sense (recommendations for good sanitariums accepted). The GIF of this shows C:\>dsl Starting DOS subsystem for Linux, please wait... ok C:\>_ and this immediately got me headscratching about the mechanics of how this was done. My first serious consideration (after noticing the Building section and hastily discarding notions of "remote/out-of-band terminal I/O...?") was that it was somehow boxing Linux up into a TSR and then somehow running that in the background. Coool. But no; the custom init.c uses virtual 8086 (vm86) mode to call back into DOS, trapping on a specific interrupt to enable DOS<->Linux communication. The launcher loads Linux into memory and jumps into it just like a bootloader would, then the init program maps the first 1MB of RAM (to cover all 640K of conventional memory) and hands the whole DOS address space area to vm86(2) to continue within DOS where everything left off. So, this isn't a TSR in the literal sense (it doesn't exit using INT 27h, "Terminate and stay resident"), nor in the figurative sense, wherein the program encapsulates Linux and then returns to DOS (which certain interpretations of the program output might suggest) in the same way exiting Netware or Windows 9x ("reboot in DOS mode", in certain circumstances) would.…
lmm · 2016-04-11
Scala allows you to restrict yourself to a much greater extent than many other languages. You could say use assembly for everything - there's nothing that assembly can't do, so in a sense assembly is more powerful than any other language. For me the reasons I use Scala rather than Java/Python/etc. are the same reasons I would use Java/Python/etc. rather than assembly. To write code with the same guarantees as the core of my system would be theoretically possible in a "simpler" language, but it would be incredibly verbose: it would take longer to write and be much harder to maintain (because you'd have to keep a lot more in your head to understand each piece of functionality). If I weakened the guarantees (i.e. didn't keep track of as many possible side effects) I'd have a higher defect rate, especially when refactoring. That's the small heart of a few projects, but I see a lot of merit in using the same language for your whole codebase: http://www.teamten.com/lawrence/writings/java-for-everything.html . And Scala is actually a pretty nice language for one-off throwaway scripts where you don't care about tracking any effects or similar as well.
trcollinson · 2014-12-09
Full disclosure: I have been around a while and have written in more languages than I care to even share at the moment. Right now my go to is Ruby with Rails. However, since you say you are a junior level engineer with Java experience, why not stick with Java? Recently there was a great article on HN about using Java for Everything and it made some very good and logical arguments for going with Java. [1][2] We see questions like this on HN quite often. When starting a new project that you would like to support yourself on, you must ask "Would I like to make a successful SaaS product?" or "Would I like to learn a new language/framework/ecosystem?". I am sure some would argue that the language/framework/ecosystem can really make or break a web application. However, there are successful business built on just about all of them: Stackoverflow - .Net Facebook - PHP Amazon - Java Bloomberg - Ruby (could have said Twitter until recently they are migrating to Java, interesting?) Reddit - Python DuckDuckGo - Perl Orbitz - Lisp OkCupid - C++ Of course many of these organizations use a number of languages and frameworks. The point is, when they started they used what they knew and went with it. My suggestion, start building! Then someday I can use your super successful application in a list like this! [1] https://news.ycombinator.com/item?id=8677556 [2] http://www.teamten.com/lawrence/writings/java-for-everything.html
cousin_it · 2013-10-23
My comment was talking about a stronger kind of consistency, maybe "inevitability" would be a better word for it. You could make many different tiny changes to the rules of C and still end up with a workable programming language. (Many people have done that, there are tons of languages derived from C.) You could say that the rules of C are "random" - after learning the first n rules, you cannot use logic to predict the n+1st. So learning the rules of C is more about memorization than logic. Math is different: when you learn a piece of math, you know exactly how it follows logically from the pieces you learned before, and you know it couldn't be any other way. That's why it feels more reasonable to me to inquire about math, rather than the details of C. Lawrence Kesteloot said it well at http://www.teamten.com/lawrence/writings/what_interests_me.html: On a planet far away they have universities. In those universities they have many of the same subjects we teach here, such as math, biology, philosophy, history, computer science, psychology, and literature. But although the subjects of the classes are the same, the contents are different. They teach a history class, but their history is different from ours. So are their biology and literature. I’m not interested in subjects where their content is different from ours. In some classes, though, the content is the same. They’re teaching the same physics class (assuming they’re at the same level of understanding we’re at) and the…
martin-t · 2026-04-03
Have you read Coding machines[0]? BTW, that guy received an Oscar for coding. Oh, far far have we fallen since those days and how far we have yet to go... [0]: https://www.teamten.com/lawrence/writings/coding-machines/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close