Programming Books

The place to hang out and talk about totally anything general.
TheRaven
level3
level3
Posts: 416
Joined: Thu Nov 14, 2002 10:01 pm
Contact:

Programming Books

Postby TheRaven » Thu Dec 07, 2006 4:35 pm

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?
All I want is a warm bed and a kind word and unlimited power. - Ashleigh Brilliant
prozachar
level1
level1
Posts: 60
Joined: Fri Oct 06, 2006 8:57 pm

Postby prozachar » Thu Dec 07, 2006 4:39 pm

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.
Stewsburntmonkey
level5
level5
Posts: 11553
Joined: Wed Jul 10, 2002 7:44 pm
Location: Nashville, TN
Contact:

Postby Stewsburntmonkey » Thu Dec 07, 2006 6:54 pm

If you have a decent handle on programming in general C++: The Complete Reference is one of the best books for C++. Programming PHP from O'Reilly is good for PHP. :)
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Thu Dec 07, 2006 7:17 pm

Stewsburntmonkey wrote:Programming PHP from O'Reilly is good for PHP. :)

I'll have to second that. Both Wendryn and I really this book :)

xander
elDiablo
level5
level5
Posts: 3111
Joined: Thu Mar 14, 2002 12:23 pm
Location: London, UK

Postby elDiablo » Thu Dec 07, 2006 10:32 pm

OH MY GOD IT'S THE RAVEN! I remember you!

Anyway, Deitel and Deitel - C++: How to Program. 4th Edition is the one I have, and it's ISBN 0-13-111881-1. They do a good Java one too.
We dont stop playing cos we get old... We get old cos we stop playing.
Rkiver
level5
level5
Posts: 6405
Joined: Tue Oct 01, 2002 10:39 am
Location: Dublin, Ireland

Postby Rkiver » Fri Dec 08, 2006 12:22 am

I learnt how to code C++ by the Uplink DevCD.....






I still have nightmares about Chris' code. :cry:
Uplink help: Read the FAQ
User avatar
Chris
Introversion Staff
Introversion Staff
Posts: 1172
Joined: Sat Nov 25, 2000 7:28 pm
Location: Cambridge, UK
Contact:

Postby Chris » Fri Dec 08, 2006 12:40 am

Me too.
User avatar
ScareyedHawk
level5
level5
Posts: 1154
Joined: Wed Sep 17, 2003 10:14 pm
Location: Västerås, Sweden
Contact:

Postby ScareyedHawk » Fri Dec 08, 2006 12:51 am

Posting in a legendary thread.
User avatar
NeoThermic
Introversion Staff
Introversion Staff
Posts: 6254
Joined: Sat Mar 02, 2002 10:55 am
Location: ::1
Contact:

Postby NeoThermic » Fri Dec 08, 2006 12:55 am

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
elDiablo
level5
level5
Posts: 3111
Joined: Thu Mar 14, 2002 12:23 pm
Location: London, UK

Postby elDiablo » Fri Dec 08, 2006 8:00 am

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.
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Fri Dec 08, 2006 9:40 am

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.
alphager
level3
level3
Posts: 400
Joined: Fri Jul 28, 2006 1:36 pm
Location: Germany
Contact:

Postby alphager » Fri Dec 08, 2006 12:16 pm

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.
prozachar
level1
level1
Posts: 60
Joined: Fri Oct 06, 2006 8:57 pm

Postby prozachar » Fri Dec 08, 2006 3:46 pm

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.
User avatar
NeoThermic
Introversion Staff
Introversion Staff
Posts: 6254
Joined: Sat Mar 02, 2002 10:55 am
Location: ::1
Contact:

Postby NeoThermic » Fri Dec 08, 2006 6:08 pm

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
Stewsburntmonkey
level5
level5
Posts: 11553
Joined: Wed Jul 10, 2002 7:44 pm
Location: Nashville, TN
Contact:

Postby Stewsburntmonkey » Fri Dec 08, 2006 7:13 pm

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.

Return to “Introversion Lounge”

Who is online

Users browsing this forum: No registered users and 31 guests