Live data from Hacker News

Competitive programming is useless

kislayverma.com

31–40 of 157 posts

Re: Competitive programming is useless

#31
post #10
post #6

From my point of view, the correlation is definitely not 1, but while competitive code is not good code, and therefore the skills and discipline differ, there is a strong correlation between good competitive programmer and good programmers. Just like sprinters and marathonians, sure best sprinters are not necessarily the best runners for long distance, but they are definitely better than me.

According to Peter Norvig, the correlation is actually negative! https://www.youtube.com/watch?v=DdmyUZCl75s

This is a classic example of Berkson's paradox [1]. If the job applications you receive have a positive correlation between on-the-job performance and competitive programming performance, and you use competitive programming performance to select who you hire, then you can very easily end up with a negative correlation among the people you actually end up hiring.

When you don't include the people you rejected in the statistic, the correlation is useless.

[1]: https://en.wikipedia.org/wiki/Berkson%27s_paradox

Re: Competitive programming is useless

#32
Competitive programming is just like a sport, as in every sport some people may like it, some may not. When it comes to programming interviews, companies do not try to check how good your competitive programming skills are, but they measure your will power, eg whether you were able to commit time to learn and understand DS&A in such a way that you can easily juggle them.

Re: Competitive programming is useless

#33

> Assuming for a minute that students from lesser tier colleges are less smart (possibly untrue but again a discussion for another day) Let’s discuss it now: they are NOT ‘less smart.’

Any one student may happen to be a genius at a lower tier school, but comparing population averages, it's pretty clear that smarter pupils go to MIT or Harvard than less prestigious universities and I don't see why this would be controversial. Some people are smarter than others. It doesn't make them more valuable as human beings, but there are real differences in the world.

Going to MIT and Harvard is more about ambition than "smarts" is my thought on it.

On average smarter, but that more has to do with population size than anything. If you limit the comparison to the top N from state schools so that you were looking at the same population size, state schools would end up out in front on the "smarts" scale but lose on the "ambition" scale.

Re: Competitive programming is useless

#34

I'd disagree with this assessment. In my own experience, I've found that competitive programming is useful in teaching a few skills. However, the apparent point of competitive programming--building up a good repertoire of advanced algorithms and data structures--is pretty close to useless. In my professional career, the most complex algorithm I've ever had to code myself is ... union-find (on like two occasions), wit…

To me competitive programming doesn't make you a good software engineer.

It will teach you bad practices, like abusing of dangerous programming constructs or data structures to optimized the code or just save some typing while writing the code (like one letter variable names, macros, etc), global variables and state in the program, not using common design patterns, not using OOP, not documenting the code and in general writing code that is difficult to maintain because it's not well engineered. You would say that a person would do that only in competition, but in my experience I saw that is not true, because if you learn to program a particular way, you would do the same also in other contexts.

Also, the competences that you will acquire by doing competitive programming are next than useless: in the real life I've yet to encounter a situation in which I have to use an algorithm used in a competitive programming competition (yes, I did them with even good results). And if you need them, you don't implement them yourself, but you use a library that manages all the work. The Dijkstra implementation that most competitive programmers use is a toy implementation, not something that you would never use in any sort of enterprise software.

The fundamental skill that competitive programming doesn't teach you, that to me is the most important thing for a good software engineer, is using Google to find documentation online. Most of the errors I see by young software engineers could easily been prevented if they did a simple Google search and read the official documentation (not a random blog post)! And yet in competitive programming you are forbid to use the internet, to me it's stupid, it's like requiring to write code with a typewriter just because in the past keyboards and monitors didn't exist.

Re: Competitive programming is useless

#35

I'd disagree with this assessment. In my own experience, I've found that competitive programming is useful in teaching a few skills. However, the apparent point of competitive programming--building up a good repertoire of advanced algorithms and data structures--is pretty close to useless. In my professional career, the most complex algorithm I've ever had to code myself is ... union-find (on like two occasions), wit…

> Almost everything you will ever need is already implemented in a library for you to reuse, and even reaching for that library is pretty rare.

This undercuts your claim a bit as someone has to be able to write the library in the first place. Yes it’s rare, but the software engineering industry is big enough that “rare” can be a “this happens all the time in domain X”.

Overall though I’d agree that it’s not useful for the majority of engineers and isn’t a good judge of programming ability just like math competitions aren’t either. They are “something” though.

Re: Competitive programming is useless

#36
I think competitive programming is useful as an interview style if you want to learn a language and gain that development intuition of stop, think, clarify, design, code and test. But do I think people are taking it too far? Definitely.

A typical comment or interview experience on Leetcode is that they take 3 months to prepare and do algorithms questions for FAANG interviews to pass the interview. In the process, some individuals skip class or other things. I don't think that is right personally.

Re: Competitive programming is useless

#37

I'd disagree with this assessment. In my own experience, I've found that competitive programming is useful in teaching a few skills. However, the apparent point of competitive programming--building up a good repertoire of advanced algorithms and data structures--is pretty close to useless. In my professional career, the most complex algorithm I've ever had to code myself is ... union-find (on like two occasions), wit…

> When competitive programming hits the tier where you need to memorize all of the advanced data structures and algorithms to do better, that's where further improvement in the leaderboards no longer translates to better programmers IMHO.

I found this post [1] by the current rank 5 competitive programmer on codeforces to be an interesting take on this perspective. It's not as much about knowing the fancy algorithms, as being able to derive their ideas when needed, that makes you really move up.

[1] https://codeforces.com/blog/entry/92248

Re: Competitive programming is useless

#38
post #11

> Assuming for a minute that students from lesser tier colleges are less smart (possibly untrue but again a discussion for another day) Let’s discuss it now: they are NOT ‘less smart.’

Wow, that's a lot of hubris from the author. I don't think anyone out of college for more than a few years thinks the "tier" of college you went to is the ultimate arbiter of how competent you are and can ever achieve.

Believe it or not, _statistically_ speaking, top tier STEM schools do have way more smarter students per my experience. Prestigious Universities earned their fame for the most part.

Re: Competitive programming is useless

#39
post #23

Earlier quoted context omitted.

Better prepared I would say. There are plenty of kids that don't get the opportunity to show how smart they are. They grow up in the projects, have to work nights to help their family, some have to join gangs to survive. You swap they're upbringing with someone who's parents got to spend 100k on their high school education, provide them the things like a car, so they don't have to ride the bus a hour to and from scho…

while I agree, that very smart children can be victims of their childhoods, not everyone can prep their way into MIT. that is why Harvard and Yale are more prestigious, its more associated with the powerful, not purely the most academically inclined. To be clear I grew up fairly poor myself with no support system, but not that bad with violence, just trailer park poor, you can tell smart children at a very young age,…

> my point is that MIT will have a higher percentage of mathematically gifted students, because it isn't something that can be prepped for.

What are you talking about? The requirements to get into MIT are not mathematical genius. It's above average quantitative skills. And you can prep for the standardize math requirements quite easily. All of my high school friends did, and some managed to get into MIT.

Re: Competitive programming is useless

#40

> Assuming for a minute that students from lesser tier colleges are less smart (possibly untrue but again a discussion for another day) Let’s discuss it now: they are NOT ‘less smart.’

Any one student may happen to be a genius at a lower tier school, but comparing population averages, it's pretty clear that smarter pupils go to MIT or Harvard than less prestigious universities and I don't see why this would be controversial. Some people are smarter than others. It doesn't make them more valuable as human beings, but there are real differences in the world.

It's controversial because that assertion assumes that entrance to MIT, Harvard etc. is primarily based on IQ (or whatever other metric of "smartness" one uses). It is apparent that admission to these universities is based on many things other than IQ, and that IQ may in fact be a lesser component than other things, such as socioeconomic status (which leads to attending schools that prepare one for applying, being able to participate in activities that pad a CV, etc).
Post reply on HN