The competition for compiling Operating Systems: Windows or * nix

Source: Internet
Author: User

Platform competition: Windows or * nix

This article is excerpted from the book Orange's: the implementation of an operating system.

Readers may find that the words "if you are using Windows" or "if you are using Linux" often appear in the book. Sometimes such words may even affect your reading. If so, please forgive me. I try to take care of as many readers as possible, but for everyone, there must be a choice-Under what platform to develop. The first version of this book uses the Windows platform, and in the second version, I am sincere. Next, you will find that, although in the future, windows will be taken into account to the maximum extent, but Linux is the default platform in general.
In fact, under what platform development is sometimes purely a matter of taste or environment -- what you use when you get started with computers depends largely on what people around you use, this often has a huge and far-reaching impact on your taste. However, the first contact may not be the most appropriate. After my experience and comparison, I decided to switch from windows to Linux completely. I would like to explain here why. Please note that this is not a promotion meeting, nor a chapter that you must read when developing your own operating system. I just want to talk about my personal experience and hope to inspire you, at the same time, I want to explain why the second edition has such a change.
I was already using Linux when I was writing the first version, but I didn't use much of it. I felt that I was not used to it. Now, after two or three years, I have basically no longer used Windows, in Windows, I am not used to it. My experience has at least two inspirations: first, it is a misunderstanding that Linux is not easy to use (there is a saying that Windows desktop is easier to use, which is a complicated misunderstanding ), it is a habit. Second, if you are interested in using something you are not familiar with, don't give up because you are not used to it at the beginning.
In fact, there are many misunderstandings about Linux and Windows, which I refer to as differences in operating system culture. In fact, when talking about two systems, people often compare specific things. For example, compare their installation process, usage, and even the interface. But what actually hides behind the surface is two completely different types of culture, or different ideas.
For Windows, its culture is rooted in Microsoft's vision of "having a computer on every desktop in every family." of course they want the computer to run Windows OS. This ideal, coupled with the nature of windows as a commercial software, determines that Windows has a considerable degree of affinity, and the user interface looks quite friendly. More friendly than ever, it is very friendly to everyone-whether children or the elderly, have received higher education or have only been in elementary school-can easily start to use computers, this is undoubtedly Microsoft's great contribution to this society. But the interface is not necessarily perfect. For now, we will talk about Linux first.
The Linux culture is largely derived from Unix. The culture advocated and followed by UNIX is also known as UNIX philosophy [8]. one of the most important principles is "doing one thing and doing it well" [9]. It sounds like it is not the same as Windows interface, but it is actually closely related to careful analysis. Doing one thing and doing well means two things. The first thing is that tools can work together. Otherwise, each person does what they do and cannot complete complex applications. The second thing is that interfaces should be unified, otherwise, collaboration fails. This unified interface is text stream, which means that the command line is the core of UNIX culture. Windows practices are quite different, because the interface is friendly, so you cannot expect users to know how to concatenate tools together at the beginning, therefore, Windows selects any application to complete all functions by itself-at least to make the user look like this, which makes every tool independent, thus increasing the complexity and development cost of every program. Not only that, because the functions are set by software developers, you basically cannot expect most programs to be scalable. in UNIX, most programs can work with other programs to complete functions that are not "designed" by the program. This is also the reason why I said "the interface is friendly and not necessarily perfect". There is a price for the friendliness.
Is UNIX a "unfriendly" system? This problem is not as simple as it looks. First, the popular desktop environment in UNIX is getting more and more "friendly". You can even configure it to look like windows, but the key point is not here, but in the long term, the learning cost of UNIX is not higher than that of windows, but the benefits are much higher. As we just mentioned, being friendly has a price and the price is higher than imagined. For a beginner, the simplicity of his start may lead to the illusion that a computer is a simple device, but this is not the case. In case of trouble, the user may be helpless, once there is one thing that no ready-made software can solve, you can't do anything at once. Different from UNIX, the learning curve is steep, but once you get started, you will find that your work can become so easy and interesting. In Windows, although the first step of using a tool is often easy, you will soon be lost in a bunch of nested menus with deep names, learning these menus is not easy, and what you learn in one tool may change to another. If you want to see the help of the program, it is sometimes difficult, because in order to achieve "friendly" effect, the help is often layer by layer, it is difficult to find the content you need. In UNIX, all tools have a manual (Manual), which can be viewed through a unified command "man", and these manuals are flat, you can view the keywords at any time. Besides a few extremely complex tools, manuals are basically adequate. In short, in UNIX, the use of software seems complicated. In fact, if you really want to master something, you will not spend more time than in windows. Moreover, in Windows, it is hard for you to master something.
I did not mean to belittle windows. I have said that it has contributed a lot to society. For a user who only uses a computer to receive emails and watch movies, its ease of use is definitely a huge advantage, but you and I are not such a user. I believe that all the people who read this book are programmers, and they are programmers who like to explore just like me -- programmers who do not like to explore are hard to write their own operating systems for recreation. A programmer's requirements are different from those of an ordinary user. A programmer needs to understand his computer, master it, and skillfully help him complete his work. From this perspective, UNIX is undoubtedly a huge advantage. Every tool in it is sharp. You can combine and use it for a long time, and it will not be outdated for many years.
Here I can give an example that I have encountered. When writing an operating system file system, I need to view the content of several slices multiple times and analyze the data. In Linux, I can easily concatenate tools such as OD, grep, sed, and awk [10]} to complete this job. I can also write a simple script, put the command in the script for ease of use. In Windows, I usually only have to click the mouse repeatedly between windows, which is time-consuming, labor-consuming, and inefficient. There are countless examples. Once you are familiar with these tools, you will find that by combining them, you can get more functions than any graphical interface tool. In Windows, you have to look at the specific menu colors. Moreover, UNIX tools are often used for a long time after learning. For example, most of the tools mentioned above have a history of more than 20 years and are still widely used. Even if they are difficult to learn, they will be shared within 20 years, the cost is also very low. This is the Unix philosophy. You don't need to learn it again. Every tool is easy to use and can play a variety of roles by combining it with other tools.
Most software in Windows has a problem. It often tries to hide something. It is intended to make the interface more "friendly", but this is sometimes a bad thing for programmers, because it makes it difficult to thoroughly understand what the software is doing. You may say that if you want to understand, you can always understand. Yes, this is similar to the proposition that "everything you can do in UNIX can be done in Windows", even if you only need to install some additional software (such as cygwin ), you can use Unix commands in windows. The problem is that even if you can do it, you may not do it. This is the so-called force of culture. In theory, you can read and study anywhere, but the most efficient place is the classroom and study. On the comfortable sofa in the living room, you can pick up the TV remote control.
So in my own experience, it is better for a programmer to use a Unix-like operating system. It can help you improve your level and work efficiency in your daily life. This is a bit similar to photography. The largest number of dummies on the market is dummies, but a professional photographer always chooses specialized devices with complex functions, not dummies, but who adapt to different groups of people, if you want to be a good photographer, the easy-to-use dummies camera is definitely not your final choice. It's not a good question, it's an unsuitable question.
The above is a cultural difference between the two types of operating systems. In fact, even purely at the application layer, there are also many misunderstandings, such as the following:
Misunderstanding 1. It is difficult to install Linux. If you have been difficult to install Linux, I suggest you try Ubuntu next time. When I started writing the first version of this book, Ubuntu's first version was not released [11], but in just a few years it has become the world's most popular release [12]. this is inseparable from its ease of installation and usability. I started using Linux on a large scale from ubuntu. The installation process is no longer difficult than windows, and the Chinese information is quite rich, so it is easy to find like-minded people. Another feature of Ubuntu is its rich drivers that support a lot of hardware. In most cases, drivers can be automatically installed without the user's involvement, in this regard, it is even more "friendly" than windows ".
Misunderstanding 2. Linux is hard to learn. I hope you will always remember that a computer is not a simple device. Whether it is hardware, operating system or application software, it is often much more complicated than it looks. So it may not be a good thing to be easy to use. It is worth hiding something from you, especially when you want to be a programmer. Moreover, Linux is not that difficult to learn, not to mention that its graphic interface is getting better and better, that is, it is quite easy to get started with command line. In addition, the documentation in the Linux World is complete and easy to search, and there is a highly developed community culture. Here you often learn more than expected.
Misunderstanding 3. Linux is difficult to use. The learning curve of Linux is steep. However, once you have passed the initial adaptation period, you will find that the original command line is so useful, there were so many tools to improve efficiency, and these useful tools were actually free [13]! You don't need to pay the author, or even encourage you to use and spread it. You can even modify the source code of these tools and send an email to the author if you have any problems. This is hard to achieve in windows, and it is hard for you to understand the concept of "freedom" in that land ". In addition, when you are familiar with it, you will find that the solution in Linux is usually simpler than that in windows. For example, we have mentioned an example of installing bochs. In Windows, you usually need to go to the bochs website, find the download link after several clicks, and then download it, then, double-click the installer to install it. In Linux, you can see that you only need a command line. Even if you are typing slowly, it is faster than the mouse clicking operations.
I am not here to belittle the advantages of the mouse, I use the mouse every day, it is definitely a great invention. But we should use it only when we need it, instead of trying to use it to solve all things. This is like a graphical interface. If you work on graphic image processing, it is hard to imagine how to do it without a graphical interface, but it is not always good at all times. We should identify what is the most appropriate tool for each type of work, rather than solving all problems with one way of thinking. This is also the reason why I say "Windows desktop is easy to use is a complicated misunderstanding". The graphic interface is a good thing, and Windows uses it to the extreme.
Misunderstanding 4. Less software in Linux. This is the biggest misunderstanding. In fact, there are few things you cannot do in Linux. In addition, the Linux distributions usually have developed package management tools. A set of unified commands can be used for keyword search, installation, update, and uninstallation. This allows you to find a software by using simple commands. In many cases, you can find more than one software. If you want to see which binary viewers besides od are available, use apt-cache search 'hex in Ubuntu or Debian. * (View | edit) '[14] command can be found more than a dozen, these are free software, there are command lines and graphical interfaces, and in windows, I am afraid that I will search for the vast Internet again.
In Linux, it is very easy to find some software alternatives under Windows, although such mappings are sometimes not necessary. For example, the word processing software has options such as OpenOffice.org, koffice, and abiword; the image processing software has gimp; and the multimedia playing software has mplayer and totem. If you like to play games, the number of games in Linux will surprise you. If you don't believe it, you can come and have a look.
In fact, the benefits of Linux are far more than that. One well-known advantage is that it is basically free of virus troubles. It is not because Linux does not develop viruses [15], but because the Linux system has its own permission machine production guarantee and the software source can be trusted, most of them are open source code (a considerable part of them are free software), so it is not an exaggeration to say that there is no virus in Linux. Think about how much time you have wasted in the fight against the virus. I haven't had such troubles for a long time. Windows may be becoming more and more stable, but Linux has always been very stable, and you do not need to restart your computer all day, the author's computer sometimes does not restart for dozens of days. Unless you want to upgrade the kernel, there are no many reasons for shutdown and restart (whether it is to install or uninstall, or to upgrade the package in the system, you do not need to restart the computer ).
As an operating system enthusiast, there is another reason for using Linux, that is, the Linux kernel is "free". Note that it is not just "open source code, you can not only obtain its source code, but also copy, modify, and spread it freely. Of course, you can also learn it. If you want to join the kernel hacker team [16], you should start using it first. Linux is not perfect, and there are many problems, but every problem is your chance to participate, and such participation may be the beginning of your becoming a top expert.
I have been using Linux for a few years, but I have already realized the benefits it brings to me. I don't want to convince you that people cannot be persuaded unless they are willing to believe it. I just hope that you can try to use another Linux or unix variant, and then use your own judgment to choose.
If you stick to Windows, it's okay. Both of them can easily build a development environment. Later in this chapter, we will introduce Linux and Windows respectively.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.