Tobias Pfeiffer
pragtob.bsky.social
Tobias Pfeiffer
@pragtob.bsky.social
Likes people. Teamplayer, Open Source Enthusiast, Software Developer, Benchmarker, TDDer, Speaker. Elixir, Ruby, JavaScript. Loves green.
🤣🤣🤣🤣💚💚💚💚🛤️🛤️🛤️🛤️
November 11, 2025 at 8:58 AM
Oh yeah absolutely that's what I usually do but I found the perspective interesting 😁
November 6, 2025 at 1:17 PM
💯
November 6, 2025 at 11:46 AM
💯
November 6, 2025 at 9:04 AM
Ah sorry, well NIF is faster so ports are slower usually 😁
November 6, 2025 at 8:53 AM
Hating on the one we went to together... I see you.
November 4, 2025 at 1:44 PM
I set it to `warning` in `test.exs` usually.

But on top of that iirc at Remote I implemented a notify system for output during test running, similar to flaky tests. I wouldn't fail the build but notify a channel of volunteers that triaged these.

Got as to 0 in time.
October 31, 2025 at 7:58 AM
😁

Thanks for sharing! 💚
October 24, 2025 at 10:49 AM
Haha thank you I really should 😅💚
October 22, 2025 at 7:47 PM
That said most of these lookups I've seen eventually want to have an inverse lookup - which map gives you easily thanks to introspection.

That said, my main argument is the simplicity - it does less but it does the job. Seeing it I know it's "just" a lookup.
October 22, 2025 at 5:33 PM
That's what I mean - the added flexibility there is YAGNI to me. Because you can do these things, but you don't need to. I have to read the entire case statement to make sure no magic is going on.

If it's a map I know no magic is going on.

That's why it should be the default.
October 22, 2025 at 5:32 PM
🙈🙈🙈🙈🙈🙈🙈🙈🙈

I guess I could do a new blog and migrate stuff later 😅🙈
October 22, 2025 at 11:41 AM
😅

The essence is:
* Maps are simpler, a case may do pattern matches and other stuff while a map clearly communicates that this is a key -> value lookup
* Maps offer introspection, I can get all keys, all values, ask if a key is there etc
* I can generate everything else based on the map
October 22, 2025 at 11:20 AM
stuck in "need to migrate my blog off of wordpress" 😭

This would be an example in a blog post where I'd argue for "the simplest construct that gets the job done" but we'll see 😬
October 22, 2025 at 11:09 AM
Y'all are tempting me to write the blog post calling out using data structures for data structure stuff 😅

This should be a map 👀

Amount of tests depends on surroundings, Impact, context etc.

I can see arguments for 0, 2 and "iterate all cases".
October 22, 2025 at 10:48 AM