News:

Forum may be experiencing issues.

Main Menu

Anyone doing Project Euler? warning: addictive

Started by Rockhorst, December 24, 2014, 01:00:48 AM

Previous topic - Next topic

Rockhorst

I recently visited a small 1 hour workshop on solving the Schrödinger equation with straight forward computer programming (take small steps to integrate second derivative to first derivative and then first derivative to wave function). It inspired me to take up something that has been on my 2-do list for about two years now: learn to program in Python and do some physics simulations with it. I finally found a book on computational physics specifically for Python, written by Mark Newman. The chapters containing the basics are available online for free. Chapter 2 contains most of the info needed for simple math programs.

I'm doing the exercises in the book but to get some more exercise I started doing some problems from Project Euler. Some of the problems really force you to produce an efficient algorithm. I find it highly addictive. You read a problem and think "I can do this", write down some lines of code only to discover that brute force programs take a looooong time to run.

In the past two days I solved problems 1, 2, 3, 5, 6, 7, 8 and 10. Time races past and I should turn off my computer for the next couple of days if I want to get anything else done during these holidays ::)

So, is anybody else doing these? A little math background goes a long way, which is also why I don't think I'll solve more than 25 of these problems. By then I hope to be doing physics, not math ;)

tcpoint

Yeah.  It was too damn addictive for me.  After doing over 100 problems, I had to give it up.  I love doing problems like that and I used python to solve them.

alanp

I get a "This domain is for sale" on projecteuler.com.

But yeah, it's not often these days that code is produced that NEEDS to be optimized, or be prepared to wait. If you try running some old games on modern CPUs... epilepsy screen, then GAME OVER, then exit, in about two seconds.
"A man is not dead while his name is still spoken."
- Terry Pratchett
My OSHpark shared projects
My website

RobA

This looks pretty interesting. I'll have to check it out more when I get some time.

Quote from: alanp on December 24, 2014, 04:23:32 PM
I get a "This domain is for sale" on projecteuler.com.
Try projecteuler.net

Quote
But yeah, it's not often these days that code is produced that NEEDS to be optimized, or be prepared to wait. If you try running some old games on modern CPUs... epilepsy screen, then GAME OVER, then exit, in about two seconds.
The problem of not having the fun of optimizing code is easy to solve. You just have to go to trying to do too much on one of these little 8-bit micro-controllers. You can run out of resources on them really fast. It really does make it more fun to code.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).

Rockhorst

@AlanP: sorry, should've been .net. I've corrected it in my first post now.