Comments on "Easy String Concatenation Considered Harmful?"
I received some interesting comments on Easy String Concatenation Considered Harmful? and want to comment some of them.
I too love the easy string concatenation of Java. But ease of use and the readable code that comes from it will very often hinder the programmer from seeing the problem when it occurs.
I also agree that performance optimization should not be a developers first concern. But my article was written from my experience that when programmers encounters performance problems, lack of prepared statements (and their re-use) often is the problem.
And using persistence layers isn't always the cure, since I've seen auto-generated code with the same flaw. And then, you can't just get around it easily without either choosing another persistence layer or fixing the the persistence layer.
And, yes, "select * from...." is bad practice and due to my laziness when composing the article.