Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. What’s wrong with “Race condition” in India?

What’s wrong with “Race condition” in India?

Scheduled Pinned Locked Moved The Lounge
question
58 Posts 33 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Marc Clifton

    Actually, to answer your question more seriously, a race condition is much more a hardware term than a software one. More here.[^] The equivalent of a race condition in software is not a deadlock but rather the reading/writing of the same data by two different threads. Locking is an attempt to prevent race conditions, and deadlocks are the result of improper locking. So, unless someone has some hardware experience, I'm not surprised that they wouldn't know the term "race condition". Marc

    Thyme In The Country Interacx My Blog

    C Offline
    C Offline
    Chris Losinger
    wrote on last edited by
    #21

    "race condition" is used quite often in discussions of multithreading[^].

    image processing toolkits | batch image processing

    1 Reply Last reply
    0
    • M Marc Clifton

      Actually, to answer your question more seriously, a race condition is much more a hardware term than a software one. More here.[^] The equivalent of a race condition in software is not a deadlock but rather the reading/writing of the same data by two different threads. Locking is an attempt to prevent race conditions, and deadlocks are the result of improper locking. So, unless someone has some hardware experience, I'm not surprised that they wouldn't know the term "race condition". Marc

      Thyme In The Country Interacx My Blog

      A Offline
      A Offline
      Andy Brummer
      wrote on last edited by
      #22

      In almost all the introductions to multithreaded programming I've seen, they start with the race condition and then introduce critical sections, mutexes or semaphores as a way to prevent race conditions. If they claim to know about threads and don't know the term race condition they probably have just heard something like wrap shared data accesses in a lock statement, and don't have the proper theoretical background.


      I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

      M 1 Reply Last reply
      0
      • A Andy Brummer

        In almost all the introductions to multithreaded programming I've seen, they start with the race condition and then introduce critical sections, mutexes or semaphores as a way to prevent race conditions. If they claim to know about threads and don't know the term race condition they probably have just heard something like wrap shared data accesses in a lock statement, and don't have the proper theoretical background.


        I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

        M Offline
        M Offline
        Marc Clifton
        wrote on last edited by
        #23

        Andy Brummer wrote:

        don't have the proper theoretical background.

        I would say that's a given pretty much nowadays. Marc

        Thyme In The Country Interacx My Blog

        1 Reply Last reply
        0
        • I Ilia Blank

          To all developers from India We are interviewing candidates for programming position in Hyderabad India. None of them is able to answer question "What is Race Condition". Can it be that you are using different term in India? Regards

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #24

          Nothing. If a candidate (Indian or otherwise) isn't able to answer the question, I would be inclined to believe they haven't done much multi-threaded programming. /ravi

          My new year resolution: 2048 x 1536 Home | Music | Articles | Freeware ravib(at)ravib(dot)com

          N 1 Reply Last reply
          0
          • R Ravi Bhavnani

            Nothing. If a candidate (Indian or otherwise) isn't able to answer the question, I would be inclined to believe they haven't done much multi-threaded programming. /ravi

            My new year resolution: 2048 x 1536 Home | Music | Articles | Freeware ravib(at)ravib(dot)com

            N Offline
            N Offline
            Nish Nishant
            wrote on last edited by
            #25

            Ravi Bhavnani wrote:

            Nothing. If a candidate (Indian or otherwise) isn't able to answer the question, I would be inclined to believe they haven't done much multi-threaded programming.

            I wonder if the OP's company is actually looking for a programmer to do some multithreading work. If not, it's a waste of time checking the candidate's abilities in areas he's not going to work on. Not having written multithreaded code does not automatically imply that a developer will be useless to a company. How many people write solid multi-threaded code anyway?

            Regards, Nish


            Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
            My latest book : C++/CLI in Action / Amazon.com link

            S R M 3 Replies Last reply
            0
            • N Nish Nishant

              I'd be surprised if a decent candidate hasn't heard of the term. My best guess is that the candidates did not get your accent. Sometimes Indians find it hard to understand a foreign accent, specially if the foreigner himself is not himself or herself a native English speaker. Although it might sound a little like you are being condescending, perhaps you could have tried spelling the words out. If the candidate is insulted, the good thing is that he's on the other side of the planet from you - so not much awkwardness there I guess. Of course, you might just have been interviewing the wrong candidates. If they are unemployed and are more than a month out of college/school, chances are good that they aren't very smart. in my opinion, the trick to hiring quality people in India is to hire people who already work for reputed companies. As my boss likes to say often, a lot of Indian programmers have "Indian programmer syndrome" and he does not mean that in a nice way either. You gotta find Indians who don't have IPS. They are out there, but they are hard to find.

              Regards, Nish


              Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
              My latest book : C++/CLI in Action / Amazon.com link

              H Offline
              H Offline
              Hellacious
              wrote on last edited by
              #26

              In a reverse example of this, I was interviewed in Australia by an Indian gentleman working for an IT company. I failed the interview because I could barely understand a word he said, and he took offense when I asked him politely to repeat several questions. Apparently I am responsible for understanding my workmates even if they have accents as thick as a persian rug. No racism intended, just an observation that accents can make communication very difficult from both sides of the equation. More on topic tho, I am only halfway through my degree and our very first programming subject included an explanation of 'race conditions' so I fail to see how a graduate could not know of them.

              1 Reply Last reply
              0
              • N Nish Nishant

                Ravi Bhavnani wrote:

                Nothing. If a candidate (Indian or otherwise) isn't able to answer the question, I would be inclined to believe they haven't done much multi-threaded programming.

                I wonder if the OP's company is actually looking for a programmer to do some multithreading work. If not, it's a waste of time checking the candidate's abilities in areas he's not going to work on. Not having written multithreaded code does not automatically imply that a developer will be useless to a company. How many people write solid multi-threaded code anyway?

                Regards, Nish


                Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                My latest book : C++/CLI in Action / Amazon.com link

                S Offline
                S Offline
                Shog9 0
                wrote on last edited by
                #27

                Nishant Sivakumar wrote:

                How many people write solid multi-threaded code anyway?

                Fixed that for ya... ;)

                M 1 Reply Last reply
                0
                • I Ilia Blank

                  To all developers from India We are interviewing candidates for programming position in Hyderabad India. None of them is able to answer question "What is Race Condition". Can it be that you are using different term in India? Regards

                  U Offline
                  U Offline
                  User 3895121
                  wrote on last edited by
                  #28

                  No it is the same term ;-) ... Same computer science texts are taught here(ORA, AWL, Prentice Hall etc). When I get interviewed, sometimes I mention "Active Objects" and very few people seem to know... Almost everyone seems to know "Producer/Consumer". But again if I give the unix pipeline as a producer/consumer they don't seem to like it ;-) Sometimes I am asked about Regular Expressions... Then if I mention globbing again you get a kind of vacant stare. Every interviewer I met, know atomicity - and what a mutex is. But going a step further and telling them about CORRECT MEMORY VISIBILITY ( and Double Checked Locking Pattern ), it is news to them... --- atul

                  -- cheerio atul ~> perl -lpe 's:\s+::g' <( paste -s <(sed '1!G;h;$!d' <(echo 'moc. ac@ tohk . luta') | rev) )

                  1 Reply Last reply
                  0
                  • N Nish Nishant

                    Marc Clifton wrote:

                    Interesting! But she must also be good.

                    Academically, she was good. But she wasn't all that much into programming. The company she joined offered a 2 month training to all their new employees. So they weren't expected to have real world experience. The candidates are just expected to have decent learning abilities. A side effect of this abundance of jobs is that even kids who are not remotely interested in pursuing a computer related career are still strongly pushed into doing computer science courses by their parents and other near ones.

                    Regards, Nish


                    Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                    My latest book : C++/CLI in Action / Amazon.com link

                    P Offline
                    P Offline
                    Pawel Krakowiak
                    wrote on last edited by
                    #29

                    Nishant Sivakumar wrote:

                    A side effect of this abundance of jobs is that even kids who are not remotely interested in pursuing a computer related career are still strongly pushed into doing computer science courses by their parents and other near ones.

                    Weird... I thought parents wanted you to become lawyers or doctors. ;)

                    Kind regards, Pawel Krakowiak Miraculum Software[^]

                    M 1 Reply Last reply
                    0
                    • P Pawel Krakowiak

                      Nishant Sivakumar wrote:

                      A side effect of this abundance of jobs is that even kids who are not remotely interested in pursuing a computer related career are still strongly pushed into doing computer science courses by their parents and other near ones.

                      Weird... I thought parents wanted you to become lawyers or doctors. ;)

                      Kind regards, Pawel Krakowiak Miraculum Software[^]

                      M Offline
                      M Offline
                      Mustafa Ismail Mustafa
                      wrote on last edited by
                      #30

                      Pawel Krakowiak wrote:

                      I thought parents wanted you to become lawyers or doctors.

                      My mother tried so hard with me, she wanted me to be more like all 3 of her brothers who are all Surgeons. I take after my dad's side of the family, the Engineers :-\

                      "Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Coo

                      1 Reply Last reply
                      0
                      • S Shog9 0

                        Nishant Sivakumar wrote:

                        How many people write solid multi-threaded code anyway?

                        Fixed that for ya... ;)

                        M Offline
                        M Offline
                        Mustafa Ismail Mustafa
                        wrote on last edited by
                        #31

                        Thank you, you've hit that nail hard on the head. Its becoming increasingly difficult finding graduates and some people with a year or two of experience under their belt that actually know how to code properly.

                        "Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Coo

                        1 Reply Last reply
                        0
                        • I Ilia Blank

                          To all developers from India We are interviewing candidates for programming position in Hyderabad India. None of them is able to answer question "What is Race Condition". Can it be that you are using different term in India? Regards

                          A Offline
                          A Offline
                          Alterlife
                          wrote on last edited by
                          #32

                          To answer your question as it is written: we _do_ use the same term in India. The reason why your interview candidates are not able to respond is because this term isn\'t taught in college. Personally, I think it not important to know this term in order to be a good programmer (especially not with the chutku work that gets shipped to India). This term takes less than a minute to understand, and any programmer who has written a simple multi threaded application has thought through a related problem at some point. My 0.02 INR: I think your intention in asking this question is to figure out if your candidate is familiar with (or can anticipate) problems that can creep into a 'complicated' app. If your candidate does not understand 'race condition', Explain the concept and ask your candidate to respond with an example where this would be a problem in a program.

                          1 Reply Last reply
                          0
                          • I Ilia Blank

                            To all developers from India We are interviewing candidates for programming position in Hyderabad India. None of them is able to answer question "What is Race Condition". Can it be that you are using different term in India? Regards

                            M Offline
                            M Offline
                            Member 4123649
                            wrote on last edited by
                            #33

                            No we use the same term here also. A race condition occurs when multiple processes access and manipulate the same data concurrently, and the outcome of the execution depends on the particular order in which the access takes place. A race condition is of interest to a hacker when the race condition can be utilized to gain privileged system access.

                            1 Reply Last reply
                            0
                            • M Marc Clifton

                              Ilia Blank wrote:

                              Can it be that you are using different term in India?

                              Hillary vs. Obama? If they fail the "what is a race condition", ask them "what is SEX?" My answer would be "Security Enabled XML". Marc

                              Thyme In The Country Interacx My Blog

                              V Offline
                              V Offline
                              Vasudevan Deepak Kumar
                              wrote on last edited by
                              #34

                              Marc Clifton wrote:

                              "what is SEX?" My answer would be "Security Enabled XML".

                              Simply Superb; Innovative Novel and Hilarious. :) :)

                              Vasudevan Deepak Kumar Personal Homepage
                              Tech Gossips
                              A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                              1 Reply Last reply
                              0
                              • R Rama Krishna Vavilala

                                Ilia Blank wrote:

                                Can it be that you are using different term in India?

                                Yes it's called "Caste Problem?".

                                You have, what I would term, a very formal turn of phrase not seen in these isles since the old King passed from this world to the next. martin_hughes on VDK

                                V Offline
                                V Offline
                                Vasudevan Deepak Kumar
                                wrote on last edited by
                                #35

                                Rama Krishna Vavilala wrote:

                                e

                                It is just one e which makes the difference between the two islands of information. Just one e to strike the difference in the e-Age.

                                Vasudevan Deepak Kumar Personal Homepage
                                Tech Gossips
                                A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                                1 Reply Last reply
                                0
                                • C Colin Angus Mackay

                                  Ilia Blank wrote:

                                  None of them is able to answer question "What is Race Condition". Can it be that you are using different term in India?

                                  I found that you had to use a few different synonyms to ensure that candidates understand you. For example I would ask questions about "Encapsulation, sometimes referred to as Information Hiding" I'm not sure what synonyms there are for a "race condition". Perhaps if you introduced it as "In the context of a multi-threaded process or application, what is a race condition?" it might give them enough of a hint as to what you are after.

                                  Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * The Value of Smaller Methods * Creating Many-to-Many joins My website | blog

                                  P Offline
                                  P Offline
                                  peterchen
                                  wrote on last edited by
                                  #36

                                  Yep. If someone would stare at me blankly after that, I'd aks "You did multi-threaded programming before?" and if affirmative, "What new problems arise with multi-threaded programming?"

                                  We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                                  blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    Actually, to answer your question more seriously, a race condition is much more a hardware term than a software one. More here.[^] The equivalent of a race condition in software is not a deadlock but rather the reading/writing of the same data by two different threads. Locking is an attempt to prevent race conditions, and deadlocks are the result of improper locking. So, unless someone has some hardware experience, I'm not surprised that they wouldn't know the term "race condition". Marc

                                    Thyme In The Country Interacx My Blog

                                    P Offline
                                    P Offline
                                    peterchen
                                    wrote on last edited by
                                    #37

                                    I've seen "race condition" used commonly and frequently for the software equivalent. And asking "What problem is reading/writing of the same data by two different threads?" doesn't make a good interview question.

                                    We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
                                    blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist

                                    1 Reply Last reply
                                    0
                                    • I Ilia Blank

                                      ??

                                      V Offline
                                      V Offline
                                      Vasudevan Deepak Kumar
                                      wrote on last edited by
                                      #38

                                      He was meaning the Apartheid, perhaps.

                                      Vasudevan Deepak Kumar Personal Homepage
                                      Tech Gossips
                                      A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                                      1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        Ilia Blank wrote:

                                        Can it be that you are using different term in India?

                                        Hillary vs. Obama? If they fail the "what is a race condition", ask them "what is SEX?" My answer would be "Security Enabled XML". Marc

                                        Thyme In The Country Interacx My Blog

                                        R Offline
                                        R Offline
                                        RogelioP EX DE HL
                                        wrote on last edited by
                                        #39

                                        > ask them "what is SEX? Well, be careful what you ask for, someone might have a long enough... TENURE... to know that SEX is a valid mnemonic for a Sign EXtended operation, an official instruction in the Motorola 6809 uP repertoire. Other platforms tried to push for 'SEX' on their instructions lists but efforts were stopped before the stuff got out of the lab.

                                        1 Reply Last reply
                                        0
                                        • I Ilia Blank

                                          To all developers from India We are interviewing candidates for programming position in Hyderabad India. None of them is able to answer question "What is Race Condition". Can it be that you are using different term in India? Regards

                                          D Offline
                                          D Offline
                                          Dwayne J Baldwin
                                          wrote on last edited by
                                          #40

                                          With multiple threads a race condition can occur when two threads are attempting to access the same data. Which one "wins" the race is extremely difficult to test or debug. In .net for example, the last iteration of a worker starts a race between exiting the worker and being cancelled by the owner thread. If the worker wins before setting cancel the owner will not know the thread was cancelled. // bad code if BackgroundWorker.CancellationPending DoWorkEventArgs.cancel // reason for quitting worker endif // race start ...do more work/recursive // race end return result // owner never informed of cancel (race condition) //good code if BackgroudWorker.CancellationPending DoWorkEventARgs.Cancel // either cancel or do more work else ...do more work/recursive // ensures final check with no race condition) end if return result // either cancel handled or thread exited normally

                                          Dwayne J. Baldwin

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups