A
Adam Tornhill
adamtornhill.com · Personal blog · on HN since 2015
Adam Tornhill, a software developer and author, writes about code analysis, Lisp, Smalltalk, and book reviews.
What HN saysHN links it for his "Code as a Crime Scene" work on measuring code complexity, a FizzBuzz C++ compiler errors piece, and his metaobject protocol review.
25HN people shared it
10linked it in comments
19stories submitted
473story points
7 months agolast shared
2015people per year2026
Most-shared posts
- 1Lisp for the Web (2008)5 people · 110 points · first shared 2015 · 34 comments on HN
- 2Code as a Crime Scene (2013)4 people · 2 points · first shared 2021 · discussion on HN
- 3Book Review: The Art of Metaobject Protocol (2014)4 people · 2 points · first shared 2020 · discussion on HN
- 4Manipulate Functions with the J Language3 people · 116 points · first shared 2017 · 31 comments on HN
- 5My Five Worst Bugs: Lessons Learned in System Design2 people · 6 points · first shared 2018 · discussion on HN
- 6Adam Tornhill – Software Articles2 people · 1 points · first shared 2015 · discussion on HN
- 7Code quality only matters in context (2019)1 people · 128 points · first shared 2022 · 74 comments on HN
- 8Learning Smalltalk from “Pharo by Example”1 people · 58 points · first shared 2015 · 19 comments on HN
- 9Kill the Clones: Temporal Coupling Finds Design Problems in Large-Scale Systems1 people · 29 points · first shared 2015 · discussion on HN
- 10Programming Like It's 19771 people · 17 points · first shared 2024 · 1 comments on HN
- 11Book Review: The Apollo Guidance Computer: Architecture and Operation1 people · 2 points · first shared 2016 · discussion on HN
- 12Predict Maintenance Problems in Large Codebases1 people · 2 points · first shared 2019 · discussion on HN
- 13Codemaat1 people · first shared 2023
- 14Patterns%20in%20C%205,%20REACTOR.pdf1 people · first shared 2023
What HN people wrote when they linked it
cratermoon · 2023-03-05
The best source for this kind of emprical measurement of code complexity is Your Code as a Crime Scene by Adam Tornhill. See also http://www.adamtornhill.com/code/codemaat.htm
vcarl · 2015-11-19
I also love this one.
http://www.adamtornhill.com/articles/fizzbuzz.htm
Fizzbuzz implemented as C++ compiler errors.
dahjelle · 2024-07-25
I've been wanting to try something like this for a long time! Is there any way to sign up for updates?
(In particular, I'm waiting for the option to turn off the AI stuff, at least for when I am trying things out.)
I especially love the ability to zoom into a function and hide the rest of a file. I've wanted that sort of thing a surprising number of times. I'm thinking one could also use this to virtually rearrange a single file by pulling the functions in that file that you are working on next to each other easily?
In addition to the editing interface, I think there are probably a lot of visualization opportunities in editors:
- what's the interaction between my code and third-party dependencies? - what are the dependencies/call graph of my code? or perhaps just a portion of it? - call graphs can be nested — perhaps you care for a dependency graph at the class or module level, or perhaps you want to "drill down" into the call graph inside an object
In all these cases, being able to seamlessly transition between the visualization and editing — like you seem to be aiming towards — seems like the killer feature.
And, of course, there are lot of other interesting visualization opportunities once you have any sort of graphics in your editor:
- heatmaps of code churn - heatmaps of code performance - tracing variable usage - and, of course, lots more (https://adamtornhill.com/articles/crimescene/codeascrimescene.htm)
One last thought: if you haven't read _The Programmer's…
youknownothing · 2026-04-08
I like the mindset, it reminds me of "Your code as a crime scene" by Adam Tornhill:
https://www.adamtornhill.com/articles/crimescene/codeascrimescene.htm
Also, very tangentially, to the notion of the Developer's Legacy Index:
https://www.javaadvent.com/2021/12/using-jgit-to-analyse-the-legacy-of…
igouy · 2024-05-16
Here's Alan Kay lavishing praise
minute 54 https://www.youtube.com/watch?v=oKg1hTOQXoY&t=634s
on "The Art of the Metaobject Protocol"
https://www.adamtornhill.com/reviews/amop.htm
lubesGordi · 2023-03-29
Maybe you'd find this interesting:
https://www.adamtornhill.com/Patterns%20in%20C%205,%20REACTOR.pdf
jonahbenton · 2021-02-27
They do but those aren't made available to you like a database, just through their search tool and indirectly through their contextual lookups.
See also tools that build databases from code history, like
https://www.adamtornhill.com/articles/crimescene/codeascrimescene.htm
vram22 · 2016-12-03
>Does anyone here use any lisp for Web Development?
Saw this recently:
http://www.adamtornhill.com/articles/lispweb.htm
It might be useful, even though is from 2008, if it focuses on fundamentals.
Saved it for later reading, since I'm not learning Lisp currently, though had read a part of the Practical Common Lisp book earlier. (Had liked what I read of it.)
CaiGengYang · 2015-08-02
detaro,
Just going through the exercises in this book by Paul Graham : http://ep.yimg.com/ty/cdn/paulgraham/onlisp.pdf. --- There doesn't seem to be anything in there about web development for Lisp though ...
Also saw this book on static web development by Adam Tornhill : http://www.adamtornhill.com/articles/lispweb.htm --- do you think this will help ?
jauntywundrkind · 2023-08-12
One of the core points about metaobject protocols is that while it's important to language design, a good language to me also exposes & makes flexible the object system to users of the language too.
From a review (https://www.adamtornhill.com/reviews/amop.htm),
> The metaobject protocol behaves like an interface towards the language itself, available for the programmer to incrementally customize. Just as we can specialize and extend the behavior of the classes we define in our own applications, we can now extend the language itself using the very same mechanisms.
One of the points that has rather surprised me is that we devs have not more broadly explored what we could do with our metaobject protocols. We havent had a boom in metaprogramming, we haven't seen a largescale return of AOP; we've been letting objects stay dumb unextended objects for a long time now.
The one sizable exception I have on my radar is React's Higher Order Components, where components/classes were wrapped/composed in other classes. Slices of object behavior were spliced into place.
Now that's replaced with hooks, which invert the relationship, making the function up front composed all behavior it might want as hooks that it calls.
I don't know enough about how Rust macros are made & used. My vague impression is they are very scarcely considered. Maybe I just missed the discussions but I'd expect there to be lots of blogging about this topic if metaprogramming here was really as fertile a field…