mikhailian.mova.org

5 Whys

Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

— Linus Torvalds

I was working on a performance problem, recently. Somewhere during the migration from EclipseLink to Hibernate, a legacy application had severe performance problems on a particular type of queries.

A closer inspection revealed that someone rewrote the SQL queries so that the Oracle database behind follows a particular query plan using a trick popular many years ago.

Why did they have to do it?

Because the code was not efficient.

Why was the code not efficient?

Because it was written by hand instead of using EclipseLink ORM.

Why was it written by hand?

Because the data structure did not match the data.

Why did the data structure not match the data?

Because someone insisted on this and others silently accepted

Why?

Because sociopaths win?