3
kiki
3y

The Michelin star chef says to a fast-food line cook:
— In my restaurant, we don't use mayonnaise. Better even, I don't need mayonnaise, so as my fellow Michelin star chefs.
— You are idiot. We use mayonnaise and the burgers taste like crap without it.
— Perhaps it's because your recipes are trash and your products are made from waste materials?
— Look. I consulted with my fellow cooks from KFC, McDonald's, Burger King — all huge, billion-dollar companies, and they too are using mayonnaise. The whole world uses it. If you don't use mayonnaise, you can't cook tasty. End of discussion.

That's how I feel when someone defends unit tests. Matter of fact, I can't stand _both_ tests and mayonnaise. Coincidence?

Comments
  • 0
    A bit random, but is mayonnaise popular in Russia?
  • 0
    I don't like mayo. Maybe fresh homemade mayo is good. I've never tasted that one. But factory made mayo is just ew.
  • 1
    @yehaaw but... I thought I posted it under a correct category this time 😔

    (yes, mayo is super popular in russia)
  • 2
    This is a great metaphor also because it fully explains why mayonnaise still isn't objectively bad.

    If I ate at a Michelin star restaurant twice a day, I wouldn't want to use mayonnaise, because the chefs are great and so are the ingredients and they can make excellent food that would be ruined with mayo. In reality though, those restaurants are ridiculously expensive, and even if I did have that kind of money I would probably still eat mediocre food made from simple ingredients on most days because there are lots of things that I would prefer to spend the money on. Most meals are simply not worth the cost of a Michelin star chef and top quality ingredients.
  • 3
    Most situations where you need new software also involve a lot of other costs. The clients (and could-have-been clients) I've had so far could not have paid for a better developer. Writing tests takes up roughly a third of my working hours and pretty much the only bugs that still occur would also occur in idiomatic code because they arise from flawed workflow designs and not incorrect code. Knowing all this, it's hard to imagine that employing someone who doesn't need tests would be cheaper.
  • 2
    I understand the subtext of this post to question (unit) testing.

    My two cents:
    spending time (& resources & money) for test definition is useful, if the software needs to be maintained and will be evolved (or just developed further).
  • 1
    So you manually test your code over and over again instead of automating that process ?

    I really like writing tests, what gets me is that most devs don’t know how to write good ones so the maintenance of them becomes a pain. And so is the spaghetti bullshit code they wrote with them.
  • 2
    I remember spending a lot of money on a jar of mayonnaise only to find out that it is lemon flavored, FUCK!!!
  • 0
    I like peanut butter and mayo sandwiches.
  • 0
    @TrevorTheRat No, he just likes CSS... like a LOT. Wants everyone to invent their own declarative language for their own domain (like CSS is for web apps), and maintain/update that, instead of using imperative languages and having to test everything constantly.

    I think one reason for this line of thinking might be that as far as designing UIs is concerned, automated testing is pretty much a moot point.
  • 2
    Mayonnaise home made is good, as you can pretty much turn it into anything you like (heavy garlic, more mustard, ...)

    Most of regular mayonnaise from store... Ugh.

    Don't touch it, it's shit.
  • 1
    @IntrusionCM homemade mayonnaise is a proper declarative TDD, store mayonnaise is whatever regular people write and call “tests”
  • 0
    @hardCoding you’re factually wrong. I don’t want anyone to do anything. I just have a mental model that allows building apps 3x faster and with 5x less bugs. You can use it or you may choose not to, both variants do make me money.
  • 0
    @kiki yeah yeah, that's why you are posting insulting rants about "test boys", right? Because you don't care what anyone does, or whatever.

    If you like what you are doing and don't care what anyone else is doing, then act like it bro.
  • 0
    @hardCoding if your life decisions can be influenced by some rando ranting on the internet, I have bad news for you
  • 0
    @lbfalvy you’re a fucking manipulative piece of shit who just tried to pass “mayo-filled inedible crap” as “simple inexpensive food”.

    One can cook delicious inexpensive meals without fucking mayo.
  • 0
    @kiki You still can't accept the fact that I like mayo. It definitely doesn't belong in a Michelin star restaurant, but it's great for eg. salads.
  • 0
    @kiki Of course you can cook delicious meals without mayo. The opposite of this statement would be that all delicious food is either expensive or contains mayo, which is ridiculous. But there are some things that work better with it.
  • 0
    @kiki I'm not a coverage nut, I write unit tests for very abstract functions that lend themselves to testing.
  • 0
    @lbfalvy yes, alcoholic cocktails aren't expensive and definitely do not require mayo!
  • 1
    My take : people tend to forget that unit tests will keep having to be "fixed" when code changes, usually by someone else. Imo that it's biggest disadvantage.
  • 0
    @jkommeren Only if the public interface changes, which should be rare if the code is well designed.

    If your unit tests are dependent on the actual implementation, then you're doing it wrong.
  • 0
    @AlmondSauce Tests for the public interface are called e2e tests. Unit tests are highly dependent on the structure of the program and the emphasis is on granularity so they often (although not always) imply a single implementation and have to be rewritten when the implementation changes to accommodate unrelated changes in functionality.
  • 0
    @lbfalvy I'm talking about the public interface of a class, not the interface of a public API or whatever else (which would be an e2e test.) The former you *definitely* test via unit tests. They would only need rewriting if the public contract of that class changes, which should be rarely or never if your application is well designed.
Add Comment