Software development

You are currently browsing the archive for the Software development category.

I’m sure I’m not the first person to notice that JavaScript really doesn’t have the server side presence it deserves.

It was amongst one of the first scripting languages, it’s got a standardisation committee, it’s a powerful dynamic language, it’s widely used on the client side. So what’s gone wrong?

I think that there’s no single reason, but a bunch of important ones.

  • It doesn’t have mod_javascript. This is a biggie. Yes, there’s Rhino, but this is based on Java. If we wanted Java, we’d just use Java. And I’m sure that Spidermonkey can be used on the server side, but it should be embedded in an Apache module.
  • It’s never had a strong central location/destination. PHP has PHP.net for instance.
  • Also it helps to have a body or person who is tasked with promoting the language. PHP has Zend. Perl has Larry Wall. C++ Has Bjarne Strousup. JavaScript has ??? Where is the Javascript Foundation? [Update: On reflection, I'm being slightly unfair here - Brendan Eich was JavaScript's creator. What I'm trying to say is that he's not very interested in marketing JavaScript.]
  • It’s never had a great collection of scripts. Perl has CPAN.[There is now an effort in this direction - JPAN]
  • It gained a reputation for difficult-to-use on the client side. That’s to do with all the versions, the incompatibilities between browsers and the fact that objects can be altered.
  • The client side problems has given it a bit of a reputation as a security pitfall. Especially true in Microsoft environments.
  • It’s never had a really important server side project to show what it’s capable of. See Ruby on Rails to see what this has done for Ruby.
  • It’s not quite elegant. The way that Ruby is. But the new spec is moving in that direction.

There’s still a chance for JavaScript. There’s a compelling argument for using the same scripting language on the client and server. However it faces some strong opposition because so many other languages have a stake in serverside development now. If it has a hope of resurrection each of the items in this list need to be tackled.

I said that the next article would look at Simon Phipp’s ideas about the open source cycle in more detail, but instead there’s a small interlude because last night I heard Steve Cook from Microsoft talk at one of a series of British Computer Society Software Practice Advancement meetings in Cambridge.

Steve is one of the software architects working on Visual Studio. His work concerns Software Factories and his talk, which I thought was spectacularly good, was titled ‘Software Factories: Assembling Applications with Patterns, Models, Frameworks and Tools’.

Like all good talks his was absolutely jam-packed with ideas. A sort of brain-dump. He has obviously been thinking a great deal about the area for years, and it showed. Unfortunately I was so captivated by what he was saying that I didn’t keep good notes, so what follows is from memory. At some point I may have the slides from the talk, and I’ll update this. In the meantime, Steve, I apologize if I’ve mis-represented anything you said or missed out some important points.

He started with the thesis that software development needs to (and is) moving away from artisanship towards something better. He spoke a bit about the phases that other industries have moved through (artisanship, mass production, continuous improvement and mass customisation) and tried to draw parallels with the software industry. It’s an idea I agree with in part, although I thought the analogies he used were misleading; the software industry spends most of its time and effort in the product development phase of a product lifecycle, in contrast to most other industries where production is the part that takes most effort. Despite this, I agree that there’s a clear trend towards using higher and higher abstractions in order to allow us to accomplish more. And Steve’s ideas are all about the ways in which we can accomplish this; through Software Factories.

Next he looked at what a Software Factory has to accomplish. He presented a convincing case that in order to effectively use knowledge it had to be readily available at the point of application. Many (possibly most) re-use programs fail because finding and re-using the knowledge is harder than rebuilding the component, for instance. Corporate standards often fail because the the group mandating the standard has no power or mechanism by which to lever the standard at the time and in the place when the standard would be beneficial; the first thing that developers inside corporations when presented with a new project do is not to open their book of corporate rules. They open an editor. Steve convincingly showed that for re-usable knowledge to be successful in practice, tools that understood the context of your work were necessary. You only want GUI design guidelines to be on hand when you are designing a user interface. You only want coding guidelines when you are writing code. Your viewpoint provides the context.

Next he looked at how we could provide knowledge, and here we have to take a little leap-of-faith: Steve thinks that little domain-specific languages are the way that we can codify and re-apply knowledge. He gave an example of a domain specific language which modelled phone billing. He showed a model for the process, and demonstrated conceptually how a domain specific language could be used to capture the points of variability between several product lines, for instance. To produce each application, you would vary the input to your domain-specific language model, use this to generate code, and the code would plug into the framework for your application, the framework being the part that doesn’t vary. For the phone example, using the domain language you could generate many billing systems – each of which would be suitable for type of customer using a particular phone payment plan.

Of course you can use more than one domain specific language in the same product line, each controlling a particular aspect of the product line.

In the last part of his talk, Steve looked at a tool that his group has built to help with all of this. They have an add-on to Visual Studio which helps you to design domain specific languages and matched code generator, suitable to your application. One lovely feature of their tool is that it’s the embodiment of a domain specific language used to describe domain specific languages; they have bootstrapped themselves.

In the closing minutes of his talk, Steve walked through some examples of their tool in action. I think that one of the examples was that if you worked in a bank you might use this tool to capture the knowledge of the variability between account types. This would allow people building applications to embed this knowledge in their work; building applications which automatically correctly manipulated the state of a bank account, and knowing with more certainty that the operation was correct because the code was generated using a proven domain language for describing bank accounts and transactions.

If you use Visual Studio, you can download a beta of their tool here. There’s also wealth of other information about the ideas.

I’ve seen the tools listed on the VS site, and before now and had a quick look. I wrote them off as uninteresting. I was wrong. I misunderstood the potential power that they have to help companies with particular types of projects.

I came away from the talk quite elated; the ideas seem to me to be one (meta) step beyond object libraries, and potentially very useful for certain classes of applications. I think that they represent an important step towards being able to automate the repetitive parts of software development, and an excellent way to allow you to capture knowledge, and reuse it.

In the ending moments of Steve’s talk, I was struck by the smartness of the ideas. It occurred to me that this is the sort of thing that open source doesn’t often produce, but which it should. I think that the reasons have to do with economics. More about this next time…

A long time ago, I got the chance to go to the Grand Canyon. It’s pretty amazing, I don’t really have the words to describe it adequately. It’s just amazing…at points it’s 10 miles from edge to edge, with a near vertical drop-off to the bottom. It’s huge. But at some places you can look across to the horizon and see flat land stretching outwards, then when you take a few more steps and see that there is an enormous chasm between you and the edge of the world.

Software seems like that to me at the moment.

We’ve discovered the power of the Internet, and being connected. We’ve discovered that we can devise new applications for groups of people, that we can aggregate information for something larger than the individual bits. We’ve found out that being able to access information from anywhere is hugely useful.

But our desktops and the Internet are two completely separate software worlds.

If we build a web-based system then it’s accessed through a browser and can’t interact with our desktop.

If we build a traditional bit of software then it has to be installed to be used, and it will be subject to platform quirks and problems with particular configurations.

There’s a chasm between the two worlds.

AJAX and Web 2.0 is better, but at the root it’s an attempt to make the browser behave like the desktop. And it’s subject to it’s own problems. Nevertheless, I think that this is a step towards the solution.

Here’s what I want:

  • I want to be able to make applications that are client-server in nature;
  • They should expose a web interface for when I’m not at my PC;
  • They should have a federated data-store behind them; that is, there is some data I don’t want to expose to the Internet but the data that is exposed to the net should be part of a bigger whole, rather than a copy. Alternatively if the data exposed to the net is a copy, then syncronisation should be 99.9% automatic;
  • I want to be able to run any application without being connected to the Internet, maybe with reduced functionality;
  • I want my applications to enjoy all the benefits of normal desktop interaction; the granularity of actions should be small; I don’t want to think of the world in pages, and I do want to be able to drag and drop;
  • I want to be able to try applications without an install. I’m willing to install if I decide that something is useful.
  • I want security; I don’t want my PC open to crackers.

Mostly, this vision is already achievable. (Microsoft is calling this sort of app a smart client.) But it takes hard work because you have to build the infrastructure by hand. In fact, most of the infrastructure is re-usable and should be abstracted into a tool and framework.

Now there are two or more environments that are partly suitable:

  • Java. Can run on the desktop. Can run on the server. Can run on multiple platforms. Can deliver responsive apps – witness Eclipse. But there’s no easy way to build dual-headed apps that I know of. Do you know of a way? There’s the ability to run from the web with Webstart.
  • .Net. Can run on many versions of Windows. Runs on client. Runs on server. Has good integration. Can build dual-headed apps. But it’s not great for delivering software if you don’t want the source to be readable. Granted you can get an obfuscator, but a industrial-strength obfuscator should be part of the basic package. A big downside: you need the giant 20MB runtimes to be on the client machine. There is no linker available as part of the MS package which would reduce the size of most apps and allow you to ship a single file, but you can buy one from Remotesoft. And lastly, .Net isn’t big on platforms other than Windows.

I’m sure that there are other ways of doing this too; for instance, if you install the PHP and GtK runtime on the client then you could use PHP locally and remotely. But other solutions are less integrated.

Overall, I don’t think that either of these solutions are great. It seems like it’s going to be write-n-times for a while.

This is a rant. I try not to rant usually, but I’ve been driven to distraction. 

For those who don’t know, Drupal is an open source content management engine. I’ve been working on a web site which has been built using Drupal. I’ve gotten pretty deep into the Drupal code, and for the most part it’s pretty well designed.

For those of you who are interested, it’s built around a callback model that allows you to introduce new modules. When you build a module it must provide a standard set of callback functions named in a particular way.

One thing that makes Drupal good is that it has a set of coding standards for code that is included in core Drupal or accepted as a module. (There are lots of modules to download.)

But what’s driving me crazy is the coding standards are not chosen to be readable.

Consider this:

if ($something) {
  if (DoSomething($something)) {
    DoSomethingElse($something);
  }
}

versus

if ($something)
{
  if (DoSomething($something))
  {
    DoSomethingElse($something);
  }
}

Now, I’m convinced that the second is better for several reasons:

  • Whitespace is your friend
  • It’s easier to match brackets
  • God intended code to be readable. Especially when there’s a lot of it in one place.

Unfortunately, Drupal uses the former style. It borrows the styling from the Pear standards. (Pear is a library of PHP functionality.)

I posit that one of the reasons that Pear usage has not exploded has to do with truly crappy coding standards for blocks. 

I keep a ginormous todo document cum notebook cum scratchpad. Over time it’s been in different formats. It’s been a paper document, a text file, a Word document (that was a failure), currently it’s in an app called KeyNote.

I like KeyNote for a bunch of reasons:

  • It’s open source. Not very active, but if I ever want to get involved I could.
  • It sits in my system tray and is always available
  • It instantly saves changes. I don’t need to remember to press Save.
  • It saves all the notes in an open format, with all the notes in one file.

But I’ve got some annoyances and they are growing.

  • I want my notebook available all the time, wherever I am. If there’s a computer I should be able to use it. More about this below.
  • I want a much more dynamic categorisation system. KeyNote uses a tree and that’s good, it can make links. I like the wiki thing that links happen automagically. And I like to be able to tag to make links.
  • I’d like to be able to make portions available to other people.

Available all the time, everywhere. I want a system that works as a local application, but has a web repository and is useable via a web interface. The web interface must be slick. If there’s no internet connection then the software should continue to work. And it should sync up later.

(Actually there’s a general problem here: I want lots of software that has a web interface to the data and a local version which work on common data. It’s a problem that I keep thinking I should address, but there’s not much money in infrastructure. On the other hand maybe the solution could be embedded in a general tool like Dreamweaver embedded web design.)

I found EverNote last week, and I’m trying it out to see if it’s a viable replacement. It pretends it’s a never-ending roll of paper. You write new notes at the bottom, and group them by classifying them with tags.

It’s certainly got some of the features I want and there are lots of good things to recommend it. The basic version is free! (Not the code though.) It’s easy to add stuff. It’s pretty easy to tag. It sits in my system tray. It may be suitable. Sometime in the future it’s going to be able to sync, which suggests that it will be using a repository.

On the other hand, I’m finding the interface a finicky. And not pleasing on my eye. Maybe it’s because I don’t yet know how to use it. But it should be discoverable. Maybe they need a graphic designer on the team.

I had hopes that blogware would do the trick, but it’s not because the focus is on publishing. At least it’s not yet. Maybe things will change. 

So, some market research: If I build the software, is there a market? How many of you are looking for this sort of thing? If you read this, and you think it would be interesting, send me a mail at notebook at tanasity.com. Don’t worry if you are reading this a couple of years after it was written. I don’t expect to be writing the program tomorrow. Tell me what features you yearn for.  

In the last few months there have been a number of buy-outs of, and investments in companies that you wouldn’t normally think were suitable. For instance I saw a few days ago that Konfabulator had been bought by Yahoo.

Why is this happening?

I think that they are strategic investments and that there are several reasons:

  1. To deny talent to the competition
  2. To position for The Next Big Thing
  3. To prepare for Windows Vista

Of the 3, I think that the third is the most important, so we’ll come back to that.

Buying up talent is a great way to blunt the development of companies who are working in the same space as you. There are numerous stories of technology companies going after the people who underpin their competition, offering them large salaries and interesting jobs. Often just before an important product announcement. The right talent is important in businesses based on intellectual property.

When I was at school, I used to avidly read Byte Magazine. I remember techno-lust for new and interesting software and insanely great hardware. And it was always just out of reach. Nothing drives lust more than what you can’t have.

Large companies know very well that they aren’t the likely place for innovative stuff to happen. In a large company, you are driven by ROI, not by tech. Large companies like predictability because so many people have jobs that depend on continued income. Large companies have problems tackling niches; why spend time and effort of highly-paid people on interesting ideas when you can’t immediately show payback. So large companies look for ideas at the right stage of ripeness and either buy out or take the idea and re-implement it. Bet you Microsoft has a desktop blogging tool under development. It’ll probably be delivered as part of Vista and tied to MSN Spaces. (Or maybe they’ve got it, and I just don’t know.)

The last and, in my opinion, most important reason has to do with Microsoft Vista (nee Longhorn). Sometime in the next few years (take those published release dates with a great big dose of salt), Microsoft will release Vista. They might even hit the latest schedule. Software development isn’t easy, so this is not a dig at them – it’s a fact of life. Vista is real enough for companies that depend upon Windows to start thinking about their future. That’s because when people install a new operating system, they expect big changes. You expect stuff to break. You don’t expect programs to stop working when you install fixes and updates. There’s a big transition event that Microsoft can take advantage of to change behaviours.Like maybe Yahoo or Google won’t be your home page in your browsers after installing Vista.

So there’s potentially a direct threat to Yahoo and Google and other companies that depend on Windows. And it’s dependency upon a competitor. That’s bad when they’ve got an opportunity to slip a knife in your back.

So what Google and Yahoo, and other Microsoft competition want is desktop applications that have a large installed base. They should have automatic update built in. They should be a part of users experience, so much so that Microsoft would have huge backlash from breaking them. They should be lightweight, ideally with regular updates. Because if you get shoved off the desktop, you need a mechanism to put yourself back in the right place, and automatic update which doesn’t depend on Microsoft will be the way.

I reckon it’s a key reason why Bram Cohen and Bittorrent managed to raise so much money; they have 45 million users and a hefty percentage of the internet traffic. Microsoft aren’t going to be keen to interrupt that.

Some obvious knock-ons:

Microsoft will probably improve their firewall. They’ll may put scary warnings in place about software contacting a server or downloading. Like imagine if you were working and you got a message that said ‘An unauthorised program is attempting a large download. This could be a virus. Press Stop to halt the download or Just this time to allow this program to continue.’ Most people are not going to be keen to carry on with the download.

There will be more buyouts of this sort of tool.

Google and Yahoo will be giving a lot of money to Mozilla.

Google will try to deliver more apps that integrate with the desktop

It’s a good space to be in for the next year or so.

 

 

One of the (many) things that bug me about software is the disconnect between design, documentation and the software itself. Some developers say that the source code is the documentation – and they’re right – the source code for a program tells you what it does in excrutiating detail. But source code usually doesn’t tell you what the program should be doing, or what the design decisions were when the software was being developed, or the ways that the software has been extended or the background to the problem. Most of these things are held in other documents or peoples’ heads.

That’s very annoying.

The documents get out of date as the program overtakes them. They get lost in the pile. They lose their relevance.

It’s not a new problem. Twenty years ago Donald Knuth came up with Literate Programming. His idea was that you should build the program as part of a narrative and the tools should understand which parts of the document are the program itself and which parts are the documentation. Actually, that’s the ideal, but you can use existing tools with only a little work, by writing a literate program, and then extracting the code and pushing through your normal tools. In Literate Programming this is called tangling.

He and his students built an excellent system, but it has never caught on widely. There are a number of likely reasons:

  • Literate programming introduces a new layer of development and requires discipline
  • IDE’s don’t support the style and the benefits in using an IDE outweigh the disadvantage of not having Literate Programming.
  • It’s not already a standard
  • There aren’t tools that support lots of programming languages, while many projects require the integration of several toolsets
  • The tools that do exist are often rudimentary
  • There’s a lack of comercial support

In the meantime XML has grown up. Now a while back, some smart people realised that a document based SGML or XML was a pretty good way to hold the elements of a Literate Program, the prose and the code. In fact some people went further and realised that it would be quite good if you could include a range of communication elements. Text, graphs, pictures and more

And now we come to OpenDocument. It’s got the markup for just about everything you need in order to create a workable Literate Programming environment, and it has the bonus that if you handled the document through a database-style manager, then you could have best-of-breed software to work on each part; you could write the code in your favourite IDE, the text in your favourite word processor, the diagrams with the most suitable diagram editor.

And everything would still be held in one place, accessible by many tools. With the added benefit that members of a team would all be able to work on the document at the same time.

Anyone interested in the details of what I think needs to go into to this to turn out a product?

 

PhishFighting.com is an excellent idea. It’s aimed at destroying the data that phishers collect by flooding it with false data. 

Whenever you get a phishing mail you copy the URL, and paste it into the PhishFighting form. Then PhishFighting goes to work, posting a new dummy login every 20 seconds or so, for as long as you like.

It’s not a Denial of Service attack if the page is hosted on some unfortunate person’s trojaned computer; it just taints the value of the data collected by phishers, hopefully making their life much, much harder.

Here’s an idea for a great enhancement: wouldn’t it be great if you could get ‘tripwire’ accounts from eBay and banks. Banks would let you generate fake account details – a username and password. You could then feed these to phishers, and when the phishers used a one of these fake tripwire accounts, the business would immediately know that a particular computer had been compromised or was the computer used by someone attempting fraud.

How could this be turned into a business? Perhaps by aggregating the data? If you provided a service to banks; as they got tripwre attempts, they’d send you the details, and you would share the list of all computers with a tripwire against them with the bank.

Potential problem: dial up users have IP address that change regularly, so you couldn’t blacklist indefinately. Otherwise someone  dialing in could find themselves blocked by their bank. Banks and other businesses would have to respond with notices that said that if you were using dial-in, to redial

If you read this and decide to turn it into a service, do keep me in mind when you trade-sale or IPO. 

I listen to Internet radio most of the day. I vary between BBC Radio 4, and music radio. I have eclectic tastes: I listen most often to Radio Paradise, which plays a huge range from Bach to the Pixies and everything in between. I also listen to a bloke who I think plays music from his home PC so that he can listen to it at work. I won’t list the URL here because he only has a couple of streams and I’d really like to continue listening.

For ages I’ve known about AudioScrobbler, which tracks the things you listen to, and can make recommendations. But I’ve never found the time to have a close look. Today on a whim I went to their site. I discovered that the team behind AudioScrobbler have started last.fm which plays exactly the music you like.

All of the time. For everyone.

What a terrific idea!

They are hiring. I have the skills they want, and more. They are in London. For a few moments I seriously considered sending them a CV because it’s exactly the sort of application of social software that interests me and this is going to grow exponentially. I’ll leave it for a few days and the feeling will wear off.

I’m interested in the finances. When you listen to Radio Paradise, they constantly appeal for money. How will last.fm make break even? Maybe they’ll insert personalised ads into the stream?

Russ Beattie has posted an interesting discussion about Anonomity. In it he also links to Emily Chang’s eHub . In other interesting social software news, Ning a playground for social apps comes along. I’ve often thought about ways that the smoothstream/mvclib combo could be extended to do just this sort of thing. I have in mind a kind of building blocks approach to internet apps: “We’ll have this block here, and a login block there, and a messages block there.” The basic concept is easy enough to do in code. The place I’ve stumbled whenever I’ve given it deeper thought is that good applications have embedded knowledge and links. By that I mean that if I write a message with good software, if it includes a date, it should give me the opportunity to add the date to my calendar. These little links make software polished and much more interesting to use. So going back to the building blocks – you get a massive combinatorial explosion if you want blocks to be able to talk to one another. The calendar block needs to understand something about the message block. Now if I add another block type – say a ‘Who is online?’ block, it might need to be able to talk to the other two. And the others had better be able to talk to it – even more difficult because they might have been written before the ‘Who is online?’ block. The classic way to solve this sort of problem is to extract the features into objects, a comms protocol and a registry. So the calendar knows how to deal with date objects, it registers this ability with the registry and indicates what sort of conversation it can have and how to talk to it. It might also look for other blocks that can talk about dates so that it can notify them when dates are involved in a transaction. This is all well and good, but somewhere along the line there still needs to be some wiring telling the components what events are interesting and which aren’t. So for instance if a date occurs in a message header then this isn’t an interesting date for the calendar. But if it’s in the message body then it is. And this knowledge needs to be encoded in the application somehow. So while you’ve partially dismantled the combanatorial explosion, you have completed the job. You still have to have the message block know something about dates, which means you still have to code some special knowledge about dates into the code for the block. It would be fine if it were just dates, but the same is true of any other feature. It might be possible (I’ve never investigated the possibility) to develop a conversation using a basic protocol that automatically makes the links. The solution doesn’t jump out at me – it’s a problem that involves understanding meaning I think, rather than just syntax. You need date objects (or any other object) to be able to discover or learn something about a particular context of use and respond appropriately. Together, the message, the calendar, and dates (with perhaps only a little non-technical input from a user) need to be able to figure out that dates in the message body are interesting, but ones in the header aren’t. The challenge is finding a general mechanism.

« Older entries