• (nodebb)

    Is the __________ redacted table name, or they have a table named _________?

    No, I wouldn't be surprised if it's the latter.

  • Harrow (unregistered)

    Generally, when somebody hands me a working program with no provenance and no supporting documentation, and asks me to convert it to another platform etc., I do exactly that -- I blindly port it over with the absolute minimum of analysis or cleanup.

    Because with only the code available, the code is the domain definition, the code is the problem statement, the code is the proposed solution, the code is the functional specification, and the code is the commentary.

    If it is buggy, too bad. If it has security holes, if it invites input errors, if it occasionally loses data, if it is impossible to understand, too bad. It performs exactly as it was specified to perform. By the code.

  • Sauron (unregistered)

    Tom supported a VB6 application. It was about 750,000 lines of code

    "supported" assumes that kind of monster is supportable in the first place.

    It sounds more like Tom was used as the victim of a symbolic human sacrifice, to appease the wrath of some heavenly powers that manifested in the form of lost contracts for the company.

  • Hanzito (unregistered)

    Is this a project where they hired a dozen junior devs for a greenfield project? "Here are the client's requirements, you have 3 months."

  • Officer Johnny Holzkopf (unregistered) in reply to Hanzito

    It's probably more like "The Client wants the PC to make the invoices. DO IT NOW."

  • Duke of New York (unregistered)

    It takes 30 seconds to write a SQL string literal encoding function on a bad day. There is no excuse. No, not even "the values are known."

    "split across far too many files": How many would you like them to be split across? One?

  • (nodebb) in reply to Duke of New York

    Both spaghetti code and ravioli code are horrible to debug. Clean Code suggested 6 lines per function, and if you stick to that, and have a file for each, I think it would be slightly worse than having a single file. Slightly.

  • Kleyguerth (github) in reply to Harrow

    Exactly, otherwise obligatory xkcd happens: https://xkcd.com/1172/

  • Duke of New York (unregistered)

    Sorry, I don't go by "Uncle Bob Says". When I have too many files open in the IDE, I close some.

  • Bill T (unregistered)

    "... and this was the [result] assault." There, fixed it for you.

  • (nodebb) in reply to Duke of New York

    It takes 30 seconds to write a SQL string literal encoding function on a bad day. There is no excuse. No, not even "the values are known."

    Because of course, if you are creating queries like this, you absolutely know how to make a string literal encoding function without any potentially catastrophic bugs.

    "split across far too many files": How many would you like them to be split across? One?

    If only there were any numbers between one and "far too many"...

  • Duke of New York (unregistered)

    Man, sometimes a code base is just big. Can't Visual Studio index VB code?

  • OlderThanThe70s (unregistered)

    Some day I'd love to be able to read stories from the people who now take care of the Voyager spacecrafts.

  • (nodebb) in reply to jeremypnet

    Because of course, if you are creating queries like this, you absolutely know how to make a string literal encoding function without any potentially catastrophic bugs.

    Using a well-tested and well-maintained library function is, of course, how a responsible professional would do it.

    However, the point is still valid that almost anyone should be able to write something that's 99.5% effective. If they're willing to narrow the scope of data they can handle, then probably 100% effective if the method limits allowed characters to ASCII. Using string concatenation without such protection isn't done because "it's too hard", or "my dev stack doesn't support it". The only reasons to not handle SQL injection are "I don't care", or "I'm completely ignorant of the entire issue"

  • Fizzlecist (unregistered) in reply to jeremypnet

    I'm afraid the only options are one, two, and "far too many"

  • (nodebb)

    I agree that this abomination is the result of it's ancestry. However, I don't think VB6 is the culprit here. Rather, this is a part name that embeds numbers within it. Somebody converted a paper business method directly into code.

    As for SeamlessDoorTypeElevPricegroupPrepgroup:

    I'm not sure what a "SeamlessDoor" is but I don't find "SeamlessDoorType" to be unreasonable. Next is "ElevPricegroup"--"Elev" = "Elevation". In this context, what does the front look like? There are a range of patterns that all price the same. Put a different head on the router and you get a different result but it's still the same material and the same labor. Likewise, different arch profiles are purely a matter of machine instructions. Finally, we have "Prepgroup". Some sort of processing that has multiple possible paths. The one that comes to mind is distressing, but I don't know the industry well enough to say if that's the only one. You can have normal wood or you can put it through the extra labor of making it look old.

    (Background: To one degree or another the vast majority of code I have written professionally deals with cabinets. Cabinets have doors.)

  • Franchise Nations (unregistered)
    Comment held for moderation.
  • Old lurker (unregistered)
    Comment held for moderation.
  • (nodebb)

    I'm not sure what a "SeamlessDoor" is

    Good point, me neither. So I asked the internet, and it seems to be a door without a door jamb.

  • (nodebb)

    rsDoorpodet sounds like something a Dutchman would call someone he really doesn't like...

  • (nodebb)

    I continue to be flabbergasted at the number of people who insist the solution is to use well-tested publicly available library code while the app we're looking at probably predates the existence of any such library code by 20+ years.

Leave a comment on “A Mid Query”

Log In or post as a guest

Replying to comment #:

« Return to Article