views:

1022

answers:

12

In my college we used Little Man Computer projects to discover how processors and simple commands work.

We try to give unique "homework assignments" to our interviewees between their initial and their second interviews. These projects are designed to discover things about their programming personality.

I'm sure I can find places online who provide some kind of usuable LMC model.

My primary concern with a Little Man Computer problem, is whether or not people know about it. If someone doesn't know it, if it would be hard to learn. It seems that 2/5 of my co-workers have not heard of LMC.

Would a simple program on LMC be too "hard" of a project to assign for the 4-5 days between interviews? We try to assign something that should only take 3-4 hours to write (Fibonacci Sequence, Binary Tree Sorting, etc). Would the learning curve on this be too high?

Could those of you who have not heard of LMC, look it over and tell me if you think it would be hard to figure out (I have a biased opinion. I love LMC).

Thanks in advance!

http://en.wikipedia.org/wiki/Little_man_computer

Edit: This task to would be given to people applying for a position where the ability to learn weird languages and models (figuring out legacy systems), and debugging code on programs written 10-20 years ago is VERY HELPFUL. The idea for this task was to help us find someone who is willing to dive into something and be able to research what they need to and figure it out on their own. Going for the "I can figure out almost anything" person.

+3  A: 

Every CS Major is required to take an architecture course, program in Assembly and write these types of LMC programs (although I have never heard of this term before). Being a 'fair' assignment really depends on what you're hiring for. If the job is an Assembly programming position it's a fair assignment. Otherwise, this is a very un-fair interview assignment. If I were interviewing for a Java position and the interviewer asked me to program something like this I would re-evaluate why I wanted the job. If you're going to give a programming assignment it should either be in the language you're hiring for or a pseudo-code assignment.

Lisa
Well, the LMC can be written in any language. What would make the Java programmer less likely to complete this exercise than an Assembly programmer?
Esteban Brenes
I program in Java so that I don't have to program with low-level instructions.
Lisa
A: 

It doesn't seem very hard, but then again I like Brainfuck. The problem this kind of problem has is that you can only give it to someone who is interviewing for a low-level assembly programming kind of position, other people might find it bizzare if they are interviewing for say a ASP.NET developer job and you ask them about this kind of stuff. So it's a matter of targetting the geek personality, which you probably want, but you also need to look for some other sings that the person will be a valuable member of your team, and capable of doing the actual work that they'll be required to do.

kokos
I never heard of Brainfuck before now either...looks mildly amusing. Maybe I'll figure this out while I'm figuring out LMC.
BenAlabaster
+1  A: 

Definitely depends on the kind of job your interviewing for and what you are looking for in an employee. I've never heard of LMC before, the classes I took for my BS were Assembler and Compiler, which touched on this subject.

If you're trying to weed out the experienced and devoted developers from the hobbyists, then sure, this could be a worthwhile trip. A lot of amateur developers will see a new language, especially one that is reduced English and freeze, others will see this for what it is and welcome the challenge.

Also consider that some people just don't have time to learn a new syntax/language, and could 'fail' because of this, ie. family obligations, commutes, life in general.

For a low-mid range job I certainly wouldn't do it between 1st and 2nd interview. I also would make sure not to 'grade' someone on completeness or accuracy, and more in the execution (did they understand the task) and personality of it (were they p/o'd they had homework, did they enjoy it, etc.)

Now I'm gonna spend the rest of my day writing LMC's! :-)

Adam
You've made great points. Thanks for your input!
Jeremiah
+2  A: 

I like the LMC as an educational tool. It's a great way of teaching assembly concepts without all the complexity of real assembly.

I even wrote a LMC compiler/vm that can be programmed in "byte code" or mnemonics.

http://www.atkinson.yorku.ca/~sychen/research/LMC/LMCHome.html (This was written for a specific purpose and only has direct addressing)

(I also wrote most of the early drafts of the Wikipedia)

However, I believe that beyond the halls of academia, its use is limited.

I certainly wouldn't ask anyone to learn a new syntax during the interview, but with a 4 day break, it might be fair. The real issue then becomes whether or not you can make a case for including a LMC program in the hiring decision matrix.

I think you'd be better off with some of the more classic assignments done under a time limit, or even on paper -- Fibonacci, recursive factorial, Binary Search of a sorted array in a language that you actually use than to introduce a new language that really doesn't have much practical use. At least this way, you can test someone's fundamentals.

chris
+2  A: 

As you say:

Going for the "I can figure out almost anything" person.

I've never programmed in LMC (or even heard of it before this question), and given your link and your example of writing out the Fibonacci sequence, I think I'm going to sit down tonight and figure it out. I mean, a programming language is a programming language no?

In my mind, if you're a programmer, it doesn't matter what the language is - it's just syntax and paradigms. Either you can figure out the paradigms and syntax or you can't.

I like to challenge myself. Given that this is a take home assignment and they're given 4-5 days to figure it out, I think it's a great tool. I reckon (assuming that I get the time for this between work and my wife telling me I'm spending too much time on the computer and not enough with her and the family) that within 5 days I could figure it out.

So I think it's a fair assignment. I mean, so long as you're not expecting a completed assignment but expecting a show of how the person approached the problem and could show workings of how they're working towards a solution...

It's like it was in math at school right? You might get almost full marks with an incorrect answer but good logic. Or you might get almost no marks despite having the right answer because you couldn't demonstrate how you came to that answer.

BenAlabaster
A: 

Never heard of it, but having done assembly on many different processors over the past 40+ years, it's simple enough.

Is it fair?

Like others have said, it depends on what you're looking for.

If you just want a 1 year Java guy, it's not. If you want someone with a visceral feel for computing, it would be quite fair.

cookre
A: 

balabaster is on the right track. Programming has nothing to do with coding language - it's all about algorithms and the basic building blocks of assignments, iterations, conditionals...

What's the hardest programming language to learn? Your second one.

cookre
A: 

I've never heard of it before. Giving the wiki a once-over, it's Yet Another Assembly Language & Processor.

If you are hiring people who need to be able to get up to speed on arcane stuff fast, yes, it works. Personally, I'd suggest a Zilog or PIC problem, just because of its Real World(tm) nature.

Paul Nathan
Eugh! I know a guy who used to write PIC... he hated it. But we got sent to Puerto Rico on assignment to fix an app that used it. I liked that bit.
BenAlabaster
It's more the idea that PIC and Zilog are a bit *weird*(at least from my cursory readings about them).
Paul Nathan
+1  A: 

What's your goal? To find out if they can program a Von Neumann architecture? If you want to find out if they really "get it", have them implement LMC.

Looking at the wikipedia spec, I think it would take me your three or four hours to knock it out and have it running in a console. Examining the subsequent code will tell you much more about your candidate than having them code to the machine.

plinth
+2  A: 

As many others have said, I think it strictly depends on the relevance to the job that is being applied for (and this would be pretty limited). There are many developers out there that did not get a degree in CS, so they have probably never been exposed to low level instructions sets. This does not diminish their ability for solving higher level application problems.

I also think you would lose a lot of experienced candidates if you have any expectation of them doing 'homework' between interviews.

  • You don't typically know if you get a second interview immediately after the first, since the idea is to shortlist after all candidates have been interviewed.
  • If they are currently working and have a family, then they probably don't have a lot of free time.

The idea seems a little odd anyway since you have no way to evaluate how someone derived the end product (google, colleagues...). When giving someone something to solve for an interview, I want to see how they go about finding the solution more so than what the end result is. Typically you want to evaluate their skills of logic and deductive reasoning in solving a problem.

Robin
A: 

I can envision myself writing this in python over the course of a few hours. Which probably means it would take me less than a couple days. Probably not too hard. Ask again in a couple days and half the people who answered this question will be respond, "No, it's not too hard. I did it in only [xx] time!"

Brian
A: 

LMC is just basic assembly. The problem here is that it would not be a challenge for someone who knows assembly.

I would personnaly give them multiple types of coding (functional, assembly, procedural, pure OO) problems where they have the code and must explain the program and an error or a possible integration problem.

Else, just give them something to make in BrainFuck.

Loki