Live data from Hacker News

Project Euler

projecteuler.net

121–130 of 138 posts

Re: Project Euler

#121
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…

Given that you've got some emotional disposition against "feminists" and "liberals" [1], I don't think I'm going to buy your implicit effort to try to represent women. There are plenty of women who believe gender is an issue worth thinking about, whereas you seem to have no problem telling people to just "ignore" it because you're personally comfortable ignoring it.

I don't think marketing tech to women or girls is "the solution" either, but I don't make every effort to steer other men away from thinking about it and slur people for trying. That's intellectually malicious.

A part of me doesn't actually believe you're a woman, given how many men put effort into anonymously impersonating women in political debates, but I lean toward believing you

[1] https://news.ycombinator.com/item?id=7041037

Re: Project Euler

#122
post #89

Earlier quoted context omitted.

That's true. Another one mentioned in this thread is hackerrank: https://www.hackerrank.com/ - this one offers way more languages, except for rust, the one I'm actually learning :(

I saw that and just registered/tried. Although it has Clojure (my target language), you still send code instead of an answer, and you get problems like not knowing what's available in terms of libs and whatnot.

This link may be helpful: https://www.hackerrank.com/environment

Also, you can usually find information about that kind of stuff in their IRC or even e-mail. They are usually pretty responsive.

Re: Project Euler

#125
post #73

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, thanks. This was a fun problem. I got a little bit obsessed though, and I wonder if it might be possible to finish the problem on pencil and paper. I am sure I can finish an approximate version, but I am not sure I can get 12 digits. Did you try something like this? P.S. I must apologize for abstractly referring to a solution approach as "this", but I didn't want to create a spoiler in case anyone else had felt…

I actually don't know how to solve it programmatically without doing things that feel nasty.

Solved it with pencil and paper, if "pencil and paper" includes asking Wolfram Alpha a few questions :)

Re: Project Euler

#126
post #121
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…

Given that you've got some emotional disposition against "feminists" and "liberals" [1], I don't think I'm going to buy your implicit effort to try to represent women. There are plenty of women who believe gender is an issue worth thinking about, whereas you seem to have no problem telling people to just "ignore" it because you're personally comfortable ignoring it. I don't think marketing tech to women or girls is "…

  there are plenty of women who think gender is an issue
Women being paid less for the same job is an issue. Sexual harassment is an issue. Women treated as secondary when it comes to promotions/scholarships is an issue. Gender is not an issue and I just dislike the implication that women cannot find their way into tech if they want to. Are we concerned that the infantry isn't 50:50 men:women? Not bloody likely.

If you think me bitter, you're wrong. I am just tired of the trend to think of women as people with "special needs". I am perhaps concerned with gender more, after all.

Re: Project Euler

#127
post #29

The best technical interview I ever had involved picking a random Project Euler problem in the hundreds and pair-programming our way through it. The CTO wrote his version in Python and I worked in Perl . . . he was astounded mine ran 8x faster. The same company also had regular hack night where everyone drinks a lot of Tecate, agress on a Project Euler problem and a language no one knows, and races. Fun times.

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.

My solution would be:

For one coint toss, I get:

(previous winnings) x (1+f) if I win

(previous winnings) x (1-f) if I lose

Thus, w being the number of times I win, I get the total $$ we would have:

(1+f)^w x (1-f)^(1000-w)

But those cases are not equally likely, so we have to ponderate them with a normal law centered at 1000/2, variance at sqrt(1000/4):

(1/(sqrt(2xPi)xsqrt(250))) x exp(-(500-w)^2/500)

So, now we can take an f, calculate the number of w's that put us above 1B$, and sum up the ponderation for each case. Then find the right f that optimized the chance of being a billionaire. This chance is the solution.

Re: Project Euler

#128
post #29

The best technical interview I ever had involved picking a random Project Euler problem in the hundreds and pair-programming our way through it. The CTO wrote his version in Python and I worked in Perl . . . he was astounded mine ran 8x faster. The same company also had regular hack night where everyone drinks a lot of Tecate, agress on a Project Euler problem and a language no one knows, and races. Fun times.

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.

Is there any danger that someone has seen the problem?

Re: Project Euler

#129
post #62

I can't adequately express how great of a resource Project Euler is to someone learning about programming. The way I learned to code was working my way through Project Euler problems in Python, eventually getting to a score of about 55 before I was at the point where I decided to try making "real" programs like Android apps. When you learn to code people tell you that X or Y is bad for performance, and you should do…

I've been using Euler to learn Python too. It's been so much fun that I kept going. Now I wonder if I should switch again.

Re: Project Euler

#130
post #31
post #22

I love project euler, but I've come to the realization that its purpose is to beat programmers soundly about the head and neck with a big math stick. At work last week, we were working on project euler at lunch, and had the one CS PhD in our midst not jumped up and explained the chinese remainder theorem to us, we wouldn't have had a chance.

I feel the same way. It was presented to me as a great way to learn new programming languages. But really it's challenging your ability to design algorithms, and overwhelmingly mathematics-related algorithms. (I'm not saying the site itself claims anything different). It doesn't heavily challenge you to advance past a most basic level of a programming language. For example, most Project Euler problems are solved in J…

I've been using it to learn Python, and to your point, frequently thought "this would be much easier to do recursively"
Post reply on HN