I want to share my coding interview experience, so i have decided to write blog series about questions that are asked and this is first one in that series.
Coding interview are very common these days and if you find company that does not have it as part of selection process then i think you should stay away from them.
Lets start with why coding interview is required and reason is very simple especially in times when every company is adopting agile and they don't want to wait for months after hiring to know about coding skills of developer.
So that is the reason why it is the first gate that you have to pass as developer.
Jeff Atwood share interesting experience about why-cant-programmers-program and type of question that is asked to filter out candidate. FizzBuzz is very good question to start with.
I would advise to try FizzBuzz to make sure you are not surprised and think about testing also because we are in world of TDD.
What types of question are asked
Different types of question are asked in coding interview and it depends on type of company you apply
- Algorithms & Data structures
This is very common for Silicon valley company or product development company and some serious preparations is required for these types of interview if your daily work involves only playing with frameworks(i.e hibernate/spring etc).
Things become more difficult for such interview because may developers(like me) are focused so much on learning emerging framework to build bleeding edge Resume that we tend to forget basic algorithm and start tagging ourself as some XYZ framework developer and company also help to the cause by putting such job requirement.
- Simple problems using TDD
This type of questions is also very common and it is make sure that you don't leave testing to QA team and write a code that is defect free , easy to understand and maintainable.
- Refactoring problems
You don't work on green field project every day and most of the time is spent in reading others code and adding features to it, so employer want to know "how do you quickly understand code written by somebody else and add new feature to it".
TDD becomes more important in such questions because it can be used to build all the safety net around existing code before you start changing it.
Above question can be asked as pair programming question or take a home type of question, so you have to build solution based on time given to you.
Some of the things employer wants to check are
- Simplicity/Readability of code.
- Maintainability of code.
- Design principal usage.
Bottom line is you have to prepare for coding interview to survive in fast changing market.
Stay tuned up for questions.