Og to til javanissen!
April 6, 2017 2:31 PM   Subscribe

“In the winter,” you begin, “above the ice-locked fjørds, lies a creek, ash-white with the ghosts of glaciers–”

“You know what?” He interrupts. It was a beautiful story, but perhaps you can tell it later. “How about we do a little programming together? Just a basic exercise so I can get a sense of how you think.”


Hexing the technical interview
posted by Artw (48 comments total) 62 users marked this as a favorite
 
The previous one is good too.
posted by enn at 2:35 PM on April 6 [1 favorite]


Thus our hero, Vainamoinen,
Thus the hero came to comment,
Wrote a note on Metafilter,
Uttered
5B746869 73206973 20676F6F 645D0A
posted by Wolfdog at 2:39 PM on April 6 [2 favorites]


I love this so much. The javanissen!

I mean, this is just excellent fantasy and/or science fiction - really innovative and clever and beautiful and soothing.
posted by Frowner at 2:41 PM on April 6 [2 favorites]


I didn't do nearly as well when I was asked the same question.
posted by GuyZero at 2:45 PM on April 6 [2 favorites]


MetaFilter: You need not participate. Send an eagle in your place.
posted by The Bellman at 2:58 PM on April 6 [4 favorites]


This I'm taking note of just in case I ever get through the pre-screening process ever again:

“The javanisse. Surely you have heard of him! He is a small, magical man–something like a gnome–who inhabits every JVM. If you do not set out an extra constant for him, he can cause segfaults. But keep the javanisse happy, and your mutices will be fair.” It is a story from your childhood. You remember your mother, chanting offsets as she stirred the stew. “To byter for bufferen anvise / og ekstra én til javanisse.” It is a happy memory, and you lose yourself in it until Tim clears his throat.
posted by sammyo at 3:02 PM on April 6 [3 favorites]


Are there any jokes or clever references in the code, or is it just a super tight and unnecessarily wizardy implementation of a simple job?
posted by Sebmojo at 3:35 PM on April 6


I'm just the age to have thought it was in Lisp.
posted by Obscure Reference at 3:38 PM on April 6 [1 favorite]


Are there any jokes or clever references in the code, or is it just a super tight and unnecessarily wizardy implementation of a simple job?

It is at the necessary level of witchery for the purposes of this story.
posted by invitapriore at 3:40 PM on April 6 [9 favorites]


Clojure is a dialect of Lisp.
posted by Artw at 3:41 PM on April 6 [1 favorite]


I'm now enjoying his linkedin.
posted by Obscure Reference at 3:45 PM on April 6 [1 favorite]


Are there any jokes or clever references in the code

Do you consider omitting a default constructor to be a clever joke? It kind of depends on your sense of humour.
posted by GuyZero at 3:45 PM on April 6 [8 favorites]


I mean,

“If it were meant to be illegal,” you remind him sagely, “Sun Microsystems would have made it unrepresentable.”

like, either you find that hilarious or you don't.
posted by GuyZero at 3:46 PM on April 6 [23 favorites]


This is amazing (and I can't even follow the code).
posted by Songdog at 3:58 PM on April 6 [3 favorites]


I only get half of it but I liked that half.
posted by Naib at 4:28 PM on April 6 [8 favorites]


OK, so I only half-got the programming, but I want to make sure I got the awesome fantasy references to powerful women doing magic. There were direct call outs to both N.K. Jemisin's Fifth Season (the icy torus) and the witches of The Golden Compass (Svalbard, cloud pine, etc.). What did I miss?
posted by blahblahblah at 5:13 PM on April 6 [6 favorites]


Clojure is a dialect of Lisp

More specifically, it is to Lisp/Scheme what Scala is to Haskell; i.e., a version of it shoehorned into the highly object-oriented world of the Java Virtual Machine, with whatever compromises are necessary for interoperability with the Java world.
posted by acb at 5:14 PM on April 6 [2 favorites]


Though what is the natural language used? It doesn't look like Icelandic or Faroese. Is it Norwegian Bokmål or Nynorsk?
posted by acb at 5:16 PM on April 6



“Og to til javanissen!” You remind him. He sputters while you try to remember how many instructions you’ll have written.


So good.
posted by strange chain at 5:19 PM on April 6


Sebmojo: "Are there any jokes or clever references in the code, or is it just a super tight and unnecessarily wizardy implementation of a simple job?"

your finger, you fool
posted by boo_radley at 5:19 PM on April 6 [4 favorites]


acb: "Though what is the natural language used? It doesn't look like Icelandic or Faroese. Is it Norwegian Bokmål or Nynorsk?"

It's Java, of course. This is why you have to keep the java goblins happy.
posted by boo_radley at 5:21 PM on April 6


“To know a thing is to name it,” you advise. True names have power.

Yessss. Although it makes me think of C.J. Cherryh not C.M. Valente.
posted by limeonaire at 5:37 PM on April 6


I've only been to one clojure conference, but I got a much more wizardly give than witchy
posted by The Gaffer at 5:41 PM on April 6


I could only love this more if she had used OCaml.

(which has an actual function called "magic")
posted by destrius at 7:14 PM on April 6


OK, so I only half-got the programming, but I want to make sure I got the awesome fantasy references to powerful women doing magic. There were direct call outs to both N.K. Jemisin's Fifth Season (the icy torus) and the witches of The Golden Compass (Svalbard, cloud pine, etc.). What did I miss?


You're spot-on: both pieces draw from N. K. Jemisin's Fifth Season, and Philip Pullman's His Dark Materials. She flies with a branch of cloud-pine, and loves "the kiss of different stars upon her naked skin". The first piece makes an explicit reference to Ursula K. Le Guin's A Wizard of Earthsea, but for some reason everyone ignored her name in the text and assumed I was referencing Patrick Rossfuss, whom I haven't read. Fantasy tropes interweave a lot, so the same ideas crop up in many authors' works, so that's not super surprising.

The digressive sentence structure, most notably in the introduction to "Acing", is drawing on two British authors I very much admire: Douglas Adams--in particular, The Long Dark Tea-Time of the Soul--and to some extent Iain Banks. The abrupt, surreal, conversational factoids are pure Welcome to Night Vale. The second-person style is probably from N. K. Jemisin. People compared the first piece to William Gibson, who I have read a fair bit of, but I wasn't trying for his style here.

Vidrun's "flashing eyes" are a callback to Athena's glaukopis. Athena's obviously a character of exceptional wisdom and power, but also has this... sort of... unpredictable disconnection from modern literature's conception of human morality and agency--she's something deeper, a force of nature, partly unknowable, and I think witches share some of that. The term "flashing eyes" in itself has a wonderful ambiguity to it: are her eyes moving back and forth, glistening in the light--are they literally flashing, like the flare of an old television being unplugged? It could be all kinds of things.

My great-grandparents are from Norway, and I speak a little (very limited) Norwegian Bokmål, which is why Vidrun comes from the north of Norway, and her mother sings in Norsk. The nisse is a long-standing folk legend in Scandinavia, which I also learned growing up. The nisse takes care of the farm (sometimes by stealing from the neighbors!) and one has little rituals to keep the nisse happy. With the Christianization of Norway came the julenisse (christmas nisse) who brings presents for children. The javanisse seemed a natural extension. A Norwegian friend of mine confirms that "og en til javanisse" might be an appropriate incantation!

Jorunn and Bjørn are two characters from Norsk, Nordmenn, og Norge; my textbook when I first studied Norwegian. The comment about "Old West Norse hexography" refers to the fact that early Norwegian runes only had four runes (in the younger futhark) to represent lots more vowel sounds, and I get a kick out of the idea of runes as bytecode, only they're ambiguous and you kinda have to guess which instruction was meant by context.

Clapping the hands as a preparatory action is a common trope, but I was thinking specifically of Hiromu Arakawa's Fullmetal Alchemist. The idea that all magical actions come with a balancing cost is a thread throughout that story, but it's also a central plot point in a book from my childhood, about a young witch who performs a powerful spell--writing a check, I think the metaphor was--which the world forces her to repay. Of course, functions without side effects are free, which is why Vidrun is a mostly a functional programmer. I imagine she's exhausted after this particular story.

Other parts of the story draw from my friends: in particular, a close friend of mine, for the last--gosh, fourteen years now, was a practicing Wiccan for some time. Some of the ritual and language derives from her practice, or fables of witchcraft more generally. And of course, Vidrun is inspired by some wonderful engineers I've been lucky to work with or learn from. Shout out to three lisp glitch witches in particular. :) Her deadpan, outrageous humor is an homage to the talks and writing of Bodil Stokke and Jenn Schiffer.

I greatly admire both Octavia Butler and Margaret Atwood, and the way they use speculative narrative and characterization to explore and interrogate themes of hierarchy, social dominance, and oppression. The Technical Interview is intended to be whimsical and funny, yes, but I think most people will recognize some darker elements of the tech industry here. This is already too long, though, so I'll talk about that some other time.
posted by aphyr at 7:23 PM on April 6 [99 favorites]


I could only love this more if she had used OCaml.

You know, I don't think this could have been written in an ML (referring more to "Acing the Technical Interview" here). Not because those languages aren't capable of similar feats of otherworldly elegance, but because they just don't have the same sense of lightness and freedom. ML-likes are all robes and Orders and, like, Triumvirs to Lisp-likes' ethereal faerie magick. I'll always be a little more partial to the latter, myself.
posted by invitapriore at 7:37 PM on April 6 [1 favorite]


Oh shit! Hi aphyr!
posted by invitapriore at 7:37 PM on April 6


You know, I don't think this could have been written in an ML (referring more to "Acing the Technical Interview" here). Not because those languages aren't capable of similar feats of otherworldly elegance, but because they just don't have the same sense of lightness and freedom. ML-likes are all robes and Orders and, like, Triumvirs to Lisp-likes' ethereal faerie magick. I'll always be a little more partial to the latter, myself.

Yeah, I was just having the same thought. Lisp is definitely more witchy and primal. An ML practitioner would be an old bespectacled guy slowly putting thousands of symbols together in a tome. Funny how something about the nature of the languages just gives rise to certain visuals.
posted by destrius at 7:44 PM on April 6 [3 favorites]


Ooh ooh now do one with a Harry Potter type character and he uses COBOL while reminiscing about his glory days as lead programmer at Gringotts Bank
posted by Doleful Creature at 7:52 PM on April 6 [3 favorites]


I imagine that it's due to their both drawing on some of the same inspirations, but the writing here in particular reminds me a lot of Victoria Schwab's A Darker Shade of Magic, which I really love as a perfect little barn burner of a fantasy novel. The narrator here evokes its protagonists in a lot of ways.
posted by invitapriore at 8:05 PM on April 6


“The javanisse. Surely you have heard of him! He is a small, magical man–something like a gnome–who inhabits every JVM. If you do not set out an extra constant for him, he can cause segfaults. But keep the javanisse happy, and your mutices will be fair.”

I feel it's now my duty to reference the javanisse in as many code reviews as possible.

That was a great read, thanks for sharing!
posted by slagheap at 9:06 PM on April 6 [2 favorites]


This is the only time I've seen a joke improved by explaining it.
posted by GuyZero at 9:06 PM on April 6 [10 favorites]


I've been working in Norway since Monday, and I will keep an eye out for Javanissen in the corners of the office (although our witches are Scala witches: "and it have no side effects, so mote it be").
posted by Wrinkled Stumpskin at 10:14 PM on April 6 [2 favorites]


(Pedantic note: Bokmål and Nynorsk are standards for written Norwegian. Nobody really speaks them. Bokmål is based on eastern dialects and nynorsk on western.)
posted by Harald74 at 2:30 AM on April 7 [2 favorites]


And fun little story, btw.
posted by Harald74 at 2:31 AM on April 7


So, how's the job search going then aphyr?

(I can't be the only one reading these pieces as a coded railing against the awfulness that is the SV-style programmer interview process.)
posted by pharm at 3:31 AM on April 7


It could be coded gloating over upending the interviews. We can hope.
posted by clew at 10:11 AM on April 7 [1 favorite]


you invoke the four cardinal directions, as scars around your wrist: H, J, K, L.

I like the cut of your jib.
posted by Lycaste at 12:14 PM on April 7 [4 favorites]


That would be glorious.
posted by pharm at 2:05 PM on April 7


You programmers are weird as hell.
posted by turbid dahlia at 2:07 PM on April 7 [5 favorites]


(I found the Rossfuss disappointingly pedestrian. It started well - lots of hints of wider magics, deeper forces - but ended up being mostly just another bildungsroman. It just felt like yet another power fantasy for teenage boys to me & I had had my fill of those when I was 13 myself.)
posted by pharm at 2:09 PM on April 7 [1 favorite]


The haskell version of this probably goes something like, the interviewer wants a haskell implementation, but you use idris instead, which is close enough to haskell to look familiar, but fully dependently typed.

You write down several lines of runes defining the shape of the problem.

...

Then you write down the type of the function and stop.
        tightenTargets
                ::
                        ( (Targets untightened `NotSuperset` Targets tightened) ~ 'CanCombine
                        , (NonTargets tightened `NotSuperset` NonTargets untightened) ~ 'CanCombine
                        , SingI tightened
                        )
                =>  Property (MetaTypes untightened) -> Property (MetaTypes tightened)
        tightenTargets = 

"Here I'd hit the tab key, so my compiler could implement the only possible function that is allowed by these types, but this whiteboard doesn't have a tab key."

Since I'm a mere haskell programmer, the introductory runes for this are 300 lines long, and I had to write this next line implementing the actual function by hand (although at least the magical "sing" was able to construct a value of whatever type all that type machinery decides is appropriate):
        tightenTargets (Property _ d a i c) = Property sing d a i c

posted by joeyh at 8:49 PM on April 7 [1 favorite]


In case anyone else cares, i believe the book aphyr is referencing as a touchstone from his childhood is So You Want to Be a Wizard, by Diane Duane. One of the wizards in the book, Nina, casts a type of spell called a "blank check" spell, which she knows must be balanced by an equivalent energy sacrifice later. (In the sequel, as it happens.)
posted by adrienneleigh at 3:22 PM on April 8 [1 favorite]


You programmers are weird as hell.

Ahhh (awk) you're sweet.
posted by sammyo at 4:17 PM on April 8


Yeah, aphyr, this is one of the best pieces of short fiction I've read in a while, let alone techy fiction. I'm taking notes for my next interview.
posted by wormwood23 at 8:57 PM on April 8 [2 favorites]




You know shit’s about to get real when you see
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
at the top of your Haskell source file.
posted by pharm at 2:38 PM on April 10


For more on the power of type-level unification with functional dependencies, see Fun with Functional Dependencies. I never fail to be delighted by riffs on that.
posted by invitapriore at 11:02 AM on April 11


« Older High Schoolers Attempt Suicide Because of Stress:...   |   Naked in the face of contamination Newer »


You are not currently logged in. Log in or create a new account to post comments.