14 ms·
What's interesting to me isn't code itself, it's APIs and user interfaces. For any given API there's multiple ways to implement it. But they often perform the
by eternityforest 3y ago
What's interesting to me isn't code itself, it's APIs and user interfaces. For any given API there's multiple ways to implement it. But they often perform the same.
If my goal was "Good code" I'd probably review and debate the value of each possibility. But I'd rather have any random trash behind a well designed API with unit tests, and then optimize it, instead of make a beautiful implementation with no real abstraction or tests or profiling.
I'd rather have average code in Dart or Nim or Rust than great code in C, unless the performance was too critical for that.
I'd rather have a python stdlib call than some excellent original code.
And if I think the actual purpose of the code is stupid, I'm probably not going to care about how it's written.
Reading code seems in theory like a worthwhile activity. But without hard science how can we be sure the time wouldn't be better spent reading actual literature and reminding ourselves that there's more to the world than code?
Programmers write code a lot, and read it too, it's part of the job... Do we really need to do even more of that?
If there's something particularly interesting I'll read it... but most code is not written like literature. It's written to implement something without anything surprising or innovative. Literature generally makes you feel something other then "Yep those are definitely words".