The best steps to become C programmer in 2018


       To become a programmer in C you need to know how your computer works.

       retain in your  in your mind that the main notion of a “programming language” is to keep you away from the physical machine by providing tools such as objects, fancy types with consistent interfaces, and so on.

      So, even C uses some abstraction, however the notions that you have to use to conceive a program in C are much, MUCH closer to how the computer is physically organized.

     
     If you get customary with computer architecture and low-level programming, you will like C. But : you must be very self disciplined, cause C will allow you to do anything, even errors, without complaining, and you soon get lost. 

      You ought fix rules and conventions, and follow them rigidly. Learn recurring idioms like for(i=0; i<n; i++) (note <, not <=) and use them consistently. Even fixing and following hard rules for the layout of source code is very important, and follow them while you are writing, not at the end of the work!

        An epitome : in C many statements are also expressions. This means that
  1. a = 1;
        has an effect (assign 1 to a), but also a value (1). So you can very compactly write:
  1. a = b = 1;
        which assigns to a the value of the expression b = 1, i.e., 1. However, you may also write
  1. if (a == 1) { /*...do something...*/ }
       which leads to the (very!) common mistake of using = instead of ==.
  1. if (a = 1) { /*...do something...*/ }
        You might think that the compiler should shout error! on this, but no. a = 1 is a statement, but also an expression, so it is a legitimate value that you can use as the condition of an if clause: this is correct C syntax.
      regrettably , a = 1 has a constant value (which is 1) and subsequently the test constantly succeeds, independently of the previous value of a
Result: { /*...do something...*/ } is always done.
So, at the end :
  1. define your machine
  2. define the language
  3. define and control yourself

Comments

Popular posts from this blog

Why you should learn Data science in 2018 ?

How to create Virtual reality (VR) content?

steps to learn virtual reality Development 👊