News for hackers. Stuff that matters.
Re:Response to “Literate programming considered harmful” by Jtsummers on Wednesday August 31, 2016 @09:39AM (#12398188)
And the source code doesn't tell you why something was done. Why is this message expected to be only 42 bytes long or less? Is there a specification for it? I can see that someone grabs two adjacent bytes, pulls out 12 bits from them and puts them into a variable called "version":

  version = ((data[0] & 0x0F) << 8 | data[1]);
But why? Is this still correct with the current specification of the message format? Who knows! And this is a best case, where "version" is a meaningful variable name.
Re:Response to “Literate programming considered harmful” by catnaroek on Wednesday August 31, 2016 @10:35AM (#12398592)
My thoughts exactly.