TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Code Shame: Sharing your embarrassing code

40 pointsby bbodyover 5 years ago

12 comments

thinkingkongover 5 years ago
If you&#x27;re constantly getting better at what you do then you&#x27;ll always look back at your old work with a unique perspective. To some, that might take the form of embarrassment, humiliation, etc. But put in a more positive light, you can look at your work and know how far you&#x27;ve come.<p>I think we should all behave more like the later; appreciate your growth mindset, and remember 5 years from know whatever you&#x27;re doing now might be unrecognizable.
评论 #22252946 未加载
tobrover 5 years ago
There’s an unfortunate productization that happens when you put some code publicly on GitHub. There seems to be a culture that you should make the repo look attractive even if it’s just some off the cuff experiment no-one ever tried to run in production.<p>I’m certainly not against doing your work in public if that works for you, but I wish GitHub were better at encouraging people to label their half finished experiments as half finished experiments.
评论 #22252493 未加载
评论 #22251339 未加载
bovermyerover 5 years ago
I really, really wish that I had the source code I wrote back before Github was a thing. Most of that, though, was never in version control, and I have long since lost the floppies it was stored on.<p>This post is inspiring me to go clean up my old repos on Github, and perhaps wax nostalgic about my previous works, even the awful ones.
评论 #22250759 未加载
评论 #22250690 未加载
zadkeyover 5 years ago
At my very first coding job, I was hired to update the design of a .net webforms website. My academic background was in java. There was no on the job training. It was just me, 2 C# books, and stackoverflow.<p>I remember writing monolith methods&#x2F;functions with 1000+ lines of code.<p>I remember manually generating SQL as a string for ado.net. I also remember being unaware of stringbuilder and doing tons on += on strings and wondering why the application was slow.<p>Looking back now at my first time, it seems funny more than embarrassing. I remember it fondly.
HoppedUpMenaceover 5 years ago
Here&#x27;s a pretty embarrassing one ;):<p>int index = 0; while (!element.equals(sortedList.get(index)) &amp;&amp; sortedList.size() &gt; ++index); return index &lt; sortedList.size() ? index : -1;
评论 #22267659 未加载
评论 #22256006 未加载
评论 #22252942 未加载
waterhouseover 5 years ago
The CRAPL is somewhat related: <a href="http:&#x2F;&#x2F;matt.might.net&#x2F;articles&#x2F;crapl&#x2F;" rel="nofollow">http:&#x2F;&#x2F;matt.might.net&#x2F;articles&#x2F;crapl&#x2F;</a> , <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9670497" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9670497</a>
评论 #22264061 未加载
l0b0over 5 years ago
I thought this was just going to be another humblebrag like all that cringeworthy impostor syndrome stuff last year, but this has some good advice. If it did something useful, then certainly someone else can learn from it and you can be proud of it, no matter how far it is from what you do nowadays.
评论 #22252935 未加载
mdonahoeover 5 years ago
I enjoyed the &quot;impressive feet&quot; typo in the first sentence.<p>(First time I&#x27;ve ever seen that word pairing!)
评论 #22252184 未加载
rafaelvascoover 5 years ago
I just put everything on Github, good or bad. I always try to keep code smell at a minimum, but I can&#x27;t even recognize my earlier code anymore, like ten years ago. Doesn&#x27;t look like I coded it at all.
评论 #22252202 未加载
评论 #22251294 未加载
lbjover 5 years ago
Certainly I would want upcoming developers to share as much as possible, to get as much help and as many pointers as possible. But personally, I want to see your best. In the authors case, he&#x27;s seemingly improved a lot since writing the early code, so I see no harm in taking it down&#x2F;replacing it.<p>But in general, share what you can. Don be embarrassed, even a stern code review will help you improve, but I very rarely see &#x27;stern reviews&#x27; outside of Linux Kernel development :)
评论 #22252116 未加载
olliejover 5 years ago
There were some old assignments I wrote at university that I really wish I could find (my favorite “real” one being a catastrophically insecure implementation of RSA)
santa_boyover 5 years ago
I kinda fear this as I am working on my startup. I am sure that the code needs a lot of refinement but I am often pleased that it does the job that I set out to achieve.<p>I am not quite sure how this is going to work out as I am self-taught coder .... <a href="https:&#x2F;&#x2F;blog.mypad.in&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.mypad.in&#x2F;</a>