- 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
where o where has my little 'where' gone...? oh and all my effiency
how do these people pass themselves off as programmers. honestly.
Admin
Perhaps they were totally afraid of SQL injections?
Admin
The best bit is not the lack of WHERE - that's just an optimisation after all. The best bit is the way after he finds the matching entry he keeps on going... and immediately de-authenticates on the first following non-matching entry.
Adding a WHERE clause so there's only ever one record returned would conceal, rather than fix, this bug. The dangers of premature optimisation!
Admin
Slow, and unless they were the last user in the database, they'd never get authenticated either....
Admin
People should be able to contract STDs from writing bad code.
Admin
How? When is the last time you actually used a serial port for anything? And what other communications system stars with an S?
At least the captcha is on target: sanitarium
Admin
Add a break statement and you've got yourself some enterprisey code right there.
Admin
I blame the unit test, procedures should always be tested with multiple variables.
Admin
I'll pay bums to go around sticking programmers with dirty needles. There may be some collateral damage, but that just makes it funnier.
Admin
No default value is set. If the user table ever gets truncated,
Admin
AHHH yes, this is what I noticed too and it was quite delightful.
Captcha: Doom, such as what this program should bring.
Admin
Even better is that it's going to hold a read lock onto every row, so there is addition concurrency issues w/o: source.Close()
Admin
So are you suggesting that they might have multiple rows with identical user names but different passwords?
Admin
A real unit-test should not go to the database anyway. It should use a mocked datasource.
Admin
Am I the only one who feels that
would be cleaner?Admin
Am I the only one who wonders how many fields the table "users" has? Why do people still generally query all the data, even columns they don't ever need?
Admin
Does it really matter how "clean" it is if it only works when there's a single user of the system?
Admin
Happened to me today. Tested on windows server worked fine but inmmediatly segfaulted on Linux. Seems Linux's strdup() don't check if you pass it a NULL pointer.
PD: yes, it was more or less finished the night before and i'm also expecting the TA doesn't notice some code doesn't work)
Admin
If he makes a proper ORDER statement, he will probably get it working no matter how many users in the table?