r/AskProgramming • • Dec 23 '20

Other Agree or Disgaree: Competitive/ timed programming is not a good indicator of how good you are at programming?

I think that competitive programming requires a niche skill set of being able to dissect and abstract from problems quickly and have an inside out knowledge of the syntax of your language. However I feel that most developers use many external resources and take time to code, but are still considered good developers. If you cannot competitively program, does that mean you aren't that great of a programmer? I'd like to hear your thoughts!

86 Upvotes

43 comments sorted by

8

u/[deleted] Dec 23 '20

What does one mean by "good at programming" exactly?

4

u/glitchedurbandict Dec 23 '20

Can produce a relatively efficient, easy to read, testable solution to a problem I guess

2

u/[deleted] Dec 23 '20 edited Dec 23 '20

In that case, you're not talking about mutually exclusive states. A competitive programmer may be able to rank high in speed competitions and also meet your objectives.

If they can't achieve your objectives, they probably aren't that useful outside of competition regardless of how well they rank.

But it stands to reason that if they can code quickly, from a business perspective it is a definite potential positive asset over someone who can't code quickly, with your other factors also in consideration.

1

u/glitchedurbandict Dec 23 '20

That does make sense, speed is definitely a valuable asset.

1

u/Fidodo Dec 24 '20

To me it means creating stable maintainable code and communicating and implementing requirements clearly.

9

u/looselytethered Dec 23 '20

It's not a good indicator. Sometimes good design takes time, you could throw together some bullshit that functions but is completely unmaintainable but that doesn't make it better than someone's code that is easy to use and readable but might take a bit more time to develop.

1

u/glitchedurbandict Dec 24 '20

Agreed, I think CP doesn't take maintability, testability etc into consideration

10

u/EternityForest Dec 23 '20

Sounds like a horrible indicator of programming skill, unless it's like, a six week reality show covering all the phases of a project (Sounds more entertaining than actually doing a coding contest!).

A short competition doesn't show if your app will scale, how well it runs on unknown hardware, if it will survive hacking attempts and DoSes, if it runs on different platforms well, or how well other people can maintain it. And it really can't without human judges, because some of those things are subjective, and most take months to reveal themselves.

I would even suspect many top competitive programmers are horrible to work with. If you know how to write a B-tree or sorting algorithm, I'm going to be a little scared of you if I don't know you. Because sooner or later, you might find an excuse to actually do so.

And then I'm going to have to learn your shitty(Ahem... perfectly optimized for the task) system and adapt my code to it.

And someone will have to explain to the next guy that we were too afraid of crashing the whole team with drama, and we put up with this hacked together nonsense, so too bad, sometimes it segfaults if you type bad input, just be careful, because someone wanted to avoid a dependancy and now half our codebase relies on some custom crap.

I think my idea of excellence in software is actually the average programmers idea of boring mediocrity, which means I'm probably not going to be happy with the stuff "rockstar devs" use. I'd rather work with someone who knows Vue but has no idea how it works inside, than someone who built their own framework in a weekend but never did anything real with popular tools.

1

u/glitchedurbandict Dec 23 '20

Honestly thanks for putting if from an actual human perspective, I can imagine a highly competitive programmer would be more like a machine to work with.

1

u/EternityForest Dec 23 '20

It gets a bit scary to read programming blogs where it's obvious that what they describe would be impossible without coding for 14 hours a day.

And then you think, hey, this person is talking all about clean code and Haskell and lisp metaprogramming, and everything they say about the actual tech industry products is negative (IoT is spyware, software is too bloated, GUIs are a waste of time, etc).

It's almost like they'd be happier as mathematicians, since the whole appeal seems to be about pure logic puzzles, and they get bored by most of what goes into actually making typical commercial software.

1

u/glitchedurbandict Dec 23 '20

Honestly your right, a lot of those kind of programmers seem to have chosen Cs as they enjoyed the logic behind it, when honestly they would be better just doing maths because they evidently aren't interested in the applied practical side of things.

3

u/MirrorLake Dec 23 '20

When I was in school, occasionally a classmate would complain that they got stuck and were up all night writing a program that realistically should've taken somewhere between 1 and 4 hours to solve.

Speed never really mattered, only the time management mattered. The overall code quality mattered so that things didn't fall apart once more complexity was introduced.

For me personally, it didn't matter if I finished at 4PM, 6PM, or 10PM--as long as I got a good night's sleep. I suppose my point is, speed is irrelevant if you're on schedule and producing quality work.

As a sidenote, my least favorite thing about programming competitions is that the winners can often be people who were the fastest to type the brute force solution. It would be better to provide a larger window of time, and rank the winners by the speed or memory usage of their algorithms.

1

u/glitchedurbandict Dec 24 '20

Definitely agree, a quickly coded solution isn't always the most efficient.

65

u/DerArzt01 Dec 23 '20

Agree. Even if you can come up with a solution to a problem quickly, that doesn't mean that it is a good solution (maintainable, easy to read, testable).

13

u/[deleted] Dec 23 '20

those last 3 points are so much more important than wrote memorization and single-liners. unfortunately competence in algorithms generally is directly related to other programming skills

but something like a take home project would show a lot more. you can analyze the testing, solid, dry, documenting, maintainability, etc.

it's basically "this is what my PR would look like" and you can glean a lot from that

1

u/[deleted] Dec 23 '20

I mostly agree, but I think that being particularly good at competitive programming requires threshold intelligence that would generally indicate good engineering aptitude. Because a lot of 'good engineering aptitude' is subjective and changes from shop to shop, I guess it's harder to say - does it mean you'll write clean, well-factored code? No. Does it mean your solutions will be elegant and correct? No. Does it mean you'll work well on a team? No. Does it mean you'll be able to handle complex engineering tasks? Probably. So, like, 1 for 4? It is obviously poor signal for the complete picture of the quality of an engineer. It's easy to say "agree" here also because competitive programming is scary and hard and has penetrated the interview process so decidedly that being 'bad' at it means you won't get a job, however 'good' an engineer you are, so we all resent it.

1

u/glitchedurbandict Dec 24 '20

I guess it just shows that objectively they have good programming skills, now other skills required to be a dev is something it doesn't indicate.

1

u/[deleted] Dec 24 '20

Agree, competitive programming is not an indicator of how good you are at programming, it is the measure of how good you are in dealing with stress, and typing on a QWERTY keyboard, and at solving face-to face issues in a patchy and usually unrealistic way. This gives you the mentality that will not prove useful in the real world unless you will do competitive programming or other forms of creation that require the job to be done fast, but not well.

As someone who did Bebras(a fast paced, time-based, computing logic challenge-similar but not the same) I can say that the results often don't translate to people's ability to program- my friend who got a lower score was more competent than me at programming. These challenges are NOT dependant on skill, but on the training that the person has done in that sport. A useful analogy is that an athlete that has trained in a sport doing another, like a tennis player doing competitive swimming; some of the skill does translate over, and so does all of their stamina, but they can still have trouble swimming if they have rarely or never done it before- they get the sport side of swimming, but not the skill side. I know that this does not directly translate, but think about it. In my opinion, competitions should be hosted that fall into the programmer's natural element, this helps showcase their ability to the fullest. Not that I hate competitive programming, I think that it is good for showing the true nature of someone because it helps prove how they will do in the real, chaotic world, I am just saying that programming fast should not be an indication of skill.

2

u/glitchedurbandict Dec 24 '20

I did Bebras as well, and I wasn't too pleased with my score.

These challenges are NOT dependant on skill, but on the training that the person has done in that sport.

This definitely resonates a lot

2

u/cyrusol Dec 23 '20

For most projects in the real world you typically don't need the skills that you need for competitive programming. You need a different skillset, and more importantly you need diligence and discipline. Do you test your code? Do you employ sound practices like code reviews? Can you take on the responsibilities you have for your team, not just your own code? Are you able to communicate your ideas?

But to believe that being good at competitive programming would be an inherently bad thing for your job like some people ITT do is just ridiculous.

2

u/psdao1102 Dec 24 '20

ive not done any competetetive programming, but ill say that at most programming jobs its a marathon not a sprint. Its better to create code that is going to be easy to modify and understand then it is going to be to create a program really quickly.

2

u/IJzerbaard Dec 24 '20

Just let me clear up a misconception that seems to exist in this thread: the efficiency found in competitive programming is completely different from efficiency in real engineering. Competitive programming tries to minimize the impact of constant factors, by intentionally using huge and unrealistic inputs.

Constant factors are hugely important in practice, to the point that they often dominate. In many cases, the problem size is actually fixed, and the challenge is doing the same thing in less time, not how to scale up to larger sizes.

If you cannot competitively program, does that mean you aren't that great of a programmer?

Not being able to do it at all, that's bad news. Just with logical thinking (and minor familiarity with time complexity etc) you can get quite far, not as quickly as people who have had a lot of practice in "typical CP problems", nor as well, but a Regular Programmer should be able to do something.

1

u/temporary5555 Dec 27 '20 edited Dec 27 '20

Constant factors are hugely important in practice, to the point that they often dominate

I think this is something specific to your field. For almost every project I've worked on professionally, constant factors really don't matter until you need to do a 3rd pass of optimization.

The only application where it really mattered to me was front end development. From my experience scalability is far more important and should almost always be your second focus after clean code.

2

u/thereisnosuch Jan 04 '21

I totally agree.

But from what I have heard from people who worked in the Big N companies for a long time. The reason that they ask this questions because it is less likely to have a false positive.

Its pretty much they are popular enough to afford to miss a lot of false positives. Because they know they will get a good one that can answer those questions. Because honestly people who are good at this also have the great ethic to study it.

They have lots of internal research on this and to them that is the best indicator compared to grades, work experience, hell even domain experience.

Am not really defending it I don't think its good either but that's what the companies believe that it is beneficial to them.

3

u/onebit Dec 23 '20 edited Dec 23 '20

Completing such a task (not necessarily winning) says more positive about you than negative. Clearly you have a degree of mastery of the subject at hand.

One might not want to drive a vehicle produced by Junkyard Wars a long distance, but you might like to have the participants around if you were stuck in the middle of nowhere.

1

u/snowe2010 Dec 23 '20

Haha that's a great analogy

2

u/Poddster Dec 23 '20

I've looked at some of the winning entries they're not the kind of code I'd want in my codebase. So it's not an indicator of how well they'd do the job I'd want them to, but it is an indicator that they can do A job well.

3

u/cyrusol Dec 23 '20

You cannot assume that the authors of those winning entries would write code in the same manner in a real world project as in such a competition. The conditions are wholly different.

-1

u/Poddster Dec 24 '20

You cannot assume that the authors of those winning entries would write code in the same manner in a real world project as in such a competition.

I can, and they do :)

1

u/cyrusol Dec 24 '20

What can be asserted without evidence can be rejected without evidence and now go chew on some bones or whatever you do in your freetime.

2

u/onebit Dec 23 '20

Performing poorly in competitions indicates you're a good programmer? :)

0

u/[deleted] Dec 23 '20

[deleted]

2

u/glitchedurbandict Dec 23 '20

This is very true, I guess it all does depend on what a "good" programmer is defined as.

4

u/ike_the_strangetamer Dec 24 '20

But, the problems depicted by competitive programming challenges do stray a bit away from things you might encounter in the "real world", at your standard programming gig.

A good example of this is when a colleague of mine was working on a filter option for our app. I thought a bitmask would be a great solution and suggested it. At first she disagreed but then took it on and did a FANTASTIC job implementing it.

I never had the heart to tell her, but a year later I regretted it all. It was just unnecessary. We didn't use any of the bit utilities she built anywhere else and while it was easy for me to extend, new developers to our team had no idea what was going on.

0

u/[deleted] Dec 23 '20

[deleted]

2

u/glitchedurbandict Dec 23 '20

This is incredibly interesting, thanks for sharing

5

u/onebit Dec 23 '20

Just pointing out that he said winners, not participants.

4

u/cyrusol Dec 23 '20

I regret causing confusion here. It turns out that this correlation was true on the initial small data set, but after gathering more data, the correlation went away. So the real lesson should be: "if you gather data on a lot of low-frequency events, some of them will display a spurious correlation, about which you can make up a story."

Peter Norvig, https://news.ycombinator.com/item?id=25425718

0

u/[deleted] Dec 23 '20

[deleted]

11

u/[deleted] Dec 23 '20 edited Dec 23 '20

I can see it as a test of mental acuity under pressure, like speed chess. Besides, if there are chili pepper eating contests or chasing rolling cheese down a hill competitions...why not coding ; )

6

u/EquationTAKEN Dec 23 '20

As a bullet chess player I love the comparison. It's a completely different game because while the rules are the same, time plays a much larger part, and you can use strategies you otherwise wouldn't.

3

u/EquationTAKEN Dec 23 '20

I like it. It lets me test my problem solving skills. While my results are generally not even near the top, I like the nature of the problems, and I LOVE seeing how other people solve the same problems after I've made mine.

There's so much to learn from comparing solutions. Much more so than just looking at others' solutions without having tried.