- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Imagine if
job_id
is a getter that gives different values each time it's invoked.Admin
what is good idea? update rowid?
Admin
May be the developer intended to obtain a write lock on the row?
Admin
Maybe that's what happened to Duane's ex-coworker?
Btw, "something_id" seems to be a good name for a random variable.
Admin
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.
Admin
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 ....
Admin
"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.
Admin
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.
Admin
I'm wondering what'll happen if I sue the federal government and demand that they change my social security # to the same #.
Admin
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.
Admin
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?
Admin
Admin
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.
Admin
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;--
Admin
Firing a trigger to trigger a firing? That sounds good to me!
Admin
It was triggering the firerer.
Admin
"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...
Admin
Using an ORM and knowing how relational databases work are not mutually exclusive.