Saturday, September 14, 2013

vexorian answers quora questions

So, there are a couple of fun things about quora, one is that it keeps plaguing my search results. The other is that when I tried participating in it, I got banned because it wouldn't allow me to use a nick name. Seriously, I am my nick name. I stopped being my real name a long time ago. Anyway, I've found some questions that I cannot help but to answer. There we go, in no particular order:

Why don't more women participate in programming contests?

Computer science is already male-dominated, but programming contests are even more so (e.g. I counted only a handful of female contests at the 2013 ICPC). Why?

This question is asked on many fields and it is always the wrong way to approach the problem.

  • What you asked: Why don't more women participate in X

  • What you intended to ask: Why is X male-dominated?

  • What you should ask: What is X doing (or failing to do) that drives interested women away?

Once approached from the right perspective, it is a very good question. And I have asked it myself too. My theory: Programming is sadly male-dominated in the first place. The reasons for that are varied and tend to have a lot to do with the bro culture. Programming contests are a super-ultra-niche of programming , and thus it has reduced participation to begin with. If you take a small percentage of programmers, it is more likely the first bunch will be 100% male. And when a group is already male-dominated it becomes very hard to change it. Because there is already an outstanding male majority, there are no guarantees that this world is going to be safe and comfortable for non-males.

How to change it? Well, I don't know. But maybe if the gender problem is solved in programming as a whole, then competitive programming will improve its chances too. Check out the Ada initiative. Although the Ada initiative makes me notice, maybe we need codes of conduct in on site competitions?

Let me clarify: Any answer that involves stories about how men are different to women. How men are supposedly more competitive and thus more likely to enjoy competitive programming is utter BS. The only known difference between male and female brain is that males tend to have bigger brains, and this has not been provenly linked to any difference in behavior, capacity, or skills.

What it is like to meet or know Petr Mitrichev?

So, last year I went to the TopCoder Open. It was a very confusing experience. Also, I really had no idea what to blog during it. I was supposed to blog during it to justify they paying my travel expenses. But that was the point in which I noticed I am terrible at programming competitions, or rather terrible in Programming Finals. The problems that those guys were solving were all very difficult and I had no idea where to approach them.

I did my best to improvise whatever blog post I could. So I took my netbook and went to some of the couches in the TopCoder Open arena (A place similar to paradise, because it had all sorts of free snacks and soda). While I was typing in the TCO wordpress thingy. I noticed the guy next to me was writing in blogspot. Then I noticed he was writing in Petr's blog. A seconds later, I noticed he was Petr. Which was strange, because from pictures I didn't recognize him at all. At that point I really had no idea what to do. So I pretended like it was not happening. I already had enough trouble trying to fake a blog post. The whole thing was so embarrassing that I never tried to introduce myself.

So my answer is: Maybe you already met Petr. Maybe we all did. Maybe he wanders all over the world and shares sits with random people/coders.

Does having a very low TopCoder rating make someone unemployable?

Nah. I think that if you are someone active in TopCoder then you are already in the top 10% in traditional algorithm skills. (Note that it is a one way conditional, many people in the 10% , specially women, don't participate in TopCoder.

But of course, you can have a high rating and be unemployable. You can have a mediocre rating, like mine and be unemployable. You can also have green topcoder rating, like Mark Zuckerberg and be an evil CEO.

How do programming contest problem setters make test cases ?

In various ways. I just make a python script that takes various parameters (constraints for the input) and then generates a random one. Some problems need some sophisticated generation algorithms that are by itself an interesting algorithm problem (or more interesting?). Then I run the program and generate 5s, 10s or 20s of tests following a spec. Change the spec to cover another area of tests, generate other 10s of tests.

It is also needed to make some manual cases. That probably needs you to know what (wrong) solutions to expect from coders. Each problem is a different story.

What are the good ways to switch between C++ and Java in programming contests?

Don't. You will hardly have many opportunities to use c++ in your life. Java on the other hand, will most likely be forced on you eventually.

Do red coders and targets read the full question in a SRM?

No, they read the first two lines and then guess the rest of the statement*.

* Seriously, high level coders are not superhuman, they need to read the statement just like anybody else.

Which format of online programming contest i should participate more if eventually i want to get placed at companies like GOOGLE and FB?(long or short)

Why would people limit their career future to two companies? But if that was my life objective, I would actually dedicate myself to make commits, tons of commits to open source projects. Get involved in Summer of Code and stuff. Programming contests are a messy gate for these things in my opinion.

Why do most people on TopCoder use C++ as their default language?

Same question can be extrapolated to just about all contests for traditional algorithms.

People will bring excuses like familiarity, or how few sites support other languages. Etc.

But what if c++ is just the best language for this? It is fast, the STL seems to have been designed specifically for algorithm contests, things that are usually a c++ weakness (like threading support) are usually not allowed in programming contests anyway, etc.

Is PHP a good language to solve problems of spoj,codechef and topcoder?

PHP is never a good language.

Is it disadvantageous to use python on TopCoder over other languages?

Hmnn, I answered this in a long blog post. Short answer: Against c++, it is a mixed bag, the expressive power is great, but the performance cost really bytes. Against other languages, it is better :)

How do I go from blue to yellow on Top coder?

Solve the division 1 easy problem in 95% of the matches you participate in. Do not challenge any solution. Even if it is totally wrong.

It takes me hours to completely understand solutions to 1000-pt problems on TopCoder. Should I get discouraged?

You are obviously talking about div1 hard problems. If so, don't worry. Here is a little problem setter secret: The only reason we add div1 hard problems is so that the very, very, very high level coders don't get bored. For 99% of the coders, they don't cause any difference in the competition. I wouldn't even bother opening them if I didn't get paid to write editorials.

By doing practice can one be a red/yellow coder inspite of not being that intelligent?

Over the years I have learned a key insight: Nobody is that intelligent. Intrinsic skills are really worthless. Hard work is more important. People like Petr started solving Math puzzles at age 11 and have not stopped since. It has nothing to do with intrinsic intelligence.

The whole tale of there being programming geniuses does not seem to agree with reality. And it is also a dangerous tale. The idea of intrinsic intelligence is not founded in science and tends to support awful ideas like eugenics. My tip is don't fall for this. It is a useless belief. If you are good at something, it limits the effort you put into it , because you believe you are just good. If you are bad at something, it makes you give up. This belief is useless and only stops people from improving.

---

Have more questions?

3 comments :

x said...

>The idea of intrinsic intelligence is not founded in science

http://en.wikipedia.org/wiki/G_factor_(psychometrics)

vexorian said...

http://freethoughtblogs.com/lousycanuck/2012/12/19/iq-test-exposes-the-myth-that-is-g/

PRAVEEN DHINWA said...

I am in love with your answers :). Precise and to the point