2009/04/27

"Windows versus Linux": yet another opinion


Introduction


It is widely known that "Linux vs Windows" is one of the most popular discussion topics. There are numerous large threads (for example, this one), discussing this question. Typically such threads never end (unless they turn into flamewar, and moderators close them), and new messages are being added during many years. After reading yet another thread where several people tried to prove that

Why is this question so popular


People keep discussing this because of (on of the) following reasons:

  • Because they see only better side of their operating system, and refuse to accept that there are weaknesses in their operating system.
  • Because they finally discovered that "there is no ideal operating system", and are trying to explain it to someone else.
  • Because they don't know which OS is more suitable for them, and didn't think about using search engines
  • Because they like trolling. (Windows/Linux/MacOS users are very easy to enrage by making comments about their operating system)


Why Linux users discuss it


(Based on personal experience, not guaranteed to be true about every user) Most linux user go through "fanboy" (or "euphoria") phase. This typically happens within few months after user learned basic skills and medium-level system skills, used few applications, made first useful shell script, learned iptables, etc.

For example, there is a KDE application called kstars, which displays night sky for any place on earth for any date within few thousands of years from now. It also can control telescope, and has access to large database of stars. And it is free. And you can get its' source code, read it, modify, and derive your own application from it, and sell it. Now think about it - you have very complex, cool-looking application, which can control telescope, display sky for any point on earth and any date in human history, AND it is free, AND you can get source code, sell it. Even though I knew about GPL long before I discovered kstars, I couldn't understand how this is possible. And there are tons of very useful shell utilities, graphical desktops, compilers, browsers, there is web-server software, ipfilter software, and tons and tons of other utilities and all this is free. If you are know at least a little bit about programming, you will be able to estimate how much it would cost to develop all this stuff. If you have some medium-level programming skills, then you will be delighted to discover that you can tear any piece of software apart, read its' source code, understand how it works and modify it. When you will understand all this, (especially if you are a programmer) your mind first will refuse to accept this("how is this possible? We are paying for other software, why all this stuff is free?"), and then you will decide that you are in heaven and linux is the best thing ever created by mankind, so you should go forth and spread the word about opensource.

Congratulations, at this state you will become a "fanboy" which will attempt to convert all friends and relatives into using linux. This attitude will eventually wear off (it will take from several weeks to several months, depending on your personality. Some people are never cured, though).

Why windows users discuss it


Honestly, I have no idea. I've been using Windows for several years, and it never looked like something I would say is "the best operating system ever".

Personal experience with both platform


Windows: pros and cons


Pros:

  • Well-known, widely spread, has most market share.
  • Supports newest hardware.
  • Has games.
  • Has visual studio (don't get me wrong - it has a bunch of really horrible features (like IntelliSense), but VS2005 had best GUI I saw since Delphi 5)

Cons:

  • Price.
  • Malware. You'll need AV software to deal with malware/viruses, and not all AV packages are free.
  • For most problems solution is reinstallation
  • Reinstallation takes forever. If you have a lot of custom software, which is configured for your needs, and managed to completely kill your system (so the only reinstallation from scratch will help), then it will take up to several days to repair everything.
  • Program settings are hidden in registry, which isn't really well documented. Which means if registry is damaged, you will lose all program settings. Also, it won't be that easy to recover the registry.
  • When you discover a bug, you are not allowed to fix it, even if you can. You'll have to wait another patch, which will introduce more bugs.
  • Poor quality of desktop environment. Only one desktop, can't configure shortcuts (not on WinXP, at least).
  • Fresh installation has poor selection of software and can't do much useful. Will need codecs, etc.
  • Many system-wide actions require reboot.
  • License conditions. Average Windows (XP) machine is allowed to connect 10 network devices at once (fixing this will probably break EULA). As far as I know, there is also limit on the number of hardware upgrades.
  • Commercial software isn't guaranteed to be free from bugs, to be usable or to do what you want. See EULAs.
  • Doesn't include development tools.
  • You can't legally become better programmer by analyzing this system - source code is available, reverse-engineering s forbiddeb by EULA. Basically, it is a car where engine compartment is welded shut.

Linux: pros and cons


Pros:

  • Price.
  • Several very configurable desktop environment (always liked KDE desktop, never liked Windows desktop)
  • Supported hardware "Just works" without additional steps.
  • Large amount of software available.
  • Very good environment for a programmer (unless he/she uses .NET) Provides good opportunity to learn code, use source from real projects (instead of book examples), many languages and dozens of free tools.
  • Most problems can be fixed without reinstalling system.
  • Most actions doesn't require reboot.
  • No limit on the number of connections, number of hardware upgrades.

Cons:

  • Smaller selection of commercial games. However, smaller companies tend to create Linux version of games more frequently.
  • No alternative to visual studio. Quality of free IDEs will vary. However, working without IDE seems to be the best option, and even simple text editor might be used as a sufficient alternative.
  • Newest hardware frequently isn't supported - because manufacturers do not want to create drivers or doesn't provide specification.
  • Using USB devices (web-cameras, scanners, cameras) can be a real trouble.
  • You should be willing to learn something to be comfortable on Linux.
  • Less popular than windows, although frequently used in large number of network devices (routers, modems, etc)
  • Available software might not be completely finished, and probably is still in development. On other hand, this also applies to commercial software.
  • You will have to be careful when upgrading hardware - you will have to research if your hardware is supported before purchasing something. Linux will work fine on old machines, but if you have top hardware (which isn't supported yet), you might not be able to even install Linux in some cases. This issue is known to cause problems for people that suddenly decide to move from Windows to Linux.

Commonly used myths and incorrect arguments


General



  • "My commercial applcation isn't available on your platform! Therefore, my platform is superior"

    Not true. When you have application you can't live without (maybe it is your main source of income), then using this application is more important for you that choosing certain operating system. I.e. you use OS where application works, instead of using applications that work on your OS (as people normally do). This is not an OS problem.

  • "Average user can't use Linux!"

    First, there is no "average user". Self-proclaimed "experts" often can get stuck with basic problems, while inexperienced novices can solve difficult things because it is more interesting for them. System administrator or programmer might have problems with word processors, while someone experienced with word processor surely will have problems compiling even basic application. Every user has his/her own area of expertise, and because using computer doesn't require license, everyone can be a computer user. Which means there will be no "average"

    Second, "complete newbie" can use Linux system in the same fashion as Windows machine. This is because configured Linux system doesn't look too different from windows machine. On Windows machine you will have graphical desktop with icons and buttons, where each program is window, and each window can be moved/resized with mouse. And, guess what? On Linux it will be exactly same things: graphical desktop with icons and buttons, where each program is a window, and each window can be moved/resized with mouse (although software is slightly different). To my experience true computer newbie will operate both systems with similar level of success, and might not even realize which operating system is installed on his computer.

  • "Linux is more difficult to learn"

    Not true. If you start from zero level on either system, you will have to spend similar amount of time to learn it (kids should have least amount of problems learning either system). No one learned windows instantly.

  • "Linux is only for geeks"

    Isn't anymore. Linux was only for geeks when it was created. Since that time, Linux has gone a long way, and right now there are several companies attempting to make Linux into a product suitable for everyone, "for novices" or for mythical "average user". While making a product useful for everyone isn't a good idea (what is easy to learn isn't always easy to use, and vice versa), there are couple of distributions which everyone can install from scratch.

  • "Linux is for everyone"

    No. Linux is free, and because of this, it demands something from you. To be able to successfully master Linux system, you should be willing to learn it. If you do not want to learn, you will not master the system (although you still might be able to use it for some extent). Also, if you have to use software which doesn't work on linux, then you won't be able to keep Linux as the only operating system on your PC.


Games



  • "Linux don't have games!"

    Linux has large amount of games. The problem is that there is a relatively small number of commercial games (examples: Doom 3, Penumbra, Unreal Tournament 2004, Quake 4, Darwinia, etc), for whatever reason. You can run some of the commercial windows games using WINE software (or similar commercial derivatives), but you will get minor performance drop if game extensively uses shaders, and you will get problems if games uses certain copy protection mechanisms. However, Linux has a large amount of free games written by hobbyists. One resource for them is happypenguin.org. Notable examples of free Linux games include Alien Arena, Urban Terror, War$ow, America's Army, Sauerbraten, etc.

  • "Linux isn't suitable for making games":

    It is suitable for making games. You have advanced graphic API (OpenGL, which is easier to use on Linux, because on Windows default supported OpenGL version is still 1.x), generic cross-platform framework (SDL), several free physics engines and a bunch of similar libraries. Also there are ready to use game engines, like Ogre3D, Sauerbraten's Engine, etc. And you have tons of free tools for every gaming task.

  • "Windows has best games" or "Windows has better gaming experience"

    This is not true. To my experience, best games are available on consoles, and PC gaming terribly suffers from one big PC problem: hardware. The problem with PC's hardware is that it is flexible, and every user will have different configuration. This will make hardware developers either spend too much time trying to make game work on every video card ever created (instead of spending this time on making better game), or place high system requirements (so you will be able to comfortably play the game only two years later after several hardware upgrades). Another problem is that there is a low number of high-quality games on PC. Latest titles I bought (Fallout 3, Spore, L4D), were clearly overhyped and didn't provide quality I expected. Sure, you will be able to spend several dozens hours playing this, but you will very quickly reach the point where you know everything and don't want to play game ever again - because there is nothing left to do and you already know how to beat it. In short: best games on PC currently are only mediocre, and I'd like to play a masterpiece. The games that are not "the best ones" focus on graphics too much, and because of this gameplay suffers. Another problem with PC games is that once game is released, instead of playing it, you will spend most of your time tuning performance, fighting bugs and crashes, and waiting for patches that will turn game into something stable and playable. Whether you like it or not, a PC game released without bugs is a very rare sight, which spoils PC gaming experience in general.

  • "Linux doesn't have DirectX 10"

    True. But I haven't seen a game that couldn't work without it. Every game created so far with DirectX 10 support seems to use it only for minor, small graphical improvements. I haven't seen a DirectX 10 game with a truly astonishing graphics. For example, compare Quake 1 and Quake 4. If game uses "superior" graphical API, it should provide similar increase of graphic quality. This means, that DirectX 10 game when compared to the best DirectX 9 game should look as Quake 4 when compared to Quake 1.


Hardware



  • "Linux supports small number of hardware"

    Only partially true. Linux has a good support for large number of devices, which is provided by the kernel. Which means that on Linux system if hardware is supported, it will work out of the box. While on Windows, you will have to search for drivers. Buy a new ethernet card, install it in WinXP machine and you will have to search for a driver. And if you've just installed windows on completely new computer, you will have to search for several drivers. Until you find all of them - your machine might stand here without sound and network access. On Linux this card will work right now.

    However, Linux does have trouble with new hardware, USB devices (cheap web-cameras, scanners, force feedback on joysticks). This is because most hardware manufacturers don't support Linux, and don't provide specifications for writing drivers. Which means, some time will have to pass before someone reverse-engineer device protocol and write a Linux driver for it. Which means when you decide to upgrade your computer, you will have to check if new hardware is supported or not.

    On other hand, situation with hardware on windows isn't that great. For some reason, with each year driver packages tend to become larger and larger. Sometimes, just one driver takes more megabytes than entire Linux kernel. If you have a very fast connection, this won't be a problem, but if your internet speed is below 500kbps, this will quickly become annoying. Also, many windows drivers are buggy. I was very surprised to discover than on WinXP my "Vista Certified" motherboard produces slightly noisy sound (can't be fixed), while on Linux same problem doesn't exist, I have better sound quality, although motherboard isn't officially supported.


Software



  • "Linux doesn't have any good software"

    On contrary, amount of Linux software is quite large. Currently average Linux distribution includes Word Processor, compiler, several music players, several different image editors, several IDEs, and several desktop environments on the same DVD. So when you install it, you have ready to use working environment. On windows, after first installation you'll have empty machine that can't do much useful - you'll have to spend several hours installing codecs, Adobe Acrobat, your Office Suite, IDE, normal music player, and so on. The downside of all this is that most of the linux software is provided "as is, without warranty of any kind", and many programs are still in development. Which means some of them might have unfinished features, etc.

  • "I don't want to compile software"

    On large number of distributions, software is installed via package manager - you won't have to compile anything (unless you are using Gentoo, LFS or Slackware). However, it is highly recommended to learn how to compile programs manually - sometimes software might not be available via package manager.

  • "Compiling software on Linux takes hours"

    Not on modern hardware. Only largest packages (Qt 4, KDE, etc) might take hours to build. Normally software compiles within 5..15 minutes.

  • "I don't want to compile kernel on Linux"

    You don't have to compile kernel. Most distribution already provide properly tune kernel for you. Unless you want to make your machine a bit faster, you don't want to attempt rebuilding kernel yourself.


Communities



  • "If something breaks on Linux, community will help you"

    Not quite true. Community will try to help you. However, people in communities are mostly volunteers, and they might refuse to help you if:


    • You didn't read and apply rules from "How to ask questions the smart way"
    • You haven't tried to fix problem yourself.
    • You didn't ask question properly ("Help me, please" is not a good idea);
    • You just wish someone fix your problem for you (and for free).
    • You complain about things, and say something like "This didn't happen on windows"

    Also, quality of community (skill, knowledge level) depends on distribution. As far as I know, most helpful/skillful people use most difficult distributions (Gentoo, Slackware), however they may be a bit strict about the "rules", and you will have to ask question properly (and read "How to ask questions smart way" - it isn't that hard) to get high quality help. On other hand, communities that use "simpler" and "friendlier" distributions are not guaranteed to have skilled users (personally, I had serious trouble with advanced questions on Ubuntu communities).

Licensing and philosophy



  • "Open Source is the way software all should be distributed! It is the future!":

    Unfortunately, this isn't true. Open Source software has one serious problem: you can't earn serious amount of money by making programs and selling them. Don't get me wrong: you still can earn some cash from donations, or by selling merchandise (T-shirts, toys, gadgets) which is somehow associated with you program, or you can sell CDs/DVDs with that program, but you can't sell the program. At least, not with GPL. Of course, GPL allows you to "sell" programs, but once you do this, anyone can resell your program for lower price, or give it away for free in unlimited quantities. I believe this is one of the reasons why large software companies aren't releasing their products under GPL. Of course, there are other licenses, like BSD license, but software under those licenses can be easily converted into proprietary. So, although Open Source is (in some cases) good for software development, it isn't really good for software developers. I don't think you can make the living by developing your own OpenSource software.

    Another problem is that OpenSource doesn't seem to be suitable for at least one kind of projects: games. Sure, there are many good games made by individual developers, but I haven't seen a sophisticated OpenSource game with a great story, music, gameplay and art. I'd love to see gaming masterpiece (for example, something comparable to "Max Payne", "Silent Hill 2", "The Movies", etc) developed under OpenSource license, but it looks like such game doesn't exist. Another interesting thing is that good OpenSource games (for example, War$ow) use different license for their art, music and models, and typically this license is proprietary. Which makes me believe that OpenSource isn't suitable for making games, only for making game engines (which is different story).

  • "Proprietary software always is the best!"

    Unfortunately it also isn't true. When some software is being developed by a single company, they control the course of software development. While it is exactly what you would want in game development, it isn't always good for other kinds of software. Software developer might decide to add flashy GUI with dozen of bugs instead of making software more useful for you. Or it might decide to change course of development, so the next version of software will not meet your requirements anymore, but will appeal to larger audience. And another problem with proprietary software is that once it is broken, you are not allowed to fix it, even if you can do it. And Let's not forget various licensing and DRM problems. However, this was already discussed many times.



The Truth


The truth is that there is no "the best" operating system. Every OS that is available has problems in one or another area. User's goal is to pick operating system that doesn't have problems in important (for that user) area. For example, if you don't use some windows application, lack of its' alternative on Linux won't be a problem for you. Or if you don't use some linux utilities (dd, mount, iptables, cron), their unavailability on Windows won't be a problem for you.

So, What should I do about all this?


Nothing. "Linux vs Windows" appears again and again and again. People keep using same arguments over. Some people provide a very lengthy, detailed responses which cover common problems and provide a really good comparison of operating system, but large amount of people don't read them, and simply jump in discussion to prove their point. So the best thing you can do about those discussions is never participate in them.

Links


Linux is not Windows
How to ask questions the smart way

2009/04/19

Time management: how to get things done (if lists doesn't help you)


Although this blog is supposed to be mostly about programming, I decided to post one "self-improvement" tip which was useful for me.

Standard approach



Everyone(or most people know) know that normal way to deal with tons of things you should do today is to make a "to do" list for every day. In ideal case you should have several lists - list of long-term goals (lifetime), mid-term goals (several years), short-term goals(several months) and list of things that should be done right now (today, during this week, etc). Every day your to do list should contain several items from each list (or items that will bring you closer to reaching goal from each list), that should be written down according to their priority. I.e. if your mid-term goal is to learn new language, and immediate goal is to buy food, your daily to-do list should have one item for each of those goals. This looks neat, easy enough, however as I found out, there will be several problems.

Problems


Typically with standard to-do list, following problems arise:

  • One item from the list takes too much time or even all your time.
  • You don't really want to do that right now.
  • One of the items on the list looks like it will take too much time today, so you decide to do it tomorrow. Tomorrow, same things happens again. As a result task is not being completed within weeks or months.
  • You have too many long-term goals, and can finish anything, because they all take too much time, and can't be finished during one day.

Part of those problems arise from natural laziness - your consciousness (or subconsciousness) will invent various excuses to prevent you from doing anything useful. It is hard to understand why your own mind is against you, but this thing happens. Another part of problems will happen when you will incorrectly estimate time required to finish the task. Also, life is full of surprises, and it is quite possible that something will get in your way and you won't be able to finish some important task today because of external events.

Solution


There is a very easy solution for those problems (I haven't seen it written anywhere, which is why I've decided to post this thing here): when you make your daily "to-do" list, for each task write down how much time you will spend on it today. For example, if you are learning new language, (to my opinion) you will learn a lot if you will exercise for 30 minutes every day.
When you start your day, for each task spend as much time as you wrote down in your to do list (Unless you finish the task faster than you expected). Of course, this time you should seriously work on the problem without fooling around, without being distracted, etc. If you won't finish task in time, proceed to the next task, and put unfinished task on tomorrow's "to do" list (you might want to adjust time according to today's experience). If you have a lot of tasks for today, you can spend 30 minutes for each. 30 minutes isn't much, but you still can do a lot during this time.
This approach is incredibly useful for a very long goals (write a large program, learn language, study something huge, etc). At least it works for me, so I think it will be useful for someone else.

2009/04/18

The most annoying problems in Mozilla Firefox 3.0.6


Introduction


Many people love Mozilla Firefox. For some reason it surpasses opera browser in popularity (or at least, it is said so) - possibly because it might be better than IE, or perhaps because of number of extensions, or because Firefox is yet another example of OpenSource philosophy.

List of problems


However, it has some problems that are clearly not going to disappear any time soon.
Below is the list of those problems. All problems happen on dualcore linux machine with 2Gb of RAM. Most of them exist on Windows XP as well. So you can't blame hardware or operating system.

1. Bug with resizing windows.



How to reproduce: open any Firefox dialog (preferences, or whatever). Now drag bottom right corner of dialog to the left and up. See what happens:


Typically this is a standard problem which occurs in GUI applications made by beginner programmer. However, in Firefox this bug has exists at least since 2.0.0.x version.

2. Slow startup


Firefox 3.0.6 takes at least 8 seconds to start up, more if it is started from "cold boot". On my system "cold boot" launch of firefox takes at least 15 seconds. This is quite annoying.

3. Firefox frequently stops responding


Firefox frequently stops responding for a very long time. 10, perhaps 30 seconds. Normally this happens when you type something into "location bar" - there is a very good probability that browser will hang in the middle of the word, won't accept any input for quite a while, and even won't repaint browser window. After "sleeping" for quite some time browser will suddenly wake up and finally show the rest of the phrase you were trying to enter. Firefox also stops responding for prolonged period when you open history. Or when you try to search history. Or when you attempt to close browser (which can be seen here). It also happens randomly when you try to load pages. It looks like problem is related to the way how browser history is stored. The problem exists since the first release of Firefox 3.

4. It is not possible to right-click link on the page when another page is loading


This is the only problem which exists on Linux only - It is not possible to right click a link on the page in the tab if another page is about to load. Doesn't sound like a big problem, but it is still annoying.

5. It is not possible to disable javascript when "alert" is being shown


Without adding more extensions it is not possible to disable javascript when you see alert shown by javascript. Have you ever run into a script which launches series of "alert" messages? When you run into such webpage, you will easily notice the problem.

6. No reasonable keyboard navigation


Caret mode is a joke - it is simply too slow when using from keyboard. And although it is possible to instantly focus to individual tab using keyboard shortcut (which is good), it isn't possible to navigate page with reasonable speed using keyboard only. For example, in Opera you can quickly navigate between links on the page if you use Shift+Arrow Keys, in firefox this feature is still missing.

7. Page loses focus for some reqson


On completely random occasions interesting thing happens: you can't jump to location bar using keyboard shortcut unless you first click on the page with mouse.

8. Stops responding to keyboard shortucts when flash movie is shown


When there is a flash content on the website, it is possible that you won't be able to close tab with this content using keyboard shortucts (Ctrl+F4 or Ctrl+W), unless you first click on the page somewhere outside of the flash content. Same things seems to happen with java applets as well.

9. It is not possible focus to "find" box without mouse if you view image


Assume you were viewing some page, tried to find some text on it (using Ctrl+F) and then opened some image in the same tab. You will notice that "Search" window is still present at the bottom of the screen. On normal page, to dismiss it without using mouse by pressing Ctrl+F (which will move text entyr cursor into search bar), and the "Escape" In case of image this won't work - you'll have to click on the text in search bar, then press "Escape". Happens frequently.

10. When saving picture to hard disk, it looks like it is being downloaded again


This is simply illogical. When you right click on any image and attempt to save it to disk, "Downloads" window will appear. On window platform picture will be even scanned by antivirus. I just don't understand why this works this way. Picture is already inside of browser cache, so there is no reason to downlaod it again - it will simply take longer.

Conclusion


So far I know the only two reasons to use firefox

  • Ad Block plus
  • some plugin which is supported only on Firefox.

Other than that, Firefox 3 gives the impression of unfinished and unpolished product with a lot of problems, several bugs, and very poor support for keyboard-only navigation.