14

Click here to load reader

Code Kata

Embed Size (px)

DESCRIPTION

Do you ever feel like you are just spinning your wheels at work doing the same thing? Maybe you are solving problems but never really increasing your knowledge? The tech industry is constantly changing and evolving and to keep up with the latest technologies can be difficult. Code Kata is a technique that can help sharpen your skills and stay up with new technologies. Whether you are an experienced software developer or fresh out of college, come join us to learn more about how code kata can help you sharpen your skills as a software developer. If you have a laptop bring it! We plan to pair-program through some actual code katas. It will be a fun night of learning and as always a great time to get to know more people in the Central Arkansas Tech Community.

Citation preview

Page 1: Code Kata

CODE KATASTHE ZEN OF CODING

by / Paul Gower @paulmgower

Page 2: Code Kata

ABOUT ME

Computer Science Degree

Alltel Client/Server University -

Developing Enterprise Software for over 12 years

Worked at Big, Small, and now a Consulting Company

Dr. Dobbs Article

Page 3: Code Kata

OVERVIEWWhat is a Code Kata?

Why Code Kata?

How to get involved in the community.

Let's Code Kata!

Page 4: Code Kata

WHAT IS A CODE KATA?

( wikipedia)

Code Kata is a term coined by DaveThomas, co-author of the book The

Pragmatic Programmer, in a bow to theJapanese concept of kata in the martial

arts. A code kata is an exercise inprogramming which helps a programmer

hone their skills through practice andrepetition.

Kata (programming)

Page 5: Code Kata

WHY CODE KATA?

( Steve Yegge blog)

Contrary to what you might believe, merelydoing your job every day doesn't qualify as

real practice.

practicing programming

( Scientific American article)

Ericsson argues that what matters is notexperience per se but "effortful study,"

which entails continually tacklingchallenges that lie just beyond one's

competence.

The Expert Mind

Page 6: Code Kata

EFFORTFUL STUDY

( Jeff Atwood blog)

...tackling problems at the very edge ofyour ability. Stuff you may have a high

probability of failing at.

The Ultimate Code Kata

Page 7: Code Kata

CENTRAL ARKANSASCODE KATA

HTTP://CODEKATA.CO

MULTIPLE PHASES

Page 8: Code Kata

PHASE 1

SUNDAY, AUGUST 25, 2013

Bi-weekly Code Kata posted on Sunday afternoon to the website

Post your answer following the instructions that will belisted in the post.

codekata.co

Page 9: Code Kata

PHASE 2

IN THE FUTURE

Community will rank the best solution

Sponsorship to give the highest voted answer a prize

A regular meetup to Pair-Program Code Katas

Page 10: Code Kata

LET'S CODE KATASTRING REVERSEImagine a time when you didn't have a framework method that would take a string as input and return the reverseof it.

TASK

Create a method that takes a string as an input and returns the reverse of the string. Use whatever programminglanguage you prefer to solve this problem.

INPUT

Use the following items as example inputs:

"Hello World"

"Here we go."

"Code Kata is fun!"

OUTPUT

These are the outputs you should expect from the above inputs:

"dlroW olleH"

".og ew ereH"

"!nuf si ataK edoC"

Page 11: Code Kata

FIZZBUZZFizzBuzz is an old school kata that has been floating around the internet for a while. If you have solved thisproblem before then we encourage you to use a different language.

TASK

Your task is to write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" insteadof the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and fiveprint "FizzBuzz". Use whatever programming language you prefer to solve this problem.

INPUT

None.

OUTPUT

Output either i, "Fizz", "Buzz" or "FizzBuzz" depending on if the i is divisible by three or five.

REFERENCE

Thanks to for this .Jeff Atwood's blog Kata

Page 12: Code Kata

REVERSED BINARY NUMBERSYi has moved to Sweden and now goes to school here. The first years of schooling she got in China, and thecurricula do not match completely in the two countries. Yi likes mathematics, but now... The teacher explains thealgorithm for subtraction on the board, and Yi is bored. Maybe it is possible to perform the same calculations onthe numbers corresponding to the reversed binary representations of the numbers on the board? Yi dreams awayand starts constructing a program that reverses the binary representation, in her mind. As soon as the lectureends, she will go home and write it on her computer.

TASK

Your task will be to write a program for reversing numbers in binary. For instance, the binary representation of 13is 1101, and reversing it gives 1011, which corresponds to number 11. Use whatever programming language youprefer to solve this problem.

INPUT

The input contains a single line with an integer N, 1 ≤ N ≤ 1000000000.

OUTPUT

Output one line with one integer, the number we get by reversing the binary representation of N.

REFERENCE

Thanks to for this . They have some great puzzles on their site and I'm sure we'll use someof them as we continue to code kata.

spotify's job site Kata

Page 13: Code Kata

RESOURCES - our new website to do code katas! (Big thanks goes

to for setting this up!)

- a good website with information about CodeKatas (older but still informative)

by

by

by

- Steve McConnell's website is a greatresources to learn more about how to be a better software developer.

http://codekata.co@_davidhudson

http://www.codekata.com

The Ultimate Code KataJeff Atwood

Practicing ProgrammingSteve Yegge

Given I like reading Source Code by the fire with my smoking jacket andbrandy snifer, a list of books

Scott Hanselman

http://www.stevemcconnell.com