How to Start a Software Company 2.0

by Richard Rodger

       
 
How to Beat Nasty Interview Programming Tasks

Shane Bell does a write-up of an interview he went through. Apparently the company just dumped a programming exercise on him and left him with a pencil and paper for an hour. Nasty!

While the basic idea of a "real" programming test at interview is great, asking someone to do it with a pencil is just plain daft! This is a perfect example of cargo-culting. They know they should get people to program in an interview, they know they should ask a "tough" question. But then they invalidate the whole thing by testing "pencil-based-programming-acuity"! Whatcha building guys? A Babbage engine? Um, you know, how difficult is it, if you are going to the trouble of all this testing, to set up a locked down machine with no internet access?

Anyway, Shane runs through the exercise and his solution. He does pretty well. He also asks if there's a better solution.

Yes, Virginia, there is a Santa Claus!

And he lives at MIT OpenCourseWare. Specifically, the AI search lectures. Fantastic stuff.

Looking at the problem they gave Shane, finding a path through maze from top-right to bottom-left, it looks like you could throw an A* search at it and do pretty well. Add some iterative-deepening if you're feeling fancy and want to handle big mazes. Basically, you try to predict the best direction by calculating your current straight-line distance from the goal square at the bottom right, and choosing the next square as the one that gets you closest. If you get stuck in a cul-de-sac, backtrack out of it (Shane does use backtracking).

So how do you beat these nasty interviews? Know your search algorithms! Most of these "puzzles" can be solved with some sort of search. I'll bet you anything the guys who set this question where either a.) clueless, so a good algorithm will really impress them, or b.) not clueless and actually looking for a proper algorithm like A*. Either way you win!

@ 09:55 AM GMT+00:00 [ comments [4] ]   email this   links to this

If you liked this entry, please consider bookmarking it &mdash Thanks!
Bookmark How to Beat Nasty Interview Programming Tasks at del.icio.us Digg How to Beat Nasty Interview Programming Tasks at Digg.com Bookmark How to Beat Nasty Interview Programming Tasks at reddit.com Bookmark How to Beat Nasty Interview Programming Tasks at YahooMyWeb Bookmark How to Beat Nasty Interview Programming Tasks at Spurl.net Bookmark How to Beat Nasty Interview Programming Tasks at Simpy.com Bookmark Polyphasic Mutants at NewsVine Blink this How to Beat Nasty Interview Programming Tasks at blinklist.com Bookmark How to Beat Nasty Interview Programming Tasks at Furl.net Fark How to Beat Nasty Interview Programming Tasks at Fark.com

 
 
Trackback URL: http://www.richardrodger.com/roller/trackback/richard/Weblog/how_to_beat_nasty_interview
Comments:

[Trackback] Here goes my version of the maze solver program to the Excellent Interview Question Shane Bell wrote about. My solution follows the classic “always keep your left hand on a wall” idea. It doesn’t guarantee to find the best route, but...

Posted by The Path to Zen on June 18, 2007 at 01:53 PM GMT+00:00
Website: http://www.digizenstudio.com/blog/2007/06/18/yet-another-maze-solver-guess-i-have-too-much-time-on-hands/ #

Yes, I'd have to agree, using recursion does limit the size of the solution space.

"Always turn left" is actually just a direct depth-first search - if you add that pythagorean distance heuristic I mentioned you can improve it quite easily.

Posted by Richard Rodger on June 19, 2007 at 09:50 AM GMT+00:00
Website: http://www.ricebridge.com #

Not sure why you would use a locked down machine either. I know you subscribe to non rote learning, so provide internet access and log it - then you are checking process as well as ability.

Posted by moulla on July 02, 2007 at 11:53 AM GMT+00:00 #

That's a good one - review their internet usage as part of their problem solving ability. Like it.

Posted by Richard Rodger on July 03, 2007 at 08:39 AM GMT+00:00
Website: http://www.ricebridge.com #

Comments for this have been disabled. Please send me a mail if you want to comment and I will activate comments again.
 
YahooBloglines
NewsgatorMSN
Google Readerdel.icio.us FurlSubscribe with myFeedster
« June 2007 »
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
15
16
17
18
19
20
22
23
24
25
26
27
28
29
30
       
Today

All | General | Java | Business | Fun | Perl | Rant | Ireland | Web
[This is a Roller site]
[Valid Atom 1.0] [Valid RSS]
Technology Blog Top Sites
Blogarama - The Blogs Directory

Blog Directory & Search engine

Blog Flux Directory
Irish Blogs
 View My Public Stats on MyBlogLog.com

Performancing
Enter your Email


Powered by FeedBlitz
Theme adapted from Sotto.
 
Ricebridge XML Manager
  • Convert XML to a table of data
  • Convert XML to CSV, and CSV to XML
  • High-speed, single-pass XPath
  • Memory-stable and fault-tolerant
  • Loads of documentation
  • Cut-and-paste code examples
  • Find a bug, get a gift cert
Ricebridge Java XML Manager Component


Ricebridge CSV Manager
  • Convert CSV to a table of data
  • Handle any type of delimited file
  • Memory-stable and fault-tolerant
  • Loads of documentation
  • Cut-and-paste code examples
  • Find a bug, get a gift cert
Ricebridge Java CSV Manager Component


Popular Posts

 Sign up for MyBlogLog.com
Alertra Website Monitoring Service
Get Chitika eMiniMalls
Solo Tees
BlogJet