rc3.org

Strong opinions, weakly held

Author: Rafe (page 37 of 989)

Let’s talk about interviewing programmers

Lately, I’ve been interviewing a lot of developers. Not phone screens, but in house interviews that we use to decide whether to hire someone who’s passed the first round. In addition to trying to figure out who the good candidates are, I’m also trying to get better at interviewing.

If you’re getting started with interviewing programmers, there are a couple of must-read articles. The first is Steve Yegge’s article, The Five Essential Phone-Screen Questions. This article is incredibly well-known and I assume everyone has already read it.

The second is Joel Spolsky’s The Guerrilla Guide to Interviewing. He recommends asking an “impossible” question (as anyone who worked at Microsoft probably must). I never ask these kinds of questions. Other than that, I think he’s got it right. You want to know if they can code, if they can design something, and how well they think.

One thing that stands out to me, though, is that none of his questions tell you what kind of team member the candidate will be. This is a major deficiency as far as I’m concerned.

Basically, at the end of an interview, the one question I want answered is, “Will it suck to work with this person?” As Joel points out, it’s important to hire smart people who get things done. It’s also important to hire people who won’t make the people around them miserable. I want to hire people who are flexible enough to adapt to the company culture and open-minded enough to recognize other people’s good ideas. I also want people who are patient enough to bring other people up to speed on their work.

There are a few questions that I’ve settled into asking almost everyone. I don’t worry about people finding me on Google and knowing in advance that I’ll ask these questions because I’d just as soon they come in already knowing the answers.

I almost always lead off with, “Tell me your timeline of programming languages.” I want to know how long they’ve been programming and how many languages and platforms they’ve used in their career. All things considered, I generally prefer programmers who’ve worked extensively with multiple languages. This question is also an easy way to find out which people started programming early in life.

Next, I usually ask them about some experience from their résumé, I’ll pick a project and drill down to find out what the project was, what role they played, and how well they can explain what they worked on.

I then ask them some questions about teamwork. I’ll ask them to tell me something they learned from another developer. Many people talk not about technical concepts but about habits of work, and either sort of answer is fine. If they can’t tell me something that they’ve learned from someone else, that’s a big red flag.

I ask them to tell me something that they’ve changed their mind about when it comes to software development. If you can’t remember changing your mind about anything, you may be too stubborn to work well on a team. It turns out that lots of people have changed their mind about the ternary operator. It’s polarizing.

I will generally ask candidates how they test their own code, to find out what kinds of automated testing they use (or don’t use).

The last question I have started asking almost everyone is to tell me something that they would rewrite if they were given time. It’s a good way to get someone to talk about something they feel strongly about and also to find out what they see as good and bad code. It’s also telling if they want to rewrite something someone else wrote rather than something they wrote.

I’ll also ask a few questions about why they’re looking for a job and what interested them about the company just to get a sense of how interested they are in the position. And of course I ask them if they have any questions for me.

There are three other areas that I think are important to hit, and this is the area where I’m still working on my technique. Those are coding, design, and problem solving. The trick is to fit all of it into the short window that I usually have for the interview. At worst, if multiple people are interviewing the candidate, you should make sure that at least one person will be hitting each of these three areas.

The ideal programming question as far as I’m concerned should be simple enough to solve in a couple of minutes, and be deep enough to have multiple solutions. The best questions have at least a brute force solution and an elegant solution. You can gauge the candidates on which they come up with. I refuse to ask the famous Fibonacci sequence question. There are better alternatives. That said, if you are interviewing for programming jobs, you should be able to write a program that prints the Fibonacci sequence using a loop or using recursion. Someone will ask you to do so.

Design questions are discussed comprehensively in Steve Yegge’s article, which I linked to previously. The goal is to determine whether the candidate understands object-oriented design. The model should be simple enough that you can get past the classes and get into talking about the methods on those classes.

Finally, I think it’s good to ask a question that tests the candidate’s problem solving skills. They should be able to list possible solutions and discuss the pros and cons of each of them. I’m going to write a separate post about this type of question later.

Yahoo brings the patent war to the Web

Yahoo has filed a lawsuit against Facebook for violating ten of its patents. You will not be surprised to learn that the patents are for obvious implementations of features that have all been used on literally hundreds if not thousands of Web sites. Facebook is about to generate a huge amount of capital through its IPO and Yahoo has its eye on the loot.

It’s hard to beat Fred Wilson’s direct response, but my personal favorite is Andy Baio’s. His perspective as a startup founder whose company was acquired by Yahoo is particularly interesting.

The question people who are concerned about the ongoing damage that patent litigation is inflicting on the technology industry need to be asking is how to make this a political issue that lots of people care about. Everyone I know who’s a technology insider sees this as a hugely important issue, but most people on the outside are hardly aware of it. If you need a refresher on this issue, there’s no better place to start than This American Life episode 441, When Patents Attack!

Jacob Goldstein, who did the This American Life story on patents, has a piece up about the Yahoo lawsuit.

The concise case for code reviews

Google engineer and former Harvard professor Matt Welsh does a great job of making the case for code reviews. I have never worked in a shop where code reviews were mandatory for every change, or even commonly held, but I’ve always wanted to for all of the reasons Matt Welsh explains. There are a lot of excuses for not doing code reviews, but I can’t think of any more efficient way to encourage developers to learn from one another and to develop a cohesive coding style that spans an entire team.

Expertise makes the impossible seem easy

What is impossible for novices is easy for experts. Take a look at what Damir Sagolj refers to as the “easiest big picture he shot for a long time” and then check out more of his work.

The US government attempts to justify targeted killings

Today Attorney General Eric Holder gave a speech in which he explained why the US government asserts that it has the right to assassinate suspected terrorists overseas, even if they are US citizens. I urge you to read the recap of the speech.

How does Holder justify the government’s logic? This way:

This is an indicator of our times, not a departure from our laws and our values.

My fundamental problem with the Bush administration was that it chose to put aside the rule of law in pursuing the so-called “war on terror.” My greatest disappointment in the Obama administration has been seeing it continue and even expand some of the worst practices of the Bush administration. As others have pointed out, the decision to do so has cemented these practices as national policy.

I commend the Attorney General for coming out and offering a justification for this decision, even if I disagree with it completely. I’ll be voting for Barack Obama this fall, and I imagine that a lot of readers of this blog will be as well, but it will be in spite of his policies in the war on terror, not because of them.

RIP, Ralph McQuarrie

This morning I read that Ralph McQuarrie has died. Oddly enough, I didn’t even know his name until today, but I certainly knew his work. He was the conceptual designer behind the original Star Wars trilogy, among many other works, and he created the visual world that completely enraptured my childhood mind. It’s strange to think that I didn’t know who deserved credit for that until his passing.

There’s a slide show of his concept art for Star Wars at the official site. It’s amazing how faithful the films are to his renderings.

There’s also an extensive gallery of his work at his official site.

Any Web site with a US TLD is now in US jurisdiction

EasyDNS has a chilling post on VeriSign taking down a Canadian Web site in order to service a warrant from the state of Maryland:

We all know that with some US-based Registrars (cough Godaddy cough), all it takes is a badge out of a box of crackerjacks and you have the authority to fax in a takedown request which has a good shot at being honoured. We also know that some non-US registrars, it takes a lot more “due process-iness” to get a domain taken down.

But now, none of that matters, because in this case the State of Maryland simply issued a warrant to .com operator Verisign, (who is headquartered in California) who then duly updated the rootzone for .com with two new NS records for bodog.com which now redirect the domain to the takedown page.

The implications are chilling. So now if you use a TLD that is under the control of a US company, your Web site is in US jurisdiction.

How to make software fast

In an email explaining how he optimized GNU Grep for speed, Mike Haertel discloses the secret of high performance software:

The key to making programs fast is to make them do practically nothing.

How do you run SSH from a PHP script?

I’m writing a very simple deployment script that logs into a remote server and uses Git to pull the latest code from the remote repository. The deployment application runs on Server A, and it will update code on Server B and Server C.

The deployment application is written in PHP, and it’s easy enough to call the ssh command using PHP’s shell_exec() function. Well, calling SSH is easy, but making it work is a bit more difficult.

SSH really wants to run as a user who has a .ssh directory in their home directory. First, it needs to find the private key in order to authenticate against the remote server. You can get around that using the -i flag and pointing at a specific key file. You also need to indicate to SSH that you don’t care about the host key (which prevents you from being victimized by man-in-the-middle attacks) or to point it to your known_hosts file. You can specify a custom location for that using the -o option, like this:

-o UserKnownHostsFile=keys/known_hosts

Even after that, though, SSH still insists on using a .ssh directory for the user running the command, in this case, the Apache user. Creating such a folder doesn’t seem like it should be necessary, but I haven’t been able to figure out how to avoid it.

If I can’t get this to work, I could try using the SSH2 library for PHP, but I’d prefer not to, since I don’t want to deal with the added dependency.

I’ve posted this question on Stack Overflow as well.

An economic philosophy for the modern leftist

Don’t miss Dylan Matthews’ piece on Modern Monetary Theory, which argues that deficit spending is essential to economic growth. Here’s the crux of the philosophy:

This claim, that money is a “creature of the state,” is central to the theory. In a “fiat money” system like the one in place in the United States, all money is ultimately created by the government, which prints it and puts it into circulation. Consequently, the thinking goes, the government can never run out of money. It can always make more.

This doesn’t mean that taxes are unnecessary. Taxes, in fact, are key to making the whole system work. The need to pay taxes compels people to use the currency printed by the government. Taxes are also sometimes necessary to prevent the economy from overheating. If consumer demand outpaces the supply of available goods, prices will jump, resulting in inflation (where prices rise even as buying power falls). In this case, taxes can tamp down spending and keep prices low.

But if the theory is correct, there is no reason the amount of money the government takes in needs to match up with the amount it spends. Indeed, its followers call for massive tax cuts and deficit spending during recessions.

Fighting our recession with austerity measures is failing horribly and yet favoring austerity is widely perceived as the serious-minded approach to our current economic woes. Modern Monetary Theory provides a framework for thinking about fiscal policy in a different way and shifts the Overton window away from austerity.

Older posts Newer posts

© 2024 rc3.org

Theme by Anders NorenUp ↑