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

connorlovsapple

macrumors newbie
Original poster
Nov 5, 2007
8
0
Hi,
I am interested in learning how to program. I need to learn the basics, not always for mac's but for PC's too. I am interested in a career in this area, and i am starting out by learning the basic's of each type of common programming styles (is that how i would put it??) well im talking about java, C, C#, C++, HTML, XML, visual basic ect. I'm starting out with java. I baught a java for dummies book, and so far its going okay. I am going to learn them one at a time, just to get a basic understanding. What i am looking for is
1. Recomended books (not just for java, but for all common types)
2. tips on how to learn them
3. i am a mac user so, tips for practicing these things on a mac
4. anything you would find helpfull

Anything is appreciated

Connor
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
39,795
7,539
Los Angeles
Will you have an opportunity to take any programming or computer classes at school, connorlovsapple?
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
Well Java and all the C based languages are pretty much the same style (except for straight C which is procedural rather than object orientated). Starting with any of those languages would be an excellent way to get started in programming. Java would be your best bet if you want to program on both a Mac and a PC.
 

firesong

macrumors member
Jul 13, 2007
48
0
I'll second the recommendation to do Java, since it's generally a portable language. :)
 

Gelfin

macrumors 68020
Sep 18, 2001
2,165
5
Denver, CO
1. HTML and XML are not programming; they're document formats. Not to disparage them at all -- they're vital skills -- but if you intend to learn to program it's first necessary to understand the difference between describing data (like HTML and XML do) and telling computers what to do with the data (like a programming language does).

2. As Cromulent mentioned, Java and C* have similar enough syntax that learning one will make it fairly easy to pick up the fundamentals of any of the others.

3. Objective-C is the exception to this. The syntax for the object oriented parts of Objective-C is completely different from anything you'll use in the other languages. Unfortunately it's the best way to develop applications on the Mac. More unfortunately, knowing it won't help you develop software on anything but the Mac.

4. If you learn any language that isn't Visual Basic, there is automatically no point in ever learning Visual Basic.

5. Feel free to learn Java first, but if you're serious about programming as a career, you must learn C. After learning Java, it will seem primitive, which is why you need to know it. The class libraries in Java, C# and C++ hand you lots of tools with so little effort they seem like magic, but what that really means is that you don't really know what the computer is doing when you use them, and that matters.

6. Another reason to learn C: Object oriented programming is a powerful way to think about many types of problem, and you'll use it a lot, but it is also an addiction. OOP really fits with the saying, "when your only tool is a hammer, every problem looks like a nail." Even many professional programmers these days don't really understand that OOP just isn't right for every task -- sometimes plain old procedural programming is exactly what you want. Make sure you can do either, and you'll be better at both.
 

psingh01

macrumors 68000
Apr 19, 2004
1,571
598
You don't really NEED to know C. Lots of colleges don't even teach it anymore and it isn't stopping anyone from getting a good job as a software engineer! It is kind of like saying well once you learn C you should try to learn Assembler because than you REALLY understand what is going on.....Does it help? Yes. Knowing more can never hurt, but it is not absolutely required. To be honest I wouldn't even bother with just C when C++ does everything C does and more. It was designed to be used in different styles and not just for OOP.
 

Gelfin

macrumors 68020
Sep 18, 2001
2,165
5
Denver, CO
You don't really NEED to know C. Lots of colleges don't even teach it anymore and it isn't stopping anyone from getting a good job as a software engineer! It is kind of like saying well once you learn C you should try to learn Assembler because than you REALLY understand what is going on.....Does it help? Yes. Knowing more can never hurt, but it is not absolutely required. To be honest I wouldn't even bother with just C when C++ does everything C does and more. It was designed to be used in different styles and not just for OOP.

To be perfectly frank, lots of schools dumbed down their CS curricula in the mid to late 90s as a wash of talentless opportunists came through chasing the next big thing. Believe me, we're still suffering from that now when looking for qualified job applicants.

It isn't as if there's that much to know compared to the megalithic class libraries of today. Among any of the successful professional programmers I know, it isn't so much that you need to know C as why wouldn't you? It's like breathing.

At the very least charitable it's like learning to drive a manual transmission. You can get by without, but if you're serious you will anyway, and you'll be a better driver even in an automatic as a result.
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
39,795
7,539
Los Angeles
I think it's a mistake for universities to teach assembly language so routinely. It's nice to have a basic idea of how computers work, and one lecture might be worthwhile, but weeks of lessons in assembly programming, with homework assignments, strikes me as a waste.

Now that handheld devices run full operating systems and high-level run-time environments, most programmers will never use assembly language. They will use tools far removed from that level of coding and will manage just fine without knowing about machine registers, condition code bits, delayed-branch instructions, etc.
 

connorlovsapple

macrumors newbie
Original poster
Nov 5, 2007
8
0
Thanks for all the help!

And by the way, the reason i cant take any classes at my school, is because i'm only in 8th grade. I know that this is what i want to do for the rest of my life, and i figured it is better to learn sooner then latter.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
I think it's a mistake for universities to teach assembly language so routinely. It's nice to have a basic idea of how computers work, and one lecture might be worthwhile, but weeks of lessons in assembly programming, with homework assignments, strikes me as a waste.

But you still learn about algorithms for string searching/matrix multiplication, which perform worse than Brute Force most of the time. But I suppose it is useful to get to think about things like this. Its like doing a Maths degree.

Also if you go to a decent university courses in assembler will be optional.
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
39,795
7,539
Los Angeles
I use an analogy. If you want a driver's license, you don't need to know how to be a car mechanic. Although in the case of cars they are both practical skills, just separate ones.

For programming, an assembly language foundation can be helpful for the theoretical basis it provides, or if you will go into a specialized area such as processor design. I'm glad that I learned a number of assembly programming languages (I've written hundreds of assembly programs and even designed computer circuitry), but those are not skills I use any more.

To make yourself employable, you'll want to learn a few of the currently popular programming languages, as well as what Gelfin points out are document formats. You also want to learn the tools that programmers use, such as integrated development environments.

To become well-educated in the theory of computer programming, you'd want to learn completely different types of programming languages, such as object-oriented languages, procedural languages, logic-programming languages, stack-based languages, scripting languages, etc. That's where understanding assembly language and machine language (which is not the same thing as assembly language) may be worthwhile.
 

HiRez

macrumors 603
Jan 6, 2004
6,250
2,576
Western US
I think it's easier to start with Java, but I'd probably recommend C first. It's just got a rough learning curve, but other languages will be a snap after that. And I'd also recommend not getting too comfortable with just one language. Learning some of several will make you a better programmer. When you see the same things done in different ways, it allows to recognize the underlying structure and begin to see patterns.

Howver, you are young so you don't need to start big. Even BASIC would not be a bad way to start at your age (that's what I started with). The other reason BASIC is good to start with is you can do some decent GUI programming with it now, with Visual Basic, Real Basic, etc. and for me at least, being able to do some visual things makes programming more fun. At your age I wouldn't worry so much about being employable just yet. Immerse yourself and get a deep interest and a foundation first.
 

sushi

Moderator emeritus
Jul 19, 2002
15,639
3
キャンプスワ&#
Many good comments already made. To add, regardless of what language one uses, it all ends up as 1's and 0's inside the computer.

Most comments have addressed the mainstream areas. However, there are many other ways that you can make a good living programming.

For example, there are plenty of Assembly language jobs out there. You just need to look in areas that you wouldn't normally think of up front. For example, I have a buddy who makes a very good living programming mostly in Assembly language on the x86 platform for controlling high power emergency generator systems.

One somewhat well known Assembly language programmer is Steve Gibson of Gibson Research Corporation (GRC). Steve does all his programming in assembly language.

Another area to look at can be database programming. This field is wide open and will continue to grow.

Another area is Excel Macro development. I have a buddy has done very well for himself over the years. Really well. Let me rephrase that, obscenely well.

There are other languages that no one has mentioned but are still used widely in certain fields such as FOTRAN and Ada. And applications based upon old languages such a COBOL are still used and need to be updated and maintained.

I think the real key to good programming is learning the logic behind it. I mean after all, if you want, you can do OOP in Assembly language. Not easy but can be done. ;)

As was mentioned before, the key is to pick the tool that solves your problem in the most effective manner. The more tools you have in your toolkit the better.

To the OP, at your age, have fun learning programming in a variety of languages. Since you are interested, Java seems like a good start for you.
 

SC68Cal

macrumors 68000
Feb 23, 2006
1,642
0
Pick up K&R. Just google it.

One somewhat well known Assembly language programmer is Steve Gibson of Gibson Research Corporation (GRC). Steve does all his programming in assembly language.

Yeah, and what has he done that's so great?

Introducing Our Newest Security Freeware: SecurAble

Quickly determine which state-of-the-art security features are being offered by your system's processor chip.

Recent AMD and Intel processors contain three features which can be extremely beneficial to the system's overall security. SecurAble probes the system's processor to determine the presence, absence and operational status of each of these three modern processor features.

Wow11111!!!!!

Also, I love how his site claims that millions of people have downloaded the programs. WRONG! It's a page counter.
 

Ti_Poussin

macrumors regular
May 6, 2005
210
0
I'm a computer engineer myself. I would recommand you to begin with C++, it may seem complexe to begin with, but if you learn it, you will find C#, Obj-C, Java a breeze to understand after that.

The lower level you can get is the better. Assembly is still a good thing to learn in the long run for those who are really serious about programming. But for most, C++ still a pretty low level to them.

I would suggest you do in this order:
1- C++ (learn the basic of functions, template, algorithme, pattern... take your time here to understand well)
2- C (learn how it work under the hood of C++ for string as exemple, you don't need to go too much deeper except if you want to learn it, still a language for many embedded system)
3- Java (that shouldn't be long after the C, you will understand the back end of Java pretty quickly with a C/C++ background)
4- Obj-C (if you want to program for the Mac platform) / C# for Windows
5- Python (good for small script, pretty language I love it so much)

If you really have this much time to spare, take a look at those:
Assembly, Bash, Javascript, perl

here's a few hello world for many language:
http://roesler-ac.de/wolfram/hello.htm
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
39,795
7,539
Los Angeles
here's a few hello world for many language:
http://roesler-ac.de/wolfram/hello.htm
That's a cool page.

I've written programs in over 30 of those languages, plus a number of languages not in the list (including a few languages I developed myself). As you might guess, I'm a programing language geek. I'd be surprised to run into many other forum members who have written practical programs in APL, awk, Logo, Simula, and 68000 assembler. For some reason, I don't often need those skills. :(
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
To be perfectly frank, lots of schools dumbed down their CS curricula in the mid to late 90s as a wash of talentless opportunists came through chasing the next big thing. Believe me, we're still suffering from that now when looking for qualified job applicants.

Exactly. I couldn't believe the idiot students and teachers in my CS program. When I did my grad school (this was at CSU Hayward (no name change for me) in your neck of the woods) I deserved to simply fail 2 classes. I did double-time school with a full time job all through undergrad, and this simply wasn't going to work with grad school. I learned my lesson the first quarter. The classes were not core, but I didn't deserve the B I got.

Plus, I was a TA for a year and a half, and EVERY SINGLE PERSON I ever caught cheating was from India. Usually it was people copying each other in intro C++ courses, but I actually had several groups of people plagiarize essays. We're talking everything copied and putting a different name on it. One group had to do a report on bluetooth and literally just copy/pasted everything from bluetooth.com into it. How the heck are you so stupid as to think nobody will notice when you turn in perfect English after a quarter of not having perfect English? I don't care if English is your second language. I applaud them for learning it, and I never marked things off for a CS course relating to grammar. But plagiarism? Please.

Do not start with Java. I have NEVER met a competent programmer who started with Java. It encourages so much laziness that you will seriously never recover. Yes you can get a decent job out there doing Java. You won't ever be proud of the work your team puts out, though.

(On the flip side, avoid old timers who learned C in 1980 and never grew from there.)

Still, if you start with Java, then see if down the road you have a strong desire to learn something else like C or various scripting languages. If you find yourself always wanting to play with something new, then you've got the right attitude. I think anyone with this attitude can learn.

Oh, one more piece of advice. Never smile and nod at the same time.
 

johnnybluejeans

macrumors 6502
Jan 16, 2006
294
0
New York, NY
Questions like these are tough to answer. The old saying "Opinions are like *******s.." seems relevant.

I'll give my two cents as a professional programmer who has a Masters in Computer Science and an undergrad Engineering degree in CS.

All the languages you mention are tools for specific jobs really. There is always some overlap and grey areas, but when it comes to languages some are just well suited to specific kinds of problems. For instance, if I needed to code a Windows front end application to a database, I'm probably going to do it in C#. Similarly, if I need to write a device driver I'm going to do it in C.

But you have to start somewhere, and you probably don't know what kind of work you will be doing in the future -- so you need to find something that will give you relevant knowledge that will help you regardless of what language or platform you may need to develop for.

So, like many others, I'm going to suggest you start off with C++. I think it will provide you with the most relevant and broad learning experience. You will get a taste of more low level topics (managing memory and pointers, etc) and also get a feel for object oriented techniques (which dominate higher level languages like Java, C#, Objective C)

In my opinion (again, remember the opinion saying), Java is not the way to start out.. or finish for that matter. Java is dying a slow death and is becoming increasingly irrelevant. The multi-platform idea is nice, but it is so difficult to create a Java application that rivals what you can do when you use a native platform to a particular OS.
 

connorlovsapple

macrumors newbie
Original poster
Nov 5, 2007
8
0
Thanks everybody, i got some useful info. I think i will stop with java, and restart with c++. Well now that i am starting with c++, any books you guys recommend?? :D
 

darkwing

macrumors 65816
Jan 6, 2004
1,210
0
Thanks everybody, i got some useful info. I think i will stop with java, and restart with c++. Well now that i am starting with c++, any books you guys recommend?? :D

First of all, do you have Apple's developer tools? If so, create a "command line tool" project in XCode and that will give you a simple hello world application. Learn how to build it. You'll want to be able to understand your environment in a very basic way in order to get started with simple tasks.

You will not want to go beyond "simple command line tool" for many months. Learn the basics, and just stick with text for now.

As for books, any decent c++ textbook will work. I myself have never taken a C++ (or even assembler) class because I'm such a nerd I challenged out of them. :p

My friend who I went to school with really liked this book and recommends it to you. It's "Programming and Problem Solving with C++" by Nell, Dale. You can find it just about anywhere.

I suggest you keep the c++ faq lite bookmarked for intermediate-advanced topics. http://www.parashift.com/c++-faq-lite/

Don't be afraid to ask questions!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.