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

dstearns96

macrumors member
Original poster
Dec 16, 2007
54
0
I have never programmed anything in my life. I just xcode and wanted to learn how to use it. which language should i start and how do I learn. I want to make applications for mac os x ppc and intel. I also want to develop windows applications. How long does it take to make a simple application. tell me anything else I might want to know.
 

Monkaaay

macrumors 6502
Jun 19, 2006
258
0
Richmond, VA
A lot of it depends on what your goal is. Do you want to create programs that have a GUI? Or, are you more interested in console programs? Another question is whether you're planning to do OS X development only or are you interested in Linux and Windows as well.

I'll assume that you're going for GUI programs in OS X. You should start with Objective-C as a language working on console based programs. Once you're comfortable with the language itself, you can start learning the Cocoa framework for GUI development.
 

dstearns96

macrumors member
Original poster
Dec 16, 2007
54
0
os

i'm aiming for OSX (PPC and Intel) only. then later I might make copies of my applications for other OS's
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Learn C. Straight, old, honest to goodness C. It underpins everything. Cocoa/Obj-C is a strict superset of C so if you want to be good with it you need C. C is portable across almost all OSes and makes it easy to learn almost any other procedural language and even offers insights into assembly.

Everyone should know C.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
I'd suggest a good book and/or lessons. Without some sort of start you cannot learn by trial and error (although with a little knowledge this is a good strategy).

The course text on my Uni courses on C (now many moons ago) was A Book On C. I found it easy to follow and very good, but then I could already program in Basic, and a little in Pascal.
 

Catfish_Man

macrumors 68030
Sep 13, 2001
2,579
2
Portland, OR
Personally I'd say go for Python for a first language, C or ObjC for a second. C is certainly still very useful, but I think it's better to learn the important concepts before you focus in on the fine details.
 

dstearns96

macrumors member
Original poster
Dec 16, 2007
54
0
Language

you're all confusing me with the languages :confused: which do I start with. how long does it take to make a complete application
 

Sun Baked

macrumors G5
May 19, 2002
14,941
162
how do I learn. trial and error, online research, or lessons

I know there were some online c primers and classroom type references that had a similar approach to a college course, cannot remember where any of it is anymore.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
you're all confusing me with the languages :confused: which do I start with. how long does it take to make a complete application

You cannot run until you can walk, and right now you are still working out how to grow legs. You cannot write an application until you know at least the basics of programming. If you want to write Mac OS based apps then you need to learn C then Objective C then the Cocoa framework. From there the time to write an application will depend on the complexity of the application. It might only take a few hours for a simple, rough and ready application. If you want something complex like Photoshop (or even Delicious Library which is the work of only a few people) it takes months to years of continuous work.
 

dstearns96

macrumors member
Original poster
Dec 16, 2007
54
0
ok. I'll learn c first. what is the difference between the languages anyway?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Syntax, compiled vs interpreted, programer memory managed vs garbage collected...

Then there are the bigger distinctions between classes of languages: procedural, functional and whatever Prolog is :p
 

dstearns96

macrumors member
Original poster
Dec 16, 2007
54
0
Syntax, compiled vs interpreted, programer memory managed vs garbage collected...

Then there are the bigger distinctions between classes of languages: procedural, functional and whatever Prolog is :p

????????:confused:????????
 

Cromulent

macrumors 604
Oct 2, 2006
6,810
1,100
The Land of Hope and Glory
To be honest, you have a loooooong way to go. At this point I'd suggest taking a class.

--Eric

There are plenty of books which are more than capable of teaching the beginners stuff for C.

I would recommend the following:

A Book on C
Pointers on C (intermediate I would say)
The Unix Programming Environment

they are all highly respected books and have helped me a great deal with programming.
 

dstearns96

macrumors member
Original poster
Dec 16, 2007
54
0
"Do you believe in God?"
"No, I believe in myself."
MP 2.66Ghz / 2 GB RAM / 250 GB HDD / 500 GB HDD / ATI Radeon X1900XT 512MB

if you don't believe in god, then who pops up the next Kleenex in the box?:p
 

Monkaaay

macrumors 6502
Jun 19, 2006
258
0
Richmond, VA
Everyone should know C.

I strongly disagree.

Learning C can be more of a waste of time than a path towards a more productive programming language. If you're speaking purely of academics, sure, learning C is a good suggestion. If you want to learn programming to get a job or for more than learning the details of computer science, starting with C is a waste of time. Not to mention harmful once you decide to forget your procedural knowledge for object oriented. If you're trying to learn programming for more than computer science, chances are you'll graduate from C once you decide to become productive and create applications instead of programs.

I'm not suggesting that C isn't used for being "productive". There are numerous examples otherwise; operating systems, compilers, database systems, etc. Notice the computer science background of each. When it comes to the business world, C puts you 20 years behind everyone else.

So like I said before, if you want to stay on OS X with your programs, stick with Objective-C and then begin to the learn the OS X specific framework Cocoa. There is no need to concern yourself with C before stepping into Objective-C. As has been said already, Objective-C is C with additional features and functionality.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
????????:confused:????????

Let's say you wanted to build a house. You're at the stage where you don't even know what a nail and hammer are used for yet, how do you think you'll be able to build your house in a week? Baby steps :)
 

Tygernoot

macrumors member
Jul 3, 2003
69
22
Brussels
I wouldn't really recommend starting with C. I wouldn't recommend C at all actually, but directly learn C++.

However, before you start with a language as big and difficult as C++, it would be wise to start with a much more simpler one. If you start right away with C++ you might give up or get totally lost. Like someone said earlier, start out with Python (or Scheme e.g.) and try to understand the basics: variables, assignment, comparison, functions, parameter passing, lists, recursion, ...

Once you have a basic understanding of how a programming language works, you can take the step to C++ or Objective-C.

In any case, buy a book to start learning. The tutorials online are useful when looking for something specific, but they don't teach you everything you need to know (in enough detail). Since you don't have any experience, start with a book for beginners. Then you can pass on to something more advanced.

It takes a long time and a lot of patience before you can write big applications, so keep that in mind. Not to discourage you, but just so you know you won't be writing a full application within just a few weeks. Try to take it step by step and see if you enjoy it :).
 

twoodcc

macrumors P6
Feb 3, 2005
15,307
26
Right side of wrong
i would advise to pick a language yourself, and not listen to everyone on here. different people will like different programming languages, and thus you can't listen to everyone.

just google for tutorials on mac programs. pick a language, and then ask for help here.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Notice the computer science background of each. When it comes to the business world, C puts you 20 years behind everyone else.

I work for a very large financial institution writing custom internal applications: I know programming in the business world. I have worked with quite a few different programmers and the ones who are best are the ones with a good understanding of C. We don't ever write anything in C, but they have a more solid understanding of what the machine is doing so tend to write more efficient, better structured code than the people who have started with "more productive" languages.
 

Monkaaay

macrumors 6502
Jun 19, 2006
258
0
Richmond, VA
I work for a very large financial institution writing custom internal applications: I know programming in the business world. I have worked with quite a few different programmers and the ones who are best are the ones with a good understanding of C. We don't ever write anything in C, but they have a more solid understanding of what the machine is doing so tend to write more efficient, better structured code than the people who have started with "more productive" languages.

I didn't start with C and I'm not exactly on the lower end of the spectrum in programming talent. That may be your experience but it doesn't hold true for everyone. Which programming language you started with or have a solid understanding of means nothing when considering your ability. Any argument for that statement suffers from a lack of logic and common sense.

What do efficiency and code structure have to do with understanding C? Last I checked, Java, C++, C#, and many others share the same code structure. I've always found that efficiency comes from an understanding of data structures and algorithms. My course in school went a long way towards teaching me the importance and eye for efficiency than learning C ever could. Understanding pointers is important towards a mastering of C but it means next to nothing in modern garbage collected languages like C# and Java.

Threads like this cause problems for the original poster because instead of getting answers to the real question, they get opinions from what the responders wish they had done when they began programming. Sure, I wish I had learned C, but not because it would have made me better in any way. We need to understand what the original poster's needs are and then answer the question. Just saying "what language do I start with" isn't the whole question and answering it as asked will see nothing more than opinion. If he wanted to write scientific applications where performance is everything, C is a great suggestion. If he wants to write OS X applications like Adium, Cyberduck, Quicksilver, etc, C probably isn't the best suggestion.
 

Les Kern

macrumors 68040
Apr 26, 2002
3,063
76
Alabama
Tygernoot is correct in my opinion.
Guys, the guy never programed before, so you CAN'T say "Learn C or C++, that's what I use!". That's nutz, and a sure path to failure. It will be YEARS before any good comes of it. I was in the same boat long not too long ago, and what came to the rescue? RealBasic. EASY to learn, all the concepts are there, excellent tutorials, lots of samples, cross platform, and you are rewarded with a finished product much sooner, so it's good for the soul. Master the basics there and you have a good foundation for the future. There is also Revolution. But C? No way. You are condemning him to hell.
 
There is no right or wrong answer really, and a lot depends on the person.
Me, started with BASIC on my Commodore Vic20 (and then on Amstrad CPC464, something us Brits used to be able to get). That was pretty much self taught from the manuals that came with the machines.

Moved onto Pascal at school when I was 15-18. That taught me how to write proper procedural code (though, to be fair, I was doing a reasonably good job at writing psudo-procedures in BASIC).

Pascal led on to Object Pascal/Delphi at university first year.
C for my second university (plus a bit of Prolog). So, that's where I learnt about memory management.
I decided to use Java (1.0 and 1.1) for my third year project.

In the mean time, at work, done Java, C, Visual Basic and PL/SQL.

The point is though... those latter work-place ones were relatively easy to learn, because I'd learnt about procedural languages, OO languages, memory management, bits of GUI stuff and basic good algorithms stuff.

Could I be a better programmer if I'd done it some other way... who knows.


My recommendations. Hmmm, I think there is an advantage to maybe starting in an Interpreted Language* rather than a Compiled one. Ruby would be a good start, because Ruby is well supported on OS X. Ruby is a better language than BASIC was when I started.
If the original poster is willing to stick with it, then it's time to move onto something compiled*. So, then you are looking at Java or "C/Objective C". My gut feeling is, is that if you've got the gist of learning how to program, say based on experience with Ruby, then I don't think it would be that difficult to learn Objective C (and thus C at the same time).

Of course, YMMV!

* I've supplied Wikipedia links so that the original poster knows what is being talked about...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.