QCon 2018 – Invest in your Java Katalogue

Title: Invest in your Java Katalog: Managing Java Version Changes on the Rapid Release Train
Speaker: Don Raab & Aditi Mantri

See the table of contents for more blog posts from the conference.


Links to Katas

  • Oriinal Katas – http://codekata.com
  • On GitHub: https://github.com/BNYMellon/CodeKatas

Kata

  • Hands on programming exercies to hone your skills through practice
  • Styles
    • Refactor  code and tests should keep passing
    • Fix the code – write code to make tests pass
    • Fix the tests – write tests using API
    • Sandbox – free  form

Learning by teaching

  • Must learn something better to teach it
  • Develop katas to teach others
  • Practice through repetition

How to build a kata

  • Identify what want to learn (ex library feature)
  • Design a problem to solveWrite unit tests demonstrating how feature works
  • Implement code
  • Add helpful comments and hints so becomes standalone
  • Delete parts of code that want someone to learn

Live coding

  • Java lambda kata – refactor the code style
    • showed Java 10 var
    • showed effectively final
    • showed converting anonymous inner class to a lambda – used IntelliJ to do conversion. Showed casting so could keep using var. Said don’t recommend [I would have shown it without var. Using the type is far better than using var there]
    • showed converting lambda to method references
  • Deck of cards kata – fix the code style
    • Showed code using stream APIs and custom APIs
    • Showed Java 10 Collectors.ofImmutableList()
    • showed Java 10 Map.copyOf() to make immutable map
    • Showed using some of the APIs in   Eclipse Collections
  • Donut kata – fix the code style
    • Showed code using advanced Eclipse Collections
  • Calendar kata – fix the code style
    • showed Java  8 dates, Eclipse collections, etc
    • showed three ten library (extension of Eclipse collections?)

 

My take

I like the emphasis on using  live code (doing the katas) to reinforce the concepts taught earlier in the session. I learned about an API in Java 10 that I missed as well.  I  was a little confused by the “Eclipse Collection style of Kata” comment. That’s a kata, not one of the described type. Then I realized it was still part of the deck of cards kata so a “fix the code” style one.

Leave a Reply

Your email address will not be published. Required fields are marked *