d

what about testing?

Diego Enjamio(denjamio)

Hi, do yo usually test( minitest, rspec )? The book cover advanced topics but no talk about testing

  • Nick Haskins replied

    Hey Diego!

    I do not use TDD. The development process is too volatile and explorative. TDD is weird, it's backwards, and it inhibits ideas from taking shape because it's forcing you into a single way of thinking.

    I'm also a solo-dev so I have a very intimate connection with my codebase.

    Once a feature is built and if its role is important in business ops, then we'd wrap some tests around it. But for the most part, I avoid writing tests.

    Also, it seems I'm not alone with this approach: https://twitter.com/dhh/status/1264998700658515968

  • l
    Michal Wojcieszek(lunarcreative) replied

    Hi,

    Follow up from indie hackers:)

    What I understand is that DHH do not like doing TDD especially early phase, not negating test at all:)

    I do not write TDD to often, but when app is growing and more users are onboard, its hard to develop new feature without making any error. And error on prod can cost you a lot:)

    I'm also interested in another topic - production logging, for making debugging customer issues easier. Do you have some good approach to this? Do you use external system for log aggregations etc.

  • Nick Haskins replied

    Hey Michal!

    The techniques I use have been specifically developed for the sole-developer. In a team setting testing becomes very important because you have many different people augmenting the same codebase. This increases the chances of causing a regression with each new feature.

    But when you are the only dev and you have an intimate relationship with your codebase, you become very aware of what changes affect what areas. It's not to say that never shipped a regression, but it's very, very rare. And, in the times that a bug does get shipped, it's fixed within minutes.

    This workflow is exponentially more productive than being constrained by testing.

    Re: production logging, that's a great question!

    I use Papertrail app to maintain a history of logs. This way we can have something to look back when troubleshooting. Additionally, I use AppSignal for error monitoring. Exceptional service here! And they even show you N+1 queries so it's pretty valuable for Rails apps!