Sam Cooper's Avatar

Sam Cooper

@sam-cooper.bsky.social

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

357 Followers  |  1,709 Following  |  194 Posts  |  Joined: 27.03.2025  |  2.1494

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

comic strip at the other end of the link, click it!

comic strip at the other end of the link, click it!

10 years old and maybe never more relevant than in contemporary software development

www.commitstrip.com/en/2016/08/2...

10.11.2025 21:11 โ€” ๐Ÿ‘ 3473    ๐Ÿ” 620    ๐Ÿ’ฌ 64    ๐Ÿ“Œ 23
What is the smallest number in Kotlin? - Ivan โ€œCLOVISโ€ Canet Software engineering, open source and computer security

Floating-point numbers are weirder than you thinkโ€ฆ

ivan.canet.dev/blog/2025/11...

11.11.2025 11:20 โ€” ๐Ÿ‘ 4    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Abusing a semicolon to save a line of code is not something I'd normally do in Kotlin! But in the book I really want the examples to stay short so they don't interrupt the flow of the text too much.

For succinctness, the star of the show here is Kotlin's also() function, though!

10.11.2025 10:34 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Rate my Fibonacci! ๐Ÿ˜„

After some improvements suggested by one of the book's tech reviewers, I think this code example from Chapter 10 of ๐Ÿ“š Kotlin Coroutine Confidence strikes a neat balance between brevity and readability.

What do you think? How would you write it?

๐Ÿ‘‰ pragprog.com/titles/...

10.11.2025 10:23 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

Okay, maybe I do want to brag ๐Ÿ˜„

08.11.2025 09:54 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
It happened on Medium: October 2025 roundup SEO stats, spooky reads, and what publication editors featured

I don't want to brag, but they mentioned my book before they mentioned Obama

08.11.2025 09:53 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Few things scare me more than someone telling me theyโ€™ll just โ€œbuy the book on Amazonโ€ ๐Ÿซ 

31.10.2025 16:54 โ€” ๐Ÿ‘ 345    ๐Ÿ” 45    ๐Ÿ’ฌ 10    ๐Ÿ“Œ 4
Post image

๐Ÿ˜ˆ Working on my new LinkedIn bio. "I love to respond to AI messages, but only if they correctly show me a seahorse emoji."

Let the chaos begin ๐Ÿด ๐ŸŽ ๐Ÿ  ๐ŸŸ ๐Ÿก ๐Ÿฆˆ ๐Ÿชธ ๐Ÿš ๐Ÿ™ ๐Ÿฆ‘ ๐Ÿฆ ๐Ÿชผ ๐Ÿงœโ€โ™€๏ธ ๐Ÿฆ„ ๐Ÿข ๐Ÿฌ ๐Ÿณ ๐Ÿ‹ ๐ŸŠ ๐Ÿฆญ ๐ŸŒ ๐Ÿชป ๐Ÿชท ๐Ÿชน ๐Ÿชบ ๐Ÿพ ๐Ÿชผ ๐Ÿš ๐Ÿชธ ๐Ÿ  ๐ŸŸ ๐Ÿก ๐Ÿฆˆ ๐Ÿฆ‘ ๐Ÿ™ ๐Ÿฆ ๐Ÿด ๐ŸŽ ๐Ÿฆ„ ๐Ÿ‰

knowyourmeme.com/mem...

31.10.2025 09:00 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

"Two networks are better than one," says Vodafone, telling me I can now get service from both Three and Vodafone, thanks to their merger.

I don't suppose they can see the irony in their choice of wording.

30.10.2025 17:34 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Instead of trying to green cars so much why don't we just invest in trains. city trains. under ground trains. above ground trains. trains between cities. trains between countries. TRAINS

THE PEOPLE CRAVE TRAINS

28.10.2025 18:50 โ€” ๐Ÿ‘ 5047    ๐Ÿ” 968    ๐Ÿ’ฌ 288    ๐Ÿ“Œ 138
Issue 300: This...is... STACK OVERFLOW! - Stack Overflow Founded in 2008, Stack Overflowโ€™s public platform is used by nearly everyone who codes to learn, share their knowledge, collaborate, and build their careers.

Thanks @stackoverflow.blog.web.brid.gy for mentioning my article in last week's newsletterโ€”and congratulations on 300 issues!

Nice link description, too: "Dotting your i's and crossing your t's matters even in Kotlin." Can't believe I didn't think of that one! ๐Ÿคฆ

stackoverflow.blog/newsletter/i...

29.10.2025 10:27 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
How Do You Tame the Async BEAST with Kotlin and JavaScript? - Sam Cooper
YouTube video by ACCU Conference How Do You Tame the Async BEAST with Kotlin and JavaScript? - Sam Cooper

Trying to summarise all of asynchronous programming and structured concurrency in fifteen minutes would be kind of insane.

So of course, that's exactly what I decided to do when I spoke at ACCU York last month. ๐Ÿ˜„ I think it went okay!

youtu.be/VJC1BJ2ZDEM

29.10.2025 10:19 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Writers are nothing if not well versed in the art of telling their writing software why its punctuation and grammar suggestions are incorrect.

29.10.2025 04:46 โ€” ๐Ÿ‘ 254    ๐Ÿ” 51    ๐Ÿ’ฌ 15    ๐Ÿ“Œ 4

Thanks so much, I'm really glad you enjoyed it!

23.10.2025 06:47 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I do find LLMs occassionally useful, but the "You're absolutely right!" is gonna kill me one day.

20.10.2025 20:13 โ€” ๐Ÿ‘ 7    ๐Ÿ” 1    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

It looks like a really lovely place! Might have to try and find if I ever manage to visit France again, I need an excuse to explore outside of Paris

13.10.2025 17:12 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I thought of the GeoWizard video right away and figured you probably posted this as a similarly misleading location.

So I ruled out Japan and figured the next most likely for you was just France.

Searched for "japanese garden france" and scrolled till something matched.

Is that cheating? ๐Ÿ˜„

13.10.2025 17:11 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Really beautiful photos, especially the first one!

13.10.2025 17:02 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Tricky and Misleading: "Out Of Place" (Custom Map) [PLAY ALONG]
YouTube video by GeoWizard Tricky and Misleading: "Out Of Place" (Custom Map) [PLAY ALONG]

Damn, this reminds me of an actual GeoWizard video where it's a Japanese garden but it's not in Japan: youtu.be/BJ-bEId-7yQ?...

His was Hawaii. Yours is... Nantes?

13.10.2025 16:58 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Actually... I say "inefficient" because some chests might never be opened, but on reflection, you better believe I'm hunting down and opening every last one of those things

13.10.2025 12:23 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

In many video games, when I loot a chest, the value and level of the loot is fixed, but the specific selection of items is randomised.

It would be inefficient to populate every chest up front, so maybe the contents are only determined when I open the box.

Schrรถdinger would have liked that, I bet.

13.10.2025 12:22 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Makes me worry what new emojis we might see nextโ€ฆ

13.10.2025 10:50 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
The Country That Broke Kotlin Logic vs language: how a Turkish alphabet bug played a years-long game of hide-and-seek inside the Kotlin compiler

โšก Hackernews Top story: A years-long Turkish alphabet bug in the Kotlin compiler

12.10.2025 21:18 โ€” ๐Ÿ‘ 3    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Unit Tests Arenโ€™t Tests, Theyโ€™re Sensors A good unit test doesnโ€™t need to check whether the code works, just whether itโ€™s changed

Yes! Tests are for future-me scratching my head about what went wrong. Their whole purpose is to point me in the correct direction. I waffled about it a while ago: sam-cooper.medium.com/9574e7b8b7c7

I really like your idea of formalising test quality declaratively so tests can be linted for this!

13.10.2025 09:49 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

On LinkedIn I try to have a policy that if you try to sell me gen AI I will unfollow/mute. But that's becoming increasingly difficult as people whose posts I usually respect and enjoy start jumping on the AI crapwagon ๐Ÿ˜ข

13.10.2025 09:00 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Less exciting answer than you might think. The proposal for the emoji mentions that in an office environment, comparing someone to a potted plant is a humorous way to describe them as useless. Their source? Urban dictionary...

www.unicode.org/L2/L2018/182...

13.10.2025 08:31 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

๐Ÿค” I seem to be on the front page of Hacker News ๐Ÿคฏ๐Ÿคฏ๐Ÿคฏ

news.ycombinator.com/item?id=4555...

12.10.2025 21:19 โ€” ๐Ÿ‘ 3    ๐Ÿ” 1    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Preview
The Country That Broke Kotlin Logic vs language: how a Turkish alphabet bug played a years-long game of hide-and-seek inside the Kotlin compiler

The Country That Broke Kotlin https://lobste.rs/s/l6yqm8 #kotlin

12.10.2025 16:59 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Kotlin Weekly #480

Kotlin Weekly #480 has just been published! - mailchi.mp/kotlinweekly...

12.10.2025 16:20 โ€” ๐Ÿ‘ 4    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@sam-cooper is following 20 prominent accounts