Live data from Hacker News

Competitive programming is useless

kislayverma.com

101–110 of 157 posts

Re: Competitive programming is useless

#101
post #46

Earlier quoted context omitted.

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.

Idk about the "Prestigious Universities earned their fame for the most part" when implying that then causes their students to become way smarter. IMO to compete in the "college admissions race", smart/motivated students will often compete like crazy to get into the prestigious university system. So because so many very smart/motivated students compete to get into the programs, the prestigious universities get their p…

Put a NBA genius player in a community college basketball team will be hard to reach his potential. People surrounding you can make a big difference. Birds of same feather not only flock together, they can flock better/faster together and enjoy that process too.

Re: Competitive programming is useless

#102

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. Developers who have no interest towards algorithms will not even have the skills required to identify opportunities where algorithms should be used, much less the skills required to identify which algorithm should be used. For example, I had a conversation here on HN a few we…

>And that's how you end up with 5-minute load times for GTA.

was it actually the reason?

Re: Competitive programming is useless

#103

Earlier quoted context omitted.

> 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. Developers who have no interest towards algorithms will not even have the skills required to identify opportunities where algorithms should be used, much less the skills required to identify which algorithm should be used. For example, I had a conversation here on HN a few we…

>And that's how you end up with 5-minute load times for GTA. was it actually the reason?

https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times...

Re: Competitive programming is useless

#104
post #66

Earlier quoted context omitted.

I’d love a programming competition that wasn’t about speed of implementing algorithms, but rather was about speed of implementing solutions, using a provided standard library of algorithms and data structures. Competitive glue-code programming, per se, but glue code that still requires that you understand the need for specific advanced algorithms in order to pull them out of a toolbox.

Isn't this basically what competitive programming is? Maybe I'm a bit clueless, but my assumption was most people have standard libraries of common algorithms/implementations they pull from and tweak/glue as needed to fit the problem in front of them. Those libraries are not standardized, but there is for sure basically a common set of things you need to be competitive, right?

I haven't done competitive programming in years, but when I did we were allowed to use things like Boost in C++ or the standard library in Python.

I can't really recall any scenarios where a stdlib datastructure was slightly too slow, but re-implementing your own version was just fast enough to get by. The problems were typically created in a way where using any common algorithm was 1000x too slow, and you needed something like dynamic programming to make things run in a reasonable amount of time. Or they were a math problem masquerading as a programming problem.

Re: Competitive programming is useless

#105

Earlier quoted context omitted.

> 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. Developers who have no interest towards algorithms will not even have the skills required to identify opportunities where algorithms should be used, much less the skills required to identify which algorithm should be used. For example, I had a conversation here on HN a few we…

>And that's how you end up with 5-minute load times for GTA. was it actually the reason?

Bubble sort provides O(n^2) time complexity for a task that can be easily solved with O(nlogn) time complexity. The 5-minute load time for GTA was caused by a developer using an algorithm with O(n^2) time complexity when they could have used an algorithm with O(nlogn) time complexity. So, yes, I would say it actually was the reason (unless you are specifically asking if the bad algorithm choice was bubble sort, in which case the answer is no).

Re: Competitive programming is useless

#106

Earlier quoted context omitted.

> 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. Developers who have no interest towards algorithms will not even have the skills required to identify opportunities where algorithms should be used, much less the skills required to identify which algorithm should be used. For example, I had a conversation here on HN a few we…

>And that's how you end up with 5-minute load times for GTA. was it actually the reason?

No they weren't using bubble sort. When parsing JSON, they were calling sscanf (which internally was calling strlen). In addition, those parsed objects were stored in an array which was iterated through on each insert to check for duplicates.

There was an article [0] and subsequent discussion on HN [1] about reverse engineering and patching the binaries.

[0] https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times...

[1] https://news.ycombinator.com/item?id=26296339

Re: Competitive programming is useless

#107

Earlier quoted context omitted.

> 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. Developers who have no interest towards algorithms will not even have the skills required to identify opportunities where algorithms should be used, much less the skills required to identify which algorithm should be used. For example, I had a conversation here on HN a few we…

>And that's how you end up with 5-minute load times for GTA. was it actually the reason?

https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times...

tl:dr; O(n^2) string parsing and O(n^2) duplicate removal

Re: Competitive programming is useless

#108
post #7

Earlier quoted context omitted.

Yeah, this. My home state's college's CS program boasted it was one of the best in the northwest. My friends that went through it constantly had to ask me to explain simple stuff to them because the professor's assignments were wrong or confusing. Compare that to our local community college, which seemed to have a much more well-rounded course and taught the fundamentals in a way that made much more sense. Anecdotal…

The fact that so many people are getting CS degrees and yet can't even FizzBuzz is alarming. Is it the students? How many people are going into CS because they've had a taste of programming somewhere outside of school and decided they want to be a software engineer, and how many of them just get into CS because they heard that CS grads have very good employment prospects (Low unemployment, high salaries)? Anecdotally…

> The fact that so many people are getting CS degrees and yet can't even FizzBuzz is alarming.

CS contains more disciplines than just software engineering. Some people get into CS but have no interest/knack for coding: it just doesn't "click" for them the way it does for others, and they will fallback to rote memorization/copy-pasting from StackOverflow to scrape over the line.

I did Calculus 1 & 2 as part of my CS; but today, I don't think I'd be able to solve the FizzBuzz of Calculus, Linear Algebra, (or even the finer points of OS process schedulers if I'm being completely honest). I'd be alarmed if Software Engineering graduates weren't able to solve FizzBuzz

Re: Competitive programming is useless

#109

Earlier quoted context omitted.

>And that's how you end up with 5-minute load times for GTA. was it actually the reason?

No they weren't using bubble sort. When parsing JSON, they were calling sscanf (which internally was calling strlen). In addition, those parsed objects were stored in an array which was iterated through on each insert to check for duplicates. There was an article [0] and subsequent discussion on HN [1] about reverse engineering and patching the binaries. [0] https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-time…

No? If you check your own sources, you will find that this is precisely the type of case where a developer is using an O(n^2) algorithm out of ignorance when they should have been using a faster algorithm, and that the high load time was caused by this mistake. The time complexity for bubble sort is also O(n^2), compared to O(nlogn) for reasonable sort algorithms. I don't really understand how you take all this information and then conclude "no".

Re: Competitive programming is useless

#110

This post really is a rant as the author forewarns, with barely any cohesion and no evidence to back up anything. I fear it has gotten upvotes simply because it's a popular opinion. I don't think it's worth a detailed response so I'll just respond to the reductio ad absurdum in their tl;dr, that competitive programming has been taken to extremes (implicitly by employers). This is plain untrue. Sure a lot of interview…

I wish it could just be blamed on the bootcamp machine, but I've interviewed enough non-junior full time candidates moving from other companies to wonder how they got into those other companies to begin with, based on their performance with my simple problem where loops aren't even needed, nor are there fancy data structures. I used to ask https://leetcode.com/problems/jump-game/description/ but stopped in part because it offered nothing more than pass-fail, in part because of too many fails. Still, it's not exactly a high level competitive programming sort of problem, and there are many ways of solving it...
Post reply on HN