Monday, 6 June 2011

Is WPF+Silverlight dead on Windows?

Does anybody still remember WinForms? If you think WinForms is old outdated technology, and WPF is the new and cozy, you might want to go on Youtube and look at the Windows 8 previews. Microsoft was dead serious when they embraced HTML5 and JavaScript last year, HTML5 and JavaScript seems to be the new toolkit for writing GUIs for Windows. In case that you wonder how JavaScript relates to other programming languages, have a quick look at StackOverflow's question on strangest language features. My personal favorite is the one about the JavaScript truth table.

A quick Google search informs, that:

* Microsoft is very quiet on WPF development. I guess they have to be, in order to support the new HTML5 strategy.
* Discussions on blogs about WPF+Silverlight contain a lot of "It will still run on Windows 8" - but not "This is how apps should be built today" or "WPF is still Microsoft's strategy for making Windows 8 apps"

I am not surprised. Microsoft keeps renewing itself, by abandoning old development tools. It has been this way ever since... well... forever. Who knows, maybe they will invent a new paradigm for NUMA cpus, that abandons compatibility with programming languages based on Garbage Collection. Or they will adopt Python and a new version of C++ as their new primary development languages. If you're in doubt whether these statements are jokes from my side or not, don't worry. I'm in doubt, too, and Microsoft does not really explain the choices this time. Explanations don't seem necessary any more, other things are more important, things move on, and "developers, developers, developers" is history.

Interestingly, Delphi 1 source code made in 1996 still compiles with Delphi XE today, with the same GUI forms, and it still outperforms .net and Java on speed, while having a similar complexity level and developer productivity. Now, this is impressive technology.

Thursday, 31 March 2011

OOP Spaghetti code explained

The term "spaghetti code" is usually attributed to pre-OOP code, but there is a lot of OOP code out there that is definitely entangled and a mess. I have seen quite some of it in my carreer, and this kind of spaghetti is characterized by its dependencies.

An class is nothing else than a data structure with associated code, mainly written in a way that puts both into the same source code file. However, if a method for class A depends on a class B, it generates a dependency from class A to class B, no matter if this method is used or not. If class A is about business logic (e.g. "Customer"), and class B is an API thing (e.g. "File"), then the problem isn't that big. A smart compiler can figure out that the method is not used, that there is no active reference to "File", and then maybe not include the File object in the final app. However, if both class A and class B are of the same level in a hierarchy, for instance, if A is "Customer" and B is "Product", then it is usually the beginning of a messy friendship. It doesn't take a lot of these to create a hairball. It gets really bad, if a lower-level class depends to an upper-level class - for instance, if a MySortedListImplementation depends on AppSettings, which depends on Customer.

Wednesday, 30 March 2011

Why startups don't use .net

There have been several articles over the last couple of weeks about the usefulness of .net for startups. I will mention three:

* Did the Microsoft stack kill MySpace?
* Why we don't hire .net programmers
* Why Microsoft could kill your startup career

Even though our company is now several years old, our HQ is still located in an office facility that is mainly for startups. Well over the time we have had many companies, including Microsoft, Mozilla, IHTSDO and a few others, but most of the companies are startups. I recognize the same thing: I have not heard the word .net been used by any of the startups, yet. Would I hire a .net developer? I see no problem with .net, but also no significant value of having it on the resume. There are so many other parameters that are important.

I think the last article describes the problem best: Do large companies use their software engineers well enough? I think most have a problem here. A good software engineer is a serial decision maker, who writes down decisions about how things should be done in an automated way. Seen from the management POV, this is not a deterministic process, but a stochastic process, simply because the human mind is shaped by so many things, that influences the outcome. Many attempts have been made to improve the value generated by software developers, including agile software development processes, better ways to write specifications etc., but often these methods are confined within the software development department. If you want to get problems solved, for real, a larger part of the organization needs to be involved, thinking out-of-the-R&D-box must be allowed, and innovation must be rewarded.

Is there a correlation between having spent many years on .net, and not being a good choice for startup companies? It seems so. But it is not about the technology.