No Boilerplate
This AM I stumbled on this, that I wrote back in 2015:
I’ve been programming for almost three (3) decades now and I’m in love with it as ever. But where before I was younger and had more patience for brutality of repetition, if not in code, then in code structure, today I really hate repeating myself. Hence this site where I’ll be creating and curating things that save me code and typing, but not in some kind of “generalized library” sort of way, but really saving it by allowing me to work on a higher level of abstraction.
Raising Abstraction
Last night I stumbled on Auto Rust project:
auto-rust is a Rust procedural macro that harnesses the power of Large Language Models (LLMs) to generate code at compile time. Write a function signature, add a doc comment describing the desired functionality, and let auto-rust fill in the implementation details!
I previously wrote about the need to leverage LLMs to raise the abstraction:
I consider that the current practice of checking in GPT generated code, is akin to something like say checking in assembly code generated out by the compiler rather than the higher abstraction source code that we actually wrote.
Shared mutable state is the enemy
Hillel Wayne writes:
Some function programmers stay “shared mutable state is the enemy”. I think it’s more like “time is the enemy”, and time represents itself as mutable state. If a state update is purely internal and cannot affect the observable state (such as a statement in an uncommitted transaction), then it does not advance time.
I have been explicitly thinking about shared mutable state, inside and outside of computing, since Herb Sutter’s 2009 Sharing Is the Root of All Contention (and have, since becoming a father, greatly appreciated his “two children drawing with crayons” example).
Return of Return Type Inference
I wrote about return type inference last month. I offered no recommendations but here is one that I think might strike a solid balance between fast writing and improved reading:
Specify the return types on all the functions exported from a module Do not specify return types on the functions internal to a module This works for classes too:
Specify the return types on all the public methods of a class Do not specify return types on the private methods This improves coding because:
Circle Compiler
I stumbled on this in my private notes, from February 2021 (edited for formatting and spelling mistakes). I’m mostly publishing because of the hilarious dream/hallucination at the end which I completely forgot in the past 3+ years (maybe swept away by a far stranger reality of 2021/2022/2023?)
CircleCompiler Circle C++ compiler is “an extension of C++17 to support data-driven imperative metaprogramming”. In short, it is a way to write a program to write a program, a built-in code generator, much better than macros or templates, because it’s imperative in nature and doesn’t rely on what the compiler writer offer us.
Tree Branch Leaf
I stumbled on 90-percent-perspiration that I wrote a few years ago. This caught my attention:
This is why software development is so much more than programming. I love both but as you move down the stack - into platforms or infrastructures - there is more and more work around less and less programming.
I feel that I wasn’t clear when I wrote: all the programming is like that, not just platforms or infrastructure software development.
Abstraction Cake
The cake is a lie.
Doug Rattman in Portal I was listening to SE Radio 625: Jonathan Schneider on Automated Refactoring with OpenRewrite (I highly recommend it) and at one point Jonathan talks about AI:
We ourselves are avid users of Copilot inside of our company. So I see the primary use of AI in code as in authorship experience that’s accelerating this trend that has existed for some time in the increase in the volume of code under management, already.
The Night Sludge
Unlike the sludge, which is really just for mornings, the night sludge is much simpler:
300ml of cold water 25 grams of casein protein (chocolate flavor) 12 grams of psyllium husk (1 spoon) Mix but not for too long because it is going to get dense very fast. Then enjoy a perfect proteins-meet-smoothy-meets-Ĩokolino (the cereal I grew up on).
Shell or IDE
The title is a switcheroo: it implies that I am talking about general software development but I actually want to talk about specific software development around a single (significant) project. And the answer is probably “neither”.
Consider:
You are a software engineer, you join a new company and get your new notebook. You are onboarded and there is a bunch of new things that you need to learn in order to be effective at your new job.
Type Inference
I mistyped “type inference” as “type interference” and now I wonder what would that look like :)