Lean Beliefs

  • Home

Monthly Archives: May 2014

Test-Driven Development: Dead or alive?

05/23/14 / pcsontos / Agile, Lean, Software Engineering / eXtreme Programming, maintainability, management, metrics, self testing code, TDD, unit testing

Recently I held a presentation at the Budapest Agile Meetup event with the title “Agile and Lean projects at very large scale at SAP Labs Hungary”, and we’ve had very lively discussions both during the meetup and later online.

The biggest reason for having such heated discussions was that I quoted the recent conference talk and blog post of David Heinemeier Hansson (or DHH, inventor and developer of Ruby on Rails web app development framework) titled “TDD is Dead. Long Live Testing.” Of course, proponents of Test-Driven Development didn’t feel good about this and brought up arguments.

The most notable one was a reference to Rod Hilton’s MSc in Software Engineering thesis from 2009 titled “Quantitatively Evaluating Test-Driven Development by Applying Object-Oriented Quality Metrics to Open Source Projects“. This is a really great scientific work, summarizing the topic very well.

During my meetup talk I happened to mention that I was not aware of any precisely calculated scientific result of anyone that would undoubtedly prove that TDD (or more broadly speaking, high unit test coverage, or even more broadly speaking, high test automation coverage) makes economic sense, meaning that it would have higher business benefits than costs in the long term (and in long term I mean max. 3 years, we live in a fast-paced world, don’t we). Of course I believe this long term benefit exists, the broader we talk about automated testing, the clearer this is (especially in the context of cloud apps, Continuous Delivery and DevOps, having self-testing code is a must).

However, this statement about benefits vs ROI was somewhat misunderstood. The referred thesis concludes that TDD produces 21% “better” code overall. I have every reason to accept that this is true. However, there was absolutely no measurement done on how much bigger the costs of achieving these better results were. Even more, the costs of more unit testing are immediate, while the benefits appear only longer term, and it’s probably needless to say that business management people tend to have a rather short-term focused thinking.

Probably not much of a coincidence is that DHH’s claims generated high debate in agile circles globally. He has had a series of live Google Hangouts on this topic with Kent Beck (creator of eXtreme Programming and TDD, and developer of the jUnit framework) and Martin Fowler (another XP celebrity and the biggest advocate of refactoring). I recommend everyone watching it. Here you can find the link of the 3 episodes so far, each one lasting only about 30 minutes:

  1. https://plus.google.com/events/ci2g23mk0lh9too9bgbp3rbut0k
  2. https://plus.google.com/events/couv627cogaue9dahj08feoa6b8
  3. https://www.youtube.com/watch?v=YNw4baDz6WA

Martin Fowler has also created a nice summary page on the whole topic: http://martinfowler.com/articles/is-tdd-dead/.

Some random excerpts from these discussions and my thoughts:

  • Too much mocking is expensive and inflexible (isolated vs not isolated unit testing)
  • Various personal styles: upfront planning of output (unit test expected result) or just coding through the problem
  • Self testing code in general is much more important than TDD in particular
  • More code == bad code – true for too long code due to too many levels of indirection and isolation of layers forced by unit testing and mocking. I have a personal opinion on this: it may be true in the TDD context, but there is also an opposite extreme: nowadays functional programming and other fancy new language constructs often lead to such forms of compact code that is extremely hard to maintain. Sometimes even the author doesn’t understand his ultra-sophisticated lambda-heavy code just 2 weeks after writing it. Not even speaking of junior developers or if you happen to be asked to shift code ownership to an offshore team. Maintainability is very critical, this is what I call software crisis 2.0, it is exponentially harder and harder to find and hire enough superman-programmers. So both too verbose and too compact coding is dangerous.
  • Impact of unit testing on design – good or bad?
  • Role of QA: Does having self-testing code mean we don’t need testers anymore? Probably not.

Summary: self-testing code is increasingly a must (fact), having lots of unit tests is great (belief) and using TDD is good in some cases (an option).

Follow me on twitter for future discussions on this topic.

Lean Beliefs: the new name of my blog

05/13/14 / pcsontos / Personal, Philosophy / estimations, management, metrics, self testing code, TDD

First of all, if you are a reader of my old peter.csontos.info blog, congratulations for finding the new one!

Why did I make this change? The root cause is very simple: the web hosting service provider I’m working with has announced that they are discontinuing the service I’ve been using for my blog. Therefore, I had to change both the domain name of my blog and the content management system used. The new CMS is WordPress, which is something I seem to like using (after less than one day, but still, first impressions are important, right?).

Luckily Go Daddy provided not only a way of moving the content of my old blog to the new one, but also published an excellent step-by-step guide about how to do it easily. So here it is, old content is all here, and new stuff is coming up soon.

I still have to tweak the look and feel a bit yet, but this is already a minimal viable product, so enjoy!

By the way, I think I owe you an explanation about the name itself.

Many topics about lean and agile software engineering and project management methodologies are highly subjective and sometimes even religious. Is TDD dead or alive? Can we count on estimations? Should we invest in test automation? Can the outcome of software engineering be reliably measured? Sometimes it’s not too hard to find answers, but sometimes it seems to be close to impossible.

However, anyone can definitely have something about these tricky questions: subjective personal opinions, or in another nice word: beliefs.

Life, the universe and everything about lean software engineering

Blog by Péter Csontos,
a nice guy from Hungary

twitter: @pcsontos

Recent Posts

  • On the popularity of programming languages – Vol. 2.
  • The only messaging platform that really works: E-MAIL
  • Dear Twitter!
  • It has begun
  • My post in Wait But Why’s “Dinner Table” discussion: How should we do government on Mars?
  • On the benefits of unit testing
  • Functional programming: “expression was too complex”
  • Software architecture is dead, long live software architecture
  • Lean Startup vs The Innovator’s Dilemma
  • The art of micromanagement

Tags

Artificial Intelligence Big Data books C# Climate Change Cloud Computing Coding Kids Continuous Delivery Definition of Done DevOps estimations eXtreme Programming HTML5 Internet of Things Java JavaScript kaizen kanban Kotlin Lean Startup maintainability management Mars metrics microservices Mobile Apps programming languages Python Recruiting refactoring Robots Ruby SAP scrum self testing code social media Space Speech Recognition Swift TDD teamwork technical debt The Innovator's Dilemma unit testing Wearable Gadgets

Categories

  • Agile
  • Lean
  • Management
  • Personal
  • Philosophy
  • Software Engineering
  • Uncategorized

Archives

  • April 2019
  • May 2018
  • September 2017
  • April 2017
  • October 2016
  • June 2016
  • April 2016
  • February 2016
  • November 2015
  • October 2015
  • August 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • January 2014
  • December 2013
May 2014
M T W T F S S
« Apr   Jun »
 1234
567891011
12131415161718
19202122232425
262728293031  

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© A WordPress Site
TwitterFacebookLinkedIn