Category Archives: software development

Nokia results: hope for Windows Phone?

It is almost one year since Nokia’s dramatic announcement that it would transition its smartphone range to Windows Phone. Today the company released its results for the fourth quarter and for the full year 2011, the first since the release of the the Lumia range of Windows Phone devices. How it is doing?

This is one you can spin either way. The negative view: Nokia is losing money. Sales are down 21% year on year for the quarter and 9% for the full year, and the company reported an operating loss of just over a billion Euro for the year, most of which was in the last quarter.

If you look at the quarter on quarter device sales, they are down in both smart devices and mobile phones. The Symbian business has not held up as well as the company hoped:

changing market conditions are putting increased pressure on Symbian. In certain markets, there has been an acceleration of the anticipated trend towards lower-priced smartphones with specifications that are different from Symbian’s traditional strengths. As a result of the changing market conditions, combined with our increased focus on Lumia, we now believe that we will sell fewer Symbian devices than we previously anticipated.

says the press release. As for Windows Phone and Lumia, CEO Stephen Elop says that “well over 1 million Lumia devices” have been sold: a start, but still tiny relative to Apple iOS and Google Android. Elop cleverly calls it a “beachhead”, but given the energy Nokia put into the launch I suspect it is disappointed with the numbers.

Put this in context though and there are reasons for hope. First, Nokia’s speed of execution is impressive, from announcement to the first Windows Phones in nine months or so. Further, the Lumia (judging by the Lumia 800 I have been using) does not feel like a device rushed to market. The design is excellent, and within the small world of Windows Phone 7 hardware Nokia has established itself as the brand of first choice.

Second, despite the dismal sales for Windows Phone 7 since its launch, there are signs that Microsoft may yet emerge from the wreckage inflicted on the market by iOS and Android in better shape than others. WebOS has all-but gone. RIM has yet to convince us that it has a viable recovery strategy. Intel Tizen is just getting started. If Microsoft has a successful launch for Windows 8, Elop’s “third ecosystem” idea may yet come to fruition.

Third, Nokia has already shown that it is better able to market Windows Phone 7 than Microsoft itself, or its other mobile partners. Lumia made a good splash at CES in January, and the platform may gain some market share in the influential US market.

Nokia is not just Windows Phone though, and even if its smartphone strategy starts to work it has those falling Symbian sales to contend with. It will not be easy, even taking an optimistic view.

Nor will it be easy for Windows 8 to succeed in a tablet market owned by Apple at the high end and by Amazon/Android at the low end.

Why Microsoft is scrapping the MIX conference

Microsoft is scrapping its MIX conference, according to General Manager Tim O’Brien:

we have decided to merge MIX, our spring web conference for developers and designers, into our next major developer conference, which we will host sometime in the coming year. I know a number of folks were wondering about MIX, given the time of year, so we wanted to make sure there’s no ambiguity, and be very clear… there will be no MIX 2012.

O’Brien says that MIX started in the aftermath of the 2005 PDC because:

there was a lot of discussion around our engagement with the web community, and how we needed a more focused effort around our upcoming plans for Internet Explorer, the roadmap for our web platform, the work we were starting on web standards (we were shipping IE6 at the time), and so on.

That is not quite how I recall it. PDC 2005 was the pre-Vista PDC, no, not the “three pillars of Longhorn” in PDC 2003, but the diluted version of Longhorn that was actually delivered as Windows Vista. One thing Microsoft really did get around this time was that design mattered. Apple had cool design, Adobe had cool design (and a strong grip on the designer community), but Microsoft did not.

Windows Presentation Foundation (WPF) was intended to win designers to the Windows platform, with its graphically-rich and multimedia-friendly API. In order to do this, the company needed to win designers over to the idea of using Expression Blend rather than Adobe Flash and Photoshop.

This was doubly true when Microsoft decided to bring WPF to the browser in the form of Silverlight, a decision that was announced at PDC 2005 and expanded on at the first MIX in 2006.

One of the things I recall at the first and second MIX events were groups of bemused Flash designers who had been bussed in by Microsoft to enjoy the lights of Vegas and learn about Blend.

General web authoring was a factor as well, as Microsoft sought to bring Internet Explorer back on track and to persuade web designers of the virtues of Microsoft’s web platform.

I enjoyed the MIX events. They were small enough that you could easily get to speak both to attendees and to the Microsoft folk there, and once you allow for the fact that Vegas is Vegas, the atmosphere was good.

As an attempt to appeal to designers though, MIX was a failure. It was all too forced; many of the people attending were developers anyway; and Microsoft itself included more and more developer content in ensuing MIX events.

The 2010 MIX was hijacked by Windows Phone 7, an interesting topic but drifting far from the original intentions.

It comes as no surprise to hear than MIX is no more. It is associated with WPF and Silverlight, neither of which are now strategic for Microsoft in these days of Windows 8 and the Windows Runtime (WinRT).

That said, Microsoft still has difficulty appealing to designers.

What next then? O’Brien says:

we look ahead to 2012 and beyond, the goal is to ensure that global Microsoft developer events are of the caliber that many of you experienced at BUILD last September, in addition to the thousands of online and local developer events we host around the world to support communities and connect directly with developers. We will share more details of our next developer event later this year.

image

PHP Developer survey shows dominance of mobile, social media and cloud

Zend, a company which specialises in PHP frameworks and tools, has released the results of a developer survey from November 2011.

The survey attracted 3,335 respondents drawn, it says, from “enterprise, SMB and independent developers worldwide.” I have a quibble with this, since I believe the survey should state that these were PHP developers. Why? Because I have an email from November which asked me to participate and said:

Zend is taking the pulse of PHP developers. What’s hot and what matters most in your view of PHP?

There is a difference between “developers” and “PHP developers”, and much though I love PHP the survey should make this clear. Nevertheless, If you participated, but mainly use Java or some other language, your input is still included. Later the survey states that “more than 50% of enterprise developers and more than 65% of SMB developers surveyed report spending more than half of their time working in PHP.” But if they are already identified as PHP developers, that is not a valuable statistic.

Caveat aside, the results make good reading. Some highlights:

  • 66% of those surveyed are working on mobile development.
  • 45% are integrating with social media
  • 41% are doing cloud-based development

Those are huge figures, and demonstrate how far in the past was the era when mobile was some little niche compared to mainstream development. It is the mainstream now – though you would get a less mobile-oriented picture if you surveyed enterprise developers alone. Similar thoughts apply to social media and cloud deployment.

The next figures that caught my eye relate to cloud deployment specifically.

  • 30% plan to use Amazon
  • 28% will use cloud but are undecided which to use
  • 10% plan to use Rackspace
  • 6% plan to use Microsoft Azure
  • 5% have another public cloud in mind (Google? Heroku?)
  • 3% plan to use IBM Smart Cloud

The main message here is: look how much business Amazon is getting, and how little is going to giants like Microsoft, IBM and Google. Then again, these are PHP developers, in which light 6% for Microsoft Azure is not bad – or are these PHP developer who also work in .NET?

I was also interested in the “other languages used” section. 82% use JavaScript, which is no surprise given that PHP is a web technology, but more striking is that 24% also use Java, well ahead of C/C++ at 17%, C# at 15% and Python at 11%.

Finally, the really important stuff. 86% of developers listen to music while coding, and the most popular artists are:

  1. Metallica
  2. = Pink Floyd and Linkin Park

Wow.

The mystery of unexpected expiring sessions in ASP.NET

This is one of those posts that will not interest you unless you have a similar problem. That said, it does illustrate one general truth, that in software problems are often not what they first appear to be, and solving them can be like one of those adventure games where you think your quest is for the magic gem, but when you find the magic gem you discover that you also need the enchanted ring, and so on.

Recently I have been troubleshooting a session problem on an ASP.NET application running on a shared host (IIS 7.0).

This particular application has a form with some lengthy text fields. Users complete the form and then hit save. The problem: sometimes they would take too long thinking, and when they hit save they would lose their work and be redirected to a login page. It is the kind of thing most of us have experienced once in a while on a discussion forum.

The solution seems easy though. Just increase the session timeout.  However, this had already been done, but the sessions still seemed to time out too early. Failure one.

My next thought was to introduce a workaround, especially as this is a shared host where we cannot control exactly how the server is configured. I set up a simple AJAX script that ran in the background and called a page in the application from time to time, just to keep the session alive. I also had it write a log for each ping, in order to track the behaviour.

By the way, if you do this, make sure that you disable caching on the page you are pinging. Just pop this at the top of the .aspx page:

<%@ OutputCache Duration="1" Location="None" VaryByParam="None"%>

It turned out though that the session still died. One moment it was alive, next moment gone. Failure two.

This pretty much proved that session timeout as such was not the issue. I suspected that the application pool was being recycled – and after checking with the ISP, who checked the event log, this turned out to be the case. Check this post for why this might happen, as well as the discussion here. If the application pool is recycled, then your application restarts, wiping any session values. On a shared host, it might be some else’s badly-behaved application that triggers this.

The solution then is to change the way the application stores session variables. ASP.NET has three session modes. The default is InProc, which is fast but not resilient, and for obvious reasons not suitable for apps which run on multiple servers. If you change this to StateServer, then session values are stored by the ASP.NET State Service instead. Note that this service is not running by default, but you can easily enable it, and our helpful ISP arranged this. The third option is to use SQLServer, which is suitable for web farms. Storing session state outside the application process means that it survives pool recycling.

Note the small print though. Once you move away from InProc, session variables are serialized, not just held in memory. This means that classes must have the System.Serializable attribute. Note also that objects might emerge from serialization and deserialization a little different from how they went in, if they hold state that is more complex than simple properties. The constructor is not called, for example. Further, some properties cannot sensibly be serialized. See this article for more information, and why you might need to do custom serialization for some classes.

After tweaking the application to work with the State Service though, the outcome was depressing. The session still died. Failure three.

Why might a session die when the pool recycles, even if you are not using InProc mode? The answer seems to be that the new pool generates a new machine key by default. The machine key is used to encrypt and decrypt the session values, so if the key changes, your existing session values are invalid.

The solution was to specify the machine key in web.config. See here for how to configure the machine key.

Everything worked. Success at last.

Top languages on Github: JavaScript reigns, Ruby and Python next

I cloned a github repository today, and while browsing the site noticed the language stats:

image

Git was originally developed for the Linux kernel and is mainly for the open source community. I was interested to see JavaScript, the language of HTML 5, riding so high. PHP, C and C++ are lower than I would have guessed, Ruby and Python higher.

Here are some figures for the venerable Sourceforge:

Java (7,163) 19%
C++ (6,449) 17%
C (4,752) 13%
PHP (3,521) 10%
Python (2,694) 7%
C# (2,481) 7%
JavaScript (2,011) 5%
Perl (1,138) 3%
Shell (757) 2%
Visual Basic NET (688) 2%
Delphi/Kylix (581) 2%

This comes with a health warning. I have taken the figures from the what you get if you browse the directory and drop down Programming Languages; but the total is only about 37,000, whereas Sourceforge hosts around 324,000 projects. I am not sure what accounts for the discrepancy; it could be that language is not specified for the other projects, or they are dormant, or some other reason. But I hope the proportions indicate something of value.

Github is madly trendy, and Sourceforge ancient, so this tells us something about how open source activity has shifted towards JavaScript, Ruby and Python, and away from Java, C/C++ and C#.

Of course the overall picture of programming language usage is quite different. For example, you can get some kind of clue about commercial activity from a job board like indeed.com, which currently has 77,457 US vacancies for Java, 22,413 for JavaScript, and only 5030 for Ruby.

Nevertheless, interesting to see what languages developers on Github are choosing to work with, and perhaps an indicator of what may be most in demand on the job boards a few years from now.

Finally, looking at these figures I cannot help thinking how short-sighted Microsoft was in abandoning IronPython and IronRuby back in 2010.

Trying out nide – a cloud IDE for Node.js

I was intrigued by reports of nide, a web-based IDE for Node.js. It was one of the entries in the Node.js Knockout challenge last summer.

So how do you install it? One line on Linux; but I did not want to put it on my web server and I re-purposed my spare Linux machine last year after one of my other servers broke.

I decided to run up a Debian install on a Hyper-V server that has a little spare capacity.

image

I then followed the setups here for setting up Node.js and npm (Node Package Manager). I also installed nginx which I have been meaning to try for a while. Linux on Hyper-V works fine, though you have to use a “Legacy” network adapter which compromises performance a bit, unless you are willing to tackle installing Microsoft’s Hyper-V integration components for Linux, which do not support Debian though it is said to work. I do not need a GUI and the legacy network adapter is OK for this.

Everything works OK, though I found that nide does not work in Internet Explorer 9. I used Google Chrome, which makes sense I guess since the same JavaScript engine is used by Node.js.

Nide is a simple affair which is essentially a file manager. Projects are displayed in a tree view, and you select a file to view or edit it. The icons at the bottom left of the screen let you create and delete files and folders.

image

The smartest feature is version management. Files are saved automatically and you can easily compare versions and revert if necessary. The “Go backward in time” button shows that auto-saves are quite frequent.

image

There is also a GUI for npm built-in. Pretty good for a competition entry, though I had a few problems.

If you are interested in web-based IDEs, another interesting one is Orion, an Eclipse project.  Executive Director Mike Milinkovich says Orion will ship a 1.0 release later this year.

image

What is the best way to choose a development tool?

Research company Evans Data sent me a link this morning to its new Tool Grader service. This is a simple web application for reviewing and rating software tools. The same tool may rated separately rated for different platforms. For example, there is one entry for Eclipse under UNIX/Linux, and another separate one under Tools for Mobile.

I took a quick look and rate the site mostly useless. There are not many reviews, and most of the reviews are of little value, for example “This Is The Best Programming Tool i Have Ever Used,” from somebody who says that Eclipse “Must be used as a competitor for Java.”

image

The site would improve of course if a lot of people were to use it; but currently there is little incentive to do so, since most developers will take one look and never return. Evans Data could do better; it has a ton of data from surveys it has conducted and if it were to take some of the more useful data from those reports and integrate it with the Tool Grader the site would be more valuable. It will not do that I guess because its business model is to sell those reports, and because it would be a lot of work.

It gave me pause for thought though. What is the best way to choose a development tool? Part of the problem is that context is everything. The same tool will be great for one purpose and poor for another; it depends what you want it for, especially when it is a multi-faceted product like Eclipse or Visual Studio, both of which are really tool platforms.

If you are looking for information on which tool will be best for your project, I doubt that either Tool Grader or even purchasing an expensive report will help you much. One approach that has value is to install several candidates and try them out, but it takes considerable time and effort. Another idea is to go along to an active community like Stack Overflow, describe your project in some detail including any constraints like “our developers span three continents” or “the boss insists we use Rational ClearCase for source code management”, and ask for opinions from other users.

When I am assessing a tool I always try to visit forums where it is discussed and get a flavour of the types of problems and queries users have. If there is little discussion that suggests the tool is most likely little used, usually a bad thing. If the vendor has no open discussion on its site and emphasises the “contact support” route that suggests a weak community. I also look for potential showstoppers like instability or intractable problems such as difficulty wresting acceptable performance from either the tool or its output.

I do not pretend it is easy though. Tool choices are important because they have a significant impact on productivity, and it is hard to change your mind once you and your team have invested money, skills and code in a particular product.

Holiday season free giveaway: a must-read for developers

Among my top books for 2011 is this one by Jez Humble and David Farley. I reviewed it here, and it also sparked some discussion of what is the difference between the various continuous software development/deployment models.

I have a spare copy of this book to give away. All you need to do is comment to this post with a valid email address – this will not be posted or used for any other purpose, but I will use it to request your address if you win. Please do not include an URL as it risks being dumped in the spam bucket!

On  January 6th I will select a winner at random. I will post to anywhere in the world.

Update: I have selected a winner. To do so, I used Java’s Random class to generate a number between zero and one less than the number of comments. The number it came up with was 4, so the winner is Ian Smith, the 5th person to comment. Congratulations!

 

Adobe: why the big business shift when financial results look so good?

Adobe released its quarterly and full year results last week; I am catching up with this now after a week in China.

The company is doing well. Revenue is up by 11% year on year and it generated $1.5 billion in cash. It is buying back shares, usually a sign that a company has more money than it knows what to do with.

Here is the comparison with the equivalent quarter last year:

  Q4 2010 Q4 2011
Creative and interactive 404.8 437.2
Digital Media 165.9 186.4
Digital Enterprise 273.3 342.4
Omniture 109.0 131.1
Print and publishing 55 55.1

In other words, all business segments grew – impressive in uncertain economic times. See this earlier post for a rough breakdown of the segments.

A couple of observations. First, Adobe is benefiting from the big trend in IT towards web, cloud and device. Many companies regard apps (as in mobile apps) as vehicles for marketing, and Adobe’s tools are a natural fit, with or without Flash. We are in a more design-centric IT world than was the case a few years back, driven by Apple, SEO (Search Engine Optimisation), and just because we can: technology now performs basic computing functions with ease so design becomes the key differentiator.

Adobe is nevertheless remarkable in the way it has managed the transition from print to digital. Few companies manage that kind of fundamental shift in their market successfully.

The other point that interests me is why Adobe announced a major change in its business model in November. Digital media and marketing will be the focus, while it winds down its enterprise development platform, as well as moving away from Flash and focusing on HTML5 for delivery.

Unless the announced figures disguise future problems that are only visible on the inside, this move was driven by bad results. Digital Enterprise, which includes the middleware business, increased revenue by 25% over the same quarter last year.

In 2012 the Digital Enterprise segment is being renamed Digital Marketing Solutions, expressing the company’s intent.

Adobe’s change of direction caught me by surprise, as it was not really flagged at the MAX conference the previous month, though there was evidence of struggle with regard to Flash versus HTML5.

I would describe Adobe’s moves as bold. Taking action ahead of when it becomes inevitable is a good thing, but there are significant risks. Adobe’s platform is all about synergies, and chopping off bits that still have a significant following may have unexpected consequences.

Another curious facet of Adobe’s move is that its normally excellent PR department has done little, as far as I am aware, to brief the press. Major news concerning what will be donated to Apache, or the discontinuation of Flash Catalyst, has emerged from sporadic reports instead. Normally that is a sign of a company under stress, rather than one which is about to deliver excellent results.

I guess this time next year we will have a clearer picture.

Android: good or bad for Java? Oracle claims harm but I am sceptical

Patent blogger Florian Mueller quotes a statement filed by Oracle in its legal dispute with Google over its use of the Java language in Android:

Android’s growth in the mobile device market has been exponential, steadily diminishing Java’s share. For instance, Amazon’s newly-released Kindle Fire tablet is based on Android, while prior versions of the Kindle were Java-based. Android has been gaining in other areas as well, with Android-based set-top boxes and even televisions appearing this year. These are markets where Java has traditionally been strong but is now losing ground to Android. The longer Android is allowed to continue fragmenting the Java ecosystem, the more serious the harm to Java becomes, and the more difficult it is to try to unwind. Oracle suffers harm in the form of lost licensing opportunities for its existing Java platform products, and the enterprise-wide harm from fragmentation of Java, which reduces the ‘write once, run anywhere’ capability that has historically provided Java such great value.

The Kindle is an interesting example. I had not realised that the pre-Fire Kindle runs Java, but Oracle shows it as a case study and indeed, here are the javadocs.

Android infuriates Oracle because it uses the Java language, but has its own virtual machine called Dalvik. Dalvik bytecode is different from Java bytecode.

I have no expertise on the legal position, but while I can see Oracle’s point it is also true that Android has greatly boosted interest in Java development. Although Google has fragmented Java, the fact that the language is the same benefits Oracle insofar as it increases the pool of Java developers who may also be inclined to create Java applications on the server or in other contexts.

The interesting question to ask is where Java would be without Android. On mobile, it would likely be close to death. Apple’s iOS platform is equally as resistant to Java as to Adobe Flash. RIM Blackberry used to be a Java platform, but is moving away:

While we will continue to support our BlackBerry Java developer community as they build for BlackBerry smartphones, after further investigation we decided against supporting BlackBerry Java on BlackBerry BBX. We concluded that the BlackBerry Java experience on the BlackBerry PlayBook platform would ultimately not satisfy us, our development community, or our customers as the platform continues to evolve.

Microsoft has no interest in Java on the Windows Phone OS or in the Windows 8 OS that will likely replace it on devices.

Oracle’s claim is in the context of a legal dispute, and as Mueller observes, the company is happy to show off growing interest in Java in its press releases – though without mentioning the A word.

Of course you can understand why Oracle might want to enjoy the benefit of Java’s Android boost as well as the reward of a legal victory over Google.

PS: interesting that Oracle’s Java press release seems to be served by Microsoft .NET:

image