Category Archives: software development

Microsoft: Live Mesh or Live Mess? Here’s what to read.

Here’s what I suggest you read to get to grips with Live Mesh:

Amit Mital’s introduction (he’s the General Manager)

Mike Zintel’s Live Mesh as a Platform (he’s Director of Service Infrastructure)

Mary Jo Foley’s Ten things to know and the helpful stack diagram.

I have a few initial comments. First, it’s the platform that matters, not the Live Desktop which is the first thing Microsoft is delivering and which you will find presented at mesh.com. Microsoft is finally showing us what it means by the “software plus services” thing it has been talking about for so long. It involves a new “Mesh Operating Runtime” which has both cloud pieces and client pieces, a MeshFX API, and an identity system which is Live ID (formerly Passport).

As far as I can tell, Microsoft is delivering an API which we will be able to use to build internet-based data, document and configuration into either desktop or web applications, with synchronization to local storage for offline use. Zintel adds:

… customers will ultimately license applications to their mesh, as opposed to an instantiation of Windows, Mac or a mobile account or a web site.  Such applications will be seamlessly installed and run from their mesh and application settings persisted across their mesh

It sounds good, though the obvious question is whether Microsoft is overstating the importance of the client in an attempt to preserve its core market. Do we need this special client piece? Here’s a paragraph from Zintel’s piece that caught my eye:

A key design goal of the Live Mesh data synchronization platform is to allow customers to retain the ownership of their data that is implicit with local storage while improving on the anywhere access appeal of the web. The evolution of the web as a combined experience and storage platform is increasingly forcing customers to choose between the advantages of local storage (privacy, price, performance and applications) and the browser’s implicit promise of data durability, anywhere access and in many cases, easy sharing.

Can Microsoft improve on the “anywhere access appeal of the web? Zintel says we need to combine it with the advantages of local storage, but the advantages Zintel identifies are not all that convincing. Let’s look at them:

Privacy: maybe, but local data is vulnerable to worms, trojans, viruses; well secured Internet data accessed over SSL is arguably more secure. Data not connected to the Internet is nice and secure, but can’t participate in the Mesh.

Price: I don’t see how Mesh helps here. Yes, local storage is cheap, but as soon as data enters the Mesh it is on the Internet and we are paying for data transfer as well as possibly Internet storage. I realise that Microsoft (among others) offers generous Internet storage for free, but that is just a way of buying market share.

Performance: Granted, some types of application work faster with local storage. Still, there are non-Mesh ways of getting this from web applications in a fairly seamless manner, such as Google Gears or Adobe’s AIR.

Applications: This is perhaps the big one. Many of us are reluctant to do without traditional local applications such as Office. Well, mainly Office. Still, web equivalents get better all the time. One day they will be good enough; and new technology like Silverlight is bringing that day closer. 

What about identity management and permissions? Zintel says:

A side effect of the competition to store customer data in the cloud and display it in a web browser is the fragmentation of that data and subsequent loss of ownership. Individual sites like Spaces, Flickr and Facebook make sharing easy, provided the people you are sharing with also use the same site. It is in fact very difficult to share across sites and equally difficult to work on the same data across the PC, mobile and web tiers.

True; but Mesh currently identifies users by their Live ID. Isn’t that the same as Spaces?

If Microsoft delivers a bunch of useful web services, that’s great. If it tries to somehow replace the web with its Mesh, it will fail.

Mary Jo Foley also asks the question: to what extent is Microsoft extending, and to what extent is it replacing, existing Live services such as Office Live or the excellent Skydrive? Making sense of all this is a challenge.

Now let’s mash all this up with Yahoo! (maybe). Ouch.

How to code better: new book from ThoughtWorks

Which is more important: the code you write, or the tools you use? Instinctively I would say it is the code which really counts; but vendors tend to focus on tools because that is what they sell. I found myself thinking about this last week, because while I was engaged in puzzling out the new Application Factories feature in CodeGear’s JBuilder 2008 a book arrived on my desk. It is called The ThoughtWorks Anthology, and subtitled “Essays on Software Technology and Innovation.” The title is the worst thing about it, since it sounds like some kind of corporate puffery from ThoughtWorks (and I suppose it is); but it is also a concise, enjoyable and stimulating read. I found it particularly refreshing as a break from JBuilder, since it it concerns stuff that matters: code, testing, project management, as opposed to stuff that might introduce more problems than it solves: the latest wonder tool which promises to speed development but might end up as just another piece of clutter.

I turned first to an entertaining chapter by Jeff Bay, called Object Calisthenics. Bay sets out nine rules; I don’t want to steal all his thunder, but here are three of them:

  • Don’t use the else keyword
  • Use only one dot per line
  • Don’t use any classes with more than two instance variables

Before you scream at him, note that this is an exercise, not a set of rules for live projects, though at the end of the chapter Bay says they can be used as such. It doesn’t matter whether you agree or not; what counts is that it makes you think about how to improve the design of your code.

Martin Fowler writes about how to write a DSL (domain-specific language) in Ruby. Rebecca Parsons describes how to categorize languages. Neal Ford makes the case for polyglot programming. Erik Doernenburg discusses the use of annotations/attributes in Java and .NET for application domain metadata. Julian Simpson has a great chapter on refactoring Ant build files, which can easily become hard to maintain. Two final chapters cover test strategy and performance profiling strategy.

I particularly like the way in which the book itself reflects the coding principles it presents. Each chapter is short, clear and focused. A good read for your next transatlantic flight.

The ThoughtWorks Anthology (Pragmatic Publishing ISBN 10: 1-934356-14-X)

Amazon links:

US: The Thoughtworks Anthology

UK: The Thoughtworks Anthology

mvn cloudtools:deploy

I love this. Write your Java EE app; then deploy to up to 20 virtual servers like this:

mvn cloudtools:deploy

The servers are Amazon EC2 instances, charged by the hour.

The tool comes from Chris Richardson, author of POJOs in Action. It combines a Groovy framework called EC2Deploy with appropriate Amazon virtual machine images and a Maven plugin. He calls the combination Cloud Tools. More on EC2Deploy here. The Cloud Tools home page is here. Open source under the Apache License 2.0.

Great for testing, could be good for live deployment too, especially now that you can get proper support from Amazon.

See also Jeff Barr’s Amazon Web Services Blog.

Visual C++ Feature Pack includes major MFC update

The Visual C++ 2008 Feature Pack is now available for download. It includes an update to MFC (Microsoft Foundation Classes), with classes for an Office Ribbon style interface (if you can live with the legal aspect) and other new GUI controls. There is also an implementation of  the TR1 (Technical Report 1) standard (PDF), an important update to the ISO 2003 C++ standard library.

Google App Engine: how much will you pay for freedom?

Google is offering to host your web apps for free:

You can create an account and publish an application that people can use right away at no charge, and with no obligation. An application on a free account can use up to 500MB of storage and up to 5 million page views a month.

What’s an application? It’s a runtime for Python apps (only Python code will run) and includes the Django web framework. There is a structured datastore which on the briefest of looks has echoes of Amazon’s SimpleDB and Microsoft’s SQL Server Data Services. Welcome to GQL – the Google Query Language. You can send email through Google’s servers (hmm, hope some work is being done to foil the spammers). You can use Google Accounts as an identity service – this is a big one, since it helps Google to meld your online identity with its services.

So what’s the business model? Google says:

During this preview period, only free accounts are available. In the near future, you will be able to purchase additional computing resources at competitive market prices. Free accounts will continue to be available after the preview period.

There are a few clues about what will constitute an “additional computing resource”. Clearly storage is one limit, and there is also a limit of 3 applications for free accounts. There is also a reference to bandwidth limits, the number of results you can return from a query (1000), and the length of time taken to serve a web request.

Apps communicate through HTTP or HTTPS requests. No talk of SOAP or even XML that I can see, though presumably you can use Python libraries.

Although we talk a lot about the largest applications that need to scale, this is a minority of real-world applications. Many of today’s web applications could run happily for free on Google’s new service, once ported. The economics interest me. Google is offering to subsidise our web infrastructure even further than it does already with GMail, Blogger and iGoogle gadgets. Therefore, if we choose to host our own services we have to pay for the flexibility and control that gives us, as well having to deal with scalability and security issues that Google will otherwise look after for us. In the light of generous app hosting offers like this, how much are we willing to pay for that freedom?

Reality strikes for Blog Friends Facebook app

Just spotted this sad note from the developers of one of the few Facebook apps I’ve enjoyed using, Blog Friends. The app combines blog aggregation with social networking, and does a good job of highlighting interesting posts you might otherwise miss:

Although it appears simple on the surface, Blog Friends is actually an unusually complex and resource-intensive application to maintain and grow …. the way that Blog Friends is currently tied into the Facebook Platform means we have been at the mercy of Facebook’s frequent modifications of their Platform specifications, and that has also been another disabling factor for us.

What is needed is a complete rewrite of Blog Friends, one that makes it properly scaleable and independent of Facebook. As you can imagine, this is a huge undertaking and unfortunately we don’t have the resource or money to do this; we have never inflicted any advertising on you our users, so we haven’t made a penny in revenue from Blog Friends.

We’re shutting down, as of today.

It’s tough to prosper without a sane business model; and it’s tough to survive on some third-party’s proprietary platform.

Proprietary platforms love developers (Ballmer’s battle cry, remember), because they add value. They are risky for developers though, because the platform owner can change the rules.

Is Bubble 2.0 going to end the same way as Bubble 1.0?

Microsoft discusses next-gen MSDN … on Facebook

According to this blog post, Microsoft is setting up a buzz group on Facebook to discuss the next generation of its online documentation for developers, the MSDN (Microsoft Developer Network) Library:

We have put a facebook group together to aggregate together the folks who want to work with us to provide feedback, usability and ideas for the next generation of the MSDN Library. We call this project Library 3.0 and we will be organizing events and presentations from this group to bring us together on the project. My goal is build quorum of members over the next months with kickoff’s in late May for the first events.

It’s an interesting place to hold the discussion. Yes, Microsoft has a small stake in Facebook; but it also runs a vast network of technical communities and is doing great business with its Sharepoint collaboration platform. So why use Facebook?

Of course, two key areas that need improving in MSDN are collaboration and search, so you could argue that choosing a third-party platform for collaborating on MSDN itself is significant.

Then again, it’s probably more to do with internal red tape. What’s easier: getting corporate agreement on some new developer relations initiative and setting up the infrastructure, or just sticking a new group on Facebook?

If you are interested, the group is here. Currently it has no content or discussion whatsoever. Not a good start; but there’s time…

Technorati tags: , ,

Help! We’re running a VB3 app and we’ve lost the code

I write a programming column for Personal Computer World. A reader contacted me with a problem. He had an application which he knew was written in Visual Basic 3, but for which he did not have the source code. He now wanted to adapt it to run on Windows Mobile.

VB 3.0 came out in 1993, a mere 15 years ago but an eternity in Internet time. It was hugely popular, partly because it included the JET database engine, the same one as used by Microsoft Access. Both professionals and keen amateurs used it to create little (and not so little) business apps. VB 3.0 is 16-bit, and although these apps may still run OK on Windows XP or Vista 32-bit, though perhaps with a few cosmetic glitches, they will not run on 64-bit Windows, which has no 16-bit emulation layer.

Not many organizations are moving to 64-bit desktops just yet, though they may well do so in a couple of years, but there is still a problem if you need to adapt or port the code.

I thought this would make a fun case study so I wrote it up in the May 2008 column. I tracked down the VB3 decompiler put out some years back by Hans-Peter Diettrich, also known as Dodi. He gave me a demo version to distribute to readers. The app in question turned out to be very simple, and decompiled easily. I then imported the project into VB 6 (because later versions won’t look at VB3 apps), and finally pulled the VB6 conversion into Visual Studio 2008. Once I’d fixed up the Windows version, I created a new Compact Framework solution into which I copied code from the desktop project. Much of the code made it all the way from the VB3 original to the Compact Framework, and ran fine on my IPAQ Pocket PC.

Working with decompiled code is a bit like solving a crossword puzzle. Variable names are mangled so you have to work out what they are for. It won’t be a quick and easy process except in the simplest of cases.

The incident makes me wonder: how many business-critical apps with lost source are out there? Someone posted a cartoon recently which I can’t now track down, but it was a graveside scene. One mourner says to another, “I’m sorry to ask at a time like this, but did he say anything about source code?”

Now it’s Eclipse that has “baroque” code

This provoked a wry smile, from a Reg Dev article on the forthcoming Eclipse 4:

Underpinning all this, though, is an attempt to escape the “baroque” 3.x codebase for something that’s simple, clean and modular. That means eliminating repetition in code and interdependencies found in the monolithic 3.x.

“It’s getting to the point where it’s difficult to reach in and fix a bug without impacting lots of other things,” one e4 committer told EclipseCon.

Now, Eclipse is a child of the refactoring era. It is built using an MVC (Model-View-Controller), component-based, plug-in architecture. Design patterns guru Erich Gamma worked on Eclipse and on its Java Development Tools.

If Eclipse is now a ball of spaghetti, what went wrong? Though its possible the problems are being over-stated in an effort to justify version 4.

Technorati tags: , , , ,