Sunday, June 30, 2013

Technical Interviews: The Missing Piece

Typical Interview Question: Write a Java method to reverse a string.
TechCrunch had a recent piece about the demise of the technical interview. In software engineering, the technical interview involves writing code. Companies like Amazon and Google have a reputation for asking brain-teasers such as, "How many gas stations are in the US?" or "How many Ping-Pong balls can you stuff into a Boeing 747?" The idea is to see the job candidate's thought process. While these questions are mentally challenging, it's probably not the best indication of how good the candidate is at programming.

I've been through a number of software engineering job interviews where I've been asked to write code and discuss fundamental computer science questions. Writing code is an important part of hiring software engineers and it definitely has its place in the job interview process. And, it's perfectly okay for the candidate to make typos or have syntax errors when writing computer code on a white board. The idea is to see if the candidate understands the fundamentals of computer science such as Big O notation when it comes to a binary tree [O(log n)] or hash table [O(1)] or the basics of recursion and language syntax.

The Missing Piece
One thing I've noticed missing from all my job interviews over the past 15 years is that no one has ever asked me to show code that I've already written, refactored, and trusted for many years. The beauty about reusing code that either I or someone else has previously written is that code you don't have to write is code that you don't have to debug.

Software engineers who live for and love writing computer code have many side projects. You'd be hard pressed to find a good software engineer who doesn't have something currently deployed whether it's a web application or smart phone app. Just like an artist has to paint, or a poet has to write – regardless if they're paid or not – a coder has to code.

The Alternative
The current software engineering interview at a decent tech company involves a series of 45 – 50 minute long interviews where a pair of employees ask the job candidate questions. This process can last four to six hours and the key part that's missing, today, is where the job candidate gets to show off what they've previously written and released. This is especially important for a 40+ year old job candidate who should have a massive bag of tricks since they've probably been coding, on a daily basis, for more than a quarter of a century.

Instead of multiple 45 minute interviews with two employees and a job candidate, it would be much more effective to have a couple 90 minute interviews with four employees where the candidate can show how they architected, coded, and deployed a website or smart phone app. Ideally, the candidate could ssh into their live servers to show the details, challenges, and architecture of how a web app works while showing off the code that he/she has written to accomplish it. Writing code on a white board is very academic; seeing code that a candidate has deployed and maintained over several years is about as real as it gets.

No company would hire a graphic designer without seeing the job candidate's portfolio so why don't tech companies demand the same thing from software engineers?

Friday, June 21, 2013

Smartphone Lock Feature

I was at a tech event, earlier this week, sitting next to a guy who pulled out his smart phone to read a text message. As I casually glanced over to see what kind of phone he had I could easily see him enter his four digit PIN. With touch screen phones, whether they have a keypad or you drag your finger across the numbers, it's very easy to see the PIN entered based on the position of the numbers.

This got me thinking... a simple solution to this problem would be to randomly display the numbers on the keypad. You'd still enter the same PIN, but, to a causal glancer, they'd not be able to figure out your PIN simply based on the position of the numbers you touch.

Cafe Abandonment

Barry's stuff: laptop on chair and scanner on table.
I've been coming to my neighborhood cafe for many years. You can find me sitting in the back with my laptop or iPad for a few hours on most days of the week.

Today, after sitting for about an hour, a young woman came over to me as she was leaving and asked me if I wanted to sit at the big table she had been sitting at. It's my usual spot but it was unusual for her to give me first dibs – especially since I had never seen her before. When I said, "Yes," she then asked me for a favor. She wanted me to watch the laptop and scanner at the next table. I had seen the stuff when I sat down, an hour earlier, but I never saw a patron sitting at the table.

The woman told me that the owner of the stuff, Barry, asked her to watch it for "about half an hour," but that was three hours earlier and now it was time for her to leave. I told her it would be no problem and took over guarding his gear. About half an hour into my watch, Barry returned. I said, "Hi, Barry," and he smiled. He figured out exactly what happened, "Oh, you're now in charge of watching my stuff?" he said as we both laughed.

A few minutes later, a buddy called me so I told Barry it was now his turn as I stepped outside to take my call.

Tuesday, June 18, 2013

Reactive Computer Security

Wouldn't it be great if a computer operating system (OS) could prevent data theft by reacting, after the data was stolen, even without an Internet connection? I'm sure that the State Department and the NSA would love that.

When I was in the Marines we used to hit the beach in amphibious tractors (amtracs). Packed with a couple dozen troops, they look like light-weight tanks and they could swim on the surface of the ocean and then transition onto land. Since the amtracs were made of aluminum, not steel, they didn't offer much protection against rockets such as RPGs and other shaped charges that focused their explosive force in a single direction. However, to combat the threat of rockets the amtracs were covered with reactive armor that was designed to prematurely detonate and deflect a rocket blast – it worked very well.

Preventable Data Theft

Yesterday, I was at a Tech Coffee Meetup in downtown San Diego where we discussed how reactive security could be implemented in an OS. The process works in much the same way that iTunes implements digital rights management in music. To play a song purchased from the iTunes Store a user must enter his/her credentials (login and password) which is authenticated with a central iTunes server.

In a similar way, data on a hard drive running a reactive security OS (RSOS) would be encrypted. The data could only be read with the proper pair of passwords – one entered by the user and the other stored on a central server. Additionally, the RSOS would only allow data to be copied to another location (flash/thumb or hard drive, etc) with the proper passwords and each copy would have its own pair of passwords. The target destination must be running a RSOS before the data is copied. Once the data is copied onto a flash drive it would be erased after a certain amount of time unless the RSOS on the flash drive checked in with a central server, for a pairing password, before expiration. Alternatively, the pairing password on the central server could simply be erased rendering the encrypted data undecipherable. Additionally, every time the secure data checked into the central server its pair of passwords would change and the data would be re-encrypted, in place, with the new passwords similar to frequency hopping radios used in the military.

The key to making this work depends on two parts. First is using strong encryption with two keys (one password is entered by the user and the other password, which changes each time the file is copied, is stored on a central server, AKA double integrity). Second is having the RSOS properly implement the reading and copying process in a way that couldn't be circumvented (hacked). It's a very doable solution.

New Job Prospect: Astronaut

STS-127: Endeavour 
NASA just announced their newest class of astronauts – I wasn't one of them.

Everyone wants to be an astronaut but few actually apply. The basic requirements for a mission specialist or flight engineer are simple:

1. American citizenship.

2. Bachelor's degree in engineering, biological science, physical science, or mathematics.

3. Vision of 20/100 or better correctable to 20/20.

4. Blood pressure of 140/90 or better, sitting.

5. Height between 62" and 75".

While there's no age limit, I would have been one of the oldest astronaut candidates selected – a daunting statistic considering only Russia and China currently have the ability to put people into orbit. Obviously, beyond these basic requirements, it gets highly competitive. Astronauts have resumes and experiences that are humbling. 

Once an astronaut class is selected, the astronaut candidates (affectionately referred to as ASCANS) begin two years of basic astronaut training which includes learning Russian. After that, they're officially called astronauts and they're assigned to a mission, usually a few years in the future, which begins with more, specific, training.

As glamorous as this job sounds, it involves very little time in space with a lot of time, training, and travel away from home and family.

Application
I applied to be an astronaut in January of last year. I was contacted by NASA a couple times to provide some additional information. After reviewing the basics, NASA selected, from over 6,000 applicants, a group of one or two hundred highly qualified (HQ) candidates to visit Johnson Space Center. That group was whittled down to several dozen for another week of interviews and medial exams until NASA officially announced their eight ASCANS for the NASA class of 2013.

NASA doesn't disclose specifics figures at each step, but I realized when a college buddy, Karl, got the call, last fall, to visit NASA several months ago that I hadn't made the HQ cut. After Karl didn't receive a call back, he too realized that he hadn't been selected. But it's not set in stone until a new NASA class of ASCANS is officially announced.

Despite my disappointment – tempered with the realization that it was a long shot – I do get a huge source of pride in the fact that another college buddy, Chris, is currently orbiting aboard the ISS. I was very fortunate to watch Chris launch into space on his first mission, aboard the space shuttle Endeavour, in 2009 accompanied by a college ball cap that I presented to him the previous year.


Chris Cassidy shaving his head in space last month.

Wednesday, June 12, 2013

Touché, détente, then quid pro quo
(Annapolis Practical Jokes)

The graduates of the U.S. Naval Academy Class of 1993.

Last night I had dinner with a buddy who went to Marine Corps OCS but decided that military life wasn't for him so he DOR'd before graduating. Even though he only spent a few months on active duty he still had a taste of military life. We started talking about practical jokes from The Great Santini so I shared a few experiences from my time in the military.

Beat Army!
At the Naval Academy, the week leading up to the last regular season football game – which is against our rival, West Point – is appropriately referred to as Army/Navy Week. It was, and still is, a week of little sleep and practical jokes. Exchange students from West Point received the brunt of the horseplay, but that didn't stop the rest of us from playing jokes on each other in the spirit of "beating Army."

One tradition, during Army/Navy Week, was to "Beat Army" an exam. This simply entailed writing "Beat Army" on your test and handing it in without answering any questions. After all, what could show more spirit than sacrificing your grade, and getting a zero on your exam, in the spirit beating Army?

In practice, I only recall this happening to me once. It was a de facto rule that professors avoided giving exams or quizzes during Army/Navy Week since the following week was final exams week. But, one time, the conditions were just right when my math professor handed out a pop-quiz and then walked out of the classroom. Walking out of the room isn't a big deal since cheating wasn't an issue. But someone joked that we should write "Beat Army" on the quiz and turn it in. It took less than thirty seconds for all of us to agree.

When the professor returned twenty minutes later he noticed what we had done as he collected the quizzes. He was a Marine officer. Mutiny like this would never fly in the "real military" and even though he wasn't a graduate of the Naval Academy, he was well aware of the tradition of the stunt we had just pulled. He was not happy since we had just challenged his authority. But he didn't say anything about it. I suspect that he sought advice from other professors as he debated whether to give us all a zero for the quiz or allow us to retake it the following week. Lucky for us, he chose the latter with clear instructions that the grade for the retest would stand.

Practical Jokes
Casey trying to fit in on the opening day of boating season.
Casey Garwood was my roommate all four years at the Academy, from Plebe Summer until graduation. My Youngster (sophomore) year at the Academy I played a joke on Casey by setting his alarm clock ahead four hours after he'd gone to sleep. I told my other roommate, Kevin, what I had done so he was in on the joke. At 2:00 AM, Casey's alarm went off. Since it was early December we were used to waking up well before sunrise. When Casey woke up Kevin and I, we told him that we were both standing duty which meant that we'd get to sleep in since we had a later muster to attend.

As Casey followed his morning routine of shaving and showering I left the room to tell some fellow Midshipmen what was happening. Even though it was 2 AM, students were still awake, studying. They helped out by performing a mock chow call outside our dorm room to make the morning routine seem more realistic.

Thirty minutes after Casey awoke he stepped outside into the hallway to go to, what he thought, was 6:30 AM muster. Instead, he found a bunch of us laughing as I pointed out, on the wall clock, that it was only 2:30 AM. He was a great sport and laughed. I got him good. But I should have known he wouldn't let this pass without some sort of retaliation. I began to realize that, when I least expected it, my time would come.

Casey slept on a single bed and I slept in a bottom bunk bed while Kevin slept in the top bunk. My bunk was surrounded by walls on the head, foot, and one side. In the middle of the night, a few days after pulling off my 2:00 AM alarm clock joke, Casey carried out his revenge. He removed his bed springs rack and used socks to tie it, vertically, to the side of my bed. When I woke up the next morning, I was caged into my bunk. Touché.

Eww
Casey, seated second from the right, wearing
a 'Hug Me' shirt with a teddy bear otter.
At times, the practical jokes between Casey and I were a tad more sophomoric and slightly disgusting. I had clipped off a hunk of my big toenail and placed it on the speaker near the head of Casey's bed, next to his alarm clock, while he slept. There was no way he could miss it when he woke up. I had forgotten about it until later in the day when I noticed it was gone. I presumed that Casey had seen it and thrown it away; and I didn't ask him about it.

The next morning, as I brushed my teeth, I noticed something that felt like glue in my toothbrush. I pulled the toothbrush out of my mouth but it seemed fine as I glanced at the foamy bristles. When I resumed brushing my teeth I realized that there was something very wrong with my toothbrush so I reexamined it in detail by sticking my fingers into the bristles and discovered where my toenail clipping had ended up. Once again, touché

All Grown Up
To this day, Casey and I still play practical jokes on each other. Last December, he invited me to a party at his house and told me it was French themed. I spent several hours running around town looking for a beret to wear for no reason since no one would attend in costume. And the goofy photos of Casey, in this blog post, is yet another joke that I'm playing on him. One day, months or years from now, he'll google his name and find what I wrote here. Of course, all kidding aside, I couldn't have asked for a better roommate since I can be a pain to live with and he is one of the most easy-going guys I know.