Do you have adblock enabled?
If you can read this, either the style sheet didn't load or you have an older browser that doesn't support style sheets. Try clearing your browser cache and refreshing the page.

(Social Reader)   Robert'); DELETE FROM PeopleInBangladesh WHERE first_name LIKE 'Rehana' AND last_name LIKE 'Begum' AND age = 43 AND num_children = 4 AND resident_of LIKE 'London'; --   (socialreader.com) divider line 80
    More: Scary, foreign offices, East End  
•       •       •

12258 clicks; posted to Main » on 08 Aug 2013 at 7:29 PM (1 year ago)   |  Favorite    |   share:  Share on Twitter share via Email Share on Facebook   more»



80 Comments   (+0 »)
   
View Voting Results: Smartest and Funniest

Archived thread

First | « | 1 | 2 | » | Last | Show all
 
2013-08-08 06:20:47 PM  
Horrible story, but damn that's a funny headline.
 
2013-08-08 06:22:32 PM  
Your LIKE predicate has no wildcards, just saying
 
2013-08-08 06:23:51 PM  
I guess I should also post the classic Bobby Tables
imgs.xkcd.com
 
2013-08-08 06:29:13 PM  

the_sidewinder: Your LIKE predicate has no wildcards, just saying


So in a table of over 150 million people, there were definitely more efficient and quick ways to hack her to death, but maybe a slow, painful death seemed more appropriate.
 
2013-08-08 06:38:54 PM  

the_sidewinder: Your LIKE predicate has no wildcards, just saying


He knows what he LIKEs.

/NOT 'Subby'.
 
2013-08-08 06:44:50 PM  
So, india's bringing the thugee back?


//our thugs are actually pretty tame in comparison, if you look at the numbers..
 
2013-08-08 06:47:42 PM  

PainInTheASP: He knows what he LIKEs.


You owe me a new monitor
 
2013-08-08 07:30:30 PM  
+1
 
2013-08-08 07:32:24 PM  
Pricipal
 
2013-08-08 07:33:34 PM  
Very well done subby
 
2013-08-08 07:34:03 PM  

the_sidewinder: Your LIKE predicate has no wildcards, just saying


Sad that I came here to say this.  Gah, so sad.  Even in my spare time, I'm troubleshooting other people's SQL.
 
IP
2013-08-08 07:39:49 PM  

the_sidewinder: Your LIKE predicate has no wildcards, just saying

 
2013-08-08 07:41:07 PM  
I suck at code jokes, but uh..

<td>
reserving isle seat for subby
</td>

</gotnothing>
 
2013-08-08 07:42:06 PM  
Shouldn't that be 'resident_of LIKE 'London%';

I thought the LIKE operator was pointless without a wildcard character like the % symbol. I suppose I could be wrong though. It would hardly be the first time, what?
 
2013-08-08 07:42:56 PM  

IP: the_sidewinder: Your LIKE predicate has no wildcards, just saying


Son of a donkey! I saw your post just as I hit the Add Comment button on my own.
 
2013-08-08 07:44:25 PM  
That headline is some crappy SQL

PeopleInBangladesh ... who the hell uses camel case in table names? Oracle DB doesn't care. Why waste time pressing shift?

DELETE, FROM, WHERE, AND, LIKE ... none of these are case sensitive, so why waste time making them upper case

first_name LIKE 'Rehana' ... why are you doing likes, and then not using any wildcards!!!!

-- also, your query was all on one line :P
 
2013-08-08 07:45:28 PM  
the_sidewinder: Your LIKE predicate has no wildcards, just saying

Damnit, I forgot to refresh before doing a commit.
 
2013-08-08 07:46:55 PM  

strangeluck: I suck at code jokes, but uh..

<td>
reserving isle seat for subby
</td>

</gotnothing>


Oh great, now we've got a broken table too!  Who do you think you are, Microsoft?

/I keed I keed
 
2013-08-08 07:48:04 PM  
This is a terrible story.  This will also be the geekiest topic on Fark today.

/grabs popcorn
 
2013-08-08 07:49:58 PM  
kg2095: I thought the LIKE operator was pointless without a wildcard character like the % symbol.

It will run just fine, just slightly less efficiently.

(slightly less, meaning, the difference is so minor as to not even be an issue as the underlying engine will just do a seek in the index but a minimal amount of CPU time will be used for the engine to actually make that decision.)

If you really want to read the gory details
http://myitforum.com/cs2/blogs/jnelson/archive/2007/11/16/108354.aspx
 
2013-08-08 07:53:31 PM  
rollback;

/problem solved
 
2013-08-08 07:54:24 PM  
Subby, storing age in a database is a very bad practice.  Change it with DOB and age can easily be derived!
 
2013-08-08 07:55:26 PM  
z0mg h4x!!!
 
2013-08-08 08:00:04 PM  

rosemary's baby daddy: Subby, storing age in a database is a very bad practice.  Change it with DOB and age can easily be derived!


Oh god, don't start a DateTime argument, we'll never get out of here.
 
2013-08-08 08:04:02 PM  

lordargent: kg2095: I thought the LIKE operator was pointless without a wildcard character like the % symbol.

It will run just fine, just slightly less efficiently.

(slightly less, meaning, the difference is so minor as to not even be an issue as the underlying engine will just do a seek in the index but a minimal amount of CPU time will be used for the engine to actually make that decision.)

If you really want to read the gory details
http://myitforum.com/cs2/blogs/jnelson/archive/2007/11/16/108354.aspx


I thought a LIKE without a wildcard is just an equality.
 
2013-08-08 08:08:14 PM  
She was hacked to death. Damn.

Wait a minute..

SELECT *
FROM PeopleInBangladesh pib INNER JOIN severed_limbs SL
ON pib.Legs=SL.Legs
AND pib.Arms = SL.Arms


Phew!
 
2013-08-08 08:09:10 PM  

lordargent: That headline is some crappy SQL

PeopleInBangladesh ... who the hell uses camel case in table names? Oracle DB doesn't care. Why waste time pressing shift?

DELETE, FROM, WHERE, AND, LIKE ... none of these are case sensitive, so why waste time making them upper case

first_name LIKE 'Rehana' ... why are you doing likes, and then not using any wildcards!!!!

-- also, your query was all on one line :P


Um, unless you're trolling, putting the commands and clauses in upper case drastically improves readability. Besides, any dba would be thrown on the street for writing something that intensive.

UPDATE People
SET active_status = 0
WHERE first_name = 'Rehana'
AND last_name = 'Begum'
AND age = 43 
AND num_children = 4
AND current_city = 'Bangladesh'
AND resident_of = 'London';

Yes, yes I know the xkcd thing.
 
2013-08-08 08:10:44 PM  
Did you guys remember to take your retainers out before you eat din din?
 
2013-08-08 08:14:10 PM  

StinkyFiddlewinks: lordargent: That headline is some crappy SQL

PeopleInBangladesh ... who the hell uses camel case in table names? Oracle DB doesn't care. Why waste time pressing shift?

DELETE, FROM, WHERE, AND, LIKE ... none of these are case sensitive, so why waste time making them upper case

first_name LIKE 'Rehana' ... why are you doing likes, and then not using any wildcards!!!!

-- also, your query was all on one line :P

Um, unless you're trolling, putting the commands and clauses in upper case drastically improves readability. Besides, any dba would be thrown on the street for writing something that intensive.

UPDATE People
SET active_status = 0
WHERE first_name = 'Rehana'
AND last_name = 'Begum'
AND age = 43 
AND num_children = 4
AND current_city = 'Bangladesh'
AND resident_of = 'London';

Yes, yes I know the xkcd thing.


Whatever happened to primary keys?
DELETE FROM planet_earth WHERE id = 5644322346;
 
2013-08-08 08:14:54 PM  
Arkanaut: I thought a LIKE without a wildcard is just an equality.

Nope, it's slower, but the difference is so low that it's not anywhere near noticeable to a human.
 
2013-08-08 08:16:08 PM  
I'm so confused
 
2013-08-08 08:20:04 PM  

the_sidewinder: Your LIKE predicate has no wildcards, just saying


kg2095: Shouldn't that be 'resident_of LIKE 'London%';


lordargent: first_name LIKE 'Rehana' ... why are you doing likes, and then not using any wildcards!!!!


10 DIV 10  subby.  Code trolling is BEST trolling.
 
2013-08-08 08:20:41 PM  

sirrerun: StinkyFiddlewinks: lordargent: That headline is some crappy SQL

PeopleInBangladesh ... who the hell uses camel case in table names? Oracle DB doesn't care. Why waste time pressing shift?

DELETE, FROM, WHERE, AND, LIKE ... none of these are case sensitive, so why waste time making them upper case

first_name LIKE 'Rehana' ... why are you doing likes, and then not using any wildcards!!!!

-- also, your query was all on one line :P

Um, unless you're trolling, putting the commands and clauses in upper case drastically improves readability. Besides, any dba would be thrown on the street for writing something that intensive.

UPDATE People
SET active_status = 0
WHERE first_name = 'Rehana'
AND last_name = 'Begum'
AND age = 43 
AND num_children = 4
AND current_city = 'Bangladesh'
AND resident_of = 'London';

Yes, yes I know the xkcd thing.

Whatever happened to primary keys?
DELETE FROM planet_earth WHERE id = 5644322346;


Presumably the hackers knew her name but not her primary key ID, which wouldn't be surprising.

Similar comments to those complaining about the poor syntax, they presumably needed to use that syntax to get around validation calls.
 
2013-08-08 08:21:00 PM  
StinkyFiddlewinks: Um, unless you're trolling, putting the commands and clauses in upper case drastically improves readability.

Simply not an issue around these parts.

lordargent.com
 
2013-08-08 08:25:35 PM  
Funny not found.
 
2013-08-08 08:27:28 PM  
STYLE GUIDE, PRACTICES AND PATTERNS FIGHT!

None of you two-part or three-part qualified people.  What are you, DB2 derelicts?
 
151
2013-08-08 08:34:21 PM  
Best thread ever

// also came to comment on the misguided use of LIKEs
 
2013-08-08 08:36:59 PM  
I love how the outrage is the SQL syntax and not the actual subject matter.  I hope at least the chopping technique of the person who hacked Rehana to death gets at least an equal amount of scrutiny.
 
2013-08-08 08:38:11 PM  
Sugarbombs: STYLE GUIDE, PRACTICES AND PATTERNS FIGHT!

I moved into programming ... from tech publishing :D

Therefore

"All-capital print greatly retards speed of reading in comparison with lower-case type. Also, most readers judge all capitals to be less legible. Faster reading of the lower-case print is due to the characteristic word forms furnished by this type. This permits reading by word units, while all capitals tend to be read letter by letter. Furthermore, since all-capital printing takes at least one-third more space than lower case, more fixation pauses are required for reading the same amount of material. The use of all capitals should be dispensed with in every printing situation."
 
2013-08-08 08:39:49 PM  
UPDATE PEOPLE
SET ACTIVE_STATUS = 0
WHERE FIRST_NAME = 'Rehana'
AND LAST_NAME = 'Begum'
AND AGE = 43
AND NUM_CHILDREN = 4
AND CURRENT_CITY = 'Bangladesh'
AND RESIDENT_OF = 'London';

-- gah!
 
2013-08-08 08:40:08 PM  
@lordargent
Funny, my notepad doesn't show funny colors or line numbers.
 
2013-08-08 08:43:33 PM  

lordargent: Sugarbombs: STYLE GUIDE, PRACTICES AND PATTERNS FIGHT!

I moved into programming ... from tech publishing :D

Therefore

"All-capital print greatly retards speed of reading in comparison with lower-case type. Also, most readers judge all capitals to be less legible. Faster reading of the lower-case print is due to the characteristic word forms furnished by this type. This permits reading by word units, while all capitals tend to be read letter by letter. Furthermore, since all-capital printing takes at least one-third more space than lower case, more fixation pauses are required for reading the same amount of material. The use of all capitals should be dispensed with in every printing situation."


This is true for print purposes, but if SQL commands are on one line it makes it much quicker to find out why you're getting all the rows instead of one (for example) if the keywords are capitalized. In my experience anyway.

Besides, I switched to a non-destructive system, so you can still look up her data.

Yes, it's a terrible thing that happened, nothing but savages in that town.
 
2013-08-08 08:43:52 PM  

ciberido: the_sidewinder: Your LIKE predicate has no wildcards, just saying

kg2095: Shouldn't that be 'resident_of LIKE 'London%';

lordargent: first_name LIKE 'Rehana' ... why are you doing likes, and then not using any wildcards!!!!

10 DIV 10  subby.  Code trolling is BEST trolling.


Yah, yah. Brings out all zee code Nazis, what?
 
2013-08-08 08:44:31 PM  
I have no idea what's going on in this thread.

/Not a virgin and not into Star Trek
 
2013-08-08 08:47:09 PM  
reincarnation_mutation : Funny, my notepad doesn't show funny colors or line numbers.

We don't freeball SQL statements around here.

// Use toad, sql explorer, sql developer, something. Color highlighting catches a lot of ID10T errors (the same errors that having capital statements will NOT help you catch).
// when screw something up and your query lights up like a christmas tree using colors you didn't expect, it's time to start looking for that missing quote or close paren.

StinkyFiddlewinks: but if SQL commands are on one line, you fail code review

Fixed that for you.
 
2013-08-08 08:51:18 PM  

lordargent: Sugarbombs: STYLE GUIDE, PRACTICES AND PATTERNS FIGHT!

I moved into programming ... from tech publishing :D

Therefore

"All-capital print greatly retards speed of reading in comparison with lower-case type. Also, most readers judge all capitals to be less legible. Faster reading of the lower-case print is due to the characteristic word forms furnished by this type. This permits reading by word units, while all capitals tend to be read letter by letter. Furthermore, since all-capital printing takes at least one-third more space than lower case, more fixation pauses are required for reading the same amount of material. The use of all capitals should be dispensed with in every printing situation."


True.. never been an advocate since I do all the tiers.  It's especially painful when trying to fix a multi-thousand line ETL script THAT WAS WRITTEN BY SOMEONE WHO NOW DOESN'T LIKE KIDS ON HIS LAWN.  I call it Fox News Notation.

I also hate Hungarian Notation and the usage of underscores.  Pascal Notation translates nicely from db to xml to orm.
Also, I prefer that boolean values like Active be expressed as binary interrogatives (IsActive)
 
2013-08-08 08:52:36 PM  
man, and here I thought this thread would be nothing but reposting of Bobby tables...
/I too, noticed the sql fails...
 
2013-08-08 08:53:28 PM  

utsagrad123: I love how the outrage is the SQL syntax and not the actual subject matter.  I hope at least the chopping technique of the person who hacked Rehana to death gets at least an equal amount of scrutiny.


I was thinking the same thing - "OMG this poor lady was brutally murdered... wait, what are these FARK nerds talking about?"

At least she wasn't attacked with 3D-printed weapons; that would draw out you-know-who.
 
2013-08-08 08:54:01 PM  

LazarusLong42: Presumably the hackers knew her name but not her primary key ID, which wouldn't be surprising.


Yeah.
RTFA, you did not.

Presumably.
 
2013-08-08 08:55:40 PM  
Sugarbombs: I also hate Hungarian Notation and the usage of underscores.

I'm OK with underscores. Easy enough for me to type, and my editor of choice is configured to treat them as word characters (so I can doubleclick and select the entire underscored string).

I mostly learned how to program in perl (followed by java) and I prefer perl's sigils because it makes it ridiculously easy to identify variables/objects/etc, compared to lots of other languages. So the problems that hungarian notation tries to solve are simply not a problem to begin with.

// being able to jump into some random block of perl code and instantly recognizing what's a variable and what type (not type as in OO typing) it is == awesome.
 
Displayed 50 of 80 comments

First | « | 1 | 2 | » | Last | Show all

View Voting Results: Smartest and Funniest


This thread is archived, and closed to new comments.

Continue Farking
Submit a Link »
Advertisement
On Twitter






In Other Media


  1. Links are submitted by members of the Fark community.

  2. When community members submit a link, they also write a custom headline for the story.

  3. Other Farkers comment on the links. This is the number of comments. Click here to read them.

  4. Click here to submit a link.

Report