Practice Code Kata’s And Learn
A code kata is, as I see it, how to take a requirement, break it down into a list of simple tasks and then write the code to solve those problems, pretty much what a developer would normally do anyway but you could tackle the problem using different coding languages/styles/patterns.
The reason I think code katas are interesting is as follows:-
- It will help you learn to use TDD – Use Test Driven Development to write a test before you write the code, write the test, run it so it fails, then write the code to make the test pass and that’s all, do this for each part of the problem your trying to solve.
- Estimate how long you think it will take to complete, then time yourself and see how long you take to complete the code kata.
- Help improve your typing skills and learn shortcut keys as you try to be more productive and learn to do the kata quicker each time.
- Use them at interviews to test your interviewees, see what they come up with and how they think rather than asking them about something they googled the night before the interview.
- The best way to learn how to code well is to practice, just like a musician needs to practice, good developers practice too.
As a good starting point take a look at Roy Osherove’s string calculator – this can be done using a number of different code languages.
More code Kata’s can be found below:-
Let me know if you find any more and I will add to the list.