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

yamabushi

macrumors 65816
Oct 6, 2003
1,009
1
I think one of the C variants is usually the best place to start. Java is also not bad to start with but most people will find C more useful. Depending on what your goals and intentions are with programming one or the other would be more appropriate.
 

dubbz

macrumors 68020
Sep 3, 2003
2,284
0
Alta, Norway
Some have mentioned learning C first, but what if your ultimate goal is to program in Objective-C? Couldn't you just skip the first step and just go straight at learning Objective-C?
Any advantages/disadvantages to this?

Maybe I'm just impatient... ;)
 

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
dubbz said:
Some have mentioned learning C first, but what if your ultimate goal is to program in Objective-C? Couldn't you just skip the first step and just go straight at learning Objective-C?
Any advantages/disadvantages to this?

Maybe I'm just impatient... ;)
If you're going for Objective-C, then I agree - go there first and skip C.
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,630
Western US
northen said:
Even though C has some pitfalls in term of memory usage, they aren't that bad, and if you get -the- C book, by Brian Kernighan and Dennis Ritchie (the latter being the original designer of C), called `the C Programming Language` you will learn a lot in a very short time :)
Eh...you also might throw up your hands and give up programming in a very short time. The K&R book is a great one, probably the best for ANSI C, but I'd say it is not a good book to introduce someone to programming with. It's very dense and there's little hand-holding. I'd recommend K&R for someone who already knows some programming and wants to learn everything about C.
 

jsw

Moderator emeritus
Mar 16, 2004
22,910
44
Andover, MA
northen said:
The main problems with Java (at least how I see it) are:

I don't disagree that Java has weaknesses; I simply think it's a superior beginner's language because I think it promotes good object-oriented programming technique more than the other popular languages and because it has a GUI. Just my opinion. I used to be a huge C++ fan, never thought I'd like Java. I switched over, and to me it felt like the switch from Windows to OS X.

northen said:
- Lack of fast, low-level file handling.
Granted, but improving. Java 1.4/5 showed many improvements.
northen said:
- The JVM uses a lot of memory and doesn't start instantaneously; I wrote a simple HTTP server in Java and in C, and tested it on a standard 100 mbit/s network. The Java one delivered about 1 MB/sec and used 20 megabytes of memory. The C delivered 9 MB/sec and used 500 kilobytes.
Startup footprint is configurable, although I agree never will be as fast as a C app. Not important for a beginning coder, though.
northen said:
- It enforces everything upon an Object-oriented programming paradigm, but still includes non-OOP basic types, which is very ambiguous to new users.
Yeah, but the non-OOP types are even more transparent in Java 5, and I've never seen them as confusing the programming paradigm.
northen said:
- Too much class supplanting. The StringTokenizer class has been supplanted at least 2 times, which is very confusing, because the language often changes too drastically at each major increment
(1) The old classes stay around for a very long time, meaning that the old code still works. (2) This is an argument against the class library, and I'd argue that Java has a much better, more intuitive class library than C++ regardless of improvements. (3) This has nothing to do with the language itself.
northen said:
- While usage of the language is free, the built-in classes are incompatible with the GPL, meaning you cannot link non-Java GPL'ed code modules to your Java program (which may still be licensed under the GPL)
OK. Not a fan of GPL, so this has never been an issue for me. I see the point, though.
northen said:
- Is only available on major platforms. Platforms like the *BSD's have very poor Java support.
Again, never been an issue for me, but I see the point. I've run Java apps on Windows, Solaris, Linux, OS X - with no problems. Again, without a GUI, C might be as portable (but requires a recompile). No language has better cross-platform GUI support than Java, and GUI support is, IMHO, important.

Still, these are just opinions. Any language is just a tool. Enjoy any of them!
 

northen

macrumors member
Jan 8, 2005
80
0
Aalborg, Denmark
jsw said:
I don't disagree that Java has weaknesses; I simply think it's a superior beginner's language because I think it promotes good object-oriented programming technique more than the other popular languages and because it has a GUI. Just my opinion. I used to be a huge C++ fan, never thought I'd like Java. I switched over, and to me it felt like the switch from Windows to OS X.
I would, then again argue, that object-oriented programming is one of the most hyped and eventually useless. If you know the types at compile-time, why encapsulate them in an object? I have coded in C++ and Objective-C (two languages with VERY different ways of handlin OOP) - and Java, of course, and it OOP has always struck me with its huge, blown-up way of coding... I can't see it's needed unless you are doing HUGE programming projects. Which is why, I eventually made the switch to C, which (still) is the systems coding language of choice. Also for beginners. Contrary to what most people think, it is actually way more simple and elegant once you really get at it. I would know, I've never had a teacher teach me programming - I had to teach everything to myself with books, and at age 15 I have a programming job for a laptiming company, programming their microcontrollers. :)

jsw said:
OK. Not a fan of GPL, so this has never been an issue for me. I see the point, though.
Neither am I. I find it way too restricted and `socialist` for my purposes (which is why I use the 3-clause BSD license)
 

jamdr

macrumors 6502a
Jul 20, 2003
659
0
Bay Area
As far as OS X support: Tiger has Java 5 built in.
Holy crap, I didn't know that. That's...just amazing.

- Lack of fast, low-level file handling.
Used to be quite true, but I find the java.nio package in 1.4 to solve this problem quite well.

It enforces everything upon an Object-oriented programming paradigm, but still includes non-OOP basic types, which is very ambiguous to new users.
If Java didn't have primitives, it would be unbelievably slow. I'm not going to respond to your other arguments because I didn't really understand them. Were you trying to imply that Java is a bad language for network programming because it is too slow? This doesn't make sense to me because usually HTTP servers are going to be limited by bandwidth before they are by processing speed. For this reason, web servers are generally thought to be one thing that the Java language is best suited for, even more so than C because it's much easier to write and maintain. This is why Java is being used more and more in this area.
 

northen

macrumors member
Jan 8, 2005
80
0
Aalborg, Denmark
jamdr said:
If Java didn't have primitives, it would be unbelievably slow. I'm not going to respond to your other arguments because I didn't really understand them. Were you trying to imply that Java is a bad language for network programming because it is too slow? This doesn't make sense to me because usually HTTP servers are going to be limited by bandwidth before they are by processing speed. For this reason, web servers are generally thought to be one thing that the Java language is best suited for, even more so than C because it's much easier to write and maintain. This is why Java is being used more and more in this area.

Java's primitives are nice and very useful for programmers, who know, what they are doing. I think the same problem applies to C++'s std.string, std.vector classes, by the way, so don't count me in as one of those ranters that are upset about Java.

I just don't see it as the ideal language, because it has a lot of features, that are confusing to the new programmer. Including OOP vs. procedural.

Which is why, I would prefer the recommendation of C :)
 

Les Kern

macrumors 68040
Apr 26, 2002
3,063
76
Alabama
Osirius said:
recommend me a language

How about English?
:)
Okay, fun over.

Beginner? Try RealBasic
C? Obj-C?
There's not enough info. What do you want to DO with this language?
 

ollie

macrumors member
Oct 21, 2004
47
0
jamdr said:
Java is the best choice for a beginning programming language for a lot reasons that I'm not............ersion to Java, while Windows users have no such bias. Anyway, enough ranting. Now go learn Java.

anything java-gui'ed on any of my windows boxes SUCK. slow as peice of crap. im sure java is rant-tastic, cross platform wise. but its slow everywhere...except for my slackware install... (my fastest pc is a 2.8ghz p4 512ddr gf4,slackware pc is 1ghzceleron512sdgf2mx) so yeah. i am biased against java and so are many of my friends. this is using suns VM.
 

tutubibi

macrumors 6502a
Sep 18, 2003
577
81
localhost
Java is today's COBOL: oververbose, overhyped.

I guess it's OK to learn programming but if you want to write programs fast, Python is way to go.

C/C++ is my still my favourite but Python is amazing language to get stuff done fast. I still miss days of Pascal, Modula-2 and 6502 assembler :( .
 

jim5

macrumors newbie
Jan 30, 2008
1
0
My first programming language, which one?

Nearly three years after the last posting, is there anything new to say about any of the languages that were discussed? I am newly interested in the subject. My goal is developing Mac applications.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
recommend me a language

English? Knowing English well is good, whatever programming language you want to learn. As a practice run, before you try to learn any programming, try to explain to us why you want to learn to program and what your goals are, in such a way that we can make a recommendation that isn't based on guesswork.

That is one thing that will hit you when you start programming: You have to express your thoughts very, very clearly. Nobody will help you understanding what you mean. A computer does exactly what you tell it to do. It doesn't even try to figure out what you actually want.

So here is the proper answer to your request "recommend me a language":

1. Syntax error. Do you mean "Recommend a programming language to me" or do you mean "Recommend me to a programming language"?

2. After guessing what you meant: "Hi, Suaheli. May I recommend Osiris to you? "

Java is today's COBOL: oververbose, overhyped.

I think you haven't seen COBOL. Maybe three years ago I bought a book about COBOL (it was very cheap, and I was curious), and when I read it, I thought it was just absolutely ****ing unbelievable. From today's point of view, it is just unimaginable how anyone could have come up with a language like that. With Java, you may disagree with some things, you may prefer something else, but the whole thing makes sense. COBOL doesn't. XBase (the dBase programming language) makes sense, and it is ten times more powerful than COBOL at all the things that COBOL is good for.
 

iSee

macrumors 68040
Oct 25, 2004
3,540
272
Nearly three years after the last posting, is there anything new to say about any of the languages that were discussed? I am newly interested in the subject. My goal is developing Mac applications.

Given your goal, I don't think there is any doubt that you should start with Objective-C and Cocoa (the Obj-C API for Mac OS X developement).

This thread debates Java, but if you narrow the discussion to "Mac applications," Java isn't that interesting.

Also, there are some really good resources for getting started with Objective-C and Cocoa.

Unfortunately, these books are pre-Leopard, and Apple introduced a bunch of new stuff. The books are still quite useful, but there are a few issues:

1. They won't cover "Objective-C 2.0" features like garbage collection and properties. This won't hold you back, but its worth keeping in mind.

2. The biggest problem with these books is that under Leopard, Interface Builder (one of the development tools used in creating Cocoa-based apps) has changed quite a bit. So, you won't be able to directly follow the tutorials that cover it. For that reason, I'd start with Apple's on-line Cocoa tutorial first, which does cover IB 3.0. Then, when you get to an IB thing in the other books, you can substitute what you learned from the Apple tutorial.


First, if you don't know C/C++, I'd start with this book: Programming in Objective-C by Stephen Kochan http://www.amazon.com/Programming-O...bs_sr_1?ie=UTF8&s=books&qid=1201804866&sr=8-1
It has a very good, step-by-step intro to Objective-C programming that doesn't assume any prior knowledge.

Apple Tutorial: http://developer.apple.com/document...f/doc/uid/TP40000863-CH13-DontLinkElementID_3

This book is a good book for Objective-C/Cocoa, but does pretty much assume you already know C or another similar language: Cocoa(R) Programming for Mac(R) OS X (2nd Edition) by Aaron Hillegass. link: http://www.amazon.com/Cocoa-Program...=sr_1_1?ie=UTF8&s=books&qid=1201805099&sr=1-1
I see on Amazon that the 3rd edition of this book is due out in June. Presumably, it will cover Objective-C 2.0 and the Leopard development tools.
 

MyMacWentBad

macrumors newbie
Jan 28, 2008
20
0
C++

C++!!!!!
It is the all in one starter!
If you want to make an operating system (which is unlikly) try PC-DOS!
(Ya, I know, I dragged PC-DOS out of the cobwebs but it's FREE!!!)
 

skinnybeans

macrumors newbie
Dec 6, 2007
17
0
I'd still say java is a good place to start. The way I see it it provides a good foundation for branching out from and learning more specialised languages.

You will learn all the basic stuff that applies to any language (types, control flow) as well as object oriented design and a syntax that is similar to c++ and c#. Also how garbage collection works (relevant now to objective c and c#).

Then if you decide to move to C++ you will need to learn about memory management and pointers, but the syntax will be familiar.

Moving to objective c will be a bit more of a jump as it is syntactically quite different but now that it includes garbage collection, managing objects will be similar to java. (I'm assuming they work in a similar fashion, I haven't investigated the objective c garbage collection).

Also there are a lot of books around about general programming concepts such as design patterns that are written in C++ or Java. It would be quite beneficial to understand at least the basic syntax of these languages so you can get good value from these kinds of books.

Anyway, that's my take on it :)
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
What about REALBasic or Revolution????

I don't think anyone wants to shell out $300 to learn a programming language when everything else is free :rolleyes:. And if you do I feel sorry for you.

I'd say learn C. Learning C is challenging, but simple. Pointer arithmetic is a good thing to understand. OOP concepts can be confusing for a beginner programmer, that's why I don't think Java should be first. If you're learning Obj-C first without knowing C, at some point you will have to go back and learn some C concepts (Cocoa uses several C concepts). Everything after C is cake IMO.
 

John.B

macrumors 601
Jan 15, 2008
4,195
706
Holocene Epoch
What is it that you hope to accomplish? Are you learning a programming language just to learn it or are you hoping to develop a particular application? Will this be self-learning or will you be taking a class? What platform are you developing for (OS X vs. Windows vs. ???). Do you want to eventually do this for a living?

I'll assume based on the forum here that you want to write programs on a Mac and for the Mac. If you want to automate tasks or whip up a little application I would start with AppleScript. (Yes, AppleScript.) High level enough to be understandable, practical enough to be useful for every day tasks on your computer, really a good way to get your feet wet. It comes with your Mac. :)

If you are looking for something more formal, a class or a friend who programs will help immensely. There are online tutorials for all kinds of programming languages, but there tend to be tough topics to grasp at first and someone who can look and see what is wrong (not fix it necessarily, just tell you where a mistake is) can be the difference between getting started and quitting in frustration and confusion. If you have a friend who knows C or if you have access to a Java class, that may be the most important consideration. Don't underestimate this.

As to which language beyond AppleScript... Objective-C is really only for OS X on the Mac these days, but likewise, most new Mac development is written in Objective-C and one of the Mac programming frameworks like Cocoa. If you are only interested in Macs then start with Objective-C (it comes with your Mac :)). If not, I'd look at C or a "baby" C++ class or maybe Java (C++ minus minus, C++ with the dangerous -- and powerful -- features taken away). Lots of Windows programming used to be done in VB, but now its mostly done around the .Net ("dot net") framework either in VB.Net, ASP.Net or C#.Net. Either way, once you learn procedural programming and get used to working with objects it'll be easier to move to other languages.

The last thing I'd say is that a programmer/developer spends a lot of time at work not coding but deciphering requirements, designing solutions, working with project plans, debugging things that ought to work but don't, writing documentation and filling out status reports. I can't tell you how many people I've known over the years who were good programmers but just couldn't take working on a development team. Just be aware that there is a lot more to most programmer jobs than writing new code. :)
 

ArchiMark

macrumors 6502
Feb 2, 2003
269
1
Silicon Valley
I don't think anyone wants to shell out $300 to learn a programming language when everything else is free :rolleyes:. And if you do I feel sorry for you.

kainjow, first of all, please get your facts correct....

REALBasic Personal is $100 and Runtime Revolution Media is $49....both quite a bit lower than the $300 that you plucked out of the air.... :rolleyes:

I'd say learn C. Learning C is challenging, but simple. Pointer arithmetic is a good thing to understand. OOP concepts can be confusing for a beginner programmer, that's why I don't think Java should be first. If you're learning Obj-C first without knowing C, at some point you will have to go back and learn some C concepts (Cocoa uses several C concepts). Everything after C is cake IMO.

My question about RB or RRM was whether or not as a 'hobbyist coder' it might make sense to get one of these as opposed to what seems like a longer learning curve to learn C or some other language.

IF, and I emphasize the word IF, RB or RRM or something else would be easier for a code noob to learn, then MAYBE it MIGHT be worth it for someone like me to spend a few $$'s on it....

Would appreciate any other thoughts on this....

Thanks,

Mark
 

Fearless Leader

macrumors 68020
Mar 21, 2006
2,360
0
Hoosiertown
My random(2) cents.

I learned c++ first, then php, then obj-c.

My comments to that is don't do it that way. the c++ to obj-c/cocoa well... will make your head turn a couple of times backwards.

The php I found helpful as its quite human readable and teaches you programming basics, but you can get a lot sloppier with the syntax and could will cause you to have many problems going to more strict syntaxs.

I also write papers and other documents in straight up html code... so I'm a bit wierd.

for cocoa/obj-c I like Aaron Hillgass's book "Cocoa programming for Mac OS X" the third edition is coming out in the spring but the second edition is nice if you don't have leopard. (still nice if you do you'll just have to figure more out with xcode)
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
kainjow, first of all, please get your facts correct....

REALBasic Personal is $100 and Runtime Revolution Media is $49....both quite a bit lower than the $300 that you plucked out of the air.... :rolleyes:

The professional edition (required for cross platform compiling) is $500 so actually $300 is the average price :)

My question about RB or RRM was whether or not as a 'hobbyist coder' it might make sense to get one of these as opposed to what seems like a longer learning curve to learn C or some other language.

IF, and I emphasize the word IF, RB or RRM or something else would be easier for a code noob to learn, then MAYBE it MIGHT be worth it for someone like me to spend a few $$'s on it....

If someone was interested in software development as only a hobby, I would suggest to them to use the Python or Ruby Cocoa bindings. Those languages are easy, quick to learn, less confusing syntax, no messing with pointers, completely free and open source, and since they are bound to Cocoa you get all (well most) of the Cocoa goodness.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
…
…
My question about RB or RRM was whether or not as a 'hobbyist coder' it might make sense to get one of these as opposed to what seems like a longer learning curve to learn C or some other language.
…
…
IF, and I emphasize the word IF, RB or RRM or something else would be easier for a code noob to learn, then MAYBE it MIGHT be worth it for someone like me to spend a few $$'s on it....

Would appreciate any other thoughts on this....

Thanks,

Mark

I use RealBasic for some jobs. It's fun to use and very quick to produce results with. It makes building cross platform apps with user interfaces very easy, in fact too easy at times. But I wouldn't want to use it for everything I do. Some things are better done in Java or Objective-C/C++. I think that's the key really - learn more than one language and use what's best for the job.

There's a saying that goes something like this, 'If all you have is a hammer then pretty soon everything begins to look like a nail'. I think that applies to computer languages too.

So my advice to somebody starting off is this: whatever language you learn first… don't stick with it…*branch out. Each language is strong in some areas and weak in others. Finding out these strengths and weaknesses will make you a better programmer.

b e n
 

ArchiMark

macrumors 6502
Feb 2, 2003
269
1
Silicon Valley
The professional edition (required for cross platform compiling) is $500 so actually $300 is the average price :)

OK, I get it... ;)


If someone was interested in software development as only a hobby, I would suggest to them to use the Python or Ruby Cocoa bindings. Those languages are easy, quick to learn, less confusing syntax, no messing with pointers, completely free and open source, and since they are bound to Cocoa you get all (well most) of the Cocoa goodness.

Thanks for your input, kainjow!

:)
 

ArchiMark

macrumors 6502
Feb 2, 2003
269
1
Silicon Valley
I use RealBasic for some jobs. It's fun to use and very quick to produce results with. It makes building cross platform apps with user interfaces very easy, in fact too easy at times. But I wouldn't want to use it for everything I do. Some things are better done in Java or Objective-C/C++. I think that's the key really - learn more than one language and use what's best for the job.

There's a saying that goes something like this, 'If all you have is a hammer then pretty soon everything begins to look like a nail'. I think that applies to computer languages too.

So my advice to somebody starting off is this: whatever language you learn first… don't stick with it…*branch out. Each language is strong in some areas and weak in others. Finding out these strengths and weaknesses will make you a better programmer.

b e n

Good to hear about RB and your perspective, Ben....

So, do you think that this would be a good place to start for a 'hobbyist coder' or ???

As to your advice, "don't stick with it…*branch out" do you mean to suggest doing that after you've got a really good handle on the language you learn first or ?

Thanks,

Mark
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.