Patrefans
noboilerplate from patreon
noboilerplate patreon

Compiler-Driven Development in Rust

🕑 Added 2024-06-01 12:16:15 +0000 UTC
Compiler-Driven Development in Rust

Comments

Renoir Boulanger

I do use type for sketching ideas first. Just typings. In-out, parts. It’s better than a schema using drawing. The typings can do things. I've started as self-taught PHP, making a living since 2002. Knew absolutely nothing about anything (really). Just a high school degree barely succeeded. I'm an example of an undiagnosed kid (ASD was an hypothesis closed in 2021, coming back again in 2024, in mid fourties. ADHD diagnosed in my 30s). In retrospect, that's why I felt so good when I bit the bullet of learning typing systems in PHP after I had "peace of mind" by doing TDD against all my projects and partners and employers wouldn't let me (i.e. it's not worthwhile, it'll be fine). The anxiety I would have. So, by pain and a long road. I learned that it's always best to TDD in a way or another. Not necessarily everything. But what matters; the logic the system is doing or displaying. 20y of experience, many businesses, bankruptcy. The Web wasn't taken that seriously for years!. (and now an explanation of my non-linear way of writing. sorry) TDD is more expensive (in JavaScript, PHP, TypeScript) than compiler driven. Using type system and the compiler's quick feedback just to "draw" the ins and outs of the system you're building. But you're doing one step more. That'll be definitely the next thing I do. Learn Rust. Thanks to WebAssembly (!!) I'll be able to build system tools and stuff that can run in a browser. Things that I worked long and hard to be proficient at.

No Boilerplate

You are exactly right - the string splitting CDD example will not feature in the final video, I've replaced it with an enum/method example. Thank you so much for this good feedback!

No Boilerplate

Oh certainly, just *start* with CDD :-D

Companion Technology

Very amazing. Where does unit tests fit in Rust? Could you do both?

Magnus Markling

I find the video a bit incohesive. You start out by saying (roughly) -I model my application using only types and structs, not even writing any functions. Then proceed to show an (otherwise excellent) example using only a function definition and body, not a single user-defined type.

No Boilerplate

thank you so much! Fixed for the public video

No Boilerplate

Thank you so much, if I had more time, I would be even shorter and more organised :-D

lowmagnet

small note: on the slide with the table of tests vs compiler, "everywhere" is missing its "r"

Luke Barton

Although you touched on it here, code driven modeling/design is an often undervalued practice that you could probably do a video on. I encounter a surprising number of people who believe that code is just an artifact that happens after design, and overlook code having a place in validating and exploring system design options. Code provides a familiar syntax to model boundaries, interfaces, relationships and data ownership, all with logical validity, in ways that boxes and arrows cannot.

J

I love the clarity and organization of your thinking, Tris.


More Creators