What is "0xreadbook" in the context of a 32-bit int supposed to mean? Is the author just trying to be cute, or is this some sort of nonstandard representation of hexadecimal digits that I need to read up on?
It's a reasonable comment. I got to "0xreadbook" and found it rather difficult to continue. If you're trying to explain stuff, you need to get these things right. You wouldn't provide something like "LET STORE OF VALUE X CONTAIN LITERALLY 15 AS INTEGER" as example C code, right? Because it's not even C. In fact it's just nonsense. So I fail to see why "0xreadbook" is a valid example hex value... because it's not even hex.
Bizarrely, despite the author's apparent confusion about this basic concept, the rest of the piece seemed kind of OK, and he even got the hex representation of 1.f correct.
A much better example hex number is 0x12345678. Every digit is different, and it's actually a valid number.
I agree. This post isn't the best explanation and is riddled with grammatical errors that caused me to reread sentences multiple times. Regardless of the age of the author, if you put up a blog post that is supposed to explain a concept to other people, it needs to be well thought out and proof read.
Mike Ash is an excellent example of how to write blog posts about how things work
24 comments
[ 3.1 ms ] story [ 51.6 ms ] threadit just an example hexadecimal representation. Don't take everything so literally...
Bizarrely, despite the author's apparent confusion about this basic concept, the rest of the piece seemed kind of OK, and he even got the hex representation of 1.f correct.
A much better example hex number is 0x12345678. Every digit is different, and it's actually a valid number.
It's not hexadecimal, so what's your point?
Try 0xDEADBEEF,0xBAADF00D, or any constant listed here: http://en.wikipedia.org/wiki/Hexspeak
Nobody complains that r, o, y, g, b, i, and v aren't actual colors, do they? Other than you, I mean.
http://en.wikipedia.org/wiki/List_of_mnemonics
What does K equal in hexadecimal? Well, it isn't defined for hexadecimal. K=20 is only defined in Base 21 and above.
Other than me? Hah, nice cheap shot, pole ;-)
Edit: The 0x communicates that the mnemonic is illustrating base 16, so your objection below is not valid.
http://www.mikeash.com/pyblog/friday-qa-2012-11-16-lets-buil...
http://www.friday.com/bbum/2009/12/18/objc_msgsend-part-1-th...
Mike Ash is an excellent example of how to write blog posts about how things work