Twitter | Search | |
Sarah Dayan
So you think you don’t need unit tests? 🐛🤔 Thing again👇
Reply Retweet Like More
Sarah Dayan Oct 12
Replying to @frontstuff_io
"Unit tests take a long time to write! That’s money down the drain for code that doesn’t even go in production!" Oh really? What about the cost of one or more engineers having to interrupt themselves to go fix a production issue that could have been caught by a single unit test?
Reply Retweet Like
Sarah Dayan Oct 12
Replying to @frontstuff_io
Fixing a bug costs you an interruption of flow, switching context time, investigation time, bug fixing time, testing time, CI time, deployment time, and altered reputation. A unit test costs you the time to write it. You don’t need a calculator to translate that to money.
Reply Retweet Like
Sarah Dayan Oct 12
Replying to @frontstuff_io
"Unit tests are useless if you do your job properly!" Machines are immune to errors, humans aren’t. Humans get tired, distracted, rushed and bored every day at work. These contexts make errors even more likely. Betting on humans not making mistakes is a major risk.
Reply Retweet Like
Sarah Dayan Oct 12
Replying to @frontstuff_io
"Unit tests don’t solve everything." They sure don’t, but they solve a lot. Just like sleeping well greatly reduces the risks of provoking a car crash, or exercising grealy reduces the risks of dying from a heart disease, unit tests greatly reduce the risks of production bugs.
Reply Retweet Like
Sarah Dayan Oct 12
Replying to @frontstuff_io
"I know what I’m doing." If you were, you would make rational decisions instead of experimenting at the expense of the company’s money and reputation. One difference between pros and amateurs is that the former know their limits and look for proven ways to overcome them.
Reply Retweet Like
Sarah Dayan Oct 12
Replying to @frontstuff_io
This applies to engineers AND decision-makers 😊 If you neglect the long-term, it will come bite you in the butt. Not an if, but a WHEN. ⏰
Reply Retweet Like
Sarah Dayan Oct 12
Replying to @frontstuff_io
Convinced you need unit tests? It can start today with your Vue.js projects. ➡️
Reply Retweet Like
Emmie Päivärinta Oct 12
Replying to @frontstuff_io
I understand getting started with writing tests can be a lot of effort and it doesn't seem to do much at first, but justifying your laziness by pretending you can't make errors is really bad in the long run 😑
Reply Retweet Like
Emmie Päivärinta Oct 12
Replying to @frontstuff_io
I've worked with rockstar developers telling you "I don't need to write tests, I never create buggy code" and it seems like they're half joking, but eventually you realize maybe they actually believe it 🤦‍♀️
Reply Retweet Like
Sarah Dayan Oct 12
Replying to @EmmiePaivarinta
Rockstar developers are a walking, breathing hazard; a disaster pending to blow up in a company’s face. I’m flabbergasted when I see this is still a thing and how companies are jeopardizing their team and business by hiring and keeping such risky assets.
Reply Retweet Like
Ibrahim Abdul-Samad Oct 12
Replying to @frontstuff_io
Books and tutorials are partly to be blamed for this mentality of "Testing is not necessary". Great books have testing for every block of code covered in a chapter. And these books are rare.
Reply Retweet Like
Babak Oct 13
Replying to @frontstuff_io
This and use types :-)
Reply Retweet Like
Benjamín Eidelman Oct 13
Replying to @frontstuff_io
these can be achieved by Acceptance Tests (aka black-box test your lib/aervice/app interface), unit tests are coupled to each module/class interface which means more maintenance cost.
Reply Retweet Like
Daniel HB Oct 13
Replying to @frontstuff_io
I usually start writing tests for code I am confident is "done", and even so I often find bugs while writing the tests
Reply Retweet Like
Andrey Polischuk Oct 13
Replying to @frontstuff_io
Agreed. But it’s not just about unit tests. Writing any test costs less than fixing a bug. And as you write the test, you can elaborate the better api of the entity under test.
Reply Retweet Like
Matija Marohnić Oct 13
Replying to @frontstuff_io
I mostly replaced unit tests with ESLint and Flow, now I only write unit test for complicated units, the rest are integration tests which prove that units are working well. But I’m a React developer, testing practices vary from stack to stack and language to language.
Reply Retweet Like
Eduardo Shiota Oct 13
Replying to @frontstuff_io
Unit tests are also a great complement for documentation. I can recall countless times where reading a test suite gave me insight about what I should expect from a piece of code.
Reply Retweet Like