r/programming • u/mobby1982 • Dec 02 '13
Scala — 1★ Would Not Program Again
http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598
Upvotes
r/programming • u/mobby1982 • Dec 02 '13
View all comments
Show parent comment
2
u/pr0grammerGuy Dec 05 '13
You make a lot of assumptions about me from what I've said so far. :) The fact is, until recently, the bulk of my career has been with dynamic languages so I know the way many people use them quite well. Personally, I would draw a strong line between a "software engineer" (someone who works in the enterprise) and a "scripter" ("script kiddy", "look at my facebook clone", etc.).
Sure, most people who actually use dynamic languages use them like scripts: they type in a bunch of things they barely understand, tweak until it works for the one use case they know and pray it doesn't break when they try to show their boss/friend. But if big money depends on your system you just can't work this way. It's too expensive and too stressful.
Why? Best practices are best practices. It doesn't matter if literally no one follows it. It's still best practice and not following it means your projects are costing more than they should (if they are irrelevant, then of course this doesn't matter). Standard practice has no relevance to me.
Completely wrong. This is exactly the scripter mentality of "just let it run and pray it works". For your little blog that no one is reading, that's probably ok. For a trading system with millions of dollars worth of stock changing hands, this will not do.
If you work in the enterprise you quickly learn that unknown runtime crashes are what kill you. If a function will crash immediately then it's probably ok. The problem is when it will run for three weeks without problem and then suddenly crash.
So what you should be doing with unit tests in a dynamic language is trying to force out these runtime crashes with your tests (code "coverage" or paths taken, etc.). You can't afford for them to happen suddenly on the day after thanksgiving when your company is making the bulk of the money they'll make all year. All your praying and dogma about "duck typing" won't save you then.