How I made my Android Galaxy S3 phone run faster

My primary phone is a Samsung Galaxy S3 running Android 4.4.2 Kit Kat. It’s a little old at this point, but I’m disinclined to upgrade for the sake of upgrading. It was getting slower, so I’ve recently taken a number of steps to tune and optimize its performance.

Things I’ve done to make Android slower

1. Enable device encryption

If someone were to steal my phone without encryption, they would be able to hijack any number of my online accounts through email password resets. This is a frightening possibility, and the surest way to protect against it is to encrypt your device.

Device encryption would be mandatory if I chose to access work email on phone, but that is something I choose to avoid.

2. Encrypt microSD storage

Samsung Galaxy S2 through S5 were fantastic phones in that they have replaceable batteries and expandable storage. I’ve recently added a high performance 32GB microSD card to my phone, and sensibly encrypted it.

Things I’ve done to make Android faster

1. Replace Samsung keyboard with anything else

Ever since I purchased my phone, it’s had an infuriating multi-second delay in bringing up the Samsung touch keyboard. I’ve recently switched to the Google Keyboard available in the Google Play app store, and the difference is night and day. The Keyboard comes up instantaneously.

I’ve also heard great things about Swype.

2. Clear caches with CCleaner

Back when I was a Windows user, CCleaner was the one reputable, malware free application for tuning Windows. They have an Android version that does a good job of clearing the many caches and temporary files of your Android apps.

3. Delete all photos

Dropbox automatically backs up all of my photos, so there’s absolutely no reason to keep them on disk. Having a full file system on your Android phone reduces file system and encryption performance.

I went into the Gallery app and bulk-deleted all my old photos.

4. Move applications to external storage

The built-in storage on your phone is not as performant as a quality microSD card. Many applications will let you relocate them after installation to the microSD storage.

5. Disable animated transitions

You can enable developer mode on Android without jailbreaking.

Once you do, you can go into Settings > More > Developer options and disable all useless animations. This is something I’ve done in the past on other operating systems. On Android, I again got better responsiveness and minimal difference in visual experience.

6. Get an extended battery

Samsung phones other than the newest Galaxy S6 have user-serviceable batteries. That means you can easily purchase a replacement battery, an external spare battery charger, or an extended battery.

Since I’ve gotten an extended battery, my phone lasts two whole days on a single charge. This is fantastic for my user experience.

Going beyond

One thing I haven’t done is root or jailbreak my device. If you do jailbreak, you can uninstall all the bundleware cruft that Samsung puts on the phone.

Note that if you do intend to use your phone to access work email, there may be a policy against jailbreaking your device.

Installing DB2 10.1 on Mac OS X

It’s incredibly useful to have a local installation of DB2 on your Mac workstation for development and test purposes. I have a local installation to develop DB2-backed Ruby on Rails applications.

Here are the current instructions for installing DB2 on Mac OS X, courtesy of my colleague Kevin Rose:

Instructions to install DB2 v10.1 on Mac OS X Yosemite:

Prerequisite: XCode developer tools must be installed. These can be installed from the Mac App Store.

1. Ensure the following entries are in the /etc/sysctl.conf. Create the file /etc/sysctl.conf if it does not exist.

Restart your Mac after creating the file to make the values take effect.

2. Open a terminal with a shell for the the user that will become instance owner.

3. Ensure that otool is in the path. Execute otool:

If the error is “command not found” then run the following

4. Extract the DB2 install image from the tar archive:

The image will be extracted into an expc directory.

5. Enter the expc directory and run the installer and perform a non-root install:

This will install DB2 to the following default location: /Users/$(whoami)/sqllib

Execute step 6 if you need to enable connections for a userid other than the instance owner:

6. Enable OS authentication. (You need to be an Admin user to run these commands):

The instructions for starting DB2 and configuring remote access are the same as before.

Free Apache Spark course with Docker image

My friends over at Big Data University just launched a refresh of their Apache Spark course. Spark is an engine for processing and mining large amounts of data quickly.

The course takes advantage of a Docker image for Spark. Docker provides a way to run Spark on a typical laptop without getting a beefy server.

Spark’s on my personal to-learn list, so I just pencilled in a slot to take the course myself on my calendar.

Dockerize all the things

Dockerize all the things As my team creates new web apps and microservices in Rails, Meteor JS, and other stacks, we dockerize them. Docker is great because it enforces loose coupling, modular design, and process isolation.

A Docker container can be thought of as a very lightweight VM that shares a Linux kernel with its host. The infrastructure and tooling around it makes configuration management, scaling, and efficient use of resources easier.

My team’s also dockerized the Informix and DB2 database servers. The direct hardware access that Docker allows will give you better performance than you’d have seen with a VM equivalent in the past, while the container format allows for easy automation, operation, and management.

Unix command of the day: watch

The project I’m working on right now involve not just Dockerized Rails microservices, Meteor JS, and a data set measured in tens of terabytes, but also a big Bash code base.

Bash is a language that makes it easy to shoot yourself in the foot. I have some thoughts on how to write robust, modular, loosely coupled, unit tested Bash that go beyond Bash strict mode and shellcheck. However, let’s save those for later.

Here’s a useful shell command for today: watch

watch will run a command for you every few seconds and output the results on a clean screen. If you combine it with a split-screen or split-pane tool, you can quickly create a mini-dashboard.

For example, watch -n15 df -h will print your free disk space every 15 seconds:

By way of another example, watch -n60 db2 list utilities show detail will check on the status of your DB2 load and other operations every 60 seconds.

Mac OS X does not include watch by default. Assuming you have Homebrew, the following will install watch for you: cannot open shared object file

I got this error starting a ruby application:

An .so is a Linux library, equivalent to a .dll on Windows or a .dylib on Mac. Note that there are two different libraries mentioned. is present, while is missing.

You can verify the dependencies using the ldd command:

For me, the issue was caused by a missing IBM Data Server Driver directory. IBM_DB_LIB was pointing to a non-existent directory:

Reinstalling the Data Server Driver restored the and eliminated the error.

(If you run into this issue with different libraries, you will likely need to examine your LD_LIBRARY_PATH environment variable and use the ldconfig command to reload any changes.)

How to run and install IPMIView on Mac

Softlayer cloud uses IPMIView for direct console access to bare metal hardware. SuperMicro makes a Mac version of IPMIView available for download.

Bizarrely, SuperMicro doesn’t appear to have ever tested it, because double-clicking on the downloaded IPMIView20 application doesn’t do anything. This is because someone forgot to set the execute permission on the installer.

Supposing it’s in your downloads folder, open up Terminal and run the following commands:

This will open up the installer for you. Once it’s installed, it will show up in your Launchpad like a normal application.