prime factors code kata (2010)

12
Prime Factors Code Kata Java Student User Group April 2010 Peter Kofler, ‘Code Cop’ @codecopkofler www.code-cop.org Copyright Peter Kofler, licensed under CC-BY.

Upload: peter-kofler

Post on 20-May-2015

583 views

Category:

Technology


0 download

DESCRIPTION

This are only slides, the actual demo is not included.

TRANSCRIPT

Page 1: Prime Factors Code Kata (2010)

Prime Factors Code KataJava Student User Group

April 2010

Peter Kofler, ‘Code Cop’@codecopkofler

www.code-cop.org

Copyright Peter Kofler, licensed under CC-BY.

Page 2: Prime Factors Code Kata (2010)

Peter Kofler

• Ph.D. (Appl. Math.)

• Professional SoftwareDeveloper for 11 years

• Lead Developer at System One

• fanatic about code quality

PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY

Page 3: Prime Factors Code Kata (2010)

The Prime FactorsKata

Page 4: Prime Factors Code Kata (2010)

Robert C. Martin(“Uncle Bob”)

Page 5: Prime Factors Code Kata (2010)

Software Craftsmanship

Page 6: Prime Factors Code Kata (2010)

CraftsmanshipOver Crap

Page 7: Prime Factors Code Kata (2010)

The Requirements.

• Write a class named “PrimeFactors” that has one static method: generate.– The generate method takes an integer

argument and returns a List<Integer>.– That list contains the prime factors in

numerical sequence.

http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata

PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY

Page 8: Prime Factors Code Kata (2010)

Demo

Page 9: Prime Factors Code Kata (2010)

Keep the bar green to keep the code clean

Page 10: Prime Factors Code Kata (2010)

Thank You

Page 11: Prime Factors Code Kata (2010)

Peter Kofler

@codecopkofler

www.code-cop.org

PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY

Page 12: Prime Factors Code Kata (2010)

Links

• General– http://en.wikipedia.org/wiki/Robert_Cecil_Martin– http://en.wikipedia.org/wiki/Software_craftsmanship

• Kata– http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata– http://en.wikipedia.org/wiki/Kata_(programming)

• Images– karate: http://www.flickr.com/photos/the-consortium/5301698212/– red-green: http://www.flickr.com/photos/30830597@N08/3630649274/– questions: http://www.flickr.com/photos/seandreilinger/2326448445/

PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY