mikecargal

mikecargal

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.)

Marked As Solved

herbert

herbert

Author of Hands-on Rust

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.

Also Liked

mikecargal

mikecargal

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

herbert

herbert

Author of Hands-on Rust

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.

Popular Pragmatic topics Top

yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |> handle_event() |> render() but the correc...
New
joepstender
The generated iex result below should list products instead of product for the metadata. (page 67) iex> product = %Product{} %Pento....
New
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
New
swlaschin
The book has the same “Problem space/Solution space” diagram on page 18 as is on page 17. The correct Problem/Solution space diagrams ar...
New
leba0495
Hello! Thanks for the great book. I was attempting the Trie (chap 17) exercises and for number 4 the solution provided for the autocorre...
New
adamwoolhether
When trying to generate the protobuf .go file, I receive this error: Unknown flag: --go_opt libprotoc 3.12.3 MacOS 11.3.1 Googling ...
New
patoncrispy
I’m new to Rust and am using this book to learn more as well as to feed my interest in game dev. I’ve just finished the flappy dragon exa...
New
adamwoolhether
Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
New
taguniversalmachine
Hi, I am getting an error I cannot figure out on my test. I have what I think is the exact code from the book, other than I changed “us...
New

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
AstonJ
Or looking forward to? :nerd_face:
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New

Latest in PragProg

View all threads ❯