Show Your Source Code and Learn From It

It is common among developers to want to keep our secrets on how we solved problems. That can also be our undoing for improving our skills.

We have all been in a situation where we spent hours, days, weeks, solving an annoying problem. Then a team member or the boss asks “So how did you do it?”, Naturally, you are reluctant to want to share all those hours of debugging and using your skills. After all, these are the things that add value to you as an employee or contractor right; you do not want to give someone else the edge. I get it!

However, think about it this way.

What if you explained how you solved a problem and even showed the code, maybe someone will take a look and suggest an optimization or improve it. Next thing you know, you just learned a better way to do something you already knew.

My point is, a great way to improve is to share with others and learn together. Imagine if nobody ever showed or explained what a case statement is and why it might be better than some massive if nest. What about if you never discovered a more functional approach to coding to avoid a whole bunch of code repetition.

Sure, you want to avoid people being nasty about your coding techniques. Those people will always exist, and always find a way to get under your skin, you just have to get over it. I am betting there is a significant percentage of astounding developers out there that go undiscovered because they never want to show their craft or products they have made. Maybe they are OK with that, but if you want a career in software, you will at some point have to show your source and your skills.

Given how easy and how common it is to use source control systems today; people, teams, and companies all share their source either internally or publicly. An ideal way for learning, I do not know a developer that has never Googled, searched Stack Overflow, or Github. Imagine how many problems you may never have solved if someone had not put a solution out there for you to read.

There are always times that you shouldn’t or couldn’t share, things like propriety information or classified materials. But I’m sure there are always the little things you can put out there in a Gist or something along those lines.

My 100 Days of Code project this year is a prime example. I am building a Swift based iPad Code Notes application; I continue to put the source on Github for it (get it here). Already my findings on CoreData has helped someone else solve their problem. It feels great to help someone else, and I’m giving back to all those who’s solutions have helped me.

Please share your thoughts on this subject; there must be a conversation to be had here both for and against my reasoning.

Share Button