Disclaimer: This article was written few years ago and may no longer be relevant as software engineering has changed a lot in the last few years. This is what may be more relevant now: Future of Software Engineering - Gaurav Chandak
This article was originally published by Vivek Prakash (Co-Founder, HackerEarth) on Quora as an answer to "If one has an aim of being a good programmer, what should one prefer - contributing to open source projects or solving algorithmic problems on competitive coding websites?".
Having done a bit of both - went to ACM ICPC Asia regional finals in 2011 (got 6th Rank), and did GSoC in 2011 & 2012 (in Operating Systems), I guess it gives me some insights into what you are asking and what's going through your mind.
This is one question which has always made its round every now and then, and is particularly common among college students. I will give you some hard facts from what I have seen around me, from what we have learnt in writing more than 100,000 lines of code while building HackerEarth in last one year, and it's going to be little long.
I am assuming you are of the type who likes to build stuffs, who wants to work on real-world problems in a company, and who doesn't want to end up in academia.
Unless you are an outlier, you just simply can't ignore both of them - either of open source projects or developing problem solving skills through competitive coding.
Now, let's consider a few common & easy real world examples which come up more than often:
- You need to write an implementation of nested-comments on your website. It can be easily searched, traversed, parent-child relationship of comments is maintained, etc. Writing a good commenting system is hard on its own when you are building to scale, and add such constraints there and most people who have never heard of a tree or their traversal algorithms would just start thinking and beating their head.
- You need to write your own deployment system on top of Git repository. Leave that, let's make it simpler. You need to parse your git logs and show some useful information. When multiple people are working on the same projects, the branches, the merges, the rebase, etc. becomes much complicated than that can be comprehended. And writing good code to implement that do require the knowledge of good traversal algorithms, data-structures and visual mapping.
- You need to write a distributed system, where you are assigning jobs to different servers for faster processing. May be you will throw a message queue in between where jobs are queued and all the servers take out the job from the queue one by one and then process it. Very likely, the servers will be processing the jobs independent of each other, but the final result is dependent on the cumulative result of each job processing. This is in itself a hard problem, you have to deal with race-condition, you need to exactly know when all the dependent jobs got processed and writing efficient code to deal with that rains fire when you don't understand each component properly. The common example of this scenario is running the submitted code on all testcases asynchronously in an online judge environment.
While working on open-source projects, we tend to forget or I would say - we choose to ignore the importance of problem solving skills. This is because we start feeling superior to others, we believe the code written by us will impact hundreds, if not thousands, of people lives and we continue to do that. Yes, it's true. But it's also true that many open source projects built with thousands of man-hours just crumble when deployed in a large scale production system or when faced with real challenge. The engineers there then end up modifying them themselves and contribute back to the community (which is actually the good part). We also forget that the people who originally wrote a fairly popular/successful open-source project were just outstanding - who had a solid grasp on everything, from system design to writing beautiful code.
That said, it's also fairly common to see that people who have been just doing competitive coding are just flabbergasted when asked to work on a real-world project from end-to-end. They look at the set() and get() functions like some atrocious behaviour. They are dissatisfied in even companies like Google & Facebook, etc. because the kind of work you do in a real project with real people is poles apart from what you do in competitive coding. However, then most of them learn quickly and become amazing contributors.
Undoubtedly, it's important to understand that you can't keep both of them on diametric ends and walk towards one. That is most probably a big mistake!
By all means, you should go to ACM ICPC world finals and then write the best open-source Python library for monitoring a cluster of servers or the fastest database connector in C++, or your own operating system.
But don't choose. Just do them. All of them. Whatever your heart says. Be a happy programmer, not what everyone around runs after!
-----
You can follow Vivek on Twitter at vivekprakash.
Join our discord community to have healthy discussions on programming, interviews and job search.



