Kotlin Coroutine Confidence: misleading image or text (p 20ish)

The text "“ What we do have is that suspension-point icon next to awaitResponse,”
presumes we didn’t have those icons in the execute version “astronomy/v1/src/main/kotlin/com/example/astronomy/AstronomyApplication.kt”
but they appear in the same places in that example (which actually confused me but I assumed execute was a suspend method).

(I hopy you don’t mind these nitpicks. I figure bc it’s early beta, you want these.)

1 Like

This is a very interesting question that has got me thinking about how we’re presenting the code examples in the book.

In IntelliJ IDEA or Android Studio, there’s going to be an icon like this next to awaitResonse():

Screenshot 2025-04-04 at 16.19.08

The same icon certainly shouldn’t appear next to execute():

Screenshot 2025-04-04 at 16.18.12

But in the book itself, I use small arrows to indicate lines of code which are of particular interest, or which have changed since the previous version of the code. It’s true that both of those lines are highlighted with the same arrow when they appear in the book:

Screenshot 2025-04-04 at 16.23.32
Screenshot 2025-04-04 at 16.23.54

Those gray triangles/arrowheads aren’t supposed to indicate suspension points, just points of interest, but now that I look at it, I can certainly see how they could be interpreted as suspension-point icons! Using arrows to highlight lines of interest is a convention across many Pragmatic Bookshelf titles, but it’s an unfortunate coincidence that it happens to look similar to a different icon I’m describing at that point in the text.

Can you confirm whether the icons that confused you were the ones in the IDE, or the arrows that appear in the book itself? If it’s the ones in the book, do you have any suggestions for how we could make it clearer? Perhaps I should remove those arrowhead highlights entirely, or add a note explaining why they’re there.

Thank you so much for raising this. If I’m right that it’s the highlight icons in the book that are throwing you off, I hadn’t considered it, and I think it’s a very important point. And you’re right, nitpicks are great. They suit my perfectionist streak, and if the issues we’re finding are small ones, that helps me feel confident that there aren’t any big ones.

Just in the book.

Thanks for this Don, I will definitely look at changing something here to avoid the confusion.

Perhaps just a few words: such as “In the below example, the >> point out the important/changed lines.” “If you load the above code into IntelliJ, you’ll see that there are now suspend points (~>) where there weren’t in the prior iteration.”

1 Like

In Beta 3.0 I’m updating the text in this part of the chapter to make it much clearer that the icons I’m talking about are in the IDE, not in the book itself.

I might also add a note to explain how the highlight icons in the book (➤) are used—still thinking about that one.

Thanks for raising the issue!

1 Like