3 ms·
I seem to be in the minority here, but I've never really understood the love for Project Euler problems for programming. From the ones I did, it was far more fo
by notJim 14y ago
I seem to be in the minority here, but I've never really understood the love for Project Euler problems for programming. From the ones I did, it was far more focussed on math and abstract problem solving. I guess that will help you understand how to do basic things: looping/recursion, and conditionals, but to me problems that involve things like user interfaces, visualization, IO or the way you structure your code are far more interesting.
Project Euler reminds me of when I did computational fluid dynamics (CFD) for a while. From a programming standpoint, a lot of CFD is fairly simple--the place where CFD methods really differentiate themselves is in their modeling of the underlying physics. From that standpoint, I wouldn't really advocate doing CFD as a way of learning to program, because being a great programmer isn't really the thing that will make you great at doing CFD—being great at math and modeling is. (On the other hand, if someone wants to get into physics modeling or simulation, CFD is quite fun and satisfying.)
- aw3c2 14y agoAll I ever did was bruteforce through the most disgusting and hacky ways imaginable. I converted strings to numbers, let loops run for gazillion times and broke everything. I just used the tasks to make me try the lowest basics of languages.
- gms7777 14y agoIts not for everyone. I think the reason that a lot of programmers like Project Euler is because a lot of programmers tend to be problem-solvers by nature, mathy and sciency folks, and enjoy doing these sorts of things (especially when they get to use their programming skills in the process). So its more of a correlation in my mind than a direct link. I seem to be the exact opposite of you (Doing UI makes me want to jump off the nearest tall building. Scientific computation is where its at for me). And its great that our community has a wide range of personalities.
- barrkel 14y agoBut most Project Euler problems, once you get past the trivial ones (wherein the relevance is straight-up brute forcing), have almost nothing to do with programming. IMO you'd be better off doing past IOI problems.
- gms7777 14y agoI never said they did, and I never said that Project Euler improved your programming skills (I agree with you there) I was just commenting that IMO the reason that Project Euler comes up often in discussions amongst programmers is because many programmers tend to be the type of people that enjoy Project Euler style problems.
- dubya 14y agoI did a lot of the later Project Euler problems when I was trying to learn Haskell. Getting things to run in a reasonable amount of time without just writing brute force C code was very challenging, and I learned a lot from the discussion sections you get to read after finding the answer.
- stack_underflow 14y agoYou should check out sites like TopCoder [0] or UVa's online judge [1]. These sites offer tons of problems that focus more on algorithms and data structures, rather than just number theory and math-based problems like Project Euler - which I find becomes repetitive really fast. These judge sites will have problems ranging in topics such as ad hoc, searching, sorting, greedy, graph theory, geometry, dynamic programming, etc. If you want to get started, try going through TopCoder's high school competition arena. The problems shouldn't be too bad if you have a good understanding of your languages stdlib and about basic data structures (alternatively, it's probably a great way to learn a new language's stdlib). You basically get a problem statement and just have to fill in a method that performs the computations required with the example inputs. Then you can test it against all the test cases once it passes the example outputs. UVa is similar, except you have to take input from a file and it doesn't tell you what test cases your solution fails on (more like the ACM ICPC style of questions). I prefer TopCoder more since the focus is all on algorithms (UVa's problems will usually require taking input/producing output in very specific ways, which gets annoying sometimes), and since you can see the top ranked competitors' solutions for previous contents. It helps to review these after you solve a problem to pick up little tricks. [0] (http://www.topcoder.com/tc http://www.topcoder.com/tc) - click the O(n) icon in the top left to start the arena applet. Then go to "Practice Rooms" -> "TCHS" or "SRM" and pick a room. Within each room there should be 3 problems valued based on difficulty. [1] (http://uva.onlinejudge.org/ http://uva.onlinejudge.org/) - go to "Browse Problems" to view them all, but I find http://uhunt.felix-halim.net/ http://uhunt.felix-halim.net/ more useful; just enter your username and it'll suggest problems for you to do next (based on increasing difficulty)
- adeelk 14y agoYou really find IO more interesting than problem solving?