davideisinger.com

My personal website
Log | Files | Refs | README

dubroy-com-23dgbm.txt (4964B)


      1 [1] ● ● Patrick Dubroy
      2 
      3   • [2]About
      4   • [3]Archives
      5 
      6 [4]Cold-blooded software
      7 
      8 December 28, 2023
      9 
     10 It’s 2004 and I’m sitting in one of the largest lecture halls at my university.
     11 I’m a computer science major but I’m taking a course on natural history —
     12 plants and animals — as one of my electives.
     13 
     14 The professor tells us that he’s brought something from home, something he
     15 found in his freezer. He reaches down behind his desk, and then holds his arm
     16 out to show us what’s sitting in his palm: a baby painted turtle. We’re
     17 learning about cold-blooded animals, and it turns out that painted turtle
     18 hatchlings are pretty special — they’re one of only a few species that can
     19 survive being frozen.
     20 
     21 Now, the lecture hall is pretty modern for 2004: there’s an overhead camera at
     22 the podium, where the professor can write notes that are displayed on screens
     23 around the hall. But instead of writing notes, he puts the turtle under the
     24 camera and starts his lecture.
     25 
     26 Over the next hour, we watch this little reptile slowly come to life as the
     27 professor lectures. The first movements were nearly imperceptible. An eyelid
     28 cracking open, a leg inching forward. By the end of the lecture, the turtle has
     29 moved about halfway across our screens.
     30 
     31 I’ll never forget that class, because it’s where I really understood what it
     32 means for an animal to be cold blooded. You see, warm-blooded animals — like
     33 humans or mice — have a stable body temperature that stays within a pretty
     34 narrow range. For humans, it’s around 37 degrees Celsius. A few degrees higher
     35 or lower and we’re in big trouble. Cold-blooded animals like the painted turtle
     36 can adapt their metabolism to the temperature around them. They’re active when
     37 it’s warm out, and as the environment (and their bodies) get cooler, they move
     38 more slowly. Very few of them can survive being frozen like the baby painted
     39 turtle can.
     40 
     41 I see a similar dichotomy with software projects. Certain technology decisions
     42 lead to projects that are warm-blooded: everything is great when there’s
     43 constant motion on the project, generating heat. But put warm-blooded software
     44 in the freezer, and you’ll pull out a corpse six months later.
     45 
     46 Maybe your CI isn’t working because one of the services you depend on got
     47 bought or ran out of money. You add a new dependency and find yourself needing
     48 to upgrade your compiler. Another package you depend on is deprecated, and
     49 doesn’t work with the latest version of the compiler.
     50 
     51 Some projects are different. You work alone, make some changes when you’re
     52 inspired, and then don’t touch it again for another year, or two, or three. You
     53 can’t run something like that as a warm-blooded project. There’s not enough
     54 activity to keep the temperature up.
     55 
     56 A cold-blooded project is like the baby painted turtle. You can freeze it for a
     57 year and then pick it back up right where you left off.
     58 
     59 A cold-blooded project uses [5]boring technology. The build and test scripts
     60 don’t depend on external services that might change, break, or disappear
     61 entirely. It uses [6]vendored dependencies.
     62 
     63 The software that powers this blog is cold-blooded. The first commit was nearly
     64 twelve years ago — a simple little static site generator to replace my
     65 out-of-date Wordpress installation:
     66 
     67 commit 68949229ad426c1e8795ee640808db9987ab30ab
     68 Author: Patrick Dubroy <[7][email protected]>
     69 Date:   Sun Jan 8 19:10:24 2012 +0100
     70 
     71     Add templates and site-building script.
     72 
     73 It’s written in Python (2, not 3). It depends on four third-party modules, and
     74 they’re all committed to the project repository. Everything runs locally, and I
     75 deploy the result with rsync over ssh.
     76 
     77 And boy am I glad I decided to do it that way. I’ve made a few small
     78 improvements over the years, but otherwise it’s continued to work without
     79 modification. And I fully expect that it will still be working in another
     80 twelve years.
     81 
     82 🐢
     83 
     84 👉 You might also want to check out [8]the discussion on Hacker News.
     85 
     86 Thanks to Thorsten Ball for helpful suggestions on this post.
     87 
     88 Pssst! I'm working on a book called [9]WebAssembly from the Ground Up. It takes
     89 you from hand crafting bytecodes to writing a real compiler for a simple
     90 programming language. If you're interested in WebAssembly, you should
     91 definitely check it out.
     92 
     93 © 2006–2024 Patrick Dubroy · Powered by [10]Butterbrezn and [11]Augustiner.
     94 
     95 Subscribe: [12]RSS · [13]email
     96 
     97 
     98 References:
     99 
    100 [1] https://dubroy.com/blog
    101 [2] https://dubroy.com/blog/about
    102 [3] https://dubroy.com/blog/archives
    103 [4] https://dubroy.com/blog/cold-blooded-software
    104 [5] https://mcfunley.com/choose-boring-technology
    105 [6] https://go.dev/ref/mod#vendoring
    106 [7] https://dubroy.com/cdn-cgi/l/email-protection
    107 [8] https://news.ycombinator.com/item?id=38793206
    108 [9] https://wasmgroundup.com/
    109 [10] http://www.butterbreze.de/zutaten.html
    110 [11] http://www.augustiner-braeu.de/
    111 [12] https://dubroy.com/blog/rss.xml
    112 [13] https://buttondown.email/pdubroy