What is the Harvard spectral classification?

1901 Annie Jump Cannon constructed this classification:

Class Temperature in K Color
O >= 30000 blue
B 10000 – 30000 blue white
A 7500 -10000 white
F 6000 – 7500 yellow white
G 5200 – 6000 yellow
K 3700 – 5200 light orange
M 2400 – 3700 orange red

Mnemoic: Oh, Be A Fine Galaxy, Kiss Me

How to create a mutable list in Kotlin?

Kotlin has its own keyword to create list which are mutable
As a child I learned that our solar system has nine planets

val planets = mutableListOf("Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto")
println(planets)

In 2006 Pluto was reclassified as a dwarf planet. So let’s remove Pluto

planets.remove("Pluto")
println(planets)

Network Requests with Volley

Consider Volley a 2.0 version of Android Asynchronous Http Client.

A major advantage of Volley over ASyncTask is that you can do multiple requests simultaneously without the overhead of thread management.

Gradle

Add

implementation 'com.android.volley:volley:1.2.1'

to your module gradle dependencies.

Basic Anatomy of a Volley Request

val queue = Volley.newRequestQueue(context)
val stringRequest = StringRequest(
    Request.Method.GET, url,
    { response ->
        Log.e(TAG, "success")
    },
    {
        Log.e(TAG, "error")
    })
queue.add(stringRequest)