3 ms·
To more directly answer your question, it's more a problem of needing to remember an unnecessarily large number of names - in addition to the class variables nu
by BruceIV 14y ago
To more directly answer your question, it's more a problem of needing to remember an unnecessarily large number of names - in addition to the class variables numberOfElves and reindeerArray from my example, I now need to keep track of twice as many names. Also, admittedly, after the first 5 or 10 repetitions of the same assignment, I know what all the valid solutions look like, so obfuscating the code by putting little chunks of code in separate methods makes it harder to read (but that's a readability problem specific to marking assignments).
- anonymous 14y ago"a large number of names" is a metric that differs for different people. Some find it much easier to parse text when everything is named, some prefer to have things unnamed and just spelled out. Think of having a hash from name->function vs a hash essence->function. The first people can see a name, remember it, look it up and form a connection. The latter can see a logical block of code, parse it and then recognise it when they see it again. Personally, I'm in the latter camp. There are people whose names I've been told more than 5 times, but still don't remember them. I remember the person, but not the name. In school, I almost never knew any teacher's name and it took me several years to learn the names of most of the other children. This also means that you can't have a "One True Most Readable Style". You only have several local maximums for different classes of people.