Parallels

Posted on July 30th, 2008 in Software, Development, Commentary by Administrator

I believe it was the Pragmatic Programmers that advocated learning one new programming language a year. I never quite agreed with the timeline but the sentiment isn’t wasted on me. In keeping with this I’ve recently started trying to pick up Smalltalk. This isn’t my first effort to do so but my first effort floundered on the ugly and impenetrable nature of Squeak (I know, I’m completely shallow).

There’s much to admire in Smalltalk and its easy to see the huge influence it’s had on Ruby. The brevity of the language itself means that using it can initially be a little confusing but the approach taken is sensible enough and, once the basic principles are understood, the language itself isn’t too difficult to read. Unfortunately it’s also easy to see why it langishes so far down on the language popularity tables. I’ve already mentioned the impenetrable nature of Squeak but, as I’ve since discovered, its not just the Squeak implementation that suffers from this. I found the language as a whole very difficult to get a grounding in and there just isn’t a ‘one stop shop’ that provides a good place for developers new to the language.

One point that really fascinated me about Smalltalk was its development environment. This is a radical departure from the tools and processes usually used for other languages. There is no write source, compile source to binary, execute binary cycle for Smalltalk - well, actually, there is but its all wrapped up in the Smalltalk environment. This isn’t like a straight forward IDE, although it does provide some facilities you’d expect from a standard IDE like debugging. Smalltalk development is done in a ‘live’ environment. When working in Smalltalk you’re already in a running application and the code you create is added to that application. Being a dynamic language you’re also able to query and interact with the objects that make up the environment itself. This means there is a great deal of immediacy in working with Smalltalk but also means that it’s very easy to mangle this very same environment (something I’ve managed to do a few times already).

This kind of live environment got me thinking. Smalltalk has been around for some time and I’m not aware, to the limits of my experience, of any other language that has adopted this approach. It did, however, bring to mind a more recent phenomenon - VPS and cloud computing. The rise of the usage of VPS and especially within a cloud computing environment tends to mirror the approach taken by the Smalltalk development. A virtual private server on something like Amazon’s EC2 network is started from an image, the same terminology used by Smalltalk. What you get is a live environment (in this case a running OS) to which you can deploy new functionality. It also possible to damage your instance but it can be saved off as a new image and restarted to get around issues like this - which is exactly the approach taken by the Smalltalk environment.

Is this idea finally getting it’s day in the sun? I don’t see it as impossible that people will start making software available as pre-cut images that can be deployed to a cloud computing environment (in fact this is already the case in terms of getting an image preconfigured to meet specific needs). The extended set of services offered by a complete OS environment would potentially be a huge benefit. Does this offer an alternative view for accessing a development environment?

Scaling For The Future (Of Hardware)

Posted on July 3rd, 2008 in Uncategorized by Administrator

Its been obvious for quite some time now that multicore CPUs were the hope for expanding computing capacity now that upping clock speeds on chips has reached a point of diminishing returns. The unfortunate thing about this, as is bemoaned in this article is that the software industry is currently rubbish at supporting these future hardware environments.

For a number of decades commercial and open source software development has been squarely aimed at exploiting a single processor. Parallel processor machines, for a very long time, were expensive and general reserved for servers or machines support multiple users. This is all changing and software development is going to have to change to keep up.

Now I think I’ve mentioned before that there is niche opening up here for tool developers. Those who can provide libraries and facilities that simplify the process of exploiting multiple cores have the potential to make a serious amount of money, especially in the initial period during which software development is making the transition to multicore platforms (multicore system will eventually become so ubquitous that many of the capabilities and techniques that early pioneers provide will become run-of-the-mill).

There is, however, another perspective on this paradigm shift. The other place that will see the biggest impact from this change will be at the architectural level. Its here that the software architects will stop having to consider creating the monolithic applications of the past that were split internally into well defined threads. The problem with this model, as highlighted by the article, is that we generally don’t develop code that splits workload across multiple threads. Instead we tend to delegate responsibility for a specific task to a single thread.

This has generally worked well until now. It helps minimize issues of shared resources (as a single thread has responsibility for its domain, it can general be given read/write control for the data associated with the domain). The unfortunate truth is that, with more cores coming online, existing applications following this model will see little or no performance benefit. The future, as argued in the article, will require that we start writing software to be exploited by multiple cores simultaneously.

This is no easy task, but then again this isn’t a completely new field either. Threading has been around for some time and there were processes before that. I think the problem is that most software developers start out giving absolutely no consideration to scaling a task (in fact, in some cases, I think they don’t give sufficient consideration to task breakdown and separation of concerns, but thats another topic). This leads to architectural decisions that confine a task to a single thread. This is the mind set we’ve got to break if we’ve to exploit large number multicore hardware to its fullest extent.

MagLev

Posted on June 2nd, 2008 in Software, Development, Ruby by Administrator

RailsConf took place this weekend and it seems one of the biggest (as in most hotly covered) presentations that took place related to MagLev (not much to see at that web site unfortunately because its still at such an early stage). Apparently the MagLev presentation consisted of a demonstration of a distributed OO database and some benchmarks on current performance figures for the MagLev VM.

Being one of the hottest items at the conference has meant that the presentation has received a substantial amount of blog coverage (including this one I suppose). At lot of these posts have conveyed the positive impression the presentation made on the viewers but a few bloggers (see here and here) aren’t so easily impressed. I have to admit these guys make some solid points which basically boil down to…

  • MagLev hasn’t stated its current compatability with Ruby and, therefore, its impressive benchmark figures are essentially meaningless.
  • An OODB isn’t bringing anything new to the table. Indeed OO database have been around for quite a while and have consistently failed to live up to their hype.

While, at a fundamental level, these things are true I don’t believe that MagLev is at a sufficiently advanced stage to justify levelling these criticism against it. MagLev has been running on quiet so, as far as I know, theres not a great deal known about it but a few things that are known include…

  • The project has been in the works for less than half a year (the Ruby aspect of it at least). This isn’t a particular long period of time.
  • The work is based upon a mature Smalltalk virtual machine (its been worked on for around 2 decades from what I gather).
  • The OO database side is based on a product call GemStone which, again, is mature and in practical and commercial use.
  • It seems that the intention is to offer some of the MagLev elements as open source while others will be proprietary.

What I take from these facts are that the MagLev system is still young but seems to be building on a pretty solid foundation. The OO database side of things may not find universal application but it does offer an alternative to the standard RDBMS and its always good to have choices. The MagLev people may not yet be making any claims with regards to Ruby compatability but they have voiced a commitment to this and its early days yet. The underlying virtual machine was specifical designed to work with dynamic languages and, while it has required some tweaking to handle Ruby, its had a lot to time to iron out kinks and maximize performance (more time in fact than JRuby or Rubinius) so maybe the performance claims aren’t that outrageous.

The commercial licensing of the virtual machine may offend some but you don’t have to pay for it if any of the existing free choices fulfills your needs. On this last point I’d have to say its case of wait and see what the costs are before criticizing the decision. If they are able to maintain the order of magnitude speed increase in the finished product it may be more than worth paying for.

Ruby is at a very healthy stage in its life cycle, with at least a half a dozen competing implementations to choose from (MRI, YARV, JRuby, Rubuinius, IronRuby and MagLev). Personally I can’t see all of these surviving but many of then fit into niches that I can appreciate. For example JRuby or IronRuby can be used to leverage existing Java or .NET code bases. I can easily see a niche for MagLev in the commercial or large scale deployment arena if it lives up to its promises. I just don’t think that the MagLev project is at an advanced enough stage to be levelling such strong criticism against it.

Cloud Watching

Posted on April 23rd, 2008 in Software, Commentary, Business, Technology by Administrator

Techcrunch has some articles on Microsofts announcements of their Mesh computing platform and their internal realignment along “everything via the web” lines (see here and here specifically). I find it kind of ironic that this is, in part, a move by Microsoft towards platform independant software but I won’t dwell on that particular point.

This has gotten me thinking for other reasons. Obviously this is another step down the widely predicted distributed computing path but I’m unclear as to what the future is for this in terms of personal computing. I’ve got a sneaking feeling that this uncertainty also holds opportunities. I can see why there could be a market for corporate data centres making use of distribute, as-you-need-it processing capabilities but I currently don’t see any reason for individuals to need this (well, not in any great numbers).

So, there’s currently no reason to sell individuals slots on distributed computing systems but that doesn’t mean I can’t envision offerings that would create such a market. For example, I could see a financial monitoring service that was keeping real time tabs on markets, deals and news items to aggregate the data and generate reports and forecasts. Alternatively I could see a music service that makes recommendations based on profiling of a users existing tastes (even down as far as profiling the music itself and offering similar tracks - we can be so predictable in our tastes!). Both of these might require substantial computing power and could take time to run which would mean that it might be better to let them run as a background process that occasionally reports back to the user.

An issue I can see, and one I’ve commented on before, is the fact that I personally think their will be a deep reluctance among individuals to have their personal details stored on-line. With the current high profile of identity theft and government based data loss in the UK I can’t see people rushing to trust others with their personal information. Yet data is seen as being one of the central pillars of the move to on-line services. I feel that, in the future, if you have any sort of net presence at all, complete anonymitity will be virtually impossible. Having said that though a lot of the data that will be stored on-line about individuals will be the type that is built up over time as opposed to given out en masse. Taking the potential services I mentioned above, these would develop a level of user knowledge over the time that the user was using them. Who owns this kind of information? Well that going to be one of the sticky legal issues that’s going to have to be addressed as well.

If individuals are unwilling to let this kind of data out of their grasp what about corporations? I could see companies being more willing, although I probably wouldn’t go as far as saying enthusiastic, to trust some aspect of their data to an on-line service. It would, however, just take one or two incidents of hacking or data loss for companies to drop this like a hot potatoe.

Visual C++ 2008 Express

Posted on April 20th, 2008 in Software, Development, Commentary by Administrator

Giving into to my periodic need to try out an IDE to see if actually makes me feel productive I downloaded and installed Visual C++ 2008 Express edition. I then tried to get it to build wxWidgets, which it seems to have done with no complaint (although I can’t say whether its actually working or not as I haven’t gotten to try it yet).

Anyway, the next thing I tried was to start a completely new win32 project. “A completely blank canvas for me to work my next master piece upon” I thought as I avidly worked through the project creation wizard. Clicking on the Finish button the wizard created me a new C++ source file with the same name as the project I had created - not always a good idea, but I won’t complain in this instance. What I was horrified to see was the 200 lines of code that the wizard had added to this file. Now I know code generation can be a great tool but I’m not so sure that what was generated reassured me in any way.

Its been a while since I’d played with Microsofts development environment and that was obviously just long enough for me to forget how much I hated the MS approach to C++. For a start why can’t they simply use a standard main function declaration rather than the verbose nonsense that appeared in my generated file. Now I’m sure they had their reasons for it originally but I’m just unable to feel that it was justified now or then.

To make matters worse the MS style of coding always favoured type definitions all in upper case letters, which makes them fun to read with all of the macros that they like to include too. You always get additions to your function declarations too, like CALLBACK or (this one is new on me) APIENTRY. I’m sorry this is just clutter. C++ is a complicated enough language without someone taking the liberty and putting a few more “adornments” on it.

The final nail in the coffin for me was the globals section at the top of the file for the application instance reference, title bar text and main window class name. Were all the Microsoft developers sick the day they taught that global variables are, in general, a bad practice? If not, why do they feel these are needed? Why encourage the perpetuation of a bad practice?

The only glimmer of hope I have is the apparent rumours on the Internet that the next version of Windows will be a complete break from the last, ending the long running efforts to maintain backward compatibility. Hopefully they will take this opportunity to wipe the slate clean on the API front too and support more standard C++ practice (BOOL?, sorry don’t you mean bool?) and drop the noisy macro definitions and function declaration prefixes and go for a simple declaration for main. Well, I guess I’ll just have to live in hope.

The Rise Of The Small Web Based Business

Posted on April 16th, 2008 in Software, Development, Web by Administrator

Its probably glaringly obvious to anyone who keeps half an eye on innovation on the Internet that there’s been a massive boom in start ups offerings web based services. The type of offering being made comes under a number of terms but perhaps the two most commonly used as Web 2.0 or Software As A Service (SaaS).

There are a number of reason for why this has taken off at this current moment in time. Perhaps the primary one is the fact that it has actually become possible. A combination of factors have aligned at just the right time to make this not only a viable option but an attractive one. For instance, tools such as the plethora of frameworks that have blossomed lately (e.g Rails, Merb, Django etc.) have meant that the complexity is assembling a functional on-line application has been greatly reduced. Add to this the fact that the Javascript community finally seems to have gotten its house in order and is producing some fine libraries that plug the cross browser gaps as well as offering best in class functionality (e.g. Prototype, jQuery, ExtJS). The final ingredient in the formula appears to have been the rise of affordable, quality hosting options. If any further encouragement was needed by the pool of potential entrepreneurs (and I really don’t think it was) then the success of sites like 37Signals and the plethora of “big-name” social networking sites has been there to provide it.

So the trend is started but can it be maintained and does its future look rosy? Well, Im no oracle but I can see a number of things that might have an influence on it over the short to medium term. The first is the growing availability of multi-core and multi-processor machines. At the time of writing a dual core machine with 2Gb of RAM can be hired for around £100/$200 a month. Thats not a bad price for what is a potential web server for a small to medium sized application. This situation can only improve with servers containing 4 and 8 cores likely to be available a reasonable prices before the end of the year. The competition between the likes of Amazon, with its EC2/S3 offerings, and Google, with its Google Apps offering, can only help improve this situation further.

The second source of influence I’m going to refer to isn’t quite so bright. I’m referring here to the current global economic crisis and the on-coming “down turn” that is expected to accompany it. This is something completely out of the control of every day people but has the potential to have a huge effect on many individuals. People are going to lose their jobs and companies are going to be looking for ways to save money. Both of these play into the whole start your own business thing. If your job is likely to disappear taking the risk on a start up suddenly doesn’t look so worrying. If your job is already gone, and finding another is proving difficult, it possible to put the free time this give you to good use working on an idea. Finally, if your idea is a good one and brings benefits it could be possible to sell it back into the big companies.

One thing is obvious at the moment - a lot of the new start ups that have formed recently or that will form in the near future are destined to fail. Having said that, the climate of the next few years might mean that more people are prepared to take that risk and go for it.

Next Page »