> Yes, and the code takes hours to run. It's not fun when > something is attacking item 99 million out of 100 million > and blows up on a stupid typo because it just happens to > hit a codepath that the first 98,999,999 items didn't > hit.
No one uses interactive development? I am surprised.
> Who said anything about releasing code without testing it? > I have a big heaping pile of data that looks meaningless > s but someone thinks there's gold buried in it. So I need > to come up with an algorithm to find the gold and refine > it into a nice shiny piece of information jewelry. > > I may to try a whole slew of algorithms. I may never > "productionize" the code for general use, because maybe > the gold is really just copper so no one cares. Or maybe > it's just dirt. But then maybe it does need to eventually > be productionized. It's hard to tell at the start. > > The point is I usually need to be able to try things fast. > I usually use Python, but that's because of the APIs and > d ability to build abstractions, not because of dynamic > typing. Experience has made be scatter runtime > type-checks all over my code, despite the fact that it is > "un-Pythonic" and lessens flexibility. But that MORE work > that specifying static types, and it incurs a performance > penalty.
> > If the code gets productionized, then yeah, it needs > thorough testing. But developing a slew of tests for > something you may throw away in the morning doesn't seem > very productive, especially when a static type checker > could catch 90% of the errors because they are just typos.
But dynamic typing suits you perfectly, especially in code which changes frequently. The trick is to modify the code as it runs, not to start over each time.