Lately, I have been experimenting with different storage engines. MongoDB is interesting, especially to the developer in me, the ability to get JSON objects in one simple call is attractive. Most recently, with a little help from Tom I have setup Oracle 11g Express, simply to get a feel for how it operates.

First off, the nomenclature is different than what I'm used to, so I have to get my head around that. Authentication is different too. Gone are the user:host users of MySQL. Good riddance! In Oracle, users are users. Interestingly, when creating a user, they automatically get their own "schema," akin to a MySQL database,

I explored Oracle's Application Express, but being more of a command line guy, I ditched that and started poking around with SQL*Plus. After figuring out how to view tables (SELECT * FROM CAT instead of SHOW TABLES) etc, it felt much like learning a new programming language. The main concepts are similar to other RDBMS's and it ends up being more about learning the semantics than new concepts. Sure, some things are different, but if you know SQL, you can get around in Oracle - at least from a data perspective.

With little difficulty, I was able to install Oracle 11g Express, create a user, grant privileges, create tables, and insert data. I then installed php-oci8 and pulled out the data.

To become a true Oracle DBA, however, and learning how Oracle is working behind the scenes, creating clusters and other administrative tasks - that will take time and perhaps a few courses.

Android Development
09 March 2012

I've been out of the Android development game for some time now. A little over a year, if I check the commit log on my projects. A friend's recent foray into this world encouraged me to look at refreshing my apps.

I have an app called WebsiteMonitor. The idea is that it polls a list of URLs and alerts you when any of them return a response code other than 200 (ok). This was inspired by my former job where I needed to make sure webservices were up and running at all times.

It had some serious limitations. First off, it was developed for Android 1.5. Second, it was using a widget to periodically poll, where the minimum refresh time is 1 hour, and doesn't alert you when your phone is sleeping. My current rating isn't the greatest, but what can you expect if I can't spend a lot of time on it, and it's pretty stale.

Well now the Android development landscape has changed significantly. The community appears to be way more active that it was a year ago with many more helpful tutorials and advice than there were when I first started. In pretty short order I was able to add quite a few features:

  • configurations
  • custom ringtone
  • enable notifications (persistent if you want)
  • a polling service so it runs while your phone is idle
  • less false negatives. This remains to be verified, but I think it's better

I haven't published it yet since I'm waiting for it to cook a while on my phone and a friend's. If it does ok over the next few days the plan is to put it up for download shortly. In the meantime, you can help test it or download the old version.

MySQL Connections
07 March 2012

We've been having connection issues with our MySQL servers at work. Today I see a lot of connections that have been open for 1000+ seconds. Here's a quick way to find them:

mysqladmin processlist | grep [databasename] | awk '{if($12>1000) print $2, $6, $12}'
You want to grep for the database name so you don't inadvertently get and kill system processes. You could also put the condition in the awk where clause for more accuracy.

Then you can take that list and kill the mysql process ids

mysqladmin kill [id1],[id2],[id3]....
If you're really adventurous, you could pipe the ID's straight to mysqladmin kill, but that's a little dangerous.

If you ever find yourself in a 2004ish Jeep Grand Cherokee and the interior lights won't turn off and the driver's side controls stop working, you have a broken power wire between the door and the rest of the vehicle.

Pull back the ribbed rubber that covers the wires. It helps to take the plastic connector out of the door, but chances are you'll break some brittle plastic tabs like I did. Still went back together though.

The power wire is red with a white stripe. It should be obviously broken. Fix that (soldering preferably, although the wire is pretty thick and it's a tight spot to solder in) and you should be good to go.


Fatal error: Uncaught Error: Undefined constant "Math" in /home/sgreimer/ Stack trace: #0 /home/sgreimer/ TagCloud->showCloud() #1 /home/sgreimer/ include('/home/sgreimer/...') #2 /home/sgreimer/ include('/home/sgreimer/...') #3 /home/sgreimer/ Page->show() #4 {main} thrown in /home/sgreimer/ on line 188