propeller_beanie posts

Clock radios: can’t we do better?

20071213.thursday   comments=2   propeller_beanie  

Skimming through the story of a fellow that hacked together his own atomic clock in his basement (and used two of them to prove gravitational time dilation during a mountaintop holiday), I was struck by the very sorry state of our familiar home timepieces.

Exhibit A: the clock radio. These persnickety devices reached their design apex during the 70s. In all the time since, the only enhancements we’ve witnessed are a profusion of blue LEDs and iPod sockets. Meanwhile, we suffer:

  1. miserable timekeeping accuracy;
  2. terrible radio reception and sound quality;
  3. infarction-inducing buzzers;
  4. tedious and minuscule controls;
  5. nine-minute snooze intervals (why nine?);
  6. displays that render 0, 6, 8, and 9 almost identically; and
  7. poor or non-existent blackout protection (sigh).

In fairness, some of these grievances have been addressed in isolation. But given that so many of us use and depend on these contraptions at least five days out of seven, we’re left wondering how the free market hasn’t led us to a clock radio that satisfies our every desire:

  1. Radio clocks (not to be confused with clock radios) synchronize themselves automatically to government-broadcast atomic clock time signals. I am informed by a couple of local radio-frequency experts that these long wave transmissions do reach Whitehorse. GPS time coordination is another option, given an external antenna. A good quartz crystal backup is acceptable.
  2. We’re going to be plunking down more for this ideal clock anyway, so go ahead and equip it with reasonable audio and automatic station tuning.
  3. Replace the buzzer with a selection of soothing melodies that gradually increase in volume when the alarm goes off. A friend had a simple travel-sized Braun that did this.
  4. We have the perfect technology for controlling clocks: voice recognition. Announcing “alarm at six AM” is infinitely preferable to sliding knobs and pressing chords of buttons. Since setting the time is no longer an issue (see #1), the clock would only have to recognize a few common commands: “alarm”, “snooze”, “shut the %$&@ up”, and so on. Also, if the alarm is set for between 5 and 9 in the afternoon, maybe the clock should confirm that you didn’t instead mean AM.
  5. Configurable snoozes are a dream — so to speak — of mine. Just imagine being able to utter “snooze for half an hour” instead of having to whack the button three times in twenty-seven minutes. And I wouldn’t object to a power-nap timer: “alarm in twenty minutes.”
  6. A small LCD display (with ambient-light-sensing brightness adjustment) should be cheap enough these days. And if voice recognition is possible, how about a clock that answers your question with, “It is four o’clock in the morning. Two more hours until the alarm.” All in a soothing voice.
  7. A frickin’ battery should suffice; it might have to be a little bigger than usual to drive all of the necessary electronics. For some bizarre reason, my clock radio actually gains minutes per hour when running on battery. Obviously, the clock should re-synchronize when the power returns.

Now, how much would you expect to pay for this wonder clock? Wait. Don’t answer. What if I also said that it could beam the correct time directly into your cerebral cortex…

IT contracting opportunities at the College?

20071212.wednesday   comments=nil   propeller_beanie  

The word being whispered around is that the Computing Services department at Yukon College is under new — and surprising — management.

The little that I know about the situation is that said management will likely be searching for IT talent. Given my own experience up the hill, I’d caution against full-time employment, but contracting proposals may be in the cards.

(I’d better stop now lest I blow any chance of teaching there again.)

Passport Canada’s site developers make an all-too-common security mistake.

20071204.tuesday   comments=nil   propeller_beanie  

The word this chilly, chilly morning is that Passport Canada’s site exposes applicants’ names, driver’s licence numbers, and — the Holy Grail of the identity thief — Social Insurance Numbers to anyone wily enough to fiddle slightly with the mysterious letters and numbers that appear in the browser’s address bar.

This type of security weakness is well known and falls under the general heading of “injection“: entering unexpected values into a web application’s form fields or query strings in order to escalate privileges or reveal restricted information.

While simple enough to prevent, the design chinks susceptible to such injection exploits are difficult to identify. But, since the site has a valid TLS certificate, it looks secure enough to management (you may recognize TLS as the little padlock that appears in your browser — it’s necessary for security, but it ain’t enough). Kinda the same as habitually leaving your keys in the ignition, but slapping a car alarm decal on the window. The appearance of security is not security.

The fundamental problem, of course, is that applicants’ sensitive information is network-accessible: tough to have an online application process without that. Trouble is, once information reaches the Internet, it is never ever forgotten.

Q: What is programming like? A: Try explaining your TV to a house-sitter.

20071128.wednesday   comments=nil   propeller_beanie  

I am not often invited to cocktail parties. When I am, however, I inevitably face the “And what exactly is it that you do for a living?” question. I prefer to mumble something about “computers” and let the conversation die a quick, painless death. Just in time to refill my Saratoga Fizz.

Thing is, “computers” is a pretty big field, and my job is just one little slice of the spectrum. Cramming automotive engineers, chauffeurs, mechanics, and gas pump jockeys into a large box labelled “cars” is a reasonable parallel.

Programming — or “software development” when it’s salary negotiation time — is my chosen career. Unlike the doctor, the lawyer, or the exotic dancer, the programmer is not cocktail party material. The programmer offers few cocktail party-sized services: I can’t repair your printer, expunge your spam, or add decimals to your bank account.

So what is it that programmers do? Well, they convert general-purpose computers into dedicated-purpose machines by writing software, but that doesn’t tell you anything you already didn’t know.

Instead, if you really want a taste of what it is to be a programmer…write instructions to a house-sitter for operating your TV/VCR/DVD/Satellite/Stereo setup. Your instructions are the software, and the house-sitter is the computer: able to do simple tasks but not without specific direction and explicit context.

Operating my TV is a nightmare for the uninitiated. For example, to watch a DVD,

  1. Turn on the DVD player and insert the disc.
  2. Turn on the TV, set the volume to about 15, and press the Video button at the base of the set (it’s not on the remote).
  3. Turn on the Stereo and switch the input to AUX. Set the volume control about halfway (the TV speakers don’t work properly so the stereo is required).
  4. Play the DVD by using the controls on the squarish-edged Panasonic remote. Control the volume on the round-edged RCA remote. Don’t press the channel buttons or you’ll have to get up and press the TV’s video button again.

(Separate and different instructions are required for watching VHS tapes or listening to CDs. It is not currently possible to listen to the radio because the dog ate the antenna.)

Even given these instructions, it’s uncertain whether the prospective house-sitter will be able to watch DVDs. I’ve left out all sorts of information about locating the devices and associated buttons, restarting the system after power outages, and dealing with accidental resets of the universal remote. More instruction, more context, more explanation and correction of exceptional circumstances is clearly needed.

That’s what it is to be a programmer. Hence the Saratoga Fizz.

Here’s your damned Yukon Blackout Map Mashup.

20071114.wednesday   comments=7   north_of_60°/propeller_beanie  

This is yet another entry in the increasingly improbable Yukon Blackout Mashup & Feed Saga.

You didn’t ask for it, but you get it anyway: the [Sample] Yukon Blackout Map Mashup. It’s more sample than mashup, since I don’t actually have any Yukon Energy/Electrical data to play with. Instead, I invented a brief sequence of power fluctuations that afflict the Copper Ridge subdivision (at least the older bits of it that show up in Google Maps).

Blackout Mashup Screenshot

Not knowing what real data from the utilities might look like, I was forced to imagine that they might track blackouts, brownouts, and electrical surges. I also have no idea where the substation distribution boundaries are, so I just up and invented three of them that coincide with the neighbourhood/street-naming conventions on the Ridge.

In any case, the mashup is live and interactive, so click away on the “Step Forward” button to watch the scenario play itself out. You can also zoom and pan; same as the regular Google Maps.

I didn’t enable the option to view the map in satellite or hybrid mode though: for some reason the street view is wildly misaligned with those, although it does match up in the downtown. The regular non-mashed-up Google Maps doesn’t have this problem (it is consistently misaligned throughout, but only by a small amount).

Technical Details

Those that know me understand that the only reason this whole Yukon Blackout brouhaha exists is because I wanted an interesting reason to play with the Google Maps API. This has certainly fit the bill.

It took me a while to reacquaint myself with JavaScript, but the API examples helped me along. All of the mashup code is embedded in the page, so you can just View Source to see how it’s strung together.

To keep things simple, I decided against using a library like Prototype or JQuery, but I certainly would in future, for the iterator methods alone — raw JavaScript is a browser-dependent pain in the patoot.

Coming Soon: Yukon Energy Blackout RSS Feed

20071112.monday   comments=4   north_of_60°/propeller_beanie  

This is one more page in the Yukon Blackout Mashup & Feed Saga.

In response to my recent request, I received a note from Yukon Energy (YEC) that they’ve asked their site developers to add an RSS feed to announce planned power outages. I was cautioned that it may take a while to appear though.

I was also cautioned that the RSS feed may not be what I want anyway, since it is actually Yukon Electrical (YECL) that deals with power distribution inside Whitehorse; YEC handles generation and distribution to some communities. I guess it’s now time to prod YECL’s PR flacks.

My original quest for a blackout map mashup is less certain to be realized, by companies with “Y”, “E”, and “C” in their abbreviations, at any rate. Perhaps there’s another way…

On a related note, it’s an unnerving thing to drive down Hamilton Boulevard without the leading glow from street lights.

Programming Language Scrabble

20071105.monday   comments=nil   propeller_beanie  

We broke out Scrabble™ last night. While working through the permutations of my seven letters, I seemed to happen upon reserved words from various programming languages again and again.

Most programming languages have a set of these reserved words (a.k.a., keywords) that can’t be used by the programmer for other things that need names (e.g., variables, functions, classes). To do so would confuse the computer, in much the same way as Bill Clinton’s line “it depends on what the meaning of the word ‘is’ is,” confused the grand jury.

I wondered if it would be possible to play Scrabble with just these reserved words. I also wondered if it would be possible to be any more of a computer geek than I already was.

The Internet teaches us that none of our ideas are original. Sure enough, someone else had already proposed such nerdlike Scrabble variations. But Geektronica, as this fellow is known — apparently I do not reside atop the pinnacle of geekiness after all — did not follow his proposal through to its ultimate, if insane, conclusion.

To begin, I looked up the ten most popular programming languages as of November 2007: Java, C, BASIC, C++, PHP, Perl, Python, C#, Ruby, and JavaScript. C and its descendants seemed over-represented, so I tossed a few oldies onto the pile: FORTRAN, COBOL, Pascal, Smalltalk, and Prolog. Sadly, Lisp and Forth don’t really have reserved words.

I had once seen an offhand comparison of a language’s reserved word count to its complexity, and if the two truly are inversely proportional then we should all be programming in Smalltalk (if not Lisp and Forth):

Programming Language Reserved Word Count

(Different versions and implementations of languages have different numbers of reserved words. I just snagged the first count I could find. The chart was prepared with a nifty online tool — for kids.)

I then aggregated the lists of the fifteen languages’ reserved words, throwing out digits and punctuation marks, to arrive at a Scrabble-riffic list of 958 unique reserved words.

I didn’t bother excluding words that couldn’t possibly be formed with the game’s letter distribution (even with the blank tiles). There are also a few one-letter reserved words, which I believe can only be played on the first move of Scrabble: watch your opponents’ faces as you kick off a new game with “q” (from Perl).

It’s going to chew up a lot of RSS bandwidth, but I know someone will want the complete list:

abs, abstract, accept, access, add, address, advancing, after, alarm, alfa, alias, align, all, allowing, alphabet, alphabetic, alphabeticlower, alphabeticupper, alphanumeric, alphanumericedited, also, alter, alternate, and, andthen, answer, any, apply, are, area, areas, argc, argv, arithmetic, array, as, asc, ascending, ask, asm, assert, assign, at, atan, atn, author, auto, automatic, backspace, band, base, basis, beep, before, begin, beginning, bexor, binary, bind, binmode, bit, bits, blank, bless, bload, block, blockdata, bnot, bool, boolean, bor, bottom, break, bsave, by, byte, call, caller, cancel, cardinal, case, catch, cbl, cd, cdbl, cf, cfunction, ch, chain, char, character, characters, chdir, checked, chmod, chomp, choose, chop, chown, chr, chroot, cint, circle, class, classid, clear, clockunits, close, closedir, cls, cobol, code, codeset, collating, color, column, com, comma, commit, common, communication, comp, complex, computational, compute, comreg, configuration, connect, const, cont, contained, contains, content, continue, control, controls, converting, copy, corr, corresponding, cos, count, crypt, csng, csrlin, currency, current, cvd, cvi, cvs, cycle, data, date, datecompiled, datewritten, day, dayofweek, db, dbaccesscontrolkey, dbcs, dbdataname, dbexception, dbmclose, dbmopen, dbrecordname, dbsetname, dbstatus, de, debugcontents, debugger, debugging, debugitem, debugline, debugname, debugsub, decimal, decimalpoint, declaratives, declare, decode, def, default, defdbl, defined, definefile, defint, defsng, defstr, del, delegate, delete, delimited, delimiter, depending, descending, destination, detail, die, dim, dimension, directory, disable, disconnect, display, div, divide, division, do, doapplescript, donwto, double, doublecomplex, doubleprecision, down, draw, dump, duplicate, duplicates, dynamic, each, eall, echo, edit, eerror, egcs, egi, eject, elif, else, elseif, elsif, emi, empty, enable, encode, end, endadd, endcall, endcompute, enddeclare, enddelete, enddisable, enddivide, enddo, endenable, endevaluate, endfile, endfor, endforeach, endgrent, endhostent, endif, ending, endinvoke, endmap, endmultiply, endnetent, endofpage, endperform, endprotoent, endpwent, endread, endreceive, endreturn, endrewrite, endsearch, endsend, endstart, endstring, endstructure, endsubtract, endswitch, endtransceive, endunion, endunstring, endwhile, endwrite, ensure, enter, entry, enum, environ, environment, eof, eop, eparse, equal, equals, equivalence, eqv, erase, erdev, erl, err, error, esi, eval, evaluate, event, every, ewarning, exact, exceeds, except, exception, exclusive, exec, exists, exit, exp, explicit, export, extend, extends, extern, external, faccess, false, fcntl, fd, fetch, field, file, filecontrol, fileno, files, filler, final, finally, find, finish, first, fix, fixed, float, flock, footing, for, foreach, fork, form, format, formline, fortran, forward, fre, free, friend, from, function, generate, get, getc, getfileinfo, getgrent, getgrgid, getgrnam, gethostbyaddr, gethostbyname, gethostent, getlogin, getnetbyaddr, getnetbyname, getnetent, getpeername, getpgrp, getppid, getpriority, getprotobyname, getprotobynumber, getprotoent, getpwent, getpwnam, getpwuid, getservbyaddr, getservbyname, getservbyport, getservent, getsockname, getsockopt, giving, glob, global, globaldef, globalvalue, gmtime, go, goback, gosub, goto, greater, grep, group, heading, hex, highvalue, highvalues, hostname, httpcookievars, httpenvvars, httpgetvars, httppostfiles, httppostvars, httpservervars, id, identification, if, imp, implements, implicit, implicitnone, implicitundefined, import, in, include, includeonce, index, indexed, indicate, inherits, initial, initialize, initiate, inkey, inline, inp, input, inputoutput, inquire, insert, inspect, installation, instanceof, instr, int, integer, integeraddress, inter, interface, internal, into, intrinsic, intset, invalid, invoke, io, iocontrol, ioctl, is, join, just, justified, kanji, keep, key, keys, kill, label, lambda, last, lc, lcfirst, ld, leading, left, len, length, less, let, limit, limits, linage, linagecounter, line, linecounter, lines, link, linkage, list, listen, llist, load, loadexternals, loc, local, locally, localstorage, localtime, locate, lock, lof, log, logical, long, lowvalue, lowvalues, lpos, lprint, lset, lstat, m, makefsspec, makepath, map, member, memory, merge, message, metaclass, method, methodid, mid, mkd, mkdir, mki, mks, mod, mode, modify, module, modules, morelabels, motor, move, msgctl, msgget, msgrcv, msgsnd, multiple, multiply, my, name, namelist, namespace, native, negative, new, next, nil, no, none, normal, noshare, nospanblocks, not, null, nulls, number, numeric, numericedited, object, objectcomputer, occurs, oct, of, off, oldfunction, omitted, on, only, open, opendir, operator, option, optional, options, or, ord, order, orelse, organization, other, otherwise, out, output, overflow, override, owner, pack, package, packed, packeddecimal, padding, page, pagecounter, paint, paragraph, parameter, params, parent, pass, password, pause, peek, pen, perform, pf, ph, phpos, phpself, phpversion, pic, pick, picture, pipe, play, plus, pmap, point, pointer, poke, pop, pos, position, positive, present, preset, previous, print, printf, printing, prior, private, procedure, procedurepointer, procedures, proceed, processing, program, programid, protected, pset, public, purge, push, put, pwd, q, qq, quadruple, queue, quit, quote, quotemeta, quotes, qw, qx, raise, rand, random, randomize, rd, read, readdir, readlink, readonly, ready, real, realm, receive, reconnect, record, recording, recordname, records, recursive, recv, redefines, redo, reel, ref, reference, references, register, relation, relative, release, reload, rem, remainder, removal, rename, renames, renum, repeat, repeated, replace, replacing, reply, report, reporting, reports, repository, require, requireonce, rerun, rescue, reserve, reset, restore, resume, retaining, retrieval, retry, return, returncode, returning, reverse, reversed, rewind, rewinddir, rewrite, rf, rh, right, rindex, rmdir, rnd, rollback, rounded, rset, run, s, same, save, sbyte, scalar, screen, sd, sealed, search, section, security, seek, seekdir, segment, segmentlimit, select, self, semctl, semget, semop, send, sentence, separate, sequence, sequential, service, sessionid, set, setfileinfo, setgrent, sethostent, setnetent, setpgrp, setpriority, setprotoent, setpwent, setservent, setsockopt, sgn, shared, shell, shift, shiftin, shiftout, shmctl, shmget, shmread, shmwrite, short, shutdown, sign, signed, sin, single, size, sizeof, skip, sleep, socket, socketpair, sort, sortcontrol, sortcoresize, sortfilesize, sortmerge, sortmessage, sortmodesize, sortreturn, sound, source, sourcecomputer, space, spaces, spc, specialnames, splice, split, sprintf, sqr, sqrt, srand, stackalloc, standard, start, stat, static, status, stdclass, step, stick, stop, store, str, strictfp, strig, string, struct, structure, stty, study, sub, subqueue, subroutine, subschema, substr, subtract, sum, super, suppress, swap, switch, symbolic, symlink, sync, synchronized, syscall, sysopen, sysread, system, syswrite, tab, table, tally, tallying, tan, tape, tell, telldir, template, tenant, terminal, terminate, test, text, than, then, this, thiscontext, through, throw, throws, thru, tie, tied, time, timeout, timer, times, timestamp, title, to, top, tr, trace, trailing, transceive, transient, troff, tron, true, truncate, try, type, typedef, typeof, uc, ucfirst, uint, ulong, umask, unchecked, undef, undefined, unequal, union, unit, univptr, unless, unlink, unlock, unpack, unsafe, unshift, unsigned, unstring, untie, until, up, update, upon, usage, usagemode, use, ushort, using, usr, utime, val, valid, validate, value, values, var, variantstruct, variantunion, varptr, varying, vec, view, virtual, void, volatile, volumes, wait, waitpid, wakeup, wantarray, warn, wend, when, whencompiled, while, width, window, with, within, words, workingstorage, write, writeonly, xor, y, yield, zero, zeroes, zeros.

For added challenge, see if you can’t form both of COBOL’s spellings of the plural of “zero.”

Spambots Ahoy!

20071102.friday   comments=2   propeller_beanie  

Last I week I wrote about the hijacking of my e-mail domain by spammers. I happened to mention that the messages that were rejected by other e-mail recipients had been purportedly sent from the address qqxgobbledegook@yukondude.com. The “gobbledegook” that appeared in italics was meant to signify a random alphabet soup that followed the oddball “qqx” prefix.

Lo and behold, I received an e-mail this very morning addressed to a certain qqxgobbledegook@yukondude.com. It contained an offer of cheap replica diamonds and Rolexes.

Well that didn’t take long.

Obviously a spam harvester program — or, spambot — stumbled upon my posting and scooped up that address. Spambots are automated browsing programs that surf the web looking for anything resembling an e-mail address: this@that.theother. The addresses are collected and used to send enticements for the aforementioned ersatz diamonds, or other equally dubious products and services.

That’s why it’s never a good idea to publish your e-mail address on the web, at least in its unprotected form. Instead, websites that need to publish a contact address will use an image of the e-mail address, or a JavaScript-scrambled version, or a wacky spelled-out representation: for example, dave [strudel] whathesaid [full stop] ca. Eventually the spambots will grow smart enough to decipher those, but to date I haven’t received any spam addressed to my “strudel” account.

I also want a Yukon Energy Blackout RSS Feed

20071029.monday   comments=6   north_of_60°/propeller_beanie  

This is the second entry of the ever-growing Yukon Blackout Mashup & Feed Saga.

While waiting for my Yukon Energy Blackout Mashup (I sent a note offering to slap something together once provided with the data), I discovered that I’d also want the Yukon Energy site to expose an RSS feed for proposed future multiple power outages.

I was late to board the RSS bandwagon. At first it didn’t really seem all that useful. I have a browser after all, so I can just visit the site and read whatever is new. Why add another program or service to the mix? It wasn’t until I asked myself the following question that the true value of RSS revealed itself to me: What if I don’t want to visit the site?

Yukon Energy’s site is a site that I don’t want to visit. Why would anyone? It’s pretty enough — thankfully the designer persuaded management not to go with the official pink and blue colour scheme — and seems well laid out. Thing is, aside from contact telephone numbers and outage announcements (see below), it doesn’t contain any information of interest. To anyone. It’s chock-a-block with press releases and admissions of munificent corporate governance: many words, little meaning. It all smacks of a government-mandated exercise in “communication.”

(As a contrasting example of a site with no possible earthly mandate, I give you Cheechakos. Still online and still utterly wonderful.)

So if I don’t want to visit, why all the fuss? In short, the Planned Power Outages page. Like most, my business depends on an uninterrupted flow of electricity. Unlike most, I have servers running 24/7 and a blackout means that my entire internet presence goes dark: web and e-mail, mostly. That’s just something I have to accept, running my servers from the spare bedroom as I do. But it would be ever so helpful to learn of these interruptions in advance. Hence the RSS feed. I’m not likely to remember to visit Yukon Energy’s outage page every week, but I do check my RSS reader daily.

And once the outage info is in RSS format, then Alakazam Alakazoo! …mashup-ready data.

I want a Yukon Energy Blackout Mashup

20071024.wednesday   comments=4   north_of_60°/propeller_beanie  

Update: Yukon Energy Responds (see below). This is the first posting in what has become known as the Yukon Blackout Mashup & Feed Saga.

More than most, I am aware of power loss. Four Uninterruptible Power Supplies (UPSs) scattered throughout the house shriek like pinched banshees at the first hint of a blackout. (I keep one just for the VCR so that I don’t have to reset the clock.)

During the past summer at the College, we suffered a couple of outages on sequential weekends. Conveniently, the fellow who best understood the wiring and the backup scheme was Outside on vacation.

It seems as though Whitehorse has seen an increase in the frequency of these blackouts, ever since that chilly January Sunday of 2006.

But my evidence is purely anecdotal, and I generally know only of the outages that affect my house.

Inspiration struck: what if I could assemble a Google Maps mashup of Yukon power outages, with a timeline feature so that folks could see which areas have gone dark, when, and for how long? (This week’s map of the San Diego fires gives one an inkling of what is possible.)

Brilliant! All I need is a complete blackout history from the territory’s generating company, Yukon Energy.

Now, you may be surprised to find that Yukon Energy does not advertise its failures on its website. Yukon Electrical — responsible for power distribution and, apparently, streetlights — is no more forthcoming.

In trying to elicit this information from Yukon Energy, I made it no further than a PR flack’s voicemail. My ostensible cover was that of a Yukon College employee (true, at the time) trying to size up the institution’s UPS requirements in the face of future multiple power outages (pure fabrication, but it seemed a wholly reasonable request).

Upon his return, the wiring and backup fellow suggested organizing the various UPS owners scattered about town to submit their devices’ data feed to a central point that could bundle it all together to the same effect. I barely had the energy to call Yukon Energy, so that option probably won’t fly.

And there’s one more sticky little issue: the map mashup won’t work when the power’s out.

Update, Oct. 24

As you’ll see in the first comment, the “flack” to which I referred correctly chastises me for not giving Yukon Energy more chance to respond. Perhaps my mashup is possible after all. I’ll keep you posted.