The Programming Language Hoax/Satire Thread


  • BINNED

    This is a satirical fake interview with Charles Moore, the inventor of Forth. The quote below is representative:

    Well, for one thing, FORTH looks very simple to implement. Every idiot on the globe thinks he can write a FORTH implementation himself. And this is in fact true. I designed FORTH such that it was easy to implement. Back in the sixties I wanted to have my fourth generation language toy as soon as possible. That's why. As soon as they have their FORTH implemented, they discover that it is not easy to do anything useful with it. But then they are already accustomed to it and they go on. Not that anything useful gets achieved, but the work invested in learning and implementing FORTH is not easily written off. They go on for a very long time to see if their investment will be rewarded in the long run. And they pretend (and sometimes even think) that they are very content with it. And when they buy FORTH instead of writing it, they continue to use it for exactly the same reason.


  • Discourse touched me in a no-no place

    obRelated: for those that haven't come across it yet...

    When we found others were actually trying to create real programs with A, we quickly added additional cryptic features and evolved into B, BCPL and finally C. We stopped when we got a clean compile on the following syntax:
    ­
    for(;P("\n"),R--;P("|"))for(e=C;e--;P("_"+(*u++/8)%2))P("| "+(*u/4)%2);


  • BINNED

    Also related:

    http://bit.csc.lsu.edu/~gb/csc4101/Reading/gigo-1997-04.html

    From the requirements for the Ada language design:

    [The language] should emphasize program readability. [Translation: It should be nearly impossible to write a program that will compile or execute.]

    There shall be no language restrictions that are not enforceable by translators. [Translation: No reasonable program will ever compile.]

    [The language] shall attempt to avoid features whose semantics depend upon characteristics of the object machine... [Translation: Issues critical to embedded systems like time and memory cost must be avoided.]


  • Banned

    Stroustrup: OK, so this new language had to divorce itself from Unix, by hiding all the system calls that bound the two together so nicely. This would enable guys who only knew about DOS to earn a decent living too..
    Interviewer: I don’t believe you said that….
    Stroustrup: Well, it’s been long enough, now, and I believe most people have figured out for themselves that C++ is a waste of time but, I must say, it’s taken them a lot longer than I thought it would..
    Interviewer: So how exactly did you do it?
    Stroustrup: It was only supposed to be a joke, I never thought people would take the book seriously. Anyone with half a brain can see that object-oriented programming is counter-intuitive, illogical and inefficient..


  • Discourse touched me in a no-no place



  • How To Write Unmaintainable Code

    Representative samples:

    When using abbreviations inside variable or method names, break the boredom with several variants for the same word, and even spell it out longhand once in while. This helps defeat those lazy bums who use text search to understand only some aspect of your program. Consider variant spellings as a variant on the ploy, e.g. mixing International colour, with American color and dude-speak kulerz. If you spell out names in full, there is only one possible way to spell each name. These are too easy for the maintenance programmer to remember. Because there are so many different ways to abbreviate a word, with abbreviations, you can have several different variables that all have the same apparent purpose. As an added bonus, the maintenance programmer might not even notice they are separate variables.

    for(j=0; j<array_len; j+ =8)
    { 
        total += array[j+0 ]; 
        total += array[j+1 ]; 
        total += array[j+2 ]; /* Main body of 
        total += array[j+3]; * loop is unrolled 
        total += array[j+4]; * for greater speed. 
        total += array[j+5]; */ 
        total += array[j+6 ]; 
        total += array[j+7 ]; 
    }
    

    The key to writing maintainable code is to specify each fact about the application in only one place. To change your mind, you need change it in only one place, and you are guaranteed the entire program will still work. Therefore, the key to writing unmaintainable code is to specify a fact over and over, in as many places as possible, in as many variant ways as possible. Happily, languages like Java go out of their way to make writing this sort of unmaintainable code easy. For example, it is almost impossible to change the type of a widely used variable because all the casts and conversion functions will no longer work, and the types of the associated temporary variables will no longer be appropriate.

    char *p; 
    switch (n) 
    { 
    case 1: 
        p = "one"; 
        if (0) 
    case 2: 
        p = "two"; 
        if (0) 
    case 3: 
        p = "three"; 
        printf("%s", p); 
        break; 
    }
    

    If your boss thinks that his or her 20 year old FORTRAN experience is an excellent guide to contemporary programming, rigidly follow all his or her recommendations. As a result, the boss will trust you. That may help you in your career. You will learn many new methods to obfuscate program code.


  • Winner of the 2016 Presidential Election

    @tar said:

    Consider variant spellings as a variant on the ploy, e.g. mixing International colour, with American color and dude-speak kulerz.

    https://en.wikipedia.org/wiki/Adobe_Color

    @tar said:

    char *p;
    switch (n)
    {
    case 1:
    p = "one";
    if (0)
    case 2:
    p = "two";
    if (0)
    case 3:
    p = "three";
    printf("%s", p);
    break;
    }

    Being too lazy to compile that right now, I'm going to guess that "if (0)" skips the next assignment, not the case label?



  • Is this for real or the whole article is a joke? I mean, he makes good points but, come one!



  • Not to start a discussion instead of posting more hoaxes/satires (By the way, does that answer your question, @Eldelshell ?), but:
    Are there any languages higher level / nicer than C++ that support zero-cost abstractions, excluding the new rust?


  • Discourse touched me in a no-no place

    @Dreikin said:

    Being too lazy to compile that right now, I'm going to guess that "if (0)" skips the next assignment, not the case label?

    Case labels are part of the static structure of the code; they're completely unaffected by the if (0). That you can do this sort of shit is one of the worst things about C…



  • @dkf said:

    Case labels are part of the static structure of the code; they're completely unaffected by the if (0). That you can do this sort of shit is one of the worst things about C…

    I don't like that line of thinking.
    The worst things about C are the things that you can't do in it, or things that are hard/ugly/awful/horrible/dangerous to do in it - not the things that you can do in it yet can also trivially avoid doing in it.


  • Java Dev

    @dkf said:

    That you can do this sort of shit is one of the worst things about C…

    There are lots of things in C that you should never be doing except when writing for the International Obfuscated C Code Contest, but calling them 'the worst' may be a misnomer.


  • Discourse touched me in a no-no place

    @PleegWat said:

    calling them 'the worst' may be a misnomer

    We always have room for the Worst of the Worst…


  • FoxDev

    the evil ideas thread is ↩ 🔄 ↪ way


  • Discourse touched me in a no-no place

    In fact, we can do that quite handily:

    #define when if (0) case
    
    char *p;
    switch (n) { 
    when 1:
       p = "one"; 
    when 2:
       p = "two"; 
    when 3: 
       p = "three"; 
       printf("%s", p); 
       break; 
    }
    

  • Java Dev

    You, my friend, are evil.


  • Fake News

    @Eldelshell said:

    Is this for real or the whole article is a joke? I mean, he makes good points but, come one!

    If we had a "Somebody didn't get the topic title" badge you'd get it with this post. Have a 🏁 for "didn't get the joke" instead.

    Or you're just trolling, in which case you're a very naughty boy.



  • 5 quotes by the creator of PHP, Rasmus Lerdorf

    • I really don't like programming. I built this tool to program less so that I could just reuse code.
    • PHP is about as exciting as your toothbrush. You use it every day, it does the job, it is a simple tool, so what? Who would want to read about toothbrushes?
    • I was really, really bad at writing parsers. I still am really bad at writing parsers. We have things like protected properties. We have abstract methods. We have all this stuff that your computer science teacher told you you should be using. I don't care about this crap at all.
    • There are people who actually like programming. I don't understand why they like programming.
    • I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I'll just restart apache every 10 requests.

    And a bonus quote about how htmlspecialchars() was named:

    • Well, there were other factors in play there. htmlspecialchars was a very early function. Back when PHP had less than 100 functions and the function hashing mechanism was strlen(). In order to get a nice hash distribution of function names across the various function name lengths names were picked specifically to make them fit into a specific length bucket. This was circa late 1994 when PHP was a tool just for my own personal use and I wasn't too worried about not being able to remember the few function names

    I have a worrying feeling this is not actually satire though.



  • @tar said:

    I have a worrying feeling this is not actually satire though.

    If it is, it's quite a widespread one


Log in to reply