|
12th May 2004, 15:52 | #1 |
|
C++ - Starting from Scratch
I'm looking into C++, I haven't done ANY before.
Can any one recommend sites/ebooks/books/tutorials that can help me get into it quick? Cheers peeps. |
12th May 2004, 18:27 | #2 |
|
The C++ Programming Language. By Stroustrup the guy who created the language.
|
12th May 2004, 21:21 | #3 |
|
I started off with dietel & dietel, which was passable.
If you've got bit of programming experience, I'd recommend Stroustrup, altho it is a bit more of a reference book than a learning book (imo). My advice would depend on how much experience you have with other languages, I guess. |
12th May 2004, 21:24 | #4 |
Ich Bin Ein Grey Lynner
|
Stroustrop wrote another book (cant remember the name) which explained the reason behind why things were like what they were. I reckon I learnt more from that than the reference.
|
12th May 2004, 23:03 | #5 |
|
Accelerated C++ isn't too bad IMO.
|
15th May 2004, 08:53 | #6 |
|
C++ in plain english + google + google + google + google + /usr/src + google
If you get a book (a real one) which explains the basic guts, go thru and get the basics right, then you can fruit about and make your own programs go and then away you go IMO try to stick to procedrual C/C++ ( eg, basic normal old functions and structures ) and try to stay away from going with all the super tangy OO flavours ( eg, cin/cout, operator overloading, inheritance, and all that weirdo polymophisim shit and such like). Going all out Mr.OO in C++ is all good in very good in theory but when its real world stuff, it can become a real pain in the arse. |
15th May 2004, 09:47 | #7 | |
Ich Bin Ein Grey Lynner
|
Quote:
pk, if you get far enough into OO, it becomes pretty hard to not realize that objects and proceedures are actually the same thing, object hierarchies with virtual functions and switch statements are the same thing. They're just syntatically nicer ways of doing what good programmers do in C by hand to avoid writing spaghetti. You wont ever make the mental break thrus in understanding how to structure code in an OO way unless you force yourself to use it dude. |
|
15th May 2004, 12:06 | #8 | |
|
Quote:
Of course, I'm not expecting the guy to whup out all the features of C++ right from his first 'hello world' program, but advising him to stay away from those features for ever seems strange. A good book would introduce the OO features of the language at a nice pace, so that he could learn without getting overwhelmed by it all. Hell, thats why you pay for the book. |
|
18th May 2004, 01:45 | #9 |
|
keep it simple stupid
|
18th May 2004, 02:25 | #10 |
HENCE WHY FOREVER ALONE
|
it all depends if you're working with things that come in many variants that you wanna treat the same [different protocols to do the same job, just with different equipment] or if you wanna just achieve a single task with one set of equipment that never changes....
|
18th May 2004, 02:27 | #11 | |
HENCE WHY FOREVER ALONE
|
Quote:
|
|
18th May 2004, 04:15 | #12 | |
|
Quote:
__________________
@madlep I'm not Australian, I just live there ubercharged.net - Tales of Team Fortress 2 pwnage and other hilarity |
|
18th May 2004, 09:20 | #13 | |
Ich Bin Ein Grey Lynner
|
Quote:
oo can be used for more than just defining interfaces and abstracting code, if thats the way you think, then you're missing half of it imo. |
|
18th May 2004, 13:44 | #14 | |
|
Quote:
|
|
19th May 2004, 21:26 | #15 | |
|
Quote:
I haven't actually read it, so can't comment on it. Hooker - I suggest you have a look at: http://www.cuj.com/corner/read.htm |
|
19th May 2004, 21:54 | #16 | |
|
Quote:
Code:
Code:
Last edited by Adaptation : 19th May 2004 at 21:57. |
|
19th May 2004, 23:22 | #17 | |
|
Quote:
I think I'm missing something... ? |
|
20th May 2004, 03:59 | #18 |
|
so... uh... how'd you like them apples?
|
20th May 2004, 12:15 | #19 |
|
Awesome replies guys, just to let ya know I'm going over the fundamentals using the Skill Builder CD's by NetG. Quite well done and it asks questions through each topic and an assessment once a topic is covered. 6 Cd's all together.
I think I'll learn a lot more once doing the practical - as going over the theory is relearning etc - but going over it for the syntax/different conventions. Thanks guys! |
20th May 2004, 13:49 | #20 | |
|
Quote:
But as Madlep pointed out, right tool for the job still takes priority, OO or not. |
|
22nd May 2004, 03:33 | #21 | |
|
Quote:
|
|
22nd May 2004, 11:37 | #22 | |
|
Quote:
Could you tell from looking at machine code whether it was written OO or procedural? (be honest). |
|
22nd May 2004, 12:50 | #23 | |
|
Quote:
For all but the most detailed discussions of OO vs procedural programming, what happens to the code once it's written is irrelevant. (Of course, this is all just my opinion, and I'm not a guru or anything. I would be interested to know why I'm wrong about this, if you think I am) |
|
22nd May 2004, 16:18 | #24 | |
|
Quote:
I find OO helps me lay out my software code in a more logical manner. Procedural is great but only for small programs, imo. Last edited by Charismo' : 22nd May 2004 at 16:22. |
|
22nd May 2004, 19:20 | #25 | |
|
Quote:
__________________
@madlep I'm not Australian, I just live there ubercharged.net - Tales of Team Fortress 2 pwnage and other hilarity |
|
23rd May 2004, 20:15 | #26 |
|
General rant ...
Have a read about Design Patterns too. These apply more to OO than procedural stuff, but the concept is still the same. Design patterns can help both in the upfront design of a new program or the maintenance of an existing program, through the use of tried and true constructs to solve commonly recurring problems within a given context. Design Patterns also aid in understanding the abstract concepts of a program. For example, through OO design w. Design Patterns, a developer maintaining code they haven't worked on previously doesn't have to immediately concern herself with the inner workings of a code base to figure out how things work - this will be made clear through design. The abstract language provided by OO/Design Patterns is useful for teams that add new people and require them to quickly get up to speed with a code base. OO and Design Patterns also tie in nicely with Refactoring and Test Driven Development (TDD), which are basically just good things to do to help develop quality code, OO or not. Some links: http://www.refactoring.com/ www.dofactory.com/patterns/Patterns.aspx http://msdn.microsoft.com/msdnmag/is...meProgramming/ |
24th May 2004, 21:29 | #27 |
|
Those are some nice links
A good book in that area is 'Design Patterns' by Gamma, Erich, Helm, and Vlissides (which replicates http://www.dofactory.com/patterns/Patterns.aspx ). For a more C++ centric approach to generic programming there's 'Modern C++ Design' by Andrei Alexandrescu. These books are more for experienced programmers however, especially Alexandrescu's. As for switch statements vs virtual functions; I concede that they are not the same thing. Conceptually they are very different, but the actual generated code is similar: A switch statement (best case) will use a jump table to indirectly jump to the relevant section/function. A virtual function will result in an indirect jump via a vtable to the relevant function. |
23rd March 2022, 23:28 | #28 | |
Ich Bin Ein Grey Lynner
|
Quote:
These days we're writing functional javascript, where people are using only functions to replicate the few parts of OOP that are worth keeping, and most places I worked in the last few years won't let your code thru PR if there's any cases where you've used an object that could have been done functional style. I didn't make much sense with what I was saying back then, but I think I've ended up not being far off. |
|
4th April 2022, 18:32 | #29 |
|
It's fascinating (fortunate/unfortunate?) the role javascript has in the contemporary development landscape. I don't think many 20 years ago would have believed it.
__________________
Stay shook. No sook. |