Archive for July, 2008

Technology

A Closer Look at Array’s in ActionScript 3

I have been working with ActionScript for a long time. And I have to admit I don’t know if the reason I never noticed some of the functionality was it was added after I read the documentation, or if I just never looked close enough to pick it up. But never the less I find that I have been overlooking some gems that are built in and so I wanted to make sure that you are not overlooking them as well.

I have been writing a lot of ruby lately and I really like the syntax for looping over each item in an array. In Actionscript there are several ways to do this: for loops, for each, for each in, and while. But each of those takes more setup and management then I think should be required. What I really wanted was to be able to call:

array.each( functionName );

And that would call the function that I pass into the each method of the array, once for every element. Turns out this functionality is actually available on the Array class of Actionscript. Its called forEach. You can use it by providing the forEach method a reference to a function with a signature that looks like this `functionName(item:*, index:int, arr:Array):void`, where item is the current element in the array, index is the current items index and arr is a reference to the array being used. Some example code that uses this could look like:

1
2
3
4
5
6
7
8
9
10
11
12
13
private var list:Array = ['One','Two','Three'];
 
private function doSomethingToList():void
{
    list.forEach(output);
}
 
private function output(item:*, index:int, arr:Array):void
{
    trace(item);
}
 
doSomethingToList()

That would cause each of the items on the array to be traced to the console. So much nicer than a for loop. But it is still a bit more code so you could shorten that up like:

1
2
3
4
private function doSomethingToList():void
{
    list.forEach(function(item:*, index:int, arr:Array):void{trace(item)});
}

Or even chop it down a bit more using the rest array:

1
2
3
4
private function doSomethingToList():void
{
    list.forEach(function(... rest ):void{trace(rest[0])});
}

So the morale of the story is that even if you think you know how something works, it can never hurt to take a look at the docs and confirm that. :) And if you like forEach make sure you check out: every, join, map, some and splice.

Ps. If anyone has a line on a really great code display plugin for WordPress, please drop me a line. I can’t get any to do much for me. Thanks

Technology

Mike Thrasher Presents a Harry and the Potters No-Show

Last night my wife and I got a sitter for 5 hours so that we could head to north portland and see the Harry and the Potters show at the Wonder Ballroom. If you didn’t know it, my wife is a HUGE Harry Potter fan and going to the Harry and the Potters concert has become a tradition in our family. HATP sing songs from the point of view of Harry Potter about scenes in the books. The music is not great but for a fan of the stories its a lot of fun to go and listen. The shows are an all ages event with the opening bands usually spawning from other characters in the stories (Draco and the Malfoys are my favorite openers so far). Last night was the 4th HATP concert we have attended in as many years here in portland. Unfortunately Harry and the Potters did not play during the time we had at the event. In fact when we finally gave up waiting and left the (all ages) show at 10:05 PM, Harry and the Potters had still not taken the stage. And despite the long and fun history of their shows, none of the opening bands had any affiliation with the Harry Potter books what-so-ever. It was a pure and utter disappointment.

When leaving the venue and mentioning our dissatisfaction over the event we were directed to contact Mike Thrasher of Mike Thrasher Presents as he was in charge of booking and directing the event. My wife called Mike Thrasher today to make sure he understood that for an all ages show starting the headliner and the only band listed on the tickets after 10PM was ridiculous. We had gotten a sitter but I felt miserable for the parents that had brought their children and who had left the show completely unsatisfied. Unfortunately Mike Thrasher is an arrogant man who has little concern for the audience he is apparently booking shows for. He countered my wifes concerns by brushing aside her comments and telling her that their was nothing he could do control the timing of the show as that was up to the artists. He was unreceptive to her suggestion that for a show that caters to a younger crowd he should work to ensure the shows started earlier. After all it was his name on the poster outside as well. Making people wait 3 hours to see the only band listed on the ticket is not acceptable by any measure.

The worst part about it is that if he is right and its up to the artists to maintain a timing appropriate for the audience, then last nights debacle falls squarely on the shoulders of the DeGeorge brothers. I would think with such an active following the DeGeorge brothers ( the Harry and the Potters band) would take into account the time constraints on a young audience. Unfortunately it appears that they have become disconnected from their audience in the glory of becoming stage performers.

Is this the bitter rant of someone who feels slighted? Sure. But it doesn’t take away from the fact that last night Harry and the Potters let down a lot of fans who left before they ever took the stage. And Mike Thrasher made a ton of cash by misrepresenting a show. And it is important that everyone know that this happened, because you should be forewarned should you be in a position to support either of these parties. I hope you will understand that it is not in your best interest to do so.

Technology

Vulnerability Fixed - Security Issues Remain

I completely missed any news of this vulnerability in OpenSSH. But I was scanning along today and saw a reference to this description of the issue. It appears that a vulnerability was entered into the OpenSSH code inside the debian distribution. Now I don’t directly use any debian based linux distros, but that doesnt mean the problem doesn’t effect me. I have no control over the systems used by the companies that sign my SSL for instance. The code has been fixed but the problem is that possibily millions off secure keys have been compromised and need to be regenerated and its not black and white for which ones need to be replaced.

The vulnerability is not what I wanted to highlight in this post. I am amazed by how simple the change was that introduced this and is going to cost business millions of dollars to fix. And how I can only imagine how easy it would be for this to happen all over. It also highlights how important open source software is because otherwise we might not have known there was a problem until our most important systems had been compromised. Such a simple change caused such amazingly devastating effects. I can only imagine what kinds of things are lurking inside closed source software we use everyday, and how the end user could be protected by allowing outside parties to review that code. This vulnerability was not exploited because the source was available. It was exploited and the solution was found because the source was available.

So my PSA for this post… Evaluate the software you use. And consider that if you can’t see the source, you can’t really evaluate the security risks you are putting on your self, your clients and your business. Choose wisely, Choose Open Source.

Technology

July PDX RIA Meeting - AIR Offline Synchronization with LCDS 2.6

As my first real meeting back in charge of the Portland RIA group, I called in Ryan Stewart to come give us a special presentation. Ryan will be demonstrating the Offline Synchronization functionality of Adobe AIR in conjunction with LiveCycle Data Services 2.6

Meeting is at PCC Sylvania Campus next Thursday July 24th at 6 pm. More details and directions can be found on the PDX RIA website

See you there!

Technology

PDX RIA is in top gear

I was the Portland RIA User group manager a couple years ago. I knew with the coming of my new baby I would need more time for family. I have really enjoyed that extra time with my daughter and now that she doesn’t require someone keeping an eye on her every second, I feel like I can leave my wife some evenings guilt free.

As such I have taken back the reigns for the PDX RIA group. And as part of a new initiative at Adobe I would also like to introduce my new co-manager Chris Phillips ( http://www.cfchris.com ). Chris has been a long time member of the group attending most of our meetings. He has even presented a couple times. But I think one of the things Chris brings to the table is that he and I like different things. He is a pc guy, I use a mac. He like ajax, I prefer flash. I say take the easy way, he likes to hit his head on the wall a few more times :) (sorry inside joke). Even if you see us, he is tall and skinny… and I am not either of those things.

At any rate, we sat down yesterday and set out a schedule for the rest of the year. So we will work to get the website updated with this info. But for your viewing pleasure.

  • July - Ryan Stewart - Online/Offline Applications with LCDS and AIR
  • August - Nat Papovich - Lost art of specifications
  • September - Barney Boisvert - CF/Groovy Integration
  • October - ColdFusion State of the Union - Panel discussions talking about the CF engines in the market
  • November - Chris Phillips - Real World AJAX
  • December - Holiday Social - Gathering of friends to celebrate the end of the year.

I also want to send out a bit thanks to Ryan Miller for taking care of the group for the last couple years. He did a great job, and it was one he didnt even ask for.

Hope to see you all out to a meeting real soon.

kthxbye

Technology

Changing my RSS feed link

Sorry gang, I feel like I just did this not too long ago. But in my quest to remove google from my life (and to protect the innocent who don’t know they are being watched ) I have removed the adsense ads from my blog. I have turned off the google analyitics. And I am removing my feeds from feedburner.

If you wish to continue to get updates from my blog please update your feed reader to use

http://blog.simb.net/feed/

thanks,
sim

ps. Since many of you actually subscribe to feedburner I want you to have a chance to see this so I will actually be turning this part off tomorrow.

Technology

My Fears About Google Confirmed

Its silly really, I mean what does it matter what videos you look at online. Its not like anyone is keeping track right? I mean wether its some funny video, or your neighbors kids, or something errotic, or even something someone might think was un-patriotic. You can watch whatever you want because you are in the privacy of your own home and no one will ever know.

Except someone does know. They know what videos you watch, and they know the sites you visit, and the types of advertising you find appealing. They even know what news you think is important.

And all it takes is One Subpoena Is All It Takes to Reveal Your Online Life. Think about that next time you do something on the computer you wouldnt want your mother to see. Because chances are someone is watching you do it.