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.

Friday, July 30, 2004

Tristan da Cunha

Tristan da CunhaI was sitting in a boring meeting yesterday and directly across from me was a very large map of the world. While staring at the map, I noticed some lonely looking islands in the middle of nowhere. One particular group of islands seemed rather odd because they simply stuck out of the middle of what seemed to be the deepest part of the Atlantic Ocean, half way between Cape Town, South Africa and the coast of Argentina. It seemed like the kind of place that wouldn't be easily discovered.

My thoughts started to drift to wondering if anyone lived on these islands. As the meeting broke up, I walked over to the map and wrote down the name of the little group of islands, Tristan da Cunha. I also noted the names of other remote islands that had caught my eye: Kerguelen, Les Îles Crozet, Amsterdam and St Paul Islands, Bouvetøya.

Later, I looked up these islands and discovered that of all of these islands, Tristan da Cunha is the most remote island in the world with a permanent population. The other islands may have a few scientists or researchers but Tristan da Cunha is the only one of these islands with families living their lives. Almost 300 people of British and US ancestry make their home on this island. They are all descendants of British and US sailors who stayed on Tristan in the 1800's.

It is hard to imagine living in such a remote place that phones are virtually unknown and the internet is so expensive that no one has it. Even snail mail can take six months to arrive on Tristan da Cunha. And yet the people there are happy and live there by choice. In 1961, the islanders were evacuated to England because of a volcanic eruption and yet two years later they all chose to return. What a different life they lead by choice compared to the technological civilization we live in.

I have included a couple of links below that will give more information to those that are interested.

Tristan da Cunha

The Tristan Times

The South Atlantic & Subantarctic Islands Web Site

Thursday, July 29, 2004

Life Sucks - Part 4

This is getting to be like a soap opera. Last weekend while at work, Michel fell over some boxes that someone had left in an aisle. She twisted her neck and did something very bad back there. For those who don't know, Michel had brain surgery last year and her neck was sliced open. (For those with strong stomachs, here is a picture of Michel's head stapled up - notice the JavaRanch t-shirt. - click here.)

Anyway, Michel spent two days in the hospital and has been in constant pain since the incident. She has also been experiencing weakness on her right side.

When are we going to catch a break?

Friday, July 02, 2004

Review - JavaScript Goodies by Joe Burns

JavaScript GoodiesJavaScript Goodies (2nd Edition)
by Joe Burns

This is the JavaScript book for the non-programmer who knows some HTML and wants to learn how to enhance their web site with some JavaScript. The book assumes no knowledge of programming at all so even the complete novice can learn some programming skills. I used this book in my JavaScript class and by the time we got through the book, my students were even able to write some simple games like Blackjack and Craps.

The book opens with a look at the main objects of a web page that are used in JavaScript and gives some example scripts that are explained in detail. In fact, the book is full of scripts that are used to explain each technique as you learn. The key concept of what an object is and what properties, methods, and events are is explained in some detail. Validating a form is explained. Image flipping and animation are covered. Example scripts will explain how to create scrolling text and a digital clock on your web pages. Basic programming techniques such as if statements, loops, and arrays are covered.

Examples are really the one thing that make this book worth the investment. Each new subject being discussed is introduced with a script followed by explanations and further examples. Then an assignment is given to help you verify that you have learned the information covered. The solutions to all the assignments are on the author's website.

The book covers the basics of JavaScript and will provide a good foundation for the novice. After reading this book you won't be an expert JavaScript programmer but you will be ready to move on to more complex programming tasks and more difficult books.

This earned 4 stars on Amazon. The book is published by Que and came out in October 2001.

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