Latest WebKit Build Scores 100/100 on Acid3 Test

March 28th, 2008

Safari.jpg

Hey, this is good news! The latest version of WebKit has passed the Acid3 test with a 100/100 score. I'm looking forward to seeing that in a Safari update sometime soon. It's standards, and that means next to nothing, but it's nice to see that WebKit was the first to score the top prize first.

Yes, this is an excellent platform. I'm reminded of the TED talk and the statement What are you going to do today that's worthy of me?. Gotta love Apple and the Macs. Great tools.

Comcast and BitTorrent Make Peace – Excellent!

March 27th, 2008

pirate.jpg

I'm not a big file-sharer... in fact, I don't think I've gotten more than three files from the 'net in the last two decades - and those were for digital versions of soundtracks that I already owned - Eddie Izzard. So I'm not a big fan of getting stuff off the 'net, but I never liked the way Comcast was stomping on the BitTorrent traffic saying it was standard network management techniques. Bull Cookies. It was to stop those people that paid for high speed internet from actually using it.

So I was excited to hear this morning that Comcast and BitTorrent have reached an agreement that means that Comcast has opened up it's monitoring software and no longer hinders the BitTorrent traffic that it once did. This agreement clearly indicates that Comcast was doing something, and while it's nice that the two are now working together, it's sad that it was in place in the first place.

So I had to try out my BitTorrent client - Acquisition, and sure enough, it was working far far better than it has been in the past. I was able to get connected to several hosts and search for something from Eddie. It was enough to convince me that they have stopped this silly practice, and started playing it a little more open. Good for them.

Doesn't mean I don't think they are pirates, though.

Trapped in the San Antonio Airport!

March 26th, 2008

SanAntonio.jpg

Well... I don't like air travel. I don't fit in the seats particularly well - the top of the seat hits me right about the base of my neck, and my knees hit the seat in front of me all the time. I don't like the conditioned air all that much, and I'm far too cheap to pay for first class where the seats are nicer, and the service is good enough that you don't notice much else.

But today we're on our way back from a nice little 4-day trip to San Antonio, TX and we're stuck in the airport because American Airlines is canceling flights left and right to Chicago. First, we were supposed to be on the 9:20 am flight. When we got into the check-in line we learned that that flight was already cancelled due to the FAA inspecting the plane. So they put us on the 5:40 pm flight - a joyous eight hour layover in the San Antonio airport. I was able to find WiFi for $7 a day and a plug to charge up, so I settled in for the long day of being in the airport.

AAJet.jpg

The kids got a deck of cards, played a for about 3 hours, and then pulled out the PSPs and had a blast for a while. Then Liza called American to see if there were an earlier flight out and they informed her that the 5:40 pm flight was already cancelled! Their best advice at this point is to try to get on "stand-by" for the 2:30 pm flight and hope for the best.

I'm not impressed. You pay for a ticket, you get from point A to B on the date in question barring Mother Nature. Not the FAA, not something that's foreseeable. You may loose a little money, but that's your fault. That's why airline tickets are expensive. You pay to have the empty seats. You pay for the overhead. But you pay for the travel.

I can't imagine that I'll ever fly American Airlines again. I realize that I didn't make the decision in the first place - Liza did, but I'm willing to bet that she's never going to give them another dime again as well. You have to be trustworthy, and if you aren't flying when you should be flying, then you're going to loose customers - like us.

UPDATE: OK, Liza went to the ticket counter for the 3:20 pm full flight, and they booked us on Frontier Airlines to go to Denver and from there, back to Chicago. It's a crazy trip but it got us home. Late, but at least all in one piece and while they lost our baggage, they delivered it the next morning at 9:12 am, which is about as good as we can expect given their ability to move people.

While the news is playing up the grounding of all the M80 planes in American's fleet, I think it's a bit shabby to have either such a dependency on one plane, or no significant portion of those planes actually checked out, or provisional plans for dealing with the cancellations. It's a shame, really, because we'll never fly American again.

The Joys of Being Dad

March 16th, 2008

Today was a great day. One of those days that wasn't restful but boy oh boy, was it a great day.

iStopMotion.jpeg

It started off with my daughter wanting to get into a little stop-motion movie making. Additionally, she wanted to get a decent digital camera as her camcorder is nice but doesn't take stills. So we did a lot of Googling about making stop-motion videos with iMovie, and it sort-of worked, but not really as nicely as we had hoped. The minimum frame delay in iMovie HD was 0.15 sec/frame (6.6 frames/sec) and that was too slow for what she wanted to do.

iMovie '08 was not even that good - stopping at 0.20 sec/frame (5 frames/sec). So we did more Googling and found a site that reviewed a lot of stop-motion software for the PC and Mac. One of the packages they talked about was something we had seen in our Googling - iStopMotion. The web site for the software didn't really jump out at us saying "This is what you need", but we took a chance and got the demo. I'm so glad we did.

This is incredible software. There are three versions and we're going to be getting the middle one for Marie as it looks to have the best combination of features. I'd go the 'Home' version but it doesn't allow you to put in the soundtrack. Yes, she can export the video to iMovie, but there are a lot of limitations she's seeing in iMovie HD and iMovie '08, so we'll go with the 'Express' version and get the soundtrack tools. It's really exceptional.

She can take images with her camera... hook it to her MacBook get the photos into iPhoto... open iStopMotion and drag in the images and fiddle with a few things and bingo! She's got a movie. The software will also control the camera or video camera to do time lapse imaging which is really exciting as well. I look at her with this new medium and she's already made two movies today. Incredible.

iStopMotion.jpeg

The second great thing that happened was my youngest has been a skate board nut for about two years now and has been trying to drop-in for at least a year. We go to one of the two skate parks in the village and she rides and rides with her 'posse' and has a blast. Except for the drop-in. It's just the fear of standing at the top of that half-pipe. So Sunday was another day. We went because she was convinced that this was the day. After about an hour of trying, it was time to go home - no drop-in.

I walked up to her at the half-pipe. I had her just jump off it. No biggie - he's played flag football, been in karate for years, she can do this, but she's scared. So I knew what she needed.

I told her to stand on the board and I pushed her up the pipe, held her, and let her go.

Whew! That worked. Big smile.

I did it again - a little higher this time. And then a little more... pretty soon she was at the top of the pipe. Next was the drop. So I told her to get on the board at the top of the pipe and hold on to me. I held onto the board, she stood on it. I slowly rotated the board until it was sitting, wheels down, on the pipe - all the while she's holding onto my jacket. Then I let it go.

The look on her face after doing her first assisted drop-in was something to see. Tears in her eyes and a smile as big as Texas. These are the moments you live for, as a parent.

We did it a few more times and then it was really time to go. Here's a picture of us walking back to the car, with the half-pipe just on my right shoulder. It was a great day.

Happy Pi Day!

March 14th, 2008

pi.jpg

Today (3/14) is being called Pi Day in a lot of places - including Marie's 6th Grade Language Arts class. For today, the teacher allowed all the kids to bring in pies to have during class. Interesting that it wasn't Math class, but that's another issue.

Sometimes I really do miss teaching. I never did the 6th Grade level, but even at the college level it was a lot of fun. There were fun talks with students really trying to "get it", and when they "got it" the look on their faces was always priceless.

So here's the all the educators - Happy Pi Day.

An Amazing Story of One Person’s Study of the Mind

March 13th, 2008

I was reading boing! boing! this morning and came across this post about Jill Bolte Taylor - a neuroanatomist that one morning realized that she was having a stroke, and how she studied the stroke from the inside out. It is probably the most uplifting 20 minutes I've spent in a year. Truly incredible.

as quoted on boing! boing!:

Neuroanatomist Jill Bolte Taylor had an opportunity few brain scientists would wish for: One morning, she realized she was having a massive stroke. As it happened -- as she felt her brain functions slip away one by one, speech, movement, understanding -- she studied and remembered every moment. This is a powerful story about how our brains define us and connect us to the world and to one another.

However, in my opinion that's not the most fascinating part of the story. No, the most interesting part of the story is how she feels about the experience. How she is changed - not physically, but emotionally and mentally, to see things not from where she has always been, but from where she allowed herself to sit - even if just for a few days.

We are all born to that narrow slice of life that we know. For some it's wider than for others, but still, it's pretty narrow for the vast majority of us all. Here's a person that had it as narrow as any have her eyes opened up to what could be. And how she feels now about it.

Great Quotes about Hard Work

March 10th, 2008

I have been trying to find this quote for a while, and today I finally found it. I remember first seeing it in a friend's office and liked that she felt that hard work was the answer - no questions. She worked hard, that's for sure. Anyway, here it is:

Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. Calvin Coolidge

A few times I've mentioned how important it is to me to continue in the face of adversity. Hopefully, I'm not only persistent, but maybe a little talented and educated so it makes for a good combination. But I have to admit that of the three - persistence is the thing I value most. You have to continue.

Problems with my iMac G5

March 1st, 2008

iMac-G5-20.jpg

This weekend already I've had more than my normal share of surprises. There was the GCC bug I found, and then late yesterday as I was taking a break from that I realized that my iMac G5 was frozen. I mean like a poster frozen. So I power-cycled it and it came back - for about 5 mins.

Crud. I can't have this guy die! This is important stuff to me.

So I took off the back and reseated the memory. Tried it again... same thing. Uh oh... not good.

I was thinking last night "Disk drive - it's the only mechanical thing to wear out. I'll get another tomorrow and put it in." And I left my office for the night.

But as I thought more about it that evening, I was convinced that it couldn't possibly be the disk drive. If it were, there would be a normal message on the boot-up about a "sad mac" and a bad disk. I've had this before on other models, so I know what it looks like. No, this appeared to be something far more insidious. Like the system board.

So I put the drive in, and closed it up and took it to the Apple Store at Oak Brook. Because I had an appointment with the Genius Bar I only waited about 15 mins. Not bad, really. They hooked up a keyboard and mouse and did a dump of the machine to their diagnostics site there - whatever it is and looked at the report.

"Well... how long have you had the memory?" he asked.

"Since I got the machine." I said - wondering what was up.

"Well, it's the memory or the System Board. I have a new System Board in stock, but let's see... the cost for that will be $900 plus tax."

Crud. Well, it's less than a new iMac, and I mentioned that to him.

"Not by much", he shot back.

So I looked around the store, and he was right. For basically $1200 I could get a new dual-core iMac and have a faster, better machine.

Double Crud. I loved my G5 and planned on keeping it for years. But it was clear that the smart thing to do was to get a new iMac.

iMac-20in.jpg

And so I did.

It's basically the same machine - a 20" iMac with 2GB RAM and a 320GB drive. It's got all the same standard things my G5 did, but updated to the latest from Apple. It's got the nice display, and boy is it really nice, but the nicest thing about this machine was something I wasn't expecting - the new keyboard.

Basically, this is a laptop keyboard for a desktop machine. It's thin and sleek and feels wonderful. Really, I knew they were out, but I hadn't played with them for any length of time, but when I started working with it, I was floored how nice it was. Smooth as glass... wonderful feel... I'm a very picky keyboard-kind-of-guy and this was stunning. Amazing.

So I got everything back on the machine based on my TimeMachine backup, and that was a very pleasant surprise, and in less than half a day I was back in business. I think I'll still try to make the G5 work - maybe with another G5 from eBay or something with a good logic board. But I can't imagine giving it up - not just yet.

[3/7/08] UPDATE: I worked on this guy today and I'm convinced that it's a thermal problem. The machine will run fine for about 1 to 5 mins (depending on the temperature of the box) and then it'll lock up. Video is fine, all LEDs inside the box are fine, tried new memory and hard disk - no difference. It's the logic board for sure, and it's a drag that it's thermal in nature. It's not a cold solder joint as that would not allow the start... it's something that's 'in spec' at lower temps, and the fans don't kick on fast enough to keep the temp in the box below that level. I think it's the CPU to be sure, but can't be 100% positive without a swap. Bummer. Don't know what I'll be able to do with this guy - if anything.

Found Nasty Bug in GCC 4.1.2 on CentOS 5

February 29th, 2008

gcc.png

I was working on my latest price feeder today and got word that I wasn't sending enough information to the receiving system for it to make proper use of the data. Basically, I needed to get more data about the instruments from this system and then feed it back to the system with each price for each instrument. Problem was, that really made the way I was storing data for each instrument a royal pain and I needed to go from a simple STL data structure to a class that will hold all the data for each instrument and then put these instances into a data structure for efficient access.

What I did was something a lot like this test code:

  1. /*
  2.  * This trys to reproduce the bug I was seeing in the initialization
  3.  * of the CKString while in a CKVector in a std::map.
  4.  */
  5. #include <iostream>
  6. #include <map>
  7. #include "CKVector.h"
  8. #include "CKString.h"
  9.  
  10. typedef struct tuple_t {
  11. CKString one;
  12. CKString two;
  13. CKString three;
  14.  
  15. // constructors
  16. tuple_t() :
  17. one(),
  18. two(),
  19. three()
  20. {
  21. }
  22.  
  23. tuple_t( const CKString & aOne,
  24. const CKString & aTwo,
  25. const CKString & aThree ) :
  26. one(aOne),
  27. two(aTwo),
  28. three(aThree)
  29. {
  30. }
  31.  
  32. tuple_t( const tuple_t & anOther ) :
  33. one(),
  34. two(),
  35. three()
  36. {
  37. *this = anOther;
  38. }
  39.  
  40. virtual ~tuple_t()
  41. {
  42. }
  43.  
  44. tuple_t & operator=( const tuple_t & anOther )
  45. {
  46. one = anOther.one;
  47. two = anOther.two;
  48. three = anOther.three;
  49.  
  50. return *this;
  51. }
  52.  
  53. bool operator==( const tuple_t & anOther )
  54. {
  55. bool equal = true;
  56. if ((one != anOther.one) ||
  57. (two != anOther.two) ||
  58. (three != anOther.three)) {
  59. equal = false;
  60. }
  61. return equal;
  62. }
  63.  
  64. bool operator!=( const tuple_t & anOther )
  65. {
  66. return !operator==(anOther);
  67. }
  68.  
  69. CKString toString() const
  70. {
  71. CKString retval("[one=");
  72. retval.append(one).append(", two=").append(two).
  73. append(", three=").append(three).append("]");
  74. return retval;
  75. }
  76. } tuple;
  77.  
  78. typedef CKVector<tuple> TList;
  79. typedef std::map<CKString, TList> TListMap;
  80.  
  81. int main(int argc, char *argv[]) {
  82. // make the map - no entries
  83. TListMap myMap;
  84. // this is the first key we'll be using
  85. CKString myKey("key");
  86. // create the first map entry
  87. TList & list = myMap[myKey];
  88. // create a tuple to place on the list
  89. tuple t("a", "b", "c");
  90. std::cout << "tuple = " << t.toString() << std::endl;
  91. // put the tuple on the list
  92. std::cout << "list has " << list.size()
  93. << " elems with capacity of " << list.capacity()
  94. << std::endl;
  95. if (!list.contains(t)) {
  96. std::cout << "tuple not in list, adding..." << std::endl;
  97. list.addToEnd(t);
  98. }
  99. // print out the map
  100. std::cout << "here's the map now: ";
  101. TListMap::iterator mi;
  102. for (mi = myMap.begin(); mi != myMap.end(); ++mi) {
  103. std::cout << mi->first << " = [";
  104. for (int i = 0; i < mi->second.size(); ++i) {
  105. if (i != 0) {
  106. std::cout << ", ";
  107. }
  108. std::cout << mi->second[i].toString();
  109. }
  110. std::cout << "]" << std::endl;
  111. }
  112. }

Lines 10-76 simply creates the object that is going to hold the instrument data - in this case, three pieces of data. Line 78 creates a type that is a simple vector of these tuples. Line 79 creates an STL map where the key is a string and the value is a vector of these tuples. Seems like a reasonable data structure, given that I'm basing this all on CKit.

In the main method, I'm basically creating a map of these string-list pairs, then creating a tuple and seeing if the new key isn't there - it's not, and then adding the tuple to the end of the list. This all works fine on Mac OS X 10.5.2 and GCC 4.0.1 (Xcode 3.0). But on RHEL 5 (CentOS 5) with GCC 4.1.2 we get an entirely different result.

At line 97 we get a very spectacular core dump. The gdp session is basically showing me that the initial value of one in the existing allocated storage in the vector for the first element is not being properly initialized. This initialization is done properly on OS X, but on RHEL5 it's not. When I change the typedefs to say something like this:

  1. typedef CKVector<tuple> TList;
  2. typedef std::map<CKString, TList*> TListMap;

thus making it necessary for me to new a TList and place that into the TListMap, and then delete it when I'm done, then things work just fine and the initialization is properly done.

I'm not that big of a stickler for compiler bugs - they happen, but so rarely that it's not worth getting all bent out of shape over one that's so easily worked-around. But I'll admit, it's a little frustrating to think that it's your fault for several hours only to find out that it's not, that at least a part of me wants to send in a bug report, but I probably won't. Just glad I got it figured out.

Slow Vim Menus and GTK Themes

February 29th, 2008

tux.jpg

Today I had to move my development of my latest price injector to a RedHat Enterprise Linux 5 machine (RHEL5) due to some third-party libraries that required version of libs that were present on RHEL5 but not RHEL3. No worries, I think, I have the machine, I just need to get a few things from the CentOS 5 site to complete the development tools installation, and then I'm ready to go.

I'm a Vim guy... love it. Don't even think about what I'm typing most of the time, so it's natural to put Vim on the RHEL5 box so I can edit the source. No surprise there. But what was a surprise is the fact that the menu redraw was exceptionally slow. I mean way way too slow for the machine and network I was using. Clearly, something was wrong.

So I started to investigate GTK themes a bit. Turns out, the one I was using (GTK-Step) uses bit-mapped graphics for the menus. This is a lot slower than we need. There's another called Smooth-Metal that was every bit as nice and after a few hours I was able to make it downright appealing to me, that uses a fraction of the bandwidth for the X11 GUI. The trick was having a tool to change the GTK Theme.

Enter gtk-chtheme. This is a wonderful little program that allows you to see the theme in action and then apply it to the window manager and voila! This is an important link to remember because I did a lot of searching to find something that worked as nicely as this little guy. Saved me a lot of grief.

UPDATE: gotta watch out though... the GTK Theme I like (Smooth-Metal) I've hacked up a touch to look even nicer uses the GTK Engine 'smooth' and that's not on RHEL3 - or FC3 systems. You have to get a reasonably recent build to get the 'smooth' engine. I've even tried compiling it from scratch for my RHEL3 boxes but it requires GTK 2.4+ and that is again more than is on the RHEL3 boxes and getting that on the boxes is too much because of the RPM dependencies. In short - it's too much grief for the benefit. So just be clear about what you're getting into with some of these themes.

[3/10/08] UPDATE: seems the theme engine is crucial. So I looked at the engines for FC5, RHEL3 and RHEL5 and came across the engine ThinIce. It works really well, and after about 20 mins of fiddling, I had something that looked as nice as the Smooth engine, but was working great on all the platforms I have. Now
I'm really set. Nice to get that out of the way.