Hi folks, I have a bonus viewer comment video.
Chris and I talked briefly on my previous video "Stop Writing Rust", which is about how I feel like I can finish projects much easier in rust than in other languages I have tried.
After a brief back and forth, Chris shared this about his experience with Rust and I wanted to signal boost it verbatim:
"I was and still am a big fan of languages like C. It was what I cut my teeth on in my teens and still enjoy picking up every now and again. When writing C it feels like I am directly working with the computer to build a baroque machine of elegant computation. At least when I am not spending half my time debugging segfaults and unexpected behaviour. Granted, while I have written a good amount of C code, I am by no means great at writing C code. Then the search began for higher level languages to 'get things' done. I have used multiple in my time: mucked around in Java, built some web apps in JS, did some utility scripts in Python, tried (and failed) to build stable middleware in Perl, written some games in C++, and even used PHP to do some back end work for WP sites.
While I can get things done in each and the process of learning was fruitful I always felt like I was compromising that direct relationship with the machine. Somehow as I climbed the mountain of abstraction I lost the sense of dominion over the processor that comes with C. I felt like the abstraction that was supposed to help me be more efficient also clouded my understanding of the threads that worked under my feet. Then one day I finally decided to pick up Rust after hearing a few developers talk about how it was next best thing ever. At first it seemed obtuse, "What the hell are all these unwrap calls? Why do they throw these questions marks randomly at the end of statements? Does it always take 5 lines of error checking for one line of working code?" But I decided to give the language an honest shake and stick with it. Overtime I began to appreciate that 'naggy compiler' was actually guiding me to consider all the code paths and think about the entire possibility space I was working in. The serpentine borrow checker that seemed to try and bite me every time I made a change, developed into being a great partner that helped me keep track of 'who' owns what. This allowed me to approach complexity-laden multi-threaded programming confident that I would not get into a tangled knot of race conditions. ... The proof came to me when I had the opportunity to write a piece of middleware at work that helped a front-end web application communicate with backend servers and databases. I put together Tokio
, Actix
, Tiberius
, and Reqwest
. Salted in some Mutexes
and Rwlocks
, then put the thing together. The first build (after a bit of tweaking) ran continuously for a month on a virtual machine in production with hardly an error. All around it the infrastructure it connected would be rebooted, network connectivity would break, databases would have lag, etc; but the middleware just quietly worked in the background serving requests and making connections.
Eventually I had to do some debugging because of a race condition with the database handle between parallel threads that served web requests. If the connection timed out it would die holding the lock on the handle and the system would spiral from there. I fixed that 1 bug and then put it back into production and the system has quietly run continuously for 6 months without a squeak. This has been a game changer for me. I work at a small company where I am always strapped for time and choosing between competing projects. I do not have time to run back and fix a misbehaving piece of software I wrote three months ago, I need software that works now. I already have my hands full making the software written by other people behave with the software I have written. Rust has been a God (send) that has allowed me to solve problems once and then confidently walk away to apply my skills to the next problem set."
- Chris (https://www.youtube.com/channel/UC0X9tC5jpMYAA-FBdz20DRA)