Archive for July, 2007

Physical Programming

Friday, July 27th, 2007

As a programmer, it is vitally important that you constantly learn and evolve to keep you moving forward. I personally spend hours upon hours analyzing frameworks, reading, studying others code, talking with others, and generally trying to grow mentally. I refer to this as my mentally programming myself.

Well once upon a time not so long ago, the nature of my programming was much different. Instead of mentally programming myself or a machine, I was programming people both physically and mentally. In a weird twist of fate, I some how managed to be a physical trainer in Los Angeles. Now normally you are supposed to have a degree to be a trainer. Due to the fact I’d been in physiotherapy so many times from skateboarding, I was actually able to convince a friend of mine to sneak me in as an onsite trainer at a high end rec center.

So what does this have to do with programming you ask? Well just as you have a mental workout everyday, it is just as important if not more, to have a physical workout. Keeping your body healthy, keeps your mind healthy and allows you to focus and think clearer. Not only do you feel better, but you think better.

When people work out they tend not to know what to do. This can typically makes the process feel unproductive and causes one to lose interest. In hopes of setting you on the right path, I’ve included a set workout program in this post. Every phase lasts 3 weeks. After a phase you move to the next phase, until you reach the sixth phase, then you go back to first stage. Each day you do a group of exercises that work a specific set of muscles. For example, phase 1 day 1, you work out back, chest, bis, and calfs. You do 5 sets of 13-15 reps for each body part, waiting 90 seconds between each set. By starting a week off withendurance reps/sets and moving towards strength, the program gives you a comprehensive workout.

I use this program 5 days a week and have been doing so for years. It is not my end all be all (since you should try to mix in cardio, like riding a bike or swimming), but it definitely keeps me going. The program can literally be a life safer, so good luck and happy “programming”!

Phase1
(perform 5 sets, 2-3 sets per exercise)






Day1

Day2

Day3

Day4

Day5

Day6

Workout

(5)Back

(5)Chest

(5)Bicep

(5)Calf

(5)Delts

(5)Tris

(5)Thighs

(5)Abs

(5)Chest

(5)Back

(5)Bicep

(5)Calf

(5)Delts

(5)Tris

(5)Thighs

(5)Abs

(5)Back

(5)Chest

(5)Calf

(5)Bicep

(5)Delts

(5)Tris

(5)Thighs

(5)Abs

Rest

90secs

90secs

90secs

90secs

90secs

90secs

Reps

Endurance

13-15 reps

Endurance

13-15 reps

Strength

10-12 reps

Strength

10-12 reps

Power

8-10 reps

Power

8-10 reps

Phase2






Day1

Day2

Day3

Day4

Day5

Day6

Workout

(4)Back

(4)Chest

(4)Bicep

(4)Calf

(4)Delts

(4)Tris

(4)Thighs

(4)Abs

(4)Chest

(4)Back

(4)Bicep

(4)Calf

(4)Delts

(4)Tris

(4)Thighs

(4)Abs

(4)Back

(4)Chest

(4)Calf

(4)Bicep

(4)Delts

(4)Tris

(4)Thighs

(4)Abs

Rest

120secs

120secs

120secs

120secs

120secs

120secs

Reps

Endurance

10-12 reps

Endurance

10-12 reps

Strength

8-10 reps

Strength

8-10 reps

Power

5-7 reps

Power

5-7 reps

Phase3






Day1

Day2

Day3

Day4

Day5

Day6

Workout

(3)Back

(3)Chest

(4)Bicep

(3)Calf

(4)Delts

(4)Tris

(3)Thighs

(3)Abs

(3)Back

(3)Chest

(3)Thighs

(3)Calf

(3)Chest

(3)Calf

(3)Back

(3)Thighs

(3)Back

(3)Chest

(3)Calf

(3)Thighs

(3)Chest

(3)Back

(3)Thighs

(3)Calf

Rest

150secs

150secs

180secs

180secs

180secs

180secs

Reps

Endurance

13-15 reps

Endurance

13-15 reps

Strength

10-12 reps

Strength

10-12 reps

Power

8-10 reps

Power

8-10 reps

Phase4







Day1

Day2

Day3

Day4

Day5

Day6

Workout

(4)Chest

(4)Bicep

(4)Thighs

(4)Abs

(4)Back

(4)Delts

(4)Calf

(4)Tris

(4)Chest

(4)Bicep

(4)Thighs

(4)Abs

(4)Back

(4)Delts

(4)Tris

(4)Calf

(4)Chest

(4)Back

(4)Thighs

(4)Calf

(4)Back

(4)Chest

(4)Thighs

(4)Calf

Rest

120secs

120secs

120secs

120secs

180secs

180secs

Reps

Endurance

10-12 reps

Endurance

10-12 reps

Strength

8-10 reps

Strength

8-10 reps

Power

5-7 reps

Power

5-7 reps

Phase5






Day1

Day2

Day3

Day4

Day5

Day6

Workout

(3)Back

(3)Chest

(3)Thighs

(3)Calf

(2)Bicep

(3)Chest

(3)Back

(3)Thighs

(3)Calf

(2)Tris

(3)Back

(3)Chest

(2)Bicep

(3)Calf

(3)Thighs

(3)Chest

(3)Back

(3)Calf

(2)Tris

(3)Thighs

(3)Back

(3)Chest

(3)Calf

(3)Thighs

(2)Bicep

(3)Chest

(3)Back

(3)Thighs

(2)Tris

(3)Calf

Rest

150secs

150secs

150secs

150secs

150secs

150secs

Reps

Endurance

13-15 reps

Endurance

13-15 reps

Strength

10-12 reps

Strength

10-12 reps

Power

8-10 reps

Power

8-10 reps

Phase6






Day1

Day2

Day3

Day4

Day5

Day6

Workout

(3)Back

(3)Chest

(3)Bicep

(3)Calf

(3)Delts

(3)Tris

(3)Thighs

(3)Abs

(3)Chest

(3)Back

(3)Calf

(3)Bicep

(3)Thighs

(3)Abs

(3)Delts

(3)Tris

(3)Back

(3)Chest

(3)Calf

(3)Bicep

(3)Delts

(3)Abs

(3)Tris

(3)Thighs

Rest

90secs

90secs

90secs

90secs

90secs

90secs

Reps

Endurance

13-15 reps

Endurance

13-15 reps

Strength

10-12 reps

Strength

10-12 reps

Power

8-10 reps

Power

8-10 reps

GameZone Article on PS3 Megasode

Tuesday, July 24th, 2007

I don’t necessarily think I can beat having press from the New York Times, but it’s awesome to continue seeing press roll in about the PS3 Megasode Application that I helped concept and build. GameZone has the latest standout article, which you can view online. Check it out when you have a chance, and for those who haven’t done so yet, don’t forget there is actually an online video available of me presenting the prototype in Canada.

Project: SonyBMG Viral Video Player

Tuesday, July 24th, 2007

Has sexy been gone so long, that the idea of JT bringing it back is making you itch to tell everyone? Wait no longer my American Idol inspired friend, because now you can show them. That’s right SHOW is the word, as SonyBMG has opened up their music video library for all to see and share. MusicBox is the name of the game and the site has a plethora of music content with a nice community wrapper over top of it to boot.

For those in the know, MusicBox didn’t just launch yesterday. Instead it has been evolving over this past year. Being the lucky lad that I am, I have been fortunate enough to be involved with it. So why all the fuss over something that has been around for longer than a month? Well we just brought sexy back to the video player.

That’s right as you can see above, SonyBMG has a sexy new viral video player to play that “Sexy Back”, brought to you by yours truly. The distribution code is all over the MusicBox site waiting to be grabbed.

For my fellow nerds who are curious on the tech side of things, the player is a custom interface wrapped over top of the embeddable Brightcove template. If you want to make your own custom BC viral player, the embeddable template is only available for higher end Brightcove accounts. However, if you have access to that template, and you are wanting to get your sexy on as well, below are a few pointers to save some headaches:

  • don’t use the APIs to set settings, instead all settings can be set up front when loading the BC module using config values.
  • want the pesky menu to disappear? set the useOverlayMenu config value to false
  • with a viral player, BC loves Javascript and sites hate it. set the config disableJavascriptAPI to true, call System.security.allowDomain(”*”);, and if you are aiming for MySpace set the config domain to embed.
  • using streaming media, call {player_instance_here}.base.mWorkArea.layout.mPlayer_mp.mContentCompleted = false; in your media start events, which will ensure that mediaComplete event gets called.

All of the above are simple actions, but if you don’t know them you’ll be searching the docs and scratching your head wondering why things don’t work. On that note, good luck to the nerds and happy sharing to my pop loving buddies.

The Death and Rise of Music Videos

Monday, July 23rd, 2007

When you turn to MTV are you watching that same Sweet 16 episode over again, left wondering where all your music videos went and questioning what is Ed Lover doing now? The day of music television seems to have come and gone overnight. It existed long enough to define the culture of a generation and then in what seemed like a blink of the eye had itself redefined by a new generation. Don’t get me wrong MTV as a channel is not gone, its focus has just shifted. MTV on air is no longer Music Television it’s more like Teen Reality Television.

Enter the INTERNET which makes what was once lost now found. It’s unlimited capacity has made music videos popular once again and given them a new home. MTV is serving them up online, but so are the content creators. The fact that the creators are acting as the immediate channel or distributor marks a definite shift. The point illustrates the narrowing gap between creator and consumer, as well as who can be the creator. The creator could range from a small band with a camcorder to a large music label’s production.

With all that said, the time of waiting endlessly for that one video to come on or staying up late hoping to catch the next big thing has come to an end. Now it’s just a matter of search, point, click, and enjoy. The amount of music videos now available seems endless and it just keeps growing. We have gone from discovering cool on MTV, to MTV discovering cool on YouTube. These are exciting times.

Project: Super Deluxe Playlist Player

Wednesday, July 18th, 2007

The boys and girls at SuperDeluxe celebrated their 6 month birthday yesterday by revamping their site. My presents to them were their shiny new playlist video player and the super dooper featured videos end slate. I can’t honestly say they were presents though, since the inhouse team basically wrapped them. To that point, I’m pretty happy with the overall simplicity of the design the design team was able to come up with. We started out with a lot extra information on both the featured videos slate and the playlist player, then basically stripped it all away.

Criticisms
Though I do like the simplicity of the design, there are a few things I’m unsure of. For one, the interaction metaphor present in the playlist player is the static browse/view stance. As I pointed out with Adult Swim, these are separate tasks. I can’t decide if the nature of how the module is used justifies this coupled view or whether it should be more like Adult Swim’s. I will say that unlike Adult Swim, browsing is rather limited and there is a focus on the “playlist”. The decision could go either way, so what do you think? I also don’t know how I feel about the featured videos end slate showing up in the context of the playlist player itself. You typically won’t see this slate because continuous play is enabled. However, when it does appear in this context it is an odd experience. In my eyes, the videos in the side list are the related videos. Why would there be two lists at the same time representing the same thing? It makes sense to just have a video’s details or a replay slate instead. Anyways, those are my basic criticisms.

Potential Interaction Models
Now if we were to decouple the browse and view tasks, I can think of a couple of ways to do this. One example is the new YouTube viral player. Their player blends featured videos and the playlist into a single entity, essentially making it a playlist player. The main oddity in this situation for us is that the “playlist” is not noticeable up front. It only appears when paused, completed, or when the menu is clicked. Thus, video choice is pushed upon you from the start. The decision in this case is not to show choice, but assumes you know choice and want to offer alternatives as a side. Hence it leans more towards featured than pure playlist choice. Regardless, I do like where they went with the player, even if it does use the to cool for school OSX style navigation on the thumbs. All that said, are there any other existing players that follow this model that might be a better fit? I’m interested to hear what you all think or view examples, since I’m always searching for the best model myself.Thanks, and let me know your thoughts!

Flash CS3 List.addItem selection BUG

Monday, July 16th, 2007

The new Flash CS3 components took a giant leap forward in usability and functionality by simplifying their internals. However, in the process of doing a rewrite, they didn’t do a good job on unit testing. If you add an item to the List component or it’s dataProvider, you will see a nice little glitch. Adding an item causes the selection to be incorrect, because the selection isn’t being shifted correctly.

The culprit to the issue is in the function handleDataChange in fl.controls.SelectableList.as. The update to the index for the DataChangeType.ADD conditional in this function is incorrect.
Instead of
_selectedIndices[i] += startIndex-endIndex;
it should be
_selectedIndices[i] += startIndex-endIndex + 1;

As you can see it’s a simple change, but a nasty bug if it hits your application. Grant and his team were brilliant with their execution, however QA should have hit it a little harder.

Project: Adult Swim Video 2.0

Monday, July 16th, 2007

Last month we relaunched Adult Swim’s video gallery application and brought it up to the to cool for school 2.0 status. For those not in the know, the first release was just a reskin of the Cartoon release and the point release after that was an update from Windows Media to Flash video. This new release is a reskin, relayout, and interaction change.

Layout Choice
So why the new layout? Well if you look at the app, it’s very apparent that it resembles a YouTube layout. This was done because the layout provided advantages over the existing layout. For starters it uses a common interaction model that users are familiar with, so it automatically yields ease of use based on that notion alone. YouTube also does a good job of separating out functions of browse, search, and view. Typically most of the Flash video apps tie these functions together. For example, the Cartoon player has video as the main focus but always maintains a consistent navigation. In this model you have limited room for the current video’s details and browsing. By separating and opening it up in the way that YouTube does, the browse and search sections are a lot larger and the amount of content is more apparent. In addition, subsections and filters can be listed out beneath sections in context which allow for quick jumping. For example, the navigation options Comedy, Robot Chicken, and Most Viewed are available all at the same time. In the previous model, this required navigating between screens. Keeping search as a consistent function also provides for quicker jump points, since it is always present. Just like the browse perspective, the video perspective has more space to focus on everything that defines a video. It seems a little bare now, but you can imagine that there are a lot of elements you can attach to a video. By design this setup allows for that. All in all the new layout provides a more focused experience.

Flash vs HTML
Ok great layout, but why is it all in Flash and not HTML like YouTube? Good question and there are a few reasons. One of the main reasons is the nature of Adult Swim’s servers and deployment. For the most part, everything is statically deployed pages vs dynamically deployed pages. Most of their service based offerings are just that, services. In the case of video, the system was already deployed as a service based system. Although we did updates to the system, it is the exact same system and can be used for multiple frontend clients. In this case, the main task was simply modifying the client. Since I handled the entire client and it took me a relatively short time to update, time to market was minimal. Thus time and existing systems were a factor. On the other side of the foot, you have interaction models. Having the application in Flash allowed us to create a unified experience. Unlike YouTube, viewing and browsing aren’t completely broken. When switching in between tasks, you are able to continue viewing while browsing. This type of unification is also seen in browsing, where page to page navigation doesn’t require a page refresh. With all that said, the application does suffer from the fact that it doesn’t offer browser history navigation using the previous and back buttons, defined urls in the browser for deeplinking, and indexable content. It suffers now, but I have solutions that don’t require many changes which may be integrated in the near future ;).

New Features
You are thinking lovely this is a great new layout, but does it do anything new other than look fabulously cool? How about the new sorting features Chuck? Now you can actually sort your video results by most viewed, most popular, most hated, and most recent. Even better, you can apply these sorts to the entire video collection. Yes, you can browse or search the entire collection. This is unlike the previous version which only allowed you to browse per section. More control over choosing what you want to view is always a good thing and control over the content itself can be even better. Well we updated it to be like YouTube and added one of YouTube’s most successful features. Oh buddy that’s right, we got viral. Now you can find a clip that you want and post it to your blog. Free AS content for the taking! That said, there is a constraint. Currently full episodes aren’t shareable. This is primarily due to the fact that networks posting content online are only allowed to maintain specific amounts of content at a any given time. There are many restrictions placed on them by their cable and content creator relationships, and this is one of them. It is unfortunate, but I think I have a few solutions up my sleeve that can address these constraints.

Future changes
Love the new features, but are you wanting more or feel like something was taken away? My biggest gripe with the player is that we can’t go true fullscreen right now. This happened with the point release from Windows Media to Flash. The reason is that the companion image ad for videos is in HTML (even though it appears to be part of the Flash movie). Having the ad this way requires changing the WMode of Flash to render correctly and ties the renderer to the browser. This restriction makes going fullscreen technically impossible. We are taking steps to change this and provide a true fullscreen experience. If you are viewing a show you want to be able VIEW the show! The other changes would be related to things I hinted to before. I’d like to provide a means of sharing episodes, allowing browser history browsing and deeplinking, indexing the content, and opening up the things that you can “view and do” in relation a video. Regardless of what I want to do, comment in on what you think and what you might want to do. In the meantime, check out some great LEGAL Family Guy clips!

mx.video.NCManager.nextConnect quirk

Wednesday, July 11th, 2007

For those who aren’t aware, mx.video.NCManager is a class that is used by Flash’s FLVPlayback component. It’s a “chunky monkey” class in that it does everything under the sun including things that have nothing to do with it’s title, but at it’s core it manages connections to videos. With this management, it abstracts the love/hate relationship of connecting to an FMS server for streaming videos, which requires trying various protocols and ports.

You see, connecting to FMS is different than making a simple HTTP request. Since it is typically not a port 80 request and it is persistent, various factors can cause it to fail. The most often reason being a firewall. NCManager automagically handles this by cycling through all the port (443, 1935, 80) and protocol (rtmp, rtmpt, rtmps) combos attempting to create a successful and efficient connection.

The quirk that I speak of exists in the NCManager’s nextConnect method. The class cycles through the list of possible protocl/port connections in a defined sequence. However, it doesn’t take into account that if for some reason your default url used a protocol/port combo that is further in the sequence say rtmp over port 443 and it failed. In this case, it would try the 443 connection twice and never try 1935 (1935 preceds 443 in the sequence). This is because it doesn’t acknowledge that the first attempt was out of order and then reshuffle the potential connections before iterating through them. One might make the assumption that if you are passing it a url consisting of a port/protocol url further in the sequence that you are specifically saying the combos above it are not possible. However, that is an assumption. Even with that assumption, if you have a failure you are making a second call that wastes resources.

As I mentioned, I labeled this as a quirk since the method works, but it works incorrectly in rare instances.

Project: CNN Image Gallery

Tuesday, July 10th, 2007

A few weeks ago, CNN launched their spiffy new site which I was fortunate enough to have my hands dirtied from. I’ll save my comments for the redesign for another post, but wanted to point out the image gallery I worked on.

Details about the gallery

  • generic and allows setting any gallery feed on embed
  • allows deeplinking to specific images on embed
  • allows navigating to specific images from javascript
  • allows changing gallery feed via javascript
  • tracks image clicks
  • tracks gallery loads
  • allows emailing of gallery
  • Overall the experience with the gallery is pretty smooth. However, because it is competing with a bunch of other processes on the page, you can visually see the lag it is experiencing (via captions hide/reveal animation).

    For those with a bit of Flash community knowledge the new image gallery has a pretty familiar look. One might even venture to think that the module is indeed what it appears to be, SlideShow Pro. However, you would be wrong. Despite it’s drastically similar resemblance, it is a ground up custom write. Should it have been? Thats a good question. My first response when I saw the design firm’s mocks were, go get SlideShow Pro. I even pointed them to Todd and told him about it (since he was still at Turner). It was obvious they had used it as a model, so why not just customize it, right?

    Well in the case of CNN, they wanted control. Control over the UI, control over the effects, control over the data, control over the internals, control over events, and basically the control to modify everything and anything to do with the module. I granted their wish and did a ground up write, which took little time. It was a clean implementation that did only what they asked and was fine tuned to their needs. It was the details that you don’t see that made the custom write the correct decision, and in the end I agree with their choice.

    With all that said, I think it is a compliment to Todd that they followed his design. Though it made me feel odd with the project being so close his work, it points out the validity of his component. If CNN mirrors SlideShowPro, then that should tell you the component rocks. I wasn’t able to use it here, but I highly recommend it.

    MovieClipLoader and Loader quirks with cached images

    Tuesday, July 10th, 2007

    On a recent project I ran into a quirk/unexpected behavior when using MovieClipLoader in AS2 or Loader in AS3 to load an image. When using the classes, you have the ability to listen for a progress event, which you typically use to show an progress bar. If an image is cached, one would think the progress event would not fire since it should be fired on bytes loaded not bytes read, correct? Wrong. If an image is cached the progress event still fires, even to the tune of 9 times.

    I would have not guessed this to be the case, and had even willingly drank the koolaid into believing all my load worries had been solved by these glorious classes. Instead I had to back peddle and use enterFrame checks for progress events and only use the onLoadInit/complete event from the class. All of this I found because a designer was getting upset because the progress bar kept showing up on loaded images. That’s right folks, the mantra here is “designers are your friends”.