Reply to post: I am too stupid to understand the article

Learn you Func Prog on five minute quick!

Voyna i Mor Silver badge

I am too stupid to understand the article


I know this is bad practice but we had a program which mined a load of data from a database, reformatted and then stored it in a way useful for analysis. It was in Java and there was a lot of code of the form

stringBuffer.append(ident + ',' + a + ',' + b + ',' + c + '\n');

Now I know this is Bad Practice and a whole lot of other things but it worked, reliably and consistently. And it churned through millions of tuples in multiple tables in sensible time.

Then we acquired a new programmer who was asked to do something with this code. And we ended up with every occurrence changed to


append(a).append(',').append(b) .append(',').append(c).append('\n');

[edit-the original single line version appears to have borked el reg formatting]

Because it was (a) more functional and (b) more correct and (c) more readable.

And...because if you asked it, Netbeans would carry out the conversion automatically.

Programming would be absolutely great if it wasn't for programmers.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019