139

Another reason why I'm not a web developer... Having a user choose their year of birth with a drop down menu is a pain. I did it from 1900 - 2017 rip my fingers.

Comments
  • 57
    I mean.... Thats one way to do it i guess....

    You should look into jQuery if your just doing barebones html+js.
  • 91
    Dude I am no web developer but using JavaScript and the DOM you can make a very simple for loop for this
  • 25
    :O You could solve this with 3 lines of code
  • 23
    Repetitive tasks should be automated.
  • 57
    Damn it. I should have done it with JavaScript. I'm finished with it now, and it's ugly.
  • 44
    @Michelle o jeez.
    At least you get an A for effort. Haha
  • 25
    If this is a joke, i'm not even mad. That takes willpower.
  • 13
    are you serious ?? Just do a loop in JS or in the backend before rendering it !!

    This is a joke
  • 7
    What a troll! I thought this was serious at first
  • 20
    Thats exactly what people would rant about if they would see that in the wild, but now people cheer 😢

    Just quickly googling anything related to that brings up atleast 10 copy pastable results.

    Also you could have used the linux shell via brace expansion {1900..2017}

    Also excel has autocomplete, word has too iirc.

    Also youre going to add each year a new entry now? piss poor implementation imho.
  • 4
    You know there’s two letters you could add in your google searches...
    “U” + “X”

    It would save you a lot of time
  • 5
    @nighter the sad thing is, it isnt.
  • 28
    @ everyone
    Calm down! It's not like it's going to kill you or anything.
    My crime has been done and it's too late now.
  • 22
    I think its beautifully aligned , but has to die, like a baby gremlin
  • 12
    Ok lessons learned, right? Here is another. 😳

    If I wanna write something like that, I would utilize on Office Excel/Libre Calc and my sublime text.

    1) I will generate the number in excel. Copy the values.

    2) I have Emmet installed on my sublime. So if I want 100 option tags, I just write option*100 and tab. Then paste.

    Done. Just a few clicks will achieve that. I may not be smart but I sure am lazy πŸ€” You gotta learn how to be lazy too girl.
  • 9
    Would have saved you the strain of that πŸ˜‚

    For(I = 1900; I<= 2017; I++){
    // show an option with I
    }
  • 11
    @Michelle Empire State Building 2.0
  • 3
    @mrlinnth o__0 damn b
  • 5
    @ThatDude I call women dude all the time :P
  • 7
    @azous
    ;-; I can't kill it just yet
  • 4
    @mrlinnth
    As a busy person, laziness is difficult.
  • 7
    @C0D4
    I didn't think it through and I'm not a web developer so it didn't occur to me to use JavaScript right away.
  • 7
    Emmet has an option to include some math in your snippet, with an increasing index.

    If I had written this, I would have used a vim macro with Ctrl+A.

    But then again, I wouldn't have written this...
  • 4
    for(var i = 1917; I <= 2017; i++){
    let option = document.createElement("option");
    option.value = i;
    option.innerHTML = i;
    select.appendChild(option);
    }

    Something like this, I believe.
  • 9
    <input type="text" pattern="\d{4}" >
  • 6
    @stop I came here for this. These for loop fuckers.
  • 2
    I had to do some of those ugly stuff. Wrote one line of the code, recorded a macro that copied it, pasted it, incremented the number (c-a on vim), and then made the macro run the adequate number of times.
  • 4
    @Michelle I love how you accept the situation as it is πŸ˜‚
  • 10
    @lanesra
    Because it's too late to fix it. I can't let that work go for nothing so I might as well embrace it :)
  • 6
    @Michelle I really don't know if you're trolling anymore, but webdev has nothing to do with knowing that, you have listed a million languages in your profile, yet you failed to write a for loop in for ex. python and copy paste that output? Obviously to have it the correct way you would do it in Javascript (which you have listed too) or serverside, but as mentioned above - googling that, literally gives you tons of copy pastable results. Its simply disgusting to solve it manually or not the correct way anyway. Also listing 2017 makes no sense, nobody born in 2017 will likely register for a website, but thats just stomping on a smelly pile of shit anyway.
  • 7
    Wow only two people got it. Oh well.
  • 2
    @Michelle lol I did , people here are pretty dense sometimes but to be fair it is hard to tell sometimes through text
  • 7
    @AleCx04
    At least it was believable :)
  • 4
    @Michelle believable??! Even more, this was on troll goddess level u____u I salute you u____u
  • 10
    @AleCx04
    Haha thanks. The effort was worth it.
  • 4
    Keep it DRY--Don't Repeat Yourself
    You can either write both backend or frontend script to automate this.
  • 4
    I am still confused if you really did this or just playing around with us.. πŸ€”
  • 3
    @Michelle
    I wasn't convinced, I knew you were smarter then that. Also you when you said:
    "I'm a busy person, I don't have time for laziness".

    It doesn't make sense.

    If you're that short on time, then you'd come up with a better system.
  • 4
    The power of the force
    The brute brute force
  • 2
    @irene omg I love that meme! Lmao!!
  • 2
    generator ? i did some web stuff for couple of my projects i generate lists even if i have only 4 options
  • 4
    @C0D4 should be Date.currentyear() or some shit instead of 2017
  • 5
    Not buying the "troll" scenario.. I think you really did it, tried to embrace it but then crumbled under the pressure and took the safety net some of the guys been throwing at you so you called it a troll. But I disapprove of this approach..

    Anyway, we all did stupid shit, not on that level, but we all did it. Still doing it.

    Take it as an opportunity to level up and never be ashamed of it.

    I believe in you @Michelle c:
  • 2
    The time you spent in writing this is more than the time required to build the whole website without it...
  • 12
    @Shisuki "damage control" fify, image fits well imho
  • 3
    @JoshBent "It was a plan." :D
  • 3
    If you didn't want to dynamically do this you could've also just written a script to generate the barebones html for this lol
  • 2
    Please stop calling yourself developer.
  • 2
    Hahahaha now do this for phone numbers @Michelle πŸ˜‚

    Gee some people have no chill
  • 1
    I’m gonna be a party popper and say that I would laugh so hard if that’s actually generated HTML without minification πŸ˜‚
  • 3
    This COULD be done a lot quicker in JavaScript, but honestly, I would have probably had a backend engine do it instead, so the website wasn't completely broken for users with their JavaScript disabled, or for users with those no-script screen reading browser things.

    Although I would be lying if I said I've never done this same exact thing before. And it was painful.
  • 5
    @Shisuki
    No, I was literally trolling. I'd never host this atrocity. I'd be too embarassed haha.
    It doesn't take a genius to realize a shorter way of doing this.
  • 1
    Girl you ever heard of loops?
  • 0
    @Michelle this where regex comes into playground download sublime replace pattern matching to tags. only you need is number from 19**-20** ...
  • 6
    Loops have been around FOR a WHILE ... hahahahahahahaba
  • 4
    "Nooooooo!!!"
  • 1
    @ThatDude I use it more as a term of friendliness, without it I think the message would seem a bit too critical. I hate text
  • 1
    Or you could even make a simple loop in whatever language you know, Java for example, and print this whole and copy paste it.. that's the dumbest thing I've seen..
  • 2
    Michelle ur hawt
  • 3
    @Yasmin
    Fuck off Yazzy xD
  • 4
    @Michelle add me on club penguin
  • 2
    @Yasmin
    I hope you're kidding haha.
  • 2
    @Michelle I dont kid...
  • 2
    Quick question. Why not just use a number input with min=1900 and max=2017?
  • 1
    @floatright oh damnnn no JS required! gg sir gg.
  • 1
    @Michelle girl, u just made the best mock to most ranters this year. Would have hit you(friendly one) if you were near for mocking me too. πŸ˜‚πŸ˜‚
  • 1
    fck loops. you can do the same with excel in less then a minute :D
  • 2
    That's a user unfriendly website you are building - what about people older than 117 years old?😜
  • 1
    @JohnCdf A bit overkill :D
  • 1
    @JohnCdf this makes me happy <3
  • 1
    I mean, the problem I see with this is the size it'll need to send down the wire, if I just guesstimate based on the length of each row, this dropdown alone would be about 5-10 kB which may not look like a lot, but every byte we don't have to send to the end user that might be on a really slow connection is a happy end user that doesn't leave the site before it has loaded...
  • 1
    Comments section in this post is so hilarious πŸ˜‚πŸ˜‚ good job for making a record of the longest comment in a single post I ever seen @Michelle πŸ˜‚

    Now I hope devRant has search option in for searching any word in a the post-comment section for easiness of navigation
  • 3
    @IndoDev
    Mines doesn't have the most comments. I think it was @404response is post :)
  • 1
    @Michelle at least as far as I ever see 😁
  • 1
    :^p

    <?php
    $start = 1900;
    $end = 2017;
    for ($i=$start;$i<=$end;$i++) {
    echo '<option value="'.$i.'"> '.$i.' </option>';
    }
  • 1
    You could just let it be created as an array of strings with an for loop and paste it in, but its your time πŸ˜‚
  • 1
    @Dimmerworld real web devs learn binary and write code that generates that html
  • 1
    Lrn2forloop
  • 0
    Before more people kill me, it was a joke.

    It's common sense, so obviously this isn't real. What kind of idiot would do that manually? Back end exists for a reason -_-
  • 2
    @Michelle what is that fooooooont
  • 1
  • 1
    Level India achieved well doneπŸ‘
  • 2
    I am no web dev,but I would have made a C++ program to print all these in a loop inside a file,then would have copy pasted it. XD

    Seeing the above comments about loop in js,I thinks thats the best way!
  • 0
    @Nanos
    Oh, thank you but you did't have to do that! I already know how this was a joke. But thank you so much, I appreciate it :)
  • 1
    @Michelle I love your trolling!

    @Nanos On these cases, I just use Excel or any program language I know and copy and paste the output.

    For Excel:
    First column <option value="
    Second column 1940
    Third column ">
    Fourth column 1940
    Fifth column </option>

    Then just replicate everything to the following rows. Excel will increase all the numbers. After that, just concatenate and copy and paste.
  • 0
    Why not generate that code in the repl of your choice?
  • 3
    Back in college I saw something like this as a jscript code from a senior student project. We were told to rate the code so I gave a poor rating... They didn't take it so well
Add Comment