android

Scala/Java: How to convert a stack trace to a string for printing with a logger

As a quick note, I just got a little bit better about logging stack traces when writing Java or Scala code. In Scala I used to get the text from a stack trace and then log it like this:

// this works, but it's not too useful/readable
logger.error(exception.getStackTrace.mkString("\n"))

In that code, getStackTrace returns a sequence, which I convert to a String before printing it.

XO Play (Android football game)

XO Play is a “thinking man’s” football game that I created for Android devices. It’s for those of us who enjoy thinking about football strategy, of how to take advantage of our strengths and our opponents’ weaknesses, and how to call plays to win games. If you’ve ever watched a football game and thought, “I can call plays better than this guy,” XO Play is for you.

Version 1.4

Version 1.4 introduces four game levels you can choose from:

XO Play help text

This is the “help” text for my Android football game XO Play.

Changes in Version 1.4

Released on July 14, 2019, Version 1.4 introduces four new game levels:

A Java JFreeChart x/y plot/chart/graph example

In an effort to share some source code (but without taking the time to explain it), here’s some Java source code that I just used to create a JFreeChart chart/graph of some data that I use in my Android football game:

Mobile is not a neutral platform

Ben Evans has an interesting article from 2015 titled, Mobile is not a neutral platform. Here’s a good quote:

“Of course, all this sort of stuff is a big reason why Google bought Android in the first place — Google was afraid that Microsoft (it was that long ago) would dominate mobile operating systems and shut it out. The obvious fear was around things like preloads, and the justice of that fear was proven right with Maps, where Apple Maps now has 2-3x more users on iOS than does Google Maps, despite being a weaker product — the ‘good enough’ default wins and the platform owner chooses what that is.”

Over 100 of my favorite “mindfulness” quotes

This page contains a list of my favorite “mindfulness reminder” quotes. In particular these are short, concise quotes that I think work well with my “Just Be” mobile app.

Just Be is currently an app for Android users. If you haven’t seen it before, this is what the reminders/notifications look like when you receive them on an Android phone or tablet:

RxJava’s Side Effect Methods

RxJava's Observable class has plenty of methods that can be used to transform the stream of emitted items to the kind of data that you need. Those methods are at the very core of RxJava and form a big part of it's attraction. But there are other methods, that do not change the stream of items in any way - I call those methods side effect methods.