6 ms·
My feeling on this is mixed—I competed in ICPC in college, which is a competitive circuit of programming contests (like leetcode, but predating it) and went to
by msteffen 5y ago
My feeling on this is mixed—I competed in ICPC in college, which is a competitive circuit of programming contests (like leetcode, but predating it) and went to the world finals, which is easier than it sounds but not nothing. I think there are a few levels on which this sort of practice might help your career, and the question of whether they do help depends on which level you mean:
1) Learning the algorithms. I agree with the general criticism that these algorithms aren't that broadly applicable. I work on data storage software, so we use a few relatively fancy data structures, but even so most of my day to day work isn't on the code that manipulates them. That said, I think succeeding at these contests (especially when they're timed) requires you to practice avoiding bugs, particularly off-by-one errors, and I think that practice is pretty broadly applicable.
2) Thinking in terms of data structures. The data structures that a program uses are a lot more important than the actual code. Some critics complain that programming contests teach you to write messy code. I think that the people who are really good at programing contests who write messy code (ime, it's more compact than messy) do it because they've trained themselves to look at a program and see the data structures rather than the code, and in my opinion that's a better way to think about a program.
3) Learning to get good at something in general. This is the main reward I feel like I've gotten from these contests. I think many skills in life (including job performance and career advancement) can be developed the same way: study the rules, study the best competitors to understand what's achievable and what techniques are available, make an attempt, try to understand the results you got, try to improve your approach, repeat. I think programming contests are a great place to learn to do this (among many others, of course).
- jameshush 5y ago"Learning to get good at something in general" is the real thing these kind of tests proxy for. There's a lot of things in life that are a pain in the butt, hard, and stupid that you just gotta do. I went through the leetcode grind a few times, the last time I went through it I ended up taking a job at a startup that I was using as a "practice" interview before the FAANG ones because I could relocate out of California. I never would have interviewed there though if I wasn't laser focused committed to leaving my previous job for a better opportunity. If you're the kind of person who grinds leetcode, you're _probably_ also the kind of person who spends the extra time reading all the documentation for redux. Or spends the extra time writing a tricky unit test before shipping something. That being said, there's still _plenty_ of people who fail leetcode phone interviews (e.g. myself) but go the extra mile, and FAANG companies still manage to let some questionable hires through the cracks. But engineer hiring is currently a filtering game, not a sourcing game. You can either learn the rules of Monopoly and play or sit in the corner during board game night and complain you're not playing checkers. shrug
- MillenialMan 5y agoI think this is the most plausible explanation too, but is this true in practice? I would have thought most talented programmers don't want to waste their time on leetcode, so it would primarily select for people who can't succeed without dedicating time to it. Have you seen this first-hand and compared leetcode grinders against say, prolific open source developers?
- username90 5y agoMost people in the world care about money, and practicing leetcode is worth way more money per time spent than basically anything else for a talented programmer, up until you hit the level where you can get into top paying companies. You can get into well paying jobs without it, but then you need skills that are way harder to practice and usually you also need a lot of personal connections as those jobs often selects friends.
- MillenialMan 5y agoI'm not really convinced by this argument. Consistently improving your overall skills will lead you to outpace the competition significantly more in the long run than min-maxing, unless your industry is extremely bad at differentiating ability. I suppose there's an argument to be gained that the marginal gain of Leetcode given thousands of hours of practice already is the better side of the tradeoff, but that's a circular argument. You're going to select your programmers based on whether they recently spent 30 hours doing Leetcode, rather than on what they got out of the 10,000 hours of regular coding practice they did beforehand? Doesn't seem like a good selection criteria to me. That's why I asked whether OP had actually seen the effect he was describing and compared results directly. It's easy to come up with hypothetical benefits.
- username90 5y agoIt is a bit tiring to explain the process to everyone, but here it goes: Companies don't select programmers based on leetcode performance, no, they care a great deal about those 10,000 hours people spent. However if you fail that leetcode test you are out no matter what other experience you have. And it so happens that the set of companies paying twice the average for any experience levels tend to do leetcoding, so no matter what level of experience you have leetcoding is great. Although sometimes your experience might impress low tier companies but not high tier ones, so they downlevel you and ultimately your total compensation didn't move much. If you haven't seen this process then you are either ignorant, don't live in an area with high tier companies, or don't have a lot of experience. Personally I did double my income by going through this process and I've seen many others do as well. Now, lots of low tier companies started seeing high tier companies do this process, so they started copying it for some reason. But it doesn't work if you don't combine it with also paying significantly more than most others.
- deleted 5y ago[deleted]
- tester34 5y ago>look at a program and see the data structures rather than the code, and in my opinion that's a better way to think about a program. that sounds pretty difficult for me to understand when you read the code, analyze and understand it and due to your experience you see that something is bad (e.g poor api), then how can you "lose focus" from it / ignore it? how it ain't just lack of experience or simply not caring?
- GuB-42 5y agoIt is a question of priority, I think what GP is saying is that programmers used to these contests will focus on getting their structures right first, and will take care of logic on a second time, if they have time for it. In programming contests, they don't have time. And I think it makes sense and that is a hierarchy. Data structures are the most important, followed by logic (algorithms), followed by comments. The reason is that if you change your data structures, you need to change your algorithms, and if you change your algorithms, you need to change your comments. Data structures define everything, comments define nothing but themselves.
- msteffen 5y agoYeah exactly, thanks. I think I should've said "and focus on the data structures" instead of "and see the data structures"
- harryputtar 5y agoI think as somebody wfo too as competed in ICPC albeit not at world finals, I just want to add an important caveat, getting to world finals has a lot to do where are you from, for example if you are from a historically tough university or place such as India, Belarus or China. It is exponentially harder since due to how ICPC works the rules make it a piece of cake if you are from an unnamed college in norther America but much harder if you are from an established IIT in India or from somewhere like university of Tokyo.
- tmule 5y agoExcept there’s not much competitive programming bench strength in India (happy to link to ample evidence). Really facetious to compare it with China where the bench strength is real, and those thrown by the wayside could have otherwise killed it.
- skytreader 5y ago> It ("getting to world finals") is exponentially harder since due to how ICPC works the rules make it a piece of cake if you are from an unnamed college in norther America but much harder if you are from an established IIT Rephrased as I understood it in context, it says: "unnamed colleges in northern America has better chances at getting to WF than India, Belarus, or China". Which is a surprising statement to me. At my time (2008-2012, followed it a few more years thereafter), the heavy hitters were from Belarus/Russia, China, and India to a smaller extent. I remember getting news that Shanghai Jiao Tong really dedicates time to training, almost like a sport. Petr Mitrichev is Russian and tourist (forgot his real name) is AFAIK Belarusian. At least Mitrichev coached in grassroots programs for IOI which then translated to ICPC performance. Maybe India wasn't as dominant but I believe they were at least a considerable contingent in the Asia-regional levels. So it seemed to me the competition format favored these countries over US universities, which focused on research. Not to mention China and Russia loved hosting big ICPC events, if not the World Finals itself. Do elaborate on your statement please. I am curious why you'd make that claim.
- uyt 5y agoYou can check out the rating of teams going to world finals in previous years. https://codeforces.com/blog/entry/73791 https://codeforces.com/blog/entry/73791 https://codeforces.com/blog/entry/64909 https://codeforces.com/blog/entry/64909 The problem is that certain regions just have too many slots relative to their density of competition programmers. For example in less competitive regions, a rating of around ~2100 gives you a decent shot at world finals. But if you were in a region with a lot of other good schools, then even if you had a rating of 3000 you might not even be able to represent your own school, let alone your region. See MIT's result where their top 3 teams dominated their region but their school can still only send at most one team to world finals: https://nena20.kattis.com/standings https://nena20.kattis.com/standings
- nsonha 5y ago> they've trained themselves to look at a program and see the data structures rather than the code, and in my opinion that's a better way to think about a program. I don't see how this is mutually exclusive to writing readable code. I'm not good at these but I picture good code in your definition to be utilizing data structures in an intuitive way instead of coming up with some novel but wacky performance trick.
- supernovae 5y agoYeah, it makes no sense to me. It's like saying if you stare hard enough you can see into the matrix. For me, i'd sacrifice raw performance for using Python because i love its simple datastructures and protocols and the compbination of code and interpreter is great... and more often then not, it's not much of a sacrifice since compute time is often more affordable than creative programming time...
- deleted 5y ago[deleted]