product development and tools
TRANSCRIPT
![Page 1: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/1.jpg)
Improving your product development processA view on the tools that help us improve
![Page 2: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/2.jpg)
Roelof ReitsmaLead developer Coconut team
Favorite gems:Bundler & Capistrano
Favorite tools:Gerrit & Jenkins
When I'm not working: cycling, running and creating an awesome meal!
![Page 3: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/3.jpg)
Goal:
Show two challenges we encountered developing our product
Demonstrate how two tools help us improve (which might be useful for you)
![Page 4: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/4.jpg)
Contents
● An introduction to Coconut● First challenge: reliability● Second challenge: changeability● Conclusion
![Page 5: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/5.jpg)
Introduction to Coconut
● An private social network● Development in Ruby on Rails since 2008● Started as our intranet application● Focus on sharing knowledge● Competing with
– Any other intranet solution
– Enterprise social networks
– Sharepoint
![Page 6: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/6.jpg)
Introduction to Coconut
Start of the project● The first release syndrome● Novice level developers● The 80% done developer
Lead to some “pretty horrifying code”
![Page 7: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/7.jpg)
Hall of shame
Examples?
![Page 8: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/8.jpg)
Hall of Shame
![Page 9: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/9.jpg)
Hall of Shame
![Page 10: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/10.jpg)
Hall of Shame
![Page 11: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/11.jpg)
Hall of Shame
![Page 12: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/12.jpg)
Hall of Shame
![Page 13: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/13.jpg)
Hall of Shame
![Page 14: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/14.jpg)
Hall of Shame
![Page 15: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/15.jpg)
Hall of shame
And sometimes some weird structures as well
![Page 16: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/16.jpg)
Challenge 1: reliability
● Application would break randomly● No way of telling up front if things are OK
or not● Fixing or creating bugs?
![Page 17: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/17.jpg)
Challenge 1: reliability
Solution: do test driven development
Then you must have CI!● otherwise no-one will run tests● or say: it works on my PC!
![Page 18: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/18.jpg)
Challenge 1: reliability
Introduce Jenkins (prev. Hudson)● Open source tool for CI● Java webapplication● Highly configurable ● Easy to create your own scripts
![Page 19: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/19.jpg)
Challenge 1: reliability
Main advantage of CI:
Instant feedback!
![Page 20: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/20.jpg)
Challenge 1: reliability
What do we do in a Jenkins build?– Create sandbox
– Check basics (bundle, database setup etc)
– Run specs
– Run integration specs
– Run acceptance specs
– Create review site
– Check if site runs at all
![Page 21: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/21.jpg)
Jenkins: each git branch has a build
![Page 22: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/22.jpg)
Jenkins: build queue
![Page 23: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/23.jpg)
Jenkins: commits per build
![Page 24: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/24.jpg)
Jenkins: review builds
![Page 25: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/25.jpg)
Jenkins: review login page
![Page 26: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/26.jpg)
Jenkins: review site
![Page 27: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/27.jpg)
Jenkins: Chuck Norris plugin!
Build failed? Chuck's not happy
![Page 28: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/28.jpg)
Jenkins: Chuck Norris plugin!
Build succeeded?
![Page 29: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/29.jpg)
Challenge 2: changeability
You are going to write all code at least twice. And that's not even considering change.
● How hard is it to refactor?● How fast can you change functionality?
![Page 30: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/30.jpg)
Challenge 2: changeability
● Less changeable if– Untested code
– Hard to read code
– Code duplication
– Invalid comments
– Unused code
– Bad naming
![Page 31: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/31.jpg)
Challenge 2: changeability
Solution: do code reviews
But how?● First: define the process● Second: choose the tool
![Page 32: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/32.jpg)
Challenge 2: changeability
Goal: prevent erroneous or bad code to get into central repository
1)Developer submits commit
2)CI checks commit for errors
3)Other developer reviews code
4)When both OK: code submitted to main repository
![Page 33: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/33.jpg)
Challenge 2: changeability
Introduce Gerrit● Open source code review tool● Java webapplication● Highly configurable ● Jenkins integration available
![Page 34: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/34.jpg)
Challenge 2: changeability
Main advantage of code reviews
You learn a lot by reading other people's code!
![Page 35: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/35.jpg)
Gerrit: list of reviewable commits
![Page 36: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/36.jpg)
Gerrit: list of reviewable commits
![Page 37: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/37.jpg)
Gerrit: list of reviewable commits
![Page 38: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/38.jpg)
Gerrit: commit view
![Page 39: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/39.jpg)
Gerrit: commit view
![Page 40: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/40.jpg)
Gerrit: commit view
![Page 41: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/41.jpg)
Gerrit: diff patchsets
![Page 42: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/42.jpg)
Gerrit: diff patchsets
![Page 43: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/43.jpg)
Gerrit: grade commit
![Page 44: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/44.jpg)
Gerrit: DONE!
![Page 45: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/45.jpg)
Oh no! We've abandoned HENK?
![Page 46: Product development and tools](https://reader033.vdocuments.net/reader033/viewer/2022051617/55a5bc8f1a28abd2368b4679/html5/thumbnails/46.jpg)
Conclusion
● We drastically improved quality by doing TDD and code reviewing
● Jenkins and Gerrit are nice tools that are free, offer lots of features and do the job well
● However, tools are less important. Choosing the correct process is.