Sunday, June 7, 2009

Learning C the hard way

I thought that the C coding job was just something I could assign to another project member. I was wrong. I also though that you could read C programming books and then dive right into the code. I was wrong about that to. Apparently, unlike things such as version control and ht ml, learning the C programming language is going to take a long long time. Part of it is because the books written about programming in C are very bad. And the other part is unlike other things, there is just so much to learn before you get a working knowledge of C. Every semi-colon, every comma makes a difference in being able to compile and run the program. Also, functions don't necessarily work the way you think they should. Take scanf for instance. The whole deal that spaces meant a new entry with scanf took me a while to figure out. Also, you have to be careful that you are not inputting things in that you don't mean to. String processing doesn't work like you think it should. And I haven't even done an in depth study of structures yet, something I will need to do to be able to understand the wograld code. The problem with most programming books is this. they give you examples, but when you try to build something on your own you are left in the dark. Then, other books have algorithms in them, but those algorithms will give you no way to implement that in the C code. You end up spending your time hunting down syntax errors because you can't implement the algorithm.

No comments: