LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2014, 06:46 AM   #16
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,877
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930

Quote:
Originally Posted by asero12 View Post
now that we are speaking about this, the book that I'm using is the one of Deitel and Deitel "C++ :How to program" (6th edition), it is a REALLY long book, but (for anyone who has read it) is it a good option? I mean, when I finish it will I have enough grounding?
Don't know the book. I only learned from books in college, because I paid a lot of money for them and mainly they were written by the prof, so they taught fully to the book.

I TRIED learning from books in my career, I have a moderate collection of C, C++, Qt, Linux, and RTOS references mostly all in pristine condition.

I say "do" versus read; albeit Chapters 1-2 or 3 of the books were good overviews as well as pointers towards the areas which I was looking. For instance I had to learn how to do GUI software and the first example was a board running Qt, so I leapt in and now I know quite a lot about Qt which is also C++. Java was learned due to a necessity to make Android apps. Therefore your intention is to do game software. I would look for game source code you can build and modify that is written in one or more of the languages discussed and compile it, debug it, modify it; start learning by doing with that language and others' examples. The books, the wiki's, references are still very good for the actual details of the language. The other part of all this is the structure and/or architecture of code as well as the design methodologies. IMHO the canned ways that designer tools set up projects are not good for a real project. My point there is that I don't use Qt Designer, I write the code in my intended form and the Qt framework is used in my Make process. If I were to rely on the structure established by the Qt Designer, I'd have a ton of fluff files; many of which I wouldn't understand their intent, and I'd probably have learned less about the programming environment also if that were the case. Further, literally every answered question online for Qt was C++ code examples, not "Go to the <blah-blah> menu on your Designer and click ..."
 
Old 07-18-2014, 11:56 AM   #17
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,200

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
The only book I would recommend is Stanley Lippman's C++ Primer. I've just linked to a DRM-free, all-formats copy you can buy on InformIt. You can also buy it from Amazon for less money, but pay a hidden cost in DRM and lockin.

EDIT: the Deitel & Deitel books I've seen (C# and Java) have all been garbage.

Last edited by dugan; 07-21-2014 at 12:50 PM.
 
1 members found this post helpful.
Old 07-19-2014, 11:43 AM   #18
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by dugan View Post
I think it's the exception that proves the rule, but: Minecraft.
I wouldn't call it great, but I suppose it could be an exception. Vuze/Azureus may also be an exception. That's about all of them I can think of.
 
Old 07-21-2014, 03:33 AM   #19
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
I agree with Linus, C++ is a horrible language.

C is still the boss.
 
Old 07-21-2014, 12:18 PM   #20
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by bigearsbilly View Post
I agree with Linus, C++ is a horrible language.

C is still the boss.
For a kernel, yes. For GUI programs, probably go C++.
 
Old 07-21-2014, 12:33 PM   #21
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,200

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
Quote:
Originally Posted by metaschima View Post
For a kernel, yes.
Yeah. Correct me if I'm wrong, but I don't think Linus said C++ was a horrible language, just that it was wrong for what his team was doing.

Please keep in mind that a) "a horrible language" and "a horrible language for game development" are not synonymous, and b) the current version of C++ is not as horrible as it used to be.

Last edited by dugan; 07-21-2014 at 07:22 PM.
 
Old 07-22-2014, 04:15 AM   #22
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
I just searched and funnily enough they were his exact words!

[ apologies it was just my inner troll ]

I gave C++ up and went back to C two years ago and feel much healthier.
I realised I was spending a whole lot more time thinking about C++ than the actual problem!

now I couldn't care less how to de-reference a private virtual member base class constructor smart pointer friend operator
and I also get a lot more work done.


Last edited by bigearsbilly; 07-22-2014 at 04:17 AM.
 
Old 07-22-2014, 04:20 AM   #23
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
Quote:
Originally Posted by bigearsbilly View Post
I agree with Linus, C++ is a horrible language.

C is still the boss.
C++ is often misused, that is horrible. That's why you really need to learn C++ before implementing any usable application.
 
Old 07-22-2014, 05:14 AM   #24
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
a problem with C++ is that it takes time to understand and learn
time that no one takes
and C++ is nearly nowhere taught (properly).

well, ok, there are even university courses teaching C++
applying GOF patterns with C++ and such mess,...
and teachers do not come from the (practical) C++ world.

usually and/or often you learn C, and than move on to java, or nowadays python

than people apply what they have learned to and with C++
additionally copy and past from some quick Internet research

the outcome is very often horrible, yes

but
horrible programmers write horrible code
no matter which language they use

If you search for the best resources available and respect the advices it is possible to have also a good start with C++
just go there
http://www.stroustrup.com
read through the FAQ and than use his books
than continue

and this is a fact, if you step through C++, what takes a live and more,
you have the most power full and flexible tool that you can think about and that is currently available
arguing that less is more has something of Orwell's newspeak

but of course
for very many approaches C++ is the best tool
for much more not,

about Linus and C++,
when he looked at C++ the common understanding of the language was a different one than it is today
he had years of C experience, no C++ experience, and had to deliver something.
this is not the best way to learn how to deal with C++
especially it you think you have to start with
'how to de-reference a private virtual member base class constructor smart pointer friend operator'
:-)
so Linus had good and valid reason to stay with C

so deciding for a language needs to consider much more reasons than just technologically ones
 
Old 07-22-2014, 07:24 AM   #25
mina86
Member
 
Registered: Aug 2008
Distribution: Debian
Posts: 517

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by a4z View Post
but
horrible programmers write horrible code
no matter which language they use
His other argument is that horrible programmers never learn C, whereas some of them “learn” C++ (since in some cases it's easier, e.g. you can compare strings like you would numbers), so if your project is in C, you scare off all of those horrible programmers.

Now I'm not sure if that holds any more though. I guess it's yet another argument not to write in Java or Python though.

Last edited by mina86; 07-22-2014 at 07:25 AM.
 
Old 07-22-2014, 07:54 AM   #26
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,877
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I don't believe in knocking or attacking C++ as a language. I've had to use it a ton for Qt development.

I don't use all the available properties/benefits of C++, especially things like function inheritance, polymorphism, and exception handling; therefore my C++ is very much like C, except I have classes.

There's one concept where a class inherits from another, and that's about the sole benefit I draw from it.

For instance some sort of widget has a method that is best customized for my needs, so I make a class of MyWidget based off of the original Widget and change just that one method. Likely I'm also copying that concept from someone's example because I googled for something like "How in the world can I make my widget dance on its head?" and found that there's no method that does exactly what I need/want it to do.

To me C++ is a viable language and I've survived very well programming in it without becoming someone who quotes or parrots that language as "the" language to use.

Having said all that, "it is one language, there are many", I know a few languages, you're best advised to be capable to deal with that language to some degree, and probably the properties of inheritance are pretty important to you, because I know they're important in non-game GUI programming.
 
  


Reply

Tags
c++, learning


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Slackware worth learning? Bull3t Slackware 92 09-29-2010 01:11 PM
Languages Worth Learning TaylanUB Programming 30 01-09-2010 10:45 AM
is perl worth learning? smeezekitty Programming 60 12-26-2009 07:09 PM
Python - worth learning? vharishankar Programming 39 07-08-2005 02:38 AM
Is it really worth learning vi at this point? Tyir Linux - General 8 02-24-2004 12:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration