Saturday, December 6, 2008

Week 1, Day 2

Super easy lesson today. I could have easily skipped the entire chapter. It introduced nothing too new for me, coming from PERL and PHP. Even JavaScript coders could probably skip this entire chapter.
I did learn something new though. I have used comments in the past to basically detail everything the function that follows does... and apparently so did the author. He wrote in this book that he had a change of mind from previous editions of this book. I like his new approach and will have to apply it. He says that now he uses comments to explain WHY the code is being called. WHAT the code is doing should be sufficiently evident from the actual code. It is the programmers responsibility to write his code in a way that is understandable as to what it is doing, without the lazy approach of comments.

Today's "Class"

Today discussed the basic components of a C++ program. These include objects, functions, variables, and other components. The chapter does a quick introduction to functions, throws in some variables in a few sample programs you recreate, and shows you how to add comments (and when to use them).

I have no desire to go into any depth into this chapter... So, if you are trying to learn from my blogs for some reason... just google the basics of C++ functions, variables, and comments and you should be good.

No comments: