Where to begin when learning C? Start by making lots of errors
morganwilde.svbtle.com
Where to begin when learning C? Start by making lots of errors
1–10 of 90 posts
Re: Where to begin when learning C? Start by making lots of errors
#2Re: Where to begin when learning C? Start by making lots of errors
#3Re: Where to begin when learning C? Start by making lots of errors
#4By making sure to enable all warnings , enable warnings as errors and use a compiler that integrates static analysis like clang.
Re: Where to begin when learning C? Start by making lots of errors
#5By making sure to enable all warnings , enable warnings as errors and use a compiler that integrates static analysis like clang.
Use your compiler, use it well with all its warnings. Run your programs under valgrind or some such.
Re: Where to begin when learning C? Start by making lots of errors
#6By making sure to enable all warnings , enable warnings as errors and use a compiler that integrates static analysis like clang.
I am using the default `cc` compiler on Mac OS X for this without any flags, are you saying I should something non-stock in this case?
For learning, you could also add -ansi, as it will make your compiler be stricter about standards.
Re: Where to begin when learning C? Start by making lots of errors
#7I had a lot of things wrong. It took me a while to understand the difference between control-D and EOF, for instance (how embarrassing). But the 30 days I spent without a compiler made me think about program behavior.
I'm not saying this is a great way to learn a language, but it can be done.
I keep hearing people complain about K and R being "a terrible book." For me it was perfect: pragmatic, succinct, with great examples and good exercises.
Re: Where to begin when learning C? Start by making lots of errors
#8By making sure to enable all warnings , enable warnings as errors and use a compiler that integrates static analysis like clang.
I am using the default `cc` compiler on Mac OS X for this without any flags, are you saying I should something non-stock in this case?
C is insecure by design and IT is still paying for its widespread, when used by developers that don't use the best practices for secure C coding.
So when learning how to use it, the best way is to learn those best practices from day one.
Re: Where to begin when learning C? Start by making lots of errors
#9I learned C by reading K and R and doing the book's exercises . . . on paper. At the time I didn't have access to a C compiler, so I wrote them all out in a notebook. A month later I got a job at a shop that was running Unix, and got the chance to type my programs in and try them. I had a lot of things wrong. It took me a while to understand the difference between control-D and EOF, for instance (how embarrassing). B…
Re: Where to begin when learning C? Start by making lots of errors
#10Earlier quoted context omitted.
I am using the default `cc` compiler on Mac OS X for this without any flags, are you saying I should something non-stock in this case?
The Mac OS X C compiler is clang, no need to install anything extra. C is insecure by design and IT is still paying for its widespread, when used by developers that don't use the best practices for secure C coding. So when learning how to use it, the best way is to learn those best practices from day one.