Monday, October 25, 2010

We're through Adobe

I've been an anti-flash guy for a pretty long time now but I've been "ok" with running flash on machines when I had flashblock installed.  Today however I ceded to Adobe's nag and installed the latest upgrade to Flash -- bringing me to Flash Player 10.1  It ran mostly in the background, and I had to agree to what read like a EULA.  My oh my what bullshit they pulled.

Turns out they installed McAfee anti-virus/antispyware, which I've always thought was terrible.  Don't just take my word for it though.  You need no further proof as to how seriously McAfee takes spyware than to see that they don't mind that their program IS INSTALLED AS SPYWARE.  If you have McAfee I would be worried that for $$$ McAfee will decide some other programs aren't spyware, and allow them to be installed on your PC.  Nothing is more dangerous than a false sense of security, and it's clear McAfee has little interest in your PC's security.

As for Adobe.  I'm done with Flash.  Bring on HTML5

I'm not the only one either.

Wednesday, October 13, 2010

Encyclopedia Brown and the Case of the Mysterious Sweater

I wrote this in summer of 2008.  My gang of friends had all come down to Woods Hole, and Mark Z. had brought a sweater he had found in his apartment.  All the girls we knew were assembled, yet no  one claimed the sweater.  After the weekend, emails flew among the group trying to decide who owned the "mysterious sweater."  The phrase reminded me of my childhood, and I sat down and wrote the following:

 
 
Encyclopedia Brown
and the
Case of the Mysterious Sweater

It was a warm Memorial Day on Cape Cod.  Encyclopedia Brown was driving down to visiting his friend Dan in Woods Hole from Idaville.  He had picked up his old friend Sally Kimball from Smith, where she was doing a double major in physical education and flannel shirts.   They were looking forward to a pleasant day of vacation.  But when they got to Woods Hole they found a mystery awaiting them.

Encyclopedia Brown pulled into the hidden driveway, and saw Dan standing out in the driveway directing him to park at the front end of the driveway.  "Boy Leroy, I'm glad to see you -- we've got quite a mystery on our hands!" said Dan.  Encyclopedia grimaced -- usually only his parents or teachers called him by his actual name.   Everyone else just called him Encyclopedia. 

"Please -- don't call me that." Encyclopedia whispered

"Dude!  You're 30 years old!  I can't still call you 'Encyclopedia'" said Dan, putting out his hand for a shake.  Encyclopedia  shook hands briefly, and then decided what the hell -- Dan was his best friend, and pulled him in for the hug.

"Hey Sally -- looking foxy!"  Dan said.  Sally had recently lost a 5 round exhibition match to Tatiana Ali by a split decision, and had the black eye to show for it, but that didn't change the fact that she knew that she was Encyclopedia's bodyguard.  She was still the same girl who had knocked out Bugs Meany in the 5th grade, and made sure that Encyclopedia's back didn't sprout any knives when he was sleuthing.

"Please Dan -- we just got here!" Sally said.  "How about we have some lunch first and mysteries second?"

After a great lunch of BLT sandwiches and kickass left over spinach dip, Encyclopedia said "so tell me about this mystery."

"Ok.  My buddy Mark found this sweater in his apartment the day after St. Patrick's Day." said Dan

"So March 18th?" asked Sally.

"Wow...  It's amazing EB solves anything without your help Sally" Dan said.   "Yes, on March 18th, Mark found this sweater in his apartment.  The day before, Mark had hosted his annual St. Paddy's day breakfast, which was well attended as per usual.  He claims that in between St. Patrick's day and today he has not had any girls in his apartment, so he was baffled who the swetaer belonged to -- but he figured if he brought it down here, one of the girls would know whose it was."

"Who exactly was at the St. Patrick's day party?" asked Encyclopedia?

"Well, the usual suspects, me, Ellie, Mark, Kim...Monte...Jessica, Stephanie, Lori, Evil Dan, Christine.  I think that's it" said (Good) Dan, counting off people on his fingers.


"And they were all here this weekend to deny ownership?"

"Well actually no, Lori didn't make it, but emails have been flying around this morning, and it's not her sweater."

EB closed his eyes, and he did when he wanted to concentrate.  Suddenly they sprang open and he said :"Do you have any pictures of the day?"  

"Actually I do!  I don't know why I didn't think of that earlier!!!"  Dan yelled, as he ran inside to get his digital camera.  5 minutes later, everyone was peering into a 2 inch digital screen looking at pictures from the St. Paddy's day party.

"There seems to be quite a bit of drinking going on" observed Encyclopedia.  "How sure are you that you're not leaving out someone who was there?"

"I don't see Mark's sister -- could it be her sweater?" asked Sally?

"Nope -- she definitely wasn't there."  Dan said.  "And I trust Mark on the discovery date -- if he says that he found the sweater on the 18th, then it wasn't there on the 16th.  We may have been drinking, but not that much."

"Does Mark have a girlfriend?" Encyclopedia asked, flipping through the photos again on the camera.

"Not then.  And trust me, if an unknown girl had shown up at the party and claimed to be a friend of Mark's, we would all remember."

"Do you have any pictures of the sweater?" asked Sally.

Dan flipped the camera to photos from the previous day.  "Yep -- Here's Jessica styling the sweater.  The Vodka sauce stain is new as of this weekend by the way."

"And none of the girls in these photos claims the sweater?"  sniffed Sally as she flipped through the camera.  "I can see why not -- it's a bit girly."

"Nope -- everyone denied having even SEEN the sweater before."

"I've got it!" yelled Sally.  "The sweater must belong to this guy!" she said, pointing to Monte on one of the pictures.  "It's a perfect fit, but he denied ownership because it was too feminine."

"I don't think so" said Encyclopedia.  "If you look at everything else Monte is wearing, you can tell he's a guy who doesn't put a lot of thought it what he's wearing, but certainly would not wear a girl's sweater.  Did you guys see anyone else that day?"

"Well, there was a giant parade,with 86 bagpipers" Dan laughed.  "We saw Mark's neighbors, though we didn't really talk with them.  We also saw Matt McLaughlin, who's a close friend to everyone.  He lives right across the street, and everyone comes down to the street in Southie for the parade"

"Do you have any pictures of him?"  Encyclopedia asked.  "I know you didn't list him in the people who were there, but I'm just curious."

"Umm, no direct ones, but lemme see..." Dan flipped through the photos.  "Yep, here's Matt gaping at the Star Wars procession."

Sally looked at the photo and said "Why is there a Star Wars float in the St. Patrick's Day parade?"

"Well, that mystery will have to be solved on another day, but I know who the sweater belongs to..." said Encyclopedia.

Do you know who the sweater belongs to?  What evidence did Encyclopedia see in the photos that led him to his deduction!  Scroll down to read the answer!
















"See this girl next to Matt.  Who's that?" asked Encyclopedia. 

"SON OF A BITCH!  It's Amanda!" Dan roared.  "But wait -- she's wearing a coat, not a sweater."

"The way she's bundled up though, I bet she's got a sweater under that coat.  And you look at her -- she's the right size for that sweater."  Encyclopedia chuckled.  "I know you Dan.  After the parade, you probably skedadled almost immediately.  That's why you don't remember Matt and Amanda coming over later in the evening -- but it's St. Patrick's Day.  How could a guy named Matt Mclaughlin NOT raise a cup of cheer with his good friend at some point later on in the evening.  Likewise, Matt's such a good friend, that his coming over doesn't count as an unusual event for Mark, which is why he didn't remember it either.  But I bet if you ask Amanda, she'll be missing a sweater.

"Goddam I bet you're right!  Dude--Amazing!"  Dan jumped to his feet,  "Ladies and Gentlemen!  The one and only ENCYCLOPEDIA BROWN!!!"


Author's Footnote:  


When I started writing, I did not actually know how the story would end, but as Encyclopedia began asking questions, I realized exactly as EB knew, Matt and Amanda would have certainly come over -- so EB really did solve the case.

Monday, October 11, 2010

Javascript , YUI, Dates and Datatable

I've had some issues with pushing strings in JSON to a browser and having the browser parse them correctly.  Some browsers will take strings as argument, some want numbers -- it's a bit confusing.  To avoid all confusion, I recommend making a new date and then setting the values, rather than using the ambiguous constructors, which are implemented differently on different browsers.

As an example

new Date("2010, 12, 25");

and

new Date("12 25,2010");

both yield a date in Firefox, but not in IE.

Better is to do this:

Date d = new Date();
d.setFullYear(int year,int month,int day);  

Note that month is 0 based, so 0 is January, 11 is December.