Sam Cooper's Avatar

Sam Cooper

@sam-cooper.bsky.social

Author of Kotlin Brain Teasers https://pragprog.com/titles/kotlinbt

372 Followers  |  1,717 Following  |  216 Posts  |  Joined: 27.03.2025  |  1.8365

Latest posts by sam-cooper.bsky.social on Bluesky


Preview
Copyright and Copy Wrong - field15 Copyright law is confusingβ€”and full of myths. From "mail yourself a sealed envelope" (useless) to "fair use will save you" (it won't), misinformation is everywhere. Join Andy Hunt, co-founder of The P...

I know I have a bit of a writers' community on here among all the tech stuff so though I'd share this, should be a pretty unique opportunity to get some insight from industry legend: field15.com/copyright-an...

19.02.2026 17:33 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Scott Galloway on The Bulwark:

β€œβ€œThe Gini coefficient, zero means everyone has the exact same amount. A hundred means one person owns everything. The French Revolution and Marie Antoinette was when they were at 82.

We hit 83 this quarter.”

18.02.2026 16:26 β€” πŸ‘ 328    πŸ” 54    πŸ’¬ 6    πŸ“Œ 6
Preview
What does β€˜when’ return in Kotlin? Mixed Messages? Kotlin Brain Teasers bonus puzzle!

What happens when you use 'when' as the body of a 'map { … }' operation?

That's the topic of this week's fourth and final πŸ§ πŸ“š Kotlin Brain Teasers puzzle:

πŸ‘‰ sam-cooper.medium.com/what-does-wh...

Try to guess the answer before you scroll down to read the full explanation!

28.01.2026 11:25 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Code sample with a refactoring from `runBlocking {Β }` to `suspend fun` in tests.

Code sample with a refactoring from `runBlocking {Β }` to `suspend fun` in tests.

A benefit of upgrading to Spring Boot 4 for #Kotlin developers: you will be able to leverage JUnit 6 support for suspending functions to have cleaner tests.

27.01.2026 07:59 β€” πŸ‘ 9    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0
Preview
Can a Kotlin class have no name? Nothing to see here! Kotlin Brain Teasers, Puzzle 18 of 23

"enum class"

Okay... enum class what?

That's the puzzle πŸ˜‰

See if you can figure out the trick that lets this code compile πŸ‘‰ sam-cooper.medium.com/can-a-kotlin...

And stay tuned for one last free sample πŸ§ πŸ“š Kotlin Brain Teasers puzzle next week.

21.01.2026 11:39 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
What does β€˜throw return’ do in Kotlin? The Vacuous Boomerang! Kotlin Brain Teasers, Puzzle 16 of 23

People who follow me on here might have seen this Kotlin puzzler already, but in case you haven't:

sam-cooper.medium.com/what-does-th...

It's one of my favourite Kotlin tricks; I hope you enjoy it too! And stay tuned for another free Kotlin Brain Teasers chapter next week, as promised πŸ§ πŸ“š

14.01.2026 13:11 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

Good morning.

A regular reminder: a tiny few hoard staggering wealth and own much of the media, while millions struggle to survive.

That’s not an accident. It’s a choice made by those in power.

Tax wealth. Fund public services. Build an economy for everyone - not the 1%.

14.01.2026 08:59 β€” πŸ‘ 5116    πŸ” 1544    πŸ’¬ 133    πŸ“Œ 59

If I could give one piece of career advice to any engineer, it's: measure your impact. Make a note of usage and performance metrics before, during and after each big project. Cite them proudly in your resume/CV, performance reviews, job interviews, etc. Wish I had started doing this sooner!

09.01.2026 08:48 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
What’s null + null in Kotlin? Something From Nothing? Kotlin Brain Teasers, Puzzle 1 of 23

I'm posting free chapters from πŸ“šπŸ§  Kotlin Brain Teasers each week in January!

I've shared the code for this one before, but here's the full explanation, with more code examples and further reading suggestions πŸ’‘

πŸ‘‰ sam-cooper.medium.com/whats-null-n...

07.01.2026 12:19 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

Last day of the New Year's INSIGHT sale -
40% off with code INSIGHT
Find your inspiration -
Pragprog.com

06.01.2026 19:42 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Somebody Told Me (The User Provider Should Use An Adaptor To Proxy The Query Factory Builder)
YouTube video by Dylan Beattie Somebody Told Me (The User Provider Should Use An Adaptor To Proxy The Query Factory Builder)

youtu.be/p03oO_7sCaY

16.12.2025 06:38 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Can I get this on a t-shirt?

10.12.2025 15:37 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Consider the possibility that communicating is the work, and coding is the interruption.

10.12.2025 15:28 β€” πŸ‘ 15    πŸ” 4    πŸ’¬ 3    πŸ“Œ 0

I want to find the programmer who wrote the code that generates that error message where the detail text is just "cloudflare" and shake their hand

05.12.2025 09:10 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

My favourite part of the outage so far is the simple honesty of the error message.

"500 server error."

"Oh? What's the issue?"

"cloudflare"

05.12.2025 09:09 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

News websites are going to start pre-writing "Cloudflare is down" articles the same way they prepare obituaries in advance for high profile figures

05.12.2025 09:03 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I'm seeing that exact same 500 error on a bunch of sites (LinkedIn, StackOverflow, Medium)

05.12.2025 08:56 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I don't think it's just Zoom... is CloudFlare down again?? 😬

05.12.2025 08:52 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
Post image

Cyber Monday - Last Chance for 50% off!
Black Friday, Small Business Saturday - all the days... all come down to this
Code: SAVE50
Enter the code on the Payment Details screen
Almost everything on the site is on sale - but not for much longer!
(Only at pragprog.com)

01.12.2025 13:20 β€” πŸ‘ 6    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0

Yes, this code is good for both my Kotlin books πŸ‘

Kotlin Brain Teasers πŸ‘‰ pragprog.com/titles/kotli...
Kotlin Coroutine Confidence πŸ‘‰ pragprog.com/titles/sckot...

And since it's 50% off, you have no excuse not to buy both πŸ˜‰

25.11.2025 14:58 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

✨ ✨ SAVE 50% ✨ ✨
We're not a giant retailer. We're just a tiny group of people doing something we love, with people we admire, for a community we're part of. This is our version of a fall/Black Friday/whatever sale.

22.11.2025 14:17 β€” πŸ‘ 7    πŸ” 3    πŸ’¬ 0    πŸ“Œ 1
Video thumbnail

Pragprog Early Black Friday sale
50% off with code Save50
Includes all Beta books
pragprog.com/categor...

24.11.2025 18:55 β€” πŸ‘ 7    πŸ” 2    πŸ’¬ 0    πŸ“Œ 1

My Kotlin/writing skills are better than my image editing, I promise

24.11.2025 10:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Bonus tip! Buy your gifts from local bookstores and make their Christmas a little better too ❀️

24.11.2025 10:26 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Save 50% at the Pragmatic Bookshelf

Or just treat yourself to a new skill with 50% off everything for Black Friday!

SALE πŸ‘‰ media.pragprog.com/newsletters/...

24.11.2025 10:26 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Buy Pragmatic Bookshelf Gift Cards & eGifts | Shop Now GiftYa is like a gift card, only much better. Text a The Pragmatic Programmers egift with GiftYa and the recipient can use it like an egift code, can link it to their Visa or Mastercard, or they can s...

Or get your software engineer friends a gift card for the Pragmatic Bookshelf store so they can have their pick of topics! Supporting humans who write books for humans is a great way to spend some holiday cheer.

Gift cards πŸ‘‰ www.giftya.com/brands/pragm...

24.11.2025 10:26 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

🎁 Christmas shopping for programmers?

A paperback copy of Kotlin Brain Teasers is a great gift for the Kotlin lover in your life πŸ˜πŸŽ„. Short, fun, and packed with memorable lessons and surprises.

My book πŸ‘‰ pragprog.com/titles/kotli...

24.11.2025 10:26 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 1
Save 50% at the Pragmatic Bookshelf

Every author, editor and staff member I've had the pleasure of working with or talking to at Pragmatic has been awesome. In this age of AI it's been great to be part of such a small and driven community of humans creating content for other humans like you.

πŸ‘‰ media.pragprog.com/newsletters/...

24.11.2025 08:51 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Save 50% at the Pragmatic Bookshelf

It's part of The Pragmatic Programmers store-wide 50% off sale, so be sure to check out some of the other books in the line-up tooβ€”like Kotlin and Android Development featuring Jetpack by my PragProg colleague @mfazio.dev, or Programming Kotlin by the great @venkats.bsky.social.

24.11.2025 08:51 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Post image

My Kotlin Coroutines book is HALF PRICE this week for Black Friday! If you have a coroutine headache, I promise this book will help.

My book πŸ“–πŸ‘‰ pragprog.com/titles/sckot... (use code save50 for your discount!)

Fix that coroutine headache and get Kotlin Coroutine Confidence πŸ˜‰πŸ“š

24.11.2025 08:51 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@sam-cooper is following 20 prominent accounts