Which programming language should new programmers learn?

One of the most frequently asked questions by new programmers is: Which programming language should I learn?

For some ambitious developers, this problem will eventually evolve into a stumbling block they can never overcome. I have mentored many developers, they always doubt their choices, even change their minds, constantly jumping from one programming language to another, always worrying about making the wrong decision.

If you are always struggling with "Which programming language should I learn", this chapter is for you. First, I will eliminate some doubts; then, I will give you some practical considerations on how to choose your first programming language.

Programming language is not that important

Yes, which programming language to learn is actually not as important as you think.

I can make this assertion for several reasons. One of the main reasons is that the cores of many programming languages ​​are actually very similar. Yes, the syntax is different. Yes, programming languages ​​look different and even have a completely different set of features. However, at its core, the common areas of all programming languages ​​may be richer than you think.

Almost all programming languages ​​have branches, loops and method/procedure calls in the basic structure, as well as ways to organize code at a higher level. Moreover, many programming languages ​​are so similar that if you know one language, you almost know another language. C# and Java are good examples, and JavaScript is very similar to these two languages.

Therefore, learning the first programming language is always the hardest. Once you learn a programming language, learning a second language is much easier. After you understand two or more programming languages, other programming languages ​​are easy to learn.

If you don't even know a programming language, or know nothing, you might think these statements are pure nonsense. But in my career, I have learned no less than 10 different programming languages, and I can assure you that it is really difficult to learn the first and second programming languages.

Not only are various programming languages ​​more similar than you think, but you can also switch from one language to another easily and learn it quickly.

This means that even if you learn a programming language and realize that this is not the right choice, or the job you find forces you to use a completely different programming language, it’s not a big deal, because you have already Completed the arduous work of learning the first programming language.

You may also find that many development positions, especially in large companies like Microsoft or Google, do not require you to know a specific programming language.

In many interviews, I have been told that any language can be used to solve a programming problem, whichever language is comfortable to use, there are no restrictions, and there is no requirement that I must know a specific programming language.

Considerations when choosing a programming language

Therefore, I really don't think you need to be too entangled in deciding which programming language to learn, but if you still encounter some difficulties when making a decision, I will give you some considerations below.

Current and future employment prospects

I want to say that for most people, the most important considerations are: Which programming language might help you get what kind of job, and what is the future application prospect of this language.

Currently, for most mainstream programming languages, there are plenty of job opportunities at any time. Various programming languages ​​come and go one after another, but if you are concerned about the possibility of getting a job, you should take mainstream programming languages ​​into consideration. At the time of writing this book, I think the current mainstream programming languages ​​include C#, Java, Python, Ruby, JavaScript, C++, PHP.

For developers who use these languages ​​to complete programming work, there will be no shortage of job opportunities. In other words, if you don't like the wandering life, the language you choose depends mainly on where you live in the world. For example, suppose you live in a small town in Arkansas. There is only one technology company in the small town. This technology company uses Java to do everything, then I suggest you learn Java. Of course, I can imagine that this example is not typical for most people, but if this happens to be the case for you, then I guess it is quite easy for you to make a choice.

If you can accept migration, or if you are planning to become a freelancer in programming, you may need to specialize in a rarer language that is less frequently used. There are few experts in this field, so you can do better , And then become an expert. However, if you are new to the industry, I still recommend that you try to learn some more mainstream languages.

In addition to employment prospects, another factor to consider is the future prospects of the programming language you are considering learning.

When I was writing this book, Objective-C may not be a good choice for those who are new to the industry. The reason is simple, because most iOS developers are turning to Swift, and Apple is also doing a lot of Swift programming language. investment. If you are already an Objective-C programmer, don't worry too much, there are still many job opportunities, because there are still a lot of Objective-C-based applications that need someone to maintain. However, in terms of future prospects, Objective-C is not the best choice.

Of course, none of us have a crystal ball, so it is difficult to predict which languages ​​will prevail and which languages ​​will be unpopular. Not long ago, I predicted that JavaScript would die, but in fact this did not happen.

I just attended a conference, and there was a speaker at the conference who happened to be Tom Love, one of the co-inventors of Objective-C (Objective-C was born in the early 1980s). He wrote a book in which he pointed out that "the JavaScript language is dead". However, at the time of writing this book, JavaScript has become one of the five most widely used programming languages ​​in the world. (I heard it claims to be third.)

The point is that you never know what will happen in the future. Ruby became popular many years after its birth; JavaScript can be said to be one of the worst designed languages ​​in history. It was originally used to make pop-up conversation windows or alert boxes on web pages, but now it has become a very popular one. Language.

Therefore, unless you have a crystal ball, you cannot predict the future. Of course, if you really have the ability to predict the future, then forget about programming. Wall Street is where you should go.

Ask John: Why do you hate JavaScript so much? JavaScript is not as bad as you said.

I know, the above content sounds like I'm constantly complaining about JavaScript, orchestrating it. Maybe you think that JavaScript has brought some kind of damage to my childhood and left me a deep emotional wound.

Well, let me tell you a short story, how JavaScript was born-the story is very short, so please allow me to say a few words.

In May 1995, Brendan Eich, who was working at Netscape at the time, created JavaScript within 10 days. Because it was an emergency product, he created a simple "glue language" [3 ] , Easy to use for web designers and part-time programmers. (This is what I found on Wikipedia.)

Therefore, what I want to say is that JavaScript was not a well-thought-out product from the beginning, it was just an emergency work completed in just 10 days. This is true, that's how it is. Let's put it this way, I don't actually hate JavaScript, I just don't think it is a very elegantly designed language, so I don't like it. That's it.

Nevertheless, the new version of JavaScript (now called ECMAScript) is much better, and has improved and made up for many of the shortcomings of JavaScript. Therefore, in fact, now I really like the new version of JavaScript (although I don't want to admit it).

Anyway, my opinion is not important. I am a realist. Obviously, JavaScript is a very popular language, and its applications are everywhere. Therefore, whether I like it or not, I have to accept it-and reserve the right to express my opinion.

If the text above hasn't convinced you yet, why not check out one of the bestsellers about JavaScript-"The Essentials of JavaScript Language"?

The technology you are interested in

When choosing a programming language, a great consideration is which technology you are more interested in. If you start by learning a certain technology, then choosing a programming language may be easier.

I know many developers who are very interested in developing Android-based applications because they like this technology. For most of them, Java is a good choice, because Java is the "native" language used to develop Android applications. (Nevertheless, you may also use many other languages ​​to develop Android applications, such as C#, Ruby, and even JavaScript.)

Choosing your first programming language based on the technology you are most interested in will not do you any harm at all, because you are likely to be struggling to learn the first programming language. The more interested and excited you are about what you are learning, the easier it will be for you to persevere and pass the difficulties and obstacles of the learning curve.

I really want to develop an iOS application because I just got an iPhone, and this technology makes me very excited. This excitement allowed me to easily learn Objective-C and build my first iOS application. If I were not so excited about this technology, I would not have gone so far.

Don't be afraid to choose your first programming language based on your excitement or interest. Your enthusiasm can help you when you encounter difficulties in the learning process.

Difficulty level

Another major consideration is the level of difficulty. Some programming languages ​​are more difficult to learn than others.

I usually don't recommend starting with learning C++, because it is difficult to learn C++ compared to many other programming languages. C++ requires you to deal directly with managing memory and pointers, as well as some other unpleasant structures, which will make beginners fall into a quagmire. Although C++ is a great language (still one of my favorite languages), it is not the easiest language to learn.

Languages ​​like C#, Lua, Python, Ruby or PHP are easier for beginners. There are even languages ​​tailored specifically for beginners, such as Scratch or BASIC.

I say this, not to pour cold water on those who really want to learn more difficult languages ​​like C++; however, before making a decision, you should at least know what you are facing and decide whether to choose is relatively easy As your first programming language.

Resources available to you

You may also need to consider what resources you have available for learning programming languages.

An obscure programming language may not find so many books, online videos, or other available resources, which may increase the difficulty of your learning; other more popular programming languages ​​have many online tutorials and can be registered Introductory courses and books or other learning resources, so you must understand how many resources are available for you when choosing a programming language. Although this is no longer as worrying as it used to be today, because there are so many resources available for beginners, you still need to take this into consideration.

You may also need to consider the special resources available to you, such as computers or software. A programming language that is not so easy to learn may become an easier choice, just because there are many ready-made interactive online tutorials on the Internet. You can learn JavaScript online through a web browser without having to install any software on your computer. Languages ​​like C++ need to download some tools and software. These tools and software may not be easy to find or obtain.

The last resource, I think, should be someone you know who you can find. Who can you ask for help? If you are in trouble, who can answer your questions? Who can help you accelerate the learning process?

When choosing your first programming language, I certainly do not consider resources as the biggest consideration, but it is still a factor you should consider.

Adaptability

Finally, let's talk about adaptability. Different programming languages ​​have to adapt to different situations and technologies.

For example, at the time of writing this book, the C# programming language was one of the most adaptable languages, thanks to Microsoft and Xamarin (now part of Microsoft). If you want to learn C#, you are not limited to Windows or Web programming. Nowadays, C# can be used on almost all platforms, so it has strong adaptability. You can write Linux and Mac applications in C#, and you can also write Android and iOS applications in C#.

Many other programming languages ​​are also highly adaptable. For example, Ruby has been ported to many different platforms and widely used in many technical fields. JavaScript is also very adaptable. You can even use JavaScript to control the Arduino board and develop robots. (How to do this, please read my good friend Derick Bailey's article on the Simple Programmer website.)

The adaptability of other programming languages ​​is not so good. For example, if you learn R or Go, you will be forced to be limited to the technologies and platforms designed for these languages.

More and more programming languages, especially popular languages, have adopted various technologies to be transplanted to multiple platforms, but some languages ​​do not. Therefore, if you want to be a web developer today, but want to do Android development tomorrow, or you want to participate in a range of different platforms or technologies, you may need to consider the adaptability of the language you want to learn How strong is it.

Some final thoughts on choosing a programming language

Although I have given you some considerations, when you choose your first programming language, I still want to emphasize one point: in fact, programming languages ​​are not that important. The important thing is that you have to pick something and stick to it for long enough to successfully pass the so-called "learning curve" to gain more knowledge. Many programmers who are new to the industry feel frustrated because they feel that they just don't understand this.

I will discuss how to learn your first programming language well in Chapter 6.

Make a choice and stick to it, and you will become an expert. I promise. The learning process may be bored or suspicious-"I learned the wrong language", so you may keep changing your choices. But trust me, this is not a good idea.

Finally, consider this scenario: when I start programming, an in-depth understanding of a language is one of the most important skills of a programmer. So I dedicate myself to the C++ book, trying to learn the complex skills of the language, but now it is no longer an important skill. Today programming is done at a higher level. Today, programming uses libraries and frameworks, not just the characteristics of the language itself.

Of course, knowing a programming language and proficient in it is important, but a firm grasp is not a valuable skill. This is why I say don’t get too entangled in which language you should learn first. You just need to make sure you learn a language and stick to it (at least until now).


[3] "Glue language" refers to a programming language used to connect software components, usually a scripting language. (From Baidu Encyclopedia)-Translator's Preface

This article is excerpted from "Soft Skills 2 Career Guide for Software Developers" (produced by Asynchronous Books)

This book is a new work by the author of "Soft Skills: A Survival Guide Beyond Code". It focuses on the career development of software developers and describes the various "soft skills" that software developers need to possess in the workplace—how to To become a software developer, how to learn the first programming language, how to write a job resume, how to prepare for an interview, how to choose a job position, how to choose a technical direction, how to develop technical skills, how to get along well with the team and leaders, how to write books Li said the way to win praise in the industry, and so on.

This book is suitable for all levels of software developers to read. Although this book is written specifically for software developers in name, it is actually a book about managing personal careers and how to achieve success. It is very helpful for all types of practitioners in the software development industry to make career development plans. help.

Guess you like

Origin blog.csdn.net/epubit17/article/details/107504833