views:

136

answers:

2

Am in the preparation for an interview. I guess that there will definitely be around one hour to spend in discussing about a problem which the interviewer will present to me...

So what i would like to do is, prepare for such a thing right now. If i get such programming problems, i will start to discuss with my friends and get practiced with that.

Any programming problem is fine. It would be great that, if some interviewer can post what kind of programming problem you would be discussing with the interviewee.. Or any experts who can help me by posting such a question is also fine.

I dont want answers or general interview Q/A. I am in need of programming problems to discuss, dig into it .. discuss.. and continue .. Kind of forming algorithms.

I am a perl programmer, if the problem is related to that, and solvable in perl, it would be good. But anyway anything is fine, as they are very much interested in problem solving skills more than programming skill. Additional info, i am an advanced user in Linux ( but not sysadmin ).

Notes:
1. I know it is a very general question, so i taken enough care to explain as clearly as possible. If something is missing, kindly help me in finding out the right answer.
2. I understand a lot of experts gather here, so this is the very right place to ask this question.

Thanks a lot for everybody who helps in improving myself, by answering this question.

Update: Accepting brian's reply.. And i will call myself as a Perl programmer instead of expert. Thanks brian.

+2  A: 

The book Programming Pearls is full of good questions and discussions, and often turned into interview questions.

sarnold
+5  A: 

I ran into an interesting Perl problem a couple months ago.

Explain when and why

 system( 'sleep 86400' );

is better than

 sleep 86400;

A lot of people rush to what they think is an obvious answer, but the person using system was no dummy.

Two interview questions that I like to ask are:

Also remember, however, that 9 out of 10 people that call themselves expert in something are just setting themselves up for failure in an interview. :)

brian d foy
It's a long sleep (1 day) so you might want to interrupt it. Using `system` you can kill the external sleeping process and let the script continue. This is not possible when using `sleep`, cause you'd kill the whole script.
kixx
Out of curiosity, what would be a good usecase for a long (12h+) sleep (by either method) that wouldn't be better accomplished by cron/at?
szbalint
Unless you're hiring someone to program in 5 different languages at equal skill, asking what they hate about their language isn't a very good question imo. If someone asked me that, and I program solely in C#, I would have no answer for it as I don't use any other languages that do things that C# cannot.
SLC
@szbalint: I used a 24 hour sleep on an embedded system because there was no cron daemon available. (Of course, there was no perl available either. I used the Posix shell instead.)
Jochen Walter
@szbalint: cron/at are not blocking operations... potentially one would want the process to be already running but dormant (in the middle of a sleep), but wakeable via a signal.
Ether
@SLC: if there aren't things that you wish C# did differently, without knowing anything else about any other language, I would say that I don't think you've done enough in C#. That's the point of the question. Surely something in C# annoys you and you can find 5 things to change that would make your job easier.
brian d foy
@Brian: I don't understand, C# is to programming what a piece of paper is to an origami crane. I can't criticise the paper any more than I can criticise C#, they are just the tools that I use to create the finished product. I can't think of one thing I'd change because I don't know what's better.
SLC
Well, I guess there's no hope for you then. I can probably list 15 ways I'd want paper to be better. Your answer, however, shows how valuable and creative you might be. It's something you should try to improve.
brian d foy