Weeknotes № 1
Week Off
Last week the kids were still at home, so my week was mostly filled with care tasks.
I had officially started my marathon plan on Dec 18th, and while the first day or two went great, I then got a pretty intense cough which is still not completely gone. I only managed to put in a few runs. Last week, I only ran once. I was planning to prepare well for a late April marathon, but that’s not possible anymore (I could still run if I can get in some decent training, but not at the level I was hoping for).
I did make a bunch of progress on the layout explanation website. I now have fully working HStack explanations (visualizations that explain the internals of how an HStack lays out its children). While we’re still working on the design, the basic case is now visualized really well.
I’m still enjoying TypeScript. While I prefer Swift, it’s nice to have integrated Copilot support. The other day I pasted in a Swift snippet that I wrote a while ago and started translating it line-by-line, and Copilot did most of that work. I don’t really trust it generating more than one line (or more than I can immediately parse in my head), but when I’m on the train with no internet connection, I do miss it.
TypeScript’s structural types are both great and annoying. I miss Swift’s enums, which you have to simulate through tagged unions. The thing I miss the most is value semantics: in TypeScript (which is just types on top of Javascript), everything is an object, and almost everything is passed by reference. I’ve definitely seen my share of “spooky action at a distance”, where a value would all of a sudden change underneath me. As the code base matures, I’m adding more and more clone
or copy
methods to my types (giving me a new instance of an object with the same properties).