A fun way to learn a new programming language is to work out Project Euler problems in it.

By 1 James Johnson on December 22, 2007

http://www.projecteuler.net

Right now I'm doing it with Haskell, although I'm really more "getting more acquainted with" than "learning."

Embed Claim Make a related claim

Discussion (9)

http://www.brucestockwell.net/

3 T3H who agreed, says

Thank you James. I hadn't heard of this site before.

Make a related claim 11 months ago (link)
http://clayshooter811.myvidoop.com/

1 James Johnson who agreed, says

The Python Challenge is another one that I found ( www.pythonchallenge.com ) but I don't like it as much since it's one of those ridiculous puzzle sites instead of straight-up programming challenges.

Make a related claim 11 months ago (link)
http://marphod.livejournal.com/

3 Marphod who hasn't voted, says

Some of those look cool. Others, like the first problem, I can't conceive of an elegant solution that requires a program. Just a solution that requires an algebraic expression of about 10 terms.

Make a related claim 11 months ago (link)
http://www.brucestockwell.net/

3 T3H who agreed, says

Just trying things like this will help the learning process.

Make a related claim 11 months ago (link)
http://clayshooter811.myvidoop.com/

1 James Johnson who agreed, says

"Some of those look cool. Others, like the first problem, I can't conceive of an elegant solution that requires a program. Just a solution that requires an algebraic expression of about 10 terms."

If you're talking about problem 1, I did it with a one-liner in Haskell wit some list trickery. It's not particularly efficient but it got the job done in under a second.

Make a related claim 11 months ago (link)
http://clayshooter811.myvidoop.com/

1 James Johnson who agreed, says

(I meant to type 'wit' instead of 'with'. My native accent is returning to da point dat I type in it, I guess.)

Make a related claim 11 months ago (link)
http://marphod.livejournal.com/

3 Marphod who hasn't voted, says

(It is, if I did my math right, the sum of 3 finite sequences. I think I did it faster on paper than I could write it on a computer.)

Make a related claim 11 months ago (link)
http://marphod.livejournal.com/

3 Marphod who hasn't voted, says

Well, yes.
But it is also: sum(1..199)*5 + sum(1..333)*3 - sum (1..66)*15

and the summations of sequences can be done in 4 terms.

Make a related claim 11 months ago (link)
http://marphod.livejournal.com/

3 Marphod who hasn't voted, says

(L[1] + L[n)) * n / 2

Make a related claim 11 months ago (link)
Sign in in to leave a comment.