How Much of the Industry Will Go Parallel?

Michael Seuss ponders one of my favorite questions: How much of the software industry will have to deal with the concurrent computing [opportunity]? He hits the vital points:

  • 2, 4, and maybe 8 cores may be usefully exploited by system services (anti-virus, disk indexing and searching, etc.), but when you get beyond that, any program for which performance is any kind of issue simply cannot ignore the capacity (this is why I distinguish between our current “multicore” transitional phase and the coming “manycore” era).
  • Media programming (games, A/V processing) have an essentially infinite appetite for processing
  • The manycore era provides an opportunity for new types of functionality. He mentions concurrent semantic analysis of your input, both typing and spoken, and the accumulation of context documents. For instance, as I type this, my computer might be gathering all my blog posts, OneNote notes, source code, etc. relating to concurrency. (And then wouldn’t it be cool if it offered them for my perusal, maybe with, I dunno’, a goggle-eyed paperclip?).

But I think the $64 question is whether such services will be provided in a service-oriented, cross-application manner, or whether it will be the case that we find broad opportunities for them within applications. For instance, mail programs and word processors have had search functionality for a long time, but if you were designing such a program from scratch, you would probably be better advised to say “Hey, I won’t implement a complete search subsystem, I’ll just make sure I can be indexed by Windows and Google Desktop Search. If I want to add value, I’ll layer on top of those systems if at all possible.”

Conversely, if you had some powerful new value proposition (semantic analysis, task recognition, visual input), wouldn’t it be vastly better for you and your customers if you could provide it to applications other than those that you happen to have written? In other words, of course value in the manycore era will derive from increased parallelism but maybe that parallelism will still be very coarse-grained. Maybe software organizations will face a choice: “Either develop client-oriented value with the best practices of “traditional” non-parallel development or develop broader, system-oriented value using whatever is the emerging set of best practices for system-level parallel development.” Maybe that choice will become increasingly orthogonal.

Now, the final part of the thought experiment is this: if that scenario is reasonable, what kind of platform services / APIs would one desire?

Microsoft Unveils "Surface" Multi-Touch Table Interface

Bill Gates has gone public on Microsoft’s commercializing a multi-touch table interface called “Surface”. This has been shown before, but only as one of the (many) prototypes that you see these brief glimpses of and which often are not commercialized (I think “Surface” and the device-pairing stuff was shown at some demo relating to digital identity).

I doubt that the first few generations of Surface will be what I want, but I bet in about a decade professionals will be able to work at a desk with a blotter-sized 133-DPI display (as well as vertically-oriented screens). Sweet.

Comment:Code > 1:3 ?

 Andrew Binstock adds to his pithy series on quality ratios (unit tests per method, unit test coverage) with a post saying that high-quality code is likely to have around 35% and perhaps even more than 45% of lines devoted to comments.

He also mentions two “commenting” practices that drive me batty — the boilerplate license agreement header when a URI would do and commented-out source, which is like handing in your homework with crossouts all over the page. (Is a metaphor invoking hand-written homework hopelessly anachronistic?)

I’m somewhat contrarian on the common wisdom regarding comments, an attitude that developed from writing so much code for print publication. Source code was traditionally very difficult to format and inflexible, so when writing code for publication, you use very few comments, explicit-as-possible names, and straightforward-as-possible control structures. Of course you explain the “why” in the article, but you want the “how” to be evident. If a comment is needed within a function written for publication, that’s suspicious. But the thing is, that’s not a bad attitude to take in the real world! Documentation comments? Absolutely vital. But within a function, I’m skeptical.

The most confusing thing within functions is the combination of state relating to flow-control (if … else … if … case requires a comment saying “Okay, we’ve figured out that the situation is … ” comment) and the invocation of the consequences (“… So therefore, we know that the correct parameters are … and we execute the call … and we store the return in this variable relating to flow-control”). But the solution is not comments, it’s refactoring. Create a function that determines the flow-control (or, even better, use a proper object structure with virtual function calls, the result of which is that much flow-control is implicit), and another function that incorporates the call-and-return logic.

Having said that, I don’t doubt that the occasional within-function comment can do a world of good, especially in those situations when, due to library constraints, the names of the functions being invoked aren’t clearly related to the immediate programming goals.

The Missed Opportunity of a PDC Without a Grand Unveiling

“Professional Developer’s Conference.” “[T]he definitive developer event focused on the future of the Microsoft platform.” That sounds awesome, but is unfortunately paired with the clause “we try to align it to be in front of major platform milestones.”

Given a major technology announcement, it’s logical that the PDC to, uh, “align in front.” A grand unveiling, a couple breathtaking demos, and then getting up to speed as quickly as possible. No doubt.

However, wouldn’t it be frigging grand if Microsoft said:

Welcome to PDC 2007. This conference is focused on conceiving, implementing, and delivering value in the form of software services on the Microsoft platform [Ed: Not ‘the Windows platform’? Interesting.] You will not see any previously-secret technologies. You may very well learn APIs that are new to you, but they will not be new. Microsoft’s very best software developers and managers are going to talk about how to create great applications on and for the Windows platform [Ed: You mean ‘the Microsoft platform’?] , using the tools that Microsoft has promised would bring unprecedented levels of ease and power.

  • We’re going to expain how to architect systems that use MS technologies synergistically
  • We’re going to break down the processes used by successful teams using MS tools
  • We’re going to talk about code and performance, and we’re not just going to talk best-case scenarios

Wouldn’t you look forward to that conference?

(Yeah, it’s the pre-sclerotic Software Development Conference but with a Microsoft-specific spin. I don’t have any problem with the reality that PDC is a marketing effort.)

Pandora brings internet radio to Sprint cellphones

 $3 a month for Pandora? Geez, I might have to buy a cellphone just to get it.

Pandora on SprintWeb broadcaster Pandora has announced Pandora on the Go, a mobile client that works with a handful of Sprint cellphones.
There’s a 30 day free trial for Sprint Power vision customers. After the trial period, you’ll have to shell out $2.99 a month.

Source: Pandora brings internet radio to Sprint cellphones
Originally published on Wed, 23 May 2007 20:00:00 GMT by Brad Linder

Why Ruby’s The Mansion of Bliss

Scott Hanselman weighed in on the Ruby buzz, saying that no language is all things to all people at all times.  I agree, but think that there are a couple things about Ruby that don’t require us to get into language design philosophies. Let me quickly state that these things are not unique to Ruby, but may take the appearance of The Mansion of Bliss to those with backgrounds in more statically-defined languages. (“The Mansion of Bliss” was, I learned on my flight to Panama last night, a phrase used in the early 19th century to mean “tits.”)

The first thing that I like about Ruby is that it has an interactive console / REPL loop. For instance, let’s say you’re trying to divvy up a bunch of data into bins, but don’t know the exact cut you want. With Ruby, you can instantiate a database connection, retrieve this table’s data, that table’s data, apply this filter, that filter, etc., interactively. Of course you can do this with a static language, but every time you make a step of progress, you have to recompile, start the system, retrieve the data, stitch up the joins, and then check to see if your new filter moves you a step forward (which is the much-to-be-admired test-driven way, but sometimes keeping that line green takes a lot of time off the clock). Or, I imagine, you could do it in an interactive SQL Explorer, if your SQL is better than mine.

The other thing I quite like about Ruby is that while everything’s an object, there’s an implicit receiver. So if you have:

puts ‘Hello, world!’

alone in a file or alone in the console, you can do without the likes of:

public static void main(String[] args) { … }

and, y’know, that’s just nice. Object-orientation is the Mansion of Bliss, to be sure, but sometimes there’s something to be said for a block of imperative code.

Further, after 10 years trying to remember what combination of decorators with which to read a file, there’s something awfully blissful about File.Open(“foo.txt”), much less, which you do for the price of require ‘open-uri’

It does make me pine, though, for two other things that it could have:

What if every line of code you ever wrote were available, perhaps organized in some form of browser?

What if as you worked in that interactive shell, you could just shut down the system and return to it later, having the exact objects, in all their complex state, restored to their former glory?

I suppose that such capabilities are impossible or someone would surely have implemented them by now.

SubSonic: .NET-based Database Access Layer akin to Ruby’s ActiveRecord

Via  Rob Connery Interviewed by Miguel de Icaza, I took a quick look at SubSonic, which appears to be a good solution in the ASP.NET world for very rapidly generating Create-Retrieve-Update-Delete functionality pages that honor database foreign keys.

One of the dazzlers in the Ruby world is a library called ActiveRecord, which powers similar functionality within Ruby on Rails. If you’re lucky enough to be starting with a new database, you can generate “scaffolding” to edit your tables in a matter of quarter-hours. (As Steve Jones says in CRUD is Crap, that such functionality is considered dazzling in the year 2007 is an indictment of our toolsets, but nonetheless.)

Any client-facing application almost instantly moves beyond scaffolding, but I’ve been reminded recently of the need for rapid data-editing / cleaning in any large application but especially in SOAs, with data continuously flowing into the system boundaries. Garbage-in, garbage-out is a big problem in SOAs.

Two downsides of ActiveRecord are that:

  • Foreign key relationships must be manually inserted, and
  • It’s naming conventions can be tough to overcome when using a legacy DB

These seemingly minor issues can be significant when you’re dealing with an enterprise-sized database with several hundred tables. Whether SubSonice addresses these issues, I don’t know, but I look forward to adding it to my arsenal.

Microsoft’s Popfly: Getting Their Ducks In A Row

Popfly is the name (and URL) of Microsoft’s new non-professional developer community, a Windows Live site whose flashiest feature is a Silverlight-based “mashup editor” that facilitates pipes-and-filters development. Before reviewing the gratuitous 3-D spinning cubes, though, pay attention to the context:

  • Visual Studio Express has had 14,000,000 downloads (source: Dan Fernandez personal communication). Of course that translates to something far less than 14M users, but it ain’t hay;
  • The Popfly mashups run inside Silverlight, so anyone wishing to view their friends’ / child’s / grandkid’s project is going to have to install the Silverlight runtime;  
  • Silverlight is going to rapidly evolve to incorporate the Dynamic Language Runtime. Silverlight + CoreCLR + DLR == Microsoft’s platform play for dynamic languages, which have crossed the chasm and, whatever their other strengths or weaknesses, are easier to learn than explicitly typed or Pascal-like highly-structured languages

Microsoft is on the verge of restoring the bridge between power users and programmers.

The collapse of that bridge — the disappearance of macro-based automation during the DOS-Windows transition and the removal of Hypercard from the Mac — was the greatest setback the professional programming community has ever suffered (#insert COBOL or C++ joke here#).

Pipes-and-filters mashups are the UNIX shell-commands of the Web. The next step is automation — after you start figuring out how to pipe commands, you start writing shell scripts, at which point you’re programming the platform at a higher abstraction level. That’s a crucial point: we’re not talking about flow-control and manipulation within the pipes-and-filter components, but at the platform level. That’s why it’s huge that the Popfly mashups are executed on the client (within Silverlight) and not on the CPUs of the host. Mainframes->Minis->PCs: empowered users require and embrace personal resources. This is the salient distinction between Popfly and Yahoo Pipes (Popfly also works with more types of data, but Yahoo could address that). It’s not just that there’s a resource-consumption scaling problem that might be solvable by the host absorbing hardware costs, it’s that there’s a Big O scaling problem: to the extent that mashups are used to program the Web, as soon as people start looping/recursing, you’re talking about non-linear increases in resource consumption.

To be clear, I don’t think Popfly is the Bourne Shell of the Web — that hasn’t been written yet. But I think Popfly’s the | and Silverlight’s the $