J

Jimmy Koppel

pathsensitive.com · Personal blog · on HN since 2018

Jimmy Koppel writes about software design, abstraction, refactoring, and how programmers learn, with a formal-methods and programming-languages slant.

What HN saysHN links it for his defunctionalization refactoring writing and for his critique of Ousterhout's "deep modules" idea.
47HN people shared it
17linked it in comments
57stories submitted
2.9Kstory points
5 months agolast shared
2018people per year2026

Most-shared posts

  1. 1
    Defunctionalize the Continuation
    11 people · 240 points · first shared 2019 · 31 comments on HN
  2. 2
    Why Programmers Should(n't) Learn Theory
    7 people · 10 points · first shared 2021 · discussion on HN
  3. 3
    Book Review: A Philosophy of Software Design
    5 people · 363 points · first shared 2018 · 51 comments on HN
  4. 4
    Abstraction: Not what you think it is
    5 people · 177 points · first shared 2022 · 127 comments on HN
  5. 5
  6. 6
    'Modules Matter' Most for the Masses
    4 people · 4 points · first shared 2023 · discussion on HN
  7. 7
    The Design of Software is a Thing Apart
    3 people · 198 points · first shared 2018 · 117 comments on HN
  8. 8
    Puzzles to convince you you don't understand dependence
    3 people · 35 points · first shared 2022 · 13 comments on HN
  9. 9
    When your data model means something else
    3 people · 14 points · first shared 2018 · discussion on HN
  10. 10
    Developer tools can be magic but instead collect dust
    2 people · 499 points · first shared 2021 · 355 comments on HN
  11. 11
  12. 12
    My favorite principle for code quality
    2 people · 203 points · first shared 2018 · 109 comments on HN
  13. 13
    Elements of Programmnig
    2 people · 46 points · first shared 2020 · 9 comments on HN
  14. 14
    Why code that never goes wrong can still be wrong
    2 people · 9 points · first shared 2018 · discussion on HN
  15. 15
    Aspects of Good Code
    2 people · 6 points · first shared 2023 · discussion on HN

What HN people wrote when they linked it

dceddia · 2023-12-29
For Elixir specifically, I liked Dave Thomas’ Elixir for Programmers. https://codestool.coding-gnome.com/courses/elixir-for-programmers-2 For learning about performance and low level stuff, Casey Muratori’s Performance Aware Programming course has been great. https://computerenhance.com For higher level software design stuff (beyond just GoF patterns), check out James Koppel’s writing at https://www.pathsensitive.com/ and his courses at https://mirdin.com
Darmani · 2024-01-20
To people who are experienced in writing out the full interface of modules, ie their assumptions and guarantees, it's quite clear that being a "deep module" in Ousterhout's sense is quite rare and often undesirable, and that Ousterhout's examples of deep modules are actually shallow. See https://www.pathsensitive.com/2018/10/book-review-philosophy-of-softwa… He gets a lot of other stuff right though. Love his writing on comments
wgd · 2022-02-28
There's a fascinating relationship between tail recursion and continuations, because any non-tail-recursive function call can in principle be made tail-recursive through conversion to explicit continuation-passing style. For added fun, that continuation can then be defunctionalized [1] back into a data structure. It can be argued that TRMC as implemented in the linked post is simply a special case of this more general transformation. [1] https://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never…
wool_gather · 2020-03-12
There appears to be a fuller version of this talk on the author's own site: http://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never-… Agreed it's quite good.
jonahx · 2020-03-09
Prior Art: "The Best Refactoring You've Never Heard Of" http://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never-…
svat · 2020-03-09
> So.... this is just a fancy name for the advice "give your functions a name"? Not quite: "defunctionalization" is a name for replacing functions with not-functions (data structures). (And IMO it's the most unfancy name one can give to that activity, as the name literally just indicates "removing functions"... I can't think of a less fancy name for it: maybe "un-function-ize"? But that's pretty much the same as "defunctionalization".) BTW I recommend reading the 3 linked articles in this order: 1. https://blog.sigplan.org/2019/12/30/defunctionalization-everybody-does… 2. http://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never-… (with accompanying video) 3. https://www.gresearch.co.uk/article/defunctionalisation/ (this one actually shows how you can incrementally adopt this)
sriku · 2020-03-09
This is a technique worth talking/writing about a bit more. Sometime ago, Jimmy Koppel also wrote somewhat extensively about defunctionalization and refunctionalization as "refactoring" techniques - http://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never-…
agbell · 2019-12-31
I enjoyed this talk, and accompanying transcript on defunctionalization. Despite the verbose name, the concept is quite simple and does come up a lot. http://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never-…
crabmusket · 2024-12-28
This is such a great quote, and helps explain what is a good abstraction. Because CRDTs have been in the zeitgeist a lot lately, I want to pick them as an example of a "good" abstraction. CRDTs have mathematical properties which can be described and understood independently of a specific implementation. And importantly, you can judge whether an implementation is correct with reference to these abstract rules. This means that when using a CRDT, you largely can treat it as a reliably-solved problem. Once you understand the concepts, and work out how to use the library you've picked, you don't have to think about the details. Though that doesn't mean sometimes the behaviour can be surprising: https://www.moment.dev/blog/lies-i-was-told-pt-1 TCP and HTTP are great examples too, though interestingly I don't know if they rely on mathematical definitions so much as just being extremely widespread to the point that reliable implementations are available anywhere you care to write code. I like this article which also leans on the Dijkstra quote: https://www.pathsensitive.com/2022/03/abstraction-not-what-you-think-i…
Twisol · 2021-08-16
Mutual single recursion is still a loop; you just pick where you want to cut the cyclic dependencies to return to the top. In the worst case, you can put a `switch` in the loop and track what state you're in, although that's gross (you have to keep the union of all variables that might be used in each state). Multiple recursion, like in `fib n = fib (n - 1) + fib (n - 2)`, is more general than loops... in a world without higher-order functions. You can make such a function tail-recursive by doing the continuation-passing transform, which basically just makes the stack explicit. (You'd then want to "defunctionalize the continuation" [0] to clean up.) (I've actually done this in Java! Writing the multiply-recursive solution is sometimes a lot easier to do (and verify); transforming it into an iterative solution mechanically exposes a lot more hidden details, but you still have your recursive solution you can test and compare against.) [0] http://www.pathsensitive.com/2019/07/the-best-refactoring-youve-never-…
sn9 · 2026-05-04
Everyone should Jimmy Koppel's post on what abstractions are and aren't: https://www.pathsensitive.com/2022/03/abstraction-not-what-you-think-i… Anyone claiming LLMs are an a higher level of abstraction are not using it in the way used by programmers and computer scientists. They're usually conflating "delegation" and "abstraction", as if a junior developer is an abstraction.
sltr · 2024-12-28
When discussing the definition of abstraction, Koppel's article "Abstraction: Not What You Think It Is" offers a helpful framing and disambiguation. https://www.pathsensitive.com/2022/03/abstraction-not-what-you-think-i…
Errancer · 2023-04-25
The point as I understand is that interfaces in the OOP sense try to mimic what modules do. Therefore OCaml not having them is not a serious accusation since everything you try to accomplish with interfaces / design patters you can and should be able to do with modules. Here is the article explaining the concept: https://www.pathsensitive.com/2023/03/modules-matter-most-for-masses.h… but I have to note that I never worked in OCaml so this is just my theoretical understanding.
qznc · 2020-07-24
Here is a counter argument: http://www.pathsensitive.com/2018/10/book-review-philosophy-of-softwar… My summary would be: The spec must cover all possible implementations so it is usually larger than the most simple one. An example from there: > The authors of SibylFS tried to write down an exact description of the `open` interface. Their annotated version of the POSIX standard is over 3000 words. Not counting basic machinery, it took them over 200 lines to write down the properties of `open` in higher-order logic, and another 70 to give the interactions between open and close. > For comparison, while it’s difficult to do the accounting for the size of a feature, their model implementation is a mere 40 lines.
saisundar · 2018-10-30
Level 1, level 2 and level 3 are the authors conceptions. Another post of his details what he means... http://www.pathsensitive.com/2018/01/the-three-levels-of-software-why-…
BadMathBook3 · 2018-02-16
I bailed on high school math, thinking I'm math dumb. In my late 20s I decided to try again, but jumped straight into calculus. And at first regretted that decision. However, I got lucky by stumbling upon this book: https://www.amazon.com/Calculus-Made-Easy-Silvanus-Thompson/dp/0312185… It "reads" like a book, with the ideas given context. I had an "ok" connection with Algebra, and the book explained the rest well enough for me. In school, the textbooks were loaded with symbols, but not enough description -- I guess they relied on bored teachers making minimum wage to do that part. I went to a school with poor academic showings (but connections to state superintendent of ed got them a grant for football facilities). Coincidentally, this book goes well with the technique described here: http://www.pathsensitive.com/2018/01/the-benjamin-franklin-method-of-r…
archibaldJ · 2021-08-09
Thanks for the detailed break-down and the links!! > which are pretty much always mathematically uninteresting), then...absolutely! SAT/SMT are at the core of constraint-based synthesis. Wow this is super cool to know! > http://www.pathsensitive.com/2021/03/why-programmers-shouldnt-learn-th… This would definitely help to kickstart my journey in program synthesis:) > "egg: Fast and Flexible Equality Saturation"... It uses code trees, which I read about a few months earlier in the Handbook of Automated Reasoning > http://cubix-framework.com/ > https://egraphs-good.github.io/ > https://people.csail.mit.edu/asolar/ > https://github.com/microsoft/prose These stuff are super cool! Really appreaciate it!

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