OpenPyro wiki updates, and plans going forward 0

I have been talking a bit around OpenPyro quite a bit in my recent blog posts but I wasn’t sure if the project was gaining traction until MAX SF this year where I actually had more than a few conversations around OpenPyro. Oh wow, that was awesome! But I realize we haven’t been doing a great job communicating progress or direction around this project, or gathering feedback. So I spent a few hours today writing up the Intro and the Development Themes pages on the OpenPyro wiki. Both are also linked off the main project page here.

Please take a few moments to read the pages. If you are interested in this project in any capacity (influence direction, mark bugs, request features or contribute code), please join the OpenPyro google group. To make it even simpler, I am including an inline subscription box here:

Google Groups
Subscribe to AS3 Pyro User Group
Email:
Visit this group

On our side we are going to be busy being even more transparent, by doing things like public code reviews (we use ReviewBoard within CIM and are going to have a public version of it soon).

OpenPyro is definitely a community project and if you have code that would benefit OpenPyro, we would love to include it in our code base.

Thanks and happy coding.

When terrorism hits home 2

Last night Mumbai suffered what some news reporters called the worst act of terrorism India has ever seen. Mumbai unfortunately, is no stranger to acts of terrorism but these attacks were of a completely different kind, the attackers definitely suicidal who just wanted to kill as many people as they could before they themselves were killed. Even after 24 hours, the drama still is not over with the security forces still trying to rescue people who have either been taken hostage or have been stranded locked up in their rooms.

I was glued to the NDTV live steam for most of the night and since I have woken up this morning, and on tracking the story on search.twitter.com as well as occasionally jumping to BBC news or CNN. My first emotion was anger. Mumbai was my home for a while and its still my favorite city in the world. And to see it virtually being held hostage by these loathsome assholes enraged me. My sentiments towards the government and the security forces were those of sympathy almost, they are trying their best arent they?

But I talked to my brother over chat then and another friend who also often visits Mumbai, and they were less so. The attacks in Mumbai weren’t unexpected, after the recent attacks in other big cities where Mumbai was conspicuously out of the list. Its the job of the government to keep its citizens safe, and it failed miserably this time. While the on site journalists kept insisting that the city will bounce back and take it in its stride, I really hope this wakes us up as a country and makes us ask some serious questions of ourselves and of the people we put into power to make sure things like this don’t happen. Its time we stopped being reactive and “politically correct” and just root the sources of such terror out. Lets stop taking the safe and conventional responses. Give the security agencies more rope and let them go after the core of the threats irrespective of political sensitivities. We need more supercops like KPS Gill

The drama still goes on in Mumbai but I hope this is a wake up call to us all.

Notes from Max 08 0

I got back from San Francisco this morning taking a couple of extra days at San Francisco to do some tourism. So I figured I’d put down what I had learned this year before the workweek clouded all that to a distant blur.
As usual, MAX was f-ing awesome. I have tried to make it to MAX every year since I graduated and joined the corporate workforce and Comcast has been pretty awesome about making sure I could do that on their dime. This year was no exception and most of the Flash team from CIM was there at MAX as Adobe showed of the cool stuff they have been working on.
My strategy for MAX this year was a little different than earlier. Traditionally I have tried to get deeper into technologies that I work with everyday. This year, with so many new ideas being shown at MAX, I decided to take sessions on the things that I did not work with between 9-5 and would be really easy for me to miss. I have to say it worked out pretty well.
Let me start off by saying: HOLY S**T, the Flash Platform is AWESOME and the pace at which its evolving is just incredible. Below are some of the best sessions I attended this year:

Using C++ Libraries in Flash Player and Adobe AIR
This was definitely one of the best sessions I attended at MAX this year. The session introduced Adobe’s Alchemy project that compiles C++ code to Actionscript bytecode that can be run on the Flash Player just as any bytecode compiled from AS3 code would. The project isn’t mature yet but some of the examples that were shown like ports of C++ OggVorbis codec, motion detection libraries, cryptographic libraries, etc were definitely impressive. I guess its time for me to brush up my C++ ;) .

Hands On: Creating Effects with Pixel Bender
I think I got most excited during this lab. Pixel Bender, as a lot of you may know, is a technology that allows developers to write Shaders in a language called Hydra. Hydra is has a C-esque syntax but is really easy since you dont do really complicated logic in it, but rather simple pixel manipulation. These Shaders can then be applied at runtime to Flash DisplayObjects and also be used within Photoshop / AfterEffects as custom Shaders. I had read a bit about this before but the syntax and the prospect of having to learn another language was keeping me away from writing a custom Shader. However, it was really surprising how ridiculously easy this was. Hopefully I’ll write a couple of filters soon and release them on this blog.

Extending Flex Builder
Another awesome session, almost perfect for me. This session introduced the object model that the Flex/Actionscript plugin uses for all the language intelligence within the IDE. The session was really useful since I had a couple of ideas to extend Flex Builder but while I was able to learn about Eclipse itself, I had no knowledge of the details of Flex Builder plugin itself.

Hands On: Getting Started with AfterEffects CS4
Programmatic Animations in AfterEffects with Expressions and Scripting
On day 1, I attended part of the AfterEffects workshop in the morning. I have never worked with AE but have seen some designers I work with come up with some incredible stuff with it. The session was perfect since it taught me enough to now let me go play on my own. Unfortunately I had to get out of that session half way since I had to get to a meeting (yeah I was also working there) but the pace of the session was perfect.
On day 2, I attended another session on programmatic animation in AE. Since most of the animation I do in Flash in programmatic, this really made me map that knowledge to the AE domain. Between these two sessions, I think I really got a lot clearer understanding of AE than before.

Adobe XD: Designing Design
Adobe XD: Building a Next Generation News Reader
I loved the XD sessions. Seeing how they go around developing apps and how they make decisions around user interfaces is always interesting. The session where Jeremy Clark explained the process of developing the New York Times news reader application was particularly informative, where they even showed the process of prototyping interaction design, something I really feel all companies should do more of.

But more than the sessions, it was meeting other attendees that was just plain amazing. I had some amazing conversations around the future of LogBook and OpenPyro with quite a few people I have talked to on twitter and email but seeing them in person was very exciting. These were almost as educational as some of the sessions.

Max 08 was just amazing, and am definitely looking forward to Max 09 in LA.

Simple OpenPyro example with source: Image Viewer 1

Work on OpenPyro goes well, and I keep getting people asking me for examples of the framework in use. After receiving another request today on an OpenPyro example, I figured I'd write a quick widget and release it with the source. So check out this very simple Photo Browser app. The source can be found here. The application is simple on purpose but shows some parts I want to highlight. The widget is a List module on one side and an Image container inside another container on the other side. As you click on a list item, the source of the Image component changes. Here are some key parts of the code:

Measurement:
This of course is the main thing I worked on in OpenPyro. In the main class, the shell lays out a header and a PhotoModule component and a Spacer vertically using a VLayout object. The PhotoModule is sized by setting its percentWidth and percentHeight to 100, and the layout does the rest. Pretty sweet.
The List component within the PhotoModule class is sized similarly with a width of 200 and the ScrollPane is sized at 100% of the unused space.

List with custom renderer:
The List module implementation here is also an interesting example that shows how a List module can work with custom renderers. The code looks like:

Actionscript:
  1. var list:List = new List();
  2.             var itemRendererFactory:ClassFactory  = new ClassFactory(DefaultListRenderer)
  3.             itemRendererFactory.properties = {    percentWidth:100,
  4.                                                 height:30,
  5.                                                 rollOutBackgroundPainter:new FillPainter(0x444444),
  6.                                                 labelFormat:new TextFormat("Arial", 12, 0xffffff)}
  7.             list.itemRenderer  = itemRendererFactory;
  8.             list.dataProvider = picData;
  9.             list.layout = new VLayout()
  10.             list.skin = new AuroraContainerSkin()
  11.             list.width = 250;
  12.            
  13.             var listPainter:GradientFillPainter = new GradientFillPainter([0x222222, 0x111111])
  14.             listPainter.rotation = Math.PI/2
  15.        
  16.             list.backgroundPainter = listPainter
  17.             list.percentHeight = 100;
  18.          
  19.             addChild(list);

Automatic scrollbar creation on containers
The module on the right that shows the photo is basically just an Image control within a UIContainer. If you click on the Asterix photo, the photo is bigger than the container and the container automatically puts the scrollbars in. Its also important to realize that the only reason the photo became bigger than the containing UIContainer was because the image did not have a width,height assigned to it. In that case, all UIControls default into a child based measurement strategy and their sizes are determined by the children they contain.

Using BackgroundPainters
I love the backgroundPainter api on the basic control (UIControl). In one or two lines, you can set the entire look of a component. The code looks something like:

Actionscript:
  1. var bgPainter:GradientFillPainter = new GradientFillPainter([0,0x333333]);
  2.  bgPainter.cornerRadius = 10;
  3.  bgPainter.rotation = Math.PI/2
  4.  shell.backgroundPainter = bgPainter;

If the shell in the above case resizes, the painter is re-triggered and repaints correctly.

FileSize
Once again the killer part of the framework is the file size. This example is about 21 K.

There is a lot of stuff here I am pretty proud of, but again, it still needs a lot of work. If you are interested in the project and are coming to MAX San Francisco this year, I would love to meet you. My twitter id is @arpit.

me

See you at Max

BarCampPhilly 2008: What a blast ! 9

BarCamp Philly

This weekend Philadelphia was host to its first BarCamp event. For the uninitiated, BarCamp is an international network of user generated conferences — open, participatory workshop-events, whose content is provided by participants (wikipedia link here). Barcamp is described as an "unconference", with the sessions being a lot more casual and more like conversations than presentations. Having been to a bunch of conferences before, I definitely found the organic nature of BarCamp rather refreshing. When I walked in at 8:15-ish in the morning, I had no plans of presenting anything but swept by the energy in the group, I ended up giving not one but two sessions (more on that later).

Working for Comcast, and pretty familiar with how it is most often a subject of blame than praise, the biggest surprise for me was how positively the attendees spoke of Comcast. For example, a session on ROI on social media was dominated by a discussion on the @comcastcares twitter account run by Frank Eliason from Comcast support. Always available a tweet away, Frank has been answering twitter users when they have Comcast related troubles. The conversation around how Comcast "gets it" was definitely new (kudos @comcastcares :) ). Comcast definitely had a strong showing at Barcamp this year, with a bunch of us attending as well as volunteering for the event. Aaron Held, the director of engineering at Comcast Interactive Media (the division I work for) gave a talk on building Comcast.net, a site that boasts being one of the top 10 portals on the web, to a packed room. Aaron and I also had a round table discussion about innovating within a corportation, and I personally got a lot out of that (I'll post a blog post on that sometime later this week).

CIM @ BarCampPhilly2008: Innovation within

Also, continuing my agenda for a Flash-y world, I gave another talk on using Flash in an AJAX world, where I talked about where Flash had certain advantages over AJAX (besides the richer interfaces it enables). Kevin Fitzpatrick, another fellow Flash dev for CIM gave a talk on sharing your ideas early and leveraging the community to take an idea from concept to a product. Livia, another fellow Cimian (yes thats what we call ourselves now ;) ) from our IA group also gave a talk titled "Jedi Mind Tricks - mediating user, brand, technology & business goals through conversation" which unfortunately I missed as I forgot to check for new sessions on the schedule. Wonder if anyone took notes on that one.

After an intense day of a lot of fun sessions, the day ended at the always fantastic National Mechanics bar, which was made even more geek friendly with a hooked up Rock Band and (gasp!) an open bar! It was amazing.

Hats off to the BarCamp organizers Roz Duffy and JP Toto and the entire volunteer army. You guys did an amazing job. Here's to a lot geekier Philadelphia :) .

Oh and btw, one of the things I had to do was animate a wordle that the BarCamp peeps created. This ran on a couple of big screen displays at the conference. I am attaching it here for posterity and the source can be found here.