4 ms·
I like the idea. If people want to learn to read code and grow from it I highly encourage adopting tools suitable for that task. You can’t read code in a diff.
by eyelidlessness 6y ago
I like the idea. If people want to learn to read code and grow from it I highly encourage adopting tools suitable for that task. You can’t read code in a diff. You can’t read code in commits on GitHub. You can’t. You read code in an editor with reference navigation. And you go navigate even if the interface didn’t change. And you go read tests to see what they (don’t yet) exercise. You need a full dev environment to read.
Again fully in support of the effort. Just want to make sure readers have context to embrace their tooling context for the task.
- xyzzy_plugh 6y agoI can't agree with this, generally. It depends on the language and the project. > You need a full dev environment to read. I don't. My "full dev environment" is just vim with stock configuration anyways. I read code on my phone everyday. I read code on GitHub every day. Does GitHub suck for reading code? Absolutely. But it's not impossible, far from it. I mostly read Go, C, various configuration dialects and she'll scripts, occasionally some Java or Python or Rust. Perfectly readable in plaintext. Sure Scala is borderline unreadable without an IDE but for the most part it's fine. I mean, after all, you can read code in a book, can't you?
- eyelidlessness 6y agoMy point is that you can’t know the full impact of a code change without the full context of the change. Just a silly, trivial example: someone opens a PR to change a brand color on a website’s theme. You see one line of code changed but the effect is probably far reaching. Now, using only a diff, you have to trust that either the tooling or the human or both have validated every usage under every scenario to identify regressions. Is some placement of that color now too low contrast? Is it too jarring in dark mode? Is it being used for non-brand purposes because someone got lazy, and changing far more than intended? How can you know unless you have the rest of the code base in your head? Do you trust your test coverage?
- hinkley 6y agoReading code diffs is like examining your life as the changes that happen over time but not actually examining your life. This is how you wake up one day and realize that you don’t like the person in the mirror, or that nobody else does. Aka “boiling the frog.”
- analognoise 6y agoThis is brilliant; between this and "free as in piano" it's a good day for reflection on code.