|✅|Defensive coding. Check for nulls, empty collections, etc.|
|✅|Explain what you are coding/typing to the interviewer, what you are trying to achieve.|
|✅|Type/write at a reasonable speed.|
|✅|Write in a modular fashion. Extract out chunks of repeated code into functions.|
|✅|Use the hints given by the interviewer.|
|✅|Practice whiteboard space-management skills.|
|✅|Demonstrate mastery of your chosen programming language.|
|❌|Remain quiet the whole time.|
|❌|Spend too much time writing comments.|
|❌|Use extremely verbose variable names.|
|❌|Copy and paste code without checking.|
|❌|Interrupt your interviewer when they are talking. Usually if they speak, they are trying to give you hints or steer you in the right direction.|
|❌|Write too big (takes up too much space) or too small (illegible) if on a whiteboard.|
### 5. After Coding
|| Things |
|-|-|
|**Do's**|Scan through your code for mistakes as if it was your first time seeing code written by someone else.|
||Check for off-by-one errors.|
||Come up with more test cases. Try extreme test cases.|
||Step through your code with those test cases.|
||Look out for places where you can refactor.|
||Reiterate the time and space complexity of your code.|
||Explain trade-offs and how the code/approach can be improved if given more time.|
|**Don'ts**|Immediately announce that you are done coding.|
||Argue with the interviewer.|
|✅|Scan through your code for mistakes as if it was your first time seeing code written by someone else.|
|✅|Check for off-by-one errors.|
|✅|Come up with more test cases. Try extreme test cases.|
|✅|Step through your code with those test cases.|
|✅|Look out for places where you can refactor.|
|✅|Reiterate the time and space complexity of your code.|
|✅|Explain trade-offs and how the code/approach can be improved if given more time.|
|❌|Immediately announce that you are done coding.|
|❌|Argue with the interviewer.|
### 6. Wrap Up
|| Things |
|-|-|
|**Do's**|Ask questions. More importantly, ask good and engaging questions that are tailored to the company! Pick some questions from [this list](../non-technical/questions-to-ask.md).|
||Thank the interviewer.|
|**Don'ts**|End the interview without asking any questions.|
||Ask about your interview performance. It can get awkward.|
|✅|Ask questions. More importantly, ask good and engaging questions that are tailored to the company! Pick some questions from [this list](../non-technical/questions-to-ask.md).|
|✅|Thank the interviewer.|
|❌|End the interview without asking any questions.|
|❌|Ask about your interview performance. It can get awkward.|