KHPtech
Kevin H. Patterson's Web Presence
Home
- Dynamic Template
- Fullahead
- ThreeTree
- The Bomb Site
- Just Another Theme
This sidebar can be used to jump to sections within the page, or other sub pages of the active tab.
Using this approach, you shouldn't need breadcrumbs since you've provided your visitor with a visual cue to where they are in the site.
A Note About My Computing Background
Here’s a bit about my computing background and why I currently use a Mac as my primary development platform, in case anyone finds it interesting.
My first computer was a TI-99/4A. I taught myself BASIC on this machine in the late ’80s. (Designed in 1979, the 16-bit TI-99 was far ahead of its time, but poor management and marketing at Texas Instruments killed their computer division.)
Most of my elementary school classrooms had TI computers. Most of my secondary classrooms had pre-Mac Apple computers. In high school we had a computer lab consisting of IBM PS/2 machines.
My second computer was an IBM PS/2 with an 8086 CPU running at 8 MHz. I went much deeper into BASIC on this machine, and eventually purchased Microsoft QuickBasic in order to compile applications. I also taught myself x86 and x87 assembly language. Many of my programs really pushed the limits of this machine’s graphics and sound capabilities.
I eventually got a Pentium machine running Windows 95. I moved from BASIC to Visual Basic, and expanded my assembly language skills to include 32-bit protected mode. I learned the Windows API, ActiveX, DirectX, OpenGL, and TCP/IP.
During this period I also worked for a fortune 500 corporation doing network administration, infrastructure maintenance, and desktop support. This environment involved a good number of windows servers, Oracle, Netware, as well as an IBM AS/400 with both native and Windows-based terminals running Rumba. Most of their workstations were running Windows 95 or NT at the time. Desktops ran Microsoft Office. The entire accounting / inventory system ran on the AS/400 (AIX Unix). There were a number of industrial control systems running embedded software (PLCs, Ladder Logic, etc.)
It was around 2000 that I discovered the amazing but ill-fated BeOS. Here was clean, lightweight yet powerful platform based on a beautiful C++ API with POSIX support. This really opened my eyes to the layers of bloat and legacy baggage propping up Windows as an OS. I learned C++, wrote some apps, and enjoyed a small, vibrant, friendly, and amazingly open developer community. From a developer’s standpoint, it was like walking out of a cave into a bright, beautiful paradise.
The eventual demise of Be, Inc. taught me something interesting. Windows wasn’t dominant because it had a better design or better technology. It was the sheer level of entrenchment coupled with heavy-handed anti-competitive tactics that Microsoft relied on to keep Windows #1. The blinders were off, and I knew that better possibilities existed.
Many of those who started Be, Inc. had come from Apple Computer. It just so happened that Apple was making the transition to OS X around the same time that Be went out of business. Some Be’s engineers even went back.
I continued to explore different OSes. I played around with some small projects, as well as different flavors of Linux. Gentoo was a favorite. I also discovered FreeBSD, imho the best example of the “real thing” in servers (Linux = BSD + Hype (and GPL fanaticism)).
Around the same time, I also took a job where I was made responsible for managing a lab of computers running Mac OS X. I was new to Mac OS X as a domain controller, and it was a bit of a learning curve. But as they say, “no pain, no gain.” I bit the bullet and was rewarded immensely. What a discovered was a much more refined and integrated network administration experience. I also got to experience the beauty of MacOS X on the desktop from day-to-day. The UNIX underpinning was the icing on the cake.
Today I manage a campus network environment with both Windows and Mac servers, a Mac-based computer lab, and both Mac and Windows desktop support across different departments. Support issues between Windows and Mac are like night and day for the most part. There are at least two other network administrators for PC support, while I manage the Mac support by myself. This has had an influence, to the point that Mac has arguably become the computer of choice for the majority of students and many staff as well.
The Mac platform has proven itself to be worth the somewhat higher initial cost in hardware. The general lack of issues and top-to-bottom integration has won a lot of people over. The Mac platform has also proven to be advantageous when it comes to systems integration, leveraging open standards and cross-platform technologies. This has allowed us to develop and deploy a custom network access control system running on FreeBSD, completely integrated with our Mac-based user management. All of our core network services run on Mac OS X server, with the exception of SMB and Active Directory on a Windows server (solely for the Windows clients).
I highly recommend checking out the two links I posted earlier. I see a bright future ahead for the Mac platform. The Mac “ecosystem” is simply a cleaner, more fertile environment, which offers a better overall user experience in many cases. Switching to Mac is simply a matter of significant exposure and a willingness to try something different; it isn’t always easy, but it is well worth the effort.
Worldwide Earthquake Statistics
Ok, time for a little Science™.
Recently I was intrigued by some reports on the Internet showing drastically increased earthquake activity in recent years. The data claims to be sourced from the USGS website. So naturally, I decided to download the data and analyze it for myself.
After all that work, I decided I should post something here for anyone else interested.
First off, full disclosure of my sources:
My data comes from the USGS, from two datasets. The first dataset is called the “Centennial Earthquake Catalog”, and it can be found here. It does not include any earthquakes less than M 5.5, and extends from 1900 to April 2002. For reasons mentioned below, I only looked at data from 1973 onward.
The second dataset is called the “USGS/NEIC (PDE)”, and a query tool can be found here. This has a much larger set of entries for the time period we are considering. The NEIC dataset begins at 1973, which is why I only use the Centennial dataset from 1973 onward.
A word about the data
The Centennial dataset is by far the smaller of the two datasets for the time period I am considering. During any particular time period, it appears to have only a small fraction of the entries that the NEIC dataset would have during the same time period, even for M 6.0 and greater. It also terminates in April 2002. I believe this dataset represents earthquake statistics gathered by the USGS from published sources. You can see that it often correlates many different reports on the same quake, if you look at the data.
The NEIC dataset is much denser, and as far as I can tell it is made of up data that is constantly being fed from seismographs worldwide. Thus, I would expect this dataset to have a definite increase in density over time, as earthquake reporting improves and more seismographs are installed. Someone please correct me if I’m wrong.
I downloaded the entire Centennial dataset, and queried the NEIC dataset for the years 1973-2010, M 3.0 or greater. All data was converted to a common csv format and imported into a MySQL database. There are 8333 entries from the Centennial dataset, and 448624 entries from the NEIC dataset.
Frequency Graphs
I produced a number of different graphs to help me analyze the data. First, I wanted to see to total number of earthquakes per year.

This graph shows the number of earthquakes per year, M 3.0 or greater, categorized by magnitude range, from the NEIC dataset.
Here is the data from the Centennial dataset. Notice that the data only shows quakes M 5.5 or greater:

I made another graph of the NEIC data showing only quakes M 5.0 or greater for comparison:

Force Graphs
After looking at this data for a while, I started to think “lots of small earthquakes may not be as significant as a few large ones”. This is because the Richter scale is a logarithmic scale. An increase of 1 unit on the Richter scale equals 10x the ground motion (displacement). And furthermore, increase of 1 unit on the Richter scale equals about 32x the destructive force (energy). See here.
So I made some new graphs showing total magnitude, total displacement, and total energy of all earthquakes in a given year.
Now, the “total destructive force” for all earthquakes in a single year is a very large, absolutely meaningless number. As is total ground motion. As is “total” magnitude on the Richter scale. It would be hard to relate these numbers to anything, let alone put them on the same graph. So here’s what I did:
I found the maximum for all 3 sets, and then graphed each set as a percentage of the maximum. This is why I am calling them “normalized” values on the graphs below. In this way, you can easily see the overall trends as well as the relationship between these 3 values. Just keep in mind that there is no “absolute” relationship between the lines, so if one goes above or below another that doesn’t mean anything. What is important is how they track each other following the trends.
Ok, enough of that. If you want the formulas for how I calculated the numbers, they are below the first graph.
First, the NEIC data:

The blue line shows total magnitude (sum of magnitudes) for all quakes during a given year. (Probably a meaningless metric)
The green line shows total displacement (movement of the earth) for all quakes during a given year. This is calculated as ∑(10M) for each year.
The yellow line shows total energy (destructive power) for all quakes during a given year. This is calculated as ∑((101.5)M) for each year. This is probably the most important metric.
Now the Centennial data:

Finally, the NEIC data restricted to M 5.0 and above, for better comparison with the Centennial data:

Conclusion
As you can see, there is a lot a variation in the graphs, but there is also an overall constancy. I will refrain from any special interpretation here.
You can definitely see a slightly upward linear trend in the NEIC data, especially when we include quakes below M 5.0. This is probably due to the constant improvement in detection and reporting worldwide, which mostly results in a greater number of recorded small-magnitude quakes. This conclusion is also supported by the USGS’ own explanation.
It is much harder to see a trend in the Centennial dataset. It is a much more sparse dataset and covers a narrow range of magnitudes over a shorter time. Overall the linear trend here seems almost flat.
When we look at the force graphs, here again we can see a slight upward linear trend, especially in the NEIC dataset. The interesting thing to note here is that this trend is still visible even when we restrict ourselves to M 5.0 and higher. Why?
Probably somewhat due to more and better reporting, but if you compare the frequency and force graphs, you will notice that there have been a few more large earthquakes in the last 10 years or so, and because of the math, it makes a big difference.
The most significant real-world impact is probably represented by the yellow “energy” line, representing total destructive force. It peaked in 2004, almost entirely as a result of the Asian Tsunami quake of that year.
2008 had an unusually high number of small-magnitude earthquakes. This gives you peak magnitude and displacement totals in 2008, but yields only an average total destructive energy. 2008 is still the most unusual year in the data, IMHO.
The Centennial graphs show peaks in 1995 and 2000-2001. These look really big but keep in mind they are just normalized values. They correspond to the moderate bumps in 1995 and 2000-2001 on the NEIC graphs.
Also notice that the last datapoint on all the graphs is lower than it should be; the totals for 2002 (Centennial) and 2009 (NEIC) are incomplete. The Centennial data ended on April 1, so you could roughly estimate the correct value by multiplying by 4. I believe The NEIC data is current through December 1, so it’s about 92% there.
If anyone wants a copy of my dataset, shoot me an email.
Using the Yamaha MOTIF XS with Snow Leopard
I recently upgraded my laptop to Mac OS X 10.6 Snow Leopard, and discovered that my mLAN driver (which connects my system to the XS 8 over firewire) no longer worked. (This would also apply to the MOTIF XS 6 or 7 with the optional firewire card.)
It appears that Yamaha is replacing the mLAN driver with something called the “Yamaha Steinberg FW Driver”. I don’t know if the new driver does everything that mLAN does, but I just need to connect my DAW with this keyboard for now.
Here’s what I did to get things working:
Warning: The firmware updates on this page can permanently damage your MOTIF if Yamaha’s instructions are not followed carefully, or if the update process is interrupted by power loss, cable disconnection, etc. Make sure everything is plugged into a UPS and don’t do anything stupid. The author will not he held responsible for anything that happens following this guide. Proceed at your own risk.
1. Make sure your MOTIF XS OS Firmware is at least 1.10 or later before starting.
As of the time of this writing, the latest available OS firmware is 1.55, which you can download here under the title “MOTIF XS OS Updater V1.55”
Please follow the directions carefully if you need to update your firmware. (If your firmware is 1.10 or later, you don’t need to upgrade to 1.55 at this step.)
2. Upgrade your MOTIF XS Firewire firmware to 1.07 or later. This is necessary to support the new “Yamaha Steinberg FW Driver”. This updater can be found here under the title “IEEE1394 Firmware Updater Ver.1.07 for Mac OS X”
Please follow the directions carefully if you need to update. The updater application will show you what version you have before you start the update.
3. After the Firewire firmware update has successfully installed and you have restarted your MOTIF, you need to change a setting on the MOTIF. This can be accessed by pressing [UTILITY], [F1 / General], [SF4 / AutoLoad]. Change the “IEEE1394 Driver” setting to “FW”. You will need to press [STORE] and then restart the MOTIF.
4. Install the “Yamaha Steinberg FW Driver” software, which can be downloaded here under the title “Yamaha Steinberg FW Driver V1.1.0 for Mac OS X”.
5. It’s probably a good idea to restart your Mac. The new driver has a control application located in /Applications/Yamaha.
At this point the basic functionality should be working. You may also want to download updates to Yamaha’s utility applications, like Studio Manager, XS Editor, Steinberg DAW Extensions, etc.
This would also be a logical time to consider upgrading the MOTIF XS OS firmware to the latest version, as described in step 1. Remember to back up ALL the user content on the MOTIF to a USB drive first!