I want to learn some basics of software design (with the idea to expand thereupon later), particularly for mac and mobile devices. I am new to programming and have only basic HTML experience, so pretty much a complete novice. Are there any suggestions as to where I should start? I have just bought Herb Schildt's beginner's guide to C++, but I am now questioning whether or not it is the best place to start. Thanks in advance and apologies if this has been covered before, I couldn't find this topic on the site.
If you aim to develop primarily for the Mac and iPhone I would stick with Objective C - this is the defacto standard for those platforms.
Otherwise I'd recommend Java, this is a practical language to learn, popular in many domains, portable and will let you write mobile apps for Android pretty easily.
I like C++ for many reasons but it's hard for beginners and mainly useful if you want to do systems programming or write code that is "close to the metal".
If you want to do mac/mobile (presumably meaning iPhone), you're better off just jumping straight into Objective C.
C# is on a par with Java in terms of ease of use and with it you'll be able to write applications for Windows Phone 7 devices.
You have to make a choice - do you want to learn scripting languages or Object Oriented languages. My suggestion is to start with either Java or C#, just because there is so much to learn and find on the internet - if you run into trouble.
Both are Object Oriented languages, and have extencive class libraries you can start learning. If you want to learn mobile, I think Android is a better choice, since its open accessible and doesn't require you to pay 99 USD to put your application on a device. Android makes use of Java and XML (which is very similar to HTML).
Good luck!
I think there are two questions which people fail to answer when beginning to program:
- Are you learning to program for a Hobby or is this for a Job
- What do you want to build?
If you are learning as a hobby, start small and just build something. It could be a small messenging program or a program that logs your DVD collection. But the most important part to understand HOW to Build.
If you are trying to get a job as a programmer, the advice is the same. Build something. Get involved with a few open source Sourceforge projects where you'll learn that Actual coding is about 30% of the job, and the other 70% of the job is dealing with changing Requirements, Customer Feedback, and scope changes.
The biggest take away is to put the books away. Figure out what you want, then go about applying the right technologies and framework to build them.
You also can write iPhone applications in C#. And de Icaza promised to release a tool to write Android apps in C#. You can write Windows Phone 7 apps in C#.
C# is awesome and is simpler to use than Java. Java's lack of, for example, closures is making me mad. After C# switching to Java will be very simple - you'll just have to stop using some cool features.
But I think the best choice is Python. It's simple and beautiful language which is very common for webdev, science or desktop apps.
C++ is a fantastic place to start. Many scripting programming languages get their structure from C++. In fact most of the time you'll be able to do more advanced tasks in the C++ language better than more higher level languages. If you're willing to take the learning curve and try C++, I'd say go for it.
If you don't want to work that hard on learning languages, you can easily go with other scripting languages that are similar like PHP or Python. Those usually get a basis for what languages will look like and how they'll function, especially C derived ones.
Depend what you want to do.
If want learn only Java and C# are at same level to learn and exists a lot tutorials. take care that Visual Studio is a payed application (even when exists a free express edition) in other hand Java have full enterprise ready IDEs like Netbeans and Eclipse.
As C++ programmer I suggest you try to learn C++ with a good book as reference (upper you have a good list) because lot of languages are based on it at least in syntax (Java, C#, PHP, Python, etc)
But take care that C++ have a highest learn curve that other ones, but are once that you understand it everything is a piece of cake
BTW: Try to find a logical programming tutorial or something that teach you about HOW TO resolve a problem using pseudo-code instead of concern about a language specific solution.
C++ is probably one of the worst languages to use to learn how to program. It's a very complex language which often stumps people in various ways even if they have several years of experience with it. It's also a compiled language and it's statically typed (requires you to declare types of variables) - those are not bad things in themselves, but it makes things harder for beginners, I think. And you're also responsible for memory management as it doesn't have any sort of automatic garbage collection.
I'd suggest starting out with dynamically typed language with garbage collection like Ruby, Python or JavaScript. Maybe even Scheme for it's simplicity.
It's kind of like learning to drive: you probably want to start with an automatic shift car so you can concentrate on the practice of driving. Later on you can learn to drive a stick shift (C++).
I would recommend Python for most cases, it's easy enough to learn and has functional features for when you want to branch out. Jython makes it easy to use the Java libraries while still using the same syntax as Python. The only situation I would really use C++ is for CPU intensive tasks like ray-tracing, Kalman Filters/FastSLAM, or work on embedded devices and consoles.
Just to be contrarian and puritanical: In my ideal world, programmers start with ANSI C (aka C89) and are allowed to touch nothing else until they can at least parse simple files and create very simple data structures (linked lists, hash tables) in sane and reasonable (not necessarily optimal) ways.
After that, they never have to touch C again, and can use C++, C#, Java, Python, INTERCAL, ... I really don't care. I just really wish more programmers had a reasonable grounding in how the internals actually work.
If you're new to programming (and basic HTML isn't programming in this sense), I'd recommend starting with something you're going to use. Moreover, I'd recommend starting with something easier than C++.
You stated an interest in Macs and mobile devices, without specifying which mobile devices. If you want to program for Macs and Apple mobile devices (typically beginning with "iP"), you should learn Objective-C to start. If you're interested in programming for Android or (I think) Blackberry, learn Java. Both will be easier to learn than C++, both are reasonable (if not idea) starting languages, and both will allow you to program for some mobile devices.
Alternately, you could learn C. Again, not a great learning language, but a reasonable one, most of what you learn will be applicable to Objective-C, and much will be applicable to Java. You could learn Python, which is an excellent first language, and get more familiar with programming, and then go on to Objective-C and/or Java.
My advice is to learn one thing at a time, but never be afraid to learn something new.
C++ is a very mixed language, so you won't be able to learn the concepts in isolation. You'll likely end up spending more time trying to grasp C++ than you will just learning two other more specialized languages first, and then learning C++.
It's best to learn each paradigm from a language that's designed from the ground up for it.
I suggested this order a few years ago to my friend, and it seems to have worked for him:
1: An OOP language
At the very least, you'll want to learn how to design applications, so start with a language like Python, Java, C#. Like it or not, OOP is a bit of a necessity if you want to work on semi-big projects.
2: C
C will give you an understanding of how your CPU works and how memory management works.
3: Objective-C/C++ for Mac dev
Objective-C and C++ are obth C with OOP extensions, so neither should take you more than a couple weeks to learn.
Your code will be a lot tighter if you learn OOP and C separately first, and you'll spend less time trying to figure out the best way to do things.
4: A functional language
After all that, if you want to be really top-notch, learn a functional language. You'll feel weird, at first in a bad way, and then in a really good way.
OCaml and F# are both practical for writing real-world applications, but again, they mix OOP with functional, and you're better off learning functional programming in isolation, so I would recommend Haskell, which is a pure functional language.
I agree with others here that C++ is not a good language to jump into if you're just starting out for many of the reasons they cite. If you are truly a beginner at programming and you have a mind to think visually / graphically, you might consider a couple of languages that came out of MIT specifically designed to teach programming concepts.
Scratch provides a framework for learning the basic concepts of programming.
Star Logo TNG is similar to Scratch and is useful for creating interesting simulations by focusing on agent behavior rather than all of the stuff that goes on under the hood.
Google has taken this same general approach with their new Google App Inventor for Android. It uses a graphical language similar to Scratch and Star Logo TNG to build Android apps.
All of these will give you a good feel for the various types of control structures and by looking at some of the examples / tutorials they will be a lightweight introduction into both structured programming as well as some (but by no means all) object oriented programming concepts. Once you have an intuitive understanding of those concepts, I think you'll be better suited to start picking up languages that are a bit more mainstream and that implement more advanced object oriented features.
For what it's worth.
C++ is perfectly good as a learning language - but this can depend on your teaching material. I personally don't recommend the Schildt books - in my opinion, they miss the big features of C++ (polymorphism, templates, STL, etc) as they just present them as new ways of doing old C things (e.g. cout is the new printf)
In C++, you can stay high-level if you wish to avoid getting to intimate with things like pointers and memory allocation, but there are other languages that may give you a better route into the programming world...
If you are already familiar with HTML and are looking to write for mobile devices, if I were you, I would seriously consider learning JavaScript, for the following reasons:
- It's cross-platform - runs in almost any browser on multiple OS's, desktop and mobile.
- The language is mature and has many modern and even cutting-edge features applicable to other languages such as garbage collection, closures, OOP, anonymous functions, delegates, collections, duck typing, etc.
- Partnered with HTML and CSS, you can target iPhone, Android and Windows mobile devices plus all desktops.
- There are many IDEs and debuggers available (Eclipse, XCode, VStudio, etc)
- JavaScript syntax is very similar to C/C++, Java, C#, and to some extent Objective-C and others. So your investment here will pay back if you learn any of those.
- There's a ton of sample code out there including some awesome frameworks like jQuery, Prototype, etc.
- You can get instant results - just refresh your browser
- Application distribution can be a breeze - simply upload the new code to your website.
There are also out-of-browser scenarios:
- On Windows, you can do JavaScript coding with real benefits as many things in Windows have COM interfaces which are scriptable via J(ava)Script. See examples on MSDN library.
- Google Gadgets/Yahoo! Widgets/Mac Dashboard Widgets/Windows.. Sprockets?
- In Firefox, I think the UI is built using JavaScript and an HTML-like language named XUL.
Once you're proficient in JavaScript, you can investigate the features of the other languages including compilation, extensive frameworks support and higher performance.