AgilityHealth: Quality

ah-logo-transAt Agile 2016, Sally Elatta from AgilityHealth asked me to do a short video on quality.

You can watch it on Vimeo.

Craig Smith talks to us about quality, technical debt and rework.

csq

Breaking the Cylinders of Excellence (in the Australian Government)

YOW-Nights_Logo_stackedAt the recent YOW! Night in Brisbane (as well and Sydney and Melbourne), Lindsay Holmwood (the Head of Technology at the DTA) presented “Breaking the Cylinders of Excellence”. It was a rare experience to hear the story of how the DTA is using cutting edge development practices to help the government catch up with, and even exceed, the public sector. 

 

  • DTA – aid transformation in government, small agency
  • Delivery hubs in Sydney and Canberra – help identify and plug capability gaps in teams
  • Prototype of how government services could work  gov.au/alpha
  • Digital Service Standard – 13 characteristics on what good looks like in government, useful in organisations as well
  • Cloud.gov.au  – government cloud service, usage growing, continuous delivery pipeline (which is a major change for government who are used to 2 changes per year)
  • The unit of delivery is the team – not about individuals, but the team – borrowed from GDS
  • Government is slow, but government is designed to be stable, they cannot fail, they have characteristics that are resistant to change
  • Myth that organisations must choose between speed and reliability, high performing organisations deploy more frequently, have shorter lead times, fewer failures and recover faster, but they also have a greater profit
  • Want to deliver like a startup but be stable like a government
  • Not a lot of cross pollination between departments currently
  • Read the policy! – quite often the process is not mandated
  • Document what works and doesn’t so it becomes a repeatable pattern – ie. running a meetup inhouse, don’t tell me I can’t do it, tell me how I can run it without being thrown in jail!
  • Stick with technologies the government is comfortable with if you are changing the delivery engine
  • Security matters – prevention is a battle you will always lose, detection is your best defence – aggregate and log in one place, identify threat signatures, etc
  • Embed security people on big services so it is part of the architecture
  • Proactive testing between different governments around the world on similar platforms
  • Simplest security breaches make the most mess – infected excel macros, leaving free USB keys in the foyer that are malware infected
  • Need to put user needs first – alpha mockup using tools like Jeckyll, then beta then live
  • Lots of people strictly interpret the design and delivery guides – they are guides not rules!
  • Create a longer runway by pulling tech forward – turn down the volume of design, turn up the volume of tech
  • If it hurts, do it more often!
  • Fixed cost delivery with agile is a thing, agile is a way to de-risk in the government
  • Don’t put manual testing on the critical deployment path – have special skills on hand for accessibility, performance and security

Atlassian Bamboo 5.11 Delivers Continuous Integration At Scale

InfoQAtlassian, makers of development tools such as JIRA and Confluence, have just released version 5.11 of their continuous delivery tool Bamboo with a host of new features to help teams scale and collaborate. The key feature in this new release is the ability to scale from 100 to 250 elastic build agents.

Source: Atlassian Bamboo 5.11 Delivers Continuous Integration At Scale

Martin Fowler on Microservices, Event Sourcing and Infrastructure as Code

YOW-Nights_Logo_stackedIt was great to have Martin Fowler back in Australia and host him in conjunction with ThoughtWorks for a YOW! Night in Sydney (he was also in Melbourne but I was unfortunately not able to attend).

Martin followed his usual approach of breaking his talk into three mini talks on Microservices, Event Sourcing and Infrastructure as Code. Here are the videos I shot from the session for YOW!

Episode 98: The Heckle Revolution YOW! 2015 Edition

The Agile Revolution's avatarThe Agile Revolution Podcast

YOW_2015_Conference_-stacked-PNGCraig joins Darren Rogan, Ben Morgan and Leigh Appel in another special cross over episode with the Hack && Heckle Podcast to talk software development, Agile and preview the upcoming YOW! conference that will be covered by both podcasts.

This episode has been released simulatenously as H&&H 131 – Hack and Heckle / Agile Revolution Discuss the YOW! Conference.

Discussion points included:

TheAgileRevolution-98 (50 minutes)

View original post

Learn Me A Haskell Development Tool Setup

HaskellI attended the Brisbane Functional Programing Group meetup this week, and one of the talks was by Chris McKay on “The Whirlwind tour of Haskell Development Tools”. I always enjoy these talks because often the books don’t adequately explain these things and the experts often assume that these things are known.

Here are my notes:

  • getting started books – Real World Haskell, Learn You A Haskell For Great Good, Thiinking Functionally with Haskell
  • ghc – core compiler, supported pretty much everywhere
  • Cabal – package management system for Haskell, general purpose build tool
  • Haskell Platform – bundle of the previous 2 bundled for your platform, plus commonly used libraries, safe place to start
  • Windows – pressure for the committers to kept his up-to-date, Haskell platform takes care of the hard parts
  • OS X – ghcformacosx for an installer or via brew / macports
  • sandbox – supported by Cabal – will check here before going to the system libraries
  • src/Main.hs is the starting point
  • licences – choosealicence.com or tldrlegal.com
  • default-language – Haskell2010
  • GHCi – REPL console, also use for inspections at the command line, used by editor
  • GHCi-NG – extension with better debugging and extra features, required for some plugins
  • Hlint – like lint on other languages, looks for code smells (patterns of functional rules), good for beginners
  • Hoogle is Google for Haskell – idea of what you want to do and want to know a function to do it
  • Hackage – repository of all Haskell knowledge
  • GhcMod – used by plugins, may need to install it, unlikely to use it directly
  • Emacs – haskell-mode (syntax highlighting, indentation, REPL integration), ghc-mod (access to a whole bunch of tools, nice place to start), flycheck-haskell (syntax checking, can’t use with ghc), company-ghc (auto completion), shm (structured Haskell mode, write code in a tree and it edits for you)
  • https://github.com/chrisdone/emacs-haskell-config – good place to start and works out of the box
  • vim – vim2hs (syntax highlighting), syntastic (syntax checking and lint), neco-ghc (auto completion), ghcmod-vim (compliation errors and warnings, not as good as syntastic)
  • other editors that work OK – Sublime, EclipseFP, Atom (from Github, still immature), intelliJ-haskell, FP Haskell Center

Yehuda Katz on Ember.js (Ninefold Event Brisbane)

ninefoldYehuda Katz is a well respected figure in the Ruby and JS communities, so it was no surprise that it was packed house that turned up to see him last night in Brisbane. And whilst the room was hot, there was a lack of chairs and Yehuda himself was getting frustrated with the feedback and cutoff in the house audio system, it was a great night organised by Nigel Rausch on behalf of the guys at Ninefold.

Here were a couple of items I picked up on his talk on Ember.js:

  • like Ruby and Rails, Ember.js is not optimised for computer science but for developer happiness
  • ambitious app – optimised for building entire applications, long lived applications (like Gmail, lasts on the screen for a very long time) need a sophisticated architecture
  • MVC is not quite enough – model (all sessions), controller (just this session), view (what is currently visible)
  • use HTML and CSS to layout application, is the lingua franca of the web
  • HTML needs more dynamic features – {{ for data binding, # block form in Ember
  • URLs are important – good applications have good URL support – like Twitter or Rdio – primary way that people share information in Twitter and email for example – is the UI of the web, we should use them more universally and use them everywhere

Yehuda then gave a demo. Having not used Ember.js before I was impressed by how easy it was to build URLs and interactivity. I certainly will give it a closer look at some stage.

  • future of the web – take a look at the google project – Polymer
  • evergreen browsers – Chrome started this, once you download the browser that is permission enough to download new versions of the browsers ; Safari has not adopted this and will probably become the next IE6!
  • some good resources include embercasts and Ember 101

There was also an interesting kick off presentation by Toby Hede about some of the cool stuff Ninefold are doing, if for nothing else the animations were amusing!

An Introduction to Clojure

ClojureI had the pleasure this week to sit in on a 2 day Introduction to Clojure workshop being run by one of Clojure’s core developers, Stuart Sierra. YOW! and Relevance, Inc. are running these workshops on the east coast of Australia throughout May 2013 and for someone still very new to functional concepts it was a great introduction to functional programming as well as the Clojure language itself.

The key to a workshop like this is the slides with the code examples and the labs to practice the learnings, Nonetheless, here are my notes from the course on some of the concepts that I picked up.

Introduction to Clojure

  • designed to fix shared state concurrency, designed to run on the host platform
  • ClojureScript designed to target devices that cannot run a full JVM like mobile platforms, browsers, etc..
  • most of this course is applicable to ClojureScript, just the interrops to the host environment are different
  • BigInt (trailing N), BigDecimal (trailing M)
  • Strings in double quotes, characters in “”, reg ex are started with a #
  • literal true and false, nil is the same as Java null
  • symbols are words in your program you want to reference from somewhere else, always resolve to something else
  • keywords are a special type of symbol, start with a colon :, fixed labels that have no meaning, used for names of fields often, close to enum in Java
  • REPL – read, eval, print, loop – from LISP, all the steps are separate which is different to interactive terminal
  • every expression starts with an expression, everything returns an expression which is why you get nil when doing a println
  • REPL *1 will get you most recently used expression
  • print and println will give you human readable, prn and pr will give you the machine readable output
  • list are written in parens, usually represent function calls
  • vectors usually reflect collections, in []
  • maps are key value collections, in {}
  • set starts with a hash and curly brackets
  • commas are whitespace in Clojure
  • first is the function position, usually starts wuth a function or an expression that returns a function
  • quote (‘) is syntactic sugar for quote, prevents evaluation, common issue when starting Clojure when dealing with lists
  • doc – built in documentation
  • Leiningen – built on Maven, hides complexity but gives you its goodness
  • project.clj – dependency file

Functions

  • functions are first class and values, most of the core code are pure functions (no side effects)
  • defn defines a named function (defn greet [name] <body>) is a definition called greet, passes a name and runs some functions, then call as (greet )
  • can have multiple aritys, [] is no arguments, others are the named arguments, useful way to provide defaults
  • & in argument vector says next arguments gets all the remaining arguments in a list (0 or more)
  • fn is anonymous function with no name (fn [parms] body), to call it you can stick it at the head of a list, use this if you need to do something one time
  • shorter synatx is #(), and use % sign for the arguments, syntactic convenience
  • usually invoke a function by putting it at the head of the list
  • apply takes a function and list or collection or arguments, same as invoking a function on those arguments
  • let used for local variables, uilt into the compiler, takes a pair set of bindings (symbol and an evaluated expression) and then a body of any number of expressions
  • fn creates a closure, locals are stored and kept with the function
  • invoking Java – instantiation (Class. argument)
  • read Clojure inside out, read the inner most function and then read out

Expressions and Loops

  • in Clojure everything is an expression, always return a value even if that is nil, multiple expressions always return the last value
  • flow controls always return a value as well
  • logical false is false or nil, everything else is true, similar to the semantics in Ruby and Python
  • when is a macro – check and do a buch of things if evaluates true
  • cond – tree of if then else without lots of nesting, test – expression pair, stops when it hits the first true test, can end with an :else default by convention only
  • case – occasionally useful, like switch in Java, takes constants and returns value, if you don’t define a default you get an error, odd number of expressions, the last one is the default
  • dotimes – basic loop (dotimes [i 3]), only useful for side effects as it never returns a value
  • doseq – iterates over a collection, like for-each
  • for – not for looping, generates data, returns a sequence
  • recur – for recursion, rarely used, loop defines bindings which you recur
  • exceptions – don’t use them much in Clojure, no checked exceptions, try-catch-finally as per Java, throw to throw an exception
  • ex-info and ex-data that allows you to pass back a map
  • with-open – convenience wrapper, works with any method that needs to be closed

Namespaces

  • Clojure runtime is a singleton within the JVM
  • namespaces allow you thave the same name mean different things in different places
  • ns – use macro at the top of the source file to create a namespace, :require keyword to load the dependent libraries
  • implicit mapping between namespaces and files, dots into slashes and hypens into underscores
  • ns :use : only is deprecated form of :require from 1.4 up
  • ns :import for importing Java classes, every namespace imports java.lang
  • in-ns to change namespaces
  • equivalent macros for when using the REPL instead of a file
  • a bunch of functions for returning namespace information, but would rarely use these
  • private vars are just a metdata symbol, use ^:private, not truly private or hidden

Collections

  • a class or a struct becomes a map in Clojure
  • clojure.set – mathematical set operations
  • vectors are functions, can call using the indices
  • mostly use vectors, lists are useful when you want to work at the head of the list as it is more efficient, like simulating a stack
  • seq – returns a sequential view of something, like an iterator but it is not an iterator, can get first or rest
  • range – infinite lazy sequence of integers
  • into – puts a sequence into a collection
  • take / drop – take the first n in the sequence, drop the first n in the sequence, also filter and remove
  • map – the essence of functional programming – calls a function on a sequence and returns a sequence, the functional equivalent of for/each
  • reduce – powerful, uses first element if not initiated
  • some – to return the first logical true in the sequence

Concurrency

  • concurrency – multiple things happening concurrently that are sharing the same state
  • deref – returns current state, shortcut is @<ref>
  • atom – basic container with mutable state, changes are atomic, synchronous
  • ref – coordinate and share identities, synchronous, must be iolated in a transaction, uses locking under the hood
  • ensure – ensure the state is the same when the transaction is completed
  • alter – change the value of a reference in a transaction, if another transaction tries to change it gets aborted
  • commute – same behaviour as alter but allows concurent updates in a transaction, use for counters, adding elements to a map, if you are not sure use alter
  • agent – asynchronous communication, atomic updates, ensure only one thing done at a time, every agent has its own queue
  • send – send an action (function) to an agent, execute in the order that you send them, can’t guarantee that other threads are not sending action, fixed size thread pool
  • send-off – variable size thread pool
  • vars – thread safe, global identity, alter-var-root to modify global state created by a def, by convention dynamic var is surrounded by * (called earmuffs)
  • swap! and reset!, convention to put a bang at the end of functions that have side effects or shouldn’t be put inside a transation
  • watches – experimental, takes 4 arguments – key, reference, old state and new state, you can then add-watch
  • future – background process, if you de-reference the future it will block (@<ref>)
  • promise – like a future but no running process, like a container, can wait for it to deliver that promise to another thread, can only be delivered once
  • realized? – to ask if a promise has been delivered

Polymorphism

  • polymorphism – two types protocols and multi-methods
  • type – what is the type of class using class or type
  • maps do not have a notion of type, record allow you to give a type to a map, defrecord creates a record, by convention the name has a capital, records are maps so we can call all the map functions
  • record automatically creates the constructor function called -><function>, map-><function> takes a map
  •  when you create a record you are generating a Java class, useful when creating a lot of maps with the same structure or to implement protocols
  • protocol – like a Java interface, group of functions that do not provide an implementation, called based on the first argument, defprotocol to create the functions
  • convention _ is an argument I don’t care about
  • reify – creates anonymous types
  • extend-type and extend-protocol – allows you to create new interfaces to existing types, solves the monkey patching issue
  • multimethods – generic methods, much more flexible than protocols, uses defmulti and defmethod, an extensible switch

Macros

  • macro – pure functions – defmacro – code is input and output, define the symbols to reflect the code that we want, macroexpand-1 is used for testing and debugging to see what that macro does
  • syntax quote `
  • unquote ~ and unquote splicing ~@
  • most of the core language where not functions are macros, write macros for syntactic convenience

Clojure and the JVM

  • Clojure is tightly integrated to the JVM, is unlikely to be the bottleneck performance wise
  • arrays can use aset and aget to access, use Clojure Collections but maybe needed for interoperability, can use to-array and into-array
  • types and collections are all mapped over to Clojure
  • built in benchmarking in Clojure using time function, time a loop to get a better indication rather than just time on its own
  • by default everything is boxed in Clojure, but Clojure has limited support for long and double primitives
  • compile – pass your namespace, will give you ahead of time compile which gives a modest (30% – 40%) speed increase amongst other benefits, usually will us leinengen or another tool (lein compile)

ClojureScript

  • ClojureScript is designed to deliver optimised JavaScript
  • two pieces – ClojureScrpt compiler written in Clojure on the JVM, compiles Clojure to JavaScript, then the Google Closure compiler optimises for space for performance
  • lein-cljsbuild makes ClojureScript tolerable
  • ClojureScript One but is superceded by Pedestal now
  • testing frameworks – Clojure.test, Midje testing framework written by Brian Marick and Simulant

Episode 38: Coding With Exceptions (The Agile Story)

The Agile Revolution's avatarThe Agile Revolution Podcast

Mark Derricutt &amp; Craig AspinallThis is a special mashup episode recorded in Auckland, New Zealand. Craig catches up with Mark Derricut from the Illegal Argument podcast and Craig Aspinall from the Coding By Numbers podcast. Not your usual Agile podcast, the discussion starts around the definition of Agile (“crash often, crash regulary”) and trying to define quality and ends up in a chat about wicked problems, devops and software development skillsets.

This episode has been released on the other channels as well (take a listen if you haven’t already)

  • Illegal Argument (Episode 83)
  • Coding By Numbers (Episode 37)

TheAgileRevolution-38 (67 minutes)

View original post