News for hackers. Stuff that matters.
Re:Project Euler by sevensor on Sunday December 10, 2017 @09:46PM (#15894808)
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.

Re:Project Euler by bhrgunatha on Sunday December 10, 2017 @10:47PM (#15895023)
My 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.

Re:Project Euler by mlazos on Monday December 11, 2017 @04:33AM (#15896011)
I 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.
Re:Project Euler by toolslive on Monday December 11, 2017 @03:41AM (#15895857)
seeing 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).
Re:Project Euler by decafb on Monday December 11, 2017 @05:35AM (#15896205)
Totally 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.

Re:Project Euler by ehsankia on Sunday December 10, 2017 @11:36PM (#15895184)
I 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.
Re:Project Euler by utopcell on Sunday December 10, 2017 @11:46PM (#15895211)
There are forums for the problems where you can ask for general directions, so long as hints are not asked / provided.
Re:Project Euler by amorphid on Monday December 11, 2017 @02:09AM (#15895599)
Yeah, 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!
Re:Project Euler by danielbarla on Monday December 11, 2017 @12:06AM (#15895267)
This is true, though there are recurring themes, and the forum discussion for previous problems often helps.
Re:Project Euler by tytytytytytytyt on Monday December 11, 2017 @02:35PM (#15899623)
You could just look things up with Google, Wikipedia, etc. It's not like it's hard to do that for the first 100 problems.
Re:Project Euler by dagw on Wednesday December 13, 2017 @08:18AM (#15914003)
It'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 .
Re:Project Euler by tytytytytytytyt on Wednesday December 13, 2017 @04:22PM (#15917790)
> 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.

Re:Project Euler by srikz on Monday December 11, 2017 @12:51AM (#15895379)
I think Exercism [1] is a better not-math-inclined coding challenge collection

[1]: http://exercism.io

Re:Project Euler by estomagordo on Monday December 11, 2017 @02:32AM (#15895658)
Plus the community is great at providing feedback on your code.
Re:Project Euler by omaranto on Monday December 11, 2017 @09:45AM (#15897249)
> 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!

Re:Project Euler by tedmiston on Sunday December 10, 2017 @10:09PM (#15894881)
I agree with Project Euler being mostly about math. I prefer Codewars for practicing programming or learning a new language.
Re:Project Euler by Nydhal on Monday December 11, 2017 @12:01AM (#15895255)
Euler was a mathematician after all. Now thinking about it I wonder what project Djikstra would look like, or say maybe project Stallman.
Re:Project Euler by seanp2k2 on Monday December 11, 2017 @02:05AM (#15895586)
Project Stallman: Find the Github project with the most open-source license term violations (then convince them to fix it).
Re:Project Euler by skocznymroczny on Monday December 11, 2017 @04:48AM (#15896062)
Project Stallman would be finding a project with open-source license and convincing them to adopt copyleft instead.
Re:Project Euler by zaarn on Monday December 11, 2017 @06:45AM (#15896470)
Or 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.
Re:Project Euler by indigochill on Monday December 11, 2017 @07:16AM (#15896583)
There's a Project Rosalind (named after Rosalind Franklin) which is sort of like Project Euler for bioinformatics: http://rosalind.info/about/
Re:Project Euler by otakucode on Monday December 11, 2017 @12:16PM (#15898457)
Project Rosalind (which has mostly been subsumed by the larger Stepik effort I believe?) is fantastic and a much more directed, progressive setup than Project Euler. I enjoyed PR greatly, and each problem led naturally to the next, whereas PE is just random problems and one might be monstrously difficult and on an utterly different topic than the next. A comprehensive mathematics project that grew in complexity the way PR does for bioinformatics would be unbelievably awesome.
Re:Project Euler by westurner on Tuesday December 12, 2017 @12:29PM (#15907466)
I like https://rosalind.info bioinformatics problems because:

- There are problem explanations and an accompanying textbook.

- You can structure the solutions with unit tests that test for known good values.

- There's a graph of problems.

Re:Project Euler by zaarn on Monday December 11, 2017 @03:50AM (#15895881)
I think a Project Turing might be an interesting one, solving problems specific to computer science (maybe something like pathfinding, evolutionary algorithms, data structures, etc)
Re:Project Euler by macintux on Monday December 11, 2017 @11:25AM (#15898032)
Or 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.
Re:Project Euler by bjoli on Monday December 11, 2017 @12:39AM (#15895344)
I 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.

Re:Project Euler by johnsonjo on Monday December 11, 2017 @09:23AM (#15897134)
My 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!

Re:Project Euler by TH3R3LL1K on Monday December 11, 2017 @05:06AM (#15896111)
Can you provide a link for this? I'm very interested in it.
Re:Project Euler by bjoli on Monday December 11, 2017 @08:58AM (#15897026)
What 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.

Re:Project Euler by lerax on Tuesday December 12, 2017 @08:35AM (#15905443)
Yes, 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

Re:Project Euler by michrassena on Monday December 11, 2017 @03:28PM (#15900139)
>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.

Re:Project Euler by jon_richards on Monday December 11, 2017 @12:09PM (#15898378)
I 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

Re:Project Euler by didymospl on Monday December 11, 2017 @03:27PM (#15900131)
You can try http://www.spoj.com/ if you're more interested in algorithms-oriented programming contests.