Saturday, December 21, 2013

Learning Irish: a vague sense of cultural je ne sais quoi

I’ve been thinking about learning Irish again, but I’m not sure there’s any point. In fact I know there’s none. But that’s ok, most things we do are pointless, especially if you’re an IT Project Manager, and in fact scientists have yet to find a point to the universe, so I think we can let Irish off the hook there. Far from being a cause for despair though, I find the utter pointlessness of everything a reason to celebrate. So learn Irish, and enjoy it, and don't worry about the point. There's always a few good reasons for doing so.

I asked my good friend Noel, who grew up in Connemara, Ireland, what he thought about it.

"My mother was a fluent Irish speaker. Did it ever rub off on me? Not a chance. We went almost every weekend to the Gaeltacht (a place where people speak Irish as a first language) where my cousins lived, and everything was in Irish. I found it boring and uncool, but not because of the language. It was more because the people sat around drinking tea, it was usually overcast, and I was told to go outside and kick the ball around. So I’d go outside, kick the ball, and it would disappear behind one of the 2 million rocks scattered throughout south Connemara landscape."

"I hated going. I associated the language with boredom; it was totally useless and pointless and school just reinforced that. Which is why Irish in school has to change. Getting kids to learn a language they'll never need is hard."

Incidentally, years later the bold Noel met a beautiful Quebecoise who eventually became his wife. This time he had no problems learning a language (French), oh no. "I didn’t have much choice in the matter to be honest."

In my own case, well, my Dad was born and bred in Clifden, Connemara, and spoke Irish natively as far as I know, but never much at home to us kids despite us all having to do an hour of it in school every day. I have happy memories of spending a month in the summer of 1981 in the Ballyferriter Gaeltacht, climbing Mount Brandon, cycling around Gallarus and Kilmalkedar, the whole month speaking nothing but Irish under the watchful eye of the Bean an tí.

But that's a long time ago now. I’m ten years out of Ireland this month, and despite having spent the decade prior to that living in Connemara, until recently I hardly gave the language a second thought. But slowly, a language that I had ignored and even disparaged, like we’re trained to do by the way they teach it to us, has become meaningful to me and worth paying attention to. This is partly to do with the fact that I live in Australia, surrounded by non-Australians like myself, all with their own culture and language. Having become fascinated with some of the other languages on offer here - Greek, Spanish and Chinese in particular - I thought it high time I paid a bit more attention to my own linguistic background. But learning a language is a big thing: you better have a plan and some achievable goals, or like so many people half-doing Greek in a night course, you’ll be wasting your time, and come to associate the language, and maybe even yourself, with failure and wasted time and effort.

But what are the arguments for learning Irish?

The argument from utility

This‘ll be quick. So, is being able to speak Irish useful the way French is in Quebec? Let’s hear from the lad Mannion again: "I wish it was, I wish it was more relevant. In Quebec, learning French let me into a new culture, and I have more friends because of it - score! Whereas if I learn Irish I get to speak to - wait - more Irish people."

I doubt if there’s a living person anywhere who thinks learning Irish is "useful" in the usual sense of the word, so we can get that out of the way. It won't allow you deal with people that you couldn't have dealt with in English anyway, so no - it's about as useful as tits on a bull, as we say in Australia.

But the thing is: other than the language you use every day, no language is useful. I’m learning Spanish with some friends here in Brisbane (more below) and I love it. I read novels in Spanish, watch movies while trying to ignore the subtitles, and listen to the Cadena SER Spanish podcast on the way to work. None of this is useful to me whatsoever. I've only ever met one person here who couldn’t really speak English well, so we more or less talk in Spanish, but I only know him through my Spanish class gang so I wouldn’t even be talking about it had I not decided to learn Spanish in the first place. Despite the vast numbers of hispanohablantes, Spanish speakers, in the world I personally have never had to read anything in Spanish I didn’t want to. Yes, it was obviously handy on my recent trip to Spain, but once again one of the reasons for my visit to Barcelona and the Catalunyan countryside was to speak some of the Spanish I’d been learning. And even there, they’d rather you spoke Catalan than Castilian.

Same with Greek. I have an extended Greek-Australian family here, some members of which really only speak Greek, which makes family get-togethers somewhat bewildering for me. In that case surely Greek is useful. Nope. They can all speak as much English as they need to to get on with me, so there’s no need for me to have spent the last year doing Greek night classes, like I did. I did it out of curiosity, out of a love of languages, not because it was in any way useful.

You don’t learn languages because you need to, unless you’re moving to a country whose language you don’t speak. If I was one of those bloggers, great though they are, who have the annoying habit of writing important sentences in bold because they don’t trust their readers to be able to tell the difference between the point and things merely leading to the point, like Scott Hanselman or Jeff Atwood, I would have put that last sentence in bold.

So the utility or lack of it of Irish is completely irrelevant.

The argument from a vague sense of cultural je ne sais quoi

The reason I got to thinking about all of this in the first place is because gradually over the last few years I’ve found myself becoming more and more appreciative of those people I met - Columbians, Greek-Australians, Mexicans, Chinese, Iranians, and Russians who had their own distinct language and culture, and preserved it, to greater or lesser degrees, here in Australia. And sadly, it dawns on me that as an Irishman, I’m not doing the slightest thing to preserve mine, what little I have, given that I didn’t speak Irish day-to-day at home or have a very Gaelic type of upbringing.

This can be hard to convey to people at home, not because they’re amadáns, but because in my experience it can take years before you feel this way. Noel again: “Here in Ireland, there's no need to assert one's Irishness, which is why the language, apart from the fact its on the way out, is not used. I'm not sure how many young people actually speak it in the Gaeltacht regions. Even when I am there, and I try to speak Irish to my cousins, they immediately switch to English because they hear I'm shite.” Sounds like they need to read my last blog post, 'Speaking each others' language'.

“I guess it's part of your cultural identity if you choose make it so, so if you enjoy doing it, take pleasure from it, and it gives you more of a sense of identity, then I'd be all for it. And I suppose in other English-speaking countries, it's hard to get away from the Paddywhackery, all the St. Paddy's Day and Guinness guff, so the language is the only thing that is true.”

(Actually, I’m not sure if that’s true though. That quintessential Irish good-time word, “craic”, isn’t all it’s cracked up to be, apparently. It’s actually - gasp! - English: it’s just become a bit paddyfied recently, in the last twenty years. “The word first appeared in English, was translated into Irish and then reintroduced to its parent language as a bogus conduit to Celtic authenticity.” If you watch Ros na Rún, which I’m wont to do of an evening with the tablet on the couch, you’ll hear a lot of borrowed English and American terms, so mother Irish isn’t as virtuous as you might think. She’s been seeing other languages behind our back. I personally regard that as a good sign, as all “living” languages do the same.)

CODasGaeilge! If we had stuff like this instead of struggling through Peig, there'd be no Irish language crisis nowadays. Speaking of which, I wonder if he does any Crysis walkthroughs, as Gaeilge like?

But Noel warns against this cultural, feel-good reason for learning: “I would explore my real reasons for doing it. It has to be more than, well if the Greeks do it, the Latinos do it, then we should have our own too. Of course, in addition to the language there's the great literary history, it'd be cool to read literature in Irish, because meaning is lost and changed when it's translated, and I think there's a huge amount of value in that. So if only for anorak-y historical reasons, and learning the language is a by-product of that, then that would be a valid reason, because translated texts just don't have the same meaning.”

I was going to dismiss this reason as highly unlikely until I remembered that last time I was at home a couple of months ago I did root out a Pádraic Ó Conaire book of stories that my Dad got me years ago. As Noel points out though, quietly studying Irish texts in your bedroom isn’t “wearable on one’s sleeve as much as spouting a cúpla focail”, which is fair enough. I don’t want to be a Celtic poser, but I do want to have a bit of crack with other Irish people, so, again, you have to work out why you’d be going to all the trouble.

Here’s a third reason, one which I actually think may be the strongest yet.

The argument from friendly opportunism

As well as being an excellent source of interest-free microloans, friends can reveal to you hitherto dormant interests, if you let them. When Karl returned from a year in South America, he was singing the joys of Spanish, and remembering that I had studied it years before (I mean it - 1987!), he cajoled me to start speaking it again. So, despite being more than a little rusty, I went along because - hey, hanging out with friends is never a bad idea. Next thing you know we had a Colombian friend, Sandra, to guide us and our Tertulia española had begun. Since then my interest in Spanish has just been getting stronger.

In fact, the Spanish thing kickstarted a personal language renacimiento with me. It was nothing I’d planned, ‘twas totally unexpected. The study of languages had long been swamped by my fascination with the internet, both on a personal level and of course by my need to keep a career in web development going. But here I was, studying the subjunctive and going over the irregular verbs in Spanish. All because Karl had decided to go to El Cono Sur for a year. That’s the best explanation I have for it. Our lives are just a series of contingencies, so as long as you have the flexibility to avail of good opportunities when they arise, you'll never be predictable. I had a ready source of fellow hispanohablantes to hand - we’d meet once a week in a café before work - still do, more or less - and I thought as I sipped on a large flat white listening to Karl and Sandra plan the next camping trip up the Sunshine Coast en español, pues, of all the reasons I can think of to get into a language sure this isn’t a bad one at all.

Another friend, Davida, back in Ireland, has gotten into the ol’ Irish in a big way, so when I met her recently in Dalkey I found that interesting and inspiring. Funnily enough Karl never let it go either, so again, through the friendnet, I found myself being drawn back to stuff I hadn’t touched in 30 years. 30 years!

Because I like making astronomical analogies, I Iiken it to the gravitational slingshot effect that spacecraft get when, like the spacecraft Juno on its way to Jupiter for example, they use a planet’s gravity (in this case, the Earth) to build up momentum and get them where they’re going faster and more efficiently. I’m using the gravity well of my friends’ interest to propel me like a slingshot somewhere I’d probably go anyway, but faster now with their help. This friend-based reason, unlike the utilitarian one, makes much more sense to me. But for some reason, it’s not one that occurs to people when they ask you why you’d want to learn a language.

Wrapping it up

“At that end of the day, who's going to be speaking Irish? You'll just be trying to speak it to your fellow Irish people, to others listening, who are not participating, and they will be just ah, yeah, cool - Irish - but then you'll have converse with them in English. Unless you start a cloister.”

I should probably say that for all my facetiousness about the pointlessness of everything, learning a language takes time, so that matters a lot. There are no shortcuts, no free lunches. There are heuristics, but the thing is you have to learn them, and remember when they don't apply as well as when they do. You hear a lot of stuff about how some people are really “good at languages”. Well, those people have spent a lot of time learning those languages, whatever their innate linguistic ability. I don’t really buy that “good at languages” thing. If you’re interested in them you’ll readily spend the time to learn them, but precious time you will spend, in abundance.

So I’m not really interested in learning Irish to a fluent Gaeltacht-resident level. As if I could anyway. No-one working in IT in Brisbane needs to spend that much time and effort. I do however think it’s worth getting to the stage where you can have a bit of an ol’ chat with some heads in some class (type, or kind, here meaning level of expertise, not an actual organised class with a teacher - we use the word ‘class’ like that in Irish English) of Irish, read some RTÉ Nuacht to a decent level of understanding, watch Ros na Rún and have some idea about why yer one just bought Gaudi’s cafe. Things like that. Rudaí mar sin. You could even watch Battlefield 4 walkthroughs as Gaeilge if you're a gamer.

It's not all or nothing - I intend to learn enough to get me by with others who are like me - Irish people who want to speak a bit of Gaeilge, maybe at an lower intermediate level - that'd do me. Same with any language I'm learning. Enough to get by, no difference there. And there's about as much point in doing Irish as there is doing any other language.

Friday, December 6, 2013

Speaking each others' language

"Some cafés in the central arrondissements - especially the 6th - have more customers reading the International Herald Tribune than Le Monde, and waiters who will immediately address you in English." - "Paris Revealed" by Stephen Clarke.

A weird exchange

"Καλημέρα." (Hello)

"Yes please."

"Ένα φραπέ παρακαλώ." (A frappé please)

"Sugar? Milk?"

"Ναι, με γάλα και λίγο σάχαρη, ευχαριστώ." (Yes, with milk and a little sugar, thanks)

Places frappé on counter. "Three euros fifty please."

Counts out money. "Τρία και πέντε... Ευχαριστώ πολύ." (Three fifty...thanks a lot)

"Thank you."

One person in this exchange is talking Greek, albeit inexpertly, and the other is talking English, albeit inflexibly and robotically, part of their tourist coffee shop routine. I'm the one essaying some Greek, to someone who is presumably a Greek, in Greece. But they insist on replying only in English as if I hadn't bothered. I say presumably, because of course they could actually be Italian, Uzbeki, or even German. In any case surely they can conduct that simple exchange in the language of the country in which we both find ourselves. If I can they can. So why don't they?

If cyberspace is the place where a telephone conversation seems to occur, as the man says, then what’s the space called where you're in this kind of a conversational situation with someone. It deserves to be named. I call this type of exchange Language Crosstalking, where A speaks B-ish to B who responds in A-ish. I don’t know if there’s an official name for it. In any case, it's a strange linguistic and cultural no mans land to find yourself in.

Until recently, I used to feel like I should defer to the hotel receptionist, waiter, or barista who refuses my opening language gambit, obstinately sticking to English in the face of my friendly overtures to speak the local tongue, their tongue. They work here, they know what they're doing, they're seasoned performers, who, if they come across as condescending in their refusal to meet me halfway, are probably simply trying to avoid a misunderstanding. The waiter who can speak 3 or 4 European languages on hearing my poor attempt at Greek knows I could, for instance, mix up λουκάνικα (sausages, loo-KA-ni-ka) with λαχανικά (vegetables, la-ka-ni-KA). They're busy turning over a lot of tables on the square or the main strip, serving Germans and Dutch, English and Irish, Russians and Poles, usually through English (or at least Globish).

The beautiful old town of Nafplio, where an unfortunate incident of crosstalking occurred.

The men who score for Greece

I say 3 or 4 languages but that may be selling some of them short. In their determination to prevent you from enjoying your evening’s perambulation the restaurant Kamaki guys (these are the hustlers who importune you at the boundary of the restaurant, strategically placed beside the menu pedestal) seem to leave no language stone unturned. Once, strolling through Πλατεία Αγίου Μάρκου (St. Mark's Square) in Zakynthos with my family we got hit on by this guy outside an Italian restaurant. "Where are you from, my friend?", walking with us, shaking my hand, the full Monte. I wasn't giving an inch, keeping quiet as he rapidly iterated through the list of nationalities known to visit the island, saying a few words in each language with no success, until he ran out of options and gave up at the edge of the square.

"I'm Irish", I said, thinking I'd schooled that guy in long tail economics. His face lit up. "Conas tá tú? An bhfuil tú go maith?" Jaaayysus, he can speak better Irish than me. I halted our entourage, turned around, we got a table, he got his sale, we ate pizza, we took photos and were happy. I didn't even speak any Irish back to him - the truth is that at this stage when it comes to the cúpla focal I'm rusty as an old Zetor up a Cleggan boreen, and I'd hazard a guess that that those few phrases were about all he knew too - but he had communicated to me metalinguistically, and it worked. We were going to eat somewhere, so why not there.

When you have a couple of choices about which language to use with someone, the one you pick says a lot about your relationship and your intent towards that person. If I try a little Greek in Greece, I might say one thing and mean another:
  • "Ένα φραπέ παρακαλώ." I know you think I'm just one of the tourist herd, but I'm not, I'll have you know.' or
  • "Κάνει ζέστη σήμερα." See? Speaking some Greek here. Respect!

And when they answer in English, it might be:
  • "That’s three euros fifty." I know you think you've made some soulful connection to Greece by learning to speak a few phrases, but you’re just another tourist to me.
  • "Milk? Sugar?" I'm still off my face from partying at Bad Boy's till 4 that I’m not even registering what language you’re speaking. All I know is you want a coffee. Or something.

There are of course cases though where the cross-talking is benign: I don’t mean at all to imply that there can only ever be a mischievous agenda behind it. On our way home from Zakynthos, we stopped for a couple of days in Nafplio, staying at the excellent Hotel Kastello. At breakfast when I tried talking to the friendly owner in Greek - he was asking us what we wanted, coffee, bread, etc - he answered me in English. Έλα φίλος, don’t crosstalk me! When I asked him, in a charming way I swear, why he was answering me in English, he apologised and admitted that like me, he used opportunities like these to improve his English. Even, apparently, if they are talking Greek to him. Fair enough.

Maybe it’s just a phase (transition) you’re going through

Seriously, I think it’s an inevitable stage you have to go through learning a language. I get it here too with my Hispanic amigos. I have enough proficiency to be able to communicate with them alright, but not to understand everything that’s said back at me, so my hispanohablante contertulios (participants in a tertulia, which is an artistic - or in our case, language study - get-together) might switch to English for my benefit, bueno, that’s ok. But now which language are we all speaking? The conversation is an unstable state. But it might actually be metastable, 'next to stable'.

Under normal circumstances, the flow of traffic on a road slows down to maintain a stable state to accommodate the crush of drivers at busy times of the day, or on a stretch where conditions have changed. But apparently a state of 'metastability' can exist where people don't actually have to slow down if everyone keeps their nerve and drives perfectly. Think of Google driverless cars keeping up the maximum allowed speed, packed bumper to bumper. It's a hyperefficient state, but extremely precarious. And it's not to be confused with instability as it could in theory last for a while. Unlikely though, as it's highly sensitive to the slightest change, in which case the whole thing collapses back to a stable state, in the case of traffic probably via a pile-up. Water freezing, and other systems which undergo phase transitions exhibit the same behaviour.

So I liken this language crosstalking to a physical system in a metastable state. It's a wildly silly metaphor, of course, but the fact is that conversations can happen in different states. Most of the time they're stable; both people speaking the same language. But in casual multilingual conversational situations you can find yourself talking in a way whose state is best described as metastable. In theory, if both parties are happy to do so, you can go on crosstalking for a while. But to me at least it feels like you're going further and further out on a limb. It's a land with no laws - if a disagreement starts, for example, which language do we switch to? Or do we just cross-thrash it out? Probably not: any bump or nudge is likely to restore monolingual stability.

And so, as long as I'm the perpetual intermediate stage with Spanish, French, and beginning Greek I can expect to find myself in a lot of these situations. Undaunted, I will press on in the conversation in (crap) Spanish, French, or Greek. And they'll like it. Because I understand conversational metastability can persist. You just have to keep your nerve.

Wednesday, November 6, 2013

On Asking Really Stupid Questions on StackOverflow

"There’s no such thing as a stupid question." As the proud author of several stupid questions immortalised on Stack Overflow (no, I’m not going to delete them) I can tell you that that’s a good example of the "Hey, deep down we're all equal, right?" fallacy. No we’re not, yes there is such a thing, and that’s a good thing.

StackOverflow (SO) is a truly great repository of stupid questions and answers, indubitably the main one for programmers. At this stage there’s hardly a thick question that isn’t there. And if it isn’t, in two minutes you can put it there. Like I did with this one: "How can I run an MVC app as a class library?" Answer: you can’t. Despite spending 18 months on an MVC3/4 project at my last job, when I fired up an MVC app at my new job I failed to notice that the project was a class library, not a web application, something I never had to worry about since practically the inaugural week of that previous project. I just presumed that since that was the way I found it in the new place, it must be right. Well it wasn’t, as I found out when Smudge202 told me so in a comment, correctly assessing that the situation was quite a silly one, and didn’t merit a proper answer.

Was I suffering from inattentional blindness? Maybe, maybe I just needed to ask the rubber duck. When John Donne wrote "No man is an island", giving us one of those selectively applicable great quotes from history, it’s clear that he never worked as a contractor in a government IT departmen, surrounded by people who weren't programmers. Here in my current job, I have no-one to ask when I get stuck on something. Except SO, that is. About one in every three of my jobs ends up being lighthouse duty, as I call them.

Flickr photo
FlickrIt's been a long week.

Like the time I worked in Mineral House, George St., surrounded only by business analysts, project managers, content specialists, and fridges to full to put my sandwiches in. In desperation I posited this stupid question one quiet suicidal afternoon: "Where are my WCF client constructor overloads?" The clue is in the comments I made to the question ("Long day. Just me here. Needed another pair of eyes."). However, despite the mortification I felt when I found the answer, myself, I got a couple of upvotes for this one. Strange, I thought, but it clearly resonated with others in the same boat. Maybe not such a stupid question. And anyway, what's the harm in posting a dumb question on SO? You use up other people’s time, and that's it. But so what? They’re unemployed, or bored at work, or simply rep-whoring. I’m outsourcing: isn’t that what we do in IT?

You might say that being so tied to SO's apron strings reinforces learned helplessness. But there's an interesting thing about stupid questions though. Even the most ridiculous among them isn’t stupid at the time of asking, as long as it’s an honest request for information. It’s only after you find out the answer that you might feel the question was a silly one and experience a strong desire to unask it. But the cat’s out of the bag, and the horse has bolted. Hell, maybe the chickens have even come home to roost. Thing is, you had no way to know that until you asked it. And you should never be made to feel that you shouldn't ask a question. There’ll be plenty of time for that once you get married.

Now I’m not going to beat myself up too much - I’ve asked some good questions, and got some points for my questions. "How can I preserve lexical scope in TypeScript with a callback function?" is a good question which I really needed answered, and I got a great answer. What I am suggesting however is there should be a healthy stupidity ratio to your questions on SO, or by extension, just within your team - maybe 1 in 5 - of "dumb" to smart questions. If not, I suggest you're being anally retentive, hanging on to it too long. Just as my grandmother didn't trust people who didn't drink, I don't trust people who don't ask stupid questions every now and then.

Reputation-induced paralysis

If you’re worried about the effect on your reputation (your real one, not your Stack Overflow one) of asking a silly question, then you’re stupider than the guy who asked this question: "How to connect to local instance of SQL Server 2008 Express?" Imagine not knowing that you have to select the Client Tools Connectivity checkbox during the rather long and complicated installation process. What a schmo. Anyway, don’t worry about your reputation: you need an answer, you don’t need a reputation. You can always delete the question anyway. The most important thing is that you get past the obstacle that is holding you up. You will always get blocked by things that were, in retrospect, stupid. You can waste more time than you need to trying to work it out, which is stupid, or you can ask a really stupid question, which is smart.

It should be clear that I’m not talking here about 'seemingly naive, but actually hard and heroically necessary'-type questions, the sort that people are afraid to bring up because they think it’ll make them look stupid, but actually are great questions, like, "Ahem. Since we’re going to be sailing through water containing icebergs, are we sure that we have a good way of avoiding them?", or "I’m sure you've all thought about this, but what happens if some of those people can’t pay back the money they owe the banks? Where does that leave us?"

No, oh ho no, I mean the mundane, 10-a-penny, ordinary, pedestrian, no guts and certainly no glory questions that make up the bulk of your day. Stupid questions like this one: "Where is the C# language specification located?" where the guy even ends up apologising for it, hoo hoo! You're blind to something. It's the one thing about the framework that everyone knows, but you never actually learned. So you ask the question. You make yourself vulnerable, but you get an answer. Maybe the answer, as disposable as it seems to everyone else, opens a hitherto unnoticed epistemological door to some aspect of computer science that you never realised, allowing flowers of understanding to suddenly blossom in the lush, green valley of your worldview, making you a better and happier person. Or maybe it'll be like Seinfeld, where the characters don't learn anything from week to week, and make the same stupid mistakes over and over. Hopefully the former, naturally. But you still have to ask the question.

Saturday, September 21, 2013

Time-to-market is the real magic of digital photography


In 1994 I got a new SLR camera (single lens reflex, a fancy one in other words) and went to Paris with Andy to use it. We stayed in Paul's place in Rue Vieille du Temple and went out separately every day to walk the streets and be photographers. I'd get through 3-4 rolls of black and white film a day, inspired by the photos of André Kertész. Andy was more of a Cartier-Bresson man.

Hanging around places like the Rue de Rivoli, the steps at Montmartre, the neighbourhood of Goutte d'Or, I would choose a composition with signage, buildings, and shadows and wait for people to walk through it. The juxtaposition of geometrical forms and human movement really turned me on. This was the height, the very acme of art. It's funny to think of it now, 19 years later, but at the time I lived for those street mise-en-scènes. Sometimes I surreptitiously photographed Parisians as they walked by, angling the camera up, shooting from the hip. I got busted for this once by a gendarme and was piously admonished. Mais monsieur le flic, it's a public street, I can photograph what I want. Not that I said that: in fact I faked an apology in French and went on my way. I'm an aesthete, not a revolutionary.

Flickr photo
FlickrAndré Kertész. Paris,1929.

Of course, I had no way to see what I had shot from day to day: I was 'shooting blind'. What I was doing was very hit-or-miss, mitigated by a lot of repetition ("bracketing", in the terminology), a lot of pressing a button and hoping something came of it. All I had to show at the end of each day's excursion was an extra couple of used rolls of FP4 in my bag and some stories to tell Andy in whatever bar we'd have a late one in. Not too late, though: Paul was a working C++ programmer and didn't need two Dubs waking him up as they fell in the door of his 3rd arrondissement apartment.

After about 5 days Andy flew home, and I took a train to Brussels to hang out with Gav. By the time I got home to Dublin and got around to developing the film it would have been about 2 weeks since Paris. That was just the film. It would have been another few days before I had an actual 10"x8" black and white print in my hands.

So, from the instant of capturing a decisive moment in Paris to actually being in a position of showing tangible evidence of that moment to a friend, a hell of a lot of moments would have passed, possibly two or three weeks' worth. This time delay is what I call the time-to-market of the photograph: the amount of time before you can show someone else - anyone - your photo. Their attention, their reaction, maybe even their wild approval, is the marketplace you want your goods to be at. And the longer the time-to-market, the less anyone is buying. For certain types of photograph anyway.


In 2013 I went to Dublin with Tina, Alex and Eoin. We stayed in Mum's place and went out most days to walk and take photographs. Standing on Killiney Hill, looking out over the bay, I took the photo above and had it on the market in seconds. The markets I'm interested in are the Australian one (where I live, and where the friends I want to be able to see my photo live) and Ireland (where I was, and where my family is). I had market feedback in the form of likes and comments within minutes, as I remember, as I should: it's a damn fine picture. Immediate social approval is magic. It's what we all want, and now we have the devices and networks to expedite it. It's interesting to think that that's effectively what a camera has become, a device to shower love and thumbs ups on its user.

And yet you could be forgiven for thinking that what really matters with consumer digital photography nowadays is a property called "the number of megapixels" because of the persistent marketing of that property. I have a largely unused digital camera with a higher number of megapixels (14) than the camera I almost always use instead, to wit, my HTC phone (8Mpx). Because who cares? The picture is only going to appear on a screen anyway, and it is infinitely more relevant to my, and apparently most other people's, photographic purposes to be able to transmit our photos over the net to other people (Flickr, Facebook, Instagram), to be automatically backed up (Dropbox, Google+), or just MMSed to friends.

This is all very obvious

once you know the answer. I remember reading "In Our Own Image", at the dawn of the digital photography revolution ('92), a book about the coming digital photography revolution, which places the (often undetectable) manipulation of photographs as the evil magic we need to watch out for. Granted, this book is more concerned with photojournalism than candid, facebook piss-up type of snaps. But I just don't think the fact that photographs can be easily manipulated matters nearly as much as the speed'n'ease of distribution of those photographs, the time-to-market. That's the sleight-of-hand we should be looking at. We're being misdirected by irrelevant stuff like megapixels and touch-ups.

Look at the photo again. It's among my finest snaps, and if for no other reason than this photograph I'm glad I had kids. But it's a couple of months old now. Knowing that it was taken seconds or minutes ago on the other side of the world, as it was once possible to do, is the magic. Imagine seeing it in Australia. The kids might still be there in that heather-scented moment, gazing out to the south as their shutterbug father told them to shut the fuck up and do. The shadow might still be pointing in the same direction into the corner of the frame. The same clouds drifting dreamily by. This, my friends, is the magic of digital photography. Megapixels are forever: real magic is fleeting.

Friday, July 5, 2013

Prepaid mobile plan? Don't forget the APN

Four years ago I used my Windows laptop, two years ago my Android tablet, this year my HTC One X smartphone. I'm talking about going away on holidays and surfing, writing, managing photos, all the things you might find yourself doing on a 6 week European break. Each time I go away I get by on less and less, because of course tablets, and now phones, have become so powerful.

This year we did Spain for two weeks, Ireland for two, Greece for two. And in each country I bought a SIM card from one of the main networks with enough data to allow me a modest amount of Internet access from my phone. Foursquare checkins, Google+, Twitter, and Facebook updates, a bit of the Guardian and The Irish Times, Google Maps, some Memrise and Duolingo practice (now they both finally have Android apps).

Despite working in IT and being used to rapid advances in tech, it's only when I get away to Europe biennially that I really feel like getting down on my knees and thanking the gods of modern telecoms. I like their work. You have to have experienced the frustration of trying to get things done in a Greek resort hotel guest computer (where to surf the Web you might have to do some general Windows troubleshooting first) to appreciate the embarrassment of riches (generous data allowance as standard, ubiquitous WiFi) we all enjoy today.

Ok, all is still not well in some beach bars (in Zakynthos island, where I stay in Greece) it has to be said. At half-time in the Lions vs. Australia game recently I thought I'd give my mobile data plan a break and use an actual desktop for a while. Put in my €2, the screen came to life, oh sweet jeebus it's Windows XP or something, anyway it's IE6 and that was the end of that. The first, the very first site I visited took one look at the browser and - maybe because this was Greece - went on strike. "Oh dear, your browser is no spring chicken..." announced I managed to hustle my €2 back but I was shaken.

But overall, things are good. For the price of a freduccino in a taverna you can usually avail of the house WiFi. You may have to strategically position yourself within line-of-sight of the house's router due to seismological considerations (in Taverna βαρδιόλα, a favourite of mine here in Lithakia, Zakynthos, the owner boasts of his earthquake-proof 60cm-thick walls). But hey - you're on holidays! Things, the Earth's crust for instance, are different here!

There is one thing, however, that I'd like to talk about that may catch you out if you bring your phone abroad. It caused me a problem in Spain, and still wasted a small amount of my time in Greece (I was on to it by then). That's the issue of APNs.

An Access Point Name (APN) is the name of a gateway between the mobile network and the net, so it's kind of important. Upon arrival in a new country, when you go to get set up with a SIM card you'll need to manually set up an APN (on my phone it's in Settings > Mobile data > Access point names) for the mobile provider you've signed up with. Without it you can make calls and get SMSes, but you won't be able to connect to the net to surf or use your apps, etc. So, clearly something you need.

But you won't be surprised to find out that this information is not universally known to those whose job it is to know it. At least not to the Movistar guys in Eixample, Barcelona, who let me leave the shop mystified (them and me) as to why I couldn't get net access. In Movistar shops they have an expert's corner, el rincón del Gurú, to help the likes of me, but sadly the Eixample guru was awol that day so I was referred to their Plaça de Catalunya superstore. On entering which I learned the minimum wait for a Gurú would be 90 minutes. At that stage it would have been quicker to attain enlightenment with a good old-fashioned guru up a good old-fashioned mountain.

I didn't really mind going to the Plaça - we would have gone there anyway - but we were beginning to traipse. This ill-defined activity, usually performed with children and a long-suffering significant other, sucks the lifeblood out of holiday magic times involving as it does pointless, tentative detours and digressions to achieve some ridiculous goal. And it was ridiculous, I belatedly realised, because I am a guru: I work in IT, I know my phone, I've done this before.

I had to manually enter an APN the last time I was in Greece and set up my Android tablet to get net access. Damn it, I know what the problem is. I didn't need no stinkin' Gurú, I just needed WiFi, which I could get back at our flat. All I had to do was Google "Movistar APN" and I'd get the 4 or 5 data (the APN, its name, MCC, MNC...) I needed. Which I did, whereupon I was connected.

In Ireland two weeks later the guy in Meteor did this for us as part of the set-up, but in Greece two weeks after that, dealing with Cosmote, we lost a little more time due to the APN issue again. I put this down mainly to the fact that our dealings with the Cosmotians were in Greek, naturally enough, which I don't speak nearly well enough to intervene in the set-up process, and I hadn't come up with strategy I now recommend: once the SIM is working in your phone, go to the nearest WiFi-enabled café and get the APN there.

Don't bother wasting your time asking them in the shop, it can only suck up more time. Time spent in a mobile phone service provider shop is called purgatory: time spent in a chic café people-watching, frappé-quaffing, and experiencing real IT satisfaction by sorting your phone out - you, yourself! - is holiday magic time.

Monday, May 13, 2013

Language learning as a game, with Duolingo

You're in a tight spot: you've battled for a few minutes to get this far only to be pinned down by three paramilitaries with machine guns. Low on health, you shootdodge your way out using bullet-time. Looks like you might have made it to the next checkpoi... aw SNAP! you're taken out by an enemy on the sidelines you didn't even notice. Back to the last saved point once again.

Fact: Max Payne 3 is loosely based on Duolingo.

What's the hardest part about learning a language? Mastering French pronunciation? All the masculine, feminine, and neuter business you get with, say, Greek? Is it the weirdness of Chinese tones? True, these are all hard things, but I have found one of the hardest parts with language learning has now got to include the crushing feeling of frustration felt when you crash out of a Duolingo test on the last question. That sheer feeling of anti-climax, repeated enough times over plenty of lessons, made me realise that what I was doing was playing a game - a computer game, to be specific - as much as learning a language.

So what's Duolingo? It's a language-learning website started by Luis van Ahn and others: it's what he spent his MacArthur fellowship 'genius' windfall on apparently. I found out about it a few months ago and have been using it to practise French and Spanish (with a little German on the side). What I'm interested in here though is the way the site has prominent game-like aspects. You progress through a skill tree for a particular language, starting with the basics and ending with more difficult stuff like the past subjunctive, say. In each skill you might have about 5 tests (although some have up to 20), and in each test you have 20 questions. You're allowed 3 wrong answers in a test before you fail it and have to start again. The overall tree uses a progressive revelation model, whereby you have to master earlier skills to be allowed do subsequent ones, like unlocking levels in a Cut the Rope level pack.

With apologies to the article translation section, the heart of the site seems to me to be the skill test, composed of 20 questions, which is really a game. The screenshot above shows me failing the last (that's why the green progress bar is full) of the 20 questions, when I had no hearts left. Which just means I had already fluffed three questions before that, and three was the limit. I may have answered 16 correctly, but for my mistake in thinking that "il frappe la balle, et but!" meant "he kicks the ball and scores!" I got no points. For the entire 20 questions. In terms of learning, which after all is the whole point, it hasn't been a waste of time - far from it in fact, as up to that point I'd been hearing, reading, and writing French for the past 3 or 4 minutes. But in terms of the game, it's exactly like having Lara Croft fall off a ledge and having to go back to the room she was in 4 minutes ago, to face some tricky jumps and kills all over again even though she's already done them. Frustrating.

Memrise is another (mainly) language learning site with a fair amount of gamification. But when you do a 20-or-so-question test - or in the vernacular of Memrise, when you plant, harvest or water the stuff you're learning - you can still complete a session despite failing all the questions. You mightn't get any points, it's true, if you failed them all, but you do get points for any answers you got right. It's not an all-or-nothing proposition. (Incidentally, the number of questions depends on a few things in Memrise - you might only get 4 questions, or you might get more than 20 - it's not as deterministic in that way as Duo is). And there isn't that growing sense of desperation you experience on Duolingo as your last heart drops away, and you have to be very careful with every subsequent answer. Then, concentrating on the past subjunctive of penser - "to think", you write la instead of le elsewhere in the sentence. "No, no, you don't understand", you shout, "the question wasn't really about whether problème is masculine or feminine, it was really about the correct translation of the part with 'she would have thought...'! And anyway, I already know that problème is masculine. I was concentrating on the other thing!" Despite the fact that you may well have typed out 16 long sentences in French you get Nul points.

The sheer frustration of failing on or near the last question in a skill test reminded me of Max Payne 3; that, and all the Portuguese. That's when I thought - this feels exactly like a game! In that game I'm stuck at a point where I can't shoot, stab or bomb my way out of a situation, and there's no interim save point. So I end up repeating it over and over. And sadly, it means I've more or less given up on ol' Max. I wonder if there are any Duolingers in the same boat.

How else exactly is it like a game? Here are a few aspects, ranging from very high-level right down to finer details, of using Duolingo that resemble playing a game, specifically a computer game.

Overcoming arbitrary obstacles of your own making: at a very high level, games are not something that you have to do. Filling in your tax form is hard too, may involve several attempts before getting it right, and ultimately may feel rewarding to have finally finished it, but you have to do it so it's not a game. If you didn't have to do it, one could imagine it being a game, simply because some people think fishing is a good basis for a game, so it's not out of the question that filling in a tax form could provide some people with a good gaming experience. But generally speaking, learning Spanish on Duolingo is not necessary, it's more like a game.

The possibility of failure: again, at a high level, if there was no way to fail then this wouldn't be a game. If Duo moved you on to the next part of the course no matter how badly you answered the previous question, then ironically it would probably be much less popular and certainly would be a less effective site, because people learn that questions of this nature have to involve failure and reward.

Competition with others: You can friend or follow other people on Duo, and it seems that the only purpose of that is to have them appear on the scoreboard ("Leaderboard") on your home page. You can't message them or otherwise do anything, so the message is clear - you are choosing competitors. But it's an asymmetrical competition: just because you choose them they don't have to choose you. It's more like choosing a pacemaker in a race. Either way, that is a really strange thing. It is taking two things that are not normally associated with each other: competing and learning. Why should learning a language have anything at all to do with competition. But if I'm honest it makes sense. As far as the score goes, I want to crush my "friends", pound them into the dust and humiliate them. Some days that's just what learning a language is all about. Hey, don't blame me, I'm just responding to incentives here.

You don't normally learn a language like this. Sure, you get examined on your ability at university or school, but on an ongoing basis there isn't much competition. I've done a couple of evening language classes in my life (Spanish, and currently Greek at St. George's) and in those circumstances not only is there no real competition to speak of, but it's exactly the opposite: the pace normally slows to accommodate the weakest people in the class, which is a loss for everyone except those people. Competition in learning is a very strange thing really. In fact, this whole wretched blog post is me trying to come to terms with why on earth learning should be even remotely like a game. Maybe it's always been there: maybe we've just all become used to the mechanics of gaming so we don't see it. But I see it.

Strategies: a common scenario is to get a couple of questions wrong early in a difficult test. At this point you have a choice: faced with the likelihood of flunking the test in ignominy and shame, you might just cut your losses and restart it. You don't want to waste (ok, you'd be learning all the while, it's true) a couple of minutes, odds stacked against you, when you could just go again with no cost. The game doesn't penalise you for doing so. On the other hand, having lost 3 hearts early in the test to then persist against the odds and snatch victory from the jaws of defeat on 'Verbs: Past Subjunctive' is to know great glory and kudos: it is a great Duolingo moment.

Addiction. Say no more.

Rewards physical virtuosity: You might have a good ear for French, but how fast can you type it? Can you touch type? These skills are also being assessed in the timed rounds. If you have 3 seconds left on a timed round and you have to listen to "En faisant manger des légumes aux enfants, ils vont découvrir un nouveau type de nourriture." and type it in French, typing speed matters, not just your ability at French.

Chance: You fail a test, you do it again and pass. Are you suddenly much better at Abstract Objects? No, you were luckier this time round. The rugby ball, so to speak, bounced into your hands as you hit your stride this time instead of away from you into touch. Like coming from behind to win at backgammon by rolling two sixes, you can cruise through a skill on luck alone. Well, to a degree, but you know what I mean. The questions are selected at random from a pool, and this randomness is a crucial element of games of chance. Not chess clearly, more like backgammon.

Earning, or 'Unlocking': as I mentioned above, this is like the way with Cut the Rope you have to pass a level to play subsequent ones. It's a bit more sophisticated than that on Duo, but that's the idea.

Artificial time constraints: There is no need for Duo to challenge us to answer in a timed practice round, but it's great fun. A hectic sprint through 'Infinitives 2' sorts the men from the boys and can lead to a few exhilarating, near-death moments. Incidentally, it's in this timed game that I feel that Duo is actually breaking the rules somewhat. As people have pointed out already the timer should stop for the interim after the player has responded and before the next question is presented. I have a slow connection sometimes and it kills the game for me to see the countdown tick away without being able to do anything. It feels like someone's cheating. Speaking of cheating...

Cheating: I'll admit it, I've cheated doing one or two tests on Duolingo. But in my defense, it was because the latter stages of the French tree are riddled with mistakes and/or omissions. I know this because I submitted translations that I was marked wrong on that I thought should be allowed and they were duly accepted by the team, which in itself is a fantastic credit to Duo, and makes up for the errors. I have enormous sympathy for a team trying to build something as sophisticated as this, but at the same time I was impatient to spank French and I found the only way I could get past the arbitrary translations of some of the later skill tests was to write down what they wanted and paste it in on subsequent attempts. I knew the answer, but their normal flexible ambiguity-resolution-machine was kaput. If I hadn't done so I would have been reduced to rote remembering the exact phrasing of the correct translation - none other would do, it seemed - and I guessed this was just a temporary failing which would soon be fixed. Again, this was a case where I felt that Duolingo was not playing by the rules, and it was only with some reluctance that I temporarily changed the rules of the game: I cheated.

Well-defined end: one thing I don't like with Memrise, which is similar to Duolingo in many ways, is that they don't make as clear-cut a distinction between finishing a course and still doing it. Duo does, although when I finished Spanish I gotta say I expected more than the "You finished Verbs: Conditional Perfect" - ¡I just friggin' finished Spanish, hombre! Games have well-defined endings, and it's nice to see that Duo the owl now makes an appearance at the end of a skill tree. Stuff like that matters.

One recent development that is actually ungamelike - but which I think is genius both in terms of gameplay and in terms of reflecting what actually happens to your language ability - is the slipping over time of your mastery of a skill. I say ungamelike because I don't know of any game where this happens: if I go back to Max Payne 3, Civilization 5, or, any games I won or accomplishments I achieved months or years ago are still there. I say genius in terms of gameplay because that simple change dragged me back in to play more just when I thought I'd finished Spanish, and it keeps me doing French too, now that I've competed that tree as well.

When are you actually learning a language?

You might say doing stuff on Duolingo is not really learning a language. You are just going through screens, answering questions that are in the form of a lesson in a particular language and getting points and colours as you proceed. Maybe so, but it's better than some of the ways I've had to learn a language in my life which in retrospect were dire, and worse: no fun. To me it's more like revising a language. Many activities such as having a conversation with a friend in Spanish, or watching Jean de Florette are not "learning a language" either, but rather having a chat or watching a film. Learning a language is just an aggregation of loads of little things you do, most of which are probably not "learning a language".

Originally I didn't think I'd use Duolingo to learn a language from scratch, but I have found that the site is done so well, and the points scheme and division into skills are so compelling that I'm actually going to use it to learn a few words of Italian for the first time. The game is so much fun I just want to keep playing. Apparently I'll soon be able to do so on my HTC One X (Apple users have had this privilege for a while). I just won't know which apps folder on my phone to put it in: the languages one with Google Translate, Babbel, and Pleko, or the games one with Chess, Cut the Rope and Cogs!

Update: by the way, naturally enough I created a new discussion linking to this post on Duolingo iteslf, so if you're at all interested you might want to contribute to that discussion or at least see some of the comments there.

Tuesday, April 30, 2013

Why use TypeScript?

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript, and generates "a semantic subset of JavaScript: the subset that makes sense." - Anders Hejlsberg.

How jeezus many bog-awful JavaScript massacres do you have to see in your life before availing of a gilt-edged opportunity to improve?

When I first heard about TypeScript sometime late last year, I couldn't see the point in it. It isn't one of those indispensable technologies where the only choice is which among competing alternatives to choose, like what database you'll use, or source control system, or issue tracker. Ok, issue tracking isn't, strictly-speaking, necessary. And there are certainly places still operating without source control to speak of, so, maybe not the best example there either. And while we're at it you can get by without a database (in the conventional sense). Ok, so nothing is necessary. You generally get them though, right? At least I haven't been successful in avoiding them in the last 5 years or so. But since TypeScript appears to be seriously optional, you've got to ask yourself one question: “Do I know enough about this exciting new language to make the right decision about whether to use it or not?” Well, do you, punk?

Just ask Anders

Alright, so why does the great Anders Hejlsberg think we need TypeScript? "JavaScript has gone through explosive growth over the last 5 years or so. The fact remains that writing application-scale JavaScript is hard. It was never designed to be a programming language for big applications. It lacks some of the structuring mechanisms you need like classes, modules, and perhaps, interfaces." Not to mention static-typing.

In any case, the idea of using a JavaScript generator isn't new - people were already using Google's GWT or Script#, but apparently (I haven't used either) those frameworks are very different to the JavaScript that they generate. "You were always at arms length from the JavaScript". These quotes incidentally are from the introductory Channel 9 video I wrote about in my post "Getting Started with TypeScript".

I don't know about your circles, but in mine we pay attention to Anders. Despite my skepticism I made myself watch the video, and was pretty much converted straight away. I had just finished reading “Javascript Patterns” by Stoyan Stefanov and was full of the Joys of Pattern, so I recognised a good idea in TypeScript when I saw one. Here was something that was going to whip up some elegant yet solid code, that to me looked familiar from Stefanov's book. Working with TypeScript would be like having +Addy Osmani on your team. Working pro bono, mind!

A linguistic digression

If you're into languages, you can really appreciate the beauty of a native idiom. Occasionally I participate in a French Conversation group whose members meet on Saturday mornings pour bavarder un peu. There's a natural tendency to use flat, word-for-word swaps for phrases or words you don't know, such as the time I was chatting to a guy there and he kept saying "basicament, je..." as in "basically, I...". If you know French, you'll know that you can get lucky turning English adverbs into French ones by sticking a "-ment" at the end, like professionnellement or linguistiquement. But a more idiomatic French way of saying "basically", to my ears at least, is au fond, "at bottom", which I subsequently found. In fact I can't find basicament in my French dictionary of choice. What's all this got to do with JavaScript? Not much to be honest. In fact, I'm surprised you're still reading. What is this, French class?

But seriously, apart from the aesthetics of the matter, writing idiomatic JavaScript is important. Why? Well, it's a bit like using patterns - for example, apart from being the accepted technique for newing up classes and especially derived classes, using the Factory pattern and using the actual word "factory" to name your classes sends a clear message to other devs as to your intention. We're all part of the same culture.

And so if you have to do something difficult in JavaScript like create an inheritance chain, by doing it using TypeScript you can signal your intent very clearly. You can still do this outside of TypeScript (because obviously it just compiles to JavaScript that ultimately is independent of its progenitor code) but it's hard to see what's happening unless you're Stoyan Stefanov, or at least someone familiar with the ways to simulate inheritance in JavaScript. I've read the book: inheritance in JavaScript is not that straightforward, and you don't often see it for that reason. With TypeScript pumping out beautiful idioms from easy to understand keywords and constructs, your JavaScript flows like it's always been your lingua franca, ta langue maternelle.
class Derived extends Base {
    // Derived-specific stuff goes here
Stating your intention explicitly is especially important when it comes to private members, since there is no intrinsic way to provide private properties in JavaScript, whereas you can do so easily in TypeScript, all the time generating idiomatic JavaScript. You can emulate private methods using closures, it's true but again, why not let TypeScript do the dishes?

Shannon River, Limerick 1
'Shannon River, Limerick 1', by HKJen

Type inference flows, flows like the mighty Shannon.

One of the most useful things about TypeScript is its type inference capability; normally, once you go a few levels down into methods, it's hard to see what type (string, function, bool) some variable is supposed to be, calling as it does this method, which chains to that function. It's implicitly, or passively, obfuscated. Type inference is where TypeScript infers (if you haven't already explicitly stated it) from your code what the variable types are. And if anything, in the other direction it's even more useful. That's where if, for example, you create a strongly-typed interface for an object because you'd like to know, at compile time please, whether you mistyped or left out any of the property names on the object. On its own, JavaScript sure isn't going to tell you.

Can't you do all that stuff in JavaScript anyway?

On its own writing JavaScript in Visual Studio isn't going to gives you a warning at development time if you make a mistake; you'll just get a broken app at run time. But assuming no mistakes, yes, you can write clean, idiomatic JavaScript manually of course, but let's be honest here: you rarely see it. Sure, once you realise where TypeScript slots in on the stack you realise that it isn't actually enabling something that wasn't already possible in a good old .js file using crappy ol' good ol' hand-rolled ol' JavaScript like our fathers wrote, and their fathers before them. Meanwhile, in the real world, where the pedestrian and convenient trumps the heroic and possible every time, people (yes, even decent, hardworking devs like you and I) put off using constructs in JavaScript that are routine in C# like namespaces, interfaces, method overloads, and indeed classes despite being possible (at least in their effect) in JavaScript. Why? Because they're hard to achieve, and that's enough to stop people doing them.

So, yes, one can do all the things manually that TypeScript gives you automatically. For example, you can simulate inheritance and have code snippets on standby whenever you want to create an object that derives from a base object. But it'd just be boilerplate code, there's hardly any expressive potential there, so why not automate the ugly (in JavaScript terms) business of inheritance and just let TypeScript do that for you? Function overloading is another pretty tricky aspect of programming in JavaScript: in fact it's not really supported out of the box. To achieve 'overload resolution’ you'd just have to resort to silly pseudo-overloads with slight variations in the name just to get around that limitation, which is no way to live your life at all.

How much is that framework in the window

So, for me at least, the decision to adopt TypeScript into the project was made about 6 months ago, but what would its cost be? Integrating a new framework, or language - whatever you want to call it - into your workflow, into your app, can be expensive, so the question is: how dear is it to integrate TypeScript? Well, naturally, you have to install the TypeScript plug-in, that's the first step. Despite the fact that it's not necessary you'll also want to get Web Essentials, which you have already, right, because how else do you do any LESS?. So, we’re not going to count that. And then, yes, you'll have to learn TypeScript. But it's an extremely shallow learning curve, believe me, so the cost of learning it is de minimis. By my calculation, we have totted up barely any cost so far. Let's keep going. Oh wait, that's it.

Things to come

Have you ever heard the phrase about how the future is already here, it's just not evenly distributed? Truly some walk among us who already live there. Be one of them. Modules are a good example of language changes coming in ECMAScript 6, so by using TypeScript you're getting a headstart, apart from the fact that again, you save yourself handwriting a lot of boilerplate code. Likewise, TypeScript classes are aligned with the ECMAScript 6 proposal for classes, and indeed everything in TypeScript is following the moving ECMAScript 6 standard, so that there's good enough reason to consider a move to TypeScript.

Forget the future

But if I'm realistic - and God knows I try to be - I chose to use TypeScript because of the help it would give me right now, not in some distant future scenario. It has frequently amazed me (each time a little less so) when working with plenty of fine developers to notice how little respect, attention, indeed love, is afforded the JavaScript layer of an app by people who would be aghast to see an MVC controller action out of place for example, or a duplicated call to to a method in the service layer, or a slightly inefficient use of SQL, and so on. Things are inexorably changing for the better, but nowhere near quickly enough, and the impression I get from a lot of senior developers is of otherwise very houseproud people showing you around their new place, check out the kitchen tiles, look at the new deck out the back, ensuite in the master bedroom of course; but the first place you see, the hallway, is a total mess, uncared for, unswept, with shoes and bags strewn over a threadbare carpet. It makes no sense. Forcing yourself to adhere to TypeScript to create your JavaScript and forcing - I mean, persuading by reasoned argument - your team to follow suit, is my recommendation to address the parlous state of your JavaScript layer.

Sunday, March 17, 2013

Twitter anti-patterns #2: Where's the beef?

Respect your twitter feed, and even more important, respect the humble link.

Ah Zakynthos, flower of the levant, beautiful isle of the Meditteranean, how I miss thee! How it frustrates me that I only get back to visit thee biennially, and must make do in the interim with websites, and those spectacular 18-month calendars you get in the tourist shops with azure-sky beach photography, to cheer up my drab study at home. How nice it would be follow a Zantean (adjective for Zakynthos) portal site like Go Zakynthos on Twitter and, I don't know, maybe be alerted to the occasional new album of photos or something. Or read a quick précis of some story posted on the site, if it could be made to fit in a tweet, which it usually can.

But sadly, maybe because of cutbacks and austerity measures, most of Go Zakynthos tweets contain nothing except a link. And not a meaningful link either, one you can read, like for example where the nostalgic office-bound IT worker could at least choose to click through based on an expectation of what was about to appear in his browser. Oh no, these links look like this: Why would you click on that link? You could be rickrolled (it's probably 'nickrolled' in Greece, actually) for all you can tell from the URL, right? And I've noticed that plenty of other people do the same in twitter, posting cryptic tweets consisting of a sole meaningless link.

Approaching Shipwreck beach, Zakynthos
"Approaching Shipwreck beach, Zakynthos" taken by me in 2009.

Somewhere in the last few years, it became more important to many people to do things the Twitter way and break the web than do things the correct way. That sort of '' link is almost utterly opaque. I say almost because I'm guessing the 'fb' domain means it's a link to facebook. And indeed it turns out that it is. Huzzah: a crypto-facebook twitter link! Only if that link didn't actually resolve correctly, and was actually a broken link, could this mess be any more knuckle-headed and fucked. You only need to shorten a link if you're going to fall foul of the 140 character limit! Why, if all that's in the tweet is a link, do you need to break the web and make an opaque URL? The final facebook URL (the link actually turns into a link en route. Of course it does.) is nowhere near 140 characters.

Even if you insist on abbreviating and obfuscating the link, which I've heard a friend say he does with to get reporting, you then need - you especially then need - to say something about what the link is about. With a meaningless and link, the tweet becomes the explanation for the link. It doesn't matter how interesting the destination page ultimately is: I have no reason to click through if it makes no sense on its own nor does the person explain to me what the link relates to. So the double-whammy here is that there's a meaningless link AND no accompanying content to at least give the tweet some meaning. Where's the beef?

This isn't about crossposting

In general, I think crossposting is a good thing, as long as it's manual. I'll be crossposting this to Google+ and LinkedIn. Actually I might leave LinkedIn, since semi-coherent rants like this aren't related to my professional alter ego. But I'll certainly be posting it to Twitter, with a brief description of course, since I actually think it's a good idea to give people a reason to click on the links I bring into this world.

I suspect the cause of empty, opaque-link, spammy tweets is auto-crossposting, with some setting in facebook generating this logorrhea. To the extent that the facebook settings section is somewhere most of us would not willingly go, I slightly sympathise. But not much. Nowadays it behoves a chap or chappess to pay attention to one's social media hygiene. Especially with hundreds of followers. LinkedIn actually disabled the auto-crossposting from Twitter to their site using the #in hashtag, and a good thing too. Likewise Google+ has held off from allowing write operations on their API lest that site ends up like Buzz did, a place crossposts go to die.

Oh yeah, let me just hit that follow button.

Or reimagining norms

Neither do I think I'm not getting how twitter is changing the norms of the web, or about how young people 'reimagine' hyperlinks in ways irrelevant people like me don't understand. There was a great moment recently in This Week in Google where Leo (Laporte, the father of the internet) was saying how his daughter and all her friends only use hashtags to label and caption their photographs on Instagram instead of plain ol' words, even when those hashtags mean nothing and an ordinary sentence or phrase would do. Leo saw this is maybe just how 'young people' are using the web. As in, gee, maybe we don't get it. Young person, and budding curmudgeon Gina Trapani was having none of it, explaining to Leo that as far as she was concerned this was no more than a misunderstanding of how hashtags work, or are supposed to work. Her exact words were: "get off my grass". Wonderful. Youngsters shmungsters. Twitter shmitter. A link is a link, and the last time I checked Twitter was a website. Links are supposed to be legible and indicative of what they link to.

I'm tired of Twitter - I hardly use it any more. My Google+ follower count passed my Twitter one a while back, reflecting the increased amount of time I spend on the plus. With the imminent demise of Reader though I may find myself pushed back on Twitter. I don't want to be negative: I'd actually love to follow Go Zakynthos on Twitter - it's a nice, colourful site, and it would be a great way to be casually reminded of what's going on in Zante from the convenience of the twitter client which is on my phone, tablet, heck even my new TV. Same with plenty of other potential followees. But loads of them misuse twitter like this. Don't they check? What do they think it looks like to a user? Do we need to round people up and send them back to web primary school?

Day 1: the link.

Twitter anti-patterns #1: The sound of one hand tweeting

Sunday, March 3, 2013

Windows 8: a touching experience

Boom! I went straight from Windows Vista to Windows 8 with an All-in-One touchscreen to boot! And these are a few initial impressions.

Yes, I leapfrogged over Windows 7 from Vista to Windows 8. Even went full touchscreen. I just went in one morning over Christmas, no research done, nothing, and bought a Toshiba LX830 All-in-One +Windows 8 23" HD LED touchscreen desktop in Harvey Norman. I got home from Garden City with this touchy-screeny-feely thing, and no idea how to use it. A frisson of excitement, such as I hadn't felt since getting my first PC, a Gateway 2000 Windows 95 Pentium 90 in October '95, coursed through my veins. Plus, I was ahead of my work set-up (Windows 7). I don't know about you, but that just plain tickles me. I hate getting home from the office and dropping down a level.

First of all: with an All-in-One - I don't know what to call it; whether there's a generic term - there's no box (as in the actual computer box), no separate speakers, and no webcam: it's all packaged up like Nuget. My life, or at least my desk, has become drastically less cluttered. One thing to consider though if you're a gamer, and aren't we all nowadays, is that with the All-in-One you're not going to be able to upgrade the motherboard or graphics card, which just leaves the RAM. I upgraded the standard 4Gb to 8Gb for an extra $50. Speaking of games, those that are touch-enabled, like Civilization 5, suddenly become a different experience. I fired up that venerable old warhorse, and got a splash screen showing how I can now marshall my troops, move the camera, and generally act out my Napoleonic fantasies using touch, which really brings the game alive.

"Left-hand side: tasks; right-hand side: charms"

Knowing as much about Windows 8 as I did about pigeon fancying, I bought a book. But that's just because I like books. If you really want to know about Windows 8, a good place to start is +Scott Hanselman's "The Missing Windows 8 Instructional Video". Incidentally, Scott uses the "Who moved my cheese?" meme as a metaphor. I wish people would stop with that corny old shtick. Have you actually read the book? (It's not getting a link from me.) It did the rounds at work recently, and having read most of it I can safely say it has all the profundity of a 5-year old who thinks it's great that he can fart out loud. And all the self-regard, sadly. Trust me, right now I'm something of an authority in the matter of proudly flatulent 5-year olds.


Anyway, the video has Scott H's customary suaveness, but doesn't deal with touch. It does however, make the excellent point that rather than download an app for Twitter, etc., as you'd normally expect to in any appy environment like a phone or tablet, you should probably use the 'People' Windows 8 app (you see them described as fullscreen apps as well as Windows 8 apps) which, if you wire it up correctly, becomes a social media aggregator much like the Windows Live Messenger client did (Microsoft have now retired that in favour of Skype).

Incidentally, if you're on Twitter, tweet something - anything - using the hashtag #Windows8 and you'll probably be rewarded with a follow from ^Helen at Windows Australia who's on it. She'll actually help you out, like she did with a question about sharing that I had. And the weird multilingual problem that arose too - more below.

Apps? I don't need no stinkin' apps: this is Windows!

With the new apps, a swipe-up from the bottom (or down from the top) is the same as an old-school right-click, bringing up the context menu. And apps are easy to uninstall, as the uninstall option appears with the swipe-up from the bottom: no need to go to Control Panel -> Programs and Features, or Start/Programs/(find program)/uninstall (if an option). It's like how on a phone you install an app, use it for a week, forget about it, and uninstall it a while later with a minimum of fuss. Apps are transient fellow voyagers on the bus-ride into the future, getting on and sitting beside us for a couple of stops, and then as quickly alighting again. Now available in Windows 8.

Windows 8 makes it très facile to be multilingual: I can't get over how easy it is to change keyboards. The word ¡Z大Ωçé你Ñψ?, which means nothing obviously, took a very short amount of time to write, switching between default English Australian, Español, Français, Ελληνικά, and 中国的. If you're an aficionado of language-learning sites like Duolingo and Memrise like I am, code-switching in Windows 8: c'est formidable.

Now, I´m a big fan of casual multilingualism, of code-switching between English and Spanish, but somehow I got my computer into a weirdly multilingual state at one stage. This is a screenshot of the new "Store" app, which is a huge new change for Windows. But if you notice, mine says "Tienda", because it thinks it's Spanish, and that's the Spanish for shop. In the top-right corner, it's telling me "Actualización (1)" - 1 update available. It's not that that's the default language for my Windows - it isn't, (Australian) English is. So what demonios was going on?

Anyway, the redoubtable ^Helen helped me out here too: turns out that if you have a babbel of languages installed then you want to make sure the top two are English ones (like English-Irish, or English-US) or you'll end up with weird mix-ups like I had.

Picture passwords are wonderful

If one of the effects of touch is to humanise the machine to some degree, then one of my favourite applications of touch so far is the picture password.

Normally, when you lock the screen, the options to unlock it are to type a password or a PIN. Cοnsidering that's my machine, in my house, that's kind of alienating. Obviously, I don't have to enable screen-locking at home, but say it's a work computer: it's a constant reminder that you're in an environment where you're not really trusted. I mean of course you are, but others aren't. And the same goes for you vis-à-vis their machines. With Windows 8 you can make a picture password, which is a charming way to come back to your computer and unlock it. In my example here I can remember it by means of a little story: Eoin (the kid on the right) is...
  1. eyeing up my...
  2. cameraphone because he wants...
  3. 2 take a picture.
You get three gestures, and obviously order matters. Sure, I can imagine it's not the most secure thing in the world, but the hackability of the password on account of the traces your fingers make on the screen surely depends on how much you touch your touchscreen. If unlocking the picture password it's the only thing you ever use touch for, then yes, your finger oil could betray you. But really, you want to use touch for as much as you can - why have you got a touch device in the first place? - and that should make your screen oily and noisy.

I don't really need this, as this whole post relates to my home computer and I happen to mostly trust my wife. A lot of this stuff is simply to learn Windows 8, to give myself a head start for the inevitable upgrade at work, and simply for the pleasure of trying out new things. So I don't need the picture password at all. But it is a rather beautiful application of touchscreen technology.

Alright, where's Defender?

My version of 8 came bundled with annoying Norton Internet Security shrillware which I mostly ignored. Now that my 60 or so days trial period has expired, I have to poo or get off the Norton potty, so I thought I'd take my chances with good old Windows Defender. But despite being part of the operating system it's actually switched off. What? I didn't switch it off. What's it doing on my machine, off? According to PCWorld, that's no accident. "Microsoft tossed its partners a bone by allowing OEMs to deactivate Windows Defender in order to ship boxed PCs with alternative security solutions installed." Well how do you like that? I personally object to having to arrange 3rd-party software to safeguard any version of Windows, and from what I read Defender is adequate unless you have special reason to fear hackers above and beyond the usual hazards of surfing, so I'm going to keep any eye on Defender and see how I go. Hardly a rigorously-argued position to take with something as important as security, but I'm damned if I'm paying for something that seems to already be part of the OS dammit. If this blog goes quiet after this post, you'll know my new Windows 8 was infected and I was wrong about Defender.

Sheesh, that was quick!

Hey! Remember about 10 years ago when DVDs were the future? A very short while ago it seemed like everything was going to be encoded, using MPEG-2, onto a DVD. Well, no more. Online media is now where it's at, apparently, not optical media. If you're old school like me and have plenty of old home videos in MPEG-2 format awaiting editing (they come straight off my camcorder, a 5 or so year old JVC Everio, like that), then you're crap out of luck when it comes to Windows 8. MPEG-2 and DVD support are gone, because of licensing costs and the fact that most people stream their entertainment nowadays, according to Microsoft.

Having no idea that this was the case, I only found it out when I tried to edit some old home videos in Windows Movie Maker. I could hear the sound, but saw nothing. Like I say, these old files are encoded using the MPEG-2 codec, which means they are already compressed and will be further compressed on producing/exporting any movie from Movie Maker, or Premiere, or any video editing software you care to use. Why did I store them in a compressed format? Because uncompressed video takes a huuuge amount of space, and they come like that more-or-less straight out of the camcorder, as I say.

I should point out though that if there is a DVD drive on your machine, as there is on my All-in-One then of course Toshiba (in my case) isn't going to just leave you to the wolves: there's a pretty shmick bundled Toshiba Blu-ray DVD player. So something on my machine knows about DVDs and, more importantly to me, MPEG-2s. Just not Windows Movie Maker. Sad trombone. It was probably naïve to expect too much in-built Windows support for video-editing. But if you get CyberLink PowerDirector, or one of those suites, you'll be able to work with your old MPEG-2s. But who knows with the next release of Windows? They might ban them outright. I'm just saying, maybe with MPEG-2s or anything to do with DVDs, one might do well to start thinking about a migration strategy. Be a shame to lose those videos of the kids.

Other changes

In a couple of rather important spots in Windows 8, the start screen and the store to give two important examples, one is expected to simply start typing to do a search. This is not immediately apparent to one. Typing without being prompted by the familiar iconography of a textbox, preferably accompanied by a label saying "Search", with an optional button saying "Go", is definitely one of the moments when one realises one is not in Kansas anymore. The two people (fellow IT professionals) I've talked about this with either found this aspect weird, like I did, or didn't realise it yet and thanked me for the information. I mean, it feels very fluent and new when you get used to it, but it's a jarring moment when you first realise that all you have to do is start typing to start searching.

Other minor changes include the renaming of Windows Explorer to File Explorer; it now also has a "Scenic Ribbon". Something that might take a while to get used to for previous users of Windows is that items in a folder appear to have checkboxes superimposed on them by default, so for example you can select multiple items without having to CTRL-click them, which I suppose is convenient. You can switch that off in the ribbon though, which you'll probably want to if you're used to standard CTRL-selecting multiple items. And CTRL-F1 minimises the ribbon itself.

Oh, and you can make a God folder, but that would be blasphemous.

Wednesday, February 27, 2013

Review of 'Moonwalking with Einstein'

You've heard of ars technica: have you heard about ars memorativa, the art of memory?

Years ago I played Quake quite a lot. I'm sure I did other things in the winter of '96-'97 as well - indeed I have photos to prove it - but one of the strongest memories I have of that time is of happily fragging and blasting my way through over 30 separate maps (or dungeons). When I finally finished it there were the expansion packs 'Scourge of Armagon' and 'Dissolution of Eternity' to get through. When I was finished those I downloaded more maps made by fans just to keep playing.

Long after I finished playing that influential and venerable first-person shooter I noticed something strange: I could remember my way around the individual dungeons much better than I thought I would have done given how fleeting my time in them had been. Vivid memories of hallways and vistas would return, unbidden, in a way that simply never happens with words, or other non-visual material that you might want to remember. I didn't know it at the time, but these dungeons were at the basement of a memory palace.

The art of memory, including the memory palace, are ancient techniques featured in Moonwalking with Einstein, which gives you on the one hand practical advice about how to remember things better and on the other an intriguing historical run through, right back to the ancient Greeks, of the history of remembering things. The basics haven't changed much: the art is to "make remembering things more memorable" by using our superior ability to recall locations, and also to associate important things we want to remember with unforgettable, often raunchy, images, which are hard to dislodge. "The principle underlying all memory techniques is that our brains don't remember all types of information equally well." We're good at pictures, and terrible at numbers. And what we're trying to remember matters: "We don't remember isolated facts, we remember things in context." Therefore, if you can imbue what you're trying to remember with meaning, be it silly or smutty, then you will remember it better.

At the same time, there is plenty of good factual material here: you'll find out the difference between declarative and non-declarative (or, explicit and implicit) memory, and within declarative memories, semantic and episodic memories. If you remember it all, of course.

Moonwalking with Einstein: The Art and Science of Remembering EverythingMoonwalking with Einstein: The Art and Science of Remembering Everything by Joshua Foer
My rating: 4 of 5 stars
View all my reviews

But this book is probably most memorable for the remarkable feat of self-help that Foer brings about. He keeps saying that these memory tricks, even the most spectacular feats of mental athleticism, such as are seen every time there is a competition between the world's best, are just techniques that anyone can learn. "We all have remarkable capacities asleep inside of us, if only we bothered ourselves to awaken them." Apparently so.

Of particular interest to me in the book was Ed Cooke, one of the creators of, a site which aims to make learning fun. Indeed when I see my 8-year old kid using it to learn a language, or the countries of the world, I see a kid tricked into doing extra homework and loving it. The friendship Foer makes with Cooke and the role played by the latter in mentoring the former makes this book different to your usual journalistic reportage of such-and-such a scientific or societal phenomenon. But that's not the half of it. In 2006 Foer actually won the very contest, the US Memory Championship, that he covered in the first place that got him interested in the whole ars memorativa shenanigans! It's a great moment, by the way, when he reveals this astonishing fact in his TED talk.

This is a "mem" I made on Memrise for a word I came across in one of the Greek courses I'm doing. You can see the reasoning here: if you come across the word ασφαλώς and hope to remember it without making a mnemonic, well, you might just do so. But since the ancient Greeks, fittingly, we know that associations and images help us remember stuff.

Actually, I picked that particular mem for another reason as well. If you're thinking, and I know you are, that the "ass" part of that word is particularly suggestible of a ... certain genre of association, then you're right. If I was to make a memory association capitalising on the saucy overtones of the "ass" part of the word (and in this case I could keep going and get "phallus" out of the second part) I could create a lewd scenario involving sodomy, and that would be actually win the approval of any self-respecting memory expert. That's because the dirtier the memory palace, the better. It's long been recognised that the saltier the images used to associate with concepts, the stickier they are. For obvious reasons, a site like Memrise sadly can't promote that particular technique. Some early memory learning proponents centuries past had no such scruples and for promoting this particular heuristicthey got into trouble with the church, drearily predictably.

Don't believe me that you should actually remember your friends' birthdays by creating images of them having sex with animals? You should read Moonwalking with Einstein.