Grant Skinner’s Things Every Flash Developer Should Know talk

One of the sessions that I was really looking forward to seeing at MAX was Grant Skinner’s “Things Every Flash Developer Should Know.” I’ve really been inspired by some of his work and although I’d seen his slides (they are posted on his site), I wanted to see him present it. I’m hoping that they will post a video of it on Adobe TV, because I got a lot more out of watching it than I did by just reading the slides.

The Actionscript and Flash parts were the main draw for me, but I actually got a kick out of the software architecture and software engineering-ish slides as well. He ended up presenting a nice overview of some of the core of software engineering and development in a succinct and easy to understand way. I would certainly recommend this talk to the folks in the community without formal training, especially as a gateway to finding areas to learn more. I think as more and more experienced developers with formal software training move into RIA development with Actionscript, you’ll start to see the general level of software quality in the community rise (especially if the new-to-Actionscript developers embrace the sharing ethos of the greater community).

I didn’t agree with all of his edicts – especially about commenting, documentation and some of his personal coding guidelines, but those were pretty minor quibbles with a really great talk.

I also have to give him big props for his Flash-movie-as-slide-deck. A lot of times, I’ve seen developers create their own slide software as an intellectual exercise which all-too-often results in presentations that look a lot worse than powerpoint templates. His deck worked well, looked good, and was cool without being too distracting.

At the beginning of the presentation there is a quote from Dune that I hadn’t seen before. I grabbed a longer version of it here from one of his other posts.

‘Above all else, the [architect] must be a generalist, not a specialist. Experts and specialists lead you quickly into chaos. They are a source of useless nit-picking, the ferocious quibble over a comma. The [architect] on the other hand, should bring to decision-making a healthy common sense. He must not cut himself off from the broad sweep of what is happening in his [application]. He must remain capable of saying “There’s no real mystery about this at the moment. This is what we want now. It may prove wrong later, but we’ll correct that when we come to it.” The [architect]-generalist must understand that anything which we can identify as our [application] is merely part of a larger phenomena. But the expert looks backward; he looks into the narrow standards of his own specialty. The generalist looks outward; he looks for living principles, knowing full well that such principles change, that they develop. It is to the characteristics of change itself that the [architect]-generalist must look. There can be no permanent catalogue of such change, no handbook or manual. You must look at it with as few preconceptions as possible, asking yourself: “Now what is this thing doing?”‘
– From Children of Dune by Frank Herbert (1976)

some code for a change

I’ve written this function a zillion times, so I decided to post it on my blog. Yes, it could do more error checking (what if that new returns a NULL? what if an exception is thrown?). But it does more than zero error checking, so there you go. This is super useful if you are getting ANSI code paths from legacy APIs or if you are using boost::filesystem::path to store paths in a platform independent way (until the new boost comes out).

This particular version isn’t battle tested (yet), but it does work.

// convert a path from ANSI to UNICODE on windows using std::strings
// useful for converting a boost::filesystem::path into a wpath,
// until those APIs get merged
std::wstring convertStringToWString( std::string in )
{
    if (in.length() == 0 )
    {
        return std::wstring();
    }

    UINT wStringLength = MultiByteToWideChar( CP_ACP, 0, in.c_str(), -1, NULL, 0);
    if (wStringLength==0)
    {
        return std::wstring();
    }

    LPWSTR widestr = new WCHAR[wStringLength];
    wStringLength = MultiByteToWideChar( CP_ACP, 0, in.c_str(), -1, widestr, wStringLength );
    if ( wStringLength ==0 )
    {
        delete[] widestr;
        return std::wstring();
    }

    std::wstring returnVal = std::wstring( widestr );
    delete[] widestr;

    return returnVal;
}

Server-based DRM solutions are hostile to consumers

I have a long history with DRM (Digital Rights Management): I worked on the Windows Media 7 Encoder team; I worked at two different internet video startups; and as the owner of record label, I experimented with some of the very first paid digital download solutions (all long lost to internet history at this point).

When I first learned about the DRM mechanism where the player would “phone home” periodically to make sure that you were still licensed to the content, I immediately realized that this was a really fragile way to license media. I’m not talking about subscription content (like Rhapsody), streaming media (like Hulu/YouTube/Flash Media Server) or rentals (like Amazon/iTunes rental), I’m talking about content that is purchased by the consumer. The issue is that there are 1000 ways that the user can lose access to their content without any ill intent on their part. This isn’t an issue if the licenser of their content is still in business and supporting the licensing mechanism. However, even large companies sunset their DRM technology support, screwing over their customers (see Google Video and Microsoft Plays For Sure for example). Depending on how onerous the original licensing scheme is and how it was implemented, buying a new computer, changing the hardware configuration, upgrading system software, the company dropping support for the DRM, the licensing company’s servers going down or just the user being without the internet can cause a user to lose access to the content that they paid for and legally own.

Maybe the user got some warning and could back up their content to some other format (if allowed by the licensing scheme, it often isn’t); but maybe they didn’t see or understand the warning. Then it is too late. Is it the consumer’s fault? No, it is never the consumer’s fault. They purchased digital content with the expectation of owning it forever, just like when they purchased their media as hard goods.

Onerous DRM has been put in place by media companies desperate to avoid piracy, but as it has been written about in so many other places, DRM makes more pirates than it avoids. It makes it more difficult for the people who want to get their content legally by adding roadblocks between them and their purchases and it doesn’t stop the pirates who avoid the whole thing. I wonder how many Plays For Sure customers went to an illegal site to re-download the content that they had already purchased when they lost access to it. I wonder if any of them felt like they were breaking the law at that point. I doubt it. They had paid for something and had been denied access to it. Maybe they were mad at Microsoft, but they were probably more mad at the record labels, because that was the product they purchased. Microsoft was just the store.

I was thinking about this again today when I went to purchase a song off of iTunes and found that Apple had lost my Apple ID. This was the Apple ID that I had spent years buying content from iTunes with. Sure, Apple has moved to make their music DRM free, but I haven’t completely updated my catalog yet, and there is a lot of video that I have paid money for as well that is still subject to Apple’s DRM. While their mechanism still allows me to play my content on my authorized computers (as far as I can tell so far), it will not permit me to authorize a new computer. If Apple isn’t able to fix this problem, what happens to the content I purchased over time? If I can’t access it anymore through no fault of my own, am I in the wrong legally to download it off a file-sharing site?

DRM models have continued to evolve over the years, but I think that the audio model has shown the way for purchased content. It is high time for media owners to allow the people that pay for a full copy of their content to own that content outright, with nothing that could prevent the consumer from having access to the content that they paid for, including transcoding as media formats change over time. Otherwise, they will alientate their consumers as they find they cannot have what they paid for.

note: I avoided mentioning the new licensing models that have sprung up, where when you “buy” a copy of a song or movie the license agreement says that you don’t really own it, which is becoming more common as a way to avoid legal issues when user’s circumvent DRM to make fair-use copies or so that they cannot sue if they cannot access their content. I avoided mentioning it because:
A) it muddies the discussion.
B) I think it is evil.

Joel Spolsky’s love letter to program management

Joel Spolsky wrote a love letter to program management on his blog. For the most part, it is a pretty reasoned and reasonable description of what a “good” program manager at Microsoft (and Fog Creek) is like. In my career at Microsoft, about 25% of the program managers fit that bill. The problem was that they had too many conflicting roles and required skillsets to be effective. At Microsoft, Program Managers are not only responsible to be user advocates, they are also responsible for functional specifications, user interfaces and schedules. A single person can’t be a user representative, a UI designer/interaction specialist, and a project manager. Combining them into a single role worked for Microsoft initially, but in the modern world each of these roles are full disciplines of their own.

Joel claims that PMs are partners with development and that developers have the upper hand over PMs because they write the code. This might have been true of Microsoft in Joel’s (and my) time, but as MS switched from being an engineering-driven company since Ballmer took over to a program management-driven one, it isn’t true any more. PMs took the upper hand because they had far too much control over the final look and feel of the product and could essentially name themselves the final arbiters. Development and QE were isolated from the customers. PMs dictated the features; meaningless meetings and committees abounded and the products suffered (every MS product in the last 8 years for example).

How to be a program manager – Joel on Software

Writing a functional specification is at the very heart of agile development, because it lets you iterate rapidly over many possible designs before you write code. Compared to code, a written spec is trivial to change. The very act of writing a specification forces you to think through the design you thought you had in your head, and helps you see the flaws in it quickly so that you can iterate and try more designs. Teams that use functional specifications have better designed products, because they had the opportunity to explore more possible solutions quickly. They also write code faster, because they have a clearer picture when they start of what’s going to be needed.

This claim is just wrong, or rather, doing this in the large scale is just wrong. I’ve worked under that system at Microsoft for years and I never saw it be very successful in practice. Maybe for a small part of a product, or a small iteration in a larger cycle it might work; but at the product level it is nearly always a bust. Why? Because you will not anticipate everything in your functional specs. Ever. A competing product will be released with better features. Flange A will not fit Bracket B. User testing will hand you your hat. Beta testers will tell you that it wasn’t really what they needed. And then you are back to the drawing board. Except you are two-thirds of the way through the cycle because you spent a huge amount of time iterating over the spec and then building to that spec. Now everything is screwed up, but QE needs to start testing to the spec RIGHT NOW. So what do you do? You hack. The spec goes out the window and development codes for dear life while program management throws out ideas and changes like pieces of spaghetti against the wall. At the end of the cycle you have a tarball mess of code with incongrous, hacked, features that came crashing onto the deck of the carrier and just caught the last wire. Watefall development is resistant to change, agile development embraces it. Change happens faster in our industry every year, why lock your developers into software methodologies from the 70s?

Is there a role for Program Management? Absolutely. Not for the Microsoft-style Program Manager, but certainly for the jobs that the Microsoft Program Manager has. UI design and look and feel is best managed by professional user interaction specialists working with a project manager and development. The project manager can also be the primary representative of the client, but not the sole conduit. One of the primary jobs of QE is to be a user representative. Isolating development from the users just means that they don’t understand why they are doing what they do. Isolating QE from the users mean that they can’t represent a user of a product in their testing. The Program Manager can also work with development and QE to manage the schedule.

My experience with great program mangers post-Microsoft are folks that coordinate across all the functional groups to make sure that development has what they need, QE understands the user, experience design is delivering on time and all the clients are feeling well represented. In this view, the program manager acts as a lynchpin connecting development, QE and XD to their customers. Do they set the schedule? no. Do they write the specs? Maybe (in a non-agile team, working with the other groups). Is that less fun for the program manager? Maybe, but it produces much better products in my experience.

iPhone shuffle usability suck

My iPhone is the fifth iPod I’ve owned over the years, so I’m pretty familiar with how they work. One thing that has been bugging me about the iPhone though is that there was no shuffle mode without going into a playlist and hitting the shuffle button at the top of the list. This seems like it was a bit anti-intuitive and off from how previous iPods worked. When I found out that the new iPod Touch would shuffle by shaking it, I assumed that was how the iPhone must already work, which wasn’t true. It was starting to be a bummer because I often have the iPhone in my pocket and I just want to listen to some music without having to unlock it. I finally did a web search figuring that I must be missing something and I came across this page which describes the problem of always having your iPhone in shuffle mode. I’d always seen the shuffle and repeat icons in the second screen of info when playing a track, but I’d assumed that they were either: notifications, not buttons, since they weren’t in the primary interface; or applying only to the currently playlist since they were only accessible while playing a track. Since the iPhone has a settings menu for the iPod and every other iPod stores the repeat and shuffle mode switches there, that is where I assumed they would be on the iPhone.

It seems the the iPhone UI designers decided that the iPhone was a significantly new device that they could change the user expectations about how the user interface should work. That is a classic blunder in UI design that Apple above all other companies should not have made. Maybe they need their designers to go back and re-read the Apple human interface guidelines where this rule was made very clear.

This choice was bad on other HCI levels as well. What is my expectation when manipulating controls on a song while it is playing? Would it be that I’m making a global settings change when there is another location where the global settings are edited? I doubt it. Did Apple do any user trials? Because of their secrecy, I somewhat doubt it, but it would have been dumb of them to do none.

Since this paradigm was established in the iPhone 1.0 software and has obviously not changed since that time, let’s hope that Apple at least has the sense to add setting switches for shuffle and repeat in the settings menu if they don’t want to get rid of the ones they currently have. That would save a lot of frustration from their customer base as we get iPhones.

Nice discussion of white box and developer-driven testing in Google Chrome comic book

I debated copying the scans from blogoscoped.com or referencing the images here, but I decided instead to refer you to the appropriate pages to be a good blog citizen.

Getting Scott McCloud to write a comic book announcing your product is a great idea. He did a great job distilling some complicated stuff into a very accessible piece. Tons of people will talk about the Google Chrome announcement and what it means for Microsoft and about using multiple processes for tabs.

One of the things that struck me though, was the nice discussion of white box automated testing. Also, a very simple and concise description of developer-driven testing. I am a huge proponent of these principles since I first worked on an XP project 8 years ago and became an XP coach. Every project I’ve worked on since has had a large test-driven development component and hard-core whitebox QEs (when I’ve had the resources). Doing automated stress testing on a browser is a no-brainer. Internet Explorer has been doing it forever. Google isn’t doing anything new or different here: fuzzing inputs isn’t new, and neither is reducing the test space to make automation run faster and results relevant for users. However, McCloud’s comic does a great job of explaining these ideas in a very simple manner. It’s a great tool for developers, QEs or engineering managers trying to explain why these things are important to others in their organization.

Check it out on pages 9, 10, and 11 of the Google Chrome comic book.

iPhone SDK: The carrot for Cocoa, the stick for Flash

Apple has a problem. How do they attract and keep developers on their platform? They created an Apple-only API that requires a variant of C long thought dead. Developers aren’t so keen on having to learn a new programming language that doesn’t give them any advantage over their existing ones and ties them to a platform with a tiny market share. It means re-using code across platforms becomes nearly impossible. It’s just not an attractive prospect. The impromptu surveys done from the stages of the Apple World-Wide Developer Conference continuously surprise the Apple employees that most of their developers prefer to write in C++ even as Apple tries to marginalize it.

So, first Apple announces all these ObjC-only APIs, like Cocoa, Core Animation, etc… They get some converts on some new apps, but mostly the developers ignore the APIs and demand C++-compatible versions (which Apple promises they will never get).

Then, at WWDC 2007, Steve announces that the world of 64-bit is here and tells all Mac developers that it is their duty now to port all their apps to 64-bit. Just as he demanded they embrace Intel and OS X before it. A short while later, Apple announces quietly that it will not support Carbon for 64-bit. Basically, Steve tells the Apple developers that have supported him the longest, “screw you. You do as your told. I’m in charge here.”

Now, if you are an Apple developer, or an aspiring Apple developer, the world of RIAs is getting pretty attractive around this point. It let you step off the Apple crazy train and also embrace all the folks on the iPhone, Linux and Windows too. Plus, the technology around RIAs has grown pretty mature. Soon, you realize that doing this all in HTML is kind of pain in the ass. If you can get it to look right in one browser, it looks crappy in another. You spend all your time fixing your CSS or javascript and very little of it writing code. Something like Flash or Flex start to become pretty attractive. You can get your whizzy UI and not have to sweat the cross-platform or cross-browser problem. Then comes AIR, even better! Now you can have the web experience and desktop experience identical, plus it works when you are offline! Apple hates this.

Apple (and Microsoft for the same reason) wants you locked into their platform. Apple can’t try to kill Flash (a la Silverlight) because they don’t have the adoption (or money) to make it happen. But they can use the iPhone. It’s the coolest device around, the herald of a new class of computer devices, and it doesn’t run Flash. Then, just before the iPhone SDK announcement, Steve comes out and trashes it. Then they announce the iPhone SDK. Anyone see through the BS a bit? “Hey our phone isn’t powerful enough to run a web banner ad, but we can run Spore!” C’mon.

The iPhone SDK looks neat, but Cocoa and ObjC only? That sucks. I’d way prefer Flash or even Java support, at least that way I could release a mobile app with a desktop version that shares some of the code.

I just read 200 undergrad and graduate student resumes

My eyes are killing me.

Why the heck are you cramming so much unimportant information onto your single-sided single-page resume? You make it completely unreadable! Especially when someone (like a hiring manager) is trying to scan through hundreds of scanned pages.

Also, a new tip. Your paper resume will be scanned. It will be OCR’d. If you use tiny text on a background that provides low contrast with your text, no one will call you. EVER.

I found myself starting at the top of the page and letting my eye fall naturally down it. If I couldn’t get enough information to decide if I wanted to actually read it quickly, I just skipped to the next one.

It turns out that a good and specific objective statement is worth more than I ever gave it credit for. It was how I could tell a computer graphics grad student from a business undergrad.

Another question: why do you think anyone cares what high school you went to?

It’s great that you were a summer camp counselor, if I’m hiring a summer camp counselor. But I’m not, and it is just crowding your already crowded resume. Leave it off.

What, you are studying Human/Computer interaction, and you produced a resume that I need an electron microscope to dis cipher?

Sigh…

So, if you found me because you just got e-mail from me to talk about an internship, congratulations! Your resume is legible and clear, or your name begins with a letter from the beginning of the alphabet before my eyes started to glaze over.

Alex Iskold’s tips for startups

36 Startup Tips: From Software Engineering to PR and More – ReadWriteWeb

This is a collection of startup tips covering software engineering, infrastructure, PR, conferences, legal and finance. They describe best practices for an early-stage startup. We hope that you will find these tips useful, but also please remember that they are based on subjective experiences and not all of them will be applicable to your company.

These tips are great for web startups. They are pretty useful for non-web startups as well. I’ve been through the startup mill myself a couple times and I still got some good pointers.