coding dojo: bank ocr outside-in (2015)
TRANSCRIPT
![Page 1: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/1.jpg)
Coding Dojo Vienna:Bank OCR Outside-In
Session 20150428#CodingDojoVie
Peter Kofler, ‘Code Cop’@codecopkofler
www.code-cop.org
Copyright Peter Kofler, licensed under CC-BY.
![Page 2: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/2.jpg)
Peter Kofler
• Ph.D. (Appl. Math.)
• Professional SoftwareDeveloper for 15 years
• “fanatic about code quality”
• I help development teams
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 3: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/3.jpg)
Coding Dojo Mindset
● Safe place outsidework
● We are here to learn● Need to slow down● Focus on doing it right● Collaborative Game
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 4: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/4.jpg)
“London” Constraint*
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
*) London School TDD is Outside-In but Classic TDD can be as well
![Page 5: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/5.jpg)
Outside-In TDD
● build the system from the "outside-in",following the user interaction through all the parts of the system
● (maybe) create a Guiding Test● start with top level interactions/collaborators● create fake dependencies or mock them● implement using TDD until all tests green● move "inside" to previously faked collaborator
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 6: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/6.jpg)
Assignment
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 7: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/7.jpg)
Bank OCR● You work for a bank, which has a machine to assist in reading
letters. The machine scans the paper documents, and produces a file with a number of entries which each look like this: ····_··_·····_··_··_··_··_· ··|·_|·_||_||_·|_···||_||_| ··||_··_|··|·_||_|··||_|·_|
● Each entry is 4 lines long, each line has 27 characters. The first 3 lines contain an account number written using pipes and underscores, and the fourth line is blank. Each account number should have 9 digits, all of which should be in the range 1-9.
● Write a program that can take this file and parse it into actual account numbers.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 8: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/8.jpg)
Prepare
● Find a pair.● Choose a programming language.
● Java: https://bitbucket.org/pkofler/bankocr-kata-setup● JS: https://bitbucket.org/carlosble/bankocr-kata● Py: http://technivore.org/posts/2013/12/23/coding-kata-bank-ocr.html
● See BankOcrTest.java (failing test)● guiding test as starting point.
● Work through outer API
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 9: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/9.jpg)
Don't Focus on Getting it Done.F0cus on Doing
It Perfectly.
![Page 10: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/10.jpg)
Closing Circle
● What did you learn today?
● What surprised you today?
● What will you do differently in the future?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 11: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/11.jpg)
Peter Kofler
@codecopkofler
www.code-cop.org
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
![Page 12: Coding Dojo: Bank OCR Outside-In (2015)](https://reader033.vdocuments.site/reader033/viewer/2022052913/55ab10d21a28ab2a698b462d/html5/thumbnails/12.jpg)
CC Images● Bank https://www.flickr.com/photos/bigmacsc99/4325336251● Dojo
http://www.flickr.com/photos/49715404@N00/3267627038/● London https://www.flickr.com/photos/damski/8019978119● Wants you http://www.flickr.com/photos/shutter/105497713/
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY