hello-rust / show

🍿 Show notes, code, and future topic ideas for "Hello Rust!", a YouTube channel about the Rust programming language.
https://hello-rust.show
306 stars 20 forks source link

Use Option::map in parse_month of episode #7 #42

Closed vikrrrr closed 6 years ago

vikrrrr commented 6 years ago

Use Option::map instead of a match expression in the parse_month function. Makes it more readable.

Love your show BTW! :)

mre commented 6 years ago

Uh that's beautiful! Just don't know how to go about later code changes. What I want to avoid is that people get confused when they check the code and it doesn't match with what I showed in the episode. Hum... maybe an "errata" folder or an "improvements" section in the show notes might be nice.

Come to think of it, how about a "Discussion" section where we collect those best practices and evolve the code over time. The first version of the code would always be the first link in this section and after that, we would chronologically add improvements like yours. What do you think?

vikrrrr commented 6 years ago

Yea, we could document every change done between original and current code on a per-episode basis, with an explanation as to why each change was made and a link to the file on a specific commit.

Probably put it in the README of each episode. This also means adding an Improvements section into SHOW_NOTES.md.

mre commented 6 years ago

As discussed, updated the show notes and added an "errata" section. Thanks for your contribution @vikrrrr! ⭐️

vikrrrr commented 6 years ago

Shouldn't the go here link here use episode.number?

mre commented 6 years ago

No. I will always point to episode 8. Forever. ...you're right of course. 😆 Nice catch! Fixed.