Hello Rust! #3 - Code Review (Result, Error handling, URL parsing, external crates)

preview_player
Показать описание
Today we will do our first code review.
🤓

Important Links:

Missing something? Find even more information in the show notes:

Licensing

Keywords: Option, Result, Error handling, URL parsing, external crates

Hello Rust! is a show about the Rust programming language.
My goal is to address beginner and intermediate Rust questions and show that systems programming can be a lot of fun!

Рекомендации по теме
Комментарии
Автор

Very interesting episode, thanks! It seems like we did a lot of refactoring work for very little gain here, since we are not using the result or doing anything with it. It also made the code more complex, so I can imagine another programmer coming along next month and removing all the Result types to make it optional again as a "cleanup".

As a feedback from me if we were both working on this code - I'd make sure we know what user feature the refactor is enabling, especially when the refactor makes the code more complex (indicated since you felt the need to to fast forward the operations)! Programmer time is almost always our most precious resource.

That being said, this video was time well spend for me! Most of what we do as programmers are refactoring code, so even if it was "unnecessary" it was a great teaching moment, especially since most tutorials skip over the interesting bits (error handling) and simply use unwrap everywhere.

Zeedox
Автор

Its so informative watching you go through the code and make changes incrementally. Thanks again for the videos.

shashanksharma
Автор

Cheers, I found this useful as a beginner to Rust and programming in general!

TurtlesareOK
Автор

This is a really great video. A great review of idiomatic rust code and updating an existing library.

sknight
Автор

Huge thanks for this video. It has taught me a lot of useful things.

naughtrussel
Автор

What VS code extensions are you using?

jessesibley
Автор

thanks. very nice format. Perhaps it is not really a code review, more like a refactoring. I stopped watching when you started to fast forward in your refactoring to a result, I was enjoying and learning things and you kind of interrupted.

rluijk
visit shbcf.ru