Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ralee4299ythis is embrassing but what is the right way to write string concatenation. can you enlighten me. thanks! 🙏 -
@ralee common Java practise is to use a string builder. It is essentially a way to mutate bytes. String concatenation will create a new string every time.
Even though the Java compiler automatically turns concats in loops into a string builder so it ends up compiling down the same, but just because the compiler handles it doesn't make it okay :) -
Be interested to see what the down vote was for? Turning into SO now!?
And yeah, it's sad to say but he just didn't have the horsepower to write good code.
Related Rants
-
MikaY19
Non-dev buddy: Dude I'm gonna report you to the tech department what are you hacking??
Me: -
MissDirection153On a break I went into a Best Buy to browse laptops. I had no intention on buying from them because they suck,... -
practiseSafeHex32Dev: this task is done, can I put it in review and do something else? Me: sure, of course. Dev: cool, just ...

I worked with a developer for months. He was senior to me; on more money than me and had way more experience. I spent at least 25% of my time explaining the most basic stuff to him. Things like 'no, that's not how a cache works', 'no, you shouldnt be doing string concatenation inside a loop', 'no you've completely written the wrong thing because you didn't listen'
When he left, he claimed to have finished off a feature for our application. We dove into it, rewrote it, made it more efficient, the code cleaner, the documentation more succinct and the logic more obvious. When I say we, I mean me and a student, and by me and a student, I mean the student with some very light prodding from me.
undefined
idiot
wk5