Monday, April 4, 2016

Style guide style guide

After looking over Google's style guide for shell scripting, I feel like I need to write up what should be obvious: the style guide for style guides. It's a common failing of coder culture that we think it's best to try to write style guide documentation as if it were code, being as explicit as possible and catching exceptional conditions where possible.

Unfortunately, the audience is not a computer, it's a programmer, and programmers do many things that computers don't:

  • Ignore large sections of prose
  • Discard the parts they disagree with
  • Become defensive
So, to avoid these problems, here are some simple guidelines along with examples from the Google document.

Saturday, March 5, 2016

Choosing a Unicode PIN

PINs (not "PIN number," please) are often chosen poorly. Among the most common PINs are "0000" and "1234"... in fact over 10% of PINs are 1234, seriously?! Your pin doesn't have to be weapons-grade-cryptography ready (it can't be, anyway) but it should be less guessable than Mel Brooks' luggage combination.

To that end, I present you with a most helpful resource: the Unicode PIN mappings. These are characters from the international Unicode set (the way computers store characters from nearly every language on Earth) that have a four-number representation that you can use in a PIN code. Since many Unicdoe characters either aren't actually characters (things like an umlaut that only have meaning when combined with another character, or "non-printing" characters like a non-breaking space which are used in formatting) I've pared the list down to just the ones that have some basic visual representation. Also, the codes for Unicode characters are most often (and here) represented by what's called "hexadecimal" notation, so I've removed all of the ones that contain letters in that representation.

What you're left with is pure gold for selecting and remembering a non-obvious PIN. If you ever forget your PIN, then a quick Google search for the name of the symbol plus "unicode" will turn it up in no time. A few examples from the big list:

! (EXCLAMATION MARK)  0021
⁇ (DOUBLE QUESTION MARK)  2047
™ (TRADE MARK SIGN)  2122
↑ (UPWARDS ARROW)  2191
☁ (CLOUD)  2601
☂ (UMBRELLA)  2602
✡ (STAR OF DAVID)  2721
け (HIRAGANA LETTER KE)  3051