4 ms·
> I've occasionally fantasized about a code editor that doesn't allow scrolling, so you're forced to break code up But this is easily hackable around. What yo
by enriquto 8y ago
> I've occasionally fantasized about a code editor that doesn't allow scrolling, so you're forced to break code up
But this is easily hackable around. What you really want is a programming language that does not allow functions longer than 25 lines.
- foreigner 8y agoHa ha I guess you're right! I can't be bothered to switch to a different programming language just for this feature tho :-) Anyway then you would get stuck policing exactly how long a "line" is, do comments count, etc...
- enriquto 8y ago> Anyway then you would get stuck policing exactly how long a "line" is, do comments count, etc... A line is 80 characters. Indent is 8 spaces. Comments do not count.
- foreigner 8y agoCase in point, I prefer an indent of 4 spaces.
- enriquto 8y agoIt does not matter. However hard you "prefer" the value of pi to be 3, it will stay an irrational number. Eight-space tabs are a constant of the universe.
- deleted 8y ago[deleted]
- indentit 8y agonot in this universe they aren't - many popular applications indent 4 spaces by default when pressing the Tab key, and render physical tabs as four spaces, for example github ;) tabs of 8 space width are a legacy travesty that wastes space :)
- enriquto 8y agoOurs is indeed a decadent universe that is slowly being corrupted by powerful forces of evil (such as the 4-space tab brain damage of github). But there are still beacons of light to guide us: https://www.kernel.org/doc/html/latest/_sources/process/coding-style.rst.txt https://www.kernel.org/doc/html/latest/_sources/process/codi... https://wiki.musl-libc.org/coding-style.html https://wiki.musl-libc.org/coding-style.html https://www.freebsd.org/cgi/man.cgi?query=style&sektion=9 https://www.freebsd.org/cgi/man.cgi?query=style&sektion=9 https://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9/style.9?query=style%26sec=9 https://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man9...
- colordrops 8y agoAre you programming on your phone in landscape mode?
- enriquto 8y agoNo. I use a terminal emulator with the default size it opens with.
- AlotOfReading 8y agoThat doesn't do anything to reduce the complexity of code, it just means you have a lot more functions to read and the actual logical units distributed across random sets of them to fit the arbitrary line limit. Some of the worst codebases I've ever seen had many small functions because the logical boundaries of the problem domain didn't match the logical boundaries of the source code.