3 ms·
> I was really tempted to title this post, "What to Solve Before Expecting Me to Take Your Opinions of Static Typing Seriously", however, I figured this would b
by Silhouette 16y ago
> I was really tempted to title this post, "What to Solve Before Expecting Me to Take Your Opinions of Static Typing Seriously", however, I figured this would be a bit too controversial and might detract from the points I wish to make. Nevertheless, I just want to make note, I think it is a very appropriate title.
Then kindly allow me to reciprocate. Here are a few things you should do if you want me, as an experienced professional software developer, to take your article and/or training seriously:
1. Don't lead with a transparent appeal to your own authority.
2. Don't put a transparent ad hominem attack near the end.
3. Don't specify the functional requirements to be supported by your API with little more than a vague one-liner, but then specify in intricate detail those implementation details where you have prejudged the only acceptable way to meet the requirements.
4. Don't dismiss real world processes that, for all their problems, are clearly driven more by producing working software than dogma.
5. Don't write a whole post about how smart you are, include some superficial documentation that shows you are relying on unusual concepts implemented using functionality that is not in either the standard library or your own documentation, fail to include any actual code, and then pretend you're just doing us a favour.
6. Don't call the type system in a language that powers vast amounts of real world software "impractical". Inelegant? Perhaps. Theoretically weak? Sure. But Java's type system is, on the evidence to date, vastly more practical than the kind of system you apparently prefer as an academic.
7. Don't suggest that a good set of types is a substitute for documentation. That's about as dumb as the XP guys saying that a comprehensive suite of unit tests is a substitute for documentation, and for much the same reasons.
8. Most of all, don't pretend that the techniques you advocate are somehow justified on the basis of some hypothetical real world support problem, when you would have significant problems shipping in the first place if you actually adopted them in a large-scale real world project today. Your whole Java example is based on anti-idiomatic "clever" code, and that sort of "clever" code is usually a bad idea in real world projects. If the ideas have sufficient merit, use tools that support them idiomatically. If the cost of switching tools is prohibitive for some reason, then IME it is nearly always better to stick with idiomatic practices that fit with the tools you are using than to try to get a round peg into a square hole that might deform just enough if you push really hard and none of your colleagues will ever need to move the peg again later.
9. Oh, and don't make sweeping claims about the practical relevance of ideas just because they work in a very simple scenario like your example, unless you also have a good argument for how those ideas scale up to more realistic projects as well.
But apart from those things, I was completely convinced, so I repent my evil ways and will henceforth develop all of the code for which my clients pay me using your proposed policies. Oh, hang on, like most real projects we are working in an infinite problem space with many continuous variables, and not a finite, small, discrete, problem space, so that pretty much invalidates your entire argument. Sorry.
- nightski 16y agoWhy do you dismiss this as dogma and not practical for real world use? I have used similar techniques in everything from bank customer portals to complex embedded systems. Our industry is plagued by bug ridden, crappy software. Please be a part of the solution, and not the problem.
- Silhouette 16y ago> Why do you dismiss this as dogma and not practical for real world use? I didn't, but the article does explicitly dismiss Agile "silliness", where one of the basic priorities is achieving working software. > Our industry is plagued by bug ridden, crappy software. Yes, it is. However, while I am as keen as the next guy to improve the quality of software, I also take the pragmatic view that you have to ship something before the quality is even relevant. In particular, my personal experience has been that on real projects, there is a heavy price to pay for using anti-idiomatic techniques when it comes to maintenance time. Likewise, I have found that there is a heavy price to pay for using complicated APIs where simpler ones can do the job. That means any benefits from techniques such as those advocated in the article must outweigh those costs before use of the techniques is justified. If a technique helps to prevent programmer errors that were otherwise likely, then that is a benefit to project quality that has some value. However, techniques that are theoretically neat but only remove classes of programmer error that were unlikely anyway are not inherently valuable, and once you're talking about real world projects with more open problem spaces, trying to check everything conceivable at compile time sounds a lot like one of those theoretically neat examples to me. (As an aside, I aim similar criticism at various other trendy techniques in our field. I'm just as happy taking potshots at certain popular Agile techniques, such as prioritising unit testing everything even if it means compromising a sound modular design so the tests can have access to the internals of each module. Unit tests can be useful, but that corruption in the design comes with a price tag that has to be justified.) > Please be a part of the solution, and not the problem. It is interesting that when faced with a critic who does not accept theoretically sound/academically neat techniques as inherently superior to existing real world techniques, some people will assume that the critic is ignorant and/or lazy. Why is that?
- 16y ago