Thanks for the author list! I've heard good things about Eloquent Ruby - it's definitely on the list if I keep exploring the language.
The mazes book wont replace a rigorous study of algorithms (there's no proofs or anything), but it's a great way to see them in action and start to figure out how to apply them.
Sure, here's a partial (but functional) implementation of the Cell class used in the book. It is not advanced Ruby, but the author does not spend any time teaching Ruby concepts - this code snippet appears early on in the first chapter and the assumption is the reader can understand it:
Thanks for the author list! I've heard good things about Eloquent Ruby - it's definitely on the list if I keep exploring the language.
The mazes book wont replace a rigorous study of algorithms (there's no proofs or anything), but it's a great way to see them in action and start to figure out how to apply them.
Could you share some example code of mazes book so let us know if we can understand it?
Sure, here's a partial (but functional) implementation of the
Cell
class used in the book. It is not advanced Ruby, but the author does not spend any time teaching Ruby concepts - this code snippet appears early on in the first chapter and the assumption is the reader can understand it:And the simplest algorithm:
Basic building blocks, but you do need to know what, for example,
attr_accessor
meansI'm following along in TypeScript and finding the translation straightforward.
Thanks, I almost understand it.