Archive for the ‘Technology’ Category
More on the Amazing IntelliJ IDEA
When I code Java Swing UIs, I often use Karsten Lentzsch’s excellent JGoodies Forms library to scale my pixel measurements in accordance with the font DPI setting of the underlying operating system (e.g., to properly support Windows’ “Large Fonts” setting). This is done by employing a symbolic measurement unit called a “DLU” (dialog unit) in place of pixels at design-time and then converting the DLU value to a pixel value at run-time.
An unfortunate aspect of the library’s design is that I have to invoke separate methods for converting the units along the X-axis and Y-axis (i.e., I invoke Sizes.dialogUnitXAsPixel and Sizes.dialogUnitYAsPixel). This lends itself to many a subtle bug.
To my amazement, my trusty IDEA was once again one step ahead of me:

Notice in the overly-small screen-shot above that I’m passing a constant containing the word “HEIGHT” into a method that’s expecting a unit value along the X axis. I’m not sure what algorithm IDEA employs to figure this out, but I say again, wow.
Once again, money well spent.
You Know You’re a Geek When…
I took a day-trip to San Francisco yesterday to participate in a panel at O’Reilly’s Web 2.0 Expo. I’ve been through SFO a kabillion times. For as long as I can remember, they’ve had this mini-museum in the United terminal going towards Gates 76+. In all that time, I’ve never, ever stopped to look at any of the displays.
Until yesterday:

I’m embarrassed to say I got a little emotional looking at the games, each of which I played endlessly as a little boy, and recalled many memories of fighting with my brothers, beating high scores, leaving the 2600 on for hours so I could do chores and come back and pick up where I left off (all about the score), and so forth.
You can find an emulator and play Yars Revenge, but you can’t go back to the good ol’ days. Sniff.
GroupWise Exporter 1.0
I’ve received a few emails and at least one comment on my earlier blog entry about my GroupWise to iCalendar converter, so as promised, I hereby release GroupWise Exporter 1.0. Its a Java application, but I only support it on the Mac. Sorry. If anyone has a desire to use it on non-OS X machines, let me know. Wouldn’t be that hard to get it working cross-platform. Enjoy, and let me know if you have any problems running it.
Oh, and be warned, it stores your GroupWise password in the clear in a preferences file in your home directory. Sorry about that. Would be easy to encrypt it. Maybe a 1.1 feature…
UPDATE: Source code available.
Vista Problem Solved, Sort Of
I’ve recently been whining about Vista blue-screening on me. Just after wiping it off the affected system, Tim Heuer from Microsoft offered to help me troubleshoot the problem. After re-installing and having another few blue-screens, I passed him the MEMORY.DMP files (~150 MB each via TransferBigFiles.com, a great free service). And guess what he found?
While Vista told me that the problem was with the video driver, it turns out that the problem was… my unsupported RAID driver from Intel. When I first had a blue-screen, it occurred to me that was the problem, but since Vista so confidently diagnosed the issue as a video driver issue, and since the RAID array has seemed to work perfectly (i.e., no data corruption), I stopped worrying about it.
Tim assures me the problem is with the RAID driver so… not only do I feel stupid for whining publicly about an instability caused by a RAID driver not designed for use with Vista, but I’m going to have to once again wipe off Vista and install a different OS since Intel makes it clear on their site my hardware is not supported under Vista.
Ugh.
Exporting GroupWise to iCal
I have a client that uses Novell’s GroupWise (GroupWise!) and its one of those “we schedule it on your calendar and expect you to show up” shops, so I have to make reviewing GroupWise part of my workflow.
The OS X (Java-based) client is so painful, and my life already so organized around Apple’s iCal, that I found it much more convenient to aggregate GroupWise into iCal. Lacking the capability of exporting to iCalendar format, I wrote my own exporter that scrapes the “low-bandwidth” web interface and converts it, serving it up via an embedded web server.
I released it to a few people, but have never made the code broadly available. So, I’ll announce here that its available, and if anyone wants it, let me know and I’ll post it publicly.
(Just to clarify, this is not an April Fool’s joke.)
The Wow Stopped Here
Signs of the demise of my Vista box blue-screening multiple times a day have been greatly exaggerated. After upgrading to nVidia’s latest drivers, the problem has not in fact gone away, despite the longest respite to date right after the install (>24 hours). Upon returning after a trip, the system had blue-screened (and reported the video driver as the culprit) and it has since rebooted three times in less than 24 hours giving the same error.
I can’t take this any more… I’m wiping Vista off the system and replacing it with a stable OS. I’m amazed that after one of the longest and most open pre-release periods in Windows history, Vista remains unfit for production use on non-exotic, mainstream hardware (Intel motherboard, nVidia GeForce 6x series card, etc.).
MTS07: Pete LePage on IE7
Pete is a Product Manager on the IE team. His title is “Product Manager, Web Tools.”
I asked Pete to clarify the hierarchy of the IE team because I seem to have met so many different “Product Managers” on the IE team.
The Program Manager is the key writing the spec for how a product should work. That’s Chris Wilson’s role; his official title is somewhere between “Program Manager” and “Architect”. The Product Managers (like Pete) are responsible for making certain end-to-end scenarios work. Pete is one of four Product Manager responsible for IE; Pete’s role is to make sure IE is a great web developer tool.
“The IE team is not about crushing the competition, its about embracing open-standards about making life easier for developers.”
Q: You are aware that your peers are saying things that “crushing the competition”, right?
I am, and I wish they wouldn’t.
Every time we make a change to make IE more standards compliant, we risk breaking the web — we have 500,000,000 users. There was a lot of chatter about how many sites are IE-only and that locks out other platforms, etc. and Pete said, “When you find something like that, tell me, because I’d like to help them fix it.”
There was some talk about Microsoft’s tools encouraging folks to write IE-only sites, but Pete and others pointed out that modern versions of Visual Studio encourage developers to target web standards (though they can be used to target IE-only features).
Someone joked, “Hey, can my mom call you when IE is broken?” Pete mentioned that his mom calls him for support. He pointed out that Microsoft has a free IE7 support hotline that any user can call. (He didn’t know the number.)
He did the Don Box open up notepad thing and wrote down a bunch of the questions the group has:
Q: What do you want to see next?
Pete started out pointing out that they hired Molly H. to bring more respected influentials in-house to influence standards. He also pointed out that they take the CSS spec seriously and all have printed versions they read. Folks chimed in with various wants:
- improved support for unencumbered media formats, like OGG
- canvas tag and stuff from the WHATWG
- an easier add-on model than COM
- in-line search like Firefox
Q: How often do we ship, and how do we deal with WU/AU?
“We committed to ship every 12/18/24 months. We’re still behind that commitment and you can expect to see regular previews and releases of IE.” And lot of folks complained that the IE7 auto-patching feature is automatically applied before many users had a chance to to decide, such as in corporate environments. Pete asked, “What would you have us do differently?” He pointed out that we knew in advanced that it was coming and it arrived when MSFT said it would. The complainers on this issue didn’t really come up with any coherent feedback on what to do differently.
Q: When are you going to switch to the gecko engine?
“We are using Trident, its very baked in to our system.” He mentioned that using a JS engine other than Trident’s is very difficult. I chimed in and asked if they were considering integration with Tamarin or at least ensuring compatibility with the flavor of ECMAScript that Tamarin supports. I asked what he thought of JS2 (ECMAScript 4) and Pete replied that he was a bit worried about the impact that revising the JS runtime to such a large degree (to support JS2) would have on existing JS code.
Q: Prioritizing incompatibility issues
Pete talked about Quirks versus Standards rendering models. I asked if there was a way to see what mode the page is rendered in. He said there wasn’t — I asked him to add it.
Q: How are we contributing back to open source?
“We’re a closed source proprietary browser and that’s not going to change anytime soon.” The questioner clarified that he wasn’t talking about open-sourcing IE, he was talking about leveraging the community to fix issues in IE. Pete said that they are getting more involved in the standards bodies, they went down to San Jose and did a panel with Opera (Hokum) and Firefox (Mike Shaver) at the Silicon Valley Web Builders User Group, and so forth. He also pointed at that they are participating with people like Molly and being at cutting-edge conferences that aren’t MSFT events, etc. He asked the questioner, “Are there better ways to do that?” The questioner didn’t proffer any ideas.
Another questioner suggested that MSFT hire someone to work on Firefox and other browsers to be a liaison between IE and those projects to suggest features/patches, etc. that MSFT apply to IE. “I hope you have seen with IE7 a significant increase in our commitment to standards, and as future versions ship, you’ll see more of that.”
Folks suggested that the IE team should come forward and tell the community what changes will impact the user base in advance. I pointed out that the IE7 team actually did a great job of this, but told them that they should be more open about plans to support emerging web standards like the canvas tag and not hide behind patent policies issues, but then… I caught myself mid-stream recalling the recent Apple canvas flap (with Apple claiming a patent on canvas) and Pete looked at me and smiled. “Exactly.” This was a bit of a watershed event for me as Chris Wilson’s complaints about the patent policy of the WHATWG being incompatible with MSFT (as compared to W3C) suddenly seemed prescient. I’m not a lawyer, so I’ll beg off further speculation on this point, but it shut me up really quickly on the canvas support issue.
Q: How are we getting to a standard everyone can use?
They are joining the new W3C committees on HTML, including the new HTML Working Group. Someone asked if they would stop adding proprietary features and just “community” features. Pete said, “We’ll always have proprietary features, but we’ll also support web standards.”
Q: How could we create detailed function specs and docs for developers on the behavior of IE?
We asked Pete to provide detailed specs on how IE works to cover situations like, for example, when IE caches and when it doesn’t in the context of dynamic requests, and so forth. I asked Pete if they could provide some sort of liaison to the community who in cases like this could look at the source code and provide detailed documentation on how a particular aspect of IE behaves. He agreed this would be cool and in chatting with him after the session, he thinks they could make this happen. Wow, imagine a world where instead of having folks bang their head against the wall over and over MSFT could actually tell us exactly how detailed aspects of the browser work. There are some problems with the concept, to be sure, but…
In after-the-prezo chit-chat he also mentioned that MSDN is getting a makeover in the next few months.
We also told Pete that better debugging tools would be huge. In particular, I told him that the lack of visibility into the memory management of the browser makes developing large-scale Ajax apps a huge pain.
MTS07: Jim Truher on PowerShell (formerly Monad)
PowerShell is a “revolutionary new interactive shell”. I heard about this two years ago at MTS05, so I’m not terribly interested in it, but last time Bill Hillf gave the demo, not the Program Manager as in this case.
He covered the basics up-front, like how PowerShell (formerly Monad) is a managed app that can be used to include the .NET libraries into your shell scripts, how you can pipe objects in addition to text streams together, and so forth.
Jim emphasized that you can continue to use your existing Windows shell scripts with no changes in the environment and that the the on-line docs have a ton of ready-to-use examples.
He talked about the need for shell scripts to accommodate organic growth: sys admins need to put out a fire and it grows from there. (As an aside, he said his slide deck was built with a PowerShell script; he likes to automate everything.)
In the demos, Jim showed off its “rich aliasing capability” to support ls, ps, and other Unix commands. Jim came to Microsoft when they acquired his Unix-on-the-WinNT-Kernel company so he prefers the Unix way.
Because PowerShell is object-oriented, its built-in commands (called “cmdlets”) return objects. So when you type a command that lists services, they are displayed as a textual list of services because PowerShell’s built-in logic decides to display those objects as a text line. You can easily render the objects in custom ways, and of course wire the objects together with other commands to do really interesting things.
He demoed listing all the running services as text, as a detailed list, as an HTML table, as HTML, etc., all by passing the results of a “get-services” command through various additional commands.
Its got a built-in type coercion system that converts console text into the type expected by a command. You can’t extend its built-in type coercion routines for built-in .NET types, but you can create your own type converters for custom types.
They use $_ from Perl to represent the current object that is being inspected, such as:
ps | where { $_.handles -gt 1000 }
Which says list the processes where the handles is greater than 1000. Here’s the next step:
ps | where { $_.handles -gt 1000 } | ft processname, company
Which displays the processes with only two columns: processname and company. This example shows the power of matching against object properties as a simple grep would be less than useful given that there are a ton of numbers in the output — but I could have reduced the output to just the handles column and done a grep.
So I asked him if in his experience doing matching based on object properties is generally useful as opposed to the simplicity of the grep approach. He claimed that it absolutely has been a huge advantage as he’s written thousands of his own scripts. He showed off a number of ways in which matching against object properties is a big win. He moved so fast I couldn’t really write down all the stuff he showed, but it was very cool.
An audience member asked, “How big is this thing?” It turns out its huge. The footprint of the PowerShell process he showed us was somewhere between 45-121 MB (I don’t know how to read the memory output and neither did he). Bash of course is a small, small fraction of this.
You can assign any object to an environment variable and manipulate the object subsequently. He demoed this syntax:
$a = get-ipconfig
$a[0].hostname
which stores the object returned by get-ipconfig into the variable and then gets the hostname off the first interface configuration object. Sweeeet. He riffed off this example by storing the results of ps into a variable and then interrogating the resulting objects for all kinds of info on the processes.
You can serialize/deserialize objects into XML for use across sessions, but the serializer only goes two levels deep and will of course punt on non-serializable fields. You can’t send live objects across PowerShell sessions.
Another neat trick:
foreach ( $i in ls ) { "{0,8} {1}" -f $i.length,$i.name }
This shows a list of files with the size next to the name of the file.
Q: Will sysadmins really be able to use all this stuff? Who’s the target market?
This is for the advanced Unix system administrator who has to do Windows and Unix and used to say, “Man, I wish I could do in Windows what I can do in Unix.” Now I want them to say, “Man, I wish I could do in Unix what I can do with PowerShell on Windows.” The next version of PowerShell will target making it easier for the novice script (through wizards, etc.) — ideas still up in the air on this one.
PowerShell is available for download and will be part of the Longhorn Server release.
Q: Wouldn’t PowerShell be an ideal open-source project?
We are seriously considering that. We’ve had 400,000 downloads of PowerShell since we released it; its capturing the imagination of scripters on Windows.
Q: Can I run this on Mono?
We don’t release the source, and it requires 2.0, and I don’t think that Mono supports 2.0.
MTS07: John Fernandes Discussing Microsoft and the Local Software Economy
John was introduced as a world-wide marathon runner. I asked him which was the most challenging; he answered, “Seattle” but quickly followed up with “LA and India.”
John has a very interesting job. While he didn’t phrase it this way, his job is all about creating new markets all across the world into which Microsoft can sell. When I consider taking a job or doing a startup, I consider a 4-5 liquidity to be a somewhat long-term play. Its hard to wrap my mind around the scale of a company that is able to plan this far ahead and justify the expenditure to do so.

I asked John how long MSFT was prepared to wait before it say an ROI from his efforts in a given markets. He said he expected to see large measurable results in 3-5 years across his entire program (where results are increased numbers of folks getting certifications, number of MSFT partner ISVs, etc.) but noted that some markets may take much longer than others to see any results.
His group works with 50 different countries. He talked about partnering with the US AID in Croatia to create educational centers where local students can select their own curricula and learn all about tech, etc.
When pressed by a questioner, John said, “It’s not about building with our stuff — its about getting them to build at all, and we believe that people will chose our stuff.” Uh huh.
John is the latest in a line of idealist speakers we’ve heard at this event that say things like, “We’re out to do the right thing in the community and we’re content to say that a rising tide lifts all boats.” These idealists are quick to point out that Microsoft is trying to make money, but they insist that Microsoft is willing to make indirect revenue on the back of some form of altruism.
This is the right message for many in this group, but I seriously doubt that the ultimate leadership of the company sees things this way based on a long track record of consistent behavior, and indeed, when we’re exposed to some of the more pragmatic senior leadership of the company (Bill Hillf, Don Box) those more traditional elements of the company poke out.
Kind of fun to see.
Some of the attendees suggested that by showing off WPF eye-candy to young kids in emerging markets, they would have more success in recruiting the rising generation to the MSFT camp than they would by making business deals and trying to grow economies, etc.
One of the attendees suggested that Dean Kamen’s efforts at driving kids towards engineering through his robotic competitions are great for sending kids to hardware engineering but quite poor at driving them to software.

I asked if John’s list of programs was driven by, say, government representatives coming to MSFT and saying, “This is a need we have” or if its a result of their own research to identify these specific needs. He indicated it was the latter and claimed their approach wasn’t really all that scientific.
They have 110+ “Microsoft Innovation Centers” in 45+ countries through the world that offering training, labs, etc. and host local programs and so forth. He said they build these in cooperation with “local hosts”. I’m sure he didn’t mean that in the parasitic context.
He also used the expression “double-click” to focus in on a subject; this marks the second person in as many months I’ve heard use this. I really hope this doesn’t catch on.
I asked to see the list of all the metrics he really uses; he responded that “utilization of the innovation centers” is a big deal to him; making sure that they don’t go empty.
MTS07: Celso Gomes on WPF and WPF/E
Celso, a designer at MSFT, got to show off the best demos (though admittedly they were just the demos that ship with Expression).
I enjoyed seeing his demo of a page turning app, which I had just seen at Adobe’s Engage event using Flash not long ago.
He also showed off WPF/E, demo’ing emulated 3D by moving around some wireframes and creating an interactive Rubix Cube. He also showed the page turn demo using WPF/E, and the perf seemed par with the full WPF version. Both versions were faster than the Flash version, but it wasn’t rendering an embedded web control on each page like Flash was, and I’m pretty sure it wouldn’t be able to do that.

WPF/E can do video and it seemed to do it very fast — he showed off multiple videos playing in relatively large sizes simultaneously without frame rate choking. It can also do full-screen, which is very interesting.

He also showed a cool step-by-step tutorial of creating a set of photos orbiting around a blue sphere.
Celso emphasized Microsoft’s separation between designers and developers. I was impressed by how easy Expression makes it to get to the animation, data binding, XML parsing, and other capabilities of the platform. Apple, Adobe, and Microsoft are clearly all innovating heavily in this space. I haven’t seen all the tooling behind Core Animation, but Flex and Expression seem neck-and-neck on the tooling front. Swing? When compared to these kinds of tools, it doesn’t even seem to be running in the same race.
Slightly less clear are the advantages that WPF/E hold, if any, over the Flash/Flex stack, but time and further investigations will tell the tale there.
I was very disappointed that MSFT didn’t make available engineers or PMs on the WPF or WPF/E teams. Celso couldn’t answer futures questions and technical questions. Ugh. It was also pretty lame that he gave his WPF/E demos on WinXP and not OS X (to reassure us that xplaf perf is there).



