5 ms·
Me 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 th
by kyberias 12y ago
Me 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.