Learn C again

In recent years, I have been doing Web development, from PHP to Go, from database to cache. With the deepening of technology, more and more feel that non-training to write code I am unable to understand the source code and technical details. Great oaks from little acorns grow, and if the basic knowledge is not solid, it will be difficult to continue to improve. I plan to learn C language again in the near future to consolidate my basic knowledge.

steps

I don’t spend too much time memorizing grammar because I’m not studying for school exams. After going over the grammar, start to write the code, and then look up the information to solve the problem. You don’t have to worry too much about the syntax, and focus on the different features of C compared to other languages.

  1. Some people may find it more time-consuming to watch videos than to read books, but I personally prefer to watch video tutorials.

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

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

  1. The code field

    “All the talk, not the fake handle.” Programming is a partial practice discipline, only in the process of continuous practice can really master in the heart, constantly dig pit step pit filling pit in the growth. withCWrite a simple languagewebServer, supportHTTPandTcpThe agreement. Read on for open source projects such asRedisThe source code for deeper understanding.
  2. Record the experience and experience in the process of practice and learning, in the form of continuous output. Contrast the features of C with higher-level languages, and you’ll also recommend courses that compare well.

The key target

Phase 1: memory partitioning, function call model

  • Data type, meaning of variable
  • Memory four zone features
  • Function call model
  • Memory manipulation function
  • Macro definition and preprocessing

Stage 2: Advanced Pointer

  • Basic use of Pointers
  • The concept of the step size of a pointer
  • Pointer profile assignment
  • Characteristics and use of Pointers and multilevel Pointers as function parameters
  • Manipulating strings through Pointers
  • Const type modifier
  • The logical operator of a bit
  • Shift operator
  • Array Pointer and Pointer Array
  • Multidimensional arrays serve as function arguments
  • Structure nested first-level Pointers
  • Structure with shallower nested second-level Pointers
  • Copy deep copy

Stage 3: Function Pointers and callback functions

  • Packaging and design ideas
  • There are three ways a function pointer can be defined
  • The callback function

Stage 4: Data structures and linked lists

  • The basic concept of linked lists
  • Single linked list related operations

Stage 5: Recursive functions

  • The concept of recursive functions
  • The use of recursion

Stage 6: Data structure and algorithm

  • Basic concept of big O notation
  • Linear table sequential storage and chain storage concepts
  • Sequential storage of linear tables (arrays)
  • Chain storage of linear tables (linked lists)
  • Sequence of queues and chained storage
  • Stack sequence with chained storage
  • Binary tree basic operations
  • Common Sorting Algorithms

Stage 7: Interface packaging and design

  • The encapsulation design of the function
  • Decoupling the design concept
  • Modules implement the idea of separation from the 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-level pointer, second-level pointer and third-level pointer, understand the concept of n-level pointer, pointer array and array pointer;
  3. Learn to structure, file use C language interface packaging design

Solvable display issues:

  1. Can realize their own development of small programs, such as a snake with C language written procedures;
  2. The application of C language interface encapsulation design method, the enterprise project development

conclusion

My goal in learning C is not to use it to develop Web applications at work, but to help me gain a deeper understanding of how computers work. The old tech gurus used to say that “C developers see other languages as syntactic sugar”.

Together with the king.

WeChat official account