Live data from Hacker News

The Start-Up Trap

blog.8thlight.com

31–40 of 145 posts

Re: The Start-Up Trap

#31
In my mind, TDD is a defense against complexity. Complexity is always the enemy. If you can simplify your code through structure or clean design you can minimize or remove testing.

The moment you can't hold the whole thing in your head with ease is the moment you should have done TDD a while ago.

Re: The Start-Up Trap

#32
post #4

"Of course one of the disciplines I'm talking about is TDD. Anybody who thinks they can go faster by not writing tests is smoking some pretty serious shit." Why do so many TDD people think that people who don't use TDD don't write tests?

Also, why do so many TDD people think that no automated tests = no testing at all?

Re: The Start-Up Trap

#33

Whilst not exclusive to TDD, I think DHH said it best: "The road to programming hell is paved with “best practices” applied too early."

But if you don't start with TDD, then when are you going to put it in? How do you transition into it? Are you going to go back over everything you've written and write tests for all of it?

Re: The Start-Up Trap

#34

TDD is like those best-practices books that everyone pretends to read, but hardly anyone ever really reads them (I'm looking at you Code Complete). The Folks that do read these books know the dirty secret that no one else really reads them either, but they feel that endorsing the books somehow gives them credibility. TDD has its place, as most all main-stream methodologies do. But, lets just admit that the people tha…

With all due respect, I'd hope people would read Code Complete out of sheer interest, not signaling. CC is very accessible compared to other books you could be reading.

As for the time argument, I hear it, but I don't buy it. This is an institutional problem, and should be dealt with accordingly. Your responsibility is to advocate what can be done within the allotted timeframe. There's a time and a place for slapping things together and making it work, but it should never be 100% of the time.

If it is, it's a sick institution. And there are a lot of those.

Re: The Start-Up Trap

#35
post #17

I thought this was going to be an article about overwork, or about charging for what you build as a way of proving your market, or about how employee stock options are often a bad bet. Instead, it's about TDD. What a disappointment.

Which is ironic, because the real startup trap is the one where people build things but are told to not charge for them (or charge very little for it).

Re: The Start-Up Trap

#36
post #15

I like to talk about TDD using a finance analogy. One of the first concepts you learn in introductory finance is that, in a mature market (ie the stock market -- basically something with a bunch of people and a bunch of information) you have to be compensated for risk . This is why a riskier stock -- like tech stocks or penny stocks -- can boast incredible amounts of risk but generally will give you higher returns ov…

To take your analogy further, an early-stage startup has a high cost of capital. You are expected to produce massive returns (or fail). You thus are explicitly required by investors to take risks. You have a duty to not invest in the software equivalent of CDs.

Re: The Start-Up Trap

#37
post #15

I like to talk about TDD using a finance analogy. One of the first concepts you learn in introductory finance is that, in a mature market (ie the stock market -- basically something with a bunch of people and a bunch of information) you have to be compensated for risk . This is why a riskier stock -- like tech stocks or penny stocks -- can boast incredible amounts of risk but generally will give you higher returns ov…

[deleted]

Re: The Start-Up Trap

#38
Know the rules before you break the rules. The accountant analogy is dead on - that and the best quote of the day:

  You'd fire his ass! You'd fire it so fast that the rest of 
  his worthless carcass would be left outside the door 
  wondering where his ass went!
Brilliant.

Re: The Start-Up Trap

#39
Man, I've been back and forth on tests from one extreme to the other. I have to say that I do agree with this but with one caveat - Test Driven Development is a bit miserable.

Test "Driven" Development is a real invitation to write too many tests. A small, good set of tests gives you freedom to work fast, to refactor and to have multiple developers pushing simultaneously. Not having them really isn't sustainable past a certain point but equally to many tests will drag you to the ground.

Tests are overhead, they cost time to write, maintain and run and TDD tends to drag you into the deep end. Avoiding them altogether ends up being a false economy (if only in that it makes you too nervous to push often).

To those who fear the slippery slope, a nice self-annealing approach to get into testing is to only write tests for something that has failed. That way you waste no time writing tests for things that are actually pretty robust but equally you avoid addressing (and fearing) the same issue twice.

Re: The Start-Up Trap

#40
post #15

I like to talk about TDD using a finance analogy. One of the first concepts you learn in introductory finance is that, in a mature market (ie the stock market -- basically something with a bunch of people and a bunch of information) you have to be compensated for risk . This is why a riskier stock -- like tech stocks or penny stocks -- can boast incredible amounts of risk but generally will give you higher returns ov…

> By definition, going through TDD is going to be a safe route, ...

Why is TDD safe? Most TDD advocates seem to be blind to the fact that testing is a terrible way to prove many important properties about software systems, security properties for example. If you're betting your ever-so-scarce programming resources on TDD, you're probably paying too much, getting a lower return than you could be getting, and leaving some serious holes in your software. As I wrote in [1]:

If all you know about getting your code right is TDD, you’ll never bet on types or proofs or constructive correctness because you don’t know how to place those bets. But those bets are often dirt cheap and pay in spades. If you’re not betting on them at least some of the time, whatever you are betting on probably costs more and pays less. You could be doing better.

So I don't think that TDD is a "safe" bet. I think it's an expensive bet that has relatively poor payoffs.

[1] http://blog.moertel.com/posts/2012-04-15-test-like-youre-bet...

Post reply on HN