optimal java experience

https://lemmy.ml/post/2105561

optimal java experience - Lemmy

I know the guy meant it as a joke but in my team I see the damage ā€œacademicā€ OOP/UML courses do to a programmer. In a library that’s supposed to be high-performance code in C++ and does stuff like solving certain PDEs and performing heavy Monte-Carlo simulations, the guys with OOP/UML background tend to abuse dynamic polymorphism and write a lot of bad code with lots of indirections and many of them aren’t aware of the fact that virtual methods and dynamic_cast’s have a price and an especially ugly one if you use them at every step of your iterative algorithm. Like the guy in the meme I certainly wouldn’t want to have someone in my team who was molded by Java and UML diagrams.

Depends on the requirements. Writing the code in a natural and readable way should be number one.

Then you benchmark and find out what actually takes time; and then optimize from there.

At least thats my approach when working with mostly functional languages. No need obsess over the performance of something thats ran only a dozen times per second.

I do hate over engineered abstractions though. But not for performance reasons.

In my experience we all go through a stage at the Designed-Developer level of, having discovered things like Design Patterns, overengineering the design of the software to the point of making it near unmaintainable (for others or for ourselves 6 months down the line).

The next stage is to discover the joys of KISS and, like you described, refraining from premature optimization.