Tuesday, May 26, 2009

JavaOne, Too

For those not following my Java blog (what, one post per year isn't enough?), I thought I'd mention that I'll be back at the JavaOne conference this year, speaking about Flex, Java, and fun graphics/animation stuff.

The main thing for me this year is the presentation that I'm doing with Romain Guy, called "Move Your Users: Animation Principles for Great User Experiences". We'll be presenting at 11:05 on Wednesday (June 3rd), and again at a repeat session on Friday afternoon (June 5th). This year's talk will be less about code and more about concepts and design principles. Should be fun.

I will also be assisting Duane Nickull in his lab on creating PDFs with LC ES and other server-side stuff that I should really learn one of these days. There is also an Adobe event at Jillian's on Wednesday from 6:30-9:30 PM - stop by the Adobe booth for more information. Speaking of the booth, I'll be spending some quality time there when not in sessions doing some small talks, demos, and generally hanging out trying to look like I work for Marketing. Stop by if you're around the show floor.

Friday, May 22, 2009

Video: CodeDependent #2, er, 7

Now things are really moving...

The next episode of CodeDependent, "A Moving Comparison," is out. There are actually 7 episodes in the show so far, but 5 of those are reruns, rendered onto the spiffy new CodeDependent set. (I suspect that the earlier versions of those episodes, rendered on the standard Aodbe Developer Connection backdrop, will become collectors' items. Somewhere. Sometime. Perhaps they will be re-master and re-released someday, as "Codedependent Classics").

This latest show is a brand new one, starting right where the first one, "Graphics in Flex 3 and Gumbo", left off. In the first episode, I compared simple custom graphics in Flex 3 to simple graphics in Flex 4 (codename Gumbo). In this episode, I compare simple animations in Flex 3 and Gumbo on those same graphics objects.

Here's the video:

Here are the demos:

And here is the source code.

Enjoy.

Tuesday, May 12, 2009

Video: Codedependent Reruns Already?

Usually, a show has reruns after at least one successful season, when everyone's on vacation and the actors are playing hardball for contract renewals and the public is demanding content that just isn't there. But with CodeDependent, we have reruns after just one show. It's either that popular or the producers are just trying to amortize the costs for that amazingly expensive and glamorous CG set backdrop.

In case anyone's checking out the CodeDependent video page, or the Codedependent show on iTunes, I wanted to point out that there are a small number of reruns in the pipe. That is, there are a few videos that came out in the last several weeks on Adobe TV before the CodeDependent show existed (our people were still talking to their people, the unions were on strike, the writers wanted more donuts, and we were all doing the usual bickering and negotiating that is a natural part of any major show production) that have been sucked up under the CodeDependent banner. The producers have taken the old content and basically re-rendered it with the nifty new grayscale backdrop. Same content, different look, like plastic surgery without the cost, wider smile, and mortality risks.

There will be a handful of these reruns coming out in the next few days, then it's back to new content. I think this is probably the only time there will be reruns on CodeDependent, but maybe if there's a writers' strike next year, we'll see old home movies of me pushed as CodeDependent shows.

In the meantime, I'll continue to post items here on this blog when there is new content. Look for a new show in a few days...

Monday, May 11, 2009

Video: CodeDependent #1

Adobe TV has just posted the first in what I hope to be a very long run of my new show, “CodeDependent”. Fortunately, the show is not on the Fox network, so that may give it a better chance of not being canceled.

The CodeDependent show is not that different from the videos I’ve been doing already: short tutorials on various aspects of Flex and Flash that I find interesting. The biggest change is that they should be more regular (we’re aiming for an every-other-week schedule as we settle into it). Also, they producers gave me a nifty new grayscale CG set design to match my nifty old grayscale CG personality.

This first show is a simple tutorial on Flex 3 and Flex 4 (codename Gumbo) graphics. For the Flex 3 demo, you'll see how to drop down into ActionScript code to draw simple graphics through the Flash APIs into your Flex application. For the Flex 4 version, you'll see you to do the same thing through MXML graphics tags. In future episodes, we'll build on these simple examples and see how to animate the objectsand how to get more realistic animations. (Can you feel the suspense of this cliff-hanger? I’m trying to incorporate standard television series techniques into the show. Look for a laughtrack soon.) But I’m getting way ahead of myself.

Here’s the video:

Here’s the awesome demo application:

And here’s the source code.

Enjoy. And welcome to my show…

Tuesday, May 5, 2009

Effects and other Flex Stuff at Flash Camp SF: May 29th

Mike Chambers just posted info about Flash Camp San Francisco on the evening of Friday, May 29th at the Adobe offices in SF. I'll be talking about Flex 4 effects at 9:10 PM. That's about 10 minutes past my bedtime, so I'll probably hit the coffee harder than the beer that evening. This gathering is primarly about Flex 4, Flex Builder 4, and Flash Catalyst. Go read about the event, check out the schedule, and register. It's free, but space is limited, so register now.

Thursday, April 9, 2009

Video: Interview on Parleys.com

The Java Posse interviewed James Ward and I during the Devoxx conference last December. Catch it on the excellent parleys.com site or watch it here:

Wednesday, April 1, 2009

Post: Fix Prefix

Update 4/2/09: Hopefully it is obvious, but in case anyone stumbles upon this post unknowingly, please note that it was an April Fools joke.

I hate explaining or pointing out jokes. It's like having to bribe the teacher to pass your child because the kid couldn't master Kindergarten on their own merits. But in this case, I'd like to be clear to avoid any confusion over what Flex actually supports and why.

Like any good joke and some former presidents, there is a small bit of truth behind it, but a lot of it's just hooey. Except for item 6, which really is the current state of the Spark component names. And the part about the community. We really do have posters of them up on our walls, at work and at home. Every one of 'em.

What's in a name? A rose by any other name would still draw blood...

If you’ve paid any attention to the development of Gumbo, the next release of the Flex platform, you probably know that there was a dust-up about the naming of the new components and effects in Gumbo. In technical terms, this is known as a ‘kerfluffle’, but it generally boiled down to a process of the community beating up the Flex team on a regular basis.

Now we on the Flex team love the community: we have pictures of them in our cubes, we try to friend them on FaceBook (though they usually reject us), and we generally suck up to them every chance we get. In fact, we have an internal contest of collecting signatures of community members. Deepa’s currently ahead, but we suspect some are forgeries.

Because of our abiding, nearly predatory love for the community, we wanted to make things right. So when people found fault with our proposed component names, we pissed and moaned and generally felt sorry for ourselves. Then, in a feat of maturity heretofore unknown to engineers, we sucked it up and tried to fix it.

I’d like to lay out the general history of the naming proposals, and then show the final result. I’m sure you’ll agree with us that it’s really fantastic now and that you now respect and admire us for the changes we’ve made. And who knows – maybe we can even get your autograph.

For the descriptions below, I’ll focus (get it? focus! Just another in a hilarious serious of UI toolkit-related word plays. God, I love working on this technology!) on the ‘button’ component, as it’s representative of everything else in the toolkit, from components to effects to that utility class that calculates Pi to 1,547 digits (using the circular reasoning algorithm).

1. First attempt: Button

In the beginning, there was a word, and the word was Button. Unfortunately, that word was already taken by Button in Halo. But surely nobody would care when the new Spark button was going to be so magnificent that nobody would ever care about the old Button again, right? So we named our new Spark button ‘Button’ and went on our merry way. But the tools, Lo did the chafe and grumble. What about applications that used both Halo and Spark components? What to hint? What to complete? How to distinguish? Clearly, another solution was desired.

2. Second attempt: Synonym for Button

Well, since Button was taken, we needed a different name for the same darned thing. We considered several alternatives, including:

  • ThingThatPushes
  • RectangularClickyThing
  • BetterButton
  • OnButt
  • PressMe
  • Presser
  • ComponentFormerlyKnownAsButton

The last of these was the leading contender for some time. We even developed a custom glyph for the object, but it turned out the glyph could not be represented in unicode and that the class became so long that it bloated our SWF sizes by 10x, so we sadly gave up on this angle and searched for something else.

3. Attempt the Third: Suffix

It turned out that ‘Button’ really was the best name for something that was, well, a button. We realized that we needed something distinguish the new from the old button, however, so we considered suffix text, including:

  • ButtonNew
  • Buttonn (repeat the last letter, like Panell, Checkboxx, etc. This broke down when legal objected to our use of ‘Canvass’ as being obscene and derogatory toward Canvas-like objects).
  • ButtonSpark
  • ButtonButton
  • Button2

All of these would have been possible, but we gave up on this path due to what we in the trade call “The Icky Factor.” We did try out these various alternatives in front of a live studio audience. They threw up.

4. The Fourth Attempt: Prefix

Well, if a suffix wouldn’t do it, surely a prefix would. So we tried several, including:

  1. JButton: Hans suggested this one. It seemed very familiar to some of us, like coming home. But execs rejected it on the paltry basis that the letter J has nothing to do with Flex.
  2. SparkButton: This variation had several advantages:
    1. It would promote the branding of the new Spark theme in Gumbo.
    2. It had a perky ring to it
    3. It would help developers practice their typing skills by requiring these extra five letters for every component and effect.

    Nonetheless, this variation was killed in committee for being too easily confused with the UI components released by the Scatological Processes of Anitomically Correct Koalas agency.

  3. SButton: This was a leading contender for a while, but finally withered and died when someone realized that the new HitTester component would suffer with the preceding S.
  4. FxButton: Finally we had a winner.

FxButton had clearly won. It had the multiple merits of being easy to type, indicative of the Flex platform, and having that cool letter "x" in it that all hip products nowadays must have. Obviously people would love FxButton and would shower praise and autographs upon us.

5. The Fifth Attempt: The Community Hates It

It's not clear what happened: Do international keyboards lack the F or x keys? Did people not enjoy the extra typing practice it gave them? Did they not enjoy the clever but subtle pun that the new component was a "fix" for the old one (we laughed for weeks over that one. Oh, we have a jolly old time in the Flex offices, that's for sure!).

Whatever the reason, the community hated it. They railed upon our decision, they cast aspersions on the Fx prefix, and they scrawled mean words about us on bathroom walls in engineering institutions everywhere.

So we swallowed our pride, along with a case of scotch, and headed back to the planning room for

6. The Sixth Attempt: Goto (1)

It turned out that 'Button' was really the best name for Button after all. The nuance was that we needed to set up separate namespaces, a common pattern in Flex applications already, to deal with the name collisions. So we did this, setting up a namespace for the core language, another for the old Halo components, and a third for the Spark components, and then went through the joys and pleasures of renaming all of our classes again, enabling our QE department to rewrite tests and generally feel fulfilled and fully employed. As a result, we ended up with a Halo button that you would use by calling <mx:Button/> and a Spark button that you would create by calling <s:Button/>. They're both buttons, they just live in different namespaces. Like twins that are raised in different cultures, one that grows up to be a cop, the other a criminal. Then they meet by chance during a bank job and wind up pointing guns at each other, each having to make his own choice whether to take out his brother for the sake of the life he's chosen, yet clearly hearkening for the shared bonds and experiences that genes bring.

7. The Final Chapter

So that's it, that's the state of the renames: We now have the same names for the same components in Halo and Spark, except for the different namespaces to qualify them accordingly.

But that was yesterday. Then, just today, someone suggested something that is so huge, so fundamentally awesomely stunning and cool that we're rewriting the SDK and all the tests again and have now checked in the final fix to the whole thing: self-obfuscating code.

The original problem to solve was that we didn't want to confuse people by having the same name for different things. In the meantime, developers of web applications like to obfuscate their code to make it harder for shady engineers (perhaps their twins, raised in a different culture to a life of high-tech crime) to steal their ideas. In the interest of both of these goals, we now introduce:

<mx:Bxgthnr5gl!8x/>

Every night, the build auto-generates a random series of ASCII characters for each Spark component, thus guaranteeing that each component name is different from other Spark component names, from the old Halo component names, and from anything else that might otherwise confuse developers. Developers can now be assured that component names are completely unique. And since the generation is done as part of the build, we also auto-generate the ASDocs at the same time, making it easy for developers to figure out what the correct component names are for the build that they are using.

No more "Which Button do I use?" or "What was that prefix again?" or "I hate when other people can read my code!" or "Gee, I wish names were randomly generated so that I could practice my random keystroke typing speed!" Now, with the new Fully Obfuscated Occasionally Long component names, we expect Spark and the Flex Gumbo platform to be the favorite platform for RIA developers everywhere.