Remy Porter

Remy is a veteran developer who writes software for farming robots. They pick tomatoes.

He's often on stage, doing improv comedy, but insists that he isn't doing comedy- it's deadly serious. You're laughing at him, not with him. That, by the way, is usually true- you're laughing at him, not with him.

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:


Next Month

by in CodeSOD on

One of Sean's colleagues left Initech on good terms. It caused no small amount of surprise that the very next day their billing system started failing. The billing system which the colleauge had worked on.

No one truly suspected foul play, it was just a weird coincidence. Still, billing blowing up was a 5 alarm fire, so everyone was throwing every idea out about what could be the cause.


In the Hole

by in Feature Articles on

Look, I don't want to keep talking about security issues. Blame AI. Just another thing it ruined.

At this point, you've probably heard about *sshole. If you haven't, the quick summary: on some Linux systems, SSH will log you in to an account with no password if you supply a password greater than 256 characters long. Frequently, you might make accounts like root nominally inaccessible by giving it no password, so this is a big deal. Worse, it impacts varieties of Linux that use the musl implementation of libc, like Alpine- the kinds of varieties that run inside a container hosting a web app somewhere.


Plenty of IDs

by in CodeSOD on

Venkat joined a new team in the middle of a big refactoring effort. The code was quite a mess, glued together by long Python scripts with main functions longer than a Tolstoy novel. It was this effort to clean up the code into neat modules that highlighted some logical issues with their implementation.

 def generate_random_number():
 """ Generate a 5 digit random number.
 """
    return "".join(map(str, random.sample(range(0,10),5)))

Eventually

by in CodeSOD on

We were just discussing TODO comments recently, and that motivated Bernard to send us this representative comment..

  // TODO: This method should ideally be in tax frame work but due to
  // the time constraint I am duplicating the code here.
  // Needs to be refactored. Oct 28, 03.

Only Create Me if I Exist

by in CodeSOD on

Foreign keys are an important part of making sure the entities in our relational database can be connected back together and queried correctly. It's part of proper data normalization. This isn't shocking, of course: the order line table has a foreign key over to the products table, so that every line item points to a product we sell. That's database 101. Database 201, you'd also think about the times where you have a hierarchy of records, where say, every Employee has a ManagerId, which is a foreign key back to the Employee table itself (and in database 301, you'll understand why having a ManagerId field is a terrible choice, but that's neither here nor there).

The important thing here is that foreign keys are very common, and foreign keys pointing back to the same table are also very common.


Archives