Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Shovels's avatar

Test driven development

So there's been a fair amount of debate around test driven development. I can totally see the benefit of it, but it's hard... really hard.

The barrier-to-entry is high and the process muddied by all the various tools and naming conventions.

But I've got an idea - and would love to hear what @JeffreyWay and others think about the following...

There are a handful of videos on Laracasts which focus on TDD, but they're in the minority. Now, I don't know if this is even feasible, but it would be amazing if the video's were recorded and then edited into two versions. One being the full version (with TDD) and the second being the short version with TDD edited out.

I understand that this will increase the time and effort taken to record every video, but until testing becomes 'the norm' people will always take the path of least resistance.

And I appreciate that not everyone wants to or can afford the time to learn TDD, so this would offer the best of both Worlds.

Would love to hear everyone's thoughts!

0 likes
4 replies
JeffreyWay's avatar

Haha, it's a great concept, but it basically translates to me doing twice as much work as I already am. I don't have the time or energy to do that.

However, there are plenty of testing lessons on Laracasts, and lots more to come. I'd recommend that folks start here: https://laracasts.com/how-do-i#how-do-i-1

And, on that note, tomorrow's lesson is about testing the code that we're building in today's lesson on Refactoring (that will be published shortly).

pakuize's avatar

I think I get where you are coming from. But, I honestly think that if it is left out you are missing out.

If you really want to you could just skip those parts of the videos, however I would make the claim that you lost a important step in the process.

Not only do you make your application testable, you also get to think about what you are building one more time. I often find my errors before running the tests because I get that extra minutes thinking about what I want to achieve with my code.

That's my 2 cents

keevitaja's avatar

when coding "is hard" then TDD is impossible.

1 like
Shovels's avatar

Totally agree with Jeffrey and Pakuize (especially see that for Jeffrey it would really increase the workload).

@keevitja - it's only hard when it's not understood, I wouldn't say impossible. If from day one of learning to code it was part of the process there wouldn't be an issue - you wouldn't know any different.

I guess I just see it that while it remains an 'extra' in the process (albeit a really important part) the majority will follow suite and think about it as an nice-to-have, not an integral part of the process.

Please or to participate in this conversation.