Ask HN: Should someone write something “complex” without reading about it first?
I'd like to write an interpreter, and thought it would be nice to write one without learning/reading about them and then once it's done, read a book about it to see what I should have done differently. One of the appeal for me is that many things I read these days solve problems I haven't encountered which makes me sometimes wonder If I'm not just doing certain things because I read about them rather than because they actually are useful/solve an issue.
However, a downside, is that it may be an enormous waste of time and be almost impossible with little to no benefit. What do you think?
And do you believe there is a threshold (in difficulty, complexity...) at which point it isn't advisable? (An interpreter could be before or after that threshold)
5 comments
[ 3.0 ms ] story [ 35.9 ms ] threadAnd ignore 'threshold', often it's an imagined difficulty, check out George Dantzig[0], he mistook two unsolved maths problems for homework and solved them both!
[0] https://math.stackexchange.com/questions/533146/dantzigs-uns...
Of course there is a limit to this. It wouldn't make sense to intentionally avoid looking up solutions if you are stuck on a specific problem for several hours or days. But IMO it also doesn't make sense to read a whole textbook without trying to implement anything. What has worked well for me is to do it in an iterative fashion. Read when necessary.
For job-related work? Definitely not. Always survey the state of the art first.
Just for this reason, I'd say no. You won't learn much from something that feels impossible, because it's too complex to analyze your findings.
What you should do is rephrase the problem into something that is possible... I'd say with about 50% chance of failure. Instead of a full interpreter, write a component of one maybe. Or try reverse engineering a simple one. Maybe try cloning an existing one so you can see where problems lie.
Just the act of breaking down an impossible problem into a possible one is a major skill.