News for hackers. Stuff that matters.
Re:Write tests. Not too many. Mostly integration by kartan on Friday October 27, 2017 @07:31AM (#15567381)
> 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.

Re:Write tests. Not too many. Mostly integration by p0nce on Friday October 27, 2017 @07:53AM (#15567502)
If you have Google money and work on compilers, surely tests are more important than for say, a B2C app with lots of UI.
Re:Write tests. Not too many. Mostly integration by MartinCron on Friday October 27, 2017 @10:21AM (#15568551)
So 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”

Re:Write tests. Not too many. Mostly integration by fersab on Friday October 27, 2017 @07:59AM (#15567531)
I 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...

Re:Write tests. Not too many. Mostly integration by titzer on Friday October 27, 2017 @09:59AM (#15568296)
Sorry 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.

Re:Write tests. Not too many. Mostly integration by fersab on Friday October 27, 2017 @10:21AM (#15568547)
We'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!