BDD / TDD criticized

,

We have replaced fact-based data-backed attitude with a faith-based
wishy-washy peace-hug-freedom hippie agile way, forcing us mechanically
to follow some steps and believe that it will be good for us. Agile has taken
us a long way from where we started at the turn of the century, but there are
problems. From personal experience, I see no difference in the quality of
developers who do TDD and do not. And to be frank, I actually see negative
effect, people who do TDD do not fully think hard about the consequence of
the code they write - I know this could be inflammatory but hand on heart, that
is my experience. I think TDD and agile has given us a safety net that as a
tightrope walker, instead of focusing on our walking technique, we improve the
safety net. As long as we do the motions, we are safe. Unit tests, coverage,
planning poker, retrospective, definition of done, Story, task, creating tickets,
moving tickets. How many bad programmers have you seen that are masters of agile?

There are developers who name themselves “software craftsmen”, especially among those specialized in ruby / elixir. That has historical reasons explained elsewhere. Not that it is the main reason for starting this thread ;-), but I have even been rejected for a job by such a proud
craftsman because of that horrible thinking for myself.

2 Likes

Indeed. I was very firmly planting my tongue in my cheek when I was writing this. Should have added an appropriate emoji :wink:

As a guy who titles himself like that, I see no relation between the title and the behaviour you describe. There are douchebags with all sorts of titles and in all areas of life. :smiley:

People rejecting other people for reasons not related to the job at hand is sadly happening way too often. And escape hatch terms like “cultural fit” are now used way too often, to the point of abuse. There is such a thing as good or poor cultural fits but most of the time people are just fine working together, provided they follow a basic set of professional courtesy codex.

Fully agreed with only one exception – functional languages just sort of work better for the human brain. We are not good at doing whack-a-mole with 5000 holes like most imperative / OOP languages require us to.

Having the FP fundamentals (like immutability and share-nothing concurrency) helps us concentrate on less things at a time, and doing them better. In that regard, I think that most designs should immediately start with the premise that they need an FP language (unless we are talking NASA or gaming servers).

Outside of that clarification however, you are 101% on point. I understand that companies like SAP have thousands of employees and they need to enforce some standards but IMO that’s doing them disservice.

1 Like

That is true. Lab tests require controlled conditions which is exactly the opposite of what we have in the real life jobs. Only that premise alone invalidates any conclusions they might claim to have extracted.

Yep. Also people find the most creative of ways to cheat in competitions. We just operate differently in an every day job and at a competition. It cannot be avoided.

This is why I stopped arguing with people on HackerNews. Whatever you might say you keep hearing “source?” or “any studies to prove?” – like 19 out of 20 times. How do you explain to these people that the modern science is still uncapable of proving certain phenomena due to its methodology and the human condition itself?

As you said, there are many things people “just know” and they work pretty well – we have those in agriculture, programming, cooking, raising kids, basically everywhere. Yet if we ask science, all these things are “urban legends” and “have no citings or proof they work”. Oh well then.

Maybe the name (“software craftsman”) is not that important, but what it stands for, at least in my view, does. In the craftsmen manifesto tdd is not mentioned. But in the book “The Software Craftsman: Professionalism, Pragmatism, Pride” you can find paragraphs on f.e. “How Do I Convince My Team to Do TDD?”. Do a “software craftsman advanced” course and you get “Best practices: using testing and test driven development […]” https://www.protechtraining.com/clean-code-software-craftsman-advanced-pt0743.
Uncle Bob, writer of the clean coder and long time proponent of tdd just said

The disagreement is left implicit which makes this a strange read, but to me his view (see complete tweet) is new. In the past he said quite something else, f.e. in the clean coder book. Something like “if you do not practise tdd you’re unprofessional”. Opinions like these still sing around. Some employers demand you keep singing this song with them.
Dan North made some valuable remarks on software craftmanship btw:

Software Craftsmanship risks putting the software at the centre rather than the benefit
the software is supposed to deliver, mostly because we are romantics with big egos.

1 Like

We’re encroaching on the territory of philosophy of science here, but science doesn’t need to “prove”, just demonstrate – Math needs to produce proofs. And I think it has been adequately demonstrated how complexity works, which explains a lot of stuff around our practice. It also explains why studies that compare two small groups of people in a lab setting have little value :wink:

So did you, probably. I know I did. But we’re not under a magnifying glass because we wrote books that everybody has on their bookshelves, I guess. I’m super happy that people like Uncle Bob continue to evolve. If anything, the thing that I learned from people of this calibre is that they are mostly just insatiably curious and primarily want to learn, not hang on to their old beliefs. Which makes it harder to keep up to date with what these thought leaders think, but that’s on us; not on them :slight_smile:

2 Likes

Minutiae. :stuck_out_tongue: I agree though.

My point was that many concepts are extremely hard to prove mathematically yet many of us use them daily. You would think that would tell scientists something but nope.

Of all the scientists though, I mostly like mathematicians. They are quite brutal to themselves and many are open to admit they have been doing something wrong for 20 years if new and solid data emerges. Theirs is the right mindset and I enjoy communicating with such people, no matter what they make their money with.

And they are the only ones that managed to get to some sort of real-life answers through game theory and chaos theory.

1 Like

Well stated. I would say this in response: I try to avoid thinking in a specific language or even language type while I am designing, but since discovering Elixir and FBP, I have found that these tools allow me the easiest path towards successful implementation. Truly a pleasure to program in.

1 Like

This idea has riscs. We need to live with lots of unproved assumptions, otherwise we just cannot. But science can help in getting wiser. Knowledge is acquired while for example, well, doing scientific research, but also while f.e. reading this. Piaget had a theory about cognitive development that can shed some light: https://link.springer.com/referenceworkentry/10.1007%2F978-0-387-79061-9_598 (there should be a better link somewhere, but this as intro). There are different reactions possible on the stated psychological phase of cognitive disequilibrium, we may become wiser but other reactions are possible also. Some of those are subject for research by psychiatry. Also a science, sorry. :wink:

Disequilibrium is often an uncomfortable state for individuals, thus we seek to quickly
return to a state of equilibrium.

1 Like

Of course I did. Did I make an impression of denial somewhere?

On the subject of software craftmanship not needing tdd he has been exceptionally slow to make
his “confession”. He is not a hero of mine, his ego and guru-behaviour are distracting. Moreover I just don’t find him that interesting.

1 Like

Of course. If it wasn’t for Galileo’s bravery (and house arrest) who knows if we might still live in the Dark Ages where the church gets to decide what’s truth and what’s not.

I am only saying that current sciences’ methodology is limited and it fails to find explanations for very basic and common sensical things we the people live with every day. That’s why it must also be under scrutiny, always. And it must not be the universal answer to everything. Many of our emotional and intimate needs make zero scientific sense. Especially sexual ones.

IMO: 90% science, 10% intuitive revelations. Something like that works pretty well for my life.

Sorry for digressing.

Agreed! That’s why languages like Elixir or Clojure can be used as a gateway to the bigger world of functional programming and we can subsequently enrich our own understanding and think in terms of pure functions, first-class functions, folding, comprehensions etc. etc., instead of “do a loop here” or “use with and cond here”.

Thumbs up.

Is “making scientific sense” the point? I don’t think so and a lot of sensible :wink: things have been written by f.e. Michel Foucault (history of sexuality) and others on this subject. Philosophy. Also a science. Besides physics we have metaphysics. Lets call sexuality belonging to physics and metaphysics btw. We’re not made of stone only. :slight_smile:

1 Like

Exactly, agreed. That was also my point from above: not everything we claim has to be proven by science.

Like democracy, science sucks but we haven’t found anything better yet :wink:

1 Like

Haha, so true. Applies perfectly to both indeed.

Yes yes, first there was chaos, then came the universe. Better not to return to dust too soon. But anyway, we can do better than TDD and hail the devine priests that appear on youtube.

Erik Meijer is not a proponent of TDD, on the contrary. See his presentation on agile at youtube or read comments on Uncle Bob’s twitteraccount f.e. He is working on ML now, and compares it to TDD here:

https://queue.acm.org/detail.cfm?id=3055303

2 Likes