Sunday, 17 November 2019

Speed Without Discipline - a Recipe for Disaster Highlights - or Why Automated Testing of the Right Kind is Essential

Another great talk by Venkat Subramaniam on writing maintainable code, how to be truly agile in the long term (and not just short) centralizing on declarative style and automated testing.

https://www.youtube.com/watch?v=uQ75fI1tqoM

Highlights:

  • We talk about agility but the faster we go, the more important it is to have discipline or everything turns into an unmaintainable mess
  • There's a paradigm shift going on from imperative to declarative programming
    • Declarative = intent separated from implementation. The what from the how
  • Functional programming is just a sub-set of declarative programming
  • Automated testing or rather automated "verification if the code does what it should" is essential
  • Proper testing is getting insight into how the application behaves and how it could be developed. This has pretty much nothing to do with verifying compliance to intent - that should all be automated
    • "Testing: Act of gaining insight"
  • "Mostly UI level verification is "pathway to hell" automation"
  • The wrong way to build testing - the cone of test automation from hell
    • Mostly automated GUI / end-to-end level testing
    • Few service and unit level tests which
  • The right way - solid foundation of test coverage at the right layers - the pyramid of automated testing:
    • Large number of unit tests - the level at which test writing and execution are both very lightweight and maintainable and can cover a very high percentage of various edge-cases and failure scenarios (in addition to the various happy paths)
    • The higher you go the more time it takes to create and execute a test case and the more resources are required for automated test case maintenance
  • "I want the test to be at the right level for the right reasons"
  • Why is it hard to write testable code? Programming often is a series of mini-experiments that lead us to discoveries.
    • If you're doing something for the very first time and it's not clear yet what you're building, don't write test first
    • How to overcome this?
    • Spike to learn - test stuff, prototype and experiment on a separate little project until what you should be testing is no longer a total unknown anymore
  • "Automated verification is the software equivalent of exercising" - requires discipline and mostly none of us do it as much as we know we should be doing because it's hard

No comments:

Post a Comment

From Architecture to Game Development: A New Blog on Echoes of Myth

I’ve launched a new  Echoes of Myth Development Blog , documenting my journey into game development and sharing insights from my first comme...