Do not build high buildings in the sand float: suggestions for programmers

Source: Internet
Author: User
Tags java keywords
Do not build a high-rise building in the sand: suggestions for programmers-general Linux technology-Linux programming and kernel information. The following is a detailed description. I suggest that C or Pascal be a beginner in programming. If it goes further, you can use the assembly language, because this gives you a better understanding of the underlying layer.
A few days ago, I reread Eric S. Raymond's How to become a hacker. Seeing that he recommended Python for programming, I suddenly felt quite depressed and had some ideas. I recommend that you learn C or Pascal from the Programming beginners. If you want to learn more, you can use the assembly language, because this gives you a better understanding of the underlying layer.

The following describes the possible reasons for using Java, Python, C ++ (C ++ with non-C features) and other advanced OO language beginners.

1. Pascal and C are too old and outdated. They are rarely used at ordinary times. Now Java is popular.

Standard Pascal is indeed relatively old, but there is a successor to Delphi. I am afraid that C is unknown, and C is widely used now. It seems that projects on sourceforge.net are still the most in C. We recommend that Pascal not because of Delphi. The choice of Pascal and C is very common nowadays, and the syntax is representative and concise.

Don't feel that something is out of date. There are also the release of COBOL and OO versions, as well as FORTRAN, LISP, and ancient languages. It is still widely used.

2. Start with OO to cultivate the habit of thinking in OO mode.

First of all, it should be noted that OO is a method, not a language. It is easy for beginners to misunderstand Java, Python, Delphi, etc. It seems OO = Java, Python, C ++...

Secondly, the essence of Procedural language (or structured method) will not die out, and it is impossible to deploy statements or function calls in OO. structured methods still need to be promoted. The OO method is not so easy to learn (the syntax of the OO language is very skillful and doesn't mean you understand OO), and the structured method is, I am very familiar with writing a program with thousands of lines. I am talking about writing something practical, such as trying to implement some data structures and algorithms and writing a few games. Write one thousand rows of Hello world equals to no write.

I think the method can be learned in practice rather than reading a book. You may be stuck in the quarary of over-Design if you are familiar with the Patterns of Design, you have written thousands of lines of code, and then read it again. You can modify, debug, and debug the code, and add new functions. Then, you can find out how bad your code is, then you will know what Best practice is after reading a book and listening to others' opinions. The Best Experience is what you get when you are overwhelmed.

The code of a procedural language is generally concise. The final purpose of our program is to solve the problem, to calculate the Code, to obtain information, not by OO, pattern, EJB, web Services and so on (I am not opposed to these technologies ).

It is strongly recommended that you read the code more. Let's take a look at the UNIX v6 source code analysis of Leon's. Let's take a look at it and you will be able to understand what exquisite code is, then try to write the code according to that style.

3. It is difficult to transfer Procedural language into the OO thinking model after a long time

I have never thought deeply about this reason before, but after a long time, I realized that I just concentrated my data and methods together. Looking at it for convenience, there are actually a lot of unreasonable things, here, we need OO theoretical guidance, and we still need time to understand it. I believe that many people who use the OO language simply add code in the framework and call and use humans as the data and operation package.

I personally think that only after using the procedural method for more than ten years, there will be a mindset after 100,000 lines of code, and it is hard to get used to looking at the system from the OO perspective. However, this transformation, I still feel much easier than changing a person's bad habits. The OO method can be mastered without learning Java, Python, C ++, and so on. It requires practice and time. Procedural languages are also easy to cultivate a person's rigorous attitude towards doing things, such as writing code with Pascal and C, without namespace, function overload, or reference ), there is no template, no exception, you have to spend a lot of time dealing with some details, such as the array index out of the border, hanging pointer, wild pointer, etc., please do not feel the trouble, this is a computer, the bottom layer is like this. 4. Don't use C or Pascal. I use Java, Python, Delphi, VB, VC, etc. I wrote a PP GUI and a distributed NB application...

This article is intended for beginners. You can also show it to impetuous people (I also reflected on it). New programmers should focus on data structures and algorithms, read as much basic knowledge as possible, such as underlying things, digital logic, operating systems, compilation principles, computer composition, architecture, and computer networks. How can I drag several widgets into the GUI? Do you understand the interface design principles? Do you know what is going on with window messages, does the interface you compile put ease of use first or beauty first? Is your GUI program easy to modify? For example, if I want to add a button and go to a listbox later, will you go crazy? Did you write a large block of code in OnClick, which is similar to "remove non-numeric characters from edit1.text, search xxx, convert it to hexadecimal, and then copy it to edit2.text?

Well, you are proficient in socket, recv, and send, but if you do not understand the TCP/IP protocol, it is a bit ridiculous, what new tricks can you create in addition to using the function libraries prepared by others? Do you know what "distributed" is going on for distributed applications,

Are you just using APIs to pile up code? If one day this function library is not supported, Are you dumb?

For example, it is ridiculous to create DirectX without having seen 3D graphics.

I am not saying that you must first thoroughly understand how the underlying layer is implemented when compiling high-level things. I just suggest you mix the underlying things with a familiar face, when you encounter a problem, you may have a picture in your mind. Check the information and do not rush to a forum for help. In the past, when I saw someone on BBS, I said that BBS is not a place to learn, but a place to broaden my horizons. I thought it was.

It's better to look for books on paper. Think about how many e-books you have accumulated and how much you have read.

I don't know the bottom layer, but it just floats on the head of others. when others are shining, you have to fall down.

When programmers are new to programming, the IDE, GUI, Network, and so on cannot be impetuous? Let's take a hard look at the basic knowledge. I promise with my head that you will find them useful in your lifetime (Haha, I won't do it if you change your line). Don't watch others get JFC, if you are still at the top of the Socket, why isn't this quick sort? I am so worried. You need to know that after a batch of APIs are not supported, many people are blank: Oh, my God, I can't do anything except that. I'm depressed. It took me so long to study the API ....

5. C is so difficult. Let's get started with Java and Python.

First, is it a programmer? Do you want to program or make money?

Next, let's compare the difficulty:

The C: k & r book is really not thick. There are few classical C books. It is difficult to say C. It is probably difficult to say C's pointer. C's syntax is very concise, it's just a pointer. As long as you read a book carefully and write a few programs to give it a try, the usage of those pointers is not difficult to grasp. In addition, you must never drill down the * ++ * or other syntaxes, in the last issue of "development experts", I have a wonderful article about this. Everyone remembers that writing code is to be maintained. Don't use grammar skills to make trouble for yourself or future generations. Do you think about whether to admire or cursing the tianshu code written by others?

Java: there are too many books, so we can say that Gosling (not spelling it wrong) is a very thick book. Java learners have been annoyed by classpath and package problems at the beginning, there are also Java keywords, syntaxes, and a bunch of Java technical terms from Sun, isn't it a bit dizzy?

C ++ is indeed difficult. You can look at the design and evolution of C ++ to see how C ++ is doing. Interestingly, Java is now added to the template, and the implementation of the pseudo template is criticized, and the transformation of the EJB is also interesting. You can think about the words "complicated" and "practical.

Python is indeed refreshing, but after a bit deeper, its internal object model is not simple. Think about how many methods are available to operate a list, various powerful operators, and the current OO language forces you to OO, the result is usually the syntax OO, which is not much new. I still like Perl, C ++ and other languages. What's important is to use proper methods and tools, I think it is better to spend at least time doing valuable things, taking time to study the grammar of your language for exercises, and making a cup of tea to read novels.

Language is just a tool for expressing ideas. Do not be confined to one language, or be enthusiastic about one language.

When learning programming, it is best to take a look at the code in the book first. Is it from practical applications? Is it beautiful? (Whether the code is exquisite and the layout is neat) Is there a syntax error in the code? (Despise the authors who copy the code to the book without compilation)

This Essential C # is available. net class library code, great, about delegate (hope not spelling it wrong, I haven't done it for a long time), the example is very clear to let people see how to use this thing.

In addition, Learning Perl is recommended. I personally think it is the best book I have ever read about programming. Should I talk about it? What should I do? In what order, maybe it's the spirit of Perl. I was shocked to read this book. The original programming language could be so powerful! Great!

I wrote xxx's xx cloth on and off for a long time. I hope you will be more steadfast and don't be impetuous.
Related Article

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.