DEV Community

Cover image for Share the most embarrassing code you've ever written
Peter Kim Frank
Peter Kim Frank Subscriber

Posted on

12 1 1 2 1

Share the most embarrassing code you've ever written

I saw this post today and it took me back to my only CS class which was taught using Java. I'll post my embarrassing final project below πŸ™ˆ

No judgment: share the most embarrassing code you've ever written!

Cover image via Unsplash

Top comments (11)

Collapse
 
ben profile image
Ben Halpern β€’

I write open source code, so all my shame is public

Collapse
 
brense profile image
Rense Bakker β€’

Its not so much a piece of code itself, but my most embarrassing moment was when I got called behind the pc of a team mate and he showed me that his password was visible in localstorage, because the login I implemented put it there... I put the credentials instead of the token in localstorage and then I messed up further, by adding the password to the token which isn't private either, just slightly harder to decode 🀦 in the end I did it right, but that was a painful way to learn πŸ˜…

Collapse
 
sendilkumarn profile image
Sendil Kumar β€’

@peter Are you implying that post had some embarrassing code? ;)

Collapse
 
integerman profile image
Matt Eland β€’

I don't have it because I don't own that code (a former employer does), but I had a commit that I later had to fix in production with the comment "The only explanation I have for this past code is that I was coding on painkillers at the time". I can't recall the specifics of what the code was, but I still remember the message of the fix commit.

Collapse
 
cloutierjo profile image
cloutierjo β€’ β€’ Edited

Can't reproduce exactly but goes like this (pseudo code):

Enum step: a; b; c;

For value in step{
    Switch (value){
        Case a:
             // Do something
             Break;
        Case b:
             // Do something
             Break;
        Case c:
             // Do something
             Break;
        Default:
             // Do something that won't ever happen
    }
}
Enter fullscreen mode Exit fullscreen mode

Took me a while to understand that in the end it was just procedural code and no enum, switch or for loop were required. (Ps it was probably a 200 lines function! Which in itself is embarrassing)

Collapse
 
mistval profile image
Randall β€’

Most of my most embarrassing code is lost to the sands of time.

But when I was a huge n00b at frontend stuff, one of my first projects was a web game for practicing Japanese kanji readings, and it was disgusting. Not only did I suck at CSS, I sucked really bad even just at coordinating colors too.

It got reviewed here and you can see some screenshots. Just hideous, I cringe to see it now.

I am still bad at frontend, but not as bad. I have polished this project up a bit since and it's far from amazing but I'm no longer ashamed of it :)

Collapse
 
hryggrbyr profile image
Thomas Rigby β€’

tbh I've seen worse design from "professional web designers" πŸ€·β€β™€οΈ

Collapse
 
stuf83 profile image
Stuart β€’

Cursing Css for an hour before I turned my monitor brightness up...

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Image of Docusign

πŸ› οΈ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay