View profile

"They are wise who do not grieve for the things which they have not..."

StoicallyTyped Newsletter
Welcome to the second half of 2021! We’re making it!
I moved to a new apartment over the weekend which has been quite the effort! If not for our friends and family we would still be moving… We still have much to unpack, but there’s always some time for Android! There is a ton of stuff in this issue. Check it out and let me know what you liked!

Year Progress
▓▓▓▓▓▓▓▓░░░░░░░ 53%
👾 Fun Stuff
Danny Preussler #blacklivesmatter
Also have one:
Android Studio: feature x is not available while indexing is in progress 😁 https://t.co/v776QpYnYV
Android GDE Q&A | Twitter Space
📚 TL;DRs
How to Write a CLI Tool with Kotlin Multiplatform
Sealed when's for Kotlin
🛠 For Your Toolkit
Jetbrains Toolbox App 1.21
👩‍💻 Interview Practice Question
Given a list of calendar events with the structure below, how would you group them by day of the week?
data class Event(val title: String, val day: String)
Respond to the question in a reply or the Tweet of this issue to have your answer included in next weeks issue!
⭐️ Answer to Last Week's Question
What are the different visibility modifiers in Kotlin?
Why are they useful?
Can you describe some use cases?
A visibility modifier or access specifier or access modifier is a concept that is used to define the scope of something in a programming language.
In Kotlin, we have four visibility modifiers:
  • private: visible inside that particular class or file containing the declaration.
  • protected: visible inside that particular class or file and also in the subclass of that particular class where it is declared.
  • internal: visible everywhere in that particular module.
  • public: visible to everyone.
Note: By default, the visibility modifier in Kotlin is public.
Here’s a use case for each modifier:
  • private: use to hide potentially unsafe access, i.e. a private mutable variable and a public immutable variable.
  • protected: Can be used with ViewHolders to restrict access of a variable to subclasses of the BaseViewHolder.
  • internal: Can be used to define test implementations of interfaces. The test implementation will only be available in that module and any modules dependent on it will not see the class.
  • public: Most common, use to make functions/variables visible to callers.
💭 Quote of the Week
“They are wise who do not grieve for the things which they have not, but rejoice for those which they have.”
- Epictetus (adapted)
Thank you Mark Allison
Mark Allison is taking a break from creating content for his blog, Styling Android. He has written and published up to 5 articles a month since 2011! As the above quote says, we must celebrate all of the years which Mark so graciously wrote for us. I remember reading his articles back when I was just getting started with Android.
Due to plagiarism and piracy he is taking a break for a while.
Thank you, Mark, for all of your contributions to the community. You have elevated us all over the years. We hope you have a great break!
You can read more directly from Mark here:
👋 Want to Contribute!?
Did I miss something great this week? Have a career question you want answered by the community? Send them to me on Twitter or reply to this email. I’d love to hear from you and chat!
If you enjoyed this issue consider sending it to someone you think might enjoy it.
Remember to stay hydrated and have a great week!
Don’t miss out on the other issues by Matt McKenna
Did you enjoy this issue? Yes No
Matt McKenna
Matt McKenna @himattm

Develop a thoughtful approach to software engineering. Focused on Android, applicable to all. Delivered Monday mornings to kick off your week.

You can manage your subscription here.
In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.