Scala, Java, Unix, MacOS tutorials (page 357)

Yikes, with all the earthquakes we've had in Alaska this year I thought I'd start doing some research on the big one -- the 1964 Alaska earthquake. Here's a link to 1964 Alaska earthquake facts I've uncovered on my One Man's Alaska website.

2011 Update: Late February, 2011, and the earthquakes have started again in this part of Alaska. Yesterday there was a small earthquake near Wasilla and Palmer, and this morning there was an earthquake in Fairbanks, Alaska.

Android Eclipse FAQ: How do I create a new Android Virtual Device (AVD) emulator I can use in Eclipse?

There are at least two ways to create a new Android Virtual Device you can use in Eclipse: (a) Using the Eclipse Android GUI, and (b) using the Android command line.

How to create an AVD in Eclipse

Assuming your Android Eclipse work environment is set up properly, creating a new Android Virtual Device (AVD) is simple. Just follow these steps.

I'm getting closer to releasing my "programming language independent" CRUD generator application. I'm now calling it Cato. My previous code names for it were Db2App and SideKick, but when I thought about the name SideKick, I couldn't help but think about Inspector Clousseau's trusty sidekick Cato Fong, and thus the application name was born. :)

As I continue the development of my language-independent CRUD generator application, I thought I'd share a look at a Java Dao class template that I worked on this morning, as well as two simple JSP view templates I created.

I'm still spending a couple of hours a day working on my Java CRUD generator. Technically, because this is all driven by templates, this is also a PHP CRUD generator, and a Python CRUD generator, and in general a programming-language independent CRUD generator, but at the moment it seems easiest to refer to it as a "Java CRUD generator", so I'll call it that for the moment.

How my CRUD generator works

In today's update I'd like to show you how this works. In short, you start with a database table like this one:

Summary: Sun's former CEO starts a Ruby/Postgres company. Larry Ellison (Oracle) slams Sun management. James Gosling slams Oracle.

Wow, there are all sorts of fun things going on in the Java (or former-Java) world. First, former Sun CEO Jonathan Schwartz talks a lot about patents, including Sun's history with Microsoft, presumably because Oracle is suing Google over some Java patents that Sun would never sue for.

Way back in the late 1990s, I wrote a Java CRUD generator, which was based on the work of someone else. It was a static code generator, but like future dynamic frameworks like Ruby on Rails, CakePHP, and others, it scanned the database and generated source code from the database table definitions.

One of the things that isn't immediately obvious when using the True License Java license key manager software library is how to use the ObfuscatedString string class. In short, you're supposed to use this class to help obfuscate Java String objects that you might ordinarily include directly in your Java source code. If you're trying to protect your Java class (your intellectual property, or "IP"), you want to obfuscate these strings, otherwise they can be easily found by people trying to hack your code so they can use it freely.

(This is my Java TrueLicense example, Part 2. A link to Part 1 of this example is available below.)

A quick note here that if you need some Java code to open a URL in the default browser on a Mac OS X system, I just ran across this Java method in one of my programs that should do the trick:

I just ran across this link in my email about the Chief Architect of the Java Platform Group at Oracle, with his thoughts about how to proceed on the Java 7 and Java 8 platforms releases. I haven't paid attention to the "New Java Features" world in a while, but it's a short, interesting read about how they're thinking about proceeding with the Java 7 and Java 8 platform releases.

Perl write to file FAQ: Can you demonstrate an example of how to write to a file in Perl?

Somehow I managed to go all these years without showing a simple Perl "write to file" example. Let's fix that.

Perl “write to file” example

Here's a short snippet of code that shows how to write to a file in Perl:

In my new office setup my network router is now within eyesight of my desk, and even when I just have my iMac running, I can see the lights on the router constantly flickering, including the incoming and outgoing traffic lights. When I see this, I wonder, "What the Bleep is my Mac doing?" What is it downloading, or uploading?

Eclipse Android FAQ: How to set up the Eclipse Android development environment, including the Eclipse ADT and Android SDK.

After a little digging around I figured out how to install an Eclipse Android development environment, and I thought I'd share my installation notes here. The notes are a little shorter than my usual detailed explanations, but hopefully they're long enough.

To get the Android development environment working with Eclipse, you need to install two components onto your development system:

CakePHP naming conventions FAQ: Can you share some examples of the CakePHP naming conventions, specifically the CakePHP model, view, and controller naming conventions?

As I get back into the CakePHP development world, I wanted to make a little CakePHP naming conventions reference page, showing examples of the standard CakePHP naming conventions for CakePHP model, view, and controller elements.

Summary: How to use the Perl array chomp syntax to chomp every element in a Perl array.

PHP array FAQ: How do I iterate (loop) through a PHP array?

Answer: The easiest way to loop through a PHP array is to use the PHP foreach operator. If you have a simple one-dimensional array, like the $argv array which lets you access command line arguments, you can loop through it like this:

PHP database FAQ: How do I access the metadata for a database in PHP? That is, for a given database, how do I list the database tables, and fields for those tables?

Solution: I just started this script a little while ago, but even with my limited knowledge of PHP it was very easy to get access to the database metadata, including the database tables and the fields in each table.

iPhone 3G iOS4 performance problems update: Mr. Jobs said on August 19th an update was "coming soon." Fifteen long days of crashing iPhone apps and iPhone reboots, and still there is no update available. (Wait - an update has been promised for September 8, 2010.)

If you don't do anything to your Java application on a Mac OS X system, your Java class name will appear in the Mac menubar. Of course, this isn't a good thing. There are a couple of things you can do to get the name of your Java application on the Mac menu bar, and I'll share all of the ways I know how to do this. I've listed these techniques in order here from "easiest" to "best".