Really awful object oriented code from Adobe

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com

You have heard that Ruby and PHP are terrible languages because they make you do stuff like stick strings together, and we should all be using a grown-up, adult language like Java to do professional work? Apparently you can write terrible code in any language:

private static String getHeader() throws UnsupportedEncodingException {
byte[] nonceB = generateNonce()
String nonce = base64Encode(nonceB)
String created = generateTimestamp()
String password64 = getBase64Digest(nonceB, created.getBytes(“UTF-8″), PASSWORD.getBytes(“UTF-8″))
StringBuffer header = new StringBuffer(“UsernameToken Username=\”")
header.append(USERNAME)
header.append(“\”, “)
header.append(“PasswordDigest=\”")
header.append(password64.trim())
header.append(“\”, “)
header.append(“Nonce=\”")
header.append(nonce.trim())
header.append(“\”, “)
header.append(“Created=\”")
header.append(created)
header.append(“\”")
return header.toString()
}

Is that what object oriented programming is suppose to look like? Where you smoosh together a bunch of strings? I thought object oriented programming was suppose to save us from that?

Source