Oct. 25th, 2017

Code exams

Oct. 25th, 2017 11:08 pm
garote: (Default)
I recently stepped from one job into another. On Friday I was working for the Berkeley labs, then on Monday I was working for a startup company across the street. From my new office, I can look out the window and see the sunlit hallway in the old building, where I used to take snack breaks. My bicycle commute is exactly the same. Nice!

The old job was being cut due to lack of funding. I was going to spend a while "funemployed" after that, but with a couple weeks to go I changed my mind and hit the job market. During those few days I brushed up my interview skills. This drove me a bit bonkers.

There are a zillion companies now that claim to be able to train you for an interview -- or interview your candidate for you, with multiple-choice quizzes and in-browser code tests. These vary in quality and content, more than you can imagine. The worst of them are crowd-sourced, going for quantity so they can boast "thousands of questions" on their press material. All the questions - multiple choice, fill in the blank, whatever - are weird nit-picky crap. All of them. The ones that aren't are so few that they're within the margin of error in the measurement and don't matter.

I took a quiz on Bootstrap and the first question was:

"Which of the following classes are generated on a blue button in the UI: btn-blue, button, ui-btn, blue?"

Are you fucking kidding me? Is that knowledge absolutely essential in sorting out n00bs from rock stars?

"Does Javascript's getDay() function return the weekday starting from 0 or from 1? Does the lowest value represent Sunday, or Monday?"

Oh wow, yeah, I need to look that up at least twice a day. I should have it memorized.

"What's the default duration of a jQuery.fadeOut() call?"

Answer: Fuck you.

Then there are the sites where you actually write code. They are better, but they have their own problems. Sometimes the answer they expect is very, very specific, and if you don't follow their formatting, or put commands in the same arbitrary order, you lose. Eventually I settled on the Codility website, which didn't suck. I barreled my way through ten of their tests, picking them at random, switching between Python and Javascript. Felt pretty good! Then I hit a problem about calculating "semi-prime" numbers.

Find the number of semiprime numbers (numbers that are the product of two primes) within the range (P, Q), where 1 ≤ P ≤ Q ≤ 50000. Your program must have a worst-case run time of O(N*log(log(N))+M) or better.

There is exactly one way to solve this, and it means implementing a modified version of an algorithm called the “Sieve of Eratosthenes”. Go read about it; I'm sure you've never heard of it.

This problem is dropped in with a bunch of others about sorting arrays, walking trees, and munging lists. Guess how often the Sieve of Eratosthe-butt-ass has come up in thirty years of a very respectable programming career?  That’s right. Not once. But you either know it, or you don't. Or you're Nicomachus of Gerasa from the year 60, and you come up with it on the spot.

You know what this is? This is like qualifying a construction worker to operate heavy machinery by testing his skills with the drop-claw game at the pizza parlor.

Anyway, I quit after that. I'd gone far enough. Any interview that would ask me about the Sieve of Erazzo-poof-shart is an interview I'd be happy to flunk.

garote: (ancient art of war china)
How does a person figure out what "generation" they're in? I think the only way is in retrospect. You need to be there when it begins, and live long enough to see how it's going to end. Well, enough time has passed that I can see the borders of mine.

My generation is the one that grew up with a particular thing in the house: A box full of electronics, heavy enough that it had to sit on a desk or the floor, with wires connecting it to a big rectangular viewing screen and a big rectangular keyboard made of physical buttons. It could connect to the internet, but poorly, and only with wires.

The end of my generation came with the rise of the smartphone. The computer is now considered the more serious and nerdy version of the smartphone, not the other way around. If there's a computer in the house it's almost always a laptop, or a sleek, sealed appliance, and it lives and breathes high-speed internet. It's not its own universe any more, but a gateway to another one. For the new generation, a computer without an internet connection is a broken computer.

The big box of isolated electronics was a critical part of my childhood development -- intellectually, socially, artistically, even emotionally. Now I am in middle-age, and those boxes are almost all gone, buried in landfills or smashed apart to recycle their guts. They linger as museum oddities, or nostalgic set decoration. No generation before mine had a chance to grow up in the home computer era, and no generation after mine will have it either.

Perhaps there are earlier examples in the long history of humanity where technological progress moved so fast that a generation found itself obsolete when it reached middle age ... but I can't think of any just now.

Today that kind of speed is a given. The generational borders feel narrower every year. Or perhaps that's just me, slowing down, and paying less attention. But, it seems to me that there's a gulf of experience between the first kids to wait in line for the Harry Potter movies, the first kids to play Guitar Hero, the first kids to like Justin Bieber, the first kids to dance Gangnam Style, and the first kids to play Pokemon Go, even though to me, they're all just kids. I wonder how they'll define their borders, in 20 years?

Anyway, in the 1980's, it was all about that big box of electronics, whether you had one at home or messed with one at school. As the box grew in versatility over the years, so did my creative ambition. Looking back, I'm surprised at all different ways I found to use it. For my own amusement I made a list of creative activities, describing the first time I used a computer for each activity. After I made the list I was surprised how much of it happened before the age of 20.

Clickety click for the list... )

Not sure what the point of that was. I've been in a list-y mood lately, I guess!

Profile

garote: (Default)
garote

November 2025

S M T W T F S
      1
2345678
9101112131415
16 171819202122
23242526272829
30      

Most Popular Tags

Page generated Jan. 7th, 2026 03:35 pm