back to article Ruskie Java coder lifts inaugural Facebook Hacker Cup

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 …

COMMENTS

This topic is closed for new posts.

Page:

This post has been deleted by a moderator

Happy

And the winner is...

So, who does he work for?!

0
0
Bronze badge

What I find interesting about these contests

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.

6
0
Anonymous Coward

because...

...(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... :)

2
0
Anonymous Coward

actual problems: no, actual facebook coders: no

What was the point of this again?

0
0
Happy

And the result!

Guess they think not employing you because your an awkward sod !

No offense intended.

1
0

@goldcd

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.

1
0
FAIL

And that perhaps explains why there were no UK entrants

Give the people who set the tasks some credit. They knew what they wanted. All we can come up with in the UK is "the question is wrong".

6
1

(untitled)

If they use a real problem, some of the contestants may already be familiar with it. A made up problem can be original, and hopefully equally unfamiliar to all.

4
0
Bronze badge
Happy

Disagree.

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.

0
0
Grenade

"It's harder to make a mistake in Java."

QFT.

But... Given the luxury of time, despite the extremely schizoid syntax that is C++, you can guess which I would rather pick. In my case, it just makes more sense. YMMV.

0
3

This post has been deleted by a moderator

Grenade

@AC...

Yes.

I take all your points. RTF post.

But like I said. C and C++ suit my situation and not *YOURS*.

YMMV.

0
2
Anonymous Coward

C++

If C++ is actually optimal for solving any programming problem, why does Boost exist and why does it steer the language towards meta-programming? Why not switch to Python and be done with it?

1
0

Re: Right

I'd say that the reasons you'd use C++ for things like this is that it's easier to just stuff data into structs etc. without having to create fully fledged classes. The challenge isn't so much the coding, but the thinking around the problem, so any language should be suitable. I guess at the end of the day it really comes down to whether you're more of the coder that makes mistakes while typing more (in which case I'd probably prefer C# because I like it more than Java and also because the last time I used iDEA it was slower than VS for intellisense etc.) or whether you want to be able to do things really sloppily that get the job done, and you make less mistakes when typing (in which case I'd use C++). I'd still be more inclined to go with C++ just because it would get a solution out a bit quicker (probably), although things like file input would be quicker in other languages.

Bleh, it's all personal preference. Anyone who doesn't see why language isn't a factor clearly either has no experience with development, or is rubbish.

1
0

and Java is real cross-platform

Just an interesting side-note:

Java is still the only, real cross-platform environment which also includes a cross-platform GUI library (see the remark about IDEA).

1
1
Thumb Up

Or not

Qt, WxWidgets, Juce, etc etc etc

0
0
Thumb Down

Only $5000 ?

Seems a bit tight fisted..?

1
0
Megaphone

"exactly zero from the United Kingdom."

"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

6
1
Gold badge
Happy

Peaches Geldof has a band.

Who knew?

0
0
Silver badge
Unhappy

Indeed!

“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.

0
0

I was lucky enough to get a grant to a good school

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.

0
0
Bronze badge

Arithmetic != Maths

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.

0
0

and that's

Numberwang!

6
0
Joke

A really great hacker

hacks in to the organiser's computer to find out the questions before the competition.

5
0
Linux

and the best hacker

Hacks in afterwards to change his grade.

2
0
Anonymous Coward

Hmmm...

"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"

9
0
Gold badge
Coat

Re: Hmmm...

It'd also explain why the thing leaks like a bloody sieve.

All those backdoors and loopholes that one puts in "for testing purposes" while kicking raw code around are still in there.......

0
0

Fake hackers for a fake contest.. hackers don't exist.

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

1
10
Silver badge
Black Helicopters

You may also be interested to know

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.

5
0
Thumb Up

I did a maths degree at university in England

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 :)

2
0

This post has been deleted by a moderator

JDX
Gold badge

"Most contestants coded in C++, as you might expect, given the tight time frame"

Yeah, C++ is usually picked for it's RAD-friendly nature. Oh, wait.

Another gold for Petr. He's incredible.

3
0

C++

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.

0
0
FAIL

Harder to make mistakes in Java?

That's because it's harder to do anything in Java.

5
5

This post has been deleted by a moderator

Coat

The balance in language

@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 :) )

1
0
Thumb Down

@AC 22:51

I had CS 101 in C. And on the following semester Assembly.

If nowadays you have "enterprisey-friendly" languages to get a job faster without knowing how things work, well, maybe we have found why software sucks so much these days.

1
1

chill, dude

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.

1
3
Bronze badge
Coffee/keyboard

@The Alpha Klutz

Was that link ironic? Biting social satire? Or are they for real? It's hard to know here in my ivory tower.

1
0

Classy

isn't it.

0
0
Boffin

Why didn't they use Prolog?

or rather CLP-R, since these are logic puzzles that can be made to fit in declarative languages.

0
0
Bronze badge

Am I just being cynical...?

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.

6
0
Thumb Up

ta reg

for putting the full text of the problems - saved me the bother of searching for it!

0
0

If it was maths they were doing...

... surely they should have used Fortran..?

0
0
Coat

GF left me, I am joblless, got a degree from major CS university, but still breathing here

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 :)

0
0

C++? Java?

Bring on the Smalltalk I say. Sometimes I dream in Smalltalk.

0
0
Anonymous Coward

Smalltalk

I have an oscilloscope from the '90's sat next to me with no less than seven processors all programmed in Smalltalk allegedly.

0
0

Page:

This topic is closed for new posts.

Forums