3 min read

Walkthrough Intermission - Rust Part 3

Strolling through TheBook

Walkthrough Intermission - Rust Part 1
Ah the travails of a journeyman programmer. I honestly switch back and forthbetween so many different languages and technologies.. and really remain a rankamateur at most of them. Super frustrating. Alright, what is Rust.. (wikipedia[https://en.wikipedia.org/wiki/Rust_(programming_language)]) -…
Walkthrough Intermission - Rust Part 2
Intermission Part 1 Walkthrough Intermission - Rust Part 1Ah the travails of a journeymanprogrammer. I honestly switch back and forthbetween so many different languagesand technologies.. and really remain a rankamateur at most of them. Superfrustrating. Alright, what is Rust..(wikipedia[https://en.wikipedia.org/wiki/Rust_…

On Chapter 13

Love that iterators are a zero-overhead abstraction. Rust really seems like an honest attempt to broaden the base of people who can write low level code.

I am just going to do a speed skimming of the rest of TheBook. What I try to do when learning something new is to get a basic foundation, then speed through everything else. Then actually tackle problems. The speed skimming is kind of creating bookmarks so I know where to lookup things when I get stuck on the problems.

Some people do this much more systematically than I do. And I still find it mentally painful. I don't know why.

Chapter 14 - how beautiful.. They include a markdown based documentation protocol that auto generates documentation in html. It makes me feel like comments are at least second class citizens... not the usual third class citizens of yore

Chapter 16 Concurrency

Over time, the team discovered that the ownership and type systems are a powerful set of tools to help manage memory safety and concurrency problems! By leveraging ownership and type checking, many concurrency errors are compile-time errors in Rust rather than runtime errors. Therefore, rather than making you spend lots of time trying to reproduce the exact circumstances under which a runtime concurrency bug occurs, incorrect code will refuse to compile and present an error explaining the problem.

Never a more true observation. It does mean though that Rust ends up becoming a terrible language for beginners. You need to deliver the dopamine hit of solving problems and seeing results for beginner coders to get up the learning curve.

Chapter 17 - My gosh they didn't include inheritance. How many battles were fought over that one. They actually made some tough decisions that reduce flexibility and beginner-friendliness.

By the way, TheBook is fantastic.. for me. I mean it fits with my level of programming ability.  My only complaint is that I can't scroll through all the pages in one go. Infinite scroll like.

Alright 11.58pm, Friday night and well into the third quartile of a bottle of Penfields' Shiraz.. we hit Chapter 21 - Final Project

Yes I code drunk... do you not... I can tell you Test Driven Development just hits different after the 6th shot...

Building a web server

Here is the plan to build the web server:

  1. Learn a bit about TCP and HTTP.
  2. Listen for TCP connections on a socket.
  3. Parse a small number of HTTP requests.
  4. Create a proper HTTP response.
  5. Improve the throughput of our server with a thread pool.

I am going to watch an episode of The Marvelous Mrs. Maisel after this.. that's the only thing keeping me going at this point...

Come on.....

DonE,, 2 am `