| « Prev | Page 1 | Page 2 | Next » |
|
I'll see your fist and raise it...err never mind.
If I had a dollar for every project I got placed on that was developed like this I'd be retired by now. This is the type of stuff that makes me want to go flip burgers for a living. |
|
I have seen the same problem with incrementing primary keys using "MAX(intuserid) + 1".
Can't really disclose the problem that it caused, but it was very bad. |
|
I was wondering why my gym was spamming me with male enhancement emails.
|
No he wouldn't - Waluigi has an inverted "L" on his cap. </pedantry> |
Re: Feeling Aggregated
2009-01-20 11:30
•
by
Neil
(unregistered)
|
Perhaps its just that guess they have genital size recognition software on the cameras in the locker room. |
|
And then they wanted to sell their services to other "Gyms" so it was requested that the other "Gyms" be allowed to send "membership" information to it.
Jory's boss said, "Well since we can send information to it, what's so hard about allowing other gyms to send information to it?" At which point and time Jory began a 3 month journey down the road of educating his superiors and letting them know why direct database access is a bad thing. Next they decided that since they have these email addresses for members, they should send mass emails out to these users as well. To do this we weren't allowed to use a mass emailing service. Also, you can't use the same servers or ip addresses that the original servers are hosted under in case we get blacklisted. Solution: let's use the ip addresses from a different company that we own. Nevermind that the two systems are nowhere near each other physically. Nevermind that it would require a process to be setup that pulls down all 700,000+ email addresses, and separate email templates for each location (that were setup in the aggregator) to this new server. Nevermind that there are people that spend their lives figuring out how to get spam through email filters and now Jory was required to figure that out as well. Oh, and lastly nevermind that they didn't actually want to pay for a server, or software, so a glorified workstation was used and mercury mail server sent the emails. |
Re: Feeling Aggregated
2009-01-20 12:20
•
by
the real wtf fool
|
Just wasted half an hour of my life looking at the super mario wiki - thanks to you... |
Re: Feeling Aggregated
2009-01-20 12:34
•
by
D. Travis North
(unregistered)
|
And I'll be spending the next half hour there, thanks to you... |
Re: Feeling Aggregated
2009-01-20 12:36
•
by
Charles Manson
(unregistered)
|
Get back to work slacker. |
Re: Feeling Aggregated
2009-01-20 12:36
•
by
Steve H
(unregistered)
|
Well, that post was worthwhile then. |
|
Frankly, the solution is correct for what passes for the architecture.
|
|
I'm missing something here....what then happens (more specifically than a bunch of emails go out).
|
|
Completely irrelevant to the article, I really enjoy the new Irish Girl ad. Improves the site aesthetics immeasurably.
|
|
I was expecting a variation on:
1. Each gym would print out a copy of the application and mail it to the mother ship. 2. The applications would arrive by mail, be opened, then put on a wooden table and photographed. 3. The photograph would be scaned into the computer then OCR'ed. 4. The resulting document(s) would then be compiled and a list created for pig boss. |
|
I'm just curious, how can max(x) + 1 make a duplicate key?
|
|
Oh damn. If it is one thing that will make me turn on NoScript for this site, it is seeing Irish Girl.
|
Two requests go in at about the same time. Both read the current value of the key and get the same value. With no constraints this is entirely possible. |
if you do a "max(x)+1", and then do it again, and then do your inserts, you get dups. it's a classic race condition that needs some sort of semaphore or other synchronization mechanism around it. |
Re: Feeling Aggregated
2009-01-20 13:50
•
by
IT Girl
(unregistered)
|
You don't have google? First hit is a picture. Very clear. |
Re: Feeling Aggregated
2009-01-20 13:54
•
by
Anon
(unregistered)
|
Oh dear.... |
Re: Feeling Aggregated
2009-01-20 14:00
•
by
Franz Kafka
(unregistered)
|
which is why sequences are so handy. |
|
Um, the real WTF is that the kid didn't automatically see that the code would be handled like that. In a coding environment that badly done, you don't try to fix everything first day or say to the boss 'I can't see how it could be done' simply because it can't be done the ideal way. You work on the problem, fixing what you can when you can. At the end, you end up with better code. For now, you end up with a job and a boss that doesn't think you are incompetent.
|
Re: Feeling Aggregated
2009-01-20 14:12
•
by
Anonymous
(unregistered)
|
|
They weren't autonomous calls to the database. So instead of making it part of one big transaction the code went out grabbed the next id number and then returned that back to the code and then it inserted the new record into the DB.
|
Did you perhaps mean "point in time"? Because that would actually make sense and have some semantic meaning, instead of being a weird malapropism. |
Re: Feeling Aggregated
2009-01-20 14:18
•
by
Anonymous
(unregistered)
|
|
Congratulations you found an error in a poster's grammar!
|
Yeah. I noticed her to. Hip-hip-hoooray! Hip-hip-hoooray! Hip-hip-hoooray! Irish I were really Irish! |
Compiling! |
Re: Feeling Aggregated
2009-01-20 14:48
•
by
the real wtf fool
|
You've never wandered off on a linky voyage of discovery after finding the information you wanted? WTF?? |
Re: Feeling Aggregated
2009-01-20 14:51
•
by
the real wtf fool
|
nicely put. Unfortunately play fighting in the corridor is somewhat frowned upon where I am so daily wtf has to suffice. |
Re: Feeling Aggregated
2009-01-20 14:51
•
by
I'm not tellin' you
(unregistered)
|
|
I think that it's because they came for the pic and stayed for the nostalgia.
|
|
Waluigi is retarded, and so am I since I don't know anything about OOP but it seems:
Mario = subclass of player Luigi = subclass of Mario Wario = subclass of mario? or should be also subclass of player? Waluigi = wtf??? |
Re: Feeling Aggregated
2009-01-20 15:35
•
by
Nathan
(unregistered)
|
I agree entirely -- does he plan on staying employed? Occasionally software sucks that you have to work on. The trick is to suffer through the painful code until you have learned how it works, and shown your superiors that you are capable, intelligent, and get stuff done right. THEN you worry about overhauling it. I wouldn't want to hire someone that was afraid to touch badly written code -- EVERY company has its share of crusty, nasty code, and somebody has to maintain it. An "I can't figure it out" just means you are incompetent. |
and use of Scope_Identity() or the equivilent in your database of choice. If there is no equivilent, choose a real database next time. |
Depends a bit on the situation though. I've had cases so bad that no amount of maintaining would really have made any long term sense and we were just better off creating something new from scratch. |
Re: Feeling Aggregated
2009-01-20 16:57
•
by
Anonymous
(unregistered)
|
|
"I'm just curious, how can max(x) + 1 make a duplicate key?"
If you remove some entries. Say you have 50 entries max(x) + 1 will be 51. Say you remove entries 12 and 13, max(x) + 1 is now 49, but 49 still exists unless you renumber the whole table. |
Re: Feeling Aggregated
2009-01-20 17:01
•
by
Charles Manson
(unregistered)
|
Not correct. |
Re: Feeling Aggregated
2009-01-20 17:01
•
by
Spoon
(unregistered)
|
|
max not count.
|
Re: Feeling Aggregated
2009-01-20 17:02
•
by
Tama
(unregistered)
|
That still wouldn't solve your problem. Even with a transaction at the serializable level, there is a possible ordering of reads and writes between two concurrent transactions that would result in duplicate keys. |
Re: Feeling Aggregated
2009-01-20 17:02
•
by
Bill
(unregistered)
|
No... If max(x) = 50, then removing anything other then x=50 will not change max(x) = 50 (it's max, not count). The problem is more (as many have said before me) that if multiple processes access this concurrently, they both take max(x) = 50 (because nothing higher has been committed), and both set x = 51...DUPLICATE |
Re: Feeling Aggregated
2009-01-20 17:03
•
by
Bill
(unregistered)
|
In fact I notice that many others have said while I was writing....OOPS - Apologies.... |
Re: Feeling Aggregated
2009-01-20 17:16
•
by
Anonyblort
(unregistered)
|
You're thinking count(*) + 1 |
|
Or you could just, you know, auto increment and move on
/party pooping // yes, I said poo /// and poop |
Re: Feeling Aggregated
2009-01-20 17:57
•
by
Sum egghead
(unregistered)
|
racist condition. |
Re: Feeling Aggregated
2009-01-20 18:15
•
by
DeepThought
(unregistered)
|
|
> Um, the real WTF is that the kid didn't automatically see that the
> code would be handled like that. In a coding environment that badly > done, you don't try to fix everything first day or say to the boss 'I > can't see how it could be done' simply because it can't be done the > ideal way. You work on the problem, fixing what you can when you can. > At the end, you end up with better code. For now, you end up with a > job and a boss that doesn't think you are incompetent. I agree. An experienced developer would have leveled with the boss and told him that while it can be done, the quickest solution is not the ideal one. He should have also spelled out the deficiencies he found and given the boss some idea of the amount of effort required to set things right or at least requested permission to do a thorough review and analysis of the code in order to come up with a more accurate estimate. TRWTF was simply telling the boss that he couldn't do it. |
Re: Feeling Aggregated
2009-01-20 18:28
•
by
randomo
(unregistered)
|
Occasionally? Occasionally I get to work on a codebase that does not suck. Lesson for the kid to learn: Nearly all the code you get to work on in your life will be fubar. Including your own. Get used to it. |
It is obvious that you don't know anything about OOP. But Mario and Luigi are brothers, so Luigi isn't a subclass of Mario. Wario is an evil Mario, and Waluigi is an evil Luigi (and possibly Wario's brother?) You can make Wario a subclass of Mario with the evil bit set. |
Re: Feeling Aggregated
2009-01-20 18:49
•
by
Prosthetic Lips
(unregistered)
|
The real problem is those **@#$&@#^ random ads. I think I refreshed 20 times before the ad came up. <me needs_a_life="true" /> |
Re: Feeling Aggregated
2009-01-20 18:55
•
by
Commatator
(unregistered)
|
I found one too. |
Re: Feeling Aggregated
2009-01-20 18:57
•
by
Yoshi
(unregistered)
|
But if Wario is a subclass of Mario, and Waluigi is a subclass of Luigi then Wario and Waluigi would almost certainly NOT be brothers.... Furthermore, if Mario is a subclass of player, then Wario cannot be a subclass of Mario (excepting in the games where you can play as Wario).... |
Re: Feeling Aggregated
2009-01-20 19:04
•
by
Jimbo
(unregistered)
|
I see lots of Posters every day. Many of them have Grammatical errors. (It all reminds me of "Bill Posters will be prosecuted"....) |
| « Prev | Page 1 | Page 2 | Next » |