Showing posts with label Basics. Show all posts
Showing posts with label Basics. Show all posts

2015-07-23

Java vs .net/C#

Visual Basic Classic was my primary programming language for many years. A pretty amount of years ago when Microsoft announced the end-of-life of Visual Basic Classic (one of the last statements regarding VB6 see http://msdn.microsoft.com/en-us/vstudio/ms788708.aspx) I took a first look at .net and C# as it seemed to be the most logical next step. I was deeply disappointed by the first versions of .net and C# (it was v1.1 if I remember correctly - it was so full of bugs and terrible slow). The next shock for me was the absence of any migration path for the existing VB classic projects. So switching to .net would have been a total restart. I really wondered about that step of Microsoft because pretty every software vendor knows that a hard cut in backward compatibility of software comes with the danger that customers start taking a broader look around to competitors.

Due to the fact that I already had switched from Windows to Linux at home at that time, I thought by myself, that this would be the opportunity to learn a completely new langauge which is platform agnostic and enables me to write applications that run on both environments. Using a computer I can't program (the Linux box at home) was a horrible situation for me.

About a year later, after several evaluation phases and another attempt with C# to give it a second chance, I decided to go for Java with two core advantages (apart from the language specific reasons):
  1. Develop once and run the binary anywhere - on Windows, Linux or even Mac.
    Yes, I know the critics, that Java or other attempts following the "write once, run anywhere" paradigm do not deliver this promise (see comments on Wikipedia to cross-plattform development for example). Now, years later and after a few applications developed (commandline, server, Swing rich clients) my experience is very good. Of course if your development machine runs Windows and you use Windows API exits or use com4j, J-Interop or JACOB to interact with a Windows-only COM component then you will have problems running it on Linux or Mac. For example: I have developed a Swing application that worked flawlessly on Mac even although I did not have any possibility to test it (I do not have a Mac). I was used to get problems with windows only applications just trying them on a new version of Windows! Of course I also had some compatibility issues e.g. when stripping invalid characters from filenames (different characters are allowed and not allowed on the two systems) or checking if a file is still accessed (there is no windows-like file locking on Linux) - but these are differences in architecture of the operating systems and that can be handled. You can develop for many platforms also using C++ for example but then you need at least one instance of each operating system at your fingertips to do the compiling work.
     
  2. Reduce dependencies
    You already run a risk choosing a programming language. You have a learning curve and invest into know-how, library development and maybe also buy some external components - not to speak about the related tools you learn to master (IDE, packaging, deployment, ...). But this is mainly your own risk. The even bigger risk is for the customer using your application when it is not plattform agnostic. I have seen companies trying to migrate a few servers to Linux and were stuck because of software running on Windows only. You don't know which operating system survive for the longer time. With a platform agnostic solution you just don't care. It's a matter of flexibility.
I can see further advantages, like choice of IDE or missing licensing issues (Visual Studio license usually provided by the employer and when you leave you have to find a new sponsor).

Having now the choice between several IDEs I first used Eclipse (free) and moved to NetBeans later on (also free). The book, which was most helpful for me in learning Java (Javainsel) was and is very good (sorry folks, it's german).

The biggest advantage of Java - being platform independent - also is the biggest obstacle in a (still) Windows centric (business) world: To ensure plattform independency (as I explained above) means, that you should only use and do stuff that is available everywhere - or you need to implement to different solutions. The resulting problem is: How to deal with the Windows specific stuff?

My solution to this problem is in the first place to not use OS specific exists or use calls to Windows-only stuff. For applications that need to integrate with Windows stuff I try to keep the OS dependent part small (e.g. a VBScript) and let it communicate with the Java program via commandline, over the net or by saving files to watched folders. For example: To get the active window title under Windows the Windows API is a possible way to go while on Linux there is a commandline tool called wmctrl which can do the same. So under Windows you would write a small Windows program that uses Windows API to to get the title of the current window. Probably the easiest way is to write an AutoIt script which has a prepared function for this and let it return the Window information in the same way as the wmctrl program does on stdout. Your program then - depending on the OS it is running (you can find that out during runtime) - calls either the one or the other commandline tool grabbing stdout of the called program. So it is recommended, that you try to reduce the OS dependent parts to a minimum and split your application into components - and the smaller OS specific part finally needs to be developed twice or three times.

It was and is one of the core arguments of those developers on Microsoft (.net and C#) that they are bound to Windows anyway because they deal with so many other Windows-components. Yes, this is partly true and I do still a lot of Windows-specific VB scripting. But I always think in components and so there are several opportunities to write parts in a platform agnostic way. Even if it is not yet totally platform independent - later there is less work when an OS migration is needed. If you look at the trends of the last years, you can see one big related trend: decoupling or "loose coupling" of components (from COM and DCOM to SOAP and REST). Lately I read more and more about "Micro services" which - frankly spoken - is just a form of component oriented design. Anyway, that nowadays makes it possible to have processes on different operating systems written in totally different programming languages talking to each other.

In the meantime I also improved my C# knowledge a little and developed a few smaller things in C# where it did not really made sense to do it in Java. There are a few people dealing with both languages. Interestingly those people criticizing Java most are usually those who don't know Java and have never ever looked into something else but the Windows world.

Although Microsoft had the chance to create a "better" Java by learning from it, they did many things worse in my opinion. Many say that the .net libraries are better organized than the Java ones. I do not know the .net libraries very well yet, but I tend to agree. On the other hand there are a many characteristics where I prefer the Java way, for example:
  • Properties (C#) vs Getter and Setter methods (Java)
  • Delegates (C#) vs Passing interface implementations (Java)
  • sealed methods+readonly variables (C#) vs final - one word that says it all in both cases (Java)
  • Missing checked exceptions in C# - a Microsoft guy once told me that checked exceptions produce just bloated code and therefore something like this does not exist in .net. Well folks, it is about error handling - something, Microsoft may not care a lot about ;-).
  • Ă„hem, want to talk about GUI development? - Windows forms or WPF? - Both seem to be unfinished I did not figure out yet, which of those will remain unsupported sooner. At least silverlight is dead... - I went for Windows forms so far and even for a quite simple GUI I was stuck with the shitty TreeView and a double-click-issue - bug report from 2009 and not fixed yet...
In general Java is easier and simpler (less language constructs - not the libraries) in my opinion, but sometimes there might be more code for the same thing, but who cares? - It is important at the end, that you don't refuse touching again your code from a year ago (not to speak about the code of others ;-) ).

I will continue to do a increase my C# knowhow, but I'll be always more confident when I can open up NetBeans again and working on a component in Java.

See also: The programming language, Choosing a programming language, Popular Java myths.

2014-01-07

Reinventing the wheel

There are three kind of developers when it comes to library use:
  1. Those who extensively use existing stuff to avoid reinventing the wheel,
  2. those who do code the stuff on their own and try to reduce as many of the  external dependencies as possible and
  3. those who do the easy stuff on their own and only for big topics (like PDF or MS Office file handling etc) they use existing libraries.
If you want to avoid reinventing the wheel completely then you will end up with a lot of library dependencies which often even do not fit well together (just think of the many different java logger frameworks available).

Neither the first nor the second extreme will bring the optimum result - at least not when you think long-term.

For example I was using ini4j to load inifiles (because I was under pressure) but later I noticed that the sections are internally stored in a way that you can not rely on getting them loaded back in the proper order. For the project where I was using it, order of the sections previously wasn't really relevant (that's why I didn't either recognize that ini4j was mixing them up occassionally), but then things changed and now order of some sections is relevant. So I had to change the underlying library. I took the chance to implement the inifile handling on my own. Why? Would I have been the developer of that library I could have changed the internal implementation who the sections are loaded in an instant. Without being really involved into the project I would have needed to read into the foreign source code (which unfortunately is always more difficult than reading your own code - if you did it well) and doing code changes that hopefully will not be rejected by the project owner (loosing it again with the next patch). I would have done this probably, if it wasn't urgent and if inifile handling wouldn't be such a core thing for me (I deal a lot with inifile style files).

And here it comes to a related topic:
You can get your code being written almost everywhere around the world, but the important questions are: If you need a fix or an enhancement,
  • do you have a chance for direct communication with the developers (or how many levels of communication are in between)?
  • how fast can you get what you need?
Of course, when using a big library that is widely used you may get a very good and stable code base, but bigger changes will not be easy to get quickly.

I have seen it plenty of times, that having the full source code available at hand is the only guarantee to get fixes or enhancements in time when you need them!

And there is another related topic: Progress
Sometimes it makes pretty good sense to reinvent the wheel - and indeed if you look at the wheel itself, it has been reinvented (or at least adapted) many times and looks very different depending on the core usage and environment. For IT or source code this means that for instance the same stuff must be programmed again and again when you change programming language or when newer and better technologies can only bring benefit when you partly rewrite the application.

I write this because often the thought of reinventing the wheel is labeled so negatively. Rewriting code parts or writing them yourself instead of using an external foreign library can make really good sense!

Related post: Bronze age of IT.

2013-01-12

The truth about software

To summarize the software-troubles:
  • Too many bugs
  • Too difficult to use
  • Too much administration and maintenance work
As you might already know, as it seems obvious for you - or maybe, if you are listening to your inner voice, you only hear it from somewhere burried deep down in your mind: software is full of bugs. There is no bugfree software.

Since I started programming, I could see the IT world complexity growing and growing. In the beginning there was one processor and one process running at a time - no other software to integrate with. Everything was easier. When I think back to times of Commodore C-64 or when I was using the MS DOS Borland Turbo Pascal or C compilers - they were all extremely robust and when there was something not working as desired, I could be to 99 % sure that it's my fault. So at least the core system and the development platform were rock-solid and stable. That did not always apply to my programs... ;-)

Nowadays, operating systems and their core services as well as development environments - and in addition to that a bunch of third-party libraries all have their issues. So the software developer doesn't even start on a rock-solid base as it happened to be back in the early eightees (at least according to my experience - YMMV). In addition to that: If you want to produce cars, toys or whatever other physical stuff, in most cases you need a factory and a lot of money before you can start. For producing software, all you need is a computer and download some tutorial from the net and even a fool can get started - and unfortunately a lot of fools do...

But the low entrance barrier is only one reason for the lot of issues around. In my opinion the complexity is the worst thing here. Even with the honest strong desire to get everything right, you can't - apart from the fact that IT world has grown far too big to be completely covered by a single person.

But the growing IT world did not bring only troubles - we do have far more possibilities since computers were invented. Software development is far easier than in the beginning of computers. We can build software with far more features in much shorter time now. The problem: The software can often do far more than the users can handle.

And last but not least: I remember times when the "installation" of a program was just copying it to the machine and run it. Today it requires dependency checks and sometimes complex installation procedures. Although still possible - only a very few programs that run fine when you just copy them. Nowadays many software products have a bunch of required preconditions and a lot of integration options that need configuration. Highly integrated software means more maintenance work regarding updates (of any of the involved components). Another reason for increased maintenance work are the customization options that most software comes with.

A normal user nowadays is working with a lot of different software products and often there are some software products that are used very seldom only. I have seen users dealing with software they need to touch only once a month. From one month to the other they need to re-find all needed menu items again because from one month to the other they always forgot.

The challenge these days is:
  • To reduce complexity (of the problem and feature set) as far as possible (while maintaining flexibility).
  • To make using the software easier - software must be intuitive to use (only a very few people do read documentation or help file text).
  • And to make configuration obvious and simple.
Related posts: IT fallout and buddhism, New user experience, Proof of concept, IT Dependencies.

2012-04-05

Choosing a programming language

Currently - after a very long period I am again into the programming language decision which I was not expecting.

Changing programming language is a big deal and you shouldn't do that every 2 years. When you search the web you will find recommendations to learn many languages and learn a new each 2 or 3 years. I find this totally silly. To get really productive with a programming language, takes at least a year and of course you would like to get the most out of it regarding ROI (return on investment).

When I did evaluate programming languages the last time, it was a 3-step way:
  1. Collecting all options with the result of a hand full remaining for further analysis.
  2. Keep an eye on activity and evolution of the results from step 1.
  3. Detailed analysis of the remaining options and choose.
The time from beginning of step 1 until end of step 3 took about 2 years. During step 1 I already decided on a few parameters, which in my case were:
  • I prefer static typed languages over dynamic ones for several reasons (e.g. less error prone, YMMV).
  • I don't want to code user interface - I have coded GUI since I was an 8 year old boy and I was about 14 when I got GUI designers (those times still using MS DOS) so hand-coding GUI is for me like returning to stone-age and so that is a no-go for me if a GUI designer is missing.
  • I don't like language hopping and because of the very dynamic requirements of my software projects I need a programming language that can be used for quite all realms - so all the domain-specific languages are excluded for my needs.
  • My applications are usually plugin/addon enabled which means that a customer must be able to develop those for special needs on his own - without additional costs. That means, my favor goes to languages that are free (and open source) including the IDE used for development.
  • The language should not be tight to a particular operating system.
My decision - taken back in 2008 after many years of classic Visual Basic development on Windows was: Java together with NetBeans IDE, using Swing GUI for desktop applications (NetBeans itself uses Swing - however, there is another option for building GUI in Java: SWT). A short comparison Swing vs SWT can be found here. Back in those days I have already blogged about my decision, you might want to read back to "The programming language" and "The IDE and the libraries" maybe. The Swing GUI is - by the way - far superior to the .net WinForms or WPF - both do not adapt well to very different text lengths in labels (just to give one example - in Swing this works without additional work in full automatic). Another core advantage of Java in general is: You take the binary and it runs everywhere! - C++ and many other languages at least require the same code to be compiled on each platform. What if I want to develop for the Mac and I don't own one? - I have given Java apps that I have written to a friend for testing on his Mac and it worked - without me ever testing it on the Mac. Of course if you call system programs dealing with the output you may see differences in the behaviour on different operating systems that you have to deal with. The most annoying thing in Java is that you need to ensure that the Java runtime is installed on all the client PCs where you want to use the app. Of course no difference to Microsoft's .net here - although there is less version quirks than for .net...

Now, about 4 years later there is nothing wrong with my decision. My decision is still that. With the rising of alternative operating systems the importance of Java has gained (on the server side Windows definitely already lost for enterprise applications at least) and many server-applications go Java to be platform agnostic. Apart from that the Java world is huge. Microsoft's .net is growing also, but still far from that (regarding size and quality of libraries and community).

The trigger for my latest search for a programming language is that I have a few very small programs (running on the client) to write (they are not "real" applications, just tiny programs for particular small needs). I found Java - and .net or Mono as well just too big for such tiny stuff. In my particular case they are Windows specific needs. A few of those needs I already solved by just writing VBScripts. That was ok for the GUI less needs. Now I have a few little needs for small GUIs. And that again brought me to a brief look around.

And indeed that is the single parameter ("should fit for very tiny requirements also") I did not include in my former decision back in 2008. And good it was I think because finding the programming language that fits for really everything 100% is not realistic. It is even not realistic to think that a programmer nowadays can survive just knowing one language - but: It is important to keep in mind that no one can achieve the same level of expertise in all used languages.

So this post can be seen as an addition to my main pro-Java decision - the programming languages that are helpful in addition to Java.

For Windows development you should know VBScript and on Linux shell scripting or Python or Perl for the small scripting stuff.

But what to choose, if a little GUI is needed?

If you search for a platform independent development platform, you could look at Free Pascal and Lazarus IDE as it creates native code (so just take the executable and run it instead of writing packages or setups that manage plenty of dependencies) and is fast. There is one problem with this approach: On Windows (in my case) using COM components (not to talk about .net) is not well supported and possible only with quirks (not tried myself, I just read about that). That is the reason why this is not an option for me in my current situation. If your application does not need to tightly integrate into the Windows ecosystem Free Pascal gives you multi-platform development (same code, just need to be compiled for/on each platform).

After all, still core technology is C(++) and Code::Blocks is an IDE available for all major platforms (for wxWidgets projects the wxSmith seems to be the most capable GUI builder, you need separately install wxWidgets - at least on Windows). Or anyway you can either use NetBeans using external designers to build the GUI for Linux development. I have developed quite a lot C++, but maaany years ago and today I simply had problems getting Code::Blocks to work seamlessly with wxwidgets (design worked, but compilation finished with configuration errors). What I found on the net related to my errors was from about 2008 partly not matching my environment. I gave up on this but for those succeeding I want to mention this option.

Last but not least I still also see the option to use SharpDevelop with .net for the single reason of time-to-get-started and seemless integration into the Windows ecosystem - and this combination by the way is the only mentioned one that is bound to windows only. If you think of Mono and MonoDevelop then be warned about the differences! Creating platform independent applications with C# is not as seamless as you might think! Using  MonoDevelop on Windows (MonoDevelop can compile against .net or Mono) brings more platform independence but you loose the Windows integration (COM/activex support at minimum level - I find the Java-COM-interop even better; registry access and stuff like that). The very important point here is the Windows integration - it's the one and core argument for this option!

I was about to write a paragraph on speed but didn't want to write that without a single test after more than 3 years of not checking that. Surprisingly a minimum GUI test lead to the following result: Cold start on a virtual Windows 2008r2 machine is 5 seconds for both - .net as well as java. A second start is 1-2 seconds - either for both. I then tried a Java test application with a little more GUI to find out that (warm) start is 4 seconds - not bad either. Surprisingly Java 1.6 update 30 and .net runtime 4.0 seem to bring a similar user experience at least from startup behaviour. Many still say, Java is slow - far missed!

But I may not forget that I need to access activeX/COM components for my small work which makes it more feasible doing it with .net because .net simply integrates better here - as already mentioned. Of course there are options when using java - for example - my favorite com4j (which I tried for several COM components in the past where it worked well). Although I never tried to embed activex controls into a swing component - and that does not seem trivial in Java - see here.

Needless to say that I would prefer Java for 100% of the work if it would be easier to deal with COM components and if it would integrate nicely with the Windows stuff. Java with NetBeans is basically the only combination that I really love to develop with. Everything else lacks in IDE features, is difficult to set up or the community is small and tiny amount of available components.

And of course there is my general tendency to avoid Microsoft technologies whereever I encounter them. The classic Visual Basic was one of the longest continued stuff of Microsoft, even although there were signifficant changes between VB 3.0 and VB 4.0 (with switch to 32 bit). When I look at the last years there were unusable first attempts of .net with first Windows forms and then WPF (see a discussion here), Microsoft pushed a lot of newer GUI styles over the years with Ribbon interfaces or now the Metro GUI where you need to use a new GUI language and software companies continously need to adapt or rewrite parts of the application). Would I have used Java since the late ninetees I would have experienced a completely different continuity. Microsoft managed it very well, to drive developers .net without those getting aware that they are again caught in a one-way-street with a dead end. Just because industry follows Microsoft - at least on the client side - in most areas, I need to accept that I can't stay completely outside the windows specific (VBScript and .net) stuff. I will take care to keep it at a minimum. This means, that for my tiny programs I will most probably go with .net just because of the lack of other options.

For those who like dynamic languages, I want to mention Python. One of it's core advantages in my opinion is that it runs on many platforms but comes along with Windows extensions on Windows. This means: When you need to do Windows stuff you can continue to use Python - of course using the Windows stuff (COM and Windows API for example) means that (at least that part) of your program is then bound to Windows-only use. For platform agnostic programming there are bindings for wxWidgets for Python. However, the IDE's I tried were all poor in features or stability - I tried Eric, SPE and Idle back in 2008 - a short look tells me, that there is still a lack of GUI designers (e.g. Glade for Windows seems near to discontinued) - so I cannot really recommend a particular IDE - you can have a look yourself - here is a list of Python IDE's. Unfortunately deployment for Python programs on Windows is not as easy as for .net or Java.

To round up this post: For building setups for your Windows applications I can recommend the Innosetup application as a good mix of flexibility and ease-of-use. For creating Linux packages see official documentation for creating .deb packages (Debian, Ubuntu, Mint, ...) and here for creating .rpm packages (redhat, Fedora, ...).

Related posts: The programming language, The IDE and the libraries, Install NetBeans on Ubuntu 10.04, Java vs .net/C#.

2010-08-09

Administrator ethics

Whenever the sudo command is used the first time on a Linux box (this is the command to run things with administration/root permissions, the following text is shown:
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
  1. Respect the privacy of others.
  2. Think before you type.
  3. With great power comes great responsibility.
Whenever I read this, I must say: I like that. And it is applicable to far more than just IT...

2009-10-05

Why Linux?

I do not consider it a good way how FSF started bashing Windows with Windows7Sins. Besides the fact that this is bad behavior, they should have asked the people why they keep using Windows.
Here are some arguments, I get told by people who don't want to switch OS:
  1. "I don't want to invest time into learning a new system. Computers are already a big time waster."
    Learning something new is additional effort. Although it might be an investment with a short ROI, it depends how people are using the computer (and how much money they have to pay others for fixing their problems).
  2. "I heard that it is pretty common to experience incompatibilities with the hardware and I am worrying about my foto printer, scanner or mobile device not working with it."
    Yes, this is indeed true. There were made big steps forward in the last years but there are still plenty of gadgets not working well. If you are planning to buy new hardware, you should prefer those items that are known to be working with Linux over others - just for the case you might want to switch in the future. Anyway, with some manual work I was able to get my Canon foto printer and my Canon Scanner to work with Fedora already back in 2006. Nowadays it should work better.
  3. "I do need to share a lot of documents in Word, Photoshop and other proprietary formats with others I collaborate with. I worry about incompatibilities."
    This is indeed another thing to be taken into consideration. In the best case it is just some additional click but in the worst case you can't read or write the needed format any more. Although some Windows applications run fine under Wine (Windows-Emulator), many others do not. Although people should prefer open standards this is not always possible.
  4. "I am a gamer and the most cool games run on Windows."
    Also true, although there are many free games on Linux, vendors produce new games quite only for Windows. Dual boot is an option but means to maintain two systems - and you still pay for the Windows license.
  5. "I have plenty of friends around who can help me when I have troubles with my Windows-Machine, but I have no or very few options for the case I then have problems with the Linux box."
    This is also true for many as there are simply still more people around knowing Windows than knowing Linux. It does not really make sense trying to convince a person worrying about issues that are really there.
I think that most people who switched to Linux switched because of suffering and not because of philosophical or political reasons. - I personally suffered - and so here are my top reasons for switching to Linux:
  1. Stability & Reliability
    I had several key experiences with Windows in a short time frame like these: Machine began with strange behavior being slow and having hangups. Nothing in the event logs and no indicator whether it could be the hard drive, motherboard or "just" a software problem; Burned CDs that were not readable on a different Windows machine (but Linux could); Blue screens on startup turning out to be a problem with the CD drive (hell, I booted from HD so why can't go without the CD drive); files getting corrupted over time silently - I could continue further and not mentioning the plenty of issues I had trying to get reliable (restorable) backups/images of the OS.

    There are also some stability issues on Linux - I already had some sudden restarts of X - but I am simply less in panic mode on linux. In case of emergency, the OS switches to read-only mode to prevent from further corruption. Apart from that: Firefox runs more smoothly and stable on Linux, Memory usage of the complete system is less, ...
  2. All the important stuff is right there after install.
    After installing a Linux desktop distro, you can right away burn CDs and DVDs, write your documents (full open office suite included) and emails and more. With a few clicks you can start developing software, do mind mapping, manage databases, do sound and video editing and much much more. - Without paying a dime!
  3. You are legal without entering a single license key.
    I hate the annoying entering of serial numbers as well as the annoying registration over the internet. I have seen too many people not finding their original CDs any more (even in companies) and I have seen too much problems registering over the internet - even losing the only developer license of a product after setting up a new notebook after the old was rotten - just because vendor saved hardware information.
  4. Software management.
    On Linux there are managed repositories of software. That means basically, that you have a list of available software, can go through it or search and you can install a software by just putting a checkmark in front. Dependencies of files and packages are handled by the package manager. The result is that there is only very few chance to kill your machine with just installing some software. I only had a very few cases where two application were conflicting and that is already a longer time ago. Removing both an reinstalling the one you like more then works.
  5. Intention and business strategy.
    The intention of the makers of Linux is to create a reliable and helpful system that helps you getting things done - at least for me it feals that way. If features are missing then they are not ready yet, they are not missing because of business considerations. This makes a big difference in user experience. PDF is a good example. On Windows there is a huge market around PDF and there is no interest in integrating PDF features in the core OS. - Or on the other hand there are "features" like DRM in the multimedia area that would be better missing. In many cases it seems for me that I have just the "light version" and need to pay more for the final needed productivity improvement. Further business strategy of Microsoft and Apple for example shows that they do not miss a chance to drive the customer into a dependency and try to block out every attempt of communities to improve interoperability. Although Microsoft shows some cooperation, they put big rocks somewhere else. Microsoft did a better job than all the other vendors in the last about 20 years helping to improve productivity on the client. But currently I can only see that they fully exploit their market situation and customers are suffering from that. There are many messages in the news pointing out untrustworthy behavior of Microsoft and even Apple (e.g. Microsoft capturing ISO or common strategy on entering product categories; Apple removing Google voice).
    There is a saying: "Fool me once, shame on you. Fool me twice, shame on me."
However, I can understand people who stick with Windows as Windows has it's advantages - for instance the more options in the Explorer configuration offering many more columns to show in detailed view. The above list of pros and cons is not exhaustive and shows just some general thoughts over particular features. For me personally the Linux ln command for creating symbolic links is a really cool feature. It allows you to link a file or folder to a file/path somewhere else in your file system. This works really seamless (not as the lnk files in Windows). You can use this to link parts of your profile from a completely different location (e.g. external USB drive). But this is just one of the small nice things - as the default support for multiple desktops.

The more I see people litigating about what OS is best (Windows, Linux, Mac or even others), the more I come to the conclusion that those quarrels will not bring a winner - at least not nowadays. I think, everyone should accept, that there are different operating systems and sooner or later we will find ourselves within a multi-OS environment. We should improve interoperability and find ways living together in peace.

Related posts: Windows 7 RC, My application set on Windows, Installing your PC from scratch, Apple worse than Microsoft?, The operating system, The Open Source idea, Why I have chosen Fedora, Why I switched to Ubuntu, Going Linux, Ubuntu 10.04 experiences, Small Business Boom, Ubuntu compatible hardware, User lock down, A few Linux related videos.

2009-04-09

IT project costs explosion

It is a well known problem that costs of IT projects often rise far above the initial estimations. This might happen for non-IT projects also, but the reasons might be different. And there is a difference between reasons why IT projects fail and why they cost more!

I tried to summarize the most important reasons why IT project costs are higher than expected - from my experiences and in the order of relevance:
  1. Unclear, unrealistic and permanently changing ideas of requirements (missing, unrealistic, vague or insufficient stable goals, objectives and milestones).
    Solution: Invest enough time in evaluation of requirements, put it in relation with what solutions exist on the market and define clear and concrete milestones building a path to your final goals.

  2. Insufficient or wrong knowledge about the solution options (mostly from technical point of view).
    Solution: see above - and think also of the option to develop (or let develop) your own solution which is always an option worth thinking about.

  3. Insufficient knowledge about the overall effort needed to implement the solution (= unrealistic estimation of time and resources).
    Solution: If you have missing experience on a particular field then ask experts or develop prototypes. And never beat down the price of your suppliers (to unrealistic values) because then you provoke final costs being higher than expected.

  4. Insufficient knowledge about the destination environment where to implement the solution.
    Solution: Invest enough time in analysis.

  5. Side effects of quick-and-dirty implementations of the solution (or parts of it).
    Solution: Make quality your focus and not being cheap. If you create a bad product that nobody really wants to have you waste more time and effort as if you would have created another smaller product, but well done.

  6. Unqualified interference or intervention of upper management.

  7. Missing GTD like and technical skills of involved people.

  8. Bad time management (schedules, time reserves).

  9. Missing or insufficient quality assurance (clean design, review, testing, documentation, ...).

  10. Communication / teamwork insufficient or inefficient.
Related posts: Economic crisis and IT, Bronze age of IT, IT investment, Features, IT outsourcing, The Open Source movement, Paying for free and Open Source, Scope of IT projects, The small software vendors.

2009-03-17

Document file format

Yesterday my wife received a request for a poll by email. She confirmed to participate and received ... - a Word document. Not a link to a website, not a PDF form, not a text file - no, a Microsoft Word document with form fields. And we are on Linux.

Although Open Office does a great job on importing Word documents some form fields (meant as a pull-down menu) did not show up the available alternatives). My wife told me and said she thinks that initially somehow something showed up for a moment. I have to say, that I had no interest in investigating this problem, because of a single reason:
People should write documents in a portable, platform independent standard format.
Especially when intended for large amount of people it is important to use a format that can be displayed (and edited where necessary) by everybody.

I had an interested talk a few years ago with a project manager who also teaches and trains other project managers about the format of documentation created during a project. He told me that prior to a project start they analyze the environment at the different partners involved and if they use different versions of Microsoft Office products then they estimate higher project costs due to compatibility issues because different versions of Microsoft Office behave differently and display contents differently. They often use the RTF format to overcome different drawbacks. However, using RTF reduces available formatting features.

I know these problems also. Not only once a co-worker wasted half a day correcting the layout of a concept that has been written as a Word document and has been edited by a customer.

So already years ago I switched to Open Office for every project relevant documentation. After evaluating the options that sounds the best alternative for me using the Open Office formats ODT, ODS and ODG.

The major advantages are:
  • Platform independency
    I can read and edit the documentation at work under Windows and at home with Linux.

  • No (or at least very few) compatibility issues.
    Using different platforms or versions of Open Office does not raise display or layout issues - or at least not with the amplitude known from Microsoft Office.
    In the past for major changes in the document features Open Office did change file extension keeping compatibility and transparency.

  • No license fees
    Open Office is free and would also help companies saving a lot of money.

  • Direct PDF creation with bookmarks and links
    Open Office can directly create PDFs (without the use of an external PDF printer driver) Preserving links from table of contents or other links within the document. Further (when using appropriate heading format templates) bookmarks are automatically created in the resulting PDF which makes navigation easy when reading the document online.
For mind mapping I also use FreeMind which is a good supplement when writing project documentation.

Especially in IT or more technic/industry focused companies there are other types documents also to be written that cannot be written efficiently using Open Office. For those cases I recommend looking at OSALT.COM. That site helps finding alternative Open Source software for different commercial products. - E. g. DIA as an alternative for Visio (although - with some limitation - Open Office Draw can be used also). The Open Source alternatives do not always offer the same huge feature set as some commercial product, so there are sometimes relevant limitations. But in other cases the

Related posts: Data file format, Why I hate ribbons, Stationary under Ubuntu, Ignorance of the different, Popular Ubuntu desktop myths.

2009-02-19

Update Age

In the last two months I faced a task again and again that continuously consumes time: Software Updates.

Not, that this is something unusual on a PC, but two years ago updating software was a task only limited to computers.

Yesterday I had to got to the mechanic because of a security software update for my car!

Without thinking too much I have the following items to maintain with software updates to keep them secure and (hope to) fix annoying bugs:
  • Computer at work
  • Computer at home
  • Mobile phone of my wife
  • My own mobile phone
  • Our car
  • SAT receiver
And I am not talking about the details - e.g. different behaviour or new bugs after applying several updates. On Windows it is extremely more time intensive to keep all the software pieces up to date. Some pieces don't have an autoupdate implemented and often I disable it to avoid annoying popups all the time notifying about the updates. I prefer to do it - depending on usage - in bigger time intervals (often more than a month between updates). But anyway it is time consuming.

This is very annoying! When the economic crisis has passed we will be in the middle of the Update age. I am just waiting for our washing machine to need a bugfix update because not stopping to rotate any more "under some circumstances".

And I don't see a real solution: I can choose between keeping everything secure or being hacked and having an incident while driving home.

My humble suggestions to minimize the effort:
  1. When planning new IT systems take into consideration how easy to maintain and update.
  2. Prefer simple and easy solutions - those have less (security) issues.
  3. Reduce the amount of needed systems.

2008-11-18

Web vs Thick client

I think their is no doubt that we are in the middle (or is it the beginning only?) of a web application hype. When I lately faced the VMWare infrastructure web access I wondered what sense that makes to intentionally reduce performance for ... - for what? For accessibility? When I am at a client where I need access to a vmware I will take it with me - on my notebook or either (as colleagues of mine do) on a USB drive. I wonder if it was a technical guy or somebody from upper management taking this decision...

So I think there is some clarity required when it makes sense to design an application as a web application and here are the advantages:
  1. Zero installation at client side.
    I think this is a big advantage of a web application and and from what I have seen drives many people to design the next application as a web app. I can see it from my own experience at Windows related support. On approximately 1 of 10 workstations there are troubles installing an application due to some "corruption" at the system or some other application conflicting. But this also depends on the application. For highly integrated applications (having intensive contact with OS or other components) I expect problems at 1 of 5 machines at least. So one reason for a web app is to avoid installation problems. - That is understandable, but guys, remember: That is an OS problem in reality. I very rarely have problems with installations under Linux. So for the zero installation we are in reality talking about a workaround for a Windows problem. - But wait: There are also the dummy users who don't really know how to install and those who don't want to bother with installation...

  2. No updates at client side required.
    Whenever an application is installed there are also updates needed. Installation and updating is always work needed - in most cases somehow the Administrator and/or the user is involved and somehow handicaped or interrupted in his work. Yes, this is very bothering and for the vendor it requires also to maintain the appropriate infrastructure for downloading updates and (on Windows) the appropriate feature set at the client checking for the updates. The advantage of the web application here is that every user automatically is using the most current version as soon as the server has been upgraded.

  3. Platform independency.
    Also a good reason to design a web application. But there are issues with different versions and types of browsers. So dependency from OS is traded in for dependency on the browser - which anyway seems to be the better choice...

  4. Accessibility.
    New users can usually get access to the application very fast - they only need to surf to the particular site and they are there. This is a very important reason to design as a web application if it is important to get the masses and those who only use the application from time to time. Nobody wants to invest additional effort for installation of a software he or she maybe uses only once and maybe the next time only in a year from now. Although - if we look at Skype for example - if a software is worth using, many people install it also locally.
Note: Using Java or Python for instance you could also gain platform independence without the need of using web applications.

While it sounds very good anyway to use web applications there are also disadvantages coming with this architecture - well there is no advantage without disadvantage - this people tend to forget. There are also good reasons for using thick/fat clients:
  1. Performance.
    Using a thick client data transfer can concentrate on the real data. All client logic and GUI is kept on the client. So performance of thhttp://it-tactics.blogspot.com/2008/11/web-vs-thick-client.htmle net traffic is in general better and servers do only have to deal with the server business logic and storage/retrieval of the data.
    AJAX and RESTful programming is a workaround to the problem of web applications that GUI and all the program code has to be transferred when the application is used.

  2. GUI Features.
    Thick clients have more freedom (access to local data) and more possibilities of GUI design (available widgets, drag and drop for instance).

  3. Available Offline.
    Thick clients can be used offline (if the application itself is not requiring the connection). For example data can be saved locally and can be transferred when you are online again. Only thing: The application has to support such an offline and online use (or synchronization respectively).

  4. Privacy.
    You might produce or deal with data that in a whole or in parts should not be transferred to the server. This is one reason why I think that a local office software pack can never be replaced by an online office. I think that there is no company that wants to rely just on the provider to keep the company data save and private. As an alternative the company needs to provide the appropriate server environment to provide the office functionality. Another example is CRM - I think that people prefer have their contacts locally with them.

  5. Different configurations and versions.
    Using web applications all users have the same version, this has already been mentioned. What in general is an advantage, can also be a disadvantage when you want only a few users to test a new version or when different users have different requirements. Firefox is a good example here: There is a basic product and a huge amount of available plugins. There will be nobody using all the plugins and Firefox would need a startup time of one hour and then hang up. Instead every user is using those plugins that are focused on the needs of the user optimizing productivity. This can only be done when every user is free to use an adapted version of the software.

  6. Distributed computing.
    Using rich clients you split computing power between server and client. Some applications are either focused on decentralized purposes - like file sharing for instance. It also can be an advantage if the application hangs - because then in more cases only the client hangs and not the complete application at the server.
There are good reasons for both types of architectures. I can say that I use both - web clients and fat clients and both make sense according to the purpose of the application. It is important to think of how you want to implement your solution. Don't take the decision to implement your program as a web application or a thick client just because of a hype or by looking at it from a religious point of view!

Related posts: Your holy machine, About agile software development, Web application security, Pros and cons of cloud solutions.

2008-10-27

IT investment

People smile at me when I tell them that I am still developing in Visual Basic 5 - Maybe you wonder also. (For the case you wonder why I did never do the change to VB 6: It was because of the IDE stability especially when using threads and other lower level Windows API - VB 5 was the better thing here which is another prove that new is not always better. ;-) )

Well, I learned more than 10 programming languages yet but I could hardly say that I can be very productive and efficient with all of them. It is one thing knowing the syntax, a second to know well the standard libraries, a third to know the libraries which are available out there from 3rd parties and a fourth of having your own libraries for the recurring jobs in your realm of work. Further it makes a big difference if you are using a language every day or only occasionally. In general it is better if you have one language that covers all your requirements (e.g. can be used for thick clients and web applications).

It takes years until a system has evolved and reaches it's maximum performance. What for me applies to the programming language used, applies for many other IT infrastructures also.

Let's say, you think of switching from Microsoft Office to Open Office. There will be some migration work and maybe a lot of annoying details (apart from macros that have to be rewritten) that will reduce productivity of the employees in the first step. And therefore you will not do it until it is really worth it.

IT changes fast but this does not mean that you have to be always the early adopter. The primary question should be the costs and the benefit in the long run.

There will be the time when the benefits of a particular change legitimate either big investments (of time and money). In my case switching to Java brings independence from the underlying operating system used for instance, easier network programming, better IDE support when developing web applications and other advantages. However it will take a while until I will reach the same productivity level and development speed as I have in VB where I can reuse libraries that I developed in the last ten years.

Not always big effort is needed for implementing new software products. Just remember that when you start investing more time into a particular product then it should be one that will be used a longer time and make sure that you use it efficiently.

Related posts: IT project costs explosion, The Open Source movement, Ignorance of the different.

2008-09-20

Data file format

Initially the XML format was a hype. It was praised for it's flexibility, human readability (clear text) and praised to be the ultimate solution for every export and import problem. Although it is true that this format can be used for many different things I never liked it.

The format is flexible, that is true, but other advantages are myths:
  • Human readability:
    Yes, it is a text format. But from the practical view it can be very difficult to get an overview in a bigger file. This because without an appropriate tool matching opening and closing tags are not obviously if the text is not really well formatted.

  • Data Exchange (import, export and application interoperability):
    That the XML format is very flexible is a disadvantage here but as any common format has to be flexible we cannot see this as a disadvantage here. The problem is different: No matter which format you are using you always need additional definitions on the tags, columns, sections or whatever - which elements are required, which are optional and what exactly are the allowed values. For application interoperability you always need a detailed specification on how the format is used and which elements. So the file format itself can never be a general solution.

  • Simple and efficient:
    Although the general rules are simple there are a lot of additional optionals like specifying DTD, parameters of tags or XML headers. But when I once tried to write a parser for XML you know that there cannot be an algorithm with real good performance on reading XML. Parsing other formats like CSV, INI and so on will always be faster. You need to use existing libraries that do that parse the XML for you if you have to achieve your goal quickly. Further XML cannot be efficient just from the character overhead. XML is simply big.
What developers already noticed has not yet been really broadcasted but there already have been created alternatives like YAML and JSON. Both formats are very easy to learn, very easy human readable, easy to create and easy to parse. And further they produce smaller files and hence produce less traffic. So I think those formats should be more enphasized in the future. However a lot of people are still betting on XML...

An argument for XML could be the possibility to specify element types and so on. Well, in any case there must be a business logic checking the input (in whatever format) for it's validity. I do not think that all type validation can be done through XML definitions. As there might be code logic involved also it is better to have only one place where checks are done.

Related post: Document file format, Ignorance of the different.

2008-09-18

The programming language

The list of available programming languages is very long - many are listed at Wikipedia. A comparison can also be found at Wikipedia.

I would say the most important languages are:
  • C(++)
  • Java
  • Python
  • C# (VB.NET, ...)
  • PHP
  • Javascript
If your favorite language is not listed here then be told that it does not mean that it is a bad language - not always the best things are those that are well known and popular.

According to my last post "The operating system" it is a logical conclusion to choose a programming language which can produce programs that run on several systems and are not limited to Microsoft Windows for example.

So from the languages listed above C# and the complete .NET framework is the one that is less portable to other operating systems. Although there is the Mono port from .NET to Linux, it is in the hand of Microsoft to give them the needed documentation and let them live.

But a programming language cannot be justified only by the compiler. I remember DOS times and the Borland Turbo Pascal or Borland Turbo C - we used them at school and it was not only a compiler - it was Integrated Development Environment. It supported the developer with tools and help. Nowadays IDEs bring features like
  • Debugger (one of the most important features of an IDE).
  • List available classes, properties and methods and autocompletion (also very important).
  • Quick-Help on the used classes and methods.
  • Code folding (collapse and expand blocks and methods to have better overview in the code).
  • Code highlighting (highlight keywords, search terms, matching brackets and so on).
  • Automatic proper formatting of the code.
  • Refactoring (Renaming classes and methods for example).
  • Assistant for creating specific code parts.
  • Macros and hotkeys.
  • GUI Designer (design window dialogs).
  • ...
Most of those features are included in every modern IDE.

From what I read in forums there are still many purists who write their code in text editors. vim might be an exception here because there can be added a lot of stuff and features to it, but mostly using a text editor you can't develop with the same productivity and performance as if you were using an IDE. So IDE is an important thing.

The .NET has a huge IDE and in general I liked also the previous Visual Basic IDE which (if looking at version 5 and not 6) was also very stable and reliable. The .NET IDE however I do consider as bloatware and unstable. That is was just was my experience with the Visual Studio 2005. And for the Visual Studio 2008 I do not have enough harddisk space left. Although there are alternatives to Visual Studio I am sure that the Visual Studio is a more complete suite. I tested only SharpDevelop which lacks on debugging. Installation size of Sharpdevelop is less than 40 MB - I didn't believe that is possible to develop .NET applications with GUI (yes, a GUI designer is included) only with such a little piece of software where Microsoft needs more than 1.5 GB - although I must honestly say that there is no .NET documentation included with SharpDevelop.

In my opinion the portability and the availability of a good IDE are the two most important aspects. As I am using Windows and Linux it should be either an IDE that nearly looks the same on both platforms. Another important thing is the time that you need for getting up and running. The optimum would be if you either can learn the language fast.

I tested several IDEs (or at least tried to install them and get them running) - I tried IDEs for Python, C++ and Pascal as well as for Java.

The largest number of IDEs are available for Java - here I tested Eclipse and NetBeans. Eclipse focuses on SWT from the GUI design (additional plugin needed) and NetBeans on Swing. Eclipse and NetBeans are already very powerful and they are free.

For me the time needed to get up and running and to start into getting productive was shorter on NetBeans and further I prefer the Swing concept because the technology offers more freedom in developing more sohisticated visual controls and more independent from underlying OS. The disadvantage is that the core dialogs like a file chooser do not look as the user might be used to. But as I work on Windows and Linux I already have to get around with two different dialog variants and so at least in my applications the dialogs (the core dialogs and all the other window controls) look the same no matter on which OS it is used.

Although I also like Python very much I could not find a good IDE that is available for free. For C++ I found Code::Blocks which is available on several platforms. For Windows they have a combined setup download including the MingW C++ Compiler. C++ is for me the only real alternative when trying to write code for several platforms. However I know from my earlier experiences with C that writing C-Code you have to pay more attention and it is very likely that you write more buggy code with C than with most other languages (not C-like). But the biggest advantages of C are the faster code and the more complete access to and management of the system resources. Here Java has a disadvantage as it has no direct access to drivers of particular hardware (e.g. a scanner) that might be connected to the machine - you need wrapper libraries to get around this problem. Further C is fitting better if you write commercial software because Java programs can be decompiled easily (and also .NET applications).

Another option is PHP which is platform independent. Although there is a possibility of writing standalone applications PHP is basically for web applications only.

From the portability and usability point of view in my opinion Java and C++ are the two favorite languages to use in the long run as you can't be wrong betting on those. Regarding web development there a lot more options (PHP, SWF, AIR, FLEX and so on) and I do not have the confidence to give a good forecast on that.

Related posts: The operating system., Homogeneous programming style, Popular Java myths, Install NetBeans on Ubuntu 10.04, The future of Java, Choosing a programming language, Java vs .net/C#.

2008-09-14

The operating system

When I learned my first lessons on how to handle a Computer I took the DOS operating system for granted (it was a very early version) and I did not have an idea that there are also others. When I got my first own Computer I have chosen one that already had a very powerful version of Basic included. When I got to school most others had a Commodore 64. Although my Computer was better from the architecture it was less popular and after a while I also switched to a C64 otherwise I would not have been able to talk with my companions and I could not play games with them - because for the Computer I had there were not many games available.

I am telling this because it is a good example of the fact that not always the best technology is the one that gets popular. This is a sad truth.

When we got the first XT PC at home it came (still/again) with DOS (although some newer version) and later with a 286 the Windows times began. At this time I did not knew that there were already other operating systems existing - I simply didn't know them, nobody of my companions were ever talking about something else.

At the IT specialized school I attended we learned something also about Xenix (a Unix type OS) and BS2000, but the main focus was on the PC - maybe because of the simple fact that we all had a PC at home by this time. So it was simply the most popular. And it was the most popular maybe because it was available to everybody.

For years DOS and Windows was normal for me and the only relevant operating systems. A few years ago I noticed more often existence of other operating systems. By this time I was already used to many flaws and bad concepts of the Windows OS and only after experiencing a lot of frustration and after compassionate looks from other people (using Linux) when I complained about my problems I started to get more interested in trying an alternative. By this time there were only few attempts just to do some first tests and it was awful. If you are used to do certain things in a certain way for many, many years then it is hard to get along with something that works a little different.

Since about two years I am using Linux at home (the Fedora distribution in particular) and here is why I switched away from Windows:
  • I had some bad experiences with hardware failures and on Microsoft Windows it was hard / impossible to find out what the real problem was because it was simply running slow and unstable. This is behaviour that can be seen with a lot of Windows software: Problem analysis can be very difficult and error messages can be misleading.
  • I tried to backup some data I didn't have a copy from so far and the burned CD showed empty on Windows - even on a workstation that was intact. When I gave Linux a try the CD was completely readable and I got my data. So Windows was simply not reliable any more for me for basic features such as "is there data on my disc?".
  • Windows is expensive - not talking only about the licence cost - I am talking about the complete Return of investment. For some simple additional features Microsft waits to include it in the next version instead of adding it to the next service pack for older versions.
  • When installing Windows you get a very basic set of features only. For word processing, spreadsheets, presentations you usually have to get a version of Microsoft Office also. A good alternative (at least for what you usually need at home) is Open Office. When installing Linux Open Office comes already with the OS.
  • The software installation and deinstallation architecture on Windows is fault-prone. It is seen as "normal" that a Windows machine after a lot of software installation and deinstallation gets slower and more unstable and after a few years has to be completely reinstalled.
  • A lot of useful additional software for Windows is payware.
  • It is seen also as "normal" on Windows that even a server has to be rebooted on a regular basis to ensure that the system runs properly.
  • The business conduct of Microsoft does not fit to my understanding of fairness, honesty and correctness (there are a lot of other companies not fitting as well :-( ).
Since I switched to Linux my view of the world grew larger. There are a lot of other Operating Systems and technologies around that are not used by Windows but make a lot of sense. Windows is really not alone in the field - have a look at the list of operating systems for example. From my point of view some of the most important are (still) Microsoft Windows, Linux, Mac OS X and BSD.

I have the very clear opinion that an Operating System not opening it's interoperability for being used together with other systems and technologies will not make it on the long run.

Related posts: Why I have chosen Fedora, Why I switched to Ubuntu, The hardware, Installing your PC from scratch, Why Linux?, Going Linux, The Microsoft logic.