• SQZ (unregistered)

    ||FRIST

  • eViLegion (cs)

    So, the professors phone was included within the IP range of the uni? I mean, I guess it was using wifi, but he could have just used 3G or something.

    Why did he pick 5 minutes? In case some new restaurants have been build, staffed, and opened within the last hour?

  • MightyM (unregistered)
    Comment held for moderation.
  • Chris (unregistered)

    That guy is the kind of person who should never be allowed near a computer. Smart enough to code something simple, but not smart enough to check if it's a good way or if it has any unintended consequences...

  • ANON (unregistered)

    They developed an Android application and he's talking about "years after his graduation"? Not bad for an OS which exists less than 5 years.

  • Dogsworth (cs)

    Provided this story is true, the university should his ass under the bus. It's solely his fault, after all.

  • Mike5 (unregistered)

    So, a single IP accessing a server every 5 minutes is a "distributed" DoS?

  • eViLegion (cs) in reply to Dogsworth
    Dogsworth:
    Provided this story is true, the university should his ass under the bus. It's solely his fault, after all.

    I'd go so far as to say they should accidentally his whole ass under the bus, but that is just my opinion.

  • toon (cs)

    IMO the bigger WTF is this line:

    if($value == 1||2||3||4||5||6||7||8||9||10||11||12||13||14||15||16||17||18||19||20||21||22||23||24||25||26||27||28||29||30)
  • faoileag (unregistered) in reply to toon
    toon:
    IMO the bigger WTF is this line:
    if($value == 1||2||3||4||5||6||7||8||9||10||11||12||13||14||15||16||17||18||19||20||21||22||23||24||25||26||27||28||29||30)
    So true. It could be abbreviated to:
    if (True) {
    if I understand the php boolean evaluation model correctly (and operator precedence).
  • Reo de Thaadt (unregistered)

    Proxies, learn to use them.

  • wintermute (unregistered) in reply to faoileag

    [quote]IMO the bigger WTF is this line:

    if($value == 1||2||3||4||5||6||7||8||9||10||11||12||13||14||15||16||17||18||19||20||21||22||23||24||25||26||27||28||29||30)[/quote]

    So true. It could be abbreviated to:

    if (True) {

    if I understand the php boolean evaluation model correctly (and operator precedence).[/quote]

    No, it evaluates to

    if ($value == (true || true || true || true || ...)) {

    which is to say

    if ($value == true) {

  • Cliff (unregistered) in reply to SQZ

    It's a common problem when pulling data - I knew of one system where the data was published every minute as stated in the documentation - most consumers of the data 'got' it, but one muppet system polled 200 times a second, caused a lot of problems.

  • Ed (unregistered)

    So Brian is put in a group of students who leave their entire assignment in the hands of one guy? WTF were the rest of them doing for the three weeks That poor Guy was writing code for them? Yay teamwork!?

  • Raedwald (cs) in reply to Ed
    Ed:
    So Brian is put in a group of students who leave their entire assignment in the hands of one guy? WTF were the rest of them doing for the three weeks That poor Guy was writing code for them? Yay teamwork!?

    Brian might not have been That Guy. But he was That Guy.

  • justsomedudette (unregistered) in reply to Raedwald
    Raedwald:
    Ed:
    So Brian is put in a group of students who leave their entire assignment in the hands of one guy? WTF were the rest of them doing for the three weeks That poor Guy was writing code for them? Yay teamwork!?

    Brian might not have been That Guy. But he was That Guy.

    Yes the real WTF is not understanding the concept of group work, because obviously you'll NEVER come a cross a group coding situation in a work place.

    Capthca: refoveo, refoveo, re-fo-ve-oooooo!

  • Chronomium (unregistered) in reply to Ed
    Ed:
    So Brian is put in a group of students who leave their entire assignment in the hands of one guy? WTF were the rest of them doing for the three weeks That poor Guy was writing code for them? Yay teamwork!?
    Name one time in your groupwork assignments (for which you couldn't choose your own group) where there wasn't at least one guy who demanded to do all the work (because he trusts no one) or one guy who refuses to do any work (because he's lazy). Or both.
  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to Mike5
    Mike5:
    So, a single IP accessing a server every 5 minutes is a "distributed" DoS?
    "I had it on a cron script! It scraped all listings every five minutes!"

    I took that to mean it did a full scrape of dozens or hundreds of pages every five minutes, with little if any pause between each page. You don't use cron to tell your web spider to the next page. Sure, you could have it do one page and save state, but That Guy isn't going to know how to do that.

    Also, he was "debugging" it "last night". Which means it probably ran a full scrape every time he ran it to change a debugging printf. All the while, the cron job was probably still running.

  • Tof (unregistered) in reply to wintermute

    Not, it evaluates to

    (($value == true) || (6)).

    || has a higher priority than "==", like in most languages.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)
    Comment held for moderation.
  • Anonymous (unregistered)

    I thought thedailywtf didn't post student code.

  • Kuba (cs)

    I was worried it was about myself, since I used to scrape a drive component distributor's webpage for their catalog. The class project was done barely on time and the design it produced was bad since we had bugs :/. Oh, it was a group project with everyone participating, BTW.

    I never got anyone blacklisted, though, not even temporarily. And hey, it mostly worked - the input was fed to a discrete optimizer that would "spit out" a gearbox design using real, stocked components. You could optimize for various things, including price, component stock level, performance metrics, etc. While it was done for a mechanical design class, I later reworked it to make it more theoretically sound for an optimization class. It was a nifty project, even if the implementation was initially a big kludge.

  • ceiswyn (unregistered)

    A company I once worked with got themselves barred from BabelFish for similar reasons. The VP of development and one of the senior developers had decided to use it to translate all the documentation into French (for a demo to a Canadian company).

    The first I (the technical writer) heard of this was when they came to me to ask for advice on how to translate the bits they hadn't managed to get done. I think they got about halfway through the second sentence of the request before they realised that maybe they would have been better off building a nuclear bunker.

  • ZoomST (unregistered)

    Nice piece of bad (student) code, several plot holes... pretty low standard for TDWTF, but I'll not be surprised to see it as the latest blockbuster in Hollywood. I'm convinced they will find the best way to include action scenes with explosions and someone like Jason Statham. Even if it has no sense, of course. And don't forget to make people type frantically on the keyboard!

    Captcha: odio. That means hate in Spanish -- Yep, I hate when standards fall that low.

  • Bring Back TopCod3r (unregistered) in reply to Anonymous
    Anonymous:
    I thought thedailywtf didn't post student code.

    Unless it involves a wooden table of course.

  • Bring Back TopCod3r (unregistered) in reply to Dogsworth
    Dogsworth:
    Provided this story is true, the university should his ass under the bus. It's solely his fault, after all.

    Really, for a student making mistakes. University is where you learn after all, and making mistakes is one of the better ways to learn.

    Also I'm surprised that polling every 5 mins did it - I was expecting it to poll in continuously!

  • faoileag (unregistered) in reply to wintermute
    wintermute:
    No, it evaluates to

    if ($value == (true || true || true || true || ...)) {

    which is to say

    if ($value == true) {

    Ah, I see.

    Still a rather complicated way to express:

    if ($value == true) {
    ;-)

  • faoileag (unregistered) in reply to eViLegion
    eViLegion:
    Why did he pick 5 minutes? In case some new restaurants have been build, staffed, and opened within the last 5 minutes?
    There, FTFY
  • operagost (cs) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    Mike5:
    So, a single IP accessing a server every 5 minutes is a "distributed" DoS?
    "I had it on a cron script! It scraped all listings every five minutes!"

    I took that to mean it did a full scrape of dozens or hundreds of pages every five minutes, with little if any pause between each page. You don't use cron to tell your web spider to the next page. Sure, you could have it do one page and save state, but That Guy isn't going to know how to do that.

    Also, he was "debugging" it "last night". Which means it probably ran a full scrape every time he ran it to change a debugging printf. All the while, the cron job was probably still running.

    Still not a DDOS, because it's not distributed among several IP addresses.

  • It's Pat (unregistered) in reply to Chronomium
    Chronomium:
    Name one time in your groupwork assignments (for which you couldn't choose your own group) where there wasn't at least one guy who demanded to do all the work (because he trusts no one) or one guy who refuses to do any work (because he's lazy). Or both.

    I had a group that had That Girl, who thought I was That Guy. Sadly, she was better at whining and politics (but I repeat myself), and so I turned into That Guy in the view of those that mattered.

  • anonymous (unregistered) in reply to eViLegion
    eViLegion:
    Why did he pick 5 minutes? In case some new restaurants have been build, staffed, and opened within the last hour?

    Because That Guy was an absolute idiot, who even dared to use regexes to parse HTML. How hard can it be to reach this conclusion?

  • D8 (unregistered)

    I'm not really sure I'd want That Guy or Brian for that matter in any of my groups.

  • anonymous (unregistered)

    TRWTF is TheDailyWTF's captcha dictionary. How long is it? 50 words?

    My OS installation is no more than 3 months old and the browser already had auto-complete for my last captcha.

    Current captcha: secundum... not just the second time I see this one posted, I'm afraid.

  • trwtf (unregistered)

    Right or wrong, this is simply how restaurants have always been chosen in large universities.

  • dookdook (cs) in reply to Chronomium
    Chronomium:
    Name one time in your groupwork assignments (for which you couldn't choose your own group) where there wasn't at least one guy who demanded to do all the work (because he trusts no one) or one guy who refuses to do any work (because he's lazy). Or both.

    If there isn't already one person or subgroup of people who wanted to do the entire project, I tend to become That Guy, simply because taking on the entire task singlehandedly almost always seems less difficult and tedious than the interpersonal strain of dividing responsibility and collaborating and combining work and etc. etc.

    The exception of course being if the project is very modular and significant parts of it can be cleaved off and worked on independently of the rest.

    Yay aspergers!

  • anon (unregistered)

    Now I'm having flashbacks to my major groupwork assignment.

    Design time.. right. well here are the main components. These are the operations they will need to perform, here are the interfaces you'll need to implement so it hangs together. Shout if you have any problems.

    Out of a group of 12, 2 people (including myself) actually implemented the interface. 9 people managed to broadly get the functionality right but with the wrong method names etc. The last person proclaimed he had his stuff all working and handed it over. It didn't compile 'oh, you wanted me to compile it too?'

    A quick glance over it revealed he hadn't implemented the functionality either. He was also shocked to discover that in the days of the week, the word 'day' is not considered a separate word (his code would be for example fri_day).

    Marked out as a bit special, he was taken off coding and sent to produce a manual. A manual which upon inspection sported a great many screenshots taken with his charming lurid green/pink desktop theme. Binned.

    TRWTF? all of them graduated.

  • Sutherlands (cs)

    We had to block some IPs at work recently for basically this reason. Due to the shooting and the lack of supply of bullets, a couple people created crawlers to check our site for supply.

  • anonymous (unregistered) in reply to anon
    anon:
    Now I'm having flashbacks to my major groupwork assignment.

    Design time.. right. well here are the main components. These are the operations they will need to perform, here are the interfaces you'll need to implement so it hangs together. Shout if you have any problems.

    Out of a group of 12, 2 people (including myself) actually implemented the interface. 9 people managed to broadly get the functionality right but with the wrong method names etc. The last person proclaimed he had his stuff all working and handed it over. It didn't compile 'oh, you wanted me to compile it too?'

    A quick glance over it revealed he hadn't implemented the functionality either. He was also shocked to discover that in the days of the week, the word 'day' is not considered a separate word (his code would be for example fri_day).

    Marked out as a bit special, he was taken off coding and sent to produce a manual. A manual which upon inspection sported a great many screenshots taken with his charming lurid green/pink desktop theme. Binned.

    TRWTF? all of them graduated.

    A normal group assignment tale... at WTFU and every other University on Earth, I suppose.

  • C-Derb (unregistered) in reply to toon
    toon:
    IMO the bigger WTF is this line:
    if($value == 1||2||3||4||5||6||7||8||9||10||11||12||13||14||15||16||17||18||19||20||21||22||23||24||25||26||27||28||29||30)
    I agree 110%. Clearly he should have written this:
    if(1||2||3||4||5||6||7||8||9||10||11||12||13||14||15||16||17||18||19||20||21||22||23||24||25||26||27||28||29||30 == $value)
  • Clever and Lazy (unregistered) in reply to Chris
    Chris:
    That guy is the kind of person who should _never_ be allowed near a computer. Smart enough to code something simple, but not smart enough to check if it's a good way or if it has any unintended consequences...

    This guy is proof of Kurt von Hammerstein's laws:

    There are clever, diligent, stupid, and lazy officers. Usually two characteristics are combined. Some are clever and diligent - their place is the General Staff. The next lot are stupid and lazy - they make up 90 percent of every army and are suited to routine duties. Anyone who is both clever and lazy is qualified for the highest leadership duties, because he possesses the intellectual clarity and the composure necessary for difficult decisions. One must beware of anyone who is stupid and diligent - he must not be entrusted with any responsibility because he will always cause only mischief.

    Madre de Dios...

  • Peter (unregistered) in reply to faoileag
    faoileag:
    eViLegion:
    Why did he pick 5 minutes? In case some new restaurants have been opened within the last 5 minutes?
    There, FTFY
    There, really fixed it. It doesn't matter when the restaurants were built and staffed, only when they opened.

    Actually, on reflection, even that doesn't really matter. What's important is when they first appeared in the scraped website. I'll concede, however, that eViLegion's un-fixed version was funnier. (Sorry)

  • sunnyboy (unregistered)

    a. I call BS on the whole story. Burning down the chemistry lab twice? Come on. Physics experiment dropped on dean's foot? This isn't animal house, even though the writer seems to thing plagiarizing it works.

    b. Summertime blues. You folks aren't even trying anymore.

    c. I agree with yesterday's comment. THIS SITE HAS BECOME THE REAL W.T.F.

  • foo (unregistered) in reply to sunnyboy
    sunnyboy:
    a. I call BS on the whole story. Burning down the chemistry lab twice? Come on. Physics experiment dropped on dean's foot? This isn't animal house, even though the writer seems to thing plagiarizing it works.
    That's a wrong generalization. Even if some important parts of the story are completely made-up fictional BS, it does not follow that the whole story is completely made-up fictional BS. Or to express it in WTPHP, you claim:
    if (bdcl2 && pedodf && ... == cm_ufBS)
    
    But in fact it's only:
    if (bdcl2 || pedodf || ... == cm_ufBS)
    
    See, classical Boolean operator mixup. Welcome, you're right here.
  • caffiend (cs)

    I'll just myself under the doggammed buss and say TRWTF is PHPs stupid keywords (or built in functions, or conventions, or community humor, or whatever it is). needle, haystack, explode, mysql_actually_real_escape_string_this_time_I_promise_works_v2.

    Though anyone who knows how to "Use The Google" can read it, why should you have to. And I still find it bizarre that any language author would actually write functions to support escaping strings and concatenating them with SQL, rather than just saying "doing this is stupid, use parametrized queries."

  • eViLegion (cs) in reply to faoileag
    faoileag:
    eViLegion:
    Why did he pick 5 minutes? In case some new restaurants have been build, staffed, and opened within the last 5 minutes?
    There, FTFY

    Don't be silly, it's going to take at least an hour for the reviews to get published.

  • eViLegion (cs) in reply to dookdook
    dookdook:
    If there isn't already one person or subgroup of people who wanted to do the entire project, I tend to become That Guy, simply because taking on the entire task singlehandedly almost always seems less difficult and tedious than the interpersonal strain of dividing responsibility and collaborating and combining work and etc. etc.

    That's not aspergic dude; that's normal. Who wants to work with a useless group of tards? (social workers, I suppose)

    It always seemed to me to be particularly cruel when universities make you work with someone totally substandard. Why do they insist on making a technical task harder by adding the requirement that you have to explain it to fools, or worse correct the fools mistakes, before actually solving the problem.

    Bleh.

  • ZoomST (unregistered) in reply to operagost
    operagost:
    Still not a DDOS, because it's not distributed among several IP addresses.
    Maybe the university is using network load balancing over several WAN connections, appearing as a handful of different IPs for the CityEats server... just guessing.
  • Chronomium (unregistered) in reply to eViLegion
    eViLegion:
    It always seemed to me to be particularly cruel when universities make you work with someone totally substandard. Why do they insist on making a technical task harder by adding the requirement that you have to explain it to fools, or worse correct the fools mistakes, before actually solving the problem.

    Bleh.

    Well you can't say it's not preparing you for the real world.

  • eViLegion (cs) in reply to Chronomium
    Chronomium:
    eViLegion:
    It always seemed to me to be particularly cruel when universities make you work with someone totally substandard. Why do they insist on making a technical task harder by adding the requirement that you have to explain it to fools, or worse correct the fools mistakes, before actually solving the problem.

    Bleh.

    Well you can't say it's not preparing you for the real world.

    Well, I'll give you that one, sunshine.

    But its not like professors have ever actually had to do anything in the real world either, so its a bit bloody presumptuous of them!

  • J (unregistered)

    Obviously, TRWTF is trusting "That Guy" enough that you don't even start working on the assignment yourself until the night before it's due.

Leave a comment on “1 or 2 or 3 or 4”

Log In or post as a guest

Replying to comment #:

« Return to Article