Lenny Burdette
@lennyburdette.bsky.social
34 followers 76 following 13 posts
Posts Media Videos Starter Packs
lennyburdette.bsky.social
I've got some ideas for working with APIs (including MCP JSON:API and GraphQL) that I'll be demoing in NYC in two weeks!
I'm speaking at the MCP Builder Series in New York. Will you join? Thursday, September 18th, 4pm ET. Speaker Lenny Burdette, Apollo
lennyburdette.bsky.social
After a year of working on it, I finally got to talk about my project at last month’s GraphQL Summit! Check out our solution for declaratively building GraphQL APIs from RESTish APIs www.youtube.com/watch?v=anHz...
Exploring Apollo’s new products, a deep dive
YouTube video by Apollo GraphQL
www.youtube.com
lennyburdette.bsky.social
How is this not illegal??? Cards Against Humanity is PAYING people who didn't vote in 2020 to apologize, make a voting plan, and post #DonaldTrumpIsAHumanToilet—up to $100 for blue-leaning people in swing states. I helped by getting a 2024 Election Pack: www.Apologize.lol
Cards Against Humanity Pays You to Give a Shit
Didn't vote in 2020? Cards Against Humanity will pay you to apologize.
www.Apologize.lol
lennyburdette.bsky.social
Traveling 5 hours for the totality was absolutely worth it ☀️🌑🌎
lennyburdette.bsky.social
Thanks! Can wasm-bindgen also generate the “env” module, or are you expected to provide it somehow?
lennyburdette.bsky.social
wasm-bindgen will emit `import _ from "env"` depending on your crates and I couldn't find a good answer for how to manage that. I ended up using vitejs.dev/config/share... to shim the module with `{ now: () => Performance.now() }` to get things working. wasm is cool, but there's a long way to go!
lennyburdette.bsky.social
Trying to understand a codebase at work today. It uses crates.io/crates/petgr... and I'm having fun generating dot graphs with it.

I thought it was interesting how `format!("{:?}", graph)` and `format("{}", graph)` resulted in different labels nodes and edges. Clever! github.com/petgraph/pet...
crates.io
lennyburdette.bsky.social
Is `my_bool.then_some("when true").unwrap_or("when false")` a reasonable approximation of a ternary or one-liner if/else, or an abomination?
lennyburdette.bsky.social
Really enjoying rust-unofficial.github.io/too-many-lis... even though I’ve never needed a linked list my career.

Then I read this post on the memory implications of Vec: blog.polybdenum.com/2024/01/17/i...

And (spoiler) a solution is to use linked lists!
Introduction - Learning Rust With Entirely Too Many Linked Lists
Learning Rust With Entirely Too Many Linked Lists
rust-unofficial.github.io
lennyburdette.bsky.social
TIL that you can reference a Rust macro within the macro expansion to avoid repeating yourself when defining multiple invocation patterns. Just make sure to reference it directly with `$crate::my_macro!` to keep it hygienic!
lennyburdette.bsky.social
Picked up some tips for testing log messages today: we're using tracing_subscriber and tracing::info! for logging, and we have a "SnapshotSubscriber" we can use in tests that captures logs and calls insta's assert_yaml_snapshot when the subscriber is dropped. Helps us guarantee useful log messages!
lennyburdette.bsky.social
I'm frequently using `.collect()` on an iterator of `Result`s like this: gist.github.com/rust-play/63...

My colleague pointed out that itertool's `try_collect` provides the same functionality with a nicer name: docs.rs/itertools/la...
Itertools in itertools - Rust
An `Iterator` blanket implementation that provides extra adaptors and methods.
docs.rs
lennyburdette.bsky.social
Happy holidays everyone! I'm going to start tweeting about learning Rust on the job.

I just finished a bunch of integration tests against REST APIs using Wiremock. Using path_regex() for matching request paths was annoying so I wrote a simple wiremock::Match trait impl for path templates instead 👍