BLUE
CA
Corey Alexander
@coreyja.bsky.social
Software engineer focused on Rust and web development. Creator of tools, streams, and videos to help developers grow. Sharing my journey through blogs and videos Check out my site: coreyja.com Or my Youtube Channel: youtube.com/@coreyja
5 followers25 following30 posts
CAcoreyja.bsky.social

Looks like this new domain I setup for ngrok tunneling just showed up in the Certificate Transparency logs 😅

Screenshot of requests to a new domain for lots of random prefixes, likely by automated bots scanning the certificate transparency logs. Some of the paths include `.DS_Store` `.env` `.git/config` and `/_all_dbs`
0
CAcoreyja.bsky.social

🔍 Better alternatives: • ❓ ? operator, to forward the error up the call stack • 🧩 match 📚 Read more: https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html#ErrorHandling#Rust30by30#Day5 2/2

0
CAcoreyja.bsky.social

⚠️ #RustLang Tip: Don't use .unwrap()! Use expect() instead in tests or when you're absolutely sure a Result/Option is Some/Ok but you can't convey that in the type system. ❌ DON'T: Use either in production code where errors are possible. expect() is like unwrap() but with a custom message! 1/2

1
CAcoreyja.bsky.social

Going live in about 10 minutes to work on my new Zoom Auto Meeting Ender app called Just Adios! Today we are going to be working around some API silliness with Webhooks to know when people join and leave the meeting! Come hang out!

coreyja - Twitch
coreyja - Twitch

Web dev & content creator passionate about Rust programming. Creating engaging educational content for all skill levels. Join my Discord community! Support me on Github Sponsors!

0
CAcoreyja.bsky.social

🧩 Traits are not for method overloading. They are a way to define methods that multiple types can implement, enabling polymorphism! With traits you can write functions that accept different types, that all have a common behavior. All while maintaining type safety! #Rust30by30#Rustlang#Day4

trait Printable {     fn print(&self); }  struct NewsArticleTitle(String); impl Printable for NewsArticleTitle {     fn print(&self) {         println!("News Article: {}", self.0);     } }  struct BlogPostTitle(String); impl Printable for BlogPostTitle {     fn print(&self) {         println!("Blog Post: {}", self.0);     } }  fn print_me<P: Printable>(item: P) {     item.print(); }  fn main() {     let article = NewsArticleTitle("Breaking News - Rust is fun!".to_string());     let post = BlogPostTitle("Why I love Rust!".to_string());     print_me(article);     print_me(post); } // Outputs: // News Article: Breaking News - Rust is fun! // Blog Post: Why I love Rust!
0
CAcoreyja.bsky.social

🤦 yup I definitely do! Nice catch! Will proofread better for the next ones lol

0
CAcoreyja.bsky.social

🐞 Rust Hack: Use the `dbg!` macro to print variables and expressions during debugging. No more `println!` with manual variable names! You even get the file and line number, for free! #Rustlang#Debugging#Rust30by30#Day2

let x = 5; let y = 10; dbg!(x + y); //output: [src/main.rs:3] x + y = 15
0
CAcoreyja.bsky.social

Ohh this is super cool! axum-test allows you to run a full Axum app in tests, send requests to it and assert on the responses! Looks really cool for E2E tests with Axum Really excited to try this out soon! #RustLang

0
CA
Corey Alexander
@coreyja.bsky.social
Software engineer focused on Rust and web development. Creator of tools, streams, and videos to help developers grow. Sharing my journey through blogs and videos Check out my site: coreyja.com Or my Youtube Channel: youtube.com/@coreyja
5 followers25 following30 posts