I feel like half of programming is remembering how weird stuff works and the other half is setting things up so that you do not have to remember the weird stuff
Comments
Log in with your Bluesky account to leave a comment
I needed to write a semi complex BigQuery query at work and found a note from past me from the time I needed to same query 6 months ago and I was So Proud of past me, not just for writing it down but ALSO writing it in a place I could find it again!
The natural philosophers studied the nature of the universe, plumbed the depths of what was.
Beyond the earthly detail we have, our spiritual duty is to make machines which also are understandable, that reveal their workings & which do not give shelter to endless intricacies.
for many years now, every once in a while I search for something on google and end up on a StackOverflow answer and laugh when I realise *I wrote* that answer.
So nowadays every other month I remember to "try to find out some better ways to write down, organize & recollect bits of knowledge"
In my opinion that’s a sign that many programming languages, frameworks and environments are optimized to please whatever whims their authors had; instead of being there for you, the programmer.
You used to turn on a computer and literally write code into it.
this post is brought to you by me reading an intro to some confusing programming concept and getting mad because it didn't explain that (IMO) the confusing language feature is a bad choice by the language designers and that it's easier to just avoid using it instead of remembering how it works
Maybe the confusion is because your sample class doesn’t have any properties. A static method must be stateless and wouldn’t touch the properties. An instance of a class can call any methods.
If `Dog` had a `stomach` property, `myDog.eat()` could set it to `full`, because your instance of `Dog` might have eaten enough, but a `Dog.eat()` wouldn’t even be able to read `stomach` because it doesn’t exist unless you instantiate the class.
when I'm explaining something weird about computers I always try to think about if the Weird Thing is really worth the real estate it takes up in your brain or not
I imagine how knowledgeable I could be if my brain wasn’t filled with years of worthless computer information like which chips were big or little endian for proper data transfer, or languages are that are barely used.
I think there’s more value in learning the decisions that went into building Weird Thing™️. Is it a mistake, technical debt, is there a better way to do it, etc.
do you have an example? I'm feeling kind of anti history recently because I've been writing about the terminal and people have been telling me a lot of stories about how their terminal worked in 1985. It often just feels like nostalgia and not useful.
Agree “avoid using X” is often good advice. Unfortunately we don’t control the code other people write. I once worked on a project where a very important class heavily used es6 proxies. Was basically forced to learn how it works against my will
oh yes! I didn't give much thought about the problems of assigned type and actual type until recently when I re-read variance in Kotlin and it just makes it much more confusing :/ https://typealias.com/start/kotlin-generics/
Definitely more than half is arranging to not need to remember. Like using brackets instead of relying on operator precedence. Or adding a comment to explain the weird thing you're doing. When I use a third party library I include a comment with the library's url right in my C++ source. 1/
Remembering is overrated. We can feel proud of it early on, but as time passes we understand the bigger skill is not needing to remember so much. (Baseball metaphor: the dramatic running and diving catch is actually not as skillful as standing in the right place to begin with.) 2/2
Me learning the ins and outs of a language but spending as little time with the confusing build and dependency system as possible (looking at you Gradle)
I absolutely hate to admit this, but as I've moved away from maining a single language, ChatGPT has been somewhat useful in remembering the idioms and APIs between the different languages~
Thank you for this. As a result of this post in a period of relative downtime I remembered to try replacing the ancient and inscrutable Sprockets in the Rails asset pipeline with Propshaft...
I have a file called "incantations.md" which contains all of those commands I need to use, like, six times a year, so I can't memorize them but also googling/reconstructing would be annoyingly slow
I have a shell alias `incantations` which opens my incantations file
whenever a junior feels dumb for not understanding something i always remind them that THEY’RE not dumb, COMPUTERS are dumb and most of learning to code is just breaking your brain so that it can work the same way as the dumb computer
My friend was telling me about feeling dumb because they were constantly getting errors in their code, and had to try over and over again before it worked the way they wanted it to.
I said, no, you're being unreasonably hard on yourself! That's the whole thing! That's literally what programming IS!
I'd rather say that programming ideally is half modelling and reasoning about something to its logical conclusion and the other is about coming to terms on the edge cases.
Realistically speaking, its half compromising on the means, a quarter negotiating with other people, and then fixing things :')
Comments
Beyond the earthly detail we have, our spiritual duty is to make machines which also are understandable, that reveal their workings & which do not give shelter to endless intricacies.
So nowadays every other month I remember to "try to find out some better ways to write down, organize & recollect bits of knowledge"
You used to turn on a computer and literally write code into it.
Now it’s hours of setup first.
a) I don't need to know Weird Thing at all
b) I need to know all of the history behind Weird Thing even less
knowing the context can for sure be helpful though!
But there’s often lessons to be learned about what to do, and not do, from all kinds of weird things to apply in your own work
2. avoid said dragons
that tracks!
I have a shell alias `incantations` which opens my incantations file
Reminds me of the tar command I kept on a sticky as a kid because I was sick of looking up all the switches every time
I said, no, you're being unreasonably hard on yourself! That's the whole thing! That's literally what programming IS!
Realistically speaking, its half compromising on the means, a quarter negotiating with other people, and then fixing things :')