Microsoft laying off 18000 employees after announced loss

Deutsch

It looks like Stephen Elop’s und Steve Ballmer’s idea to take over the mobile phone branch of Nokia in order to bring MS-Windows as mobile operating system on the success road has failed and will be stopped now.
For the mobile phone branch that is now part of Microsoft, Microsoft-CEO Satya Nadella announced, that billions are deprecated and up to 18000 employees will be layed off. This will be more than half of the remaining former Nokia-employees, but also other parts of Microsoft will experience major lay offs. As an irony these layoffs will also include Stephen Elop.
On the other hand it looks like Nokia will get into mobile phone development again. The deal with Microsoft forbids that for a certain time, but that will end in 2016. Some expect that Jolla might be bought by Nokia in the future. Nokia will become a niche supplier, not more. The market leading position they had before Elop will not be regained and it is also unlikely that they become one of several major suppliers, which might have been a reasonable outcome without Elop. Their own production won’t come back to Finland, but will be given to the well known Asian manufacturing companies.
Such fusions and takeovers of departments always have their challenges. Company cultures tend to be incompatible and markets are used to a brand and will not easily switch to the new supplier. Taking over of Pentax by Ricoh has been relatively successful, as it seems, but in that case they have carefully worked on mainting the brand in an area where consumers are kind of sticky to their traditional brand. Microsoft did not go that road, but they deliberately changed a lot and thus lost customers who might have been loyal to the Nokia-brand. The strategy in these two takeovers was completely different.
Probably Steve Ballmer and Stephen Elop will be remembered as incapable managers for a long time, for first destroying Nokias core business and then losing billions on the takeover that was obviously the original intention behind the whole game.

Links:

Share Button

Microsoft entlässt bis zu 18000 Mitarbeiter nach Milliardenverlust

English

Wie es aussieht, ist die Idee von Stephen Elop und Steve Ballmer, die Mobilfunksparte von Nokia auszuschlachten und damit für MS-Windows als Mobiltelefonbetriebssystem einen Fuß in die Tür zu bekommen, nicht aufgegangen und wird jetzt gestoppt.
Für die durch Microsoft von Nokia übernommene Mobiltelefonsparte kündigte Microsoft-CEO Satya Nadella an, dass Milliarden abgeschrieben werden und dass bis zu 18000 Mitarbeiter entlassen werden sollen. Dies wird über die Hälfte der zu Microsoft gekommenen ehemaligen Nokia-Mitarbeiter betreffen und auch in anderen Teilen von Microsoft findet ein größerer Personalabbau statt. Auch Stephen Elop gehört übrigens zu den entlassenen Mitarbeitern.
Andererseits sieht es danach aus, dass Nokia wieder in die Mobiltelefon-Entwicklung einsteigen wird, zu dem Zeitpunkt, zu dem der mit Microsoft geschlossene Vertrag das erlaubt. Viele vermuten, dass irgendwann Jolla von Nokia übernommen werden könnte, wo viele ehemalige Nokia-Mitarbeiter gelandet sind und wo man für eine Nischenmarkt aussichtsreiche Ideen aufgegriffen und weiterentwickelt hat, die bei Nokia unter Stephen Elop abgebrochen wurden. Nokia wird sich als Nischenanbieter wahrscheinlich wieder einen kleinen Marktanteil sichern können, aber die Stellung als Marktführer, wie sie vor Elop bestand, oder auch nur als einer von vielen größeren Anbietern, wie sie vielleicht ohne Elop realistischerweise herausgekommen wäre, wird nicht wieder erreicht werden. Auch die eigene Produktion wird zugunsten einer Auslagerung an die üblichen ostasiatischen Elektronik-Fertiger kein Thema werden.
Problematisch bei solchen Fusionen oder Übernahmen von Abteilungen, ist dass sie oft nicht gut funktionieren, weil einerseits die Firmenkulturen verschieden sind und es so zu Reibungsverlusten kommt, die man sich in einem engen Markt nicht unbedingt leisten kann und andererseits ein Anbieter, der im Markt etabliert ist, nicht so einfach durch die übernehmende Firma ersetzt werden kann. Dafür muss man die Kunden erst einmal gewinnen und entsprechende Glaubwürdigkeit aufbauen.
Es hat ja solche Fälle gegeben, z.B. bei Kameraherstellern. Die Minolta Kamerasektion wurde von Sony übernommen und auch relativ bald aggressiv als Sony vermarktet. Sony hatte keine Glaubwürdigkeit für Kameras, außer natürlich für Video-Kameras, aber sie haben es sich mit interessanten Produkten und einer speziellen Nische erarbeitet. Für Spiegelreflexkameras hat Sony nicht den Namen wie Minolta, aber für kleine, leichte Digitalkameras, die zwischen Mobiltelefon und Spiegelreflexkamera positioniert sind, haben sie eine gute Stellung.
Pentax wurde von Ricoh übernommen, aber die Marke wird konsequent erhalten und gepflegt und noch als solche wahrgenommen. Auch da ist man nicht mehr Marktführer wie in den besten Zeiten, sondern ein stabiler Nischenanbieter, sofern man in diesem Markt so etwas überhaupt sagen kann.
Offensichtlich sind hier durch Missmanagement erst einmal viele Milliarden an Wert auf Seite von Nokia versenkt worden (und viele Mitarbeiter entlassen worden), dann ist aber die ganze Rechnung nicht aufgegangen und letztlich sind auf Microsofts Seite auch viele Milliarden versenkt worden, so viele, dass es auch in einer relativ großen Firma sichtbar und schmerzhaft ist. Steve Ballmer und Stephen Elop haben sich sicherlich ihren Ehrenplatz in der Liste der „Nieten in Nadelstreifen“ verdient.

Links:

Share Button

Conversion of ASCII-graphics to PNG or JPG

Images are usually some obscure binary files. Their most common formats, PNG, SVG, JPEG and GIF are well documented and supported by many software tools. Libraries and APIs exist for accessing these formats, but also a phantastic free interactive software like Gimp. The compression rate that can reasonably be achieved when using these format is awesome, especially when picking the right format and the right settings. Tons of good examples can be found how to manipulate these image formats in C, Java, Scala, F#, Ruby, Perl or any other popular language, often by using language bindings for Image Magick.

There is another approach worth exploring. You can use a tool called convert to just convert an image from PNG, JPG or GIF to XPM. The other direction is also possible. Now XPM is a text format, which basically represents the image in ASCII graphics. It is by the way also valid C-code, so it can be included directly in C programms and used from there, when an image needs to be hard coded into a program. It is not generally recommended to use this format, because it is terribly inefficient because it uses no compression at all, but as intermediate format for exploring additional ways for manipulating images it is of interest.
An interesting option is to create the XPM-file using ERB in Ruby and then converting it to PNG or JPG.

Share Button

System Programming on Linux and MS-Windows

Quite honestly I admit that I really love the Posix-APIs for system programming and even some Linux specific extensions to it. I/O, Locking, Semaphores, Shared Memory, Message Queues, Signals, named and anonymous pipes, Unix Domain Sockets, TCP/IP programming, Terminal I/O, pthreads and a lot more are very powerful and fun to program. I do discover some points where I regret why they have not done it better, for example the fact that almost all system calls return a value, which is interpreted in one of the following ways:

  • 0 means ok, -1 means a issue has occurred, which can be explored by calling the errno-macro.
  • Values >= 0 are useful responses and -1 is indicating an error, which again requires calling errno.
  • A pointer is returned. If the pointer is NULL, this indicates an error and requires calling errno. Sometimes (void *)-1 or similar return values are also special.
  • pthreads-methods return 0 when successful or directly the error code otherwise.

Originally errno was a variable, which had to be replaced by some weird macro construction to allow multithreading and remain backwards compatible.
I would find it most natural if there where an exception mechanism in place like in Perl, Ruby, Java and many other languages, which would transport the error information. C cannot do this, at least not without breaking the language standard. The pthreads way looks good as well. Returning a struct containg the value actually needed and the errorcode, which is 0 if everything is OK, would also be a good approach, whenever a real return value is needed, but arguable a little bit clumpsy in case of functions returning a pointer. Maybe providing a pointer to some integer variable as argument would be the way for this case, even though I find it kind of ugly to have „return values done by a parameter“. Semaphores are a little bit clumsy to handle. And fcntl and ioctl are for sure overused instead of adding specific function for specific tasks. Reading a single character from a terminal or keyboard input without waiting for return is difficult, but at least logical.

Anyway, these issues can be dealt with and the power and elegance of the API is just great. The documentation is always available by using man pages that are installed on almost every system and by using great online resources on top of that.

So how does the win32- and win64-API look like? I mean apart from the religious questions like the lack of freedom? Most of the things can be done on the MS-Windows-APIs as well. There are some differences. First of all, all the code that uses system-APIs has to be rewritten. Very few typical POSIX-functions like open, close, read and write exist in the windows world as well to facilitate such a transition, but the general answer is like „it can be done, but the code has to be rewritten from scratch“. So programs that should run on both platforms and should do basically the same on both platforms need to encapsulate their system specific code, which might be anywhere between 20 and 50 percent of the code base, in specific files and organize their structure in such a way that the remaining half or more can actually be the same. It has been done by database products (PostgreSQL, MariaDB, Oracle, DB2), interpreters and compilers for programming languages (Ruby, Perl, Scala, Java, C#, F#, PHP), browsers (Firefox, Chrome), image processing software (gimp), office software (other than MS-office), web servers (Apache) and many others and they do achieve the goal to be doing more or less the same on both platforms.

Now how does the Win32- and Win64-API look like? Obviously the code looks very different. Unimportant, but very visible differences are that function names are mixed case and start with capital letter instead of being smaller case with underscores. Parameters and variables are mixed case starting with lower case. The C-type system is not directly used, but all types are #defined in some header file and all capital, even pointer types. Some care is needed to understand how these types work together, because it is not as self documenting as the original C types, but really no big deal to get used to. A MS-specific C-extension does allow using some kind of exceptions, if that is good or bad is hard say. Function names are generally longer and have huge parameter lists with very long parameter names. When they are outdated, because more parameters or different behavior or 64-bit support is needed, often an 64 or an Ex is added to the original name to create a new name for the replacement function, retaining the old one as it is for backwards compatibility.

Shared memory can more or less easily be replaced by memory mapped files and that is what needs to be done on MS-Windows.

The named pipe of Windows kind of unifies the message queue, the Unix domain sockets, the named pipes of Unix/Posix/Linux and even allows network communication within the local network. There have been linux specific extensions to Posix-pipes that achieve this unification, but not the network transparency, as well. Mutex and Semaphore work slightly differently, but can basically achieve the same results as Mutex and Semaphore on Posix. What is beautiful is that almost all operating system objects are accessed by so called HANDLEs which unifies many functions accessing them, but brings functions like WaitForSingleObject and WaitForMultipleObjects also some fcntl-like flavor, because it depends of course very much on the type of kernel object what waiting for it means. When being aware of this, it can be very powerful.

When looking for features that are really missing on one platform we observe immediately that MS-Windows does a mandatory locking on files by default and that such a mandatory locking does not at all exist in Posix or on Unix-like operating systems like MacOS-X, even though it does exist on Linux. Discussing this issue and how to deal with it should be worth its own article. In short, it is not as bad as it sounds, but the choice of the MS-Windows-guys to implement this feature in the way it is and to make it the default does look good.

The signals are missing on the windows side. This can be overcome by using Mutexes and Conditions to replace the communication part of signals, or to simply use HANDLEs to end a specific process instead of sending a signal, provided the permissions exist to do so.

Another painful omission is the fork. Most of the time fork is accompanied by an exec and exactly that can be doe by the CreateProcess in MS-Windows. Often we do like to share open files with the forked process and there are ways to do this, at least to some extent. But to use fork for creating a couple identical processes that run on the same code and data initialized once, which is sometimes a good idea, just does not exist on MS-Windows. It can be overcome by using threads and dealing with the issues of having to take responsibility for really separating the threads or by using multiple processes and memory mapped files for sharing that initial data structure.

The Win32- and Win64-APIs are documented quite well on some Microsoft-Webpage. I find the Linux-man pages slightly more useful, but both systems are documented in a way that it should be easy to find and use the original documentation and additional resources on the web.

Generally I would recommend all system programmers to have a look at the other world and how things work there. It helps enjoy and understand the beauty and power of both systems and probably maintain or even challenge the preference.

I have been teaching system programming for both platforms to college students and I enjoyed teaching and exploring these platforms with my students very much.

Share Button