This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C/asm Tutorials Please! universal request

Could someone write a comprehensive C tutorial specifically aimed at those who are trying to learn C for programming? I think this would help since the wikibooks, and tutorials, among others, are broken/non-existant. this may be the reason that programming in C has declined these past years. (I know its the reason I don't do it in C)

Also, an explanations of the compilers error codes would help.

Parents
  • "Could someone write a comprehensive C tutorial specifically aimed at those who are trying to learn C for programming?"

    I'm a bit curios now. How many are trying to learn C specifically _not_ for programming?

    I thought just about all C tutorials in existence was for people wanting to _program_ in C.

    The error codes are totally dependant on the used compiler, so no general book/tutorial can cover them. But the errors are directly related to errors in spelling of C keywords or symbols, or errors in the C syntax, or the use of undefined/undeclared symbols. So it doesn't matter what exact texts a specific compiler uses when emitting errors. The first error issued do specify a source code line, and around that line (or maybe one or a few lines above it) there is a error.

    And even if some compilers are better than others to describe the detected error, they all still give enough hints that you can normally quite quickly find the error in the source code.

    The thing with C is that it is a quite small language. So you can get going quite quickly. But you have to do own work - i.e. try to program and then do the traditional feedback loop with:
    - write code
    - compile
    - read compiler errors
    - fix errors
    - repeat

    And then the second loop:
    - write code
    - compile
    - testrun
    - figure out why code doesn't do as expected, aka debug.
    - fix errors
    - repeat

    Almost all learning, in most areas, contains similar feedback loops, where we learn while correcting our own mistakes. The main part of the learning is actually in the time spent solving problems:
    - how to convert an idea into a sequence of computer-processable instructions
    - how to interpret compiler warnings/errors and correct/improve code
    - how to interpret results as compared to expectations and correct/improve code

    So the main part of learning C is not to find a magic compendium with the optimum description of the language. The main part is to spend time, get stuck, solve problem, continue forward.

    Might sound dull, but each problem teaches you something, making you able to stay away from similar problems in the future. Initially, a simple flash-LED program may feel hard. But after a while, it will start to feel simple and finally trivial, as you continue to learn and gain experience.

Reply
  • "Could someone write a comprehensive C tutorial specifically aimed at those who are trying to learn C for programming?"

    I'm a bit curios now. How many are trying to learn C specifically _not_ for programming?

    I thought just about all C tutorials in existence was for people wanting to _program_ in C.

    The error codes are totally dependant on the used compiler, so no general book/tutorial can cover them. But the errors are directly related to errors in spelling of C keywords or symbols, or errors in the C syntax, or the use of undefined/undeclared symbols. So it doesn't matter what exact texts a specific compiler uses when emitting errors. The first error issued do specify a source code line, and around that line (or maybe one or a few lines above it) there is a error.

    And even if some compilers are better than others to describe the detected error, they all still give enough hints that you can normally quite quickly find the error in the source code.

    The thing with C is that it is a quite small language. So you can get going quite quickly. But you have to do own work - i.e. try to program and then do the traditional feedback loop with:
    - write code
    - compile
    - read compiler errors
    - fix errors
    - repeat

    And then the second loop:
    - write code
    - compile
    - testrun
    - figure out why code doesn't do as expected, aka debug.
    - fix errors
    - repeat

    Almost all learning, in most areas, contains similar feedback loops, where we learn while correcting our own mistakes. The main part of the learning is actually in the time spent solving problems:
    - how to convert an idea into a sequence of computer-processable instructions
    - how to interpret compiler warnings/errors and correct/improve code
    - how to interpret results as compared to expectations and correct/improve code

    So the main part of learning C is not to find a magic compendium with the optimum description of the language. The main part is to spend time, get stuck, solve problem, continue forward.

    Might sound dull, but each problem teaches you something, making you able to stay away from similar problems in the future. Initially, a simple flash-LED program may feel hard. But after a while, it will start to feel simple and finally trivial, as you continue to learn and gain experience.

Children
No data