Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rise of the Machines - Automate your Development

Rise of the Machines - Automate your Development

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.

Sven Peters

October 27, 2015
Tweet

More Decks by Sven Peters

Other Decks in Technology

Transcript

  1. 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
  2. What are we automating right now? Code Reviews Stand Ups

    Ops Support Merging Engineering Health
  3. 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…
  4. Control the issue by commits TODO IN PROGRESS IN REVIEW

    DONE JRA-566 #start-Progress JRA-566 #start-review fixes #566
  5. TODO IN PROGRESS IN REVIEW DONE branch commit Controlled by

    action pull create review request merge close review
  6. 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
  7. 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
  8. 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
  9. 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
  10. Code over time 86% 20 1045 27 test coverage deprecated

    methods old unit tests (JUnit 3) compiler warnings
  11. Code over time 83% test coverage 23 deprecated methods 1136

    old unit tests (JUnit 3) 36 compiler warnings
  12. Code over time 75% test coverage 32 deprecated methods 1289

    old unit tests (JUnit 3) 45 compiler warnings
  13. Hall of Shame! You’ll enter the JS not minified API

    compatibility :( New JUnit3 test Caught by Dr Code?
  14. 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
  15. 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
  16. Image Compare Bot Compare images (on build) Alert on differences

    (build warning) Easy reporting (build report)
  17. 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
  18. T1 T 2 T 3 T4 T5 T6 T7 T8

    T9 T10 T11 T 12 T13 T14 Hallelujah
  19. Flaky Test Detector failing test rerun test successful test test

    in quarantaine continue build create issue
  20. Flaky Test Detector no log file searching forces fixing flaky

    tests no manual reruns no more ‘this one again’ moments
  21. by

  22. 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?
  23. is serious fun! Automation Go - Ruby - PHP -

    Python Languages Puppet - Chef - Ansible - Docker Technologies Fast feedback Success Your Problems Motivation
  24. Building software Parts can be automated craft is a Creating

    customer value is an art Hard to automate
  25. 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"