maanantai 7. marraskuuta 2011

Saturday Night Kata: My First Code Kata, Part 1

I am ashamed to admit that I haven't done any code katas until last saturday. I train somehow regularly, do prototypes and pocs, but I have never picked any katas and just executed them in "kata way" (whatever that means). But now I had some stuff to learn and it seemed a good idea to use code kata to learn them.

And here are my goals:
  1. Learn use Eclipse shortcuts better (mainly for executing unit tests and changing tabs and views).
  2. Training TDD, I'm still novice in that (I think) so I need all training I can get.
  3. Train mocking with Mockito. I have used it, but not so much, so I still need  some practise.
  4. Test some basic Java 7 stuff, like switch -statement with Strings and try-with-resources statement.
  5. Learn some basic Git commands and how to work with github.
  6. May be test some new eclipse plugins, I haven't used before.
But first I had to find some kata to do, and of course I used Google and found my way to http://www.codingdojo.org/. There seems to be lots of interesting katas there. I picked KataBankOCR because in that I have to do some file handling too (resources) and I there are multiple parts and user stories to do (I needed some "big" project to cover all those goals I had. And writing simple parsers is always fun.

Now I have achieved part of those goals and results are here. I have still lots of things to do, but I learned some important things like set up Git -> github connection and how to use it. I also remember how to change tabs and execute test using shortcuts in Eclipse.  But there are still some things in my todo -list:
  1. File handling (goal 4.)
  2. Some refactoring (that switch statement in that parser class is ugly).
  3. Maybe more tests.
  4. Cover all use cases of course, we have to always make business people happy :)
  5. Mockito stuff (I think I gonna use it in my file handling unit tests, but also have to create some integration test for that part too).
To Be Continued...