Relearn C

In recent years, I have been doing Web development, from PHP to Go, from database to cache. With the deepening of technology, I felt more and more inadequate to understand the source code and technical details as a non-professional code writer. Great oaks grow from little acorns, and it is difficult to continue to improve if basic knowledge is not firm. I plan to relearn C language in the near future to consolidate the basic knowledge.

steps

I don’t spend much time memorizing grammar for school exams. After going through the syntax, start to write code, and then look up the data to solve the problem. Have the basics of other language syntax. Don’t worry too much about the syntax. Focus on the different features of C compared to other languages.

  1. Video tutorial

Some people may think that watching videos takes more time than reading books, but I personally prefer watching video tutorials.

One reason is that watching videos can produce concrete images and deepen memories. On the other hand, I have a long commute every day, nearly 50 minutes on the subway. I can’t waste this time. I take my Kindle with me to read e-books, but I can’t concentrate on the noisy subway, especially the boring technical books. Of course, it’s not just the video, the book is a follow-up.

B station all kinds of self-study video resources are very much, can make full use of.

  1. The code field

“Talk is no fake handle.” Programming is a subject of practice, only in the process of continuous practice can we really be familiar with the heart, and continue to dig and step on the pit to fill the pit growth. Write a simple Web server in C language, support HTTP and Tcp protocols. Follow up to read the source code of open source projects such as Redis to deepen understanding.

  1. Record your experiences

In the process of practice and learning, continue to output in the form of articles. C features compared to higher-level languages also recommend better tutorials.

The key target

Phase 1: Memory partitioning, function call model

  • Meaning of data type and variable
  • Features of four memory regions
  • Function call model
  • Memory manipulation function
  • Macro definition and preprocessing

Stage 2: Pointer advanced

  • Basic use of Pointers
  • The step size concept of a pointer
  • Pointer introduction assignment
  • The properties and use of Pointers and multilevel Pointers as function parameters
  • Manipulates strings through Pointers
  • Const type modifier
  • Bitwise logical operator
  • Shift operator
  • Array pointer and pointer array
  • Multidimensional arrays take function arguments
  • The structure is nested with a first-class pointer
  • Structure nested second – level pointer shallow
  • Copy deep copy

Stage 3: Function Pointers and callback functions

  • Packaging and design ideas
  • Function Pointers are defined in three ways
  • The callback function

Stage 4: Data structures and linked lists

  • Basic concepts of linked lists
  • Operations related to single linked lists

Stage five: recursive functions

  • The concept of recursive functions
  • Use of recursion

Phase 6: Data structures and algorithms

  • Big O notation basic concepts
  • Linear table sequential storage and chain storage concepts
  • Sequential storage of linear tables (arrays)
  • Chained storage of linear lists (linked lists)
  • Sequence of queues and chained storage
  • Stack sequence and chain storage
  • Binary tree basic operation
  • Common sorting algorithms

Phase 7: Interface packaging and design

  • Function packaging design
  • The design concept of decoupling
  • The idea of separation of module implementation from business

Core competencies to be mastered at this stage:

  1. Master C language in the string, a bunch of arrays, two-dimensional array usage;
  2. Master the advanced usage of first-class pointer, second-level pointer and third-level pointer, understand the concept of n-level pointer, pointer array and array pointer;
  3. Learn structure, file use C language interface encapsulation design

Resolvable display issues:

  1. Can realize their own development of small programs, such as snake with C language written programs;
  2. Application of C language interface packaging design method, enterprise project development

conclusion

The purpose of learning C language is not to use it to develop Web applications at work, but to help me understand how computers work more deeply. As the old tech boss said, “C developers see other languages as syntactic sugar.”

Share with you.