News for hackers. Stuff that matters.
Re:Software Architecture Is Overrated, Clear and Simple Desi... by obstacle1 on Wednesday September 18, 2019 @07:14AM (#21004050)
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.

Re:Software Architecture Is Overrated, Clear and Simple Desi... by stinos on Wednesday September 18, 2019 @08:57AM (#21004875)
2000-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?

Re:Software Architecture Is Overrated, Clear and Simple Desi... by goto_self on Wednesday September 18, 2019 @10:46AM (#21005951)
I 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.

Re:Software Architecture Is Overrated, Clear and Simple Desi... by stinos on Wednesday September 18, 2019 @10:57AM (#21006075)
Good point about dynamic languages. But line marks also work across files, right?
Re:Software Architecture Is Overrated, Clear and Simple Desi... by goto_self on Wednesday September 18, 2019 @11:20AM (#21006327)
Yes. Line marks are amazing.