• P (unregistered)

    Yikes, why still write code to generate lyrics of 99 Bottles of Beer like this when you can, you know, just put the whole lyrics as a string in a variable? Only total noobs would make this rookie mistake.

  • Hasseman (unregistered)

    One of the issues today with searching for programming functionality on the internet is that it returns an enormous amount of text but no content.

  • (nodebb) in reply to Hasseman

    I think that has been the case ever since it was even possible to search for programming functionality (or anything else, for that matter) on the Internet.

  • (nodebb)

    Why the parentheses? Why variables and not constants? Why not use square brackets for non standard column names which are preferred over double quotes anyway? Why have these columns named using numbers? Why oh why??....

  • Hasseman (unregistered) in reply to Steve_The_Cynic

    Maybe I'm too old. In de 90s I did quite som Excel and Windows programming. It was easy to find to the point documentation with cross references that made sense. Today it is just a lot of text and you search forever to find proper use of it.

  • Brian (unregistered)

    It's not so bad to look for answers on StackOverflow and the like, provided you're asking the right question. You know, like (assuming C# here, but I'm sure similar concepts exist for other languages) "How do I generate a sequential array of numbers"? (Enumerable.Range), or "How do I transform an array of numbers to a string?" (string.Join), or "Whats the best practice for constructing a string from several variables?" (interpolation)

  • Alec (unregistered) in reply to P

    Let me tell you a story... An intern where I work was assigned to improve this one webpage that was just a form for submitting checks if something was broken or not, so that the people using the item would do the checks in order, and so it would report if something was wrong. Before he even got started on adding one label and checkbox to the form, he rewrote the entire page of HTML as a PHP-generated page of HTML. He had parallel arrays for the element type, the element attributes and styles, the values of the labels, the value the checkbox ended up being, and so on. There were at least 10 parallel arrays and a whole mess of functions to put them together to generate a static HTML form. Plus, he thought he was really cool because he could use Vim, so that's what he used for the whole mess. Except he didn't know how to space properly, so the indentation was every-freaking-where. When we were wondering what took him so long when he just had to add one set of fields to the form and saw that... I just didn't know what to do. I'm only sad now that I didn't save that mess.

  • MiserableOldGit (unregistered) in reply to Steve_The_Cynic

    I think it's been around before t'interwebs made the disease go crazy. There's always been people who learn half dozen lines of code, refuse to learn more, and just spend their lives cutting and pasting that. Dunno how they get jobs, but they certainly do.

  • MiserableOldGit (unregistered) in reply to Brian

    Yeah, I agree, and usually if someone says something dumb on StackOverflow it gets corrected by someone else.

    My first suspicion for this would be a visitor to UtterAccess or ExcelExperts or something like that. They are veritable fountains of terrible code and worse advice and bork out proper forums when you are googling for how to do something properly in VBA (Yes, yes, I know the easy answer "to do it properly, don't use VBA"!)

  • aoe (unregistered)

    Psh, query builders are just fancy string concatenators anyway.

  • Black Mantha (unregistered)

    A loop? No way! Don't you know that piecewise string concatenation is quadratic-time, while a single line of ... + ... + ... can be optimized by the compiler? Clearly we're looking at the work of an expert in optimization. Also, StringBuilders don't exist.

  • (nodebb)

    There's yet another F in this WTFFFFFF. Immutable strings datatypes cause O(n**2) behavior in code that concatenate lots of them together.

  • Peter Wolff (unregistered) in reply to MiserableOldGit
    Comment held for moderation.

Leave a comment on “String Up Your Replacement”

Log In or post as a guest

Replying to comment #:

« Return to Article