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

Ready-Steady-Transform

 Ready-Steady-Transform

Experiences from pushing groovy into the Enterprise

Avatar for Niels Bech Nielsen

Niels Bech Nielsen

May 23, 2013

More Decks by Niels Bech Nielsen

Other Decks in Programming

Transcript

  1. Niels Bech Nielsen 9 CONSULT !   Simply the best

    !   GR8 with gr**/* technologies !   and java and .net !   and architecture !   and hiring..
  2. Niels Bech Nielsen What`s the story in Balamory?
 (Wouldn`t you

    like to know) !   The use case !   The first detour !   The groovy experiment !   What we learned!
  3. Niels Bech Nielsen Business as usual !   Use case

    !   Traders and their numbers !   Risk aversion and volatility !   The competitive edge !   …
  4. Niels Bech Nielsen Business as usual !   Use case

    !   Traders and their numbers !   Risk aversion and volatility !   The competitive edge !   …
  5. Niels Bech Nielsen Business as usual !   Use case

    !   Traders and their numbers !   Risk aversion and volatility !   The competitive edge !   …
  6. Niels Bech Nielsen The Engineering Approach !   The first

    detour !   Strong-typed transformation framework !   Extremely complex !   Multiple rules and *exceptions* !   Almost impossible to comprehend !   Slow to develop !   …
  7. Niels Bech Nielsen Hyphothesis • If we switch towards a more

    agile and dynamic approach, we can considerably reduce the backlog. • Groovy is probably better than Java for this
  8. Niels Bech Nielsen Outlining a couple of *SPRINTS* !  

    The Groovy experiment !   Find a few voluntary java programmers !   Setting up plan B !   The very first iteration !   Improvise, adapt and overcome !   …
  9. Niels Bech Nielsen So, what is Plan B? !  

    Before we start !   Generic framework in place !   Lower the customer expectations !   To DSL or not to DSL !   Make sure to measure !   …
  10. Niels Bech Nielsen Code, ya numpty... • Easy integration • Evaluate once

    • Execute continuously Map<String, Object> scope = new HashMap<String, Object>(); // The scope where we bind data in and out Binding binding = new Binding(); binding.setVariable("scope", scope); // Create a shell with the proper binding GroovyShell shell = new GroovyShell(binding); // Evaluate the result shell.evaluate(content); // Now get back what we want.. Closure setup = (Closure) binding.getVariable("setup"); Closure tick = (Closure) binding.getVariable("tick"); Table table = new Table(); setup.call(table); // Preserve original table.. createMemento(table); List<Trade> trades = getBondTrades(); // For each tick.. table = restoreMemento(); tick.call(trades, table); System.out.println(table);
  11. Niels Bech Nielsen First Retrospective We STINK! 219 semi- colons

    Donde esta El hotel Atlantico? No skills No rhytm
  12. Niels Bech Nielsen Key Learning !   Improving development !

      Learning the balance of scripts !   Adding Groovy flavour !   Improving domain support !   Structured learning !   Goal is to cash-in on backlog
  13. Niels Bech Nielsen Second Retrospective What Happened? Upsie!! Darn typos

    We need a testing framework Collect object-graph when scripts failed
  14. Niels Bech Nielsen Plant pot model !   Run it

    as a sandbox !   Keep it read-only !   Greater dependency on tests and coverage !   Carefully select optimizers
  15. Niels Bech Nielsen Further reflections !   Things we feared

    were “needless” !   Speed? !   Risk? !   Stability? !   But something else came up !   Structure? ! Wellformedness?
  16. Niels Bech Nielsen Would I do it today? !  

    IDE support !   Compiler Customization !   Static type checking / compilation !   Types are contracts
  17. Niels Bech Nielsen !   Letting go was hard !

      You have to walk the walk !   Test, test, test !   Measure, measure, measure
  18. Niels Bech Nielsen Attribution • Goes to: •  Nine Consult A/S

    •  GR8 Conf •  http://www.sheep.com •  http://www.flickr.com/photos/mikebaird/6311352526 •  http://www.flickr.com/photos/31029865@N06/6646814881 •  http://www.flickr.com/photos/churkinms/2582615027 •  http://commons.wikimedia.org/wiki/File%3ASMirC-thumbs{up/down}.svg •  http://commons.wikimedia.org/wiki/File:Risk_aversion.jpg •  http://commons.wikimedia.org/wiki/File:Post-it-note-transparent.png •  http://commons.wikimedia.org/wiki/File:Plant_nursery,_pot_rows.jpg