26 March 2014 / permalink
Before yesterday, The Oculus Rift was technofetish gear. It ceased to be so in an instant. [..] I used the shitty, old Rift, and I thought I was underwater. Think of every corner they had to cut because they were trying to make this thing in the finite realm of men. Now imagine the corners restored, and the corner cutting machine in ruins.

Penny Arcade - The Nexesse

20 March 2014 / permalink
“Spite-driven development,” declares Nicholas, the other two nodding immediately. I ask them to explain, and Daniel gives me an example. Let’s say he wants rabbits in the game – as the programmer it’s not really within his powers to make this happen. So, he says, he’ll use his poor artistic skills to draw something like a rabbit on the office whiteboard, take a photo, put it on his computer and crop it out, and put that square flat drawing into the game. On seeing this, says David with a look on his face that entirely confirms this isn’t hypothetical, he’ll be so horrified that he’ll be forced to draw a proper one to replace it.

It’s Time To Get Excited About Clockwork Empires | Rock, Paper, Shotgun. I HAVE NEVER DONE THIS MYSELF. EVER. PROMISE.

19 March 2014 / permalink
Different locales also return different versions of the same symbol. The US locale (en_US) returns a full-width ¥ symbol, where as the Japan locale (ja_JP) returns a regular ¥ symbol. Similarly, the French locale (fr_FR) will return a non-breaking space between the digits and the symbol, where as the French Canadian locale (fr_CA) which formats numbers the same way (“15,00 $NZ”, like above) uses a regular space.

Android Currency Localisation Hell - Adam Speakman

18 March 2014 / permalink
If you use an app that creates files in a proprietary format, as soon as a new version comes out you should update all of your documents to the new format. It’s not fun to do this, but there will probably never be an easier time. And it may be a lossy process, so you should also keep the versions in the older format.

Michael Tsai - Blog - This Presentation Can’t Be Opened Because It’s Too Old

16 March 2014 / permalink
Broken Unicode Assumptions

This is an utterly brilliant list of broken assumptions under Unicode from rjh. Perl-biased, but syntax aside, the majority of these are just generally true. A trimmed list of my personal favorites (but you should read the whole list):

  • Code that assumes it can open a text file without specifying the encoding is broken.
  • Code that assumes [any language] uses UTF‑8 internally is wrong.
  • Code that assumes [..] code points are limited to 0x10_FFFF is wrong.
  • Code that assumes roundtrip equality on casefolding [..] is completely broken and wrong. Consider that the uc(“σ”) and uc(“ς”) are both “Σ”, but lc(“Σ”) cannot possibly return both of those.
  • Code that assumes every lowercase code point has a distinct uppercase one, or vice versa, is broken. For example, “ª” is a lowercase letter with no uppercase; whereas both “ᵃ” and “ᴬ” are letters, but they are not lowercase letters; however, they are both lowercase code points without corresponding uppercase versions. Got that? They are not \p{Lowercase_Letter}, despite being both \p{Letter} and \p{Lowercase}.
  • Code that assumes changing the case doesn’t change the length of the string is broken.
  • Code that assumes only letters have case is broken. Beyond just letters, it turns out that numbers, symbols, and even marks have case. In fact, changing the case can even make something change its main general category, like a \p{Mark} turning into a \p{Letter}. It can also make it switch from one script to another.
  • Code that assumes you can remove diacritics to get at base ASCII letters is evil, still, broken, brain-damaged, wrong, and justification for capital punishment.
  • Code that assumes characters like > always points to the right and < always points to the left are wrong — because they in fact do not.
  • Code that assumes if you first output character X and then character Y, that those will show up as XY is wrong. Sometimes they don’t.
  • Code that assumes that ü has an umlaut is wrong.
  • Code that believes things like ₨ contain any letters in them is wrong.
  • Code that believes that given $FIRST_LETTER as the first letter in some alphabet and $LAST_LETTER as the last letter in that same alphabet, that [${FIRST_LETTER}-${LAST_LETTER}] has any meaning whatsoever is almost always complete broken and wrong and meaningless.
  • Code that believes someone’s name can only contain certain characters is stupid, offensive, and wrong.
  • Code that converts unknown characters to ? is broken, stupid, braindead, and runs contrary to the standard recommendation, which says NOT TO DO THAT! RTFM for why not.
  • Code that believes once you successfully create a file by a given name, that when you run ls or readdir on its enclosing directory, you’ll actually find that file with the name you created it under is buggy, broken, and wrong. Stop being surprised by this!
  • Code that believes UTF-16 is a fixed-width encoding is stupid, broken, and wrong. Revoke their programming licence.
  • Code that believes that stuff like /s/i can only match “S” or “s” is broken and wrong. You’d be surprised.
13 March 2014 / permalink
You can’t roll out a syrup-drenched waffle filled with bacon and eggs under the slogan “Live More”. You just can’t.
13 March 2014 / permalink
The Swiss will sell you a comprehensive, intimate knowledge of their country’s topography for an eighth of a million dollars. If nothing else, this shows how confident they are in their borders.

Going Into Detail | edgeca.se

9 March 2014 / permalink
[Python-ideas] Please reconsider the Boolean evaluation of midnight

It turns out that in January 1970, the UK government was in the middle of an experimental change to a year-round GMT+1 timezone. Some operating systems seem to be aware of that fact; some aren’t

Argh; time.

» [Python-ideas] Please reconsider the Boolean evaluation of midnight

7 March 2014 / permalink
Core Data is also a supported engine for iCloud syncing. It’s supposed to be no more complex than just using Core Data on its own, so imagine everyone’s surprise when it was just as complex as using Core Data on its own.

waffle → Hard Core

21 February 2014 / permalink
Eliminating stringly-typed code in Objective-C

It’s not so hard to write a script that puts your strings in compiled code and lets you avoid a whole class of bugs. After all, asset catalogs are just nested folder structures with JSON metadata, and storyboards are a pretty readable dialect of XML.

objc-assetgen takes your asset catalogs and objc-identifierconstants takes your storyboards and outputs a couple of small source code files that turn this code:

UIImage *buttonImage = [UIImage imageNamed:@"GreenButton"];
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"Cell with Switch" forIndexPath:indexPath];

into this code:

UIImage *buttonImage = [AppCatalog greenButtonImage];
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:AppStoryboardCellWithSwitchIdentifier forIndexPath:indexPath];

Square Engineering Blog

11 February 2014 / permalink
On the Office Coffee Pot

squashed:

Somebody is going to say something like, “Dan, lighten up. It’s just coffee. You don’t need to have so many feelings about it. Go out and change the world instead of fretting about coffee on the internet.” This will not be somebody who drinks much coffee.

4 February 2014 / permalink
We were having the staff play against other people. And a journalist — a game journalist, a Japanese guy — approached me and said, “Hey, check this out. I found this crazy Magic Throw with Guile.” And he showed it to me. When I first saw that, the first thing I thought was, “I have to quit. I can’t do this anymore. I think I’m gonna quit my job.”

— People taking bugs more seriously than I do on Street Fighter 2: An Oral History

31 January 2014 / permalink
Each Navigation Drawer hides a ViewDragHelper - Flavien Laurent

The best reference for working with Android ViewDragHelpers I’ve found. It’s still new enough that there’s not a lot of good stuff out there, but I learned a lot from this piece.

» Each Navigation Drawer hides a ViewDragHelper - Flavien Laurent

8 January 2014 / permalink
Say a new GPU comes out. We could ship them the new GPU, they take out the old GPU and ship it back to us, and they just plug in the new GPU," Razer CEO Min-Liang Tan told Polygon. "And at any point in time, the gamer will always have a tier 1 PC without having to worry about all of that.

I am ready to subscribe to a gaming PC | Polygon

5 January 2014 / permalink