Page Summary
Active Entries
- 1: Interesting Links for 21-04-2025
- 2: Interesting Links for 22-04-2025
- 3: Interesting Links for 20-04-2025
- 4: Photo cross-post
- 5: Interesting Links for 18-04-2025
- 6: A thought about the transgender court case - and the ECHR
- 7: Interesting Links for 19-04-2025
- 8: Review: Planet of Lana
- 9: A brief summary of the Transgender/Equality Act court case
- 10: A thing I wish Google Maps could do
Style Credit
- Style: Neutral Good for Practicality by
Expand Cut Tags
No cut tags
no subject
Date: 2024-09-18 11:06 am (UTC)about damn time!
no subject
Date: 2024-09-18 11:10 am (UTC)I'd read several articles on the web describing git's object data model: immutable commit objects linked in a dag, each linking to a tree object, each linking to blob objects for files or further trees for subdirectories, and branch heads as (mutable) references to a specific commit. Somehow, these articles didn't cause me to be less confused. And then one day I ran
git fast-export
to dump out the whole of a test git repository, and looked at the dump file to see if I could understand it. Then suddenly the blockage cleared from my mind and I felt I understood git. But all that was in the dump file were the same commits, blobs and trees that I'd already read about: with hindsight I could see that those articles had told me nothing but the truth. But somehow looking at it "for real" conferred an understanding that the articles hadn't.It took me months of pondering to figure out exactly what had become clear to me that day, which somehow hadn't been clear before. But eventually I decided the thing I hadn't taken in from the articles (maybe they hadn't said it, or maybe I missed it, I never went back to check which) is: there's nothing else. If you have a collection of commits, blobs, and trees, and you know which commit each branch head points at, that's enough to construct an equivalent git repo of your own (which is exactly what
git fast-import
will do when it reloads the same dump file). No further types of metadata exist in the repository that I hadn't known about¹.Once I was sure of that, I wasn't afraid of complicated operations like
git merge
orgit rebase
, because I could work out for myself what they basically had to be doing internally: given that data model, there's only one option. Whereas when I still had a 10% worry that there was some extra metadata lying around (e.g. machine-readably marking cherry-picks of the same commit as equivalent, or explicitly marking that a file was renamed in a commit), there were more possibilities in my head as to how the thing might work."If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming." – Rob Pike
¹ (of course, there are edge-case weirdnesses like the git-replace and git-notes ref namespaces, and no end of extra nonsense that can exist locally to a particular git checkout, but for the core understanding, I was interested only in the common case, and only in the data shared between repositories by pushes and pulls. Everything else I was confident I could learn later as and when it impinged on me.)
no subject
Date: 2024-09-18 01:38 pm (UTC)no subject
Date: 2024-09-18 02:49 pm (UTC)no subject
Date: 2024-09-18 02:48 pm (UTC)With Git it was reading Git from the Bottom Up that really made things click to me. But I had to actually use it a few times and see what it did before that article made any sense.
And now git is really really simple to me. (The data structures - the commands are still a clusterfuck.)
no subject
Date: 2024-10-01 01:27 pm (UTC)My equivalent to this was basically The Curse of Lady Monadgreen (from Gilad Bracha):
Which is why, once I finally figured it out (after something like eight years of Scala programming), I immediately (in a small enough epsilon of "immediately", it appears) began to teach it, because it was clear from the outset that only right then, right when I had just learned it, would I be able to reconstruct how I learned it.
(Which was essentially in reverse. Most people start by trying to explain what a Monad is, and that's usually a lose -- you wind up bogged down in category theory and/or laws. I instead teach how you use it in Scala programming, with lots of examples, which tends to get the intuition across -- generally the most important part -- and then work outward from there to explain how it works.)
no subject
Date: 2024-10-01 01:31 pm (UTC)no subject
Date: 2024-10-01 02:46 pm (UTC)Yeah, my "inside-out" explanation goes something like:
map
andflatMap
functions, and show how it's all just function calls. If the data structure implements a well-behavedmap
andflatMap
, it's a Monad.no subject
Date: 2024-10-01 06:49 pm (UTC)no subject
Date: 2024-09-18 03:52 pm (UTC)The linked linked article says "doing well in courses means getting the right answers on tests. If you know those answers, you do well and get to feel smart."
The linked article says "There’s something fundamental in the nature of mathematics that makes it easy once you get it, and impossible before." That means it's not enough to memorize the right answers.
The problem here is that we conflate rote memorization to pass the tests with actually learning the subject.
no subject
Date: 2024-09-19 05:17 am (UTC)