Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rise of the Machines - Automate your Development

70,908 views

Published on

When we talk about automation in software development, we immediately think of automated builds and deployments. We may also be using scripts to help make our daily work easier. But this is really just the beginning of the rise of the machines.
I show you how leading developers in our industry are using open source and commercial tools for automating much more. They've got "robots" for monitoring production servers, updating issues, supporting customers, reviewing code, setting up laptops, doing development reporting, conducting customer feedback -- even automating daily standups. In what instances is it useful to automate? In what cases does it not make sense? Automation prevents us from having to do the same thing twice, helps us to work better together, reduces workflow errors and frees up time to write production code. Plus, as it turns out, spending time on automation is fun! Don't be afraid of robots in software development, embrace them! Even if I save you just half an hour a week, this talk will be a beneficial investment of your time.

Published in: Software
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @ https://www.ThesisScientist.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @ https://www.ThesisScientist.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Finally i found something that changed my life, if you need to change yours just watch the video here http://bit.ly/changesvideo Hope it helps you as it helped me!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Now, change your life Now! No more excuses, watch the video http://bit.ly/changesvideo
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Rise of the Machines - Automate your Development

  1. Rise of the machines Automate your development @svenpet
  2. Disclaimer Scripts Chef, Puppet, etc better build pipelines
  3. Disclaimer Ideas through examples
  4. Rise of the machines
  5. ROBOTS are coming to our day to day lives
  6. Rise of the machines IN Software Development
  7. Sven Peters Atlassian Evangelist @svenpet svenpet.com
  8. Automation in Software Development my personal story build scripts (make) 1996 JUnit 2001 2004 ant -> later maven 2005 Eclipse (code generation) Hudson 2006 2009 Puppet 1998 GUI builder 2013 Docker
  9. Build & Tests Deployments Small scripts What are we automating right now?
  10. What are we automating right now? Code Reviews Stand Ups Ops Support Merging Engineering Health
  11. Bots everywhere Coding bots Ops bots Service bots Doc bots Report botsTest bots
  12. Welcome… or I’m new
  13. Add ons Postgres Scala IntelliJ Git JDK Happy installing & setup… for the next 8 hours
  14. Agent CharlieMeet
  15. Download Install Configure Agent CharlieMeet
  16. Download Install Configure Agent CharlieMeet
  17. Puppet, Shell & Ruby Works with OSX & Ubuntu Atlassian Plugin SDK Bitbucket SSH Keys Git Mercurial HipChat HomeBrew IntelliJ IDEA JDK Maven PostgreSQL Stash Keys and much more…
  18. Without Agent Charlie With Agent Charlie
  19. Coding bots Automate your Coding phase
  20. 27’’ is not enough
  21. Chat Email Repo manager IDE Command line Issue Tracker
  22. Issue tracker workflow TODO IN PROGRESS IN REVIEW DONE
  23. BRANCH CODE REFACTOR PULL MERGE Developer workflow
  24. BRANCH CODE REFACTOR PULL MERGE What you should do TODO IN PROGRESS IN REVIEW DONE
  25. BRANCH CODE REFACTOR PULL MERGE What you do TODO IN PROGRESS IN REVIEW DONE
  26. Keep the team updated!
  27. Smart commits mention issue_key and #trigger the issue tracker Github JIRA YouTrack Trello Bitbucket
  28. Control the issue by commits TODO IN PROGRESS IN REVIEW DONE JRA-566 #start-Progress JRA-566 #start-review fixes #566
  29. No tool switching Robot is just receiving commands
  30. TODO IN PROGRESS IN REVIEW DONE branch commit Controlled by action pull create review request merge close review
  31. Our workflow TODO IN PROGRESS IN REVIEW DONE branch pull merge
  32. branch pull merge master JRA-554-bugfix
  33. branch pull merge master commits code directly to the master branch!
  34. branch pull merge master
  35. branch pull merge master JRA-554-bugfix
  36. branch pull merge master JRA-554-bugfix
  37. bad surprise sh*t happens, but can be avoided
  38. bad surprise sh*t doesn’t happen that often no
  39. branch pull merge don’t branch from a red build master JRA-554-bugfix
  40. branch pull merge master JRA-554-bugfix invite the best reviewers
  41. Recent comitters or author
  42. auto suggest reviewer
  43. branch pull merge minimum 2 approvals master JRA-554-bugfix
  44. branch pull merge unapprove reviewers when code changes master JRA-554-bugfix
  45. The need to update older versions
  46. master Version 1.1 Version 1.0 Support older versions
  47. master Version 1.1 Version 1.0 JRA-234-hotfix Support older versions
  48. master Version 1.1 Version 1.0 JRA-234-bugfix Support older versions boring!
  49. Huhu I can do it!
  50. master Version 1.1 Version 1.0 JRA-234-bugfix auto merges
  51. Test bots SMARTER Test Automation
  52. &:hover { text-decoration: none; color: @invertedBodyTextColor background-color: #366ca6; cursor: pointer; }
  53. &:hover { text-decoration: none; color: @invertedBodyTextColor background-color: #366ca6; cursor: pointer; } Static code analysis can catch this! Findbugs - Checkstyle - PMD
  54. Listen to what Freud tells you about source codeyour
  55. Freud Bot &:hover { text-decoration: none; color: @invertedBodyTextColor background-color: #366ca6; cursor: pointer; } You should use a variable instead for . I suggest that you use a variable of similar color:#366CA6 @globalHeaderPrimaryActionFallbackColor @globalHeaderTopColor @primaryLinkColor
  56. Freud Bot for Pull Requests
  57. Freud Bot less review work makes suggestions
  58. We are trying hard to write awesome code
  59. package com.miguelcatalan.materialsearchview; import android.app.Activity; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; import java.lang.reflect.Field; import java.util.List; /** * @author Miguel Catalan Bañuls */ public class MaterialSearchView extends FrameLayout implements Filter.FilterListener { private MenuItem mMenuItem; private boolean mIsSearchOpen = false; public MaterialSearchView(Context context) { this(context, null); } public MaterialSearchView(Context context, AttributeSet attrs) { this(context, attrs, 0); @Override public void onTextChanged(CharSequence s, int start, int before, int count) { mUserQuery = s; startFilter(s); MaterialSearchView.this.onTextChanged(s); } } LOC: 32 MyAwesomeClass
  60. One month later
  61. package com.miguelcatalan.materialsearchview; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.TypedArray; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.speech.RecognizerIntent; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; import android.util.AttributeSet; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.EditText; import android.widget.Filter; import android.widget.Filterable; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; import com.miguelcatalan.materialsearchview.utils.AnimationUtil; …one month later LOC: counting…. MyAwesomeClass
  62. mSearchSrcTextView.setText(null); mSearchSrcTextView.requestFocus(); if (animate) { AnimationUtil.fadeInView(mSearchLayout, AnimationUtil.ANIMATION_DURATION_MEDIUM, new AnimationUtil.AnimationListener() { @Override public boolean onAnimationStart(View view) { return false; } @Override public boolean onAnimationEnd(View view) { if (mSearchViewListener != null) { mSearchViewListener.onSearchViewShown(); } return false; } @Override public boolean onAnimationCancel(View view) { return false; } }); } else { mSearchLayout.setVisibility(VISIBLE); if (mSearchViewListener != null) { mSearchViewListener.onSearchViewShown(); } } mIsSearchOpen = true; } /** * Close search view. */ public void closeSearch() { …one month later LOC: 986 MyAwesomeClass
  63. Code over time 86% 20 1045 27 test coverage deprecated methods old unit tests (JUnit 3) compiler warnings
  64. Code over time 83% test coverage 23 deprecated methods 1136 old unit tests (JUnit 3) 36 compiler warnings
  65. Code over time 75% test coverage 32 deprecated methods 1289 old unit tests (JUnit 3) 45 compiler warnings
  66. Developers are trying to solve problems Developers don’t write bad code on purpose
  67. Calling Dr. Codemeasure constantly the engineering health
  68. measure constantly the engineering health Calling Dr. Code
  69. jira.stats.tests.junit.3.count No more JUnit 3 tests! JUnit 3 JUnit 4
  70. jira.stats.bundled.jars.in.plugins Inspect all the things jira.stats.tests.junit.3.count
  71. Hall of Shame! You’ll enter the JS not minified API compatibility :( New JUnit3 test Caught by Dr Code?
  72. Hall of Shame! You’ll enter the Wallboard - so everyone sees it!
  73. Hall of Fame! You’ll enter the Fixed a matrix?
  74. public abstract class Task { public final void executeWith(Callback callback) { execute(); if (callback != null) { callback.call(); } } public abstract void execute(); } public abstract class Task { public final void executeWith(Callback callback) { execute(); if (callback != null) { callback.call(20); } } public abstract void execute(); } Old version New version
  75. public abstract class Task { public final void executeWith(Callback callback) { execute(); if (callback != null) { callback.call(); } } public abstract void execute(); } public abstract class Task { public final void executeWith(Callback callback) { execute(); if (callback != null) { callback.call(20); } } public abstract void execute(); } Old version New version
  76. Old version New version
  77. Old version New version Hard to spot?
  78. Image Compare Bot Compare images (on build) Alert on differences (build warning) Easy reporting (build report)
  79. Our functional tests ran for h ursso we ran them parallel
  80. Test block 1 Test block 2 Test block 3 Test block 4 Test block 5 statically sized test blocks waiting for the longest test block
  81. Hallelujah Functional Test Balancer
  82. T1 T 2 T 3 T4 T5 T6 T7 T8 T9 T10 T11 T 12 T13 T14 Hallelujah
  83. build status
  84. build status
  85. build status
  86. Flaky Test Detector
  87. Flaky Test Detector failing test rerun test successful test test in quarantaine continue build create issue
  88. 1888 flaky tests detected 817 quarantined tests fixed
  89. Flaky Test Detector no log file searching forces fixing flaky tests no manual reruns no more ‘this one again’ moments
  90. OPS bots Automated Operations
  91. Ops nowproblem
  92. ops Slow feedback loop devprob
  93. Faster feedback loop devprob
  94. Faster feedback loop knows which team -> service responsibility
  95. Faster feedback loop But that’s a lot of configuration!
  96. Faster feedback loop add team in deployment descriptor add connection to pager duty
  97. Own your code end-to-end
  98. Prepared for the release? WAIT… Release Notes?
  99. New Feature Improvement Bugfix Do you know which features really ship? Release Branch
  100. Merged JRA-345 Commit messages + Issue information = Release notes Release Notes Bot
  101. Label in GitHub Issues Label in GitHub Issues
  102. New features Improvements Fixed bugs
  103. Issue Description as Release Notes Human readable issue descriptions Think about customer value No surprises
  104. Service bots Automate your Service
  105. Support Developer scanning log filesask for log file system knowledge
  106. pause work
  107. Support Developer scanning log filesask for log file system knowledge
  108. Support Hercules scanning log filesask for log file system knowledge
  109. Teaching the robot
  110. Hercules get’s smarter suggest read update
  111. { Well f*%k me THE ROBOT was right! }
  112. Your boss has a really important task for your team
  113. Everyone is working from home today
  114. by
  115. With chat you can reach everyone immediately
  116. All these questions! How do I download the Sprint report? How do I set up a build for my feature branch? What Java versions do we support?
  117. !ask I’ll look it up for you Self service for chat
  118. !ask the knowledge base first!
  119. REPORT bots Manual Reporting sucks
  120. Stand Up Automating s ?
  121. too long setup VC calls timezones remind people Stand Up Problems
  122. Never miss a stand up Music - Start at 09:29:00 Crontab!
  123. Video - Open at 09:30 No video set up time
  124. Stand up report bots colocated distributed different timezones
  125. Status update
  126. Team update
  127. Stand up bot
  128. Exception Build failure New issue Deployment Chat Bots everywhere
  129. ΩΩΩΩ Builds
  130. ΩΩΩΩ Deployments
  131. ΩΩΩΩ Exceptions
  132. Chat Bots everywhere Fast feedback loops Team knowledge Start discussions
  133. The build failed New deployment
  134. The build failed New deployment
  135. The build failed New deployment
  136. New important issue New deployment
  137. New important issue New deployment
  138. New important issue New deployment Get the big picture
  139. Get the big picture
  140. Every team has one or more http://atlasboard.bitbucket.org/
  141. Every team has one or more http://atlasboard.bitbucket.org/ see what’s going on point directly
  142. All kind of boards AdvocatesDeveloper Support
  143. Bots everywhere Coding bots Ops bots Service bots Doc bots Report botsTest bots
  144. Reinvent the wheel? Lots of unmaintained projects Writing automation code Very specific problem
  145. No. 1 Problem
  146. 10% for better engineering health work time Technical debt
  147. 10% for better engineering health work time Technical debt
  148. is serious fun! Automation Go - Ruby - PHP - Python Languages Puppet - Chef - Ansible - Docker Technologies Fast feedback Success Your Problems Motivation
  149. From scripts on a developer hard disc
  150. to professional automation
  151. Source Control Add code to
  152. Code Reviews Do for every change
  153. Tests Write
  154. Deployment Scripts Have
  155. Keep your automated systems under control
  156. Keep your automated systems under control Lots of different places
  157. Instances for automation services
  158. costcentre ow ner service We use labels for better overview
  159. Micros <our own PaaS> Docker Java Go Python
  160. micros service:create <service-name> Service descriptor Owner PagerDuty Cost Centre MicrosSimple to create & register
  161. Were are we heading?
  162. Better customer insides better conclusions collecting more data Were are we heading?
  163. Faster dev feedback loops less time updating & searching integrated tools Were are we heading?
  164. Better Quality deeper code analysis smarter tests Were are we heading?
  165. Building software Parts can be automated craft is a Creating customer value is an art Hard to automate
  166. Rise of the machines …Skynet became self aware
  167. @svenpet svenpet.com/talks I’ll be back… find slides here
  168. Photo Credits “VW Golf TDI Clean Diesel was 2010 8983" by Mariordo Mario Roberto Duran Ortiz - Own work. Licensed under CC BY-SA 3.0 via Commons - https:// commons.wikimedia.org/wiki/ Backyard Series by syauqee mohamad "http:// www.flickr.com/photos/7901820@N07/6945260735" Tesla Model S by Chrishmt0423 from flickr Burnt & Abandoned Computer "http://www.flickr.com/ photos/99649389@N02/13262802714"

×