Sam Cooper
@sam-cooper.bsky.social
340 followers 1.7K following 170 posts
Author of Kotlin Coroutine Confidence https://pragprog.com/titles/sckotlin
Posts Media Videos Starter Packs
Pinned
sam-cooper.bsky.social
New book! 📚 Kotlin Brain Teasers is out now in early access beta. If you like #Kotlin and enjoy yelling "Wait, WHAT?!" at your IDE, this is the book for you. Reviewers said: "I hate this code so much" and "This code is actively making my day worse." 🧠🧩

pragprog.com/titles/kotli...
Kotlin Brain Teasers
Level up your Kotlin the fun way! Solve mysteries, dodge traps, and banish bugs. Sharpen your critical thinking to ace interviews and ship rock-solid code.
pragprog.com
sam-cooper.bsky.social
I've seen a lot, but I've never seen this one before!
sam-cooper.bsky.social
Which isn't far off from how I feel when writing code, sometimes
sam-cooper.bsky.social
It's giving a cross between "entangle" and "pickle"
sam-cooper.bsky.social
Just learned that the German for software developer is Software-Entwickler.

Kind of want to start using "entwickle" as an English verb now. Along the same lines as verbs like "entangle," "enforce," or "enliven."

I entwickle, you entwickle, he/she entwickles...

"Just entwickled some great Kotlin"
sam-cooper.bsky.social
Glad you found it interesting! I now know exactly two Turkish words, which is two more than I knew before I wrote the article 😄
sam-cooper.bsky.social
I didn't see secrecy, blame, or bruised egos—just open collaboration and communication all round. That's how you build a killer programming language with a strong and engaged community! A great example from @kotlinlang.org and @jetbrains.com of what good open source software development can be.
sam-cooper.bsky.social
One thing that struck me after writing this piece was just how much detailed information I was able to gather about the history of this interesting series of bugs.

Source code changes, bug reports, discussions, design proposals—everything is carefully recorded, and available to the public.
sam-cooper.bsky.social
"It took a month for someone to spot the smoking gun."

I had a lot of fun researching this long-form write-up of what I think is one of Kotlin's most interesting bugs. Hope you enjoy reading it and maybe learn something you didn't know!

sam-cooper.medium.com/the-country-...
The Country That Broke Kotlin
Logic versus language: how a Turkish alphabet bug played a years-long game of hide-and-seek inside the Kotlin compiler
sam-cooper.medium.com
sam-cooper.bsky.social
I worry LLMs are giving AI a bad name. People look at ChatGPT hallucinations and ask, "we're trusting this stuff to diagnose cancer?"

No, medical imaging AI and LLMs are very different! (Thankfully)

I guess it benefits the LLM companies to associate themselves with genuinely useful technologies 😬
sam-cooper.bsky.social
Goodreads reviewers are a tough audience! My Kotlin books have some really nice reviews—"solid fun"; "excellent"—next to three- or four-star ratings. Wonder what it takes to get five stars!

Thanks so much for leaving your reviews; it really helps 🙇

(At least I still have five stars on Amazon 🤩)
sam-cooper.bsky.social
Thanks for sharing your article, that was a good read! I've spent many hours cursing at JavaScript but the reveal still took me by surprise, I wasn't expecting that! Definitely learned something new (and reinforced my existing convictions against using JavaScript)
sam-cooper.bsky.social
The answer? Never. Adding an item to a list always returns "true" (or throws an exception).

Why make a function that always returns "true"? It's because the function is part of an interface shared with other collections. The MutableSet version of add() returns "false" for duplicates.
sam-cooper.bsky.social
Kotlin head-scratcher: when can MutableList.add() return "false"? Think carefully—it's a tricky one.
sam-cooper.bsky.social
🤔 Does the new "Show fewer shorts" button on the YouTube home screen actually do anything?

I've been clicking "Show fewer shorts" every time I see shorts on the YouTube home screen, which so far is still... every time I visit the YouTube home screen. 🤦
sam-cooper.bsky.social
The number one thing I've learned as a writer (and reader) is that trying to build suspense or delay the punchline makes a piece less engaging, not more.

The best tech articles I've read lay out the conclusion up front and then add detail and evidence. I'm trying to get better at doing that too!
Reposted by Sam Cooper
pragprog.com
PragPicks Weekend
40% off with code PragPicks
In case you missed one - this week's PragPicks ALL back on sale
sam-cooper.bsky.social
Kidding. I hope.

God, I really hope that's not the actual reason.
sam-cooper.bsky.social
JavaScript type coercion quirk. The empty string gets converted to null, which turns out to be the German word for zero 🤦
Reposted by Sam Cooper
pragprog.com
"If you are an engineer who loves a well-told technical story, then you will get a lot from this book, maybe even a new appreciation for Kotlin." -- Rob Chapman,
Author of Observability with Grafana

pragprog.com/titles/...
Reposted by Sam Cooper
pragprog.com
Today's Pragmatic Picks:
Use code PragPicks to save 40% on these titles (today only!)

📘 Kotlin Coroutine Confidence
📙 Test-Driven React, Second Edition
📕 Programmer Passport: Elixir
📗 Programming Phoenix LiveView
Reposted by Sam Cooper
pragprog.com
In addition to being a Kotlin expert, author Sam Cooper has a Master's degree in French Language and Literature from Oxford - Pragprog authors are always an amazement!

pragprog.com/titles/...
#PragPick #Kotlin #BrainTeasers
sam-cooper.bsky.social
C'est vrai ! I even worked for a publisher in Paris before my computer science degree. I'd try to translate my books, but sadly I have no idea how to say "null pointer exception" or "double precision floating point" in French. I can write you a great essay on Romantic 19th century poetry, though.
sam-cooper.bsky.social
I can subscribe to your blog? Why was I not informed? 🤓