Live data from Hacker News

Project Euler

projecteuler.net

91–100 of 138 posts

Re: Project Euler

#91
post #70

Earlier quoted context omitted.

What we need now is more focus towards females. Men are already sufficiently saturated in the maths/CS fields. What we need is to market the idea of maths as fun to more females.

As a female math grad and CS postgrad, I would like to say firstly that you have successfully trolled me. I do hereby take your bait. Now for the points I would like to make, primarily for the benefit of the few who actually think as you claim to think: Women are actually similar to men in a number of novel ways. We have eyes, and those eyes are intricately connected to very powerful and compact organic computers—cap…

Hey, wanda, you got quenlinlom's remark totally wrong. He doesn't really want to saturate female's lives with more math and CS. He wants his math/CS life saturated with more females.

Re: Project Euler

#92
post #70

Earlier quoted context omitted.

As a female math grad and CS postgrad, I would like to say firstly that you have successfully trolled me. I do hereby take your bait. Now for the points I would like to make, primarily for the benefit of the few who actually think as you claim to think: Women are actually similar to men in a number of novel ways. We have eyes, and those eyes are intricately connected to very powerful and compact organic computers—cap…

Hey, wanda, you got quenlinlom's remark totally wrong. He doesn't really want to saturate female's lives with more math and CS. He wants his math/CS life saturated with more females.

He's hanging out with the wrong mathematicians. Or the ladies have, um, made a judgment, and don't want to intimidate him by their superior STEM achievements.

CS is a sausage fest as we all know here on HN. What most HN readers don't know is around 46% to 48% of all math undergrad degrees in the USA have gone to women since the early 80s.

You can read some hilarious articles online about the "crisis" that women have declined to a mere 45% in some years. I make fun of it because my EE classes had zero female grads, everyone knows CS is a sausagefest, why I remember a decade ago in an advanced C++ class I got to work with "the" girl in the class, all true stories, but if there's one thing not to fret about, its that an office staffed by recent math grads (McDonalds? Applebees?) would have either 10 of each or at worst 11 men to 9 women, hardly a staggering imbalance like you see in CS/IT.

Re: Project Euler

#93

Earlier quoted context omitted.

When I was conducting quantitative interviews I ended up doing the same thing. One of my favorite problems to give was 267 ( http://projecteuler.net/problem=267 ). It has a few "aha" moments but also requires coding to get it done.

Hey, who did you interview and for what position? And how many of these people succeeded? I've solved about 50 project Euler problems, but only 1 or 2 with number above 200. I'm not a genius, didn't study maths, but it's imho quite hard to solve any Euler problem at an interview, even if you're a decent thinker. Ok, there are few easy ones, but none of these with 3 digit numbers.

It was for quantitative engineer roles at Yodle (adtech startup). The goal wasn't really to get to a solution since it's not possible without sitting down to code but more to get them thinking about it and how they'd structure the problem. I don't remember offhand how many people got it but the ones with a statistics/data background ended up having the right approach and the ones that didn't got it with a few hints.

Re: Project Euler

#94

Earlier quoted context omitted.

When I was conducting quantitative interviews I ended up doing the same thing. One of my favorite problems to give was 267 ( http://projecteuler.net/problem=267 ). It has a few "aha" moments but also requires coding to get it done.

Did you use the Kelly Criterion or did you do something else?

I used something else - don't want to give too much away but the general idea is to try it on a smaller problem (4 flips, $5, etc) and seeing if any patterns develop.

Re: Project Euler

#95
post #82
post #75

Earlier quoted context omitted.

I think the reason it is a poor choice for interview questions, is like you say, we "don't see [questions like these] during day to day programming".

True, but if you are interviewing, this might be an easy way to have a github repo that has an example of your coding style: comments, function and variable names, etc. ... I am kicking myself that I have never done that.

Aside from the official rules, its socially frowned upon given the magic power of google. At least that was my experience. Private repo, fine, just as long as google can't find it.

Re: Project Euler

#96

I solved about 80 of them, then my interest waned a little. But I wonder, are there any hints or recommended reading for the harder ones? Some of them I have no idea how to even start working on..

> Some of them I have no idea how to even start working on Do you have an example of such a problem?

I became obsessed with this problem recently:

http://projecteuler.net/problem=436

and couldn't solve it. I found an article on mathworld that says the number of expected rolls is e so that the sum is over 1. I don't know how to figure out what the value of the roll that gets you over 1 is, it's something like 0.64 from simulation but what does that number mean and why?

Re: Project Euler

#97
post #75
post #19

Earlier quoted context omitted.

In the same vein, spending a couple of hours working Project Euler questions before you go into an interview is a great way to warm up for the types of questions you tend to get in interviews but don't see as much during day-to-day programming.

I think the reason it is a poor choice for interview questions, is like you say, we "don't see [questions like these] during day to day programming".

That's never slowed down interview question fads before ...

Re: Project Euler

#98
post #3

I will start this with python.

Even though I know python fairly decently, I found working on Project Euler problems improved my Python skills a lot - in particular, I had not had much awareness, nor need for the 'yield' command, but I ended up using it a lot on PE problems.

Re: Project Euler

#99

Earlier quoted context omitted.

It's not the "free work," it's asking the candidate to make a large time commitment that she cannot use for pursuing other job opportunities.

> a large time commitment No. Solving the first 12 PE problems should not take a competent programmer more than 30 minutes.

Well, I just did it. It took me about 35 minutes. I am terribly, terribly old (43 years) but I'm pretty sure I am a more than competent programmer and I have a very strong mathematical background. I was working on a laptop but a reasonably decent one, in an environment less distraction-free than an interview room but still not bad. I didn't particularly go all-out for maximum speed but wasn't gratuitously slothful.

I (deliberately) didn't use a programming language with, e.g., facilities for prime factorization built in; that would have made it much quicker but would also have made the whole thing useless as a programming test. So I had to implement the sieve of Eratosthenes, the number-of-divisors function (via prime factorization), etc.

I estimate that about 8 minutes of that time was the result of a couple of silly bugs. (It's surprising how many seconds one can lose to forgetting that 16 is less than 20.) That figure could easily have been zero or twice as much. I lost perhaps two minutes to spousal distraction.

These are all straightforward problems; in no case did I have to spend more than a few seconds thinking how to proceed, though in a couple of cases my response to having written buggy code was to replace it with something more simple-minded.

recursive, I invite you to actually sit down and implement solutions to the first 12 PE problems in, say, Python or Ruby or some similar language and tell us how comfortably under 30 minutes you come in. For the avoidance of doubt, I'm not at all saying you won't manage it -- I wasn't far off and you may very well be quicker than me. But I'll be surprised if you're so far ahead that after the exercise you still think every competent programmer should finish in at most 30 minutes.

(My rough timings for the 12 problems, in order, in minutes: 1, 1.5, 1.5, 1, 3, 1, 3, 2, 1, 4, 5, 10. These figures include bugfixing and checking against the PE site. Total lines of code: about 115.)

Re: Project Euler

#100
post #92

Earlier quoted context omitted.

Hey, wanda, you got quenlinlom's remark totally wrong. He doesn't really want to saturate female's lives with more math and CS. He wants his math/CS life saturated with more females.

He's hanging out with the wrong mathematicians. Or the ladies have, um, made a judgment, and don't want to intimidate him by their superior STEM achievements. CS is a sausage fest as we all know here on HN. What most HN readers don't know is around 46% to 48% of all math undergrad degrees in the USA have gone to women since the early 80s. You can read some hilarious articles online about the "crisis" that women have…

The disconnect may be a result of what schools people are familiar with. At (Carnegie Classification) Research I universities men make up 64% of math and stats majors, whereas at Masters I there is almost parity. These university types are #1 (~8000) and #2 (~6000).

Still even 64% is hardly EE at Research I (85% male), so your overall point stands.

Post reply on HN