Randomness Daryl Ducharme Randomness Daryl Ducharme

Simple Yahoo! Maps Workaround

The Yahoo! Maps Flash Component and API is a nice system to work with. For a simple to use map plug in for flash that looks decent without much work, its the best there is. However I like to work with it and see what hidden gems I can find. Or, as is the case in this article, delve deep inside of it and try to find out how to make it work as I want it to. It's still technically beta, so it has it's own little quirks. ...

As great as the Yahoo! Maps component is, it has one quirk I've run into a couple of times. If you unload the map while it is loading data and tiles it loads excruciatingly slow when you load the map again. In fact, it seems like it isn't loading at all. Usually when I've created a map for a web page or RIA, I create it as a separate SWF movie to be loaded at runtime. The fix for the problem in this situation is simple, if not obvious.

// make sure yahoo map library is removed from global namespace// so that it will always reload.
this.yMap.onUnload = function()
{
    _global.com.yahoo = null;
}

Unfortunately, this is one of those wild ass guess debug moments - where you just try it and hope it works. I'm not sure what class in the yahoo tree is causing the problems but I figured something was so I just got rid of them all. It probably also helps that the entire yahoo map library is a larger chunk of data so making it all available for garbage collection in that way makes garbage collection actually occur.

Recently, I had a project where my boss wanted me to embed map movie clip in the main movie rather than load it in at runtime. I still had the same type of problem, where the map could get, and is like to be, unloaded while it is in the middle of a data/tile load cycle. Since the Yahoo! map library isn't getting loaded in as it does with an external SWF, deleting the library is worse than the original quirk. Then the map won't even show the copyright info.

So into the problem I dove. I tried everything I could think of. I looked in the classes that I unzipped from the components SWC file to see if I could make some adjustments to unofficial parameters on unload. I used wireshark to see if any HTML requests were missing when the quirk occurred. I even took the SWC apart with Buraks Actionscript Viewer and tried to sort through that mess of code to see if I could find the answer. While I made many interesting discoveries along the way, I made no difference in the issue at hand.

So I made my way to my boss's office to tell him the status. As I walked toward his office I knew he would have a very simple answer for me that would work. I'm stubborn. I'm a programmer. I like to do things my way. I want elegant solutions to my programming problems. He is a designer. He just wants it to work. He's not worried about how it works ( note to other programmers, most people are this way ). I walk into his office and tell him the news. He thinks about it for maybe one second and tells me not to unload it, just move it off the stage.

Don't unload it?! That's like going to a doctor and telling him, "it hurts when I do this." To which the doctor will respond, "Then don't do that." In other words, it makes perfect sense and I can't believe I didn't think about it. Maybe I should have taken a break instead of pushing on for as long as I did to figure it out.

Now, instead of moving it off the stage I just set it's _visible property to false. That just seems a bit more elegant to me, and it just works. In fact in this situation it works better than the other system. Anyone who has used the Yahoo! Maps component knows that before the first tiles load in there is nothing but copyright info. By doing it this way the map loads in the background so when a user click the button to see the map, it comes up instantly.

So to wrap things up, here are my lessons learned:

  • If you can't make it elegant, just make it work
  • Ask for help from people who don't think like you
  • Your mind needs a rest from time to time, take breaks
  • load Yahoo! Maps in the background - they work better that way
  • Sometimes the answers are simple, if you are racking your brain step back and look at things from different perspective

----
Daryl "Deacon" Ducharme is currently Director of Application Development for the Interactive Agency Provis Media Group, LLC which helps organizations enhance identity, connect with customers and increase productivity.

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

The best gets better

The best return promo, at least we think it's a return promo, just got a little better. WWEs "The Code" promo, along with other signs, pointed to Chris Jericho coming to save the WWE(again) last night on Raw. While Chris Jericho was in Philadelphia promoting his new book, A Lion's Tale: Around the World in Spandex, he did not show up at last night's live television taping. Oh, how the best gets better.

...

The only thing WWE could do wrong is do nothing with this promo and let it slide. If it isn't Jericho and it turns out to be Edge, who looks to be coming back very soon from the Unforgiven ads, then it can be used to solidify his heel status. Imagine him coming out in his cocky fashion and making fun of everyone who thought it was Jericho coming out. From there you could do so much, especially if Jericho is coming back soon. And really, you could do something like this with anybody other than Jericho.

If it is Jericho, the WWE can just sit tight and let the tension build. The tension will break the minute he comes out that curtain. Since Jericho is a heatseeker, even though the fans really want to love him, he could use this to his advantage and mock all the fans for not reading the signs clearly. I can almost see it now,"I made it clear when and where I would return. The monkeys in the truck showed the special videos I made. Are you too stupid to see the signs of your own salvation?". Okay so maybe that was the best Jericho impression Deacon could do but hey maybe the promos are for my return to wrestling in the WWE and nobody told me.

It's your turn to break the latest code

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

Geek Humor

I won't proclaim to be a linux geek, even though I'm geeky enough to try it out. This may be because the latest version of Ubuntu has taken the geekiness out of linux( or rather hidden it - it's still there ). But I do understand hardcore linux fanboys and their devotion to being cool because they program in Emacs or VI. Well, the adobe linux presentation at MAX Chicago played on this syndrome of linux geeks who always seem to be coding in command line text editors. ...

The video below is the MAX presentation for the alpha release of Flex Builder on Linux. Very exciting news and they used humor to show a point. The presenter has a thick accent, but the main point of the jokes comes through clearly. Not VI? How about Emacs? Okay, well there is this other thing we have been working on...

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

It just works

I'm the type of person who has to do it the hard way. It drives my wife nuts sometimes, but I've got to do it my way even if it's the difficult path. I like to be different. Being different is what led me to trying out linux. So in the beginning I tried out Fedora Core 4 and that experiment failed. When everybody went ga-ga over Ubuntu's Feisty Fawn release (7.04), it inspired me to try Fedora Core 7 which was released a couple of months later. Fedora is a great distro but it takes a bit more work than people less stubborn than me are willing to give. At least it does for things I think should be simple, like playing back certain media files that have patent issues. Fedora is very focused on spreading open source, and I applaud that philosophy. However, it also has them make it difficult to play files that have patent issues. However, I kept on hearing about how easy things are in Ubuntu.

Today, I tried it and Ubuntu just works! ...

The final tipping point for me was the fact that the Flex Builder for Linux Alpha didn't work in Fedora. Even after I did some extra hacking. Of course, the release notes said it didn't but I had to try. Recently, when Gutsy Gibbon( Ubuntu 7.10 ) came out I realized I had to take it for a trial run.

Instead of just overwriting Fedora with Ubuntu I decided to try it on another computer first. I didn't really have a desktop that I could easily load it onto so I turned to my laptop. The laptop is a hand me down Pentium 3, 800MHz that I don't really like running because it is so slow in Windows XP. To improve it's performance I had replaced the shell with Emerge Desktop - which helped a bit but I was still annoyed by its lack of performance when I tried to do any type of multitasking or multimedia. Honestly, I wasn't expecting Ubuntu to fair well with my tests on this machine.

My first test involved the live CD. How would it do on the laptop. I had some display issues with the Feisty Fawn release when I tried it on the same laptop - would this one be any different? When I did the default load, I had problems again - but that's why there is an option on the CD to load in safe graphics mode. Safe graphics mode only partially worked when I tried it before so I wasn't holding my breath that the performance would be any better this time. I was pleasantly suprised when the display came up perfectly in this safe graphics mode. So it passed the first test.

The second test was wireless functionality. When I first tried Fedora Core 4, I tried it on a different laptop( a pentium 2 that I jokingly call a pentium 11 because of the logo ) but with the same wireless card as I am still using today. It didn't work then, and I had no luck getting it to work either. Linux wireless support has been iffy at best, from what I have read, and I wasn't expecting it to work without some delving into config files or the command line. To my suprise the network manager was ready to use my card to log into my office network right away. No config files, no command line, just the password to the network was needed. That was a huge for me.

At this point installing Ubuntu over Windows XP was going to give me at least the same functionality on this laptop so I double clicked the install icon and installed Ubuntu. It was an easy install, especially since I did not need to set up a dual boot situation. It was a bit slow, but this laptop isn't a speed demon by any means. When it was done and I rebooted things were quite a bit snappier than XP ever was. But now I needed to install the programs I wanted. Since many of them are proprietary I thought I was going to have to handle things the same as I would on Fedora - go online and find the files or find a repository that had a build for Ubuntu.

I opened up the Add/Remove Applications program and was again pleasantly suprised. Programs such as Opera, Flash Player and the Sun JRE were easily available. Sure, the repositories weren't enabled by default but I just had to okay using them and I could download the programs as easy as WINE or FileZilla. The only snag I ran into was Eclipse. It was easy to download, but the version that was in the Add/Remove Applications program was 3.2 (Callisto). In order to use the Flex Builder alpha, I would need 3.3(Europa) since it is based on Flex Builder 3(Moxie).

When I tried to get Eclipse 3.3 working in Fedora is took some extra work. I had to manually install the Sun JRE and set up the JAVA_HOME variable properly. With the latest Ubuntu, and the easy install of Sun's Java 5 JRE, I didn't have any problem installing either Eclipse 3.3 or the Flex Builder for Linux plug in. The final test was to compile an MXML application. In Fedora it would start to process and work for a while before crashing FlexBuilder - even with a simple Hello World app on my Pentium4 3.2 GHz desktop. On my Pentium3 800MHz with Ubuntu, I compiled my Hello World app without any problems. It is an alpha release, so I'm expecting bugs, but it is working now and I am very happy.

So far I have been very impressed with how easy Ubuntu is to use. I would recommend it to just about anyone. There are some people who have problems running the types of programs they need to on linux, but for the majority this OS is easier to use than Windows was the first time you booted it up and many of the things you need to do are already taken care of by open source software( Web browser, Email, Office Applications and more ) that comes standard

Download the LiveCD of Ubuntu 7.10 today. Or get a computer preinstalled with Ubuntu( 7.4 Feisty Fawn ) from Dell.

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

SAVE_US.229

Just before the return of Triple H, I started watching wrestling regularly again. I had actually stopped watching wrestling a little after I “retired” in August of 2005. In looking back another big event might have killed my need for multi-weekly fixes of professional wrestling – Chris Jericho's break from professional wrestling. It took a couple of weeks for me to realize what had happened, but I remember going to ChrisJericho.com and reading his reasons for taking a break from wrestling for a while. I was bummed, and so was my wife. Between Taker and Jericho, it's hard to tell who her favorite is.

Now the Undertaker has returned, and is in the title hunt against Batista. I am excited about Triple H, though I want him to be a heel again. That is what he is best as. Speaking of heals, the canadian heatseaker Chris Jericho looks to be coming back and soon! ...

A few weeks ago, just before Cena got injured, we started seeing a promo that people are calling “The Code”. When Cena did get injured and I wrote the article about that match, my research had people stipulating that “the code” was a promo for Jericho's return and he could very likely make a come back at No Mercy. The reasoning was good. Sources say he was talking to TNA about possibly working for them and stopped the talk at the same time we started seeing those promos. Alas, No Mercy came and went without any sign of the Ayatollah of Rock and Rolla.

While the King of the World did not grace us with his presence for that event, the promos kept playing week after week. Recently, after having decided to slow the promo down and see what else I could read besides SAVIOUR_SELF and SAVE_US.222 (now SAVE_US.229 ), I decided to use the power of the internet to see what other people think of this mystery.

My first stop was over at ChrisJericho.com, where I noticed that his book is about to come out soon. That's cool, that will be on a couple of Christmas lists in this house. While scanning the dates I noticed he was going to be in Fort Bragg, NC on the 28th of this month. That was exciting, until I realized I would be traveling this weekend and would not be able to go see him. So I made my way to the chrisjericho.com message board. Well, the fans there were excited and had many theories that seemed to align. All the sign point to a comeback on the 29th of this month. The thought is that he was going to comeback on the 22nd then that changed to the 29th and that is why the message in the video changed from SAVE_US.222 to become SAVE_US.229. In fact, his book tour just added 2 dates whose cities coincide with the tapings of Raw and Smackdown. The 29th in Philadelphia, PA and the 30th in Long Island, NY ( Smackdown is taped on Tuesdays ).

So I am excited. The fact that another one of my favorite wrestlers will be coming back in just one week makes me even happier I am watching wrestling again. There is some thought that he might be at the pay-per-view on Sunday but he may not be there while they are broadcasting. Anyway, I thought I would leave you with a few good bits of info and links for some other people's theories on the return of Y2J starting with a great slow-mo, code breakdown video.

Chris Jericho Speaks On WWE, TNA, Benoit, More

Remember me saying that the Raw after Cyber Sunday is in Philly, which will be on 10/29/07, is the same location of WM99?

Well, Chris Jericho's last PPV was on 8/21/05.

From and including: Sunday, August 21, 2005
To and including: Monday, October 29, 2007
Or 2 years, 2 months, 9 days

Finally, something I haven't read anywher because it doesn't point directly at Chris, but definately a return, is a part of the video that clearly says REV 2:25 which made me think to look in the bible under revelations.

Originally posted by Revelations 2:25:

But that which ye have already hold fast till I come.

Basically saying, don't worry about what you have now I'm on my way. Of course I think it points to Jericho because Jericho is a biblical name and I believe it is mentioned in Revelations. Have fun because when he comes back we will never...ever...be the same...again!

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

Friday Humor with AVP

This is my 100th post on this my.opera blog. What makes this even more amazing is that my first post was posted a year ago from next friday. It really seems fitting that my 100th post should be a humor post. Unfortunately, that means I won't spend as much time trying to write a great post. Hopefully it will still make you laugh though.

...

Crossovers have been big business for comic books for a while. One great crossover was Alien vs. Predator, which made its way into theaters a few years ago. Of course, all big budget movies become games and some start to take on a life of their own. This can lead to some great advertising.

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

Inspiration

Often times, inspiration comes when and where you are not looking for it. Inspiration may unearth a desire for you to take actions you have not yet taken. You may have noticed that much of my inspiration recently has come from parkour. Once again I found inspiration in parkour, but parkour isn't the only inspiration that came to me. ...

I found this recent inspiration on AmericanParkour.com. Demon, a traceur and member of the tribe from Colorado, got a chance to train in France with some of the Yamakasi. Not only did he get to go on this parkour pilgrimage, but he took the time to write about his account of the training.

Some of the inspiring parts of his post came from the way the yamakasi trained. Thinking of doing a drill eleven times as really doing 10 + 1. Making sure to do difficult movements at least 3 times instead of just once to prove to yourself that you can. Thinking that the real training, much of it mental, comes after you are physically tired. The usefulness of training by yourself or with others. This was all great information that has inspired me to train more intensely.

The suprising inspiration came not from parkour, but from the writing of the article. Many of my posts, including this one, are written fairly quickly while I have a break during the day. From reading many other postings online, it looks like most people do the same thing - even for professional sites. Demon's article was different. He obviously put a lot of time into organizing his thoughts and putting together an article that many different people could read and get something from. His writing of that article inspired me to work towards writing better posts in my own blog.

So as I go onto my 100th post, I will take the time and improve my writing ability. Even short articles can have a little extra time expended on them to polish them up.

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

Friday Humor with Dubya

Web cartoons are what got me into flash and from that actionscript. One day a friend turned me on to Homestar Runner and I thought, I should figure out how to do that. I later realized that I don't want to spend the time it takes learning how to cartoon, and I left that to other more talented artists. However another funny web cartoonist, Sam T., has his creations available over at his website ebolaworld.com. His are a bit more crass than homsar :) but his "Dubya" cartoons are absurdly funny.
...

Here's an episode from his newest "Dubya" series.

Read More
Randomness Daryl Ducharme Randomness Daryl Ducharme

Amazing!

I finally got to see the match where John Cena injured himself. I am not a fan of Cena, but I don't hate him either. Before this match I had respect for him. He is a tweener. And most tweeners don't get the sort of fan reaction he does. People either really love him or they really hate him, there is very little indifference. That is good business, and this match proved why he has been on top for so long, you can count on him. ...

I saw the match and his injury happened very early. It was a simple arm drag, but for Triple H it was just a simple step that sent him away to surgery. The match then went on for quite some time after that, and John Cena put up a convincing show while working with what he had left. He even did a back suplex that looked quite painful given the state of his shoulder. Making his STFU work for the finish, brilliant. My respect for Cena is way up.

However, it wasn't one person who made that match good despite such a drastic injury. First of all there was his opponent, Mr. Kennedy. Once he knew what was going on he did a great job of working him over, without messing with his arm at all. Then there is Orton, who also did a great job of taking care of Cena and still putting on a great show. Many people may not notice but this kind of thing is where the referees of the WWE really shine. He made sure both Kennedy and Orton were aware of the situation and taking care of Cena. Even Jerry Lawler and Jim Ross did a good job of not bringing attention to it and putting the focus on the actions that were taking place.

Bravo, the entertainers in the WWE are amazing.

Read More