Programming Books
Programming Books
Ok for anyone who remembers (no one probably) or cares (less people) lets ignore the fact that I regularly disapear. I was.... sleeping. That's a good excuse right?
Anyway I was wondering of any of you guys/gals know of any good books for learning C++, C# or PHP. I'm at Uni taking Computer Science and have a decent background in programming in general and in OOP from Java (yes I know some people say it's not really object-orientated but meh). Anyone got any good suggestions?
Anyway I was wondering of any of you guys/gals know of any good books for learning C++, C# or PHP. I'm at Uni taking Computer Science and have a decent background in programming in general and in OOP from Java (yes I know some people say it's not really object-orientated but meh). Anyone got any good suggestions?
All I want is a warm bed and a kind word and unlimited power. - Ashleigh Brilliant
Effective C++, 3rd Edition, ISBN 0321334876, while not a good beginner's book, is excellent once you have progressed beyond the beginner stage.
I think the book that I cut my C++ teeth on was Problem Solving with C++: The Object of Programming, ISBN 0321412699 (6th edition). I think I used an earlier edition (I learned C++ in the spring of 2000). It's kind of expensive (it's a college textbook, after all) but I basically taught myself my college's introductory C++ course from that book.
I think the book that I cut my C++ teeth on was Problem Solving with C++: The Object of Programming, ISBN 0321412699 (6th edition). I think I used an earlier edition (I learned C++ in the spring of 2000). It's kind of expensive (it's a college textbook, after all) but I basically taught myself my college's introductory C++ course from that book.
-
- level5
- Posts: 11553
- Joined: Wed Jul 10, 2002 7:44 pm
- Location: Nashville, TN
- Contact:
I learnt how to code C++ by the Uplink DevCD.....
I still have nightmares about Chris' code.
I still have nightmares about Chris' code.
Uplink help: Read the FAQ
- ScareyedHawk
- level5
- Posts: 1156
- Joined: Wed Sep 17, 2003 10:14 pm
- Location: Västerås, Sweden
- NeoThermic
- Introversion Staff
- Posts: 6256
- Joined: Sat Mar 02, 2002 10:55 am
- Location: ::1
- Contact:
I would wager there isn't a single person who touched the DevDisk who doesn't get nightmares about the code....
Then again, I do look back at some of my A-level stuff and cringe.
Regardless of what language you decide to fly with, always learn and stick to a decent set of coding standards, and use them exclusively. Not only will it make your code far more maintainable by yourself (you won't wake up to code and go "who the hell coded this?!" only to realise a few seconds later it was you), but others will be able to pick your code up without much problem.
NeoThermic
Then again, I do look back at some of my A-level stuff and cringe.
Regardless of what language you decide to fly with, always learn and stick to a decent set of coding standards, and use them exclusively. Not only will it make your code far more maintainable by yourself (you won't wake up to code and go "who the hell coded this?!" only to realise a few seconds later it was you), but others will be able to pick your code up without much problem.
NeoThermic
NeoThermic wrote:Regardless of what language you decide to fly with, always learn and stick to a decent set of coding standards, and use them exclusively. Not only will it make your code far more maintainable by yourself (you won't wake up to code and go "who the hell coded this?!" only to realise a few seconds later it was you), but others will be able to pick your code up without much problem.
Seconded. And write LOTS of comments! Believe it or not, they help more then you could ever imagine!
We dont stop playing cos we get old... We get old cos we stop playing.
NeoThermic wrote:I would wager there isn't a single person who touched the DevDisk who doesn't get nightmares about the code....
Then again, I do look back at some of my A-level stuff and cringe.
Regardless of what language you decide to fly with, always learn and stick to a decent set of coding standards, and use them exclusively. Not only will it make your code far more maintainable by yourself (you won't wake up to code and go "who the hell coded this?!" only to realise a few seconds later it was you), but others will be able to pick your code up without much problem.
NeoThermic
hmm, what code did you do for A-Level? we're doing VB which is kinda annoying, I mean learning C++ would be a much more useful skill...
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
elDiablo wrote:NeoThermic wrote:Regardless of what language you decide to fly with, always learn and stick to a decent set of coding standards, and use them exclusively. Not only will it make your code far more maintainable by yourself (you won't wake up to code and go "who the hell coded this?!" only to realise a few seconds later it was you), but others will be able to pick your code up without much problem.
Seconded. And write LOTS of comments! Believe it or not, they help more then you could ever imagine!
Not lots of comments, good comments.
i++; //increment i is NOT a good comment
Generally, write a brief summary for every function or procedure you write (describing the purpose and the data-sources the function uses [example: function get_users : Gets a list of all user-names from database xY using connector Z] , the way to use the function) and a comment for hard or wierd parts of the function. If you are using a good coding-standard you won't have to comment every if.
Writing comments tailored for Doxygen in C++ (and C and Java, though Java also has Javadoc) is a good way to practice writing good comments.
- NeoThermic
- Introversion Staff
- Posts: 6256
- Joined: Sat Mar 02, 2002 10:55 am
- Location: ::1
- Contact:
martin wrote:hmm, what code did you do for A-Level? we're doing VB which is kinda annoying, I mean learning C++ would be a much more useful skill...
Ah, I used PHP to deal with input to a MySQL database. I had a choice between that or doing it in VBA in access. Naturally I feel I chose the better option, but looking back at the code it makes me want to shoot myself
elDiablo wrote:And write LOTS of comments! Believe it or not, they help more then you could ever imagine!
Seconded. Comments are part and parcel of a coding standards, as any decent one should include formatting guidelines for comments.
alphager wrote:Not lots of comments, good comments.
i++; //increment i is NOT a good comment
Why not? If that is all the line is, and the rest of the code around it makes it obvious (either via decent layout or comments) as to what `i` does, then what makes `i++; //increment i` a bad comment? It might be overuse of comments if you're doing that all the time, true, but the comment is correct and as short as needed to describe what the line is doing
alphager wrote:Generally, write a brief summary for every function or procedure you write (describing the purpose and the data-sources the function uses [example: function get_users : Gets a list of all user-names from database xY using connector Z] , the way to use the function) and a comment for hard or weird parts of the function. If you are using a good coding-standard you won't have to comment every if.
As a comment for the get_users function, I would find that too little In general, my code has something akin to this comments wise for most of the larger functions (anything more than ~20 lines, or anything critical to the program):
Code: Select all
/**********************************
function {function name}
Description:
{single paragraph about what the code is doing. Two at most if the function is complex. Any more than that, consider re-writing or breaking the function up}
Inputs:
{list of inputs, their data types, and what they are used for. Also indicate what is required and what is optional, and if any checking is done on the inputs in the function or not (as the last thing you want to do is pass incorrect data to a function that doesn't check it)}
Outputs:
{list of any output, their data types, and also list the possible error outputs the function gives, if any}
Extra notes:
{List of things to watch out for that isn't covered by the above detail}
History:
{Short history of the last 5 or so edits. If you're not using a source control system, consider more than 5 edits listed here}
**********************************/
prozachar wrote:Writing comments tailored for Doxygen in C++ (and C and Java, though Java also has Javadoc) is a good way to practice writing good comments.
Ish. Sometimes the required comments for documentation systems is not helpful to someone reading the code, as these comments can be too short. The last thing someone wants is to have to drudge through some documentation to check on the inputs to a function, for example.
NeoThermic
-
- level5
- Posts: 11553
- Joined: Wed Jul 10, 2002 7:44 pm
- Location: Nashville, TN
- Contact:
NeoThermic wrote:Ish. Sometimes the required comments for documentation systems is not helpful to someone reading the code, as these comments can be too short. The last thing someone wants is to have to drudge through some documentation to check on the inputs to a function, for example.
I have to agree, the documentation systems generally make reading the comments in the code a pain in the arse. I've never found them particularly useful in any event.
Who is online
Users browsing this forum: No registered users and 11 guests