Hands-on Rust: Presentation order in map_builder section

Title: Hands-On Rust (??? ePub)

Just finished the map_builder section. Just a suggestion here (others may disagree). This felt like the order was more from the perspective of someone who “just knew” from the start what all functionality he would need (perhaps, from having implemented it already?? :slight_smile: ).

It means that you’re putting a lot of pieces out there as a reader without really understanding why. As a developer, I think it’s probably more common that you build out the high level structure, determining what functionality you’ll need as you go. And then drill down fleshing out the functionality.

Suggested order:

  • build
  • build_random_rooms
  • build_corridors
  • apply_horizontal_tunnel && apply_vertical_tunnel

This way, as you build out functionality, you understand it’s context and aren’t waiting until the end for things to all come together. (It’s not quite so problematic to defer hooking things into main until the end.)

1 Like

Thank you! I’ve put this into the book’s issue tracker. I’ll try and squeeze it into beta 2, but it may hit beta 3 - wrap-up on beta 2 has begun, I’m not 100% sure where the “freeze” mark is.

1 Like

I suspect, it’s more of a globally applicable suggestion. I won’t bother to post similar over and over again for other suggestions.

2 Likes

I will keep an eye out for it. It shouldn’t be too prevalent, I tried to keep things in a sensible order when possible.

1 Like