5 ms·
> If I left this verbose and other bits verbose then it would be hard to see the whole picture. I really can't sympathize with this. How exactly is this helpin
by forgotpwtomain 11y ago
> If I left this verbose and other bits verbose then it would be hard to see the whole picture.
I really can't sympathize with this. How exactly is this helping any one at all, if you have to struggle with it yourself? Is it a bunch of dense monolithic code? Decompose into smaller methods / separate files. Setup your text-editor/IDE in an effective way for quickly navigating across large chunks of related code. Imho there is a world of difference between terseness that helps readability and code re-factoring vs. terseness that makes you want to bang your head against the monitor.
That said I think the requirements, or say qualities which define good code and good dissertation's are quite different. Code needs to be maintained, refactored and altered throughout it's lifetime, a dissertation might only need to be built up and understood once to prove a particular result which can be re-used after that.
- GreaterFool 11y agoThe way I see it, I have limited capacity to build a mental picture of whatever I am working on. When I'm looking at pages and pages of verbose and repetitive code, it is quite hard. What does this bit do? Just checking the error condition and re-throwing the error. What does that bit do? Same boring stuff. Where is the meat? When I'm looking at few lines of terse but complicated code, it is easier; it is all meat and little fat. Just enough to make a good steak. But this only works if I understand the mechanics of that terse code. So when I work on something else for a while and I come back to some code for which I no longer have an accurate mental picture in my brain I need to refresh my memory. I think mathematics is the same way. Imagine a full A4 page of equations. It is really hard, at least for me, to hold in my brain a mental model of what it all means. Sure, there's a ton of background that I need to be familiar with, but it's not in my mental picture. Imagine this: suppose you wrote rules for how addition works, and then multiplication, and then build it all up so you can do linear algebra. That's too much! When I advocate terse code I don't mean it in a "here's my obfuscated C code sense". I mean that when I write "f . g . h" there might be more going on here than meets the eye, but as long as you know the rules of what . means in this context, it is super easy to follow.
- lmm 11y agoI find there's a huge difference between code that fits on a single screen and code that doesn't (and I've heard claims this is backed by research). So I'd far rather have lines that I have to stare at for a while to unpack than lines that are individually simple but I have to scroll up and down or jump back and forth to see the whole method.