• (cs) in reply to Gunslinger
    Gunslinger:
    The Real WTF is insulting Olive Garden.
    Have you actually eaten at Olive Garden??
  • Vendakka Puli, Esq. (unregistered)
    CEASE AND DESIST DEMAND
    Pursuant to Title 17 of the United States Code
    
    Dear TDWTF:
    This law firm represents Rajendra Kumar. If you are represented by legal counsel, please direct this letter to your attorney immediately and have your attorney notify us of such representation.
    
    We are writing to notify you that your unlawful copying of Kumar Associates MasterDate™ Widget infringes upon our client’s exclusive copyrights.  Accordingly, you are hereby directed to:
    
    CEASE AND DESIST ALL COPYRIGHT INFRINGEMENT.
    Rajendra Kumar is the owner a copyright in various aspects of Kumar Associates MasterDate™ Widget.  Under United States copyright law, Rajendra Kumar’s copyrights have been in effect since the date that Kumar Associates MasterDate™ Widget was created.  All copyrightable aspects of Kumar Associates MasterDate™ Widget are copyrighted under United States copyright law.
    
    It has come to our attention that you have been copying Kumar Associates MasterDate™ Widget.  We have copies of your unlawful copies to preserve as evidence. Your actions constitute copyright infringement in violation of United States copyright laws.  Under 17 U.S.C. 504, the consequences of copyright infringement include statutory damages of between 750 and 30,000 rupis per work, at the discretion of the court, and damages of up to 150,000 rupis per work for willful infringement.  If you continue to engage in copyright infringement after receiving this letter, your actions will be evidence of “willful infringement.”
    
    We demand that you immediately (A) cease and desist your unlawful copying of Kumar Associates MasterDate™ Widget and (B) provide us with prompt written assurance within ten (10) days that you will cease and desist from further infringement of Rajendra Kumar’s copyrighted works.
    If you do not comply with this cease and desist demand within this time period, Rajendra Kumar is entitled to use your failure to comply as evidence of “willful infringement” and seek monetary damages and equitable relief for your copyright infringement. In the event you fail to meet this demand, please be advised that Rajendra Kumar has asked us to communicate to you that it will contemplate pursuing all available legal remedies, including demanding satisfaction, seeking monetary damages, injunctive relief, and an order that you pay court costs and attorney’s fees.  Your liability and exposure under such legal action could be considerable.
    
    Before taking these steps, however, my client wished to give you one opportunity to discontinue your illegal conduct by complying with this demand within ten (10) days.  Accordingly, please sign and return the attached Agreement within ten (10) days to
    
    Singh, Puli, Patel, Patel, Patel, & Patel 
    Attorneys at Law
    Road No. 1
    Banjara Hills Hyderabad 
    Andra Pradesh, India
    
    If you or your attorney have any questions, please contact me directly.
    Sincerely,
    Vendakka Puli, Esq.
    
    
  • Axeman (unregistered) in reply to Mutt

    My thoughts exactly.

  • Axeman (unregistered)

    If it works, use it for now then replace it later, have a code review and quit whining. Duh.

  • (cs) in reply to Anon
    Anon:
    'A programming language is only ever as bad as your lack of understanding of it.'

    The reason why Javascript is percieved as a 'bad' language is because there are so many incompetent people in the field. Anyone who can copy&paste can create a website and put it online. But that does not mean it's impossible to write good code. Just look at all the google webapps.

    The reason javascript is percieved as a bad language is because it doesn't behave the same way a lot of other languages behave when givin equivelent code. Its the unpredictibility that causes the creation of new curse words, loss of hair, and simple anger, that makes people hate the language.

  • TheSHEEEP (unregistered) in reply to iMalc
    iMalc:
    Why complain? This code is a dream come true if you ever wished that Feburary had 31 days!

    Yeah, I also didn't notice any check if the date entered makes any sense.

    But maybe I was blinded by all the other horrible things in there.

  • stew (unregistered) in reply to Sayer
    Sayer:
    The part that rubbed him the wrong way (and me) is the part where it's implied that web programmers are all knuckle dragging halfwits when compared to "true" programmers.

    The thing that strikes me odd about the great Wrong that's apparently been done to web developers here is, where are you guys whenever a PHP or VB example is posted and everyone piles on? Presumably, in the pecking order of programmers, those guys must obviously lie somewhere below web developers.

    Of course, "Patrick Bell" doesn't help out his "I'm a real programmer too!" creds by fundamentally mischaracterizing and misunderstanding the C language and its central role in the world of software development. But since he's likely a troll, I'm just assuming that was intentional.

    The indignation also ignores the fact that the OP describes himself as a web developer, and that while his opening sentence may smack of elitism, everything he says by-and-large is true.

  • Anon (unregistered) in reply to PiisAWheeL
    PiisAWheeL:
    Anon:
    'A programming language is only ever as bad as your lack of understanding of it.'

    The reason why Javascript is percieved as a 'bad' language is because there are so many incompetent people in the field. Anyone who can copy&paste can create a website and put it online. But that does not mean it's impossible to write good code. Just look at all the google webapps.

    The reason javascript is percieved as a bad language is because it doesn't behave the same way a lot of other languages behave when givin equivelent code. Its the unpredictibility that causes the creation of new curse words, loss of hair, and simple anger, that makes people hate the language.

    What you describe is my point exactly; lack of understanding of how the language works. Expecting a prototypal language to behave like a class based language is going to cause you a headache.

  • Jerry (unregistered) in reply to Sayer
    Sayer:
    it's implied that web programmers are all knuckle dragging halfwits when compared to "true" programmers.
    They're not all halfwits. Just like the water isn't all in the ocean.
  • Sayer (unregistered) in reply to stew
    stew:
    Sayer:
    The part that rubbed him the wrong way (and me) is the part where it's implied that web programmers are all knuckle dragging halfwits when compared to "true" programmers.

    The thing that strikes me odd about the great Wrong that's apparently been done to web developers here is, where are you guys whenever a PHP or VB example is posted and everyone piles on? Presumably, in the pecking order of programmers, those guys must obviously lie somewhere below web developers.

    Of course, "Patrick Bell" doesn't help out his "I'm a real programmer too!" creds by fundamentally mischaracterizing and misunderstanding the C language and its central role in the world of software development. But since he's likely a troll, I'm just assuming that was intentional.

    The indignation also ignores the fact that the OP describes himself as a web developer, and that while his opening sentence may smack of elitism, everything he says by-and-large is true.

    Fair enough. but as I've only just started posting comments last week, my response to the "where are you guys when..." is "elsewhere"

    The pecking order crack was nice though, so not a complete loss.

  • pantsman (unregistered) in reply to Scrummy
    Scrummy:
    This looks to be a project desperately in need of Agile. If they were pair programming, such an abomination of run-on Javascript would never have happened.

    True, since if they were pair programming, no actual code would get written while they repeatedly high-fived each other into a climax, saying things like, "Dude, awesome node.js t-shirt you're wearing today", and "Dude, totally dig the new Octocat sticker on your MBP"

  • dogmatic (unregistered) in reply to Anon
    Anon:
    'A programming language is only ever as bad as your lack of understanding of it.'

    The reason why Javascript is percieved as a 'bad' language is because there are so many incompetent people in the field. Anyone who can copy&paste can create a website and put it online. But that does not mean it's impossible to write good code. Just look at all the google webapps.

    Let's face it, js is not the best language. Perhaps it's not the worst, but it makes it harder than most languages to develop a large scale, maintainable app in a team environment. That being said, this is an awesome reference for those wishing to expand their mastery of js: http://eleventyone.done.hu/OReilly.JavaScript.The.Good.Parts.May.2008.pdf

    I have worked with js for many years and would love not to have to work with it ever again. Unfortunately it is now more popular than ever, so dig we must.

  • Kasper (unregistered) in reply to dogmatic
    dogmatic:
    Kasper:
    There is not much reason to be using javascript in the first place. That page could have worked just as fine without any javascript. The only thing that javascript could really do for such a page is to present an error message to the user slightly faster, if the input is inconsistent (like specifying the 30th of February or such).

    You are going to need validation on the server side anyway. As a user I'd much rather see a solution that only validates on the server side than one, that does a poor job of validating on the client side.

    You must provide both server side and client side evaluation else run the risk of being branded a lazy developer.

    For a software developer, laziness is a virtue. It is of course possible to be too lazy, but without at least a bit of laziness, you'll never be a good software developer.

    Even for those ashamed of their laziness, I don't think it is a good idea to hide it behind a lot of incompetence. Remember your javascript code is going to be visible to a lot more people than the code you run on the server side.

    Poor client side validation code will make people think you are incompetent and forgot the server side validation. Good client side validation code will make people think you know what you are doing and remember to check most things server side.

  • dogmatic (unregistered) in reply to Kasper
    Kasper:
    dogmatic:
    Kasper:
    There is not much reason to be using javascript in the first place. That page could have worked just as fine without any javascript. The only thing that javascript could really do for such a page is to present an error message to the user slightly faster, if the input is inconsistent (like specifying the 30th of February or such).

    You are going to need validation on the server side anyway. As a user I'd much rather see a solution that only validates on the server side than one, that does a poor job of validating on the client side.

    You must provide both server side and client side evaluation else run the risk of being branded a lazy developer.

    For a software developer, laziness is a virtue. It is of course possible to be too lazy, but without at least a bit of laziness, you'll never be a good software developer.

    Even for those ashamed of their laziness, I don't think it is a good idea to hide it behind a lot of incompetence. Remember your javascript code is going to be visible to a lot more people than the code you run on the server side.

    Poor client side validation code will make people think you are incompetent and forgot the server side validation. Good client side validation code will make people think you know what you are doing and remember to check most things server side.

    Well obviously both your client side validation and server side validation should be 'good'. We validate on the server side to prevent hacking and bad data entering the db. We validate on the client side to make for a nice user experience. That's it. Just to give the user a better experience, meaning not having to see a page refresh. It seems trivial and redundant for a developer (it is), but it looks more professional and is one of the small things we do to please our clients and keep them coming back for more.

    Most developers don't care about UX as much as they should. Given the choice between a development company that makes beautiful, intuitive, poorly coded and possibly insecure web apps, and a development company that makes excellently coded, maintainable, secure, but ugly and difficult to use web apps the client will go with the former every time. So I try to do both. And if you work for someone who requests this redundant validation, perhaps you can step back and understand it's because they like money and want to keep making it.

  • uxor (unregistered) in reply to Kasper
    Kasper:
    There is not much reason to be using javascript in the first place. That page could have worked just as fine without any javascript. The only thing that javascript could really do for such a page is to present an error message to the user slightly faster, if the input is inconsistent (like specifying the 30th of February or such).

    You are going to need validation on the server side anyway. As a user I'd much rather see a solution that only validates on the server side than one, that does a poor job of validating on the client side.

    wow. please don't apply for a job here

  • uxor (unregistered) in reply to Anon
    Anon:
    M:
    Cue the obligatory xkcd reference, which happens to be today's comic!

    http://xkcd.com/1070/

    TRWTF is people who claim to be programmers but don't read xkcd every day.

    You mean the people who claim to be programmers but do read that junk every day?

  • Kasper (unregistered) in reply to dogmatic
    dogmatic:
    We validate on the server side to prevent hacking and bad data entering the db. We validate on the client side to make for a nice user experience. That's it. Just to give the user a better experience, meaning not having to see a page refresh.
    A solution like you describe is better than what you'd have if you used no javascript at all. As long as the javascript is done properly.

    Done properly means the server side code is written as if the javascript wasn't there in the first place. And when a user gets to the form, types in valid input, and submits, neither the user nor the server sees any difference between a browser with javascript enabled and one with javascript disabled.

    There is a high requirement for the quality of that javascript code, because not only is it in plain sight to the power users, and you will be judged on that. But also because before you even start writing the javascript code, you have a functional system. It takes just one stupid mistake in the javascript code where you cannot handle some corner case before you get into a situation where the system overall would have been more functional if you had not written any javascript code in the first place.

    I'm not trying to discourage such use of javascript. But only use it if you know exactly what you are doing. If you are going to cut corners, and most IT products do, then that javascript is an obvious corner to cut.

    dogmatic:
    It seems trivial and redundant for a developer (it is), but it looks more professional and is one of the small things we do to please our clients and keep them coming back for more.
    It is neither trivial nor redundant. Writing the same validation twice in two different languages does seem a bit redundant, so a system that can automatically generate both instances of the validation from a common source is a nice feature to have. It can also guarantee that the criteria is in fact identical.
  • pantsman (unregistered) in reply to Kasper

    Duplicating your validation code client-side is old-school (even if you have some code-gen way to do it, which probably means you are forced to write your rules in some idiosyncratic DSL).

    You can send user input to the server while they are entering it, validate it server-side, dynamically update the page, and the user won't know the difference.

  • Beorn (unregistered) in reply to Zaphod
    Zaphod:
    I had to fill in a USA Visa Waiver

    goto https://esta.cbp.dhs.gov/esta/ & follow the Apply for Visa

    eventually you get to

    https://esta.cbp.dhs.gov/esta/application.html?execution=e1s3

    Try doing a view source on this beauty !

    I expect there are legal requirements for the page format .... barfff .....

    I went through the whole visa thing some times ago. I think they deliberatly made it that way so that the weak-of-mind commit suicide before finishing the application.

  • Jockamo (unregistered)

    The code is terrible, for sure, but Joe sounds like a dick.

  • Melissa Raulston (unregistered)

    I see your Date Selector of the Damned and raise you the Email Script of Doom. 13,000 (YOU READ THAT RIGHT) lines of code to collect inputs from a fairly simple form and drop them into an email. I wept when I started reading that thing. A visit to their forum suggested that in order to get it to run,I should give RWE perms to the command prompt to IUSR. Is a severe beating warranted her?I should think so....

    Weeping.

    Melissa

  • TheSHEEEP (unregistered)

    13,000? o.O

    That's.... o v e r .... 9 0 0 0 !

  • Robert (unregistered)

    All you people complaining about the OP's "insults to web programmers" need to re-read that first paragraph again, and actually process his words before flying off the handle in an angry rant.

    He doesn't speak one single word of disparagement about web programmers in general; he's speaking to the reputation that the industry of web programming has developed because it does actually have an overabundance of bad programmers.

    My captcha, 'genitus', reminds me of the story of that guy with the 100lb balls. I did not need that reminder right before going to bed.

  • Sayer (unregistered) in reply to Robert
    Robert:
    All you people complaining about the OP's "insults to web programmers" need to re-read that first paragraph again, and actually process his words before flying off the handle in an angry rant.

    He doesn't speak one single word of disparagement about web programmers in general; he's speaking to the reputation that the industry of web programming has developed because it does actually have an overabundance of bad programmers.

    All this super accurate "well technically" arguing is funny because it always starts with: "He doesn't speak one single word of disparagement about web programmers in general" and without a hint of irony finishes with:"...it [i]does actually have an overabundance of bad programmers."[/i] All based on anecdotal evidence and confirmation bias on a site that contains plenty of evidence that bad code is every damn place. "Oh yeah?! well every one of them I've ever met has been..."

    Bonus points for the OP being "the one sane man" as well. It seems all the other web developers are the dumb ones, just like every second comment here declares the methodology assertions of the one above it stupid.

    Bob:C++ is ....

    Tim:Well actually no, because....

    Tim:Pfft! You're both idiots since...

    Tim:Dumbasses! You could do all that in a line of PERL...

    Mark: Don't you know anything?! It's Perl!...

  • Foo (unregistered) in reply to qbolec
    qbolec:
    ubersoldat:
    This is why college education is broken. They teach you so many things, except to look at the API.

    I would love to work in place that:

    1. hires only graduates of CS as web developers
    2. does not depend heavily on "designs" provided by Photo Shop artists as a GUI specs

    until then, I must say, that sadly, but we have developed more than one date-picker "control" even though some us knew that there is a plugin for that.

    JPEG-driven development is my everyday nightmare. I believe the problem is that JPEGs say 1000 words to upper managment, while software architects just say a lot of sophisticated words which are hard to comprehend. What I believe is necessary is to develop a visual language in which architects could express their thoughts to managment. I am not talking about UML -- it's too complicated. Look for instance at the domain of real Architecture (that one which deals with buildings) : architects in that area olways provide visualisations, beautiful pictures, perspectives, and so on. CS lacks this kind of visual language :(

    Wow, wouldn't like to hire your dream company. I'd like to work somewhere that hires only art and design grads as web designers, and doesn't hire 'web developers', but actual software developers - and the best of those are often not CS grads, but Maths or Physics grads.

    Websites designed by CS grads look like, well, open-source GUIs, with no usability. I've never found a problem with working from jpegs (with some notes about animations, etc) as GUI specs - though you do need to make sure you've got examples for stuff like drop-downs, and clear descriptions of how animations work.

  • Altourus (unregistered) in reply to D-Coder
    D-Coder:
    Patrick Bell:
    Because web developers are the only programmers who write horribly mangled code, amirite? Please. And yet it is taboo to say that C/C++ have held the state of the art in software back by several decades due to their extreme low-level concepts and lack of portability?

    <<snip>>

    plonk

    Sincerely, Patrick

    Work on C++ started in 1979. So it could not have "held the state of the art in software back by several decades".

    Only by three decades.

    So far.

    Ehem

    Manditory

    Also why does askmit think that this is spam?

  • (cs) in reply to qwerty
    qwerty:
    // get current date and time from server $.getJSON('/GetDateTime)', null, function (data) {

    wow.

    Well the browser time could be totally wrong

  • Altourus (unregistered) in reply to wbrianwhite
    wbrianwhite:
    qwerty:
    // get current date and time from server $.getJSON('/GetDateTime)', null, function (data) {

    wow.

    Well the browser time could be totally wrong

    Also depending on your system settings the date returned could be unparsable server-side. We've had that one happen a few times.

  • (cs) in reply to Kasper
    Kasper:
    dogmatic:
    We validate on the server side to prevent hacking and bad data entering the db. We validate on the client side to make for a nice user experience. That's it. Just to give the user a better experience, meaning not having to see a page refresh.
    A solution like you describe is better than what you'd have if you used no javascript at all. As long as the javascript is done properly.

    Done properly means the server side code is written as if the javascript wasn't there in the first place. And when a user gets to the form, types in valid input, and submits, neither the user nor the server sees any difference between a browser with javascript enabled and one with javascript disabled.

    There is a high requirement for the quality of that javascript code, because not only is it in plain sight to the power users, and you will be judged on that. But also because before you even start writing the javascript code, you have a functional system. It takes just one stupid mistake in the javascript code where you cannot handle some corner case before you get into a situation where the system overall would have been more functional if you had not written any javascript code in the first place.

    I'm not trying to discourage such use of javascript. But only use it if you know exactly what you are doing. If you are going to cut corners, and most IT products do, then that javascript is an obvious corner to cut.

    dogmatic:
    It seems trivial and redundant for a developer (it is), but it looks more professional and is one of the small things we do to please our clients and keep them coming back for more.
    It is neither trivial nor redundant. Writing the same validation twice in two different languages does seem a bit redundant, so a system that can automatically generate both instances of the validation from a common source is a nice feature to have. It can also guarantee that the criteria is in fact identical.

    The model validation code in ASP.Net MVC beautifully does the same validations server side and client side (by automatically decorating the relevant fields with jquery recognizable validation attributes). One of the real selling points.

  • Guest (unregistered)

    I once read a blog post by some guy claiming he tends to employ people that appear lazy. The reason being they think before doing anything to limit the actual work to a minimum. I think I see were he is coming from!

  • Danny Moules (unregistered) in reply to Altourus
    Altourus:
    Ehem

    Manditory

    Also why does askmit think that this is spam?

    Comment's too short.

    ...................

  • moz (unregistered) in reply to Altourus
    Altourus:
    Ehem

    Manditory

    Also why does askmit think that this is spam?

    Two words, both mis-spelt, and a link. I think it's spam, and that's after looking at the URL.

  • Melissa Raulston (unregistered) in reply to TheSHEEEP

    I replaced it with 89 lines and some tweaks to the form itself.

    Tectite.com if you are interested in viewing this abomination for yourself....

    Melissa

  • (cs) in reply to Melissa Raulston
    Melissa Raulston:
    I replaced it with 89 lines and some tweaks to the form itself.

    Tectite.com if you are interested in viewing this abomination for yourself....

    Melissa

    I love this bit (lines 8554–8560):

            /*** not sure what to do with this....
            if (isset($a_upload["error"]))
                    //
                    // there was an upload error
                    //
                continue;
            ***/
    

    That's one mother of a script …

  • blowhole (unregistered) in reply to Daniel Beardsmore

    $i_rand = mt_rand(0,16777215); // 16777215 is FFFFFF in hex

    gud 2 no

  • Musaran (unregistered)
    // increment year
                        StartYear++;
    What is the name for this, err... "design pattern" ?

    Parrot comments ?

    Oh, and iterating with the initial value... a WTF on a single name + operator, that it not easy to achieve.

  • Amerrickangirl (unregistered) in reply to Kasper

    If the page was properly designed the user wouldn't even have the option to pick 30 days for February. A date picker should know how many days are in a given month.

  • No (unregistered) in reply to jonny_q

    That will probably work on someone's personal site in a year from now. Would a real site use that code? Not for at least 2+ years.

  • Cbuttius (unregistered) in reply to Mutt
    Mutt:
    People still use Experts Exchange?

    or expert sex change depending on how you parse it

  • .I. (unregistered)

    suck my dick bastard

Leave a comment on “Date Selector of the Damned”

Log In or post as a guest

Replying to comment #:

« Return to Article