Adapting Traits for Kotlin

A Macbook pro with code on the screen, a small notepad and blue ink gel pen.

Traits are a pattern introduced in Scala (at least, this was my first introduction to them) that help avoid deep class hierarchies in favor of composition. If you don’t have Scala experience, but do have Java experience, you can treat this similarly to Java 8 Interfaces. However, I still prefer to call them Traits. Although […]

Comparing Kotlin to Scala

Kotlin to Scala. Scala to Kotlin. Two contenders for my heart. In the left corner, we have the new comer! Weighing in at just over 1.2MB — The Ambassador of Android: Kotlin! And in the right corner, we have the long-time favorite, weighing in at just over 5.3MB — The Archduke of Akka, The Sultan […]

PHP: Add to an Array

A close up of PHP code

It’s very common to find yourself working with Arrays in any language, and PHP is no exception. If you’re reading this, you probably want to find out how to add to an array in PHP but there’s one thing to cover first! Unlike most other languages, arrays in PHP are just an ordered map! Let’s […]