• (nodebb)

    Re: what "rep" might mean. It might mean "reply", as noted, but it might equally, in Europe, depending on which large European press agency we're talking about(1), mean "réponse" == "reply" in French.

    (1) Specifically, I thought initially of Agence France Presse.

    Addendum 2021-12-14 06:43: réponse is also a reasonable translation of English "response"

  • Ollie Jones (unregistered)

    It looks like the Count on Sesame Street was Hungarian nobility, eh? Maybe a cousin of Charles Simonyi, the dude who cooked up that notation?

  • (nodebb)

    I think I found my second favorite naming convention! Yay!

    The first one being, of course, naming things after random people/places/events/etc that have no relation to what the thing actually does.

  • Marc (unregistered)

    Up to a thousand numbers, requests, and responses supported. But at least you can count on never having to deal with more than 10 databases.

  • Erwin (unregistered) in reply to Marc

    But a SQL injection vulnerability isn't a WTF.

    I've left the SQL injection vulnerability in there, just to keep at least some of the WTF in place.

    Is a SQL injection vulnerability a WTF or is it not a WTF?

  • 516052 (unregistered) in reply to Vilx

    The real power move is to name things after things and people that remind you of what the thing actually does. Like say if you have a math utility class and you name it after your favorite math teacher. That sort of thing.

    That way code is perfectly readable to you but only you. Nobody else can understand it.

  • (nodebb) in reply to 516052

    Whooooaaaaaaa!!!! <mind-blown.gif> 🤩😲

  • Yazeran (unregistered) in reply to Erwin

    <quote>Is a SQL injection vulnerability a WTF or is it not a WTF?</quote> Well that is the question is it not.

    And to get an answer, you need to go to Elsinore or we need your cat.

    Yazeran

  • Duston (unregistered)

    "I think I found my second favorite naming convention!" I suppose it's a mild point in their favor they didn't use "the" in the variable names. "$theReq", "$theRep", etc.

  • Foo AKA Fooo (unregistered) in reply to Erwin

    It's Schrödinger's WTF: Put a server with an SQL injection vulnerability on the net and wait 5 minutes. Without looking, the database is now in a superposition of correct and fucked-up states.

  • ooOOooGa (unregistered)

    I once refactored a class definition that defined several member variables. Three of them were named 'temp', 'temp2', and 'temp3'. Of the three, one of them was never used. The other two were used for core logic critical to the operation of the class. And no, none of them had anything to do with temperature.

  • Carl Witthoft (google)

    I prefer the subset $art000 -->deet000 .

  • (nodebb) in reply to Vilx

    Well, I do name my variables with random letter sequences... when I'm doing "proof of concept" experiments. When I finally make the snippet do what I want from it and decide to use it in my current project/add it to my archive, I replace all this junk with something readable, often along with a heavy rewrite.

  • Jan (unregistered)

    The real WTF is that this is exactly what all the ADO.Net and Entity Framework examples teach you to do. Load the "entities", edit them and save the changes. In there it's further improved by the library having to track changes to objects and construct an update statement based on the property that had been modified.

  • (nodebb) in reply to Duston

    Well of course. It's not the request, just one of them! Therefore, it should be $areq000.

  • (nodebb)

    The RCA Fortran compiler circa 1969 assigned names from the dictionary. Each pass used a different letter. You would see names like aardvark and aardwolf in pass one.

  • Jeremy (unregistered)

    I do wonder how $req000 only got used on $db4. Did $db0-$db3 get no requests at all? Or was there a different naming perhaps.

    And using $row000 for anything else than the first row is just sloppy I think.

  • Argle (unregistered) in reply to Vilx

    I once maintained a program originally written for the Apple ][ in BASIC and then ported to C on a Mac. Yes, it was C, but the conversion just tweaked syntax. Variables were still named X, P, Q2, etc. Then another programmer got in the game before me to add features and used variables like GotThemByTheShortAndCurlies and MarkOfTheBeast666. Sense of humor, I suppose, but neither any more useful then X and Q2.

  • Prime Mover (unregistered) in reply to Jeremy

    I used to be a werewolf but I'm alright $row000

  • Fernando (unregistered)

    $db4 is clearly a pointer to a dBase IV database.

  • (nodebb) in reply to Carl Witthoft

    Code with variables like that will be breaking down in no time.

  • (nodebb) in reply to Vilx

    Friend of mine used to listen to Black Sabbath while he worked (this was in the early 90s). His variable names were based on the track he was currently listening to.

    He commented his code as well, if there was a particularly good lyric somewhere that became the code comment.

    $warpigs = readline(); // Generals gathered in their masses

  • RLB (unregistered) in reply to Duston

    I suppose it's a mild point in their favor they didn't use "the" in the variable names. "$theReq", "$theRep", etc.

    Or worse: $myFoo.

  • (nodebb)

    But a SQL injection vulnerability isn't a WTF.

    Maybe my bar is lower than yours, but I'd say a SQL injection vulnerability that is exploitable just by typing in the right query parameter in the address bar is very much a WTF. Certainly, "what the fuck" is what escaped my lips when I read the first line of the code fragment.

  • löchleindeluxe (unregistered)

    Eh, could be a shop with goopuddle methodology: it was not clear that there wouldn't be a report/log/something else entirely/specialcasing via JDNI done with those entries, so of course you don't oneshot it to the database. (Or there used to be – though I'd expect it to sit there, commented out – so why bother refactoring? Want part X not done anymore? Remove the lines that do X.)

  • Officer Johnny Holzkopf (unregistered) in reply to Prime Mover

    This is where werewolves (www) need to call a lawyer because I easy sue; IEASYS00. Get off my lawn.

  • Duke of New York (unregistered)

    I hope that Sven is back at the mental hospital, getting the care that he needs.

  • Bob (unregistered) in reply to Vilx

    Years ago, I worked on an MFC system that had a UI component called the "Kateslist". It was made by a developer named Kate. Other than that, it was a fairly unremarkable combo subclass.

    The same project also had an item class named "CThingy" because they'd already used CItem for a different type of item.

Leave a comment on “$art000”

Log In or post as a guest

Replying to comment #:

« Return to Article