6 ms·
After hearing about it for years, I decided to start working through Project Euler about two weeks ago. It really is much more about math than programming, alt
by sevensor 9y ago
After hearing about it for years, I decided to start working through Project Euler about two weeks ago. It really is much more about math than programming, although it's a lot of fun to take on the problems with a language that has tail call optimization because so many of the problems involve recurrence relations.
I like that the problems are constructed in a way that usually punishes you for trying to use brute force. Sometimes there's a problem that doesn't have a more elegant solution, though, as if to remind us that brute force often works remarkably well.
- bhrgunatha 9y agoMy only real complaint is (according to my experience) unless you happen to understand some mathematical concept/s involved in the question, it's incredibly difficult to get some insight or clue for how to go about solving it. The forums are a fantastic resource once you already know how to solve the problem.
- ehsankia 9y agoI definitely wish there was a hint system / forum where you could get pointers towards concepts you should read up on, and not the full answer.
- utopcell 9y agoThere are forums for the problems where you can ask for general directions, so long as hints are not asked / provided.
- amorphid 9y agoYeah, I "cheated" by using the forums a lot when I was going through Project Euler, too. One thing that helped me to understand different approaches was to write any solution that worked, and then benchmark my solution against all of the other submissions in my language of choice (Ruby at the time). There are so many other sites about learning to code, reviewing answers in the forums is kind of like giving yourself the lecture with content, and then you go do the real homework somewhere else. It doesn't matter how you learn it, as long as the learning sticks!
- danielbarla 9y agoThis is true, though there are recurring themes, and the forum discussion for previous problems often helps.
- toolslive 9y agoseeing a simpler/more elegant solution after you solve it will make you appreciate it more. It's also a strategy to teach math: first you fight the problem, then you learn the trick, and it will stick way longer. Unfortunately, this method is not used in high schools (not over here in BE anyway).
- mlazos 9y agoI agree with this for the most part, but I also really like the freedom/creativity that comes from having no idea how to solve a problem or whether there is even an optimal way of solving it. Some of my favorite solutions have come from hacking the brute force method in any way possible and coming up with interesting optimizations which I might not have found had I known the math-fact based optimal solution.
- decafb 9y agoTotally agree. While I learnt a few interesting concepts it doesn't feel lasting to learn isolated concepts. Personally I would like to have a little orientation system to pick a book to learn and get challenges focusing on the subject to reinforce them.
- tytytytytytytyt 9y agoYou could just look things up with Google, Wikipedia, etc. It's not like it's hard to do that for the first 100 problems.
- dagw 9y agoIt's hard if you don't know what you're looking for. And if you just Google "Euler problem 67" you're very likely to find a solution, which kind of ruins the point. It would be cool if project Euler came with an official multilevel hint systems with each hint getting closer and closer to giving you the actual solution .
- tytytytytytytyt 9y ago> It's hard if you don't know what you're looking for. Yes, that's tautologically true. You do have to put in some effort and thought.
- tedmiston 9y agoI agree with Project Euler being mostly about math. I prefer Codewars for practicing programming or learning a new language.
- Nydhal 9y agoEuler was a mathematician after all. Now thinking about it I wonder what project Djikstra would look like, or say maybe project Stallman.
- seanp2k2 9y agoProject Stallman: Find the Github project with the most open-source license term violations (then convince them to fix it).
- skocznymroczny 9y agoProject Stallman would be finding a project with open-source license and convincing them to adopt copyleft instead.
- zaarn 9y agoOr maybe find all projects which aren't using the GPLv3+ or are using the word Linux without prefixing GNU/ or GNU+ or GNU- or GNU* appropriately or allow running, distributing, compiling, touching or ingesting of proprietary code.
- zaarn 9y agoI think a Project Turing might be an interesting one, solving problems specific to computer science (maybe something like pathfinding, evolutionary algorithms, data structures, etc)
- macintux 9y agoOr simply writing programs against the classic Turing machine. I wrote one out by hand 25 years ago, 3 pages I think to add two integers.
- bjoli 9y agoI have found that for me, a classical musicians although somewhat mathematically inclined, most problems up to about problem 100 were solvable with my maths book and some helpful pointers. I ended up spending too much time per problem (days to weeks) and then I got a kid, so that time is being spent on better things.
- TH3R3LL1K 9y agoCan you provide a link for this? I'm very interested in it.
- bjoli 9y agoWhat exactly do you want a link to? I just used my friend's old maths books from high school (he did all 7 courses available, which means about 25% of his 3 year HS studies. It includes stuff like linear algebra and linear optimization and game theory. ) and lots of time. He went on to become a PhD in maths and just pointed me in the right direction when I couldn't figure stuff out myself.
- johnsonjo 9y agoMy advanced algorithms professor at University has the prerequisite for doing research with him of solving Project Euler questions from 1-100. He had some sort of time table on it like 1-3 months, but also said if you solved them all in a shorter period like 1 week that you were too good to learn anything from doing research with him. So, honestly you just doing 1-100 as a classical musician is really surprising and amazing to me. Great job!
- srikz 9y agoI think Exercism [1] is a better not-math-inclined coding challenge collection [1]: http://exercism.io http://exercism.io
- estomagordo 9y agoPlus the community is great at providing feedback on your code.
- omaranto 9y ago> It really is much more about math than programming This illustrates one of my favorite things about Project Euler. How you perceive it depends totally on your background: programmers say it's mostly math, math people say it's mostly programming!
- jon_richards 9y agoI didn't do many, but outside of the first couple, I didn't notice any that had attainable answers without computation. One example was adding one hundred 100 digit numbers and returning the first 10 digits of the sum. The forums were full of "only the first 11 digits matter", "no the first 12 digits matter because there are 100 different numbers and 10^2 is 100", etc. No one considered: 000...00x90 111...11x9 000...01x1
- didymospl 9y agoYou can try http://www.spoj.com/ http://www.spoj.com/ if you're more interested in algorithms-oriented programming contests.
- michrassena 9y ago>It really is much more about math than programming This is true to a degree. My first venture into Project Euler I was using Python, and some of the early problems involve manipulations of lists of numbers. These were almost non-problems using Python. Coming back to those same problems using C, they became a little more challenging. One of the most important lessons I learned from PE was all the computer power in the world won't outrun a good algorithm.
- lerax 9y agoYes, but ProjectEuler is awesome since abstracting ideas and optimization is a great way to training and search for the best resources of your host language. Me and some friends has been written some solutions for ProjectEuler on a lot of different languages for years. Sincerly, I have a giant feedback from them and we have awesome people writing things on the problem_solved-walled threads per question. I love the ProjectEuler way to "lock" and "force" the user really solve the problem in your own before getting further for more deep analysis. For me, copy-paste solution don't help in anything to your skills of abstractions! For that reason, for me StackOverflow sometimes may be so evil for non-engineer/non-dev problems. Beginneers should avoid it mainly and search more deeply. BTW, this is the repo: https://www.github.com/DestructHub/ProjectEuler https://www.github.com/DestructHub/ProjectEuler