I'm interested in knowing whether it is advisable for computer science students to spend their major chunk of time on the online judges practising programming(like Topcoder and codeforces) or it's more worth to develop a software or contribute to open-source ?
Note: I'm not asking from the perspective of job scenario. I'm asking from the perspective of being a better developer.
They're what you make of it. Those problems are generally far removed from what you would actually do at most tech companies. Regardless, if they're complicated enough and you come up with a working solution, it does hone your problem solving skills. Don't do it to be top on a leader board or to get an interview.<p>Contributing to an open source project is also valuable, but in a different way. Open source projects require you to navigate through bug lists, socialize with other coders, read specs, analyze and repair a (mostly) functioning system. Overall, it will help you gain perspective on creating software.
Why not do both?<p>I think both activities require complementary skills.<p>In one hand, programming competitions will hone your problem solving skills, ability to write bug-free code quickly while powering up your language and algorithms skills. In the other hand, developing software and contributing to open-source needs a different set of skills: patience, communication, collaboration and so on.