Live data from Hacker News

Competitive Programmer's Handbook (2017) [pdf]

cses.fi

61–70 of 127 posts

Re: Competitive Programmer's Handbook (2017) [pdf]

#62
post #24

Earlier quoted context omitted.

Another reason for shortening code in programming contests (apart from being able to type and edit/iterate faster) is that it helps you avoid errors. For example, in the heat of the moment and under intense time pressure (e.g. you have finally figured out the algorithm to solve the problem, but you have only 13 minutes left to implement it or whatever), it's easy to write code like this: for (int i = 0; i instead of…

I'm not sure that you avoid errors by forcing yourself to write short code. With C macros.

When you write "FOR(i,n)", instead of "for (int i = 0; i That being said, I've found that competitive programmers sometimes write extremely ugly code. It's surprising to see how they are able to solve such complex problems, and yet can't (or don't value) write readable and structured code. Maybe they are so sharp that they don't feel the need to make their code more readable.

Re: Competitive Programmer's Handbook (2017) [pdf]

#63
I wonder if there is something similar to this but for pragmatic, design-oriented challenges. Writing obfuscated code in the shortest amount of time is akin to the people who change tires during a race car competition. I would love to see challenges where you build the race car parts instead.

Boring but immensely more useful.

Re: Competitive Programmer's Handbook (2017) [pdf]

#64
I see in the comments that some people conflate competitive programming and technical interviews. Technical interviews (at least in companies such as facebook and google) are usually much easier than competitive programming problems. The problem you find on leetcode for interview preparation would be considered beginner problems in competitions such as google code jam.

Re: Competitive Programmer's Handbook (2017) [pdf]

#65
post #31
post #29

The most irritating thing with these competitive/algo stuff is that no matter how many times you master it - eventually you always forget it, because you don't need it on a daily (or more like yearly) basis in the real world.

That’s the entire point of those kinds of interviews. It’s a strong filter for “recent graduate” while maintaining plausible deniability for ageism. It has a secondary effect of filtering for “willing to do unpaid overtime”.

I think also the interviewer gets to feel smart. Always nice to have the answers.

Re: Competitive Programmer's Handbook (2017) [pdf]

#66
post #33
post #29

The most irritating thing with these competitive/algo stuff is that no matter how many times you master it - eventually you always forget it, because you don't need it on a daily (or more like yearly) basis in the real world.

If you really needed to remember it, you could employ spaced-repetition: https://en.wikipedia.org/wiki/Spaced_repetition

Kek - i employed this technique in learning starcraft 2 openings. Def. Seperated the top 10% from top 5%

Re: Competitive Programmer's Handbook (2017) [pdf]

#67
post #44
post #33

Earlier quoted context omitted.

If you really needed to remember it, you could employ spaced-repetition: https://en.wikipedia.org/wiki/Spaced_repetition

I use Spaced Repition for chess openings as I can't refer to a book while playing a tournament game. That's not the case for programming.

A lot of software developers are asked to code solutions to difficult problems using nothing other than a whiteboard. Given that under normal circumstances we use a computer, IDE, and the internet, I can see why some might opt to use spaced repetition to ensure employment.

Re: Competitive Programmer's Handbook (2017) [pdf]

#68
post #43
post #41

Earlier quoted context omitted.

I wouldn't call it "a little practice". There are people who are "into" competitive programming and there are people who aren't, and those "fair" tests are skewed towards the former group. The worst thing is that the actual job has nothing to do with the competitive programming at all.

Another filter for age is that 20-something’s are more likely to have time for this whereas older people may have more time commitments already People in their 20s and 30s now will regret not stamping out ageism when they hit their 40s and 50s, as they inevitably will

> People in their 20s and 30s now will regret not stamping out ageism when they hit their 40s and 50s, as they inevitably will

The problem is, everyone in their 20s and 30s assumes they'll be gazillionaires by the time they're 40, because of course they're brilliant and hard work always pays off! Ageism is only a factor if you're not smart enough to make a billion by the time you're facing it.

Re: Competitive Programmer's Handbook (2017) [pdf]

#70
post #52

Earlier quoted context omitted.

The problem is, for every person like you, there's a person like me that actually likes those types of challenges and wouldn't actually mind being thrown into that type of gauntlet. My years of experience be damned.

Sure, that might be the case. But for those funny needs I have a "crazy algorithm course" from a top 10 university, ACM ICPC and Kaggle or other paid competitions I can attend. I am not going to go through such an interview doing simple silly things I did dozen times before at FB/Goog/etc., when I know I can use that time to work on something more interesting, or just for relaxing after a hard work/enjoying accomplis…

I have a sneaking suspicion that I’ve built a feature that was presented as a coding exercise, possibly more than once.
Post reply on HN