3 ms·
> What in the. serious. fuck. Of course tests test implementation details. Because _implementation details_ are where the goddamn bugs are. Testing is about te
by kartan 9y ago
> What in the. serious. fuck. Of course tests test implementation details. Because _implementation details_ are where the goddamn bugs are.
Testing is about testing inputs and outputs, not implementations details. Bad testing checks if you called this function or if you accessed this data. Good test checks that for a given input you get the expected output.
> Please don't follow the advice of this. It's total crap.
The general tone of your comment is non-constructive, lacks accuracy and appeals more to your status as "working in V8" than to real reasoning. It is a shame that it is so high in this thread. :(
You may have some good points, but just by reading your comment I can't get them.
- p0nce 9y agoIf you have Google money and work on compilers, surely tests are more important than for say, a B2C app with lots of UI.
- MartinCron 9y agoSo many developers are so myopic that they can’t imagine a scenario different enough from their lived experience that people would want to do things differently. When people say “in the real world” they really mean, “in my insular world”
- fersab 9y agoI totally agree with you on this one! The tone is absolutely immature and frankly disgusting. I would never hire a person with this kind of attitude, frankly because it is the ultimate creativity-killer in a team. This type of attitude is creating a culture where everyone is "to scared to learn" by being to scared to comment on things, or even to ask a simple question. So sad to see this...
- titzer 9y agoSorry for the harsh tone--probably an overreaction--but I think creativity is not the primary variable to optimize for in software development. I recognize that this opinion is a product of where I've gotten stuck in the software stack. However the OP's advice was basically "don't write tests because they slow you down." They even said that 100% code coverage was "a really bad idea". The OP's attitude was flippant, dangerous, and IMO, stupid. Don't follow this advice.
- fersab 9y agoWe're all human and overreact, so no worries. I agree Creativity may not be primary always, but it definitely needs space to co-exist with the more logical-perspectives. After all, at some point in time people would not even be creative enough to come up with solutions like TDD etc. Having said that, to be more OT. I agree with you regards the code coverage. However, the quality of Tests should be raised, as i would rather be in a position where people are aware that stuff can break and be on their toes, then to have false sense of confidence with 100% code coverage using poorly written tests (for example, tests so complex they need testing on their own). And sometimes, it is more important to get an MVP out there, and collect the users feedback then the actual tests. My point, its a dynamic world, and it doesn't hurt to listen to each other more!