179

I wrote this code about 3 years ago.

I guess we all had to start somewhere ¯\_(ツ)_/¯

Comments
  • 8
    ouch 😅
  • 8
    Haha i can relate to this, had a very similar code for my first api 😅
  • 10
    I had an assignment to do. Should've taken like 4 lines. I couldn't get it to work and it was pissing me off. 7 different "elifs" later....

    I fixed it the next day when I realized I was completely over thinking it lol
  • 10
    dat if chain yo... well Everyone starts somewhere mate
  • 8
    Here, take this time machine and go slap your past self 🕹
  • 2
    Although I am a developer for 10 years, I sometimes write like that! Kkk
  • 1
    been and be there :D

    I also have to laught some times when I see stuff that I wrote a while ago ... either I was stupid or jus did not kow what I was doing :D
  • 0
    I thought it was a callback hell
  • 4
    At least you were validating stuff. :)
  • 0
    @jAsE the solution consists of having an output variable that is true until one if doesnt trigger

    var worked = true;

    If (password) else worked = false
    If (username) else worked = false

    return worked;
  • 0
    Hahaha... A good start 😂
  • 4
    So... no-one is going to mention the "SQL injection doomed" queries? 😂

    Anyway, in my first projects, i did worse... much worse 😅
  • 1
    Nice ai bro
  • 1
    Atleast your commenting was on point.
    When I started I never used comments only to have it bite me in the ass afterwards when I couldn't remember what the also badly named function was supposed to achieve. xD
  • 2
    It's true, though. It's a constant learning process and you just use the tools you are aware of at the time.

    I hope in three years I've improved enough to be able to look at the code I'm writing today and laugh at how bad it is.
  • 0
    At least you commented & indented it properly...

    Have worked de on to much code where neither was common 😊
  • 1
    At least is well indented.
  • 0
    Looks fine for PHP code...
  • 0
    Is there a simpler way to do all that?
  • 3
    Also... here's the other half lmao
  • 2
    @featurenotbug at least it must have made a nice looking indentation curve :P
  • 2
    @rasm945i real code has curves

    wait what?
  • 0
  • 0
    You r a true talent who can make it shit works!
  • 1
    @gnulinuxer4fun you could use multiples "returns", that what it would break the tests if one condition fail, faster, cheaper
  • 0
    This guy can only do such shit work, ;)
Add Comment