Platform contention for writing an operating system: Windows or *nix

Source: Internet
Author: User

Platform contention: Windows or *nix

The book "Orange ' s: an implementation of an operating system" from Yu Yu

Reading here, readers may find that the words "If you use Windows" or "If you use Linux" often appear in the book. Sometimes such words may even affect your reading, and if so, please forgive me. I try to take care of as many readers as possible, but for everyone, one has to face a choice--under what platform. The first edition of this book used the Windows platform, and in the second edition, I surrendered. The next thing you'll find out is that although future text will maximize Windows, the overall Linux platform is the default.
In fact, developing under what platform, sometimes purely a taste problem, or an environmental problem--what you use when you start contacting a computer depends largely on what the people around you use, which often have a huge and far-reaching impact on your taste. However, the first contact may not be the most suitable, after I personally experience and compare, I decided to switch from Windows to Linux, I would like to say here why. Please note that this is not a sermon, not a chapter you must read to develop your own operating system, I'm just talking about my personal experience, hoping to inspire you, and explain why the second edition will change.
In the first edition of the book, I already use Linux, but not much, mainly feel the use of unaccustomed, and now after two or three years, I have basically no windows, under Windows I will feel very unaccustomed. This experience of mine has at least two revelations: the first is that Linux is not good to use is a misunderstanding (there is a saying is that Windows desktop better use, this is a complex misunderstanding), not easy to use is a habit; second, if you are interested in using something you are unfamiliar with, do not give up because you are not accustomed to it at first.
In fact, there are many misconceptions about Linux and Windows, and I attribute this misconception to the cultural differences in operating systems. In fact, when two systems are mentioned, people tend to compare them with something specific. For example, compare their installation process, use method, even 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 of every home", and of course they want the Windows operating system to run on the computer. 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 appears quite friendly. More than friendly, it is friendly to everyone-whether children or old people, highly educated or only primary school-can easily start using computers, which is undoubtedly Microsoft's great contribution to this society. But interface friendly and not necessarily perfect, this point is not a table, we first say Linux.
The culture of Linux is largely rooted in the culture that Unix,unix advocates and follows, also known as the UNIX philosophy [8], where one of the most important principles is called "doing one thing and doing well" [9], which sounds like a friendly interface to Windows. But there is a lot of correlation between careful analysis. Doing one thing and doing well means two things, the first thing is that the tools can work together, otherwise each individual will not be able to complete the complex application; the second thing is that interfaces should be unified or not able to collaborate. This unified interface is the text stream, which means that the command line is the core of the Unix culture. Windows does a lot of different things because it's user-friendly, so you can't expect users to start knowing how to string together, so Windows chooses any application to do everything on its own--at least to make the user look like this, making each tool separate, This increases the complexity and development costs of each program. Not only that, because the functionality is set by the software developers, you can hardly expect most programs to be scalable, and under UNIX, most programs can collaborate with other programs to complete programs that have not been "designed". This is also the reason why I said "interface friendly is not perfect", there is a price for friendship.
So is UNIX an "unfriendly" system? The problem is not as simple as it seems. The first is that the popular desktop environment under UNIX is becoming more and more "friendly", and you can even configure it to look like windows identical, but that's not the point, but in the long run, Unix's learning costs are no higher than Windows, but the benefits are much higher. We have just mentioned that friendship comes at a price, and the price is higher than expected. For a beginner, the beginning of the simple easy to make him the illusion that the computer is a simple device, but the actual situation is not so, once encountered trouble, the user is very easy to get into a helpless situation, once there is no ready-made software can be resolved, you immediately helpless. Unlike UNIX, it has a steep learning curve, but once you get started, you'll find that your work can be so easy and fun. In Windows, while the first step in using a tool is often easy, it's easy to get lost in a bunch of deep, obscure menus, and it's not easy to learn these menus, and the things you learn in one tool may get changed in another tool. If you want to see the help of the program, sometimes it is difficult, because in order to achieve "friendly" effect, help is often a layer, it is difficult to find what you need. In Unix, all tools have a manual (Manual) that can be viewed through a unified command "man", and these manuals are flat, you can see the end of your head at a time, and you can always look at the keywords you want. In addition, with a handful of extremely complex tools, the manual is basically adequate. In short, in Unix, software usage looks complicated, and in fact if you want to really master a thing, it won't take much more time than Windows. Besides, it's hard for you to really master a thing in Windows.
I didn't mean to belittle windows, and I said it's a huge contribution to society. For a user who usually only uses a computer to take a look at a movie, its ease of use is definitely a huge advantage, but you and I are not such a user. I believe that the people who read this book are programmers, and programmers who like to explore as much as I do--programmers who don't like to explore have trouble writing their own operating system for entertainment. A programmer's requirements are different from that of a regular user, and the programmer needs to know about his computer, master it, and be skilled in getting it to do its job, and in this sense Unix has a huge advantage. Every tool inside it is sharp, you can use it for a long period of years, and it's not going to go out of date.
Here I can cite an example that I have encountered myself. When I write the operating system's file system, I need to view the contents of a few sectors several times and analyze the data. In Linux, I can easily string together tools such as OD, grep, sed, and awk [10]} to do this, and I can write a simple script to make the commands easy to access in the script. In Windows, I usually can only repeatedly click between windows, time-consuming, laborious and inefficient. Similar examples abound, once you are familiar with these tools, you will find that by combining them, you can get more functionality than any graphical interface tool. And under Windows you have to look at the specific menu. Not only that, the tools under Unix tend to be used for long periods of time and rarely obsolete. For example, a few of the tools mentioned earlier have a history of more than 20 years, and they are still widely used, even though they will be a little harder to learn, and in 20, the cost is extremely low. This is UNIX philosophy, you don't have to repeat learning, every tool works, and you can play a variety of roles with other tools.
Most Windows software has a problem, and it often tries to hide something. The idea is to make the interface more "friendly", but it's sometimes a bad thing for programmers because it makes it hard to understand what the software is doing. You might say, if you want to understand, you can always understand. Yes, it's a similar proposition that "what you can do under Unix can be done under Windows", even if you install some extra software (such as Cygwin), you can use UNIX commands under Windows. The problem is that even if you can do it, you may not be able to do it, which is the power of the so-called culture. Theoretically 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 are not autonomous to pick up the TV remote control.
So in my own experience, a programmer would be better off using 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 market is the largest number of instamatics, but a professional photographer will always choose the complex features of professional equipment, not instamatics bad, but adapt to the different crowd, if you want to become a good photographer, then easy to start the instamatics must not be your final choice. It's not a good question, it's a question of suitability.
The above is the difference between the two types of operating system culture, in fact, even the pure application layer, there are many misunderstandings, such as the following several:
Misunderstanding one. Linux is difficult to install. If you've ever been stumped by Linux installation, I suggest you try Ubuntu next time. When the first edition of the book began writing, Ubuntu's first version had not yet been published [11], but in a few short years it had become the world's most popular distribution [12], which was inseparable from its ease of use and usability. The author of the large-scale use of Linux is also starting from Ubuntu, its installation process is no more difficult than windows, and the Chinese information is quite rich, it is easy to find like-minded people. Another feature of Ubuntu is that its drivers are very rich, support a lot of hardware, most of the driver can be installed automatically, and even do not require user participation, at this point it is even more "friendly" than Windows.
Misconception two. Linux is hard to learn. I hope you always remember that a computer is not a simple device, whether it is hardware, operating system or application software, often more complex than it looks. So ease of use is not necessarily a good thing, it must be hidden from you, it is definitely worthwhile to spend a little time, especially when you want to be a programmer. And Linux is not so difficult to learn, and not to say that its graphical interface more and more useful, is entirely with the command line, the introduction is also quite easy. And the Linux world's documentation is complete and easy to retrieve, more highly developed community culture, where you learn more often than expected.
Misconception three. Linux is hard to use. Again, the learning curve of Linux is steep, but once you get through the beginning of the adaptation period, you will find that the original command line can be so useful, there are so rich tools to improve efficiency, and these useful tools are actually free [13]. You do not have to pay the author, even if they encourage you to use and spread, you can even modify the source code of these tools, encounter problems can send an e-mail feedback to the author. This is hard to do under Windows, and it's hard to see what "freedom" is on that piece of land. Not only that, but when you're familiar with it, you'll find that the same thing is that Linux solutions tend to be simpler than Windows. For example, we mentioned the installation of Bochs, in Windows you usually need to go to the Bochs site, after several clicks to find the download link, then download, and then double-click the installer to install. Under Linux, you see, you just need a command line, and even if you're typing slower, it's faster than those mouse clicks.
I am not here to belittle the benefits of the mouse, I use the mouse every day, it is definitely a great invention. But we should only use it when we need it, not try to use it to solve everything. This is like a graphical interface is a good thing, if your work is graphic image processing, it is difficult to imagine how to do without a graphical interface, but is not a graphical interface at any time is good. Instead of solving all problems with a single thought, we should distinguish what tools are most appropriate for each type of work. That's why I said, "Windows desktop is a complex misunderstanding," the graphical interface is a good thing, Windows uses it extremely.
Misconception four. Less software under Linux. This is the biggest mistake, in fact, there are few things you can not do under Linux. and Linux distributions usually have developed package management tools, whether keyword lookup, installation, update or uninstall can be done with a set of unified command. This allows you to use simple commands when you need some kind of software to find it, and many times you can find more than one. If you want to see what binary viewers are in addition to OD, more than 10 of them can be found in Ubuntu or Debian via a apt-cache search ' hex.* (view|edit) ' [14] command, which are free software, The command line has a graphical interface, and under Windows, it's going to be searching the vast Internet.
It is easy to find alternatives to Windows software in Linux, although this is sometimes not necessary. For example, word processing software has OpenOffice.org, KOffice, AbiWord and other choices, image processing software has GIMP, multimedia playback software has mplayer, totem and so on. If you like to play games, the number of games under Linux will also surprise you, do not believe you can come here to have a look.
In fact, the benefits of Linux far more than these, a well-known advantage is that it is basically no virus troubles. Not to develop a virus in Linux [15], but because the Linux system has its own authority mechanism to protect, plus the source of the software can be trusted, and most of the source code is open (a considerable part of it is free software), so that the lack of virus in Linux is not exaggerated. Think about how much time you've wasted in the fight against the virus, and I haven't had that kind of trouble in a while. Windows may be getting more and more stable, but Linux has always been stable, and you don't have to reboot your computer all day, and the author's computer sometimes doesn't restart for dozens of days. Unless you want to upgrade the kernel, there are not many reasons to shut down and reboot (whether it is installation or uninstall, or the package in the system upgrade, do not need to restart the computer).
As an operating system enthusiast, there is another reason to use Linux, which is the Linux kernel is "free", notice that it is not only "open source", you can not only get the source code, but also free to copy, modify, spread it, of course, including learning it. If you want to join a team of kernel hackers [16], start by using it. Linux is not perfect, it has a lot of problems, but every problem is an opportunity for you to participate, and this engagement may be the beginning of your becoming a top player.
The author of my full use of Linux to work in fact very short, a few years, but I have been deeply aware of the benefits it brings me. I am not trying to convince you that one cannot be persuaded unless he is willing to believe. I just want you to try to use Linux, or any other variant of UNIX, and use your own judgment to choose.
If you insist on using Windows, you can easily set up your development environment in both, and later in this chapter will introduce Linux and Windows separately.

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.