Actually, once you understand this algorithm, I think the best place to go next would be to change it to a breadth-first traversal. The intuition here is that a maze is an undirected graph, and this algorithm constructs the maze by traversing that graph in depth-first order. This is d...
Ryan, regarding "caving so soon and so fast," it wasn't a casual decision. We consulted an attorney, and their professional opinion was that we not fight it. True, we could have looked for a second opinion, but given that the prospect was not exactly sunny, it would have just been (IM...
(Hello Minecrafters! If you’re looking for random mazes you can build in Minecraft, you might be better served by this page I wrote . It’ll give you block-wise schematics for the maze, and will require less mental translation than the demos here. Just don’t use IE—it won’t work right ...
I believe you are getting into why DHH said this will help you make better controllers. I am working on a e-book for modelling REST and resources in Rails. Right off the bat, you should be thinking about your use cases and the flow of your application. Jamis, didn’t you blog something...
If you’re into functional programming at all, you probably know right away what the K combinator is. For the rest of us, this article is helpful (if a bit on the academic side, but that’s about par for the course for most reading about functional topics). Basically, the K combinator i...
Excellent write-up in helping beginners understand the principles of Rails. Keep’m coming! As Christoffer said, pseudo_id could be a helper, I think it fits fine in the model. I’m sometimes unsure whether to put little functions like that as part of the model or as a helper. Personall...
Actually, once you understand this algorithm, I think the best place to go next would be to change it to a breadth-first traversal. The intuition here is that a maze is an undirected graph, and this algorithm constructs the maze by traversing that graph in depth-first order. This is d...
@Robin, very nice, I love how it’s actually simpler to allow adjacent crossings. I’ll bet it could even be simpler: we probably don’t even need to check the connected status of east/west and north/south pairs during the crossing phase, since they can only be connected if the center ce...
Nice blog post. :) But I don’t think I agree with your points about Java collections vs Ruby collections. The different collections interfaces/implementations do have different purposes. For example, take HashMap and TreeMap. HashMap is – tadaa – implemented with a hash table and has ...
Pat Eyler is looking into designing a certification program, in conjunction with a university course. This really got me thinking. As a general rule, I believe certifications are a joke. Plain and simple. When I was at BYU , and the mandate came from the suits that we had to drop ever...
@chaered, it actually does not matter how you define “placed in the maze.” By definition, every cell in the maze must be reachable by every other cell, so regardless of where you are placed, there will be a shortest path to any other cell you designate. And since a shortest path will ...
ActiveRecord is cool and all, and it goes without saying that we all trust its judgment, but sometimes you just want to watch while it does its thing. For instance, just today, I wanted to verify that, in edge Rails, ActiveRecord no longer loads the entire collection when doing a scop...
The difference between protected and private is very subtle, as you can see, which explains why protected is rarely used by most Rubyists. If it is used at all, it is generally as a convention, to document methods that are internal to the class, but which lie closer to the public inte...
(Hello Minecrafters! If you’re looking for random mazes you can build in Minecraft, you might be better served by this page I wrote . It’ll give you block-wise schematics for the maze, and will require less mental translation than the demos here. Just don’t use IE—it won’t work right ...