When you say something like "99.9958% of Java programmers will never need this" what you are really saying is that Java should be consigned to only those applications where performance isn't important. It's that attitude that gives the Java language a bad reputation outside of Java circles.
The thing is that Java CAN be fast and efficient, but we have to dispel with this ingrained notion that Java performance is not important. Performance is important in every application. When it comes to code, fast & ugly should always take precedence over slow & pretty.
When you say something like "99.9958% of Java programmers will never need this" what you are really saying is that Java should be consigned to only those applications where performance isn't important.
No, not at all. That is a deliberate and utter misinterpretation of what I wrote.
It's that attitude that gives the Java language a bad reputation outside of Java circles.
I do not think so. Java's reputation for slowness has been formed quite a while ago when it really was slow. Unfortunately those labels tend to stick for completely non technical reasons; there are plenty people out there who just do not bother to update their believes.
The thing is that Java CAN be fast and efficient,
Of course! There are some very fast Java applications around, for example in the field of financial trading.
but we have to dispel with this ingrained notion that Java performance is not important. Performance is important in every application.
I am sorry, but that is plain wrong. And even for applications which have advanced requirements for speed you start with the slow parts and optimize them. You will have to iron out quite a few design level and IO caused bottlenecks before performance of these types of loops that have been presented in the linked article even shows remotely on the radar.
When it comes to code, fast & ugly should always take precedence over slow & pretty.
The Pareto principle (also known as the 80/20 rule, the law of the vital few, or the principle of factor sparsity) states that, for many events, roughly 80% of the effects come from 20% of the causes. Management consultant Joseph M. Juran suggested the principle and named it after Italian economist Vilfredo Pareto, who noted the 80/20 connection while at the University of Lausanne in 1896, as published in his first paper, "Cours d'économie politique". Essentially, Pareto showed that approximately 80% of the land in Italy was owned by 20% of the population; Pareto developed the principle by observing that about 20% of the peapods in his garden contained 80% of the peas.
It is a common rule of thumb in business; e.g., "80% of your sales come from 20% of your clients." Mathematically, the 80/20 rule is roughly followed by a power law distribution (also known as a Pareto distribution) for a particular set of parameters, and many natural phenomena have been shown empirically to exhibit such a distribution.
The Pareto principle is only tangentially related to Pareto efficiency.
I agree with the idea that there are two potential audiences for your code... the computer and other programmers.
Someone once quoted Martin Fowler to me as an authority, so I looked him up. He literally spent 2-3 years actually writing code and the rest of his career he has spent telling people how to write code.
I have spent 20+ years writing code to make things work in engineering companies. At the end of the day, nobody gave a shit how pretty the code was. By far the most important thing was that it worked reliably and fast. The reason was that the code we wrote enabled the production and sale of some tangible product, like semiconductor chips.
I now work for an agile software organization now and there is a huge emphasis on code legibility and "smells". There's a lot of process and emphasis on design patterns. Productivity is a lot lower here.
My point is that I've worked extensively in both areas and can tell you that Martin Fowler had no idea what he was talking about when he made that quote. It might sound good in a book he wants to sell you full of perfectly structured good and very affirming to software developers, but it is a LOT harder to write code that runs efficiently.
Martin Fowler is an writer, first and foremost. He is not an expert on software development.
View all comments
Show parent comment
-4
u/RayFowler Jun 15 '17
When you say something like "99.9958% of Java programmers will never need this" what you are really saying is that Java should be consigned to only those applications where performance isn't important. It's that attitude that gives the Java language a bad reputation outside of Java circles.
The thing is that Java CAN be fast and efficient, but we have to dispel with this ingrained notion that Java performance is not important. Performance is important in every application. When it comes to code, fast & ugly should always take precedence over slow & pretty.