Hacker News new | ask | show | jobs
by chunkstuntman 4369 days ago
Having a --cheat option seems like a poor decision. Having easy access to every solution (especially as it exists in a plain text file) harms the experience of struggling through a problem until the correct answer is reached.
1 comments

I considered this, and figured since the solutions are stored by the program anyways, it would make more sense to include the functionality rather than to omit it. Naming the option `--cheat` was an conscious decision to discourage a reliance on it. Then again, if someone really does want to view the solutions rather than work through the problems themselves, I suppose it's their loss anyways.
Well, the general upside to googling for an answer is that often when someone is providing you with the numeric solution they are also describing their algorithm and implementation. Having it in plain text right on the local hard drive might be more tempting with fewer benefits.

Potential Solution: store the solutions file in an obfuscated format that is easy to decrypt

> the general upside to googling for an answer is that often when someone is providing you with the numeric solution they are also describing their algorithm and implementation

Can't this be seen as a downside as well? I'd much rather have an option of first just seeing if I'm eg off by a magnitude, or an iteration -- rather than having my fun ruined by someone showing me the whole solution...

Storing them in a sqlite database could be enough "encryption" for the beginner type to not find the solutions right away.
Good point; I'll keep this solution in mind.
Possibly md5 them or something?
Ah, I like this idea. I'll look into implementing it.

Edit: I just realized that implementing encryption with respect to the problem answers would imply removing the `--cheat` option. I've started a discussion [1] in the repository's issue tracker about this topic.

[1]: https://github.com/iKevinY/EulerPy/issues/3

What about the latest problem? Should we get the function work only after you update the solution databases?