3 ms·
The whole point of a rule-of-thumb is to be dumb. There are very few good reasons for a 500 loc func, and the code reviewer won't want to verify it's as simple
by morshu9001 1y ago
The whole point of a rule-of-thumb is to be dumb. There are very few good reasons for a 500 loc func, and the code reviewer won't want to verify it's as simple as you claim. You could still have a 50 loc func that's overly complex, and they'll complain about complexity instead of length.
One consideration is that about 40 loc will comfortably fit in one code split, and it's nice if one func will fit in 1-2 splits. Past that length, no matter how simple it is, the reader will have to start jumping around for declarations. That might be ok at first, but at some point the ratio of offscreen to onscreen code gets too big.
- fragmede 1y agoI wonder if there is a way to see how physical monitor quality and size improvements have led to more complicated code, nevermind moving off of punch cards.
- morshu9001 1y agoThe type of monitor doesn't matter a whole lot because it's really limited by human eyesight. High-res monitor will enable rendering things tiny if you disable hi-dpi, but then it's unreadable. If you use a big 8K TV to display everything larger, you have to sit further away to comfortably view it. If you add more monitors, at some point it becomes too hard to look at so many things at once. Personally, my setup has shown the same number of vim rows/cols on my 4K monitor vs my 1080p one (or whatever you call the 16:10 equivalents).
- nine_k 1y agoThe effective resolution of the eye should be an angular value. I'd say that the smallest comfortable size of text characters for me is about 1/8° wide. I see the width of my 14" FHD laptop screen at about 30°, so the full width contains about 240 characters. This is a large upgrade from 80 columns of VT220 or VGA, and almost twice as much as the densest VT220 mode of 132 columns. My 28" 4K monitor is exactly like four 14" FHD screens put together. It offers me 480 columns (a bit fewer, because window borders and scroll bars of multiple windows). So indeed, better screens allow me to see much more text than poorer screens of old. There is a limit, but definitely it was not reached 30-40 years ago yet.
- adrianN 1y agoI can read small things much better on a high res monitor.
- fragmede 1y agoBack in the day we were rocking 640x480 on a CRT. 800x600 was what the rich kids had.