wesley tanaka

Leave you alone for five seconds

. . . and you draw all over your face with crayon.

First Math Lesson


ME: [trying to come up with a way to entertain Ryan while he's sitting in his high chair and I'm cooking] I'm going to teach you some math.  Do you want to learn math?

RYAN: [...]

ME: One plus one equals two.

RYAN: More Cheerios

ME: if you have one Cheerio and another one Cheerio, then you have two Cheerios

RYAN: mayihavemorecheeriospleasethankyou!

ME: [gets more Cheerios]

RYAN: [...]

ME: One plus one equals...

RYAN: [...]

ME: What is one plus one?

RYAN: [...]

Delayed gratification


The famous Stanford marshmallow experiment found that kids who were able to delay gratification (by forgoing one marshmallow now in favor of two marshmallows later) tended to have better outcomes later in life under various mesaures.

Disable autoraise in compiz

By default, if you enable enable sloppy focus in Unity in Ubuntu, auto-raise will be enabled. To turn it off:

sudo apt-get install dconf-tools

dconf write /org/gnome/desktop/wm/preferences/auto-raise false

This has been tested in Ubuntu 12.04 Precise Pangolin and in Ubuntu 13.10 Saucy Salamander

Lazy Parenting


I've seen firsthand and heard from various sources that many toddlers go through a phase of constantly asking questions. Even though people warn me that this phase is tiring, and I'll wish it was over, I've been actively trying to encourage my son to become an incessant-question-asker as soon as possible. Every time we're out and about, I've been teaching him how to ask "What's this?" and "What's that?"

java.lang.IllegalArgumentException: transactions on multiple entity groups only allowed in High Replication applications


If you run a Java Google App Engine unit test with a vanilla LocalDatastoreServiceTestConfig instance, you will run into the error java.lang.IllegalArgumentException: transactions on multiple entity groups only allowed in High Replication applications:

Keys-only query using JDO in Google App Engine Java


To turn a Java Google App Engine JDO query into a keys-only query, call setResult(String) on it to specify that only the @PrimaryKey column should be returned.  JDO will convert this into a keys-only query on the datastore.

For example, if your entity class looks like this:

public class YourEntity {
  private String name;
// ...

I love you


Call a JSP from a servlet


If you want to include/execute a .jsp file from within a servlet, you can use the forward() method of the request dispatcher.

Dog Grooming Shop

Roppongi, Tokyo, Japan

Syndicate content
by Wesley Tanaka