3 ms·
A big problem IME is people tend to define "simple" as "written in a style I prefer". For example you can extract a series of 10 obviously-related methods from
by obstacle1 7y ago
A big problem IME is people tend to define "simple" as "written in a style I prefer". For example you can extract a series of 10 obviously-related methods from some 2000-line God class into their own class, but have others who are used to a more procedural coding style complain that the indirection is "hard to read" because they need to open a new file. This despite the facts that others find the God class "harder to read" because it contains 2000 lines of
code doing everything under the sun, and that class is objectively harder to maintain/change for everyone because nobody knows what things are necessary to change to achieve some goal, because there are no logical boundaries between code functions so you can't tell what needs changing without reading everything.
Cue endless bikeshedding in the name of "simplicity", which nobody is using an objective metric to define.
- stinos 7y ago2000-line God class ... "hard to read" because they need to open a new file Might be me, but I've always found this a rather strange argument: either they aren't using 'go to definition' which means that to be able to read the other code they have to scroll through the file manually, leaving where they are, and then go back. That's not really convenient? Or they are using 'go to / peek definition' and then it doesn't really matter it's in another file?
- goto_self 7y agoI have counterpoints on both ends here. It's not always possible for a "goto definition" function to work in dynamic languages. If you're in a large file, it's quite easy to jump around with line marks (a la vim), searching, etc.