It Compiles. But It’s Still Wrong.

I love strongly typed languages — but they’re no substitute for TDD. For example, let’s make an add function in Swift:

Article content

See? Strong types mean our code is perfect!

In a world of imperfect AI agents, junior devs, and even seniors, types aren’t enough. That’s why we write tests.

To view or add a comment, sign in

More articles by Jonathan Bennett

  • Your Code Comments should <blink>

    There is a huge difference between code documentation and code commenting. Documentation can be super valuable and…

  • You Need to Copy This From Scammers ASAP

    I get a few dozen spam emails every day that all look about the same: Your bank account is compromised! Click here! You…

  • A Month-Old Bug and How I Found It

    In my previous post, I talked about a bug involving an invalid <turbo-frame> tag. The UI was fine when merged into…

  • One Commit, One Change

    I mentioned commits being too large yesterday. What do I mean by that? Here’s a simple rule of thumb I use: If your…

  • A Humbling TurboFrame Lesson from Yours Truly

    There’s nothing worse than code that’s almost right… I was helping debug an issue that came up with a client. They had…

  • Start Planning for Life After Low-Code

    I often get asked: “When should I use a low-code platform, and when should I switch to custom development?” I love this…

  • System Tests When They Matter

    My TDD workflow with a new feature is pretty simple: Create a system test walking through home page -> feature…

  • AI Code Needs Rules. TDD Writes Them.

    It’s June now, and you know what that means — it’s AI month! Just kidding. Every month is AI now.

  • Let Rails Help You – Now With Caching

    Thoughtbot recently published a great article on building a favouriting system in Rails using standard conventions. I…

  • TDD Helps You Scale Without Slowing Down

    Your specs are sharper, your team’s performing better, and your system is more reliable than ever. Besides that, what…

    1 Comment

Explore content categories