Developer: At what level should we write code?

Source: Internet
Author: User

We had nothing to do this weekend, so we went to VMware Workstation 5. 5. 1. a Mac OS X 10 is installed on Linux. 4. 3, that is, drawin 8. 3. 1. The entire installation process has encountered some minor problems. The two major "impossible" problems are:

1. ISO must be burned to a DVD for installation, VMWare 5. 5 virtual optical drive is not compatible with Mac OS X installation.

2. The VMware optical drive must be installed at on the IDE, which is the same as the hard drive.

Note that FreeBSD should be selected for the guest OS. During the installation process, the NIC, sound card, and USB modules should be deleted and loaded after the system is installed. This will make the entire installation process very smooth.

However, one of the key points I want to talk about here is that I have installed the X11 that comes with the DVD disk and the GCC and devsdk in xcode. It is very interesting that I will develop a program based on xlib on Linux.ProgramRe-compile on drawin, everything went exceptionally well, and then it was ready to run.

I never knew that the program written by C and xlib has such high portability. This reminds me of the experiences I encountered when running a Java program a few weeks ago. This Java program is surprisingly sensitive to the version of the runtime environment, resulting in failure of more than half of the machines. This requires me to rethink the portability between middle-and low-level languages and advanced languages.

Advanced languages face the expansion and frequent upgrades of their functions, which leads to the complexity of development (perhaps the most extreme is the surface language such as HTML and JS ). The so-called low-cost maintenance and high portability myth is being broken by its own drastic changes. Compared with the middle-and lower-layer structures constructed like C, this makes the program development environment very stable, and this stability also brings unexpected high portability and performance.

It is a program I tested. I used all the programs I developed in Linux using C to compile and run on FreeBSD, NetBSD, cygwin, and drawin, and the performance was good. This may make us rethink at what level we should writeCode? My point is: "a stable level", and the physical point of view is also obvious: the sweetest level is usually the middle and lower layers of the structure.

 

 

 

 

 

The person who wrote this blog wrote C Programs with good portability because Unix systems all follow a unified standard, POSIX. To put it bluntly, the C language and the POSIX System Call behavior should be consistent. The C language is relatively simple, has good portability, and has a long standardization time. There are few incompatibility issues between implementations. The POSIX standard is based on the current Unix-like systems. These layers belong to the middle and lower layers, but the changes are small, but the incompatibility problem still exists. Because there are a large number of upper-layer applications above the middle and lower layers. If a slight change occurs, the upper-layer applications cannot run or run abnormally. Vista is not compatible. Many previous software is a typical example.

The middle and lower layers are not absolute stability layers. They should be levels that are kept as stable as possible in software development.

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.