Hopefully the company will follow up with you pretty soon after the interview. Sometimes though, either through them being busy, losing track of you, or waiting to see how other candidates turn out, they are slow at replying.
I recommend giving a polite nudge at first. A mail along the lines of “Thanks very much for taking the time to interview me the other day. I had a good time and am very excited about the prospect of working with you. I look forward to hearing from you.”
If the company liked you and wants to hire you, then they’ll likely want to check your references before making you an offer. If they take a long time with any particular stage (e.g. more than a week), then polite nudges are recommended.
Almost everyone gets rejection letters at some point. The key here is to use it as a learning experience and move on, don’t be upset and get depressed. It doesn’t necessarily mean that you were bad, there might have been a stronger candidate, the position might have disappeared due to team restructuring, they might have been after someone with very specific skills/experience etc.
What can you learn?
- Take another look at your resume. Is there something you should add or remove? E.g. Perhaps they liked it when you mentioned that pong game you wrote, and it’s not on your resume.
- Work through the interview questions again. Research the best answers. Make little test programs which implement the solutions to the problems.
- How did you cope with doing answers on a whiteboard? Could you practice this with friends/family in some way?
- If you’d been sat on the other side of the interview table, how would you describe the impression you gave?
Don’t take the rejection too hard - when I applied for jobs in America, five places didn’t even return me a mail (thanks guys:), and then the sixth hired me. Just don’t get bitter, keep coding, and learning from everything you can.