Corey Alexander (@coreyja_dev) 's Twitter Profile
Corey Alexander

@coreyja_dev

Full-stack architect with two decades of web expertise
I help coders level up their engineering careers

ID: 1839441986605961217

linkhttps://coreyja.com calendar_today26-09-2024 23:09:08

28 Tweet

5 Takipçi

52 Takip Edilen

Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

Today's Stream is up on Youtube if you missed it live! youtu.be/uSOS4GbxvGs Come along as I integrate Zoom Webhooks into our app that shuts down long meetings!

Today's Stream is up on Youtube if you missed it live!

youtu.be/uSOS4GbxvGs 

Come along as I integrate Zoom Webhooks into our app that shuts down long meetings!
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🔧 #Rustlang Tip Use the #[derive(Debug, Clone)] attribute to automatically generate implementations for the Debug and Clone traits. 💡 Clone is useful when you need a copy of the struct 💡 Debug is useful for printing the struct for debugging, try with dbg! #Rust30by30 #Day6

🔧 #Rustlang Tip
Use the #[derive(Debug, Clone)] attribute to automatically generate implementations for the Debug and Clone traits.

💡 Clone is useful when you need a copy of the struct
💡 Debug is useful for printing the struct for debugging, try with dbg!

#Rust30by30 #Day6
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

New Byte just dropped! This one is a small color blending CLI, and I like the bugs that are hidden in it! Feels like a more realistic bug than some of our other ideas! See if you can spot all three bugs hidden in this challenge! Check it out! coreyja.com/bytes/color-bl… #Rustlang

Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

💡 #RustLang Tip 7: ✅ DO: use match for pattern matching, especially when dealing with enums. ❌ DON'T: rely on if-else for enum handling, when a new variant is added nothing will remind you to update your branches! #RustLang #30by30 #Day7

💡 #RustLang Tip 7:
✅ DO: use match for pattern matching, especially when dealing with enums.
❌ DON'T: rely on if-else for enum handling, when a new variant is added nothing will remind you to update your branches!

#RustLang #30by30 #Day7
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

⚡ #Rustlang Tip: Speed up dev cycles by using cargo check instead of cargo build during development It skips building everything but still checks your code for any compilation errors! You can also use cargo watch to automatically run cargo check! #RustTricks #Rust30by30 #Day8

Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

⚡ #Rustlang Tip: use Option<T> for values that might be absent. Rust doesn't have null values, but it does have Option<T> This lets the compiler help check for those pesky "null" cases for you, and make sure you handle the Option::None case! #RustTricks #Rust30by30 #Day9

⚡ #Rustlang Tip: use Option&lt;T&gt; for values that might be absent.

Rust doesn't have null values, but it does have Option&lt;T&gt;

This lets the compiler help check for those pesky "null" cases for you, and make sure you handle the Option::None case!

#RustTricks #Rust30by30 #Day9
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🏗️ #Rustlang Tip: Use the #[derive(Default)] attribute for struct initialization if all your fields have a Default implementation. Be careful though, for Strings field, the default implementation will create an empty string! #RustTricks #Rust30by30 #Day10

🏗️ #Rustlang Tip: Use the #[derive(Default)] attribute for struct initialization if all your fields have a Default implementation.

Be careful though, for Strings field, the default implementation will create an empty string!

#RustTricks #Rust30by30 #Day10
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🏗️ #Rustlang Hack: Use the ..Default::default() syntax to initialize structs with some default values while customizing others. This is also not limited to Default::default() it will work with any instance of your struct! #Rust30by30 #Day11

🏗️ #Rustlang Hack: Use the ..Default::default() syntax to initialize structs with some default values while customizing others.

This is also not limited to Default::default() it will work with any instance of your struct!

#Rust30by30 #Day11
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

Going live for a stream once I get myself all situated this morning! We are going to be working on JustAdios, my tool to end Zoom Meetings after a set amount of time. We've got the basic working, so today working on polish! Starting in ~20 minutes twitch.tv/coreyja

Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🎨 Rust Tip: Use cargo fmt to automatically format your code! 📝 You can even setup your editor to Auto-Format on save! VS Code Instructions: - Install the Rust Analyzer extension - Open settings - Search for "Format on Save" and enable it #RustTips #Rust30by30 #Day12

🎨 Rust Tip: Use cargo fmt to automatically format your code!
📝 You can even setup your editor to Auto-Format on save!

VS Code Instructions:

- Install the Rust Analyzer extension
- Open settings
- Search for "Format on Save" and enable it

#RustTips #Rust30by30  #Day12
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

⚡ #Rustlang Tip: cargo expand - Your X-ray Vision for Macros! cargo expand allows you to see the expanded code generated by macros, providing more insight into what's happening under the hood. Learn more here: docs.rs/crate/cargo-ex… #RustMacros #Rust30by30 #Day13

⚡ #Rustlang Tip: cargo expand - Your X-ray Vision for Macros!

cargo expand allows you to see the expanded code generated by macros, providing more insight into what's happening under the hood.

Learn more here: docs.rs/crate/cargo-ex…

#RustMacros #Rust30by30 #Day13
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🔍 #Rustlang Tip: Use cargo clippy to catch common mistakes and improve your code! It's also a great learning tool! It will show you best practices to follow, and by reading and understanding the suggestions you can improve your skills as a Rust developer! #Rust30by30 #Day14

🔍 #Rustlang Tip: Use cargo clippy to catch common mistakes and improve your code!

It's also a great learning tool! It will show you best practices to follow, and by reading and understanding the suggestions you can improve your skills as a Rust developer!

#Rust30by30 #Day14
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🧪 #Rustlang Tip: Use #[test] with #[ignore] for long-running or resource-intensive tests. Run all tests: cargo test Run ignored tests: cargo test -- --ignored This helps keep your test suite fast while still allowing those long running tests when needed! #Rust30by30 #Day15

🧪 #Rustlang Tip: Use #[test] with #[ignore] for long-running or resource-intensive tests.

Run all tests: cargo test
Run ignored tests: cargo test -- --ignored

This helps keep your test suite fast while still allowing those long running tests when needed!

#Rust30by30 #Day15
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🔍 #Rustlang Tip: Use Vec::with_capacity(n) when you know the approximate size of your vector beforehand. This will reserve memory for the vector to avoid multiple allocations. #RustCollections #Rust30by30 #Day16

🔍 #Rustlang Tip: Use Vec::with_capacity(n) when you know the approximate size of your vector beforehand. This will reserve memory for the vector to avoid multiple allocations.

#RustCollections #Rust30by30 #Day16
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🔍 #Rustlang Tip: Use std::mem::size_of::<T>() to check the size of types at compile-time. #RustPerformance #Rust30by30 #Day17

🔍 #Rustlang Tip: Use std::mem::size_of::&lt;T&gt;() to check the size of types at compile-time.

#RustPerformance #Rust30by30 #Day17
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

🔍 #Rustlang Tip: Use the std::fmt::Display trait to customize how your structs are printed! #RustFormatting #Rust30by30 #Day18

🔍 #Rustlang Tip: Use the std::fmt::Display trait to customize how your structs are printed!

#RustFormatting #Rust30by30 #Day18
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

I think it might be time to learn #Kubernetes, so I can self host all my toy apps in one big cluster If I want to not do a managed service (just for learning) should I do something like k3s, or the full deal? Or any non-k8s thing I should try instead?

Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

Caught this sleepy boy on the edge of the couch yesterday. He used to love this spot but been awhile since he took his afternoon nap there

Caught this sleepy boy on the edge of the couch yesterday. He used to love this spot but been awhile since he took his afternoon nap there
Corey Alexander (@coreyja_dev) 's Twitter Profile Photo

Going Live on Twitch in ~10 minutes, at 12:15ish Eastern Time! twitch.tv/coreyja We are going to build a BlueSky post webhook tool, to send notifications any time someone makes a post!