Category Archives: software development

Anders Hejlsberg: Languages are becoming amalgam

Ted Neward has some notes on Microsoft’s recent Lang.NET symposium. In his notes on Day One he  mentions a remark by Anders Hejlsberg that “languages are becoming amalgam”. I don’t have any more details on what was said but it chimes with what I’ve observed in the last few years. We’ve seen C# and .NET take on characteristics of functional and dynamic languages; we’ve seen C# and Java adopt similar features; we’ve seen JavaScript/ActionScript evolve into another similar language.

Neward adds:

if languages are slowly “bleeding” out of their traditional taxonomies, how will the vast myriad hordes of developers categorize themselves?

Personally I’ve long thought that good developers can adapt relatively easily to different languages. Maybe it is more interesting now to look at development methodologies, whether implicit or explicit.

Further, even if business/web development languages are converging, native code memory-juggling in C or C++ remains distinctive and necessary.

Technorati tags: , , ,

Nokia acquires Trolltech,

Nokia is to acquire Trolltech, makers of the popular cross-platform Qt GUI API and widget set. Qt (Cute Toolkit) is used by KDE, one of the two most widely used Linux desktops. It is also used in many cross-platform applications.

The announcement states that Qt will continue to be open source:

We will continue to actively develop Qt and Qtopia. We also want to underline that we will continue to support the open source community by continuing to release these technologies under the GPL

Nokia says:

The acquisition of Trolltech will enable Nokia to accelerate its cross-platform software strategy for mobile devices and desktop applications, and develop its Internet services business. With Trolltech, Nokia and third party developers will be able to develop applications that work in the Internet, across Nokia’s device portfolio and on PCs. Nokia’s software strategy for devices is based on cross-platform development environments, layers of software that run across operating systems, enabling the development of applications across the Nokia device range. Examples of current cross-platform layers are Web runtime, Flash, Java and Open C.

Interesting acquisition. I have great respect for Nokia, but find its platform strategy confusing. It is the major partner in Symbian, the operating system used in its smart phones, but it also uses Linux, for example in its Internet Tablets like the N810. Nokia sponsors an open source development platform called Maemo, which uses the Gnome Toolkit, a competitor to Qt. I also met Nokia folk at Adobe Max in Barcelona, talking up its Flash support. The Flash player is included on all high-end Nokia mobiles.

And what’s this about “applications that work in the Internet”?

It is a shame to see another smart, independent company swallowed by a giant, but there could be worse homes for Qt. That said, I’d be nervous about Qt’s support for Windows CE. And what will happen to Qtopia Phone Edition:

Qtopia Phone Edition is a comprehensive application platform and user interface for Linux-based mobile phones.

The releases say Nokia/Trolltech will continue to invest in Qtopia. Will it become core to Nokia’s own range of devices, or sidelined? What are the implications for Symbian? Is Nokia worried about too much mobile development going to Flash?

However you spin it, it seems that Linux is ascendant at Nokia.

Technorati tags: , , , , , ,

SQL Server 2008 delayed until third quarter 2008

Microsoft’s Francois Ajenstat says SQL Server 2008 will not be released until Q3 2008. He calls this “roadmap clarification”, Microsoft-speak for what most of us call a delay.

It’s embarrassing for the company, since SQL Server 2008 “launches” on 27th February, less than one month from today. What will actually launch is a feature-complete CTP (Community Tech Preview). Since Q3 can(and often does) mean September, there may be over six months between the launch and the release. It is an extraordinary stretch, especially since Visual Studio 2008, which has been available since late last year, “launches” on the same day.

Still, let’s look on the bright side. First, late releases are better than buggy releases; and the SQL Server team has a good record. Second, at least Microsoft has managed to control the dependencies so that it possible to stagger the releases without anything breaking (one presumes).

Flex briefing in London tonight

Adobe’s Serge Jespers and James Ward are in London this evening (Thursday 24th Jan 2008) and will be speaking to the Flex User Group:

19:00 General intro (Serge Jespers)
19:15 Flex Builder 3 (Serge Jespers)
19:50 Open source (James Ward)
20:00 Data services (James Ward)
20:35 Q&A (and presentation from the community)
21:00 Drinks (free beer, thanks Adobe!)

It’s a free event and there’s room for more, so I thought I’d mention it here.

Here’s the signup page.

If you go along, I’d be interested to know how you find it and what you think of Flex and AIR. Comment here or email me – tim(at)itwriting.com.

Technorati tags: , , ,

Escaping the Adobe AIR sandbox

Adobe’s Mike Chambers has an article and sample code for calling native operating system APIs from AIR applications, which use the Flash runtime outside the browser.

I took a look at the native side of the code, which is written in C# and compiled smoothly in Visual Studio 2008. The concept is simple. Instead of launching an AIR application directly, you start the “Command Proxy” application. The Command Proxy launches the AIR application, passing a port number and optionally an authorization string. Next, the Command Proxy creates a TCP socket which listens on the specified port. The AIR application can then use its socket API to send commands to the Command Proxy, which is outside the AIR sandbox.

It’s a neat idea though Microsoft’s Scott Barnes gave the design a C- on security grounds. He clarified his point thus:

The communication channel between the command proxy and AIR application looks like a potential vulnerability. One of the things application developers should worry about with security is insecure cross-process communication mechanisms hanging around on someone’s machine. For example if a process listens on a named pipe, and that named pipe has no ACLs and no validation of inbound communication, the process is vulnerable to all kinds of attacks when garbage is sent down the pipe. In the example on using the command proxy how do you secure it so that it doesn’t turn into a general purpose process launcher?

Barnes has an obvious incentive to cast doubt on AIR solutions (he’s a Microsoft RIA Silverlight evangelist), but nevertheless this is a good debate to have. How difficult is it to do this in a secure manner? It is also interesting to note the opening remarks in Chambers’ post:

Two of the most requested features for Adobe AIR have been the ability to launch native executables from an AIR application, and the ability to integrate native libraries into an AIR application. Unfortunately, neither feature will be included in Adobe AIR 1.0.

This is really one feature: access to native code. I remain somewhat perplexed by AIR in this respect. Is the inability to call native code a security feature, or a way of promoting cross-platform purity, or simply a feature on the to-do list? I don’t think it is really a security feature, since AIR applications have the same access to the file system as the user. This means they can execute native code, just not immediately. For example, an AIR app could download an executable and pop it into the user’s startup folder on Windows. That being the case, why not follow Java’s lead and provide a clean mechanism for calling native code? Adobe could add the usual obligatory warnings about how this breaks cross-platform compatibility and so on.

Sun gets a database manager, but Oracle owns its InnoDB engine

Sun now has a database manager. It’s been a long time coming. Oracle has … Oracle, IBM has DB2, Microsoft has SQL Server; it’s been obvious for years that Sun had a gap to fill. Now Sun has MySQL.

This is interesting to me as I was a relatively early user of the product. I didn’t much like it. It was missing important features like transactions, stored procedures and triggers. I still used it though because of a few appealing characteristics:

  • It was free
  • It was very fast
  • It was lightweight
  • It was the M in LAMP

I should expand slightly on the last of these. The great thing about MySQL was that you did not need to think about installation, PHP drivers, or anything like that. It all came pretty much by default. If you decided that you could not bear MySQL’s limitations, you could use Postgres instead, but it was more effort and less quick.

The ascent of MySQL is a sort of software development parable. Like PHP, MySQL came about from one person’s desire to fix a problem. That person was Michael “Monty” Widenius. He wanted something a little better than mSQL, a popular small database engine at the time:

We once started off with the intention to use mSQL to connect to our own fast low level (ISAM) tables. However, after some testing we came to the conclusion that mSQL was not fast or flexible enough for our needs. This resulted in a new SQL interface to our database but with almost the same API interface as mSQL. This API was chosen to ease porting of third-party code.

Why did MySQL take off when there were better database engines already out there? It was partly to do with the nature of many LAMP applications in the early days. They were often not mission-critical (mine certainly were not), and they were typically weighted towards reading rather than writing data. If you are building a web site, you want pages served as quickly as possible. MySQL did that, and without consuming too many resources. Many database engines were better, but not many were faster.

MySQL today has grown up in many ways, though transactions are still an issue. To use them you need to use an alternate back-end storage engine, either InnoDB or BDB. BDB is deprecated, and InnoDB is included by default in current releases of MySQL. InnoDB is owned by Oracle, which could prove interesting given how this deal changes the dynamics of Sun’s relationship with Oracle, though both MySQL and InnoDB are open source and published under the GPL. Will Sun try to find an alternative to InnoDB?

While I agree with most commentators that this is a good move for Sun, it’s worth noting that MySQL was not originally designed to meet Enterprise needs, which is where most of the money is.

Update: as Barry Carr comments below, there is a planned replacement for InnoDB called Falcon.

How to debug into .NET Framework source code

Shawn Burke has posted the steps needed to step through the .NET Framework source when debugging your application.

Good news for a couple of reasons. The first is the most obvious: if you are getting surprising or perplexing behaviour, you now have a better chance of working out why.

Second, and perhaps more important, this makes it easier to submit bug reports or feature requests to Microsoft along the lines of “why does your code do this when it could or should do that“?

All going well, this should improve quality. For example, the .NET Framework library code is huge, and I’ve heard it muttered that there is considerable duplication within it. Separate teams working on different parts of the library may solve the same problem with different code, causing bloat and possibly inconsistency. Opening up the library to public scrutiny makes it more likely that issues like this will get fixed.

Daniel Moth has a screencast.

SharePoint’s secret sauce

Just before Christmas I spoke to Daz Wilkin, Microsoft Developer Platform Evangelist, about Office development and Sharepoint. I’ve wanted to catch up on Sharepoint for some time, since it is achieving significant usage. Here’s a recent study which claims that:

the number of SharePoint applications in place today will quadruple over the next 12 months

Wilkin says that:

SharePoint is approaching becoming a billion dollar business for Microsoft. It’s vastly exceeded all of our estimates.

I suspect that journalists, myself included, have given Sharepoint insufficient attention. One reason is that it is a slippery product to describe and seems to straddle several categories, such as portal server, smart file store, and workflow platform. “I don’t think Microsoft has done a bang-up job in being able to articulate it. It is many things to many people,” says Wilkin.

Another problem is the confusion over SharePoint Portal Server (paid for) and SharePoint Services (free add-on for Windows server). You can find a point-by-point comparison here. The free SharePoint Services, on which Portal Server is built, are surprisingly rich. Once you have them installed, which can be a little painful, you get instant wikis and blogs, shared documents with versioning, permissions, and the ability to open and save directly from Office applications, shared calendars and tasks, and online forums. Here’s the settings panel for a shared document store:

Site options including content approval,versioning,permissions and check out 

It’s a shame that document versioning is off by default, but there is plenty of value in these features. Note we are mainly talking intranet rather than internet, though hosting SharePoint is a growing industry and it is also core to Microsoft’s own hosted service efforts.

Why is installation painful? Well, you need Windows Server, and if you want to use ASP.NET for something other than SharePoint on the same box, it needs a bit of tweaking. For example, if you run Exchange and install SharePoint Services, it breaks Outlook Web Access. On my server I got round this by adding a second host name in local DNS, pointing to the same machine, and using this for the SharePoint site using IIS host headers. Real-world businesses either install SharePoint on a separate server, or have Small Business Server which builds it in, so this is mainly an issue for journalists and the like. Perhaps this is a small factor in why SharePoint gets less coverage than it should; it is not something we can just pick up and use like Office itself.

So why is SharePoint taking off? According to Wilkin, it is about “group productivity”. He talks about how SharePoint deals with the classic document review process. Emailing documents around a company and getting numerous edited versions back is a hassle. Apparently Microsoft itself is now using SharePoint more intensively, and users just check-out a document, make changes, and check it back in. He adds,

…If you then combine that with the ease with which you can check that document into a workflow, and then have it automatically routed around the organization, and then very naturally combine that with data going in and out of backend systems whatever they are, that to me is the magic. Customers tend to get the value more quickly than some of the ISVs.

Visual Studio 2008 has support for SharePoint projects and this is something I plan to write about soon. If anyone has been doing SharePoint and/or Workflow Foundation development, I’d be interested to know how you found it.

When good software goes bad

Verity Stob looks at feature bloat and a few other things in her piece on apps that have gotten worse over the years.

Confession: I use Paint Shop Pro too, although I have Photoshop installed as part of Adobe’s Web Premium CS3. In my case it is PSP version 5.0. PSP starts in a blink and has dead easy tools. Photoshop takes several seconds to start up and displays messages like “Initializing palettes” while it is getting going. There is nothing wrong with Photoshop, but equally if I just need to crop a screenshot quickly, I find myself using PSP and saving a few seconds.

Stob’s piece is light-hearted and unfair (I like C#) but a fun read.

I remember meeting a programmer back in the days of DOS and strict memory limits. He told me that every time he added a new feature, he had to find some other code he could remove in order to fit it in. A nightmare of course; but it prevented bloat.

It’s one of the reasons I like the Asus Eee PC. It is underpowered by many standards, but small, light, starts from cold in less than 30 seconds, and works fine for most everyday tasks.

Just another take on less is more.