Tuesday, August 31, 2004

Mikey and his body parts

Mikey knows his body parts as you would expect of any 7 year old. But he likes to play games where he is asked to point to something and it is good to play these kind of games to help him improve his communication skills. So he is with my mother-in-law and they are playing:

MIL: Mikey, point to your nose.

Mikey: [points to nose and giggles]

MIL: Mikey, point to your mouth.

Mikey: [points to mouth and giggles]

MIL: Mikey, point to your eyeballs.

Mikey: [points to crotch and laughs]

Whoops! Wrong balls! My mother-in-law thought it was the funniest thing ever. Mikey really does keep us laughing.

So anyway, I guess I'm letting Mikey watch too much cable TV!

Wednesday, August 25, 2004

The Rock of Gibraltar

History is an interesting subject. Besides just being nosy about people of the past and the events that shaped their lives, history is a study of how those things affect us to this very day. The BBC had an interesting article about Gibraltar and the affects of a treaty that was signed almost 300 years ago.

The story goes like this... at the end of the War of the Spanish Succession, the Treaty of Utrecht was signed which gave the British ownership of Gibraltar, which they had captured in 1704. So in 1713, the British are given control but one of the clauses of the treaty is that if the British ever leave Gibraltar, they must give the Spanish first dibs on getting it back. (The treaty actually used the word "dibs"... well, maybe not.)

Anyway, speed ahead to 1969 and the British give the Gibraltarans? Gibraltarites? Gibraltarers? ummm... the people of Gibraltar a constitution which guarantees that they will never be given over to another country unless the people of Gibraltar give their approval. So where does this leave us... the British can only give up Gibraltar to Spain (Treaty of Utrecht - 1713) and they can only give it to Spain if the people of Gibraltar support it (Gibraltar Constitution - 1969).

But the people of Gibraltar don't want to be ruled by Spain or Britian. They want independence. But the British can't give independence without Spain's approval. And Spain wants Gibraltar back. So the British are stuck. They can never leave Gibraltar without the approval of both the people of Gibraltar and Spain, an approval that they are unlikely to get anytime soon. All because of of a treaty that is almost 300 years old.

Monday, August 23, 2004

I never dream of trains

I often dream of trains when I'm alone
I ride on them into another zone
I dream of them constantly
Heading for paradise
Or Basingstoke
Or Reading
I Often Dream of Trains - Robyn Hitchcock

I rode the Long Island Rail Road (LIRR) from 1979 until 1996. That comes out to 17 years, I believe. On a good day with no delays (that is, almost never) I spent 90 minutes on the train. Each morning, I would climb aboard and hope for a seat and then repeat the process coming home. Conservatively, that is something like 22,500 minutes, or 375 hours each year. Multiplying that by 17 years gives approximately 265 days spent on the trains. Almost 3/4 of a year. And yet, I never dream about the trains. I sometimes dream about the subways or the World Trade Center but I never dream about trains. Is that weird?

What brought this up was that I found an old train schedule and monthly ticket while going through a box of old junk. It reminded me of how little I think about the rail road.

Review - How to Lie with Maps

How to Lie with MapsHow to Lie with Maps
by Mark Monmonier

3 out of 5 stars

Any book that calls itself, "How to Lie with…" is simply begging for a reviewer to compare it to, "How to Lie with Statistics." The latter is a classic that is fun and educational. Unfortunately, this book falls short of deserving the title but it is still an interesting read. One of the main problems is that rather than being a guide to help avoid being fooled by maps, the author uses the book as an introduction to the science of cartography. It seems that a large portion of the book is aimed towards the prospective mapmaker. I found these parts to be a bit difficult to get through. Also, there are very few real life examples in the book. I would have liked to see more examples from newspapers or magazines in place of the samples the author provides. Some of the few real life examples are from Nazi Germany and the USSR and seem very dated.

That was the bad side but there are many good points to the book. The chapter on development maps was very interesting (although the attempts at humor are wasted) and should be required reading for anyone who is serving on a zoning board. Also, the discussion of choropleth maps is excellent and the reader will come away with a clear understanding of how these maps can be abused either deliberately or accidentally by the cartographer. The author shows examples of very different choropleth maps using the same data that will make you skeptical of anyone who uses choropleth maps to prove a point.

Although parts of the book drag, the book is short at 150 pages so it is a relatively quick read. I wouldn't say that it is required reading, but it will help you maintain a healthy skepticism about maps that you might encounter.

This earned 3 stars on Amazon. The book is published by University of Chicago Press.

The review can be seen on Amazon on My Amazon Reviews page.

Tuesday, August 17, 2004

Review - Mastering JavaServer Faces

Mastering JavaServer FacesMastering JavaServer Faces
by Bill Dudney, et al

4 out of 5 stars

JSF is a new technology designed to simplify the task of creating Java web applications by making them work more like typical GUI event driven applications. There are a lot of changes to the web framework for JSF and this book does a very good job of clearly explaining these changes. The book starts with an introduction to JSF that compares it to both Struts and Swing. The authors explain both the architecture and the main patterns used in JSF, which helps to make clear how JSF works. UML diagrams are used to help explain how the various pieces of JSF interact. The middle section of the book covers all the main points of JSF at a nice leisurely pace: configuration, UI components, navigation, event handling, and data conversion and validation. Plenty of code samples are provided and all the code is clearly explained. The final section of the book covers building a complete JSF application, designing custom components, and converting an application from Struts to JSF.

This book is a nice introduction and tutorial on JSF. For many developers, this will be all they need. Others may be looking for a book that can serve as a reference or will cover more detail and this book will not fill that need. If you are looking for a book to help you learn the basics of JSF and to get a good understanding of how to properly implement a JSF application, then this book will serve you very well.

This earned 4 stars on Amazon. The book is published by Wiley and came out in June 2004.

The review can be seen on Amazon on My Amazon Reviews page.

One last comment... I wish Wiley would be more careful about misprints. I don't know if it is the authors, the technical reviewers, or the publisher, but someone needs to check these books again before they go to final printing.

Mikey visits the eye doctor

Giving an eye exam to a child with Down syndrome, autism, and ADHD can be a challenge but not if you put him under anesthesia first. So that is where I was this morning. I took Mikey to Schneider Children's Hospital to be knocked out so that the eye doctor, Dr. Kronwith, could get a reading on the pressure in his eyes. Mikey is frequently on steroids for his breathing problems and steroids can cause glaucoma, so it is important that his eye pressure be checked on a regular basis.

Mikey was very good while we were waiting and didn't get upset until it was time to go in. We sat in the admitting office watching Sesame Street and reading Mastering JavaServer Faces. I'll let you guess who was doing what. I had to put drops in to dilate his eyes and that was lots of fun for both of us. We waited for about 45 minutes and then it was time to do the procedure. I held him while they put the IV in and he struggled like crazy. They injected something into the IV and he was out in 10 seconds. The procedure took 5 minutes, another 10 minutes to wake him up from the anesthesia (I think he wanted to go back to bed - he doesn't like being woken up at 6:45 AM), and it was time to go home.

The results of the exam were normal. Mikey was back to his old self so quickly that I was able to drop him off at ACDS for his respite and socialization program. If Mikey can stay healthy we can stay away from the steroids and we won't have to go through this again.

By the way, this was actually the third time we tried to do this exam. The first time, Michel couldn't get out of work to take him. The second time, I forgot to bring the eye drops. Third time pays for all. Dr. Kronwith has been a good sport through it all so I can't complain about him.

Tuesday, August 10, 2004

Happy Birthday, Wifey!

Today is my wife's birthday. As you can well imagine, with all the crap that has been going on lately, it isn't the happiest of birthdays. I bought her the first two seasons of "Sex and the City" which seemed to cheer her up a bit. I also sent her some flowers. She had her meeting with Mikey's music therapist and we got a really good report so that was a nice present, too. Anyway, she took her pain killers and went to bed right after supper.

So, happy birthday, Michel. You are the best wife and mommy! We all love you.

GridBagLayout

I ran across this animated weblog entry about GridBagLayout. It reminded me of my own history of using this key GUI class. I doubt if I could be trusted to do anything in anger with the class today, but there was a period of about seven minutes when I felt like I really had a handle on using it.

It was right around the period when I was studying for my Java certification. Back in the old days, GUI design was part of the exam so you had to know all the GUI classes including the layout managers. I used the old "Complete Java 2 Certification Study Guide" by Roberts, Heller, and Ernest plus some supplemental material I had to try to figure out how to use GridBagLayout. I designed a fairly complex GUI on paper and then tried to recreate it using the GUI classes. You have to keep in mind that this was without Swing because Swing was not on the exam.

Anyway, nothing I did looked even remotely like my design. In fact, everything looked like crap. I realized that the only way to do a decent design was to dive in and use every layout manager imaginable in combination. I started with BorderLayout and stuck GridLayout in one section and GridBagLayout in another. Panels were everywhere with their own layout managers inside them. The end result was... crap.

OK, I thought, my company spent thousands of dollars on the enterprise version of VisualCafe. Surely a product that cost this much money should be able to do GUI design with ease. I can do the design in that, I thought, and study the code to see where I am going wrong. So I pop into VisualCafe and start dropping Labels and Panels and TextFields and everything looks beautiful. Except, It looks like crap when I resize it and if I look at the program in any other screen size it looks like crap. Uh-oh... VisualCafe is defaulting to absolute positioning and null layouts. That sucks. No problem... I'll force it to use layout managers and try again. Half a day later, my fields are all scrunched in the corner and the layouts seem to randomly change everytime I touch a key. One last try... I'll bring in the crappy looking design I did by hand and work from there. Nope... VisualCafe continues to randomly change layouts and move fields around, on the rare ocassions when it even recognizes my code as being for a GUI layout.

Back to the drawing board... time to get serious. I spend two days re-reading everything and trying every possible combination of commands that can be used with layouts. GridBagConstraints slowly starts to make sense... fill, anchor, gridwidth, weightx, it all starts to make sense. Layout command are flying from my fingers. Quick change, compile, run... not quite, another quick change without even checking the API, compile, run, and NIRVANA! The screen looks perfect. Resize... still perfect. Different screen size... still perfect. On a Mac.. still beautiful. I took the test a couple of days later and aced the GUI section. And then didn't touch any of this again.

Today I look back at those few moments and wonder what drugs I was taking. Or more to the point, what drugs the designers of the AWT were taking.

Wednesday, August 04, 2004

Review - Tapestry in Action by Howard Lewis Ship

Tapestry in ActionTapestry in Action
by Howard M. Lewis Ship

Tapestry is a web development framework that is radically different than most other frameworks used for web development. The author of this book, Howard Lewis Ship, is the principal architect of Tapestry. It is often the case that an expert is not necessarily the best person to write about a topic as they often forget what it is like to be a novice. The book starts with this problem but fortunately after the first couple of chapters the book improves greatly.

Chapter one is an introduction to Tapestry. The explanation is far from clear so if you don't know what Tapestry is when you start this chapter, you will still not know what it is when you finish. Chapter two is our first exposure to a Tapestry application but the author chooses a sample (a hangman game) that is complicated and is not a typical web application.

Chapters three through five discuss HTML forms and form components, showing how to use and validate them in a Tapestry application. The next three chapters show how to build your own form components and the last two chapters show how to build a complete Tapestry application. Starting with chapter three the book takes a turn for the better. If you were lost at the beginning of the book, it will all make sense by the time you get to the end.

I can strongly recommend this book to anyone interested in Tapestry whether they are a novice or an experienced Tapestry developer.

This earned 4 stars on Amazon. The book is published by Manning and came out in March 2004.

The review can be seen on Amazon on My Amazon Reviews page.

Tuesday, August 03, 2004

Life sucks - Part 5

Looks like Michel is going to be out of work for awhile. Her doctor said two to four weeks but everyone suspects it might go longer. He wants her to wear an aspen collar for the next couple of weeks to let her neck muscles heal.

The hospital where she works has been good about pushing through the worker's compensation. I think they realize that this was not just an accident but carelessness on someone's part that caused Michel to get hurt.

The worst part of the injury is the weakness she has on her right side. She can't pick our son up which makes it difficult to get him to therapy. Yesterday, Mikey didn't want to get out the car and the therapist had to come out and carry him in for his session. Michel seems to have little strength and frequently drops things.

Hopefully, her neck will start to heal with the collar and she will start to get her strength back soon.

Changes at Amazon

Captain Renault: I'm shocked, shocked to find that gambling is going on in here!

Back in February, a bug introduced into the code at Amazon.ca revealed a dirty, little secret that was suspected by many but not proven. The bug changed all the the pen names and anonymous names used to review products to the real names of the person who posted the review. The bug revealed that authors were posting good reviews to their own books and nasty reviews to their competitor's books.

Some might think that authors gaming the system is no big deal, but amazon has become a huge book seller and reviews can boost or hurt the sales of books. That is why amazon recently introduced a change that will award "spotlight review" slots and a special badge to reviewers that use their real name as verified with their credit card. Reviewers will still be allowed to write reviews using a pen name but they have eliminated anonymous reviews. Every reviewer will be required to log in and have either a purchase history or a credit card on file before they can write a review.

Some people don't like these changes claiming that amazon shouldn't be using names from credit cards. But you don't have to use the actual name on your credit card. If the name on your credit card is "John W. Doe", you can use "J. W. Doe", "John Doe", or "J. Doe" instead of the name on your card. Some people claim this discriminates against women because women are more likely to be stalked. Ignoring the issue of how often women have been stalked because of a review they wrote on amazon, the point is that you don't have to use your real name. Yes, your ranking as a reviewer may be effected but that is a small price to pay to improve a system that was broken.

Amazon has made some other changes to make reviewing easier for the serious reviewer. You can now edit a review without losing your votes and the review submission process has been improved so that your reviews appear almost immediately.

The main problem that amazon has faced with these code changes is that they did not do a good job of quality control prior to introducing the new code. There were numerous bugs, some of them a bit serious that should have been cleared up prior to the code going live. (One of the bugs exposed the real names of reviewers even if they chose to use a pen name.) They should have set up a test site and allowed some of the more prolfic reviewers a chance to review the changes before going live.

In any case, I am sure many of the Java authors who have complained in the past will be happy with some of these changes. Once amazon clears up their programming issues, I think this will be a vast improvement... at least until the cheaters find a new way to game the system.