Блог пользователя I_love_Hoang_Yen

Автор I_love_Hoang_Yen, 10 лет назад, По-английски

Today I came across this article, in which "Peter Norvig said that one thing that was surprising to him was that being a winner at programming contests was a negative factor for performing well on the job".

Normally I don't care about these topics, but this is from Google — where they have good population of high rated competitive programmers and the claim is backed with data.

The article mentioned one point: "programming contest winners are used to cranking solutions out fast and that you performed better at the job if you were more reflective and went slowly and made sure things were right". Though I don't think this is true. For example, being competitive programmer taught me:

  1. bugs can be everywhere & we must code carefully
  2. many problems have amazing solutions, and it's not a good idea to start coding anything that comes to mind.

Some comments talked about how competitive programmers write unmaintainable code or appear arrogant. Having lots of friends who are competitive programmers and read lots of comments here, I believe that these are also not the case.

  • Yes, amongst rude comments made on Codeforces, many are from reds, but many are also from yellows, purples, blues, greens... and I think majority of high rated people here are very reasonable & nice.
  • I think most people have some moments when we come back to read our old code writen in contests, and have no idea what we did. Since we've been there, it's not natural to think that we would write such code when we know that we need to maintain them.

I understand that the points I made above are probably biased. So what do you think? Do you believe that being good competitive programmer correlates negatively with being good on the job?

  • Проголосовать: нравится
  • +380
  • Проголосовать: не нравится

»
10 лет назад, # |
  Проголосовать: нравится +282 Проголосовать: не нравится

Who cares if it's so interesting?:)

»
10 лет назад, # |
  Проголосовать: нравится +184 Проголосовать: не нравится

Maybe it applies for google because of the interview type?

For average competitive programmers interview questions should be very easy, because they may solved this kind of problem before.

But non competitive programmers they should solve new problem, so they should be really smart.

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    i know a lot of guys that considered to be really smart that get stuck with simple algorithmic problems , if a non competitive programmer cracked Google interview so he practiced algorithmic problems enough . maybe in a non competitive programming environment like solving problems in Geeksforgeeks or any other site that provide algorithmic problems.

»
10 лет назад, # |
  Проголосовать: нравится -101 Проголосовать: не нравится

Google has the data, so I think google is right. Never argue with google.

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится +96 Проголосовать: не нравится

>the claim is backed with data

I would very much like to see the data (they're not in the video excerpt, and I'm not going to watch the whole talk). I'm also curious about what people are considered "contest winners" — the term itself would imply an extremely small sample. In what way was the data evaluated — what does "perform well" mean? Etc.

I can't imagine it to be true.

»
10 лет назад, # |
Rev. 3   Проголосовать: нравится +174 Проголосовать: не нравится

Isn't Petr fired yet?

What if... they closed development in Moscow office to get rid of Petr, but he decided to relocate? :o

»
10 лет назад, # |
  Проголосовать: нравится +35 Проголосовать: не нравится

See Ruberik's comment on this subject: https://news.ycombinator.com/item?id=9324513 (he was organizing some of the first GCJs).

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

To be fair, Peter Norvig's sample size would be less. It would be naive to discard comments from person of stature as Mr. Norvig. Still, I would be careful to generalise such comments.

»
10 лет назад, # |
  Проголосовать: нравится +78 Проголосовать: не нравится

I think Mr. Norvig hit the nail on the head in the video: everyone who gets hired at Google is exceptional, so to get hired without contest achievements reflects outstanding capability in some other area, like past experience or open-source development, which is likely more transferable to tasks on the job.

Google has continued to run the Code Jam, even expanding it this year with the Distributed Code Jam, so it's clear that they still think competitions are worth something.

»
10 лет назад, # |
  Проголосовать: нравится +47 Проголосовать: не нравится

I just saw the whole conference linked on the article (he addresses this topic at 1:11:00). Before watching his full response I didn't understand how this could be possible either, but now I think it may make sense. The most important point is that they seem to be sampling from Google employees only, not the whole population. His full explanation was the following:

"So if I just had to pick someone off the street, I really want that contest winner, I got to take him every time, or her. But if it's somebody who passed the hiring bar, then they're all pretty much at the same level. And maybe the ones used to winning the contest, they're really used to going really, really fast and cranking the answer out and then moving on to the next thing and you perform better on the job if you're a little more reflective and go slowly and make sure you get things right."

In other words, if someone programs as well as a CP winner without doing CP, he'll probably be more patient as well (he'll probably have learned both your points even to a higher degree given he hadn't to submit his solution in 2h). Without the information that both are Google employees, then a CP winner will probably be much better than a regular programmer.

  • »
    »
    10 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +38 Проголосовать: не нравится

    I read that whole thing, but can not believe that is correct (I also quoted that sentence). I don't think good CP is short-sighted to the point of 'moving really fast and then moving on', if the task at hand is important. An example would be Petr, on many occassions, tested his program against a brute-force to make sure his code is absolutely correct, before moving on to other things.

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      I'm sure Competitive Programmers (specially good ones) are very careful, but the 2h. /1h15min. limit is unsurpassable, even for Petr, whereas a programmer at work may have days to do his job. In my opinion it's not a question of personality or knowledge, it's just the time constraints one is used to.

»
10 лет назад, # |
  Проголосовать: нравится +69 Проголосовать: не нравится

Because it is so addictive that you skip doing work to play contests?

»
10 лет назад, # |
  Проголосовать: нравится +226 Проголосовать: не нравится

I work for a Search Quality team at Google.

We absolutely love hiring winners from programming competitions. Whether they will develop into a high performing engineers or not depends entirely on them, but they definitely posses the raw talents and skills to become one.

It is also true that new hires coming from programming competitions are typically fresh grads out of university or with just few years of experience (or maybe an internship). This could be one of the reasons for negative correlations mentioned by Peter Norvig. I don't know much details about his research.

But there aren't too many places where you can get a very relevant background to work in Search Quality anyway. As a team lead, I'd be happy to hire a less experienced contest winner, teach him and help to develop into a star performer. And there are many successful examples (some of them were mentioned in this thread couple of times already ;)

BTW, if you are interested in joining one of our teams in Mountain View or in Zurich, send me a note.

  • »
    »
    10 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +18 Проголосовать: не нравится

    I need to say that I'm a bit overwhelmed with the number of replies :)

    And apparently not only me, as I'm hitting all sorts of constrains in the Codeforces system for the number of messages per hour and per day.

    So I'm sorry I cannot reply to all of you right away. Codeforces does not seem like the right platform for this types of discussions, so I suggest everyone interested to contact me via LinkedIn (you can easily find my profile there using a search engine of your choice :)

»
10 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Show collected data and show methods of the research, and we will make our own conclusions.

»
10 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I also saw this news in Chinese version.

I think algorithm can separate talented coders and poor coders.

Maybe samples are not enough: )

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I have to say that their claim might be reasonable.

For example, one nasty habit that many competitive programmers have is overusing Ctrl+C/Ctrl+V principle. In competitive programming you want to finish your solutions ASAP, so you might just copy a block of code that handles event X, paste it, make minor changes, and now it can handle Y. You can do this really fast, and it doesn't require extensive thinking. On the other hand, in the "real world" it might be better to create one function that can handle both X and Y depending on input. You have to keep an eye for easy refactoring opportunities.

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Another things that differ much: variables/functions naming, copy-pasting templates instead of including, crazy macros, static/dynamic memory allocation, checking input constraints, not to mention knowledge of different languages (Java/C++ are not the best choice for everything).

    Sport programming is more about problem solving and algorithms, than about software development. But of course nothing prevents a person to be good at both things except time and personal preferences.

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится +3 Проголосовать: не нравится

      That's true, but it's pretty easy to keep track of things like not using macros and naming your variables properly (I haven't seen competitive programmers having trouble with that). IMHO it's the general way of writing code that can be harder to change.

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится +36 Проголосовать: не нравится

    For example, one nasty habit that many competitive programmers have is overusing Ctrl+C/Ctrl+V principle.

    Are there really so many coders using Ctrl+C/Ctrl+V ? In the sample of coders whose coding style I know, there are 0 coders who use Ctrl+C/Ctrl+V and 1 coder who never uses it.

    At first I used to copy-paste a lot, but soon I learned that it almost never pays off, not even in competitive programming. In fact, my habit of not copy-pasting has became so strong, that I'd rather write exactly same code twice or cut-paste-paste just to avoid copy-pasting.

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится +34 Проголосовать: не нравится

      I once encountered an easy DP task in CF round where we were given a grid and had to compute sth easy from all 4 corners. I thought about this for a while and managed to write one code for handling all 4 cases. After the contest I was pretty proud of myself that I managed to do this without any copy-paste and thought "Probably all top contestants did this the same way". Then I looked through solutions of that problem of TOP 10 from that contest and ALL solutions contained the same code pasted 4 times with minor changes!

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится +97 Проголосовать: не нравится

I'll add few things (probably mentioned by others):

By being good in competitive programming, you show that you're very good in a field that tests some rather narrow skills. It doesn't show much of anything else. If Google has the data that shows negative correlation between competitive programming and performance at their jobs, this doesn't necessarily mean that they're poor workers, it can also mean that those people got wrong job. In fact, Google is well-known for hiring smart and overqualified people to perform mundane tasks (because well, someone has to do it). People doing programming contests, usually like to be challenged. And then, nine-to-five reality gets them and they perform poorly.

Also in the same subject. Seriously, most of the people I know from the competitive programming community are not very good coders (slow, inconsistent style, very little knowledge outside of their field, unable to stay focused throughout longer periods of time, and the list can go much longer) but they often do excel in other areas. There are of course fields where having competitive programming background can be really valuable, but doing standard software development is not one of them.

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    Can you elaborate on the fields that competitive programmers might be good at? as standard software development is not one of them.

»
10 лет назад, # |
  Проголосовать: нравится -63 Проголосовать: не нравится

Your points 1 and 2 are absolutely hilarious. They are in no way specific to contests. Another point: Russia is the leading country in competitive programming but this success doesn't translate into real world success somehow.

»
10 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I really don't know how valuable of a comment I can make, but I think that competitive programming isn't the same as fully structured and systemic programming to be considered for the same conceptual plane.

I know a lot of programmers who are able to handle a difficult task with numerous variables declared only with a letter, or some who don't even intend the code. They may be great at contests, even the best, but I don't think I would let them manage something intense without checking their abilities first. These two subjects are not correlating at all, meaning that they mean almost nothing to each other. Competitive Programming is focused on getting the code done fast while Office Programming focuses more on getting the job done right.

(Yes, there are exceptions for programmers who are good at both of these, keyword: exceptions)

  • »
    »
    10 лет назад, # ^ |
    Rev. 4   Проголосовать: нравится +6 Проголосовать: не нравится

    What surprised me about that article is that being good CP correlates negatively with being good on the job.

    If your main point is the two are independent, I can agree with that.

    Though, I still think that many good quality for good software developer (and not limited to soft dev, since on the topic is Google — which also have researchers): ability to quickly learn new things, ability to handle complexity, and write efficient and correct code. Probably the bad side effect of CP balanced it out?

    • »
      »
      »
      10 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится +72 Проголосовать: не нравится

      Well the thing is that that article's title takes the prize of "misleading title of the year" big time.

      The title says "being good in CP correlates negatively with being good at the job", whereas Peter Norvig says something entirely different, v.i.z. "being good in CP correlates positively, but provided you've been hired by Google, it correlates negatively with being good at the job" (and even this conclusion was based on a flawed study, see Ruberik's comment).

      Although the conclusion is (allegedly) drawn from a badly flawed study, I kind of could imagine it being true. As people have previously pointed out, to get hired by Google without any CP experience is quite impressive, and would suggest that you're really smart (and would probably also do well in CP should you try it). Also I'd imagine that people getting hired by Google without any CP experience, often get hired for a specific position e.g. Image Processing and thus possess specific knowledge in that field. Whereas CP people get hired solely for being smart and not for any specific position in particular, since they can pick up and learn stuff pretty quickly, and thus be put on basically any project. But someone who's smart and interested in Image Processing will obviously do better at an Image Processing job than a random GCJ Top 100 fellow.

      If there would be a negative correlation. Then that would mean that a random sample team of 10 from the whole pool of programmers would outperform a random sample team of 10 from the Code Jam Top 100. I mean, there is no chance that that is going to happen ever. Especially considering there are a bunch of tasks that the former group wouldn't even be capable of solving (within reasonable time), but even if it's a task like "create some PHP site" the GCJ top 100 group would most definitely "win" (provided you tell them that they're in a hypothetical competition :P).

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится +11 Проголосовать: не нравится

    According to you "Competitive Programming is focused on getting the code done fast while Office Programming focuses more on getting the job done right." I don't think competitive programming accepts any code which fails even a single test case.So, in that sense,Competitive Programming is focused on getting the code done fast and correct.

»
10 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится
»
10 лет назад, # |
Rev. 3   Проголосовать: нравится -8 Проголосовать: не нравится

what would be Petr's rating in job then... minus infinity ?!!! ;) just because he is so good in competitive programming.. I don't believe that's correct thinking

»
10 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

i don't think so i think its a positive thing for our living and working sometimes we keeping habits while we solve problem in work which we insist from start program,but everyone in competition wants to win,wants to fight! don't company want workers like this? we love,wo do . we hate it so we dont care it.

»
10 лет назад, # |
  Проголосовать: нравится +43 Проголосовать: не нравится

Why do you all care about having a job at all?

  • »
    »
    10 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +50 Проголосовать: не нравится

    well, you see, like everyone else programmers are humans and humans have to eat and in order to eat you have to pay, and so you need a job to earn money so you can pay for your food I guess.(this was just a sample)

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится +49 Проголосовать: не нравится

      You are right, I was a bit wrong explaining myself. I mean that eventually everyone will get a job, but why do people here care about having a job as if it is the biggest and the most important thing one can have in his entire life.

      • »
        »
        »
        »
        10 лет назад, # ^ |
          Проголосовать: нравится +17 Проголосовать: не нравится

        maybe because this blog is about job? :)

        • »
          »
          »
          »
          »
          10 лет назад, # ^ |
            Проголосовать: нравится +40 Проголосовать: не нравится

          For "Being good competitive programmer correlates negatively with being good on the job" my reaction was like "Ok, I'm so worried...wow, much stress." And a lot of people go like "No! I am good employee! Google, please, regret everything that is written in the article.". So I believe that this is wrong attitude to the thing called job, which is this blog about.

      • »
        »
        »
        »
        10 лет назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        > people here care about having a job as if it is the biggest and the most important thing one can have in his entire life

        It surely isn't, but an average employee spends about of 40 hours per week at job, so it better be something meaningful. In the end, we all have some finite amount of time to live, and we have to trade some of that time for money to keep living. Obviously, you want to use your time as efficiently as possible.

        • »
          »
          »
          »
          »
          10 лет назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          I think that if you really want to do something significant then you will do it at work, at home, at night — wherever and whenever it is possible; otherwise you won't.

          Thank you for your point of view. I think we're going pretty far from programming contests and the initial topic :)

          • »
            »
            »
            »
            »
            »
            10 лет назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            I believe, some things are not that easy to do without much of funding / collaboration.

            If you want to colonize Mars, or solve Artificial Intelligence, for example, I doubt you can do it without a relevant job.

            • »
              »
              »
              »
              »
              »
              »
              10 лет назад, # ^ |
                Проголосовать: нравится +8 Проголосовать: не нравится

              Then no article about correlation of employee skills will stop you from colonizing Mars, that's my point :)

»
10 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

Very nice example of how you can turn a statistical result into deceiving statement :-)

But what I cannot agree with is that rationalisation of result. I think to be really goot at competitions you must be sure things are right. Otherwies you spend more time debugging.

Arrogance should only affect interpersonal relationships, performance at job should not be affected. So it can possibly add another bias if opinion of coworkes is taken.

I belive it is all just bias.

»
10 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Well, I guess if someone spent their time working/contributing to opensource while I was taking part in contests it makes sence that this person is more skilled and expected to be better in terms of professional programming. But I really doubt that there are a lot of people who can start doing that successfully by themselves. Competitive programming is extremely good in a sence that it can be your entry point to real-world programming. Here at least you have a pretty good community who shares knowledge and tries to help each other. So profit here is more socialwise, than skillwise. Also it's fun and rare t-shirts.

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I have many friends who loves programing.And we have fun together.

»
10 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

So it's #298 the last round ever? Just kidding, but seriously being well versed and using part (if not all) of your free time to keep practicing/learning/competing is suddenly not worthy anymore?

The problem becomes bad when you cannot understand the differences between toy code (for contests) and production code (which should be bulletproof right? is not anyways, but it should be).

That's just my two cents.

»
10 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

My experience of contest programming ... For me competitive programming helps to develop ability to read other programmers solution which I think can be very difficult to learn from book .
Also contest programming provides platform for people to improve at there own learning pace at algorithms , implementation and also I feel it doesn't require great deal of knowledge to start you can start from baby steps and follow your own journey.
I think any kind of experience of cp will have positive effect and will improve ability to code . Both cp and real world problem want correct solution and getting correct answer in every testcase is very important lesson i learned from cp the day I started .
In the end cp it is not the single metric of good or bad to judge programmers but cp as a tool , platform ,experience is one of a kind that only computer science has and I really enjoy it.
I feel being (great or worse) at something is never will be the reason you will be bad at another thing.

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I'm the worst worker ever. Several attempts to start working failed because I just dont like to work. The only work I love is to make video games with the team I assembled :)

»
9 лет назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

A funny viral tweet on this topic (hiring at Google and algorithmic questions): https://twitter.com/mxcl/status/608682016205344768