If you're constantly getting better at what you do then you'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'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're doing now might be unrecognizable.
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.
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.
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/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.
Here's a pretty embarrassing one ;):<p>int index = 0;
while (!element.equals(sortedList.get(index))
&& sortedList.size() > ++index);
return index < sortedList.size() ? index : -1;
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.
I just put everything on Github, good or bad. I always try to keep code smell at a minimum, but I can't even recognize my earlier code anymore, like ten years ago. Doesn't look like I coded it at all.
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's seemingly improved a lot since writing the early code, so I see no harm in taking it down/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 'stern reviews' outside of Linux Kernel development :)
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)
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://blog.mypad.in/" rel="nofollow">https://blog.mypad.in/</a>