I am learning C language recently, and it is very painful, what should I do?

Let me tell you about my experience...

I am not a computer science major. I graduated from Electrical Engineering in 2011...

At that time, I felt that this major had no money and was not suitable for me, so I planned to change careers.

At that time, I was also very anxious and confused, wasting a few years in vain, and finally had to start all over again, what a crime..

At a young age, I began to lament the ups and downs of life.

I have been anxious and confused for more than a month, and nothing has changed except that my life has become worse.

I was also anxious in my heart, if this continues, it will be useless.

Due to my relatively introverted personality, it may be more suitable to be a programmer.

In addition, I had a computer at home since I was a child, and I was very good at playing various games in junior high school, such as CS, BNB, and Legendary. ordinary players.

Although there are some advantages and blessings, to be honest, what I value most is that the salary of programmers is really good.

I just came out of school, my thinking is not as mature as it is now, and my study is also blind. I only know that I need to plan my learning path according to the needs of the position after working for many years .

The first time I learned java, I first taught myself the basic grammar of java se, and then learned oracle.

After learning, I still don’t understand anything. I followed the video tutorial and wrote a tank battle game. I also sent it to my friends to show off. In fact, it’s really low.

After leaving the tutorial, it seems that everything has returned to zero... I don’t know how long it has passed, but at least it is calculated on a monthly basis.

I started to fall into that damn confused period again, can I find a job at this level?

Later, I studied the career direction in depth, and found that after learning java se, it was just the beginning, just the foundation.

If you want to achieve the level of employment, you may need to choose from two directions: java me and java ee.

One is for mobile applications, and the other is for web and enterprise applications. I don't know if they are specific, because I won't continue to learn later.

Learning Nima, I feel that I will retire after finishing my studies. It seems that high salary is not so easy to get.

Falling into a period of confusion again, I wondered whether I should go to the advanced factory to screw screws to make a living and accumulate some work experience.

If you are facing this stage now, my suggestion is don't!

Once you enter, people are basically useless. Once people stabilize, it is difficult to toss around.

If you really have no money to eat, you should find a leisurely job first. Even being a security guard is better than working as a screw in a factory.

Entering the factory is no different from a robot. You are ruthlessly squeezed by the factory manager, and it is impossible for you to stop.

Later, I inadvertently came into contact with single-chip microcomputers. This is a simple programming language that only needs to learn C language.

The key point is that this thing gives you quick feedback on your learning results. It can make you a visible and tangible running water lamp in a few hours, which is much more interesting than purely writing code.

I have been in contact with the C language since then. Until I found a job, my C language was at the level of fishing in troubled waters.

Now 11 years have passed, and my level has also increased significantly. I have written architectures and implemented data structures such as queues and linked lists.

My requirement for myself is that since I am doing MCU development, it is enough that I can independently make programs based on MCU products.

Now that I've done it, I don't want to compare myself with those big guys, I just lie down and admit that it's good to be ordinary .

Looking back on my growth process, it is estimated that I can write a book. After all, the original experience I have output has exceeded 100,000 words.

Next, I will make a summary of today's theme.

To improve the level of C language programming, you must go through several stages:

1. Novice period

That is, you are new to the C language and have learned the basic grammar, but you will find that you can't do any projects.

There may only be some simple ones, such as sorting algorithms, various printfs, and various peripherals of single-chip microcomputers.

But integrating the code together to realize the functional logic of the project is confusing.

At this time, you will enter a novice bottleneck period.

During this period, you will be particularly sensitive, and you will question where you have not learned well, whether your foundation is too weak.

You may choose to go through the c language again, and consult some c language tutorials on the market like looking through the old history of your girlfriend.

Another possibility is that you feel that you are not suitable for learning programming and finally give up.

When I first learned java, it was the second type. I couldn’t do anything after learning it and then gave up. In fact, it has nothing to do with the foundation. There is no need to learn the syntax of C language again. After learning, you will find that it is still the same .

In fact, what you lack most now are two things: programming thinking and programming level .

Programming thinking determines whether you have the idea of ​​​​realizing functions, and programming level determines whether you can use code to realize this idea .

These two things can only be cultivated continuously through projects, just like you just learned to write, it is impossible to write essays right away, right?

Those who don’t understand our Boundless MCU programming training camp, obviously buy a MCU development board for only a hundred yuan, but we charge more than a thousand.

It is because the development board can only let you learn tools such as c language and single-chip microcomputer, and does not cultivate your programming thinking and level. We are driven by actual projects, and the positioning value is also different.

2. Cocoon-breaking period

If you figure it out, you can reach this stage smoothly.

The best way at this stage is to find various projects to do it. Without projects, your programming level will never improve .

I didn't pursue how good the project code can be written before, as long as it can realize the function.

Take the development of single-chip microcomputer as an example. At this stage, there is no need to buy a development board. If you want to buy it, you can buy a project. There are many DIY ones that you can buy for practice.

The development board and the project are both circuit boards. The difference is that the development board leads to all the peripherals of the single-chip microcomputer. You can adjust it aimlessly..

Projects have specific product functions, and your learning is more purposeful.

At this stage, don't ask too much of yourself. You don't need to worry about whether the code is well written or not, mainly to realize the function .

3. Cocoon-breaking bottleneck period

After 60% of your projects can be written independently, you will enter a bottleneck period again.

I went through this stage and worked for about 2-3 years. At that time, I was a little bit drifting, and I felt that I was not afraid of the code of any project.

But there is a problem, that is, I always feel that my code is messy and not professional enough.

Although I didn't know what a good code should look like at the time, I hadn't touched it after all.

According to my current understanding, whether the code is well written is mainly reflected in two aspects: architecture and algorithm .

The architecture is equivalent to the "foundation" of your program. If the architecture is not good, it will affect the stability of your code, the scalability of functions, and the compatibility of your code on different platforms (chips) .

Algorithm is the method for you to achieve a certain function. Many algorithms are first calculated with mathematical formulas, and then implemented with code. The better the algorithm, the higher the execution efficiency .

If no one tells you, you at this stage will not be able to comprehend these two points at all.

I encountered this bottleneck at the time, but I didn't know how to improve it.

Just using some bells and whistles to make my code look more professional, such as stating that pointers can be used without pointers, which I use, just because pointers look more complicated.

4. Rapid promotion period

If a great engineer takes you to do some medium and large-scale projects , you can quickly break through.

But not everyone has this kind of opportunity, for example, I don't have it, so I stayed at this stage for a few years .

It’s useless to do small projects, you must be exposed to medium and large projects.

Only after experiencing medium and large-scale projects can you deeply understand the importance of program architecture, understand the mystery of pointers, and so on. There are too many things you can learn.

The third phase of the Boundless MCU programming course is positioned to help students break through this bottleneck period.

The project has a small system written by itself, wireless sensor networking function, menu function, control of the host status through APP, anti-theft alarm function and so on.

Focus on cultivating the idea of ​​function realization, exercise the programming level, and solve the pain points of actual product development with the advanced grammar of c language.

5. Architect

At this stage, your level is already very good. In addition to the level of programming, it is more about the improvement of thinking .

For example, modular thinking, object-oriented programming thinking.

You can write some program architecture by yourself, you don't have to write it from beginning to end, it will still be difficult.

Generally, they imitate other people's structures first, and then surpass them, even the top ones come here like this.

There are many similar program architectures. For MCU development, RTOS, Bluetooth protocol stack, STM32 firmware library, etc. are all possible.

In 2019, I also recorded a set of video tutorials on the program architecture of the system. Based on the single-chip microcomputer, it can be regarded as a summary of my years of experience. It can be directly transplanted to my own projects, and the most important thing is that it is completely open source! Completely open source! Completely open source!

It's not convenient to put a link here, so go directly to Wuji MCU, which has the same name on the whole network.

 

Unknowingly, I have accumulated more than 2,600 words. Although it is an article, it is more like my memoir.

 

If it's helpful to you, get rich and give me a three-game plan, thank you!

Guess you like

Origin blog.csdn.net/weixin_43982452/article/details/123291153