Classic WTF: The Quine Programmer

by in Feature Articles on
It's a holiday in the US, where we give thanks. Specifically, we give thanks that we're not working with the person responsible for this. Original --Remy

The Quine – i.e., a program that produces its own source code as output – lives in the esoteric realm of computing and computer science. It’s almost entirely useless, but usually pretty fun. The Quine Programmer, on the other hand, is among the pantheon of programming gods, sitting between The Great Abstractor and The PHP God.

The Quine Programmer has the uncanny gifts of being infinitely good at programming and infinitely insightful, thus allowing him to write a program to replace himself and all other programmers. The output of The Quine Programmer is system that’s fully configurable by the end-user; should the end-user want something changed, she can simply change it herself.


ReferenceError: HELL is not defined

by in CodeSOD on

David came across some Java code. This particular block needed to, based on an integer masquerading as an enumerated type, return an amount of time to sleep. It has strong opinions about what should happen when you send it an invalid value:

private static int getTime(int mode) {
    return switch (mode) {
        case 0 -> 30 * SECOND;
        case 1 -> 15 * SECOND;
        case 2 -> 10 * SECOND;
        case 3 -> 20 * SECOND;
        case 4 -> 17 * SECOND;
        case 5 -> 32 * SECOND;
        default ->
            // go to hell
            1000000000;
    };
}

How Not to Get Honey-Trapped

by in Feature Articles on

At this point, each and every one of us knows more about Jensen Huang's sex life than I think any of us wanted to know. The actual scandal is the way he violated export controls to the tune of $12b in chips, but the scandal everyone is talking about is that he was "honey-trapped". A Chinese spy seduced him, got secrets out of him, and also he violated export controls for her. What can I say? People like thinking about attractive spies doing spy stuff.

It's ripe for joke of course, but it's also ripe for paranoia. I mean, think about it, we're all in tech. We all know insider secrets. At any moment, an extremely attractive person could seduce us and pump us for information about the inventory management process at Initech, and also seduce us. It could totally happen.


The Perils of Web Development

by in Feature Articles on

Earlier this year, I wrote a couple of times about my utility closet of infinite WTFs. After a total remodel and HVAC upgrade, I learned the demons had not been exorcised. Indeed, they still haunt the place, and now they're really showing off their sense of humor.

On a recent November morning with frost covering the ground and below-freezing temps, I awoke to find my house a chilly 14.4C / 58F. The gas furnace would try to start up, then fail with the message "Pressure Error - Your system may not be operational. Do not attempt to correct the problem yourself. Contact your dealer as soon as possible."


There's a Chill in the Air

by in Error'd on

There's a bathroom on the right!

"Interesting temperature reading from WU" notes Peter G. "This must be what happens when a bulk liquid nitrogen carrier runs aground in your favourite holiday spot. Either that or you're supposed to take the average of +60 and -40 to get the actual temperature."


A Living Fossil

by in CodeSOD on

Today's anonymous submission is a blast from the past. This comes from an intranet HTML page that has been receiving continuous updates for some time. How long? Well, let's take a peek at how it does its layout.

                                                            <b>Extension:</b> x5555<br />
                                                            <b>Email:</b>: <a href="mailto:[email protected]"></a><br /><br />
                                                        </td>
                                                        <td width=140>
                                                        </td>
                                                    </tr>
                                                    <tr><td>&nbsp;</td></tr>
                                                    <tr><td>&nbsp;</td></tr>
                                                </td>
                                            </table>
                                        </center>
<!-- END DIRECTORY -->
                                        <tr><td><br /></td></tr>
                                    </td>
                                </tr>
                            </table>
<!-- MATERIAL ENDS HERE -->
                            <br />
                            <br />
                        </td>
                    </tr>
                </table>
            </center>
        </td>
    </tr>
    <tr><td width=987 height=4 background="../images/table_bottom_sidebar.jpg"></td></tr>
</table>

Terning White as a (Style)Sheet

by in Representative Line on

Years ago, Stefan's company was short handed, especially on the developer team. But they had a large hell-desk support team. And at some point, someone had the genius idea: "PHP is easy for anyone to learn, and so our helpdesk folks should have no problem. Let's hand them development tasks."

Which meant Stefan inherited lots of lines which look like this:


Building a Line

by in CodeSOD on

There's an unofficial category of posts here that I call "Somebody told us string builders were more efficient, so we always use string builders, regardless of whether or not that actually makes sense," or STUSBWMESWAUSBROWONTAMS, for short. Probably should workshop that name some.

In any case, Adam sends us a new entry for that collection:


Archives