• P (unregistered)

    Imagine if job_id is a getter that gives different values each time it's invoked.

  • bvs23bkv33 (unregistered)

    what is good idea? update rowid?

  • Andrea (unregistered)

    May be the developer intended to obtain a write lock on the row?

  • P. Wolff (unregistered) in reply to P

    Maybe that's what happened to Duane's ex-coworker?

    Btw, "something_id" seems to be a good name for a random variable.

  • MiserableOldGit (unregistered)

    Could it be an attempt to force an index rebuild? still a WTF, but then anything using an "ORM" is automatically a WTF. Learn how relational databases work or stay the hell away from them. And if you are passing raw sql through the ORM in anything more than very exceptional circumstances you should probably be kept away from keyboards.

  • MiserableOldGit (unregistered) in reply to P

    If it returns a randomly generated UUID, cunningly interspersed with ID fields already issued to the table then that could be Duane's ex co-worker's parting gift to his employer ....

  • Andrew (unregistered)

    "It’s 2020: we officially live in the future. Things aren’t better."

    YES!

    I've been thinking about that for a while. I'm barely old enough to remember Y2K. 2000 was supposed to be the apocalypse: if El Nino didn't kill you in 98, the computers would in 2000. I'm pretty sure the disappointment expressed in Remy's quote is what it feels like to get old.

  • (nodebb)

    One other thing it does is check that the user has permission to update that table. And if replication is setup on the table, it would force the rows to be resync'd.

  • (nodebb)

    I'm wondering what'll happen if I sue the federal government and demand that they change my social security # to the same #.

  • Milo (unregistered) in reply to P

    Imagine if job_id is a getter that gives different values each time it's invoked.

    Thankfully, Go doesn't let you do that. If it is a method you damn well call it like one, none of this "methods pretending to be a field" stuff that C# lets you do. That is one of Go's strengths really, if the code looks like it is doing a particular thing, it probably is.

  • (nodebb) in reply to Auction_God

    Yeah, I was thinking along these lines too. It checks the user has the right privileges and the program is connected to the DB (although i'm sure there are other, better ways to do that with the ORM object (I don't know Go)). Does Go have a concept of exceptions? That might explain the results not being collected?

  • MiserableOldGit (unregistered) in reply to Milo
    Thankfully, Go doesn't let you do that. If it is a method you damn well call it like one, none of this "methods pretending to be a field" stuff that C# lets you do.
    That's just a red rag to a bull for some of the programmers I've worked with ... I remember the lengths one went to get COM objects to pass internal pointers around. I pity the person that inherited that unstable wobbly edifice of code.
  • Some Ed (unregistered)

    Things won't get better in the way imagined until some time after we've done away with new programmers starting out in the workforce and being given real work while still clueless and unprepared. I'm not saying that all of the problems are caused by these new programmers, mind you. It's just that if all of our new programmers were entering the workforce properly trained for long enough, we won't have any still clueless senior programmers making mistakes in the last month before they retire. Once we get to that point, we can start properly making real progress.

    Just to be clear, no, I don't have any idea how to possibly train programmers properly prior to giving them real work. I mean, OK, one could implement a massive virtual reality project with real world programming rules, and put everybody through that, but it doesn't seem like one could actually get to the point where that could possibly be good enough to work right until after you've fixed this issue, so it doesn't really work as a serious proposal.

  • Programmer Robot 10C-32 (unregistered)

    Maybe the developer wanted to leave himself a hook for an injection attack so he could exact his revenge when he ultimately got fired from the company. A perfect plan!

    http://contoso.com/restapi/?job_id=0;drop table backlog;--

  • I dunno LOL ¯\(°_o)/¯ (unregistered)

    Easy Reader Version: I really hope it WAS firing a trigger, because that is just delightfully awful

    Firing a trigger to trigger a firing? That sounds good to me!

  • 🤷 (unregistered) in reply to I dunno LOL ¯\(°_o)/¯

    It was triggering the firerer.

  • El Dorko (unregistered)

    "It’s 2020: we officially live in the future. Things aren’t better."

    True dat! For the past few decades, there have been umpteen new technologies promising to make work easier and faster and more productive. By my calculations, I should be working less that 20 minutes a month by now - but nay, I just work more and more and more all the time. How come? Somethings really not right in this equation...

  • nasch (unregistered) in reply to MiserableOldGit

    Using an ORM and knowing how relational databases work are not mutually exclusive.

Leave a comment on “Gormless and Gone”

Log In or post as a guest

Replying to comment #:

« Return to Article