Setting Up Sentry Logging with Scala / Play

Sentry is an error tracking service that helps you quickly track errors in many environments. While it’s not the only option for error reporting (Rollbar comes to mind since they sponsor most of the podcasts I listen to), Sentry is my favorite option. Today, we’re going to setup Sentry reporting for our Scala / Play application. Unfamiliar with Play?The Play framework is a web framework for building predictable and scalable applications. Featuring support for Java and Scala, the Play framework is a great consideration when choosing your next framework. Creating an account First, you’ll need to create a free account...

Adapting Traits for Kotlin

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 Traits have first-class support in Scala, Kotlin does not directly have Traits. However, Kotlin does support default interface implementations, just like Java 8. It’s fair to assume then, that Kotlin can have a similar concept of Traits only constructed from Interfaces with default implementations. In...

Developer Burnout: 9 Tips to Help

Burnout happens — especially developer burnout. It’s unfortunate, but a fact of life. However, it seems to happen to developers (and maybe Doctors, but you’re not my target audience) far more often than other professions. It may manifest in the emotion of dread, knowing you have to go in to work tomorrow. Or it may manifest in sadness, just thinking about staring at code. Or it may possibly manifest as anger, thinking about the project that won’t seem to work. Unfortunately, we’ve found that ping-pong tables and dart boards aren’t the cure for developer burnout. Instead, we’ve seen that being...

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 of Spark: Scala! If you’ve made it this far through my silliness, you’re likely comparing Kotlin to Scala for your next project. There’s definitely some key takeaways from the above paragraph that may influence your decision. However there’s more to each language than I could...

What is Android’s SurfaceFlinger

Android’s SurfaceFlinger is a system service provided on the Android Operating System. Now that that is out of the way… What does it actually do? If you’ve worked with scrolling, you’ll know that “flinging” is an action that a user can do, but it’s not related to that. Actually, the SurfaceFlinger is a service that plays a critical part in determining what is rendered on the screen on any Android device. It’s important to note that the SurfaceFlinger doesn’t directly render anything to the screen. In fact, all it does is merely composite buffers of data before handing them off...

The Complete Guide to Dimensions in Android

Figuring out when to use dimensions in Android can be a tricky time. Should all values be a dimension? How about none of them? You could argue that both of these are valid, but I’d like to clear the air with the statement “sometimes you should use dimension values.” But how do you know when? What are dimensions?If you’re not sure what a dimensions value is, it’s an XML value that lives in your project’s res/values folder, under dimens.xml. They’re intended to be used for styling dimensions (hence the name) such as width, height, etc. Dimensions for Reusability The simplest...

PHP: Add to an Array

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 declare an array to work with. Arrays can be declared similarly to map, but you can freely omit the keys. $array = array(1,2,3,4); Now that we have an array, we can see how easy it is to add to an array like so: $array[] =...