Feb 132013
 

I’d like a do-over of the last 24 hours, prefer­ably without any of the following:

  • My son hurt his knee badly at judo last night, which neces­sit­ated a trip to emer­gency until after 1 am. The doc­tors and nurses at BC Chil­dren’s Hos­pit­al are fant­ast­ic, but even so it took 4 hours, 9 pm — 1 am. Dur­ing which time our neigh­bour stayed in our house so the 6‑year-old could sleep in her own bed — thanks again Michel! He’s now on crutches with a knee-brace until he gets to see the ortho­paed­ic spe­cial­ists, which hope­fully won’t take too long. They’ll call us, we’re told.
  • The morn­ing after the night before was a bit of a bust, but I man­aged to get the 6‑year-old off to school on time. From which I had to pick her up again at 1:15 pm as she was com­plain­ing of an ear-ache.
  • And then the toi­let was plugged, com­pre­hens­ively. Who­ever came up with toi­let augurs did the world a service.
  • Of course, all this hap­pens while I’m in single-par­ent mode. I don’t know how those who are in per­man­ent single-par­ent mode cope. My biggest con­sol­a­tion is that I don’t have any major pro­jects cur­rently due, so tak­ing time to deal with fam­ily issues is not the prob­lem it would oth­er­wise be.

Can I have a nice, peace­ful, rest of the week, please?

Feb 062013
 

This goes into the ‘saves time’ cat­egory and is slightly too long to fit into 140 characters.

If you’re using XSLT on some XML file that has had a mis­cel­laneous his­tory and you see the error Illegal HTML character: decimal 146 (or some­thing sim­il­ar), don’t pan­ic or break out your hex view­er to try to find the ran­dom char­ac­ter that’s caus­ing the problem.

Get jEd­it instead. Open the file in jEd­it, and go to the menu Util­it­ies -> Buf­fer Options. In the char­ac­ter encod­ing drop-down, choose Win­dows-1252. The error message(s) will point you right at the offend­ing character(s). For added fun, repeat with ISO-8859–1 to flush out oth­er odd char­ac­ters that aren’t illeg­al, but may not show up cor­rectly depend­ing on your down-stream pro­cessing (lig­at­ures, etc.). Then switch back to UTF‑8 or whatever you need, save, and you’re done!

JEd­it also has decent XML fea­tures if you install the plu­gins, an added bonus.

Feb 052013
 

The latest Twit­ter pass­word hack did affect me, but for­tu­nately I had already switched to the one pass­word per site philo­sophy. I store all my pass­words in LinkeSoft’s Secret!, along with oth­er inform­a­tion that I want to keep on my com­puter and on my phone in an encryp­ted form. I just wish the Mac ver­sion synced with Android.

One bright spot in the issue was the fact that I did­n’t have to change any­thing in all my apps that use my twit­ter account, since they all have their own tokens, inde­pend­ent of my twit­ter pass­word. OAu­th is usu­ally said to be good since you can revoke access for any applic­a­tion at any time; this was the first time it became obvi­ous to me that the oth­er advant­age is that you can change your main pass­word at any time without need­ing to update any oth­er cli­ent. Can oth­er applic­a­tions that have web access and smart­phone app access please take note?

OAu­th is not neces­sar­ily the easi­est of pro­to­cols to under­stand, or imple­ment, but these days there are lots of lib­rar­ies out there that do imple­ment it. When I teach OAu­th at the XML Sum­mer School, I always recom­mend people use exist­ing lib­rar­ies if pos­sible, to let oth­ers do the hard work of debug­ging all the little details. Anoth­er thing I recom­mend is to get the O’Reilly book “Get­ting Star­ted with OAu­th 2.0” (full dis­clos­ure: they sent me a review copy) to under­stand the con­cepts. You need to know about vari­ous types of tokens and cre­den­tials, and how they fit into the multi-layered authentication/authorization pro­tocol dance for the dif­fer­ent use cases. Once you have a decent under­stand­ing of the con­cepts, then go and read the actu­al spe­cific­a­tion for the details. The spe­cific­a­tion has lots of inform­a­tion in it, but it’s immensely easi­er to under­stand if you already know how the pieces fit togeth­er, and that’s where the O’Reilly book is well worth reading. 

/* ]]> */