Sunday, October 31, 2010

Kitchen Remodel, D-Day -1


And we reach a time of home ownership where it is time (or past time) to remodel the kitchen. Having lived in the house for nearly 20 years, the kitchen was in fairly good shape when we moved in. It offered ample storage and was a big change from apartment living and duplex living, plus it is ours. Well, it's time to get a new kitchen with modern cabinets, LED lighting, a hood over the stove, nice counter top and stainless steel sink. This is all just weeks away.

So here we are, demolition day - 1, meaning, tomorrow the guys show up to remove the cabinets, move the stove in the garage, and the refrigerator to the living room which is now our kitchen. Each cabinet has been emptied, the pantries are bare. All nick-nacks removed. Even in the family room which had the big tv, DVR, filing cabinets, work area, modem, router, lamps, dinner table, futon, pictures on the walls, it's all stored away for the month.

Tonight I'm typing this from the bare family room looking at a kitchen that will be gone tomorrow. The typing on the computer keys echo's in this room. It is that bare. It starts at 8:00 tomorrow morning.

Addition to this post, the photo shows how the kitchen looks after demolition.

Ok, I tried something different

Last work blog described the morning routine when I get to work, not in any specific order, it was turn on the computers, log on, check the email. Those things are part of the routine that can't be changed. But I did try something new.

It was not the walk around the parking lot as I had hoped. What was different was that I had brought in a couple Dr Peppers. This was a nice change from the routine of having to go to the soda machine and buy one - with the chance of the machine not having any. A little cheaper too.

A walk around the parking lot will be helpful, and next time, I'll try it.

Wednesday, October 27, 2010

Daily morning routine

Things I do when I get to work: get a cup of water, turn on and log into one computer, then, log onto another computer. Then, open Outlook on one computer. Then, secure log into that first computer and open Outlook on that one.

Phew, then I go through the emails that came in from 4pm yesterday until 7am today (or current day). I've done this for years.

Not that I'm tired or anything like that, it's just that morning routine thing that you do five times a week. It used to include making a pot of coffee. But I quit that due to stomach problems. So now, a cup of water is fine. A Dr. Pepper is ok too, once the fizz has gone away. The taste is good, has caffein like coffee and is easy on the tummy.

I'd need to change my routine a bit. Maybe, get those machines turned on, then go for a quick walk around the parking lot to relax before the email.

Wednesday, October 13, 2010

Upper Sycamore Canyon Trail to Sycamore Canyon Fire Road


Total distance is 4.38 miles. I chose this because I've never been on the Upper Sycamore Canyon Trail, though have been on the Sycamore Canyon Fire Road. The Fire Road is a well paved road that is popular downhill with cyclists. The Fire Road descends fairly steeply to a steel and wooden bridge spanning the seasonal river bed. Once past the bridge, I took the left turn onto the Upper Sycamore Canyon Trail. Going straight will bring you to a Ranger Cabin and eventually to the beach. So, taking that left turn, the Upper Sycamore Canyon Trail follows the seasonal river bed and winds its way on a gentle upslope. On thing in particular interest is a iron pipe that follows the seasonal river bed. It seems to be in good shape and intact. It got me wondering of the difficulty it was laying that pipe, from point A to point B along the riverbed, as straight as it is.

I found going down hill on that Fire Road was more difficult than going up since you need to be aware and apply your "leg breaks" the whole time. The gentle upslope, then the harder upslope on the other hand I found physically easier. Overall difficulty is more on the La Jolla Canyon than the Chumash Trail. The distance is good, 4.38 miles and took just about 1.5 hours. So you won't spend all day huffing and puffing. There was some good sweat and the temperature was in the upper 80's.

Using this as a conditioning hike for Kauai would work well for the Waipoo Fall's hike because it does have the distance and tolerable terrain elevation changes. Although, Waipoo Fall's Canyon Trail does have steeper areas. Overall, this would fit well.

The gear list was standard: backpack; gps; camera; 1 liter of water (two 500 ml bottles); small gatorade. Those Nike hiking shoes were rendered useless and tossed, so I used 10 year old combat boot's which have served me well. They do fit and I had nothing else to use. There was some foot pain that followed. I'd think new inserts are in order and I'll give that a try.

By the way, I did remember to reset the trip computer on the gps.

Saturday, October 9, 2010

Fun with Netbeans


Netbeans is a GUI tool used to write Java programs. Every now and then I like to dabble in Java, writing small programs to improve my Java knowledge. For the past couple of day's I've been thinking that I need to dust off my Java and write something that is useful, relevant, and instructional.

So, I chose to do a very small project that has two jLists, three jButtons, and a jText for output. One of the jLists contains the names of several Hawaiian Islands, the other has "737-1, 737-2, ,737-3, 737-4". jButton one is for "go", the second jButton is to "clear", the third jButton is "quit". The jText area is to display various textual items while the program runs. What the output should look like is:

Kauai 737-1
Oahu 737-1
Maui 737-1
Lanai 737-1
Molokai 737-1
Hawaii 737-1

Then, repeats with the other 737's, -2 through -4.

Using the Netbeans GUI, it is fairly easy to create the GUI, create and populate the jList's, add and rename the three jButtons, and add that jText area. Using the "Properties" for each of these elements, having Netbeans add in the EventListener code is not that straight forward and to master Netbeans, this would take a lot of repetition. The jList EventListeners took the longest to figure out. Well, once the GUI and EventListeners were up and running, time to move to part two. Being able to get those selections from the jList's and do something with them. That turned out to be a challenge.

Seem's (which is fine), the EventListener code that is generated are of type,

//private void ClearButtonActionPerformed(java.awt.event.ActionEvent evt).

The private void functions are just that, private functions. The various data inside them are private to that function. Well, the information I need is in that function, just how will I be able to access these strings and take them out of this function. Answer is, use a Vector data type that is defined outside of all private functions. Using Netbeans, the only place to put publicly accessible datatypes such as a Vector is outside all called functions. So I created the below Vector datatype, so I can load in all the information (Strings) from both jLists into a a vSite and vSat Vector. These code snippet's do not capture everything, I hope you can get the idea. It's fairly straight forward.

//Vector vSite=new Vector();

So, now, the Vectors have been created. Not quite done yet. In order for that "private void" to put information into the vSite and vSat Vectors, the below function needed to be written,

//public void addSiteSatObject(int i, Object o){
//System.out.println("addSatObject:"+"type: " +i +" "+o);
//j++;
//String s;
//s=o.toString();
// sites is the 1, sat is the 2
//if(i == 1) vSite.add(s);
//if(i == 2) vSat.add(s);
//System.out.println("addSatObject:"+"type: " +s+" "+j);
//}

then invoked from inside,

//private void ClearButtonActionPerformed(java.awt.event.ActionEvent evt).

With that up and running, continued on by putting together a function to dump the contents of both Vectors to the System.out.println.

//public void dumpSiteSatObject(){
// v.size() inform number of elements in Vector
//System.out.println("Vector vSite Size :"+vSite.size());
//System.out.println("Vector vSat Size :"+vSat.size());
// get elements of Vector
//for(int i=0;i
// System.out.println("Vector Element "+i+" :"+v.get(i));
//}
//for(int j = 0; j < vSat.size(); j++){
//for(int i = 0; i < vSite.size(); i++){
//System.out.println(vSite.elementAt(i)+" "+vSat.elementAt(j));
//}
//}
//}

Overall, the biggest challenge was figuring out the EventListeners for the jList's, then, being able to access the data from the jLists which are inside private voids. There is still a problem. I'm getting duplicate Islands. So if I choose one Island, my output has two of the same, like "Kauai, Kauai". But that is cool, we'll get that one next time.

Wednesday, October 6, 2010

JAVA and MySQL

For some time now, I've been wanting to create a simple java application that will connect to a mysql database, do a simple select (from a table) and insert into (a table). As a programming challenge, that is really at the simple end of the scale. After looking at some sample code out there on the web, typing in a few lines of java, and that it, right?

Well, I'm in a UNIX environment which assumes I know a lot more than I actually do. So, after typing in the sample code and making a few small adjustments like the database name, user, password, url, stuff like that, issued the javac compile and it compiled just fine. When I went to run it, the program threw an exception that it could not find a necessary path. Painstakingly, I went through each line of java source code and compared to the sample, plus making sure those other things were correct. They were, it compile's fine and at run time it still throws an exception. Not one to give up, just put it aside for a while.

So, couple hours later, picked it up again. I made a good effort to consider other possibilities. Remembering a coworkers conversation about the CLASSPATH environment variable, I took a look at some other java code that is in production, specifically, to answer the question, just how does this thing start up. And what do you know, I was not defining the CLASSPATH variable. The most fundamental of all things java. A quick setting of that guy inside of the terminal window, then re-ran the code and it worked. In order not to forget such a critical thing, I went ahead and places those "setenv" lines into the source code as comments, (would not be executed at run time - or ever) to serve as reminders. I built upon that success and also coded in an INSERT INTO statement too.

I have that code saved off in my $HOME/dev/src directory to serve as an example for the future. I may end up giving that sample code to my fellow engineers in the case they would need it for their coding assignments. That's cool, I don't mind prototyping stuff either.