game

How to meditate without distraction

If you’re interested in meditating but can’t quite seem to do it without getting distracted, I recommend making a game of it. One game I use is, “How long can I take to count to five full breaths?”

The game itself is simple: Just before you begin to meditate, start a stopwatch on your phone. Then breathe in, and as you do so, internally say “one.” Then breathe out and internally (or externally) say “two.” Try to take these breaths as slowly as you can, with all of your focus on the current breath and current number. Keep doing this until you breathe out and say “ten,” and when that breath is finished, stop the stopwatch and see how long it took. The game is to make this time as long as possible.

How to write Akka Actors: An example video game

Way back in 2013 — before my first fake heart attack followed by learning that I had thyroid cancer — I thought I was about to go “back to work”, and I decided to try to write another visual demo of Akka Actors before I went back to work. I gave myself 10 hours to write something, and at first I decided to just create some bubbles that would move about randomly on screen. But I got that working so fast that I decided to do something else.

Eventually I came up with the idea of a little “kill the bubbles” game, which turned into a “kill the characters” game. This video shows how it works:

The gift of a few guilt-free days

I gave myself two gifts for Christmas: A set of new bathroom rugs, and a few guilt-free days to learn the LibGDX game framework so I can eventually rewrite my football game. (Usually I think, “You need to finish writing XYZ,” so “a few guilt-free days” means not having those thoughts, or having them but ignoring them.)

Libgdx and Android application Lifecycle alvin December 25, 2017 - 7:18pm

This is a good resource for LibGDX programming on Android.

This is a page from my book, “A Survival Guide for New Consultants”

The two things I learned in college

“The discipline of Zen consists in upsetting this groundwork once and for all, and reconstructing the old frame on an entirely new basis.”

D.T. Suzuki

I was talking to a friend the other day about what I learned in college, and I came to the conclusion that I learned two major things.

Make a game of active mindfulness meditation

The best advice I’ve gotten for practicing mindfulness meditation while not sitting in meditation – i.e., in active meditation – is to make something of a game of it. When I wash the dishes it’s like, “How deep can I get while I wash these dishes?” Or when talking to another person, you both put down the cellphones and think, “Okay, we’re both here right now, how much can we focus only on each other and be here in this moment while we talk? How deep can we go?”

I was reminded of this when I read this line recently: “Finally, I got it! The menial tasks I had been assigned to around the temple were meant to be an exercise in meditation. Whatever I was doing, my job was to try to stay in samadhi.”

(That quote comes from the book, The Science of Meditation.)

This is a page from my book, Functional Programming, Simplified

A Functional Game (With a Little Bit of State)

“In theory, theory and practice are the same. In practice, they’re not.”

Yogi Berra

Introduction

Now that I’ve given you a little background about what I think “state” is, let’s build a simple game that requires us to use state. I’ll build the game using recursion, and also immutable state — something I had never heard of when I first starting writing the Scala Cookbook.

XO Play lesson: Game perspective is important

One thing I learned last night about my XO Play football game is that even in a “thinking man’s game” like this, visual perspective is important. I thought I would like the game as I showed it yesteday, as if you were looking at it from a coordinator’s box or sideline seat, but even though this image is a poor mockup and the perspective isn’t great, I like it better. (And of course now this makes me want to show real players (with depth) instead of Xs and Os.)