This Blog is Frozen

This blog is no longer active. Please visit my new blog.

I’m keeping this blog online for reference, as it has some useful information.

Completely different all over again…

The Kickstarter project announced in the previous post has been closed, and a new one has been started to replace it. The new project has much more generous rewards. In fact, you can get your shirts at a discount price by “pre-ordering” them through the new Kickstarter project.

So, if you looked at the original Kickstarter project and didn’t like it, well, I don’t blame you! Please check out the new project and see if it isn’t more appealing.

And now for something completely different…*

This video was made to promote a fun project I’ve been working on with some friends of mine. It’s whimsical, utterly non-technical, and family-friendly. It’s called BUBS (for Big, Ugly Barbecue Shirt).

Shameless plug: Over the years I’ve learned a lot from others who freely gave out information, and have tried to return the favor by speaking at conferences and user groups, and by writing this blog. So, if ever in the past you’ve looked for a “Donate” button here on my blog, now’s your chance! Check out the BUBS Kickstarter project, and if you like what you see, and if you are in a position to do so, please support it!

* Apologies to Monty Python

The problem of arrogance

A little over two weeks ago, my father-in-law sent me an article entitled, Why Google doesn’t care about hiring top college graduates.  The article is excellent (as is the NYT article that it’s based on), but what particularly got my attention were the things that Google’s Laszlo Bock had to say about what he calls, “intellectual humility.”

Bock’s comments prompted me to start thinking again about something that has troubled me for years: arrogance among software engineers. Happily, none of my current team members seems to suffer from this particular weakness, but that has not been the case with other teams I’ve worked on, so I’ve seen firsthand the kind of damage that can be done when influential team members have oversized egos. They hurt the team, they hurt the project, and ultimately, they hurt themselves.

Some years ago, while I was working as a senior engineer on a fairly large, geographically-distributed team, I phoned a junior engineer to see how she was doing on her current task. I’ll call her “Mary.” Mary was despondent, and did not feel confident about completing the task. I knew she was perfectly capable of completing it; she was not a rock-star programmer, but she had implemented requirements of similar or even greater complexity in the past. As we spoke, it became evident that she was feeling down about herself because of something another team member, who I’ll call “Mark,” had said about her work during a meeting.

“Mark thinks my code stinks,” Mary said.

I was angry. I had not been in the meeting, but I had already heard about Mark’s performance. And this was far from the first time that he had tried to embarrass and humiliate people by calling out their errors in front of others. This time, however, he had picked on a particularly vulnerable team member, and his comments had done damage. I did not let Mary know that I was angry. Rather than make a big deal of it, I wanted Mary to be able to shrug it off, so I responded matter-of-factly, “Mark thinks everyone’s code stinks.”

“That’s true,” she replied, and I knew it had worked. We talked a bit more, and it was clear that she was ready to put Mark’s comments in perspective and move forward with her task.

I have obviously not forgotten the incident. Mark’s callous remarks had rendered a valued team member unable to progress for several hours, and then required me to spend some of my time to get her to refocus. And this was not an isolated incident. There is simply no way to calculate the negative effect that Mark’s conduct had on the team’s morale and cohesiveness. This, of course, adversely impacted our ability to hit our targets.

Besides draining the team of enthusiasm and camaraderie, arrogant individuals hurt the projects they work on in other ways as well. For example, their high-handed approach to other members’ code often generates more bugs and drains other engineers’ time. I have seen multiple cases where a presumptuous engineer failed to understand the code, and thereby assumed that the code was poorly written and made no sense. As a result, when he (it’s usually a “he”) implements a change request or bug fix in someone else’s code, he casually dismantles the code he has deemed “stupid” and thereby introduces a new bug. Then, another engineer needs to go back in and undo the mess. As a result, two engineers’ valuable time has been wasted: first the arrogant one, who wasted time breaking something that was working just fine, and then the other one, who had to re-create what the first one had destroyed – and often had to re-code the first one’s “fix” as well.

There is much more that could be said about the damage that arrogance does to teams and projects, but I’d like to close this already-long post with some thoughts about the damage that arrogant people do to themselves. This brings us back to what Google’s Bock said about the importance of intellectual humility:

Without humility, you are unable to learn. Successful bright people rarely experience failure, and so they don’t learn how to learn from that failure. They, instead, commit the fundamental attribution error, which is if something good happens, it’s because I’m a genius. If something bad happens, it’s because someone’s an idiot or I didn’t get the resources or the market moved.

Arrogant people frequently have difficulty seeing the value in opinions or strategies that differ from their own – especially when those opinions or strategies originate with people whom they deem to be inferior. Most of us recognize that we can learn a lot from people who are junior to ourselves, as well as from our peers and superiors. By being open to the ideas of others, we learn and grow, not only professionally, but personally, in that we learn to appreciate other people more. People who are blind to this fact cheat themselves of so much.

Thumbs Up for Apache Flex

We have a fairly complex enterprise application that is built with Flex, BlazeDS, Java, and Spring. Version 1.8 is currently in production, and we are looking forward to delivering 2.0 before the end of the year. The Flex client by itself includes over 78,000 lines of code in 1062 files. In addition, it leverages our own corporate library SWC plus several third-party SWCs (both commercial and open-source). It was built using the Adobe Flex 4.5.1 SDK. We did not move up to 4.6 because it had bugs that broke some of our more dynamic skins.

At this point the feature list is pretty stable, and so we are thinking about performance. Some of our screens require large data sets with complex interrelationships, and algorithms that run to update those relationships (and thus redraw the visualizations) with nearly every user gesture. All in all, these screens seem to be rather obvious candidates for ActionScript workers - and so it seems time to move beyond the 4.5.1 SDK.

With no small amount of trepidation, I set up a new workspace with a fresh pull from SVN targeting the new Apache Flex 4.10.0 SDK, and made a small tweak to the compiler arguments. The result? It just worked.

After building the client with the new SDK, I put it through its paces in my local development environment. Then I deployed it to our Dev/Test server, and had a QA engineer and a software engineer perform regression testing. In the end, we found a total of 0 issues.

So, all I can say is: Kudos to the Apache Flex team. You have done a fantastic job, and deserve to be proud of what you have accomplished.

Is Chrome ready for enterprise applications?

The mailto handle is a standard that has been in place since the beginning of time, in Web development terms. That being the case, we might expect it to be supported by all browsers in a consistent and predictable manner. However, it turns out that at least one major browser has not managed to reliably support this standard.

I stumbled across this issue when a mailto link quit working in Chrome. A bit of research revealed that Chrome had trouble with mailto in 2011, but nothing more recent had been reported anywhere, so I posted the issue to the Chrome product forum. As of this writing, no one has offered a solution or workaround. You can see a demo of the bug here.

This is not the only situation where Chrome does not behave as other browsers do. When opening new windows with the JavaScript method, both Firefox and Internet Explorer respect the position directives, but Chrome does not. This is significant when developing applications for users who have multiple monitors, which is what my team is currently doing. We enable the users to open multiple views in separate browser instances. Users find this extremely helpful. On one monitor, for example, the user may have their main work screen, where they dig in and work with the data, while a dashboard screen is displayed in another monitor. With IE and FF, we can make sure that the satellite window opens in the available monitor, and not on top of the main window. With Chrome, however, this is not possible; Chrome opens the new window wherever it wants to, which is generally on top of the existing window, thereby getting in the user’s way and forcing them to manually reposition it.

Chrome is a great browser for personal use, but I’m beginning to wonder whether it’s a suitable container for enterprise applications. This is something I would rather not have to think about, of course. After nearly seventeen years in Web development, it is disappointing to still be running into browser compatibility issues. But in the final analysis, when life hands you lemons, what is there to do but make lemonade?

We have a wonderful group of end users who are entirely willing to work with us in whatever way they can. Though Chrome seems to be, in general, their browser of choice, they have already volunteered to refrain from using it. If we keep encountering issues like these, it appears that I am going to have to ask them to do just that.

Flex a Top-Level Apache Project

This will be old news for some, but Apache Flex is now a Top-Level Project of the Apache Foundation: it’s out of the incubation stage!

Also, Flex SDK 4.9 is now available, complete with a shiny new installer.

This represents the work of a lot of brilliant, dedicated, and hard-working people. It is great to see their efforts bearing such fruit.

Read the full press release here.

Release mode, describeType(), and keep-as3-metadata

The previous post outlined an issue that we faced as a result of the fact that describeType() outputs more information when the SWF is compiled in debug mode than when it is compiled in release mode. This post provides a couple of possible solutions.

Solution 1: Compiler Option

The first solution was referenced in a helpful comment by Simon Gladman: the keep-as3-metadata compiler option. The ArrayElementType metadata is retained in the release SWF by adding this snippet to the compiler options:


Notice the += operator. This is to ensure that the default metadata is also retained. According to the documentation, the = operator would cause the default metadata to be replaced. I was not able to confirm this in my testing, but nonetheless += is more intuitive as well as perhaps being safer.

Here is a snapshot of the compiler option in Flash Builder:

Keep AS3 Metadata Compiler Option in Flash Builder

Keep AS3 Metadata Compiler Option in Flash Builder

You can see a demo of the above solution running here. To see the difference, you can see the original version (without the compiler option) here.

Solution 2: XML

The second solution, which is the one that was implemented in our project, was to add the data type to the schema for the XML that stores the screen layouts, widget configurations, and service calls. While this solution requires slightly more maintenance, it is more robust. For example, it allows us to use our own data type descriptors, such as guid. It also provides a safeguard against arbitrary code changes; if a developer changes the data type of one of these properties in the ActionScript, the application will break as soon as the developer runs it, thereby preventing it from being deployed with an error. If were to rely on the compiler option and describeType(), and the application were to be deployed without thorough regression testing, then the error might not appear until a user tried to open a previously saved screen or widget.

So, we created a set of enums in ActionScript to define the data types that may be stored in our XML configurations, and we use these enums rather than string literals to create the XML:

<property type={XMLDataTypes.GUID.key}>

Likewise, we use the enums when evaluating the data types when parsing the XML when it comes back from the server.

There are certainly other possible solutions, but either of the above will work.

Debug and describeType()

My team is building an enterprise web application with a Flex UI that generates its screens at runtime based on XML files. It determines how to form its data service requests, what components to use, how to configure the components (line styles, custom data grid columns, etc.) all based on the XML, using a schema that we developed in-house. It’s a lot of fun.

The ability to quickly and easily introspect classes comes in very handy with this sort of development, since we don’t want to write or maintain a separate method for every class defined by our XML schema to instantiate itself. The native Flash.utils.describeType() is very useful here, as it gives a pretty complete description of the class in an easily traversed XML format. However, I learned that it can also be misleading.

I had created a single routine to initialize a wide range of classes from XML, and it worked perfectly - as long as it was running in debug mode. It took a while, but I found the cause of the propblem: describeType() gives more information when the SWF is compiled as a debug SWF than when it is compiled as a release SWF.

Screen shot depicting demo app compiled two ways (one as a debug and the other as a release SWF) and displayed in the same HTML wrapper.

Screen shot depicting demo app compiled two ways (one as a debug and the other as a release SWF) and displayed in the same HTML wrapper. Click image to view.

It’s not too surprising that such metadata as “__go_to_definition_help” is only available for a debug-version SWF. However, I did not expect to see something as useful as ArrayElementType omitted from the release SWF.


A couple of workable solutions have been posted here.

Can Adobe kill Flash?

I continue to hear from recruiters looking for senior Flex and Flash developers. The recruiters represent clients who are looking for engineers, trainers, and architects to work on new projects as well as existing applications. So perhaps you will understand when I say that I’m still not convinced that Flash is dead.

Over the years, we have seen a steady parade of “Flash Killers” appear on the scene (Safari, SVG, Canvas, Ajax, Silverlight, HTML5, etc.) Of course, Flash did not die. So it would be easy for me to be complacent and assume that the latest Flash Killer will fail to do the job, just as all of its predecessors did. It would be easy, that is, if the latest Flash Killer were anything but Adobe Systems, Inc.

Adobe may just be able to do the job. After all, they own the technology. However,  I’m not certain that’s enough. It could be that Flash is, in a sense, bigger than Adobe. After all, Flash had already been ubiquitous for some years before Adobe bought Macromedia, so we can’t exactly say that Flash is Adobe’s baby. Flash has a life of its own. It has a large and vibrant developer community. Many multi-billion-dollar organizations have invested untold millions of dollars in applications built with Flash. Many, in fact, are still building applications with Flash.

This leads me to think of another technology that has been declared dead by pundits countless times since it became ubiquitous. Sun Microsystems is gone, but Java lives on. And based on the number of new Java applications being built, it would seem that Java will continue to thrive for the foreseeable future.

So, has Adobe succeeded in delivering the death blow to Flash? Well, I don’t know, and I’m guessing that you don’t, either. Time will tell. And it will be interesting and exciting either way. There are a lot of smart, creative, and innovative people doing a lot of very cool things at any given moment. I’m looking forward to discovering what will happen.

Meanwhile, Flash will continue to have a significant presence for at least the next several years. Even if Adobe has been successful in killing Flash, it won’t die quickly: It is too ubiquitous, too popular, and too good at what it does.

Here is a humorous little footnote on the discussion: I clicked on the link in Tink’s comment below to check out Lightspark, and across the bottom of the page was a cool widget promoting the HTML5 Center (a joint venture between SourceForge and MicroSoft). The widget, of course, was running in the Flash Player!

HTML5 Center Flash widget screenshot