4 ms·
Hmm, I don't quite understand the point of this blog post. I would assume everyone knows about code reviews, and this is just a very typical code review.
by nawitus 12y ago
Hmm, I don't quite understand the point of this blog post. I would assume everyone knows about code reviews, and this is just a very typical code review.
- kyberias 12y agoMe neither. The example also seems very contrived and trivial. And it's a bad example! It's fairly obvious that it's a good idea to remove magic numbers. But the improvement still left the magic numbers 0 and 1 to index the raw-array. These are documented in the huge comment block, which are rarely good idea. Indeed, Why not write code that does not require comments? Here they could access the byte array's fields with descriptive accessor functions.
- eterm 12y agoWorking somewhere that scores less than 6 on the Spolsky Test I'm very glad for articles like this, it provides useful articles I can link to when I get asked what the point of these things I'm introducing are.