Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,545
6,042
If you want to learn c++ for example, is better to go straight for c++ or start with C and progress to c++ ?
I would suggest learning straight C first. I feel like too many people mistake features of C as being exclusive to C++ because they didn't learn C before C++. I find the same issue with people learning Obj-C before C.

Also, according to this info graphic, in 2012/2013 C is/has been the second most common language, just after Java:

http://infostory.com/2013/05/30/the-history-of-programming-languages/

Not only is C not dead, it could be considered to be more "alive" than many of its descendants including Obj-C, C++, and C#.
 
Last edited:

Menneisyys2

macrumors 603
Jun 7, 2011
5,997
1,101
1.But if you want to learn c++ for example, is better to go straight for c++ or start with C and progress to c++ ?

Definitely start with C. C++ really requires a working knowledge of C - unlike with Objective-C, where you simply don't need C to start developing 99% of the time (if you don't call functions not having an Obj-C wrapper), assuming you learn from a decent Obj-C book.

Note that I speak of starting to program as a complete newbie. For a newbie, without any knowledge of assembly, C is very hard to grasp. Objective-C, particularly if you don't want to understand reference counting at first (but use ARC all the time), is much more beginner-friendly.

After you've become proficient in Obj-C, you can (and definitely should!) learn C (and also the subtleties of Obj-C, including ref. counting). Then, you'll also be able to develop that missing 1%. This is, IMHO, the right order if one is a complete newbie. Start with the easier and only learn the harder, more complicated when you're already proficient in the former.

2. If someone want`s to learn web development it`s still better to learn c/c++ first for a better understanding ?

Definitely not. If you want to do some heavy server-side programming, learn Java (more specifically, J2EE). It's very widely used on the server side. (Let me know if you need book recommendations - as I teach J2EE, I've read all J2EE books and can compile a writeup of the strengths and weaknesses of each.)

Same stands for HTML5. For that, I don't think you should learn all the subtleties of CSS / JS separately prior to starting to read a HTML5 book. If you choose some great material to learn from and also choose some good books on Canvas (I personally recommend the book Core HTML5 Canvas by Prentice Hall), you'll learn CSS / JS alongside HTML5 programming.

Is there any good known books for C/C++ ? (besides the c++ Stroustrup book)

I don't recommend the Stroustrup book for beginners at all. It's like the C++ version of Kernighan-Ritchie C book - a great reference material / second book but in no way should be used as a first one. C-wise, go with something much easier / more verbose; for example, Oreilly's Head First C. While some of the Head First series are very shallow, I've found this book much more digestable than the Kernighan-Ritchie one. (Some of these books were so shallow that they weren't at all published after the betas; for example, the Head First Android book. While I personally enjoyed the beta of that book, it indeed discusses very little - for example, IIRC, lists aren't discussed at all. Story of the cancellation at http://support.oreilly.com/oreilly/...tm_medium=email&utm_source=reply_notification , where I also talked to the O'Reilly folks.)

Note that I don't recommend Thinking in C++ either. It's just not very beginner-friendly.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
Apropos typo of the day!

There is a forum rule that you shouldn't correct typos. Your post just proved that this rule is absolutely stupid. I didn't even know "decedent" was a word, now I know. And yes, it's funny :D
 

chown33

Moderator
Staff member
Aug 9, 2009
10,706
8,346
A sea of green
There is a forum rule that you shouldn't correct typos. Your post just proved that this rule is absolutely stupid. I didn't even know "decedent" was a word, now I know. And yes, it's funny :D

Note that I didn't actually correct the typo, I only commented on its, um, aproposity appositeness.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,545
6,042
There is a forum rule that you shouldn't correct typos. Your post just proved that this rule is absolutely stupid. I didn't even know "decedent" was a word, now I know. And yes, it's funny :D

All thanks to my misspelling descendants, right clicking and accepting the only suggested fix without even checking that it was what I wanted, and chown picking up on it. I also didn't know the word decedent until chown mentioned it.
 

firewood

macrumors G3
Jul 29, 2003
8,107
1,343
Silicon Valley
That is, while it's certainly good to know C, in your case, as a complete beginner, I wouldn't bother with it. It's rather hard to learn and understand - Obj-C is WAAAY easier to learn.

And taking the easy way out sometimes means never learning the basics of how a computer really works.

There is a lot of hard stuff in C, but one doesn't need to learn a lot of the cruft to learn more of the basics of what's really happening inside the computer when your program executes. Obj-C, C++ and especially Java can hide so much inside opaque abstractions that programmers end up clueless about what's really happening, and their questions show it.

So learn C (or assembly language!) first, even if you never use it later. You'll be able to debug stuff that leaves high-level coders mystified. And nobody writes bug free code (for real applications).
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,997
1,101
And taking the easy way out sometimes means never learning the basics of how a computer really works.

There is a lot of hard stuff in C, but one doesn't need to learn a lot of the cruft to learn more of the basics of what's really happening inside the computer when your program executes. Obj-C, C++ and especially Java can hide so much inside opaque abstractions that programmers end up clueless about what's really happening, and their questions show it.

So learn C (or assembly language!) first, even if you never use it later. You'll be able to debug stuff that leaves high-level coders mystified. And nobody writes bug free code (for real applications).

1, I do agree C must be learnt sometime in the OP's carreer. This is what I've stated in my prev posts too.

2, I, however, do NOT agree it should be the first language to learn. He's a complete newbie. He'll just get frustrated - C just isn't ideal for newbies. By learning Obj-C first, he can avoid frustration and can get productive VERY fast by writing apps don't needing a single C system call (many apps - mostly non-games - don't need to call library functions not having Obj-C wrappers). For example, I maintain a large iOS offline mapping and offline routing app with dozens of classes and XIB's. I only needed to use for example malloc() and, for example, unsigned char* in three or four cryptography-related classes to encode offline media / map resources from hackers / people want to reuse them without permission. Everything else could simply be done in simple Obj-C and Cocoa Touch. That is, the OP may not need to know the intricacies of C even in large projects - he can safely start with Obj-C and only learn C later.

(Games are, of course, an entirely different question.)
 

firewood

macrumors G3
Jul 29, 2003
8,107
1,343
Silicon Valley
C just isn't ideal for newbies. By learning Obj-C first, he can ...

...become lazy, and never learn how a program really works.

C isn't for newbies, but little else current is. Basic and Logo are near obsolete, and there's nothing on Squeak for adults. No one designs programming languages for newbies any more. Almost everything else is designed for advanced programmers, not newbies.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,545
6,042
...become lazy, and never learn how a program really works.

C isn't for newbies, but little else current is. Basic and Logo are near obsolete, and there's nothing on Squeak for adults. No one designs programming languages for newbies any more. Almost everything else is designed for advanced programmers, not newbies.

I disagree. C is absolutely for "newbies". In the information age, you can Google any question about C, or any other common language, and find your answers and documentation. Languages stopped being designed for "newbies" because the internet came along and made learning stuff by looking it up a lot easier.

Things not for "newbies" in the information age is the cutting edge, where the documentation hasn't yet caught up with the technology because it's moving too fast.

Learn C the Hard Way makes you get your nose out of the book, hit the internet, and learn stuff on your own. That's what makes it "the hard way" - it gives you enough discussion and keywords so that you have some idea of what you should be googling for to be able to complete the projects. "The easy way" would be "copy all of this code. See that it works when you do it right?" - that's great, you did it with minimal effort, but no real project will ever be like that, and all that you learned was what was in one book (which will rarely be comprehensive.)
 

firewood

macrumors G3
Jul 29, 2003
8,107
1,343
Silicon Valley
.. but no real project will ever be like that ...

The vast majority of people will never need to code a "real project".

But I'm of the school that believes that every kid should learn to program. Turtle graphics and Alice games are tons more fun for kids than "real projects". There used to be a programming robot game for Macs that taught the majority of assembly language concepts. C allows learning some of the same stuff but in a far more boring manner.

There are even useful iOS apps in the App store that involve little to no "real project" advanced skills.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,545
6,042
The vast majority of people will never need to code a "real project".

But I'm of the school that believes that every kid should learn to program. Turtle graphics and Alice games are tons more fun for kids than "real projects". There used to be a programming robot game for Macs that taught the majority of assembly language concepts. C allows learning some of the same stuff but in a far more boring manner.

There are even useful iOS apps in the App store that involve little to no "real project" advanced skills.

Absolutely every kid should learn to program. When I'm finished with my degree in University in a few years I'm hoping to teach a class at my local high school on programming.

I suspect where our views differ is with what a "real project" is. If you can't go online and find a tutorial doing everything exactly the way you want, it's a "real project". You will be contributing to the world by producing something new that didn't exist before. If you can go online and find a tutorial doing everything exactly the way you want, then it's not a real project because all you'll be doing is duplicating someone else's work. It's of some educational value for you, but isn't really valuable in any other way.
 

Menneisyys2

macrumors 603
Jun 7, 2011
5,997
1,101
The vast majority of people will never need to code a "real project".

But I'm of the school that believes that every kid should learn to program. Turtle graphics and Alice games are tons more fun for kids than "real projects". There used to be a programming robot game for Macs that taught the majority of assembly language concepts. C allows learning some of the same stuff but in a far more boring manner.

Yup. In learning to program, it's absolutely essential a complete newbie has success right at the beginning not to discourage him or her. It's like learning foreign languages: you can make a kid hate learning all languages by forcing him to learn a very hard one as the first ever foreign language. Exactly the opposite is true if you do the other way around: make him study a language that makes him able to express his thoughts as early as possible, without having to learn tons of grammatical rules (e.g., conjugation; gender-dependent declension of nouns and adjectives etc. - a typical example is German.)

It's far-far easier to have almost instant success with a comparatively easy language. This is why I've told the OP, who is also a newbie, to learn something easy and instant-success first.


There are even useful iOS apps in the App store that involve little to no "real project" advanced skills.

Agreed. For a LOT of, typically non-gaming, solutions (sometimes even large ones), you simply don't need C-specific knowledge. There are object wrappers for most of the functionality in both the Mac and iOS API.
 

beautifulcoder

macrumors regular
Apr 13, 2013
218
2
The Republic of Texas
I didn't get a chance to go through all the posts so sorry if this has already been suggested.

As everyone says, 20 is not old!

I highly recommend you study Ruby on Rails. It'll teach you HTML/CSS/JavaScript which are quintessential for HTML5. This tutorial should get you started. You can pick it up from there by adding more pizzas to the app on your own.

http://guides.rubyonrails.org/getting_started.html

There are also a TON of Java web frameworks out there. Apache Struts so far is my personal favorite although I haven't tried Play which is promising. If your goal is to land a job in the industry this is a great place to start.

http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Java

Finally, all these frameworks are based on the MVC pattern which is derived from Cocoa UI development. Simply learning one of these will teach what good Object Oriented Programming is all about. Especially in Ruby.
 

firewood

macrumors G3
Jul 29, 2003
8,107
1,343
Silicon Valley
A lot of kids learned to program in Basic on an Apple II before they ever took an algebra course.

If you want to code graphics apps, learning some geometry will help.
 

keysofanxiety

macrumors G3
Nov 23, 2011
9,539
25,302
I was offered a job as a junior dev with the intention of the company "brining me up to scratch" on iOS development and I just couldn't say no.

That chapter of my life starts next week and I cannot wait. :cool:

Just want to pass on my congratulations. Really hope it goes well for you. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.