2 ms·
I'm sure nobody decided that it was an explicit goal of the site to have accessibility issues. It has those issues for historical reasons. Maintainability to me
by olavk 8y ago
I'm sure nobody decided that it was an explicit goal of the site to have accessibility issues. It has those issues for historical reasons. Maintainability to me is being able to fix such relatively minor issues without everything coming crashing down. If it is too difficult to fix then the code is not maintainable whether or not the code is super small and compact. (Note I'm not arguing HN should be redesigned to use semantic markup, just using it as an example of reasonable maintenance.)
I would say simplicity is a really important part of maintainability, but that is not the same as smallness. For example, the for-loop mentioned is quite short and compact, no doubt about that. But to me it it not simple, because it is hard to figure out what it does and what happens when you change it. It is tightly coupled to the particulars of the HTML (even including the whitespace) so you have to dive into the HTML to see what nodes is removed and figure out yourself what is the implicit relationship between these three nodes. So is difficult to change without accidentally breaking something.
Making code simpler often leads to it also being shorter, which is good. But making code shorter without making it simpler just leads to unmaintainable cryptic code.
But I acknowledge maintainability also depends a lot on the people who are supposed to do the maintenance. I personal have limited memory, and I would forget what exactly those three nodes represented within hours of writing the code. I use abstraction and simplicity not because of some lofty ideal, but because I simply do not have the mental capacity to keep this amount of accidental complexity in my head. Your mileage may vary.