Sunday, April 1, 2012

Kilauea Lighthouse

Another favorite Kauai destination is Kilauea Lighthouse. Omitting the technical details about this lighthouse as there is ample information about it on the web and many island guides. Thousands of people photograph this also. This photo was taken as the sun was rising early one morning. The sun rises to the right of this photo. Sunrise plus the iron in the soil really brings out the red color. Anyway, I think what makes this a favorite of mine is because what going here reminds me of.

Going back to the 1970's (was that a long time ago or what), we would do family day trips on a weekend from the west side of the island all the way to the northern side. These day trips took all day long and just to let readers know, it was not with a horse and buggy. Nope, we had cars back then too.

It also meant driving through the big cities of Lihue and Kapaa. So after being in the car for what seemed like hours (maybe a full hour and a half), it was rewarding to get out of the car. I can't remember if we stopped at either a Dairy Queen or McDee's along the way for a snack or drink or something. There were more Dairy Queen's than McDee's. You see, Kauai at one time only had one McDee's and we were there when it had it's grand opening.

The northern most part of the island is a generally a little cooler than the west side. High cliffs looking over the ocean was a little different than being right as sea level. Along with the crashing waves and the soaring sea birds, this was quite a treat. 

Kilauea is seemingly far away from Kekaha, the hot west side of the island. Driving back always meant the weekend was over and the new week was ahead of us. Seemed to take a long time to drive back and that we would get back to Kekaha in the late afternoon. 

JAVA and MySql

It has been along time since the last blog with the Programming label. Glad to report that for the n'th time I'm relearning JAVA programming again. This time I hope to remain relatively current. In order to make this n'th attempt more interesting, I'm taking the plunge and learning the JAVA and MySql interface with the added plus of a gui interface.

Glad to report that I've has success at the JAVA, MySql, gui work. It was not really that difficult, lots of information on the web and consulting the JAVA For Dummies Book, also the O'Reilly MySql CookBook. Some of the things I've needed are NetBeans and a MySql download.


Granted, this is not that much to look at. It is not extremely complex internally either. There are four JButtons, db Connect, db Disconnect, db Query, and db Insert, pluse three OK buttons. Basic functionality is that the user will press the db Connect button. Once connected, the user presses the db Query button. The database is read and fills in those three vertical like jText areas. The user selects the information that filles into those jTest areas and presses the OK button. As the OK's are pressed, those selections shows up in the long horizontal box at the bottom of the gui. Pressing the db Insert will insert the string into the database table. Finally, that little text box to the right of db Connect shows all program status.

The prepass, aos, los/prepass labels show the times in which the widget moves from state to state in the automated painting process. 

That's about all it does. Surprisingly, the difficult parts were not the database interfaces. What did I learn from this project. Good question. Well, for the most part was understanding and getting familiar with event processing - pressing the buttons. Extracting the text information in the text areas. Perhaps the one thing that stands out the most is that larger text area at the bottom. There is no api for appending to what is in the jtext area. So, after some long thought, it finally dawned on me...how about reading what is in there, storing that in a string, then append your new stuff to that string, then put in back in the jtext area. So, that way my big take-away.

Next project I hope to be a simple check book program. It has several opportunities for database read, write, delete. Possible some stored procedures or database triggers. Remember now, triggers can only be saved into a database as user root.