Category Archives: software development

Sutter on Concurrency

Herb Sutter, Software architect at Microsoft and C++ guru, has posted his slides (PDF) from OGDC, a game development conference. His talk was on the challenge programming for concurrency. If you’re not familiar with the subject, the earlier article The Free Lunch is Over is a great starting point.

The free lunch is the assumption that faster processor speeds will fix our slow applications. It’s now well-known that chipmakers are running into the wall in terms of speed, but getting very good at providing multiple processors. The secret of faster or smarter software is to take advantage of those multiple processors with concurrent programming.

A few highlights from the slides:

  • Sutter says that manycore processors are improving rapidly: “Intel could build 100-Pentium chips today if they wanted to.”
  • He observes that the issue is largely solved on the server, but not on the client
  • Locking is inadequate as a way of managing shared state. In particular, it breaks composability
  • He favours transactional memory to reduce but not eliminate dependency on locks: “Version memory ‘like a database.’ Automatic concurrency control, rollback and retry for competing transactions”

Finally, Sutter says:

The concurrency sea change impacts the entire software stack: Tools, languages, libraries, runtimes, operating systems. No programming language can ignore it and remain relevant.

My comment: we’ve seen threading get a little easier in programming languages like C# and Java, thanks to wrapper classes, and in C++ OpenMP can work magic, but what is the radical language innovation that will make concurrency achievable for mortals?

Microsoft PDC postponed due to lack of content

Microsoft’s Professional Developers Conference, which was to take place in October, has been postponed.

The stated reason is that the conference, which is meant to be focused on futures, would have been too late for the current round of developer releases:

By this fall, however, upcoming platform technologies including Windows Server 2008, SQL Server codenamed “Katmai,” Visual Studio codenamed “Orcas” and Silverlight will already be in developers’ hands and approaching launch.

The implication is that PDC would also have been too early for the next round of platform updates.

There are other conferences you can attend for a Microsoft fix. There’s another problem though: Tech-Ed developer in Europe conflicts with DevConnections in Las Vegas – and key speakers like Scott Guthrie and Tom Rizzo are already announced for DevConnections.

I tend to agree about PDC. Talking futures is not what Microsoft needs at the moment. Getting developers to engage with the current crop (WPF, Silverlight) is more to the point.

As for me, my next dev conferences are in London: Google Developer Day followed by Adobe Live/Adobe Developer Day. If you’re going to either and would like to chat, let me know.

 

Technorati tags: , , ,

Why Rich Internet Applications Matter

Anne Zelenka is sceptical about RIAs:

The idea is that we need more rich interactivity from our browser apps than they give us. But is this just developer fantasy, or does it represent a real end user need?

It’s a great question. I believe it’s fair to say that the all the interest in RIA, sparked by Flash and enflamed by Silverlight, is still more hype than real-world usage (especially Silverlight, still in Alpha for the .NET version).

There are multiple issues here. In particular:

  • Will we see HTML/CSS/JavaScript (call it AJAX if you like) gradually giving way to browser-hosted apps running in plug-ins (Flash, Silverlight, Java)?
  • Will we see a new breed of internet-delivered, zero-install desktop apps that will diminish our dependence on web browsers?  

I have few doubts about the first of these. Ease of development, flexibility and predictability of design, performance benefits of JIT compilers, convergence between internet and broadcasting, richer content enabled by ubiquitous broadband, to name some of them. 

The second is more contentious. But I think it will happen. There is room for debate about what constitutes a “real end user need”; but if you rephrase that as “real end user benefits” then it makes more sense. The main reasons are offline use and better integration with local OS services.

A while back a web app sceptic (I forget who) described the browser to me. “I call it Window”, he said. His point still holds. There is no need to do all your work within a browser box.

 

Technorati tags: , , ,

Adobe CS3 won’t install

Users are complaining that Adobe Creative Suite 3 simply won’t install. I’m one of them, running 32-bit Vista Professional. Pop the DVD in, click Install CS3 Web Premium, setup starts running, then silently closes. No error message, no install either.

Of course I have tried a few things. I’m not the only one struggling: the Adobe user forums are full of similar problems. Note: similar but not identical. There appear to be multiple issues, and not just on Vista but on XP as well. Here are some popular solutions:

I’ve tried the first two without success so far, on two different machines. Next stop tech support.

It looks to me as if Adobe is having Windows Installer issues. Perhaps nobody had time to read and observe the Tao of the Windows Installer. Still, I reckon Adobe could do a better job with the error logging and reporting. There are installer logs by default in \Program Files\Common Files\Adobe\Installers\, but mine have nothing helpful; no errors are reported. The Windows installer supports a detailed logging mode, but it seems difficult to enable with this particular installer. The calls to the installer itself are wrapped by some kind of Adobe package manager, and the .msi files are designed to prevent you from opening them directly.

Here’s what I get if I run setup from a command prompt:

Begin Adobe Setup
UI mode: Full GUI
End Adobe Setup. Exit code: 4

Hardly illuminating. If I do the silent mode, I get Exit code: 7 instead.

The bottom line is that I have no clue what is going wrong. Perhaps it is a campaign to promote the Mac version. I’ll keep you posted.

Update

I fixed it. First, the logging was more helpful than I realised at first. In the Installers folder mentioned above, there is a file called:

Add or Remove Adobe Creative Suite 3 Web Premium 1.0.log.gz

I’d not looked at this because I also had a file called:

Adobe Creative Suite 3 Web Premium 1.0.log

It turns out that the former is more useful than the latter. Of course it is compressed in .gz format, which Vista does not understand, but the open source 7-zip archiver takes care of that. So I extracted the log and found this entry:

DEBUG: Error 2739: Could not access JavaScript runtime for custom action Internal Error 2739.

That gave me something to troubleshoot. I soon found this article which says to re-register JScript:

regsvr32 jscript.dll

from an administrator command prompt. I was away; the setup ran fine after that.

Incidentally I did call tech support, but the techie didn’t help directly; he asked me to email the log though, and it was looking at that which gave me the answer. Now I can get on with the review…

Technorati tags: , , , ,

Visual Programming is back: PopFly, Pipes, Scratch

The first true visual programming environment I used was IBM’s VisualAge Smalltalk. I liked it and thought it was a shame when IBM reverted to pure code-based development with Eclipse. Admittedly, complex applications got fairly confusing, with lines everywhere.

Now it seems visual programming is back. The other day Scratch hit the news, a cool visual programming environment for kids. I like the way that jigsaw-like shapes are used to indicate whether or not two blocks can be fitted together.

Yahoo has Pipes, drag-and-drop RSS feed combination and transformation.

Now here comes Microsoft PopFly, online visual programming for Silverlight. Is it programming? I think so:

Underneath the covers, blocks are just chunks of code that wrap complex operations, like retrieving data from a Web site or displaying an animated slideshow so that others can easily reuse that block.

PopFly looks interesting, easy to use and visually appealing, though I’ve not got an account yet. I’ve only watched the demo video.

Of course the visual bit only takes you so far. If you want to create your own blocks, or customize them, you have to write your own Javascript. I guess that will always be the case. It’s still good to see development being made more accessible for non-technical users.

 

Eclipse, WebSphere winners in latest Java survey

BZ Research has released its latest survey of Java tools. Let’s start with the caveats:

  • The survey is based only on subscribers to SD Times.
  • Out of 19,623 subscribers invited to take part, only 758 (3.9%) completed the questionnaire.

I’m not surprised: I get bombarded with requests to take part in surveys, and rarely do so. Even so the results are interesting, and the year-on-year comparisons may be indicative of trends.

On to the results (note that percentages are non-exclusive so sum to more than 100):

  • Eclipse increased its usage slightly to 69.6%; NetBeans climbed to 2nd place with 23.3% (up from 17.9%).
  • Oracle’s JDeveloper is up from 15% to 19%.
  • IBM RAD has a decent showing, up from 10.8% to 19.5%, not far behind its WSAD at 22.1%.

The survey also covers app servers. Here, all the shares are down, implying more diverse usage than last year. WebSphere is first with 36.9%, then JBoss with 32 %, then BEA WebLogic at 23.7%. Oracle and Sun are 4th and 5th.

Overall, nothing dramatic to report, though the gain for NetBeans shows that Sun’s investment in this IDE is having some success.

CodeGear’s JBuilder doesn’t feature in the top 5, nor does the excellent IntelliJ IDEA.

 

Office Open XML needs wrapper classes

I’ve been writing a hands-on style article on using the Packaging API and Office Open XML. It all works smoothly, but its glaringly apparent that Microsoft needs to provide some wrapper classes for Open XML documents to make the API more usable. You can download some code snippets, which is a start, but these only scratch the surface. After all, Office developers are used to the COM automation API which makes it relatively easy to create and manipulate documents. By contrast, to get anywhere with Open XML you have to understand the raw XML. It is still miles better than working with RTF, or with the binary Office formats, but more difficult than it should be.

By way of illustration, look no further than the official code snippet for XLInsertStringIntoCell, which does what its name suggests: writes a string into the specified cell of an Excel spreadsheet. It is over 200 lines of code and comment (in fairness, more comment than code). That would be just 2 or 3 lines in VBA. Of course, once you have the wrapper function, it is just as easy. Unfortuntely there is a lot to wrap, but it is not necessary to be comprehensive. A simplified DOM that enabled the creation of basic formatted documents and spreadsheets without having to write thousands of lines of code would meet most needs.

I realise that you can write a “Hello world” document fairly easily; I’ve done it myself. But “Hello World” is not particularly useful. After all, you could output plain text or CSV, and Word and Excel will open them happily enough. The point of Open XML is to enable documents that have a little more to them: headers and footers, specified margins, rich formatting with fonts and paragraph styles, tables and graphics. Doing all that in Open XML is not trivial.

I am not the first to think along these lines. For example, here’s some code posted to CodePlex for working with Excel. Good stuff, but personally I’d like to see some official libraries, or even a well-run (WIX-style) officially endorsed open source project for this. It’s badly needed.

 

Technorati tags: , ,

Developers still miss VB6

A couple of years ago I wrote a piece on why Visual Basic 6 was frozen.

The topic is still of interest, and some reason reddit.com picked this link up recently, so the article has thousands of new readers.

If nothing else, it proves that developers still miss the old Visual Basic. Perhaps not so surprising; as I pointed out, it once had a reasonable claim to be the most popular programming language. That would not be true now; C# seems to be more popular than VB.NET, certainly among professionals, and I suspect Java is the number one overall (though these things are hard to measure intelligently).

Would I write the same article today? More or less, though the arrival of Vista and Office 2007 would make me state more forcibly that neither COM nor the Win32 API is dead. I still think that maintaining old-style VB would not have been feasible for Microsoft, except like FoxPro as a legacy thing and sadly now a dead end.

It’s also worth noting that VBA lives on, even though Microsoft is focusing on VSTO in its place. Except on the Mac, which is another story.

PS: I’ve fixed the comment feature on the article, so you can now have your say.

Technorati tags: , , , , ,

JBuilder 2007 comes to the Mac

Codegear has announced a new JBuilder 2007 release which includes Mac, Vista and RedHat support (the earlier release only ran on Windows). It is to be made available later this month (May 2007).

There are three editions, Turbo (free), standard and Enterprise. Enterprise has “Team Server” features, with tracking and source code management; it’s not clear from the release how this ties in with existing team offerings from Codegear/Borland. The standard edition replaces both Developer and Professional editions in the previous range; the release says there is: 

Special upgrade pricing of $250 and new user pricing of $499

You would have thought this would be a free upgrade for existing JBuilder 2007 users, since cross-platform support should have been there from the beginning, but the release doesn’t say that it is. I’d like clarification.

This of course is the “JBuilder” based on Eclipse. I was interested in a discussion on one of the JBuilder newsgroups about Eclipse updates. Eclipse is a platform for add-ins, each of which is constantly being updated. The idea is that you run the update manager from time to time to get the latest version of each add–in, or perhaps install new ones. There are multiple dependencies with obvious potential for conflict. Borland’s JBuilder is a tailored build of Eclipse, and in consequence it is apparently dangerous to use the update manager. One user complained about this and drew the following comment from JBuilder expert David Orriss:

Do not try to use the Eclipse updater in JBuilder 2007. It can lead to problems, as you have seen. I’ll agree that it could have been documented better, but to try to effectively block the updater [which] (via plugins or code modifications) causes problems in the Eclipse platform.

It is a significant point. On the plus side, one of the attractions of JBuilder 2007 is that it offers a consistent, supported build of Eclipse unlike an uncontrollable open-source installation. On the minus side, blocking the update manager blocks the key Eclipse benefit: its extensibility and continuous improvement.

 

Mix Unmixed

Microsoft had a good Mix07. Let’s start with the provisos. Silverlight with .NET may have been announced, but it’s a long way from delivery, with alpha code just posted and no date set. Adobe already has a widely deployed cross-platform runtime with an embedded Javascript engine, complete with JIT compiler.

Next, Microsoft is miles behind its rival in the design world; it’s Expression tools are just now appearing, while products like Illustrator, Photoshop and Dreamweaver are de facto industry standards.

Third, Mix07 had its share of hiccups, not least the bizarre closing plenary. The theme seemed to be the future of advertising: XBox maestro Robbie Bach entertained us for a short time with clips of in-game advertising, following which came a lengthy and less than sparkling panel debate, only redeemed by pithy comments from Economist Publisher and Managing Director Andrew Rashbash who reminded us that editorial independence still matters, which is a relief.

That wasn’t enough for most delegates. A little way into the debate I became aware of a distracting bonging noise from somewhere behind me. It was the doors clanging as attendees headed for the exit.

I have never seen so many people leave a Microsoft plenary, and I can’t shake off the suspicion that something else was planned for this slot, but pulled at a late hour.

Never mind, this was nevertheless a good conference for Microsoft. It is all about a one-two Silverlight punch. Punch one is online video. You know the story: streaming internet video used to belong to Real, Apple and Microsoft until Adobe sneaked in with a marvellous “it just works” implementation in the Flash runtime. How can Microsoft now compete? Two ways: price and quality. On the price front, it is giving away space on its streaming servers, a more than generous offer that is likely to be widely taken up.

Another factor is codecs. Flash has two, H263+ and VP6. H263+ is cheap to implement, thanks to to support in FFMPEG, but the quality is poor. The newer VP6 codec, from 0n2, is equally high quality but according to Microsoft’s Forest Key, less efficient:

We are 20% better. At constrained data rates, or at HD data rates, because it’s computationally more effective, we can do a significantly better job . We can do HD on a significant number of machines. You will be able to do HD video with Silverlight. That is something that Flash can’t claim.

On2 may dispute this, judging from the claims on its site; but even if Microsoft is only on a par, that might be good enough, bearing in mind the low cost of encoding and delivering:

Expression Media Encoder is a batch processing tool for delivering media to Silverlight. It’s an enterprise scale product. We have a streaming server that is part of Windows server. It is very cost effective. By comparison Flash has a very expensive SKU.

says Key. Another plus for Silverlight video is ease of development. Program Manager Wayne Smith closed his demo with a jigsaw puzzle video, by which I mean a jigsaw image, pieces strewn everywhere, with each piece playing a segment of video. This is not useful in itself, but it nicely illustrates that in WPF video is just another graphics brush. This makes it easy to integrate video into an interactive application, with overlays, user configuration options, multiple simultaneous videos playing, and so on. Welcome to interactive broadcasting.

I am not personally a video person; I’m more interested in the programming side. The second Silverlight punch is the announcement of official cross-platform .NET, something I’ve speculated about for a long time, since before .NET 1.0 was released. Why is Microsoft doing it now? In one sense it’s an admission of failure: there will never be a Windows-only internet, thank goodness. For the rest of us it is good news.

Will Microsoft compromise Silverlight to keep the full WPF better? That must be a risk; but Key insists not:

That’s not our concern. We’re going to make Silverlight as good as possible. We shouldn’t artificially sabotage Silverlight to keep differentiation.

Overall it’s a good story, and accounts for the generally enthusiastic reception which Mix delegates gave to the opening keynote, which was as good as the closing plenary was bad. Pay special attention to what the guys from Major League Baseball talked about, as this is where it comes together into a compelling deliverable.

With Silverlight and Expression, I now think Microsoft will make real impact.

Technorati tags: , , , , , ,