And the winner is...
So, who does he work for?!
The sliding glass doors at the entrance of Facebook headquarters don't say Facebook. They say HACK – in big, bold, black letters, two on each door. The company goes out of its way to cultivate an extreme developer culture built around the non-pejorative definition of the word. "There's this whole definition that engineers have …
is not so much that they want solutions to these abstract problems (they're abstract, the solution is pointless-ish) more that they have decided that an abstract and open problem is more the best way of sifting their wheat from the chaff.
Or flipping it, you'd wonder why they're not asking applicants to solve an actual problem the company actually has.
...(usually) the actual problem is a lot more complicated than a simple /the safest place in the given cube is x, y, z/.
i see your point and totally agree with you. these contests are largely pointless. it's just that the companies don't know how to specify the problem they have (which is part of the problem!) and so opt for simpler options, like asking questions from a college math book...
i totally hate being asked these sort of questions in the interviews. whenever i get one, i'd do my best to answer, but then *always* end up interviews asking them "how do these questions relate to you daily job?". fun to see them struggle with the answers... :)
Perhaps it's because most coders generally work in one narrow business area, and because they're working to functional specifications. Giving them anything but an abstract problem to solve would give an unfair [dis]advantage to some because of their past experience - you need to give them a level playing field since it's a competition, not a position at Facebook.
I consider myself a pretty clever coder, but could not even begin to understand how to approach any but the remote bomb problem.
A person capable of solving these may or may not be the best fit for writing a payroll or accounting program but he has a very capable mind and, as a coder, I respect that.
These guys are "the level above". I don't know if I would want to be working through these problems for fun, even if I had the brains for it. But I can totally respect skill and talent and it would not occur to me to confuse this type of contest with an interview or job related question. If I was interviewing this guy for work, I'd make damn sure his skill set did include something more relevant to ERP and SQL programming (my particular cross to bear) than bomb avoidance prioritization algos.
"It's almost more of a math contest than a programming contest"
Sounds about right. It's rare in the UK to have a maths teacher who actually knows anything about maths, and even rarer for the selfish ungrateful shits in his care to shut up and let him speak. Or her, I suppose, as all male teachers are paedophiles now.
It's bizarre to see so many people in the UK who are literally proud of their inability to do simple mental arithmetic. And then we sit around bitching, wondering why all the good jobs are in other countries. Aside from the good jobs in the UK that are all staffed by foreigners.
Of course we can giggle and act childish; “I don’t need your maths, I have a calculator!” But do you know what to type into it? Behold the deafening silence...
Wonder why we need to have such an unwieldy public sector full to the brim with mental defectives doing ‘highly important’ ‘jobs’ that no one fucking needed done in the first place. Paperclip Coordinator on £50k a year anyone? Every council has two.
It is of the highest importance that we make schooling appear “fun” (as opposed to actually useful). So the kids can spend their time listening to the ground-breaking social commentary of N Dubz and asking themselves “how does this make me feel?” (feelings are of the highest importance!) and all of this will count towards their ‘Holistic Philosophy BTEC’ (worth ten million A grades at GCSE dontcha know) but never will they be expected or required to exercise their cognitive faculties.
What’s cogaltive fackulty? Is that the new N Dubz song?
For irrefutable proof that our society has fucked itself, see following: http://www.youtube.com/watch?v=CsocXXe1KSw
“I don’t need your maths, I have a calculator!”
Standing in the garage, about to pay for petrol, pick up a choccy bar and can of coke, need a car wash too, no wax, but want to use the vacuum but only have some notes and cash in your pocket!
"Hang on while I get my phone out, start up the calculator app!"
I remember at being school, mid to late 80's, the entire class would have to mandatory mental arithmetic tests at least once a month. We'd be trooped off an empty room with just seats, desks and pencils. Not even allowed to bring your bags or coats into the test room to make sure you couldn't cheat.
I blame credit and debit cards killing cash, no need to add the costs up in your head to make sure you have enough, just plug-in your bank card and pay.
Being able to do arithmetic in your head or not does not imply someone is good at maths or not, true a good head for figures probably leans in favour of good maths skills. I'm not saying this applies to the op, but equation of arithmetic and maths by the average person is itself a good indication of general poor maths knowledge.
so I can't necessarily talk about this, but I think that in some ways you're right.
1) Making classes fun isn't a bad thing, but it's a misrepresentation of what's important, i.e. making classes engaging. The fact that some teachers/school boards think that in order to do that they have to do things in a 'fun' way just shows naivety. While I wouldn't say I'm a big 'reality TV' fan, Jamie's Dream School is actually quite an interesting look at how to get children engaged.
2) While I admire your preciseness in attacking the teaching of something, if the kids are ungrateful and uninterested, can you really blame those kids? I'd guess that either they've had incompetent teachers in the past or present, the classes just aren't good enough to keep them interested, or their parents just don't give enough of a shit about education to help them.
3) There are some stupid qualifications at school-level now, but some of those have arisen because of people like you complaining that kids don't respect society any more. Maybe I'm pigeon-holing you a bit, but you sound like that sort of angry person.
"To hack something means to build something very quickly. In one night, you can sit down and you can churn out a lot of code, and at the end, you have a product."
Interesting... I was always told that to hack is to certainly knock up something very quickly, but there is a gaping void between code that has been "hacked up" and a product ready for prime time... Although that probably explains some of the weird behaviour of Facebook, sorry "undocumented features"
It's all marketing.
Hackers don't exist. It's a marketing myth.
Whoever seriously believes that viruses get coded by hackers and not companies themselves so that then antivirus programs can be sold must be really naive.
The same goes for jailbreak firmwares for smartphones and consoles and so on and on. It's all viral marketing created by companies themselves (and yeah Sony with the PS3 it's just showing that their current managers are out of mind and don't know what to do anymore).
These contests are a silly marketing joke.
These people are not the smartest programmers in the world, they are just a companies marketing ploy.
Wake up people, real programmers are not these ones and hackers don't exist. The only real hackers are: 1) Real programmers paid companies employees paid to steal critical data info and projects from other companies; 2) Secret agencies/military spies
that the Apollo moon landings were actually filmed in a studio in Area 51, that wrapping a sheet of tinfoil over your head protects your brain from secret government mind-control rays, and that I saw Elvis in a retirement home in my town the other day. He's really getting on now you know.
and some of those questions took a while to read and understand what they're asking. They would be fun (only a mathematician would say this) to work out over time but I would definitely struggle to finish all of them in two hours, never mind just one of them. I'm an obsessive double-checker of what I've done and that just isn't suited to a 2 hour hackathon.
They would have made great questions for University :)
I myself wondered why he thought C++ was a fast language (dev time wise) to code in...
Having said that, I have to say development environment-wise, on windoze, VSC++ isn't a bad choice. It's quite easy to use and more of an aid than a hindrance. I suspect more than a few windoze guys used it.
@maccy: Your statement is concise but yet lacks meaning. Clearly aimed at flaming an argument or may be you just could not be bothered to illuminate others with WHY you can't do anything in JAVA. Do you know how to code in Java? If you do and STILL can't do anything in it then CAN you really code in Java? Such a statement is just BULL. Check the banking sector to see how much code is written in Java.
Now to the real point about comparing languages. Firstly it is like comparing apples and oranges. I say this because each language sets out to fulfil certain gaols.
In the case of C it was speed and the need to replace Assembly with something more natural to write, etc. This was followed by C++ to aim at high abstraction (hence object orientation etc.)
In the case of Java it was yet more abstraction and the need to remove some of the pitfalls of coding to make it more productive such as the removal of pointers (powerfull as they are, they are not needed with higher levels of abstration with the RAM capacity / CPU speed increases over time you can afford to be more abstract in code and lenient on resource usage).
Java, as the coder said, is harder to make a mistake in. It lacks confusing / error prone concepts like pointers and memory management while making other concepts easier to implements such as threading, exception handling and I/O. You can get the same results in Java as in C / C++ with a variation on time to code, time to debug / test, speed of execution, etc. So basically it depends on your problem. What do you need more execution speed or shorter time to market?
On the other hand, Java is not as capable when it comes to some concepts which other languages are fulfilling much more easilynow (such as Closure, Scala, et al.)
In summary, C / C++ will survive a long time and will remain the best launguages where resources are limited and execution speed is of the essence. Similarly Java will be around for a long time too suited to its problem domain.
All in all, I admire the analytical minds of these competitors. If anything they help encorage others to improve themselves. If what you need for a job is an analytical mind then these candidates have certainly highlighted themselves.
Just my 2 cents (or may be I just its $2 looking at the size of the post :) )
Try this:
public class Human {
public void setHumourLevel(int level) { ... }
}
public class JavaProgrammer extends Human {
...
}
JavaProgrammer KKaria = new JavaProgrammer();
// obviously not new as in novice.
KKaria.setHumourLevel(10)
Might help a little, though you could throw an out of range exception.
I read all the questions and stripped them of the "sci-fi" nature... and it seems to me that all three solutions can be easily applied to social networking.
Now why would FB be interested in computing solutions which help calculate relationships and degrees of separations? No wonder they were willing to pay $5000 to the person who came up with the best algorithm - that's cheap.
C is the language for those kind of problems, where the solution would mostly run inside L2 Cache of CPU. However, jIDEA is a nice IDE. Language is really not the deal-breaker here.
The OO paradigm is not essential as well.
The article author simply didn't care to distinguish between C and C++. These days, with CPUs getting much faster and so much memory available on desktops that most JVM fly, especially in tasks where problems are actually CPU intensive, not IO intensive.
For most part, the JVM overhead is negated by the algorithms selected. Even on Very Slow JVM implementation, O(n) algo is is going to outperform O(n^2) algo on ASM.
Mostly, the problems presented are relevant to social networking app like facebook.
Can you throw a party where you would like to have only real friends, not just people you friended ? This is exactly a thing that they do @ Facebook.
The guy is smart, to crack those in two hours...but has he left/done anything useful for humanity ?
I get my coat :)
This is surprising that none of these coders choose given all the web 2.0 talk these days. I guess when it really comes down to it, programmers in the know are going to chose the right language and platform for the Job.
I am also not surprised that this person choose Java for the reason given. I to have to code in a mixture of Java and python/php/ruby/javascript and I can tell you although more verbose, I make far less mistakes in Java than any of those other languages. I have even gone to using GWT for Ajax stuff to keep the strong typed nature of Java.
I didn't participate in this one hacker cup for personal issues. I am not by any measure comparable to the finalists in this room, as they tend to be the names you will often hear in programming tournaments (Read: google code jam, topcoder, ICPC, etc). I need to make some clarifications about issues brought in here. I do however write and design problems to be solved in competitions like this one I will remain anonymous because I am too lazy to make a whole account.
"Used c++ because of the tight time frame": If a problem is designed correctly. The language the programmer uses should not really be so important in comparison to the algorithm used. There are, however, times in which a very fast language may enable you to use a solution that would be much more slower in the slower language. In this case, I would say that all C, VB, C++ and Java are around close in this contest. Speed probably becomes an issue for you if you choose a more dynamic language, however, those languages can sometimes aid you in other regards. I for example, almost always use C++ but have in the past switched to python when there were big numbers.
The problems in this cup were all not open problems, but problems with solutions that are known by at least the problem setter (the guy who wrote the problems). Those problems are used because it is much easier to grade solutions in regards to solving them (just make it go through many tests and accept only solutions that give a correct answer for most. There are some contests that have open problems with no definite solution and the algorithms are graded by how comparably well the results fare in comparison to other solutions, but they are rarer cases and those are contests that you cannot have in 2 hours, but at least 8 or more.
I use c++ and generally jEdit for these contests. In reality, since they are algorithm-oriented you do not really need any RAD or complex stuff in your IDE and in my specific case they get in the way. I chose C++ not because of the speed (as I mentioned it generally does not matter that much, Petr, uses Java and sometimes C# and it does not stop him from winning most tournaments and contests). But because I am very comfortable using the STL after I managed to understand it. In these contests, you must pick the best tool for the job, but note that the "best tool" for the job is the language you are most comfortable with and the language you trust the most. In my case, I think C++ has simply more options in regards to support for making your own algorithms even though I would prefer Java for more serious projects, C++ is something I would prefer during a programming contest. I forgot to mention that a big factor in the language that makes you most comfortable is the sort of thing you see while learning programming and also the thing you have in the past used a lot in programming contests. Many languages are not well supported in Topcoder and the ACM ICPC, this means that most people that started at those platforms are more likely to stick to C(++) or Java.
Regarding Javascript, well, think about it, it is a powerful language, and I have used it plenty of times (enough to know it IS very powerful) but I cannot think of an implementation that allows you to use it as a executable command that takes files as input. I guess that's a good reason, there is just not a lot of people that know it can be done, and out of those who can, most prefer some other language.
Last time I checked, Petr (the champion) was working for Google. Somehow, i myself am not sure of what is the correlation between doing great in these contests, but apparently big companies like Google do care. Google specifically has been known for hiring a lot of the big names in contests. I must underline that I have been in the contest world for 5-6 years and it has only helped be become more impressed by Petr or Lou because, although I could be able to solve those problems, I would probably need a whole wee or 3 days if I get help from someone who knows the solution. These guys can do it in 1 hour and it is very impressive.
On a more dark note, this Facebook tournament was not very good in comparison to other contests and it is very disappointing. There were many issues with the system and with poor problemsetting. This is not to make the performance of the winners look worse, I know for sure that they all, specially the champion, are very good programmers.