Upcoming SlideShare
×

# ProgrammingKatas

2,712 views

Published on

Programming Kata is a practice to improve your programming skills through something called "deep practice"

1 Comment
3 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Great tips.
www.softwarecraftsmanship.org seems to be down. :-(

Are you sure you want to  Yes  No
Views
Total views
2,712
On SlideShare
0
From Embeds
0
Number of Embeds
585
Actions
Shares
0
35
1
Likes
3
Embeds 0
No embeds

No notes for slide

### ProgrammingKatas

1. 1. programming Katas
2. 2. “If I would have had time...”
3. 3. “You will never have time! ”
4. 4. you can be faster
5. 5. Practice makes YOU better...
6. 6. deep Practice makes YOU...
7. 7. perfect
8. 8. Should be challenging the kaizen way
9. 9. Should be REpeated many times
10. 10. Should receive feedback (be the best, be the worst)
11. 11. perfect
12. 12. Kata String calculator Original kata by Roy Osherove from http://osherove.com/tdd-kata-1
13. 13. 1. Create a simple String calculator with a method Add(string numbers). • can take an unknown amount of numbers separated by a comma, and will return their sum • for an empty string it will return 0 • for “1” it will return 1 • for “1,2” it will return 3 • for “5,7,10,3” it will return 25 Original kata by Roy Osherove from http://osherove.com/tdd-kata-1
14. 14. 2. Allow the Add method to handle new lines between numbers (instead of commas). • for “1n2,3” it will return 6 • make sure you only test for correct inputs. There is no need to test for invalid inputs for these katas Original kata by Roy Osherove from http://osherove.com/tdd-kata-1
15. 15. 3. Allow the Add method to handle a different delimiter. • the beginning of the string can contain a separate line that looks like this “//[delimiter]n[numbers…]” • for “//;n1;2” it will return 3 • for “//;n1;2n3;1” it will return 7 Original kata by Roy Osherove from http://osherove.com/tdd-kata-1
16. 16. 4. Delimiters can be of any length with the following format “//[delimiter]n”. • for “//***n1***2***3n2***2” it will return 10 Original kata by Roy Osherove from http://osherove.com/tdd-kata-1
17. 17. 5. Calling Add with a negative number will throw an exception “negatives not allowed” - and the negative that was passed. • if there are multiple negatives, show all of them in the exception message Original kata by Roy Osherove from http://osherove.com/tdd-kata-1
18. 18. MORE Katas on http://katas.softwarecraftsmanship.org/
19. 19. Questions?