CocoaHeads Silicon Valley at Apple on Thursday, April 12, 2007
[info]chanson
The next CocoaHeads Silicon Valley meeting will be on Thursday, April 12, 2007 from 7:30-9PM in the Hong Kong conference room at Apple. That's just inside the entrance to Infinite Loop 1, the main headquarters building at Apple's campus in Cupertino.

See the web site for details, directions, and the organizer's contact information.

R. Tyler Ballance will be talking about C#, Microsoft .NET 3.0 and Visual Studio.NET 2005 as someone who has used both platforms extensively. But don't worry, he's not pitching us on becoming a Microsoft developer! He'll be comparing and contrasting it with Objective-C, Cocoa, Xcode and Interface Builder — even covering some of what's coming in Leopard — and he may even cover what the Open Source community has to offer with Mono.

As always, we'll also be hanging out and talking about Cocoa in general, discussing new and cool things that have come up in the past month, and helping each other out. Join us!

Model/View/ViewModel
[info]chanson
This guy must be kidding. Introduction to Model/View/ViewModel pattern for building WPF apps (John Gossman):
Model/View/ViewModel is thus a refinement of MVC that evolves it from its Smalltalk origins where the entire application was built using one environment and language, into the very familiar modern environment of Web and now Avalon development.
Yeah, because Model-View-Controller is just so inadequate when you're using visual human interface construction tools to create desktop applications or web applications.

I mean, it's not like anyone else has had an "interface builder" as an integral part of their platform. Or tools for creating web applications out of reusable and composable "web objects."

What "giant leap forward"?
[info]chanson
Jason Nadal, The Longhorn Speech API, an Initial Glance [via Chris Sells]:
The Longhorn speech API offers baked-in functionality for voice commands inside the operating system (OS). This is a giant leap forward in the functionality provided by an OS.
Uh, what? I had both speech recognition and synthesis support on my PowerMac 7100/66, bought in 1994. Provided by the operating system. The Mac has had both speech recognition and synthesis support in a form accessible to developers for a decade.

Hell, Mac OS X has shipped since version 10.0 with Chess.app, which supports a spoken interface.

Cultural Optimization in Laptops
[info]chanson
Omar and Dennis both lament the state of the market in Windows laptops, and wonder if they'll ever get any better. I don't think they'll ever really come close to the experience of a Macintosh laptop because of the culture they come from.

At the heart of Macintosh culture is the user. That drives both aesthetics and usability. The heart of Windows culture is cost. Would it cost more to design and build good laptops, on par with Apple's? Definitely. And that cost would have to be either eaten by the manufacturer or passed on to the (believed to be über-price-sensitive) purchaser, so there's no way it's going to be paid. Better to spend far less on the graphic design for a few stickers, or on making a few useless flaps, or on "differentiating" by including an interface to a technology nobody uses.

This is why Robert C. "Uncle Bob" Martin of ObjectMentor has a laptop that takes minutes to wake from sleep and simply won't every third time, while my 2.5-year-old PowerBook G4 that's been through hell barely gives me any trouble and stays up for weeks at a time. The cultures the products came out of optimize different values.

Businesses lose $55 billion to Windows viruses in 2003
[info]chanson
[info]dcardani reports on News.com's report that businesses lost a stunning $55 billion to viruses in 2003.

To put that in a little perspective, NASA Johnson Space Center's Design Reference Mission v3.0 — which is NASA's current blueprint for a long manned Mars mission that will lead to establishment of a Mars base — is currently estimated at $50 billion.

Let me say this again: Windows viruses cost more in one year than a manned mission to Mars will over ten.

If you are a CEO and your company is running Windows extensively, you are in breach of your fiduciary duty to your shareholders if you don't keep your computing environment extremely secure. And if you're going to spend that kind of cash on your computing environment, you may as well switch to Mac OS X, which has a slightly higher up-front cost but requires vastly less work (and therefore money) to keep secure and to manage.

Oooo, XAML and WinFX, what a concept!
[info]chanson
So Windows Longhorn includes a new .NET application framework called WinFX, code-named "Avalon."

Turns out I was overly optimistic in my estimation of what Avalon was. It turns out Avalon is just a system for specifying your application's human interface in an XML-based language, XAML, and even specifying what actions in your code will be invoked by different interface elements. And then, get this: You generate C# code from this that actually creates your interface!

Gosh wow, golly gee! You mean I can use XML to drive a code generator? Ooo! Where do I sign up?

Why the hell does it need to generate code just to create an interface? Why the hell does it need to generate code just to associate a control with an action method? What decade are we living in again? Interface Builder on NEXTSTEP was doing this stuff right in 1988. Why are people acting like Longhorn's getting it marginally less wrong than previous Windows frameworks is such a big deal?

There's even a system like XAML available for Cocoa: GNUstep Renaissance. Renaissance lets you specify your interface in an XML file, too, and has for quite a while. (Nicola Pero first released it on December 26, 2002.) The big difference is that with Renaissance, you just load this "gsmarkup" file at run time and it generates the interface and binds it to your objects right then!

What's more, it includes a layout manager system similar to Java's for automatic interface layout. So you don't even need to specify sizes of controls, you can just let the layout manager handle everything.

Here's what a simple gsmarkup looks like (taken from the Renaissance Tutorial):
<gsmarkup>
  <objects>
    <window title="This is a test window" closable="no">
      <button title="Print Hello!" action="printHello:" target="#NSOwner" />
    </window>
  </objects>
</gsmarkup>
This gsmarkup file specifies an NSWindow with no close box and the title "This is a test window", which contains an NSButton titled "Print Hello!" that sends -printHello: to the object that owns gsmarkup (set when the gsmarkup is loaded). Note that you don't have to specify the size of the button, where in the window it is, etc. You can if you want (or need) to, you just don't have to. And if you don't specify a target for a control, its target is assumed to be nil (the First Responder).

You can use id attributes in a markup to name objects and then refer to them using the standard reference (#foo) notation to wire them together within the same gsmarkup file.

And here's something even cooler: When a gsmarkup is loaded, an associated strings file is also loaded if one exists. This makes it very easy to translate gsmarkup-based applications into other languages. You don't even need to change the gsmarkup (especially if you're using layout managers) — you just have to supply a strings files for the other languages!

And possibly the best part: Renaissance works on both GNUstep and Mac OS X. You only need to maintain a different menu structure between the two; for everything else, you can use a single set of markup files (assuming you're using layout managers). One codebase, one interface spec, multiple platforms.

For more information, check out the Renaissance Manual.

How not to hate Microsoft
[info]chanson
Scoble wrote a guide for people who hate Microsoft. Of course, it's all about his further attempts to justify Microsoft's hype campaign around Longhorn as a way to make it better, not a way to try and get developers and users to avoid considering alternatives. (Hmm, wonder why. Could it be because more and more are doing so?)

Scoble thinks that people who hate Microsoft and want them to improve want Microsoft's products to improve. Boy, he really doesn't get it. It's not just about the company's products. It's about the company's behavior.

I do believe Microsoft can change. And I want it to change, not just selfishly because the platform I work on is in competition with theirs, but because they can do so much better. Unfortunately I don't believe it's on the road to change. I'd believe that if I actually saw some genuine contrition on the part of the company and its employees, a belief that wrong was actually done and people & competitors were actually harmed.

Instead, we get crap like their response to iTunes — not "Welcome to the platform, it's good to have you writing consumer applications!" but "It doesn't offer the choices Windows users need!" And what is the choice they claim Windows users need? Windows Media, which conveniently enough helps to leverage Microsoft's dominance in operating systems into dominance in online content. Microsoft still treats every market as a zero-sum game; win-win isn't really in the corporate playbook. "Given half a chance they'd drive us out, so we have to drive them out first!"

In the end, the behavior of Microsoft as a company and of many of Microsoft's employees looks more like aversion than change. "Let's not be seen doing anything else that could get us in trouble!" is not how you begin change. "Wow, we really screwed up, how can we fix it?" would be a better start.

Oh, and Scoble? I bet a lot of what's shown in Longhorn at PDC is stuff we already have in Mac OS X.

Uh...
[info]chanson
What's up with all the people claiming iTunes is Apple's "first Windows software"?

Haven't these people been using QuickTime to watch movie trailers?

Haven't these people heard of ClarisWorks, or FileMaker Pro? Or WebObjects?

Apple has released plenty of Windows software over the years. iTunes is only the latest.

Snowed Under
[info]chanson
I really and truly loathe Windows and Windows users right now.

Why?

Because I'm being snowed under by virus spam. My company email account is receiving virus spam at a rate higher than one per minute now. My ISP is working on a filtering solution, but Jesus fucking Christ can't these people learn to patch their systems and not run attachments if they're not going to do the sensible thing and get Macs?

At this point, using Windows is like driving an SUV. The people who are doing it are doing it because everybody else is doing it, and they don't seem to know or care that it's extremely harmful to the environment we all have to share. That's not to say the virus authors don't share the blame; they're effectively running around and cutting the brake lines on all of the SUVs they can find, screwing everybody even more.