Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 22, 2004, 01:09 PM   #1
Osirius
macrumors newbie
 
Join Date: Dec 2004
My first programming language, which one?

recommend me a language
__________________
Space. It seems to go on and on forever. But then you get to the end and a gorilla starts throwing barrels at you.

Last edited by Osirius; Dec 23, 2004 at 03:26 AM.
Osirius is offline   0 Reply With Quote
Old Dec 22, 2004, 01:17 PM   #2
Peyote
macrumors 6502a
 
Peyote's Avatar
 
Join Date: Apr 2002
COBOL




I'm not programmer by any means, but I think Java would be a good place to start. Very similar to Actionscripting in Flash as well.


Once you have Java totally down, ColdFusion is good to know for developing.
Peyote is offline   0 Reply With Quote
Old Dec 22, 2004, 01:33 PM   #3
Osirius
Thread Starter
macrumors newbie
 
Join Date: Dec 2004
wait that didn't make any sense
__________________
Space. It seems to go on and on forever. But then you get to the end and a gorilla starts throwing barrels at you.
Osirius is offline   0 Reply With Quote
Old Dec 22, 2004, 02:36 PM   #4
jalagl
macrumors 6502a
 
jalagl's Avatar
 
Join Date: Jun 2003
Location: Costa Rica
Send a message via ICQ to jalagl
Java

I would suggest Java. You can use OSX's dev tools, which came bundled with the OS, and you can find a lot of tutorials online.

i would also suggest C, but it tends to get a bit complex as a first language.
jalagl is offline   0 Reply With Quote
Old Dec 23, 2004, 01:41 AM   #5
GeeYouEye
macrumors 68000
 
GeeYouEye's Avatar
 
Join Date: Dec 2001
Location: State of Denial
Send a message via AIM to GeeYouEye Send a message via Yahoo to GeeYouEye
For Mac programming, C, followed by Objective-C. Java if you really want cross-platform stuff. C++ is okay too if you don't get too deep into it or you don't want to do much Mac programming off the command line since you pick up several habits which need to be unlearned for Objective-C.
__________________
I bring order to chaos. You are in chaos Windows, you are the contradiction, a bug wishing to be an OS.
Visit Softyards Software
NEW DEFINITION OF GEEK
Like politics, free speech, computers, entertainment, and more? Join us at Wordforge.net
GeeYouEye is offline   0 Reply With Quote
Old Dec 23, 2004, 02:56 AM   #6
Osirius
Thread Starter
macrumors newbie
 
Join Date: Dec 2004
okay, i think i will go for java, thanks for the help guys
__________________
Space. It seems to go on and on forever. But then you get to the end and a gorilla starts throwing barrels at you.
Osirius is offline   0 Reply With Quote
Old Dec 23, 2004, 03:44 AM   #7
SkAlex
macrumors member
 
Join Date: Jun 2004
I just completed my first programming course at NYU and it was in JAVA. I really enjoyed it and found it was a great introduction. The course stressed that a large reason they start with JAVA is its cross-platform use.
SkAlex is offline   0 Reply With Quote
Old Dec 23, 2004, 04:29 AM   #8
blaster_boy
macrumors regular
 
Join Date: Jan 2004
Location: Belgium
Python

If all you want to do is bang out scripts, or start with that, why not try python. It's used by quite a lot of people, but it is not a compiled language (it pre-compiles itself, but not fully).

http://www.python.org for more info and tutorials

Easy to get started, and you can then dig in deeper and deeper. It's very methodical and has a very good feel to it - It's also already pre-installed on the mac, and is cross-platform.

Check http://osx.fresmeat.net for python editors and packages, there are quite a few of them around that work on mac.

Last edited by blaster_boy; Dec 23, 2004 at 04:34 AM. Reason: link added
blaster_boy is offline   0 Reply With Quote
Old Dec 23, 2004, 05:48 AM   #9
jamdr
macrumors 6502a
 
jamdr's Avatar
 
Join Date: Jul 2003
Location: Bay Area
Java

Java is the best choice for a beginning programming language for a lot reasons that I'm not going to elaborate on right now. It's also a great language for a lot of other things, but for beginners it's really the only option. There is a reason almost all introductory cs courses are taught in Java nowadays.

Java and OS X is a mixed bag. On the plus side, Apple seems committed to Java because it comes preinstalled on every computer. However, historically Java releases on OS X lag behind Windows releases by years. And since Java 5 (the largest upgrade to the Java language since its first release) is going to go final soon, some recent Java software may not run on OS X. Personally, I think Java 5 is an abomination and completely ruins the language in some respects. But the truth is that if Sun releases a new version of Java, OS X needs to support it to keep up with Windows.

There is also the issue of performance. Java is a very fast language when it is run on Windows. The key word there is Windows. Java performance on OS X is less than exciting and Apple seems perfectly content with lagging behind Windows in yet another way. Now, I don't mean to give you the impression that Java is slow on OS X--it is plenty fast for most applications. But if you are creating huge, complex Swing GUIs or graphical games, you will see what I mean. And this is why Mac users generally have some aversion to Java, while Windows users have no such bias. Anyway, enough ranting. Now go learn Java.
jamdr is offline   0 Reply With Quote
Old Dec 23, 2004, 08:41 AM   #10
Lyle
macrumors 68000
 
Lyle's Avatar
 
Join Date: Jun 2003
Location: Madison, Alabama
Quote:
Originally Posted by blaster_boy
If all you want to do is bang out scripts, or start with that, why not try python. It's used by quite a lot of people, but it is not a compiled language (it pre-compiles itself, but not fully).
I'll second this, and throw in a recommendation for Ruby as well. Ruby also comes preinstalled on Mac OS X, and like Python, there are slightly fewer barriers to getting started as opposed to a compiled programming language like Java.

This is not a slam against Java, by the way; it's the language I use primarily at work. It's definitely a programming language that any professional software developer should be familiar with; I'm just not sure I'd recommend it as a first programming language for anyone.
Lyle is offline   0 Reply With Quote
Old Dec 23, 2004, 09:24 AM   #11
caveman_uk
Guest
 
caveman_uk's Avatar
 
Join Date: Feb 2003
Location: Hitchin, Herts, UK
First programming language - well mine was Sinclair Basic but I'd recommend a language that doesn't teach you bad habits. OOP is all the rage now so I guess Java is a good suggestion. For portability you can't beat C but it's hardly a beginners language.
caveman_uk is offline   0 Reply With Quote
Old Dec 25, 2004, 11:21 AM   #12
atif.muhammad
Registered User
 
Join Date: Oct 2004
Location: none of your business
Send a message via AIM to atif.muhammad Send a message via MSN to atif.muhammad Send a message via Yahoo to atif.muhammad
Quote:
Originally Posted by caveman_uk
First programming language - well mine was Sinclair Basic but I'd recommend a language that doesn't teach you bad habits. OOP is all the rage now so I guess Java is a good suggestion. For portability you can't beat C but it's hardly a beginners language.
yup i totally agree.
i tried to learn C, C++ and JAVA when i was 12 yrs old. i understood C until the bit where it got to arrays.
i've never ever understood C++ and JAVA particularly because of OOP. the books always introduced me to new concepts called inheritance or something like that. i was only 12 and didnt understand a ***** about it. but reading through this thread has reignited my desire to learn Java now that im 16 yrs old and hopefully, i'll understand it better now. cheers people
atif.muhammad is offline   0 Reply With Quote
Old Dec 28, 2004, 11:25 AM   #13
mms
macrumors 6502a
 
Join Date: Oct 2003
Location: CA
Sure you can go learn C++ or Java but another good place to start is perl or PHP. Plenty of fun and not so hard to learn. Granted, you won't be writing full-fledged apps with them, but scripting is a good introduction to computers.
mms is offline   0 Reply With Quote
Old Dec 28, 2004, 11:54 AM   #14
Simon Liquid
macrumors regular
 
Join Date: Jul 2001
Location: Iowa
Send a message via AIM to Simon Liquid
Quote:
Originally Posted by Osirius
.
Are you suggesting that you tried to learn Brainf*ck? That's not a good first language at all, in fact I wouldn't suggest that you use it ever.
Simon Liquid is offline   0 Reply With Quote
Old Dec 28, 2004, 12:52 PM   #15
Mechcozmo
macrumors 601
 
Mechcozmo's Avatar
 
Join Date: Jul 2004
Send a message via AIM to Mechcozmo
AppleScript


Damn easy, works on any Mac... what else do you want? Oh yeah try this stuff out: tutorials are built in... ultra easy syntax...
__________________
This is not the signature you're looking for.
This is not the signature we're looking for.
You can scroll down now.
You can scroll down now.

Last edited by Mechcozmo; Dec 28, 2004 at 01:56 PM.
Mechcozmo is offline   0 Reply With Quote
Old Dec 28, 2004, 01:37 PM   #16
HiRez
macrumors 68040
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
I agree that Java is probably the best one to learn with.

1) You can do everything with a text editor (BBEdit is great for coding) and command-line tool from the Terminal. Later you can move to an IDE like XCode or NetBeans of course, but I think it's good to start with the very basics.

2) It's object-oriented and cleaner and safer than C++. There are no pointers that you can use for pointer math, which is a powerful feature in other languages but also a cause of many many bugs.

3) It has automatic garbage-collection of references when they're done being used (although honestly this can be a point of confusion later on when you use a language that requires more manual memory management).

4) It's cross-platform for just about any OS out there.

5) The most important argument for learning programming in Java is that the amount of offline and online resources you can get is staggering. There are literally hundreds and hundreds of Java books out there, and many online tutorials and Web/Usenet forums for asking for help with specific things. If you get stuck on something, someone will have an answer for you, usually within minutes or hours.
HiRez is offline   0 Reply With Quote
Old Dec 28, 2004, 01:58 PM   #17
ChrisBrightwell
macrumors 68020
 
ChrisBrightwell's Avatar
 
Join Date: Apr 2004
Location: Huntsville, AL
Quote:
Originally Posted by jalagl
I would suggest Java. [...]
Ditto that. Java is good for a first language because you spend all your time in the JVM. It protects you from a lot of system-crashing mistakes (like calling an operation on a null pointer) and allows you to become a pretty good programmer since you spend more time focusing on logic rather than error trapping.

Once you get comfortable with Java, though, I'd strongly recommend C and/or C++.
__________________
"Simplicity is the ultimate sophistication."
ChrisBrightwell is offline   0 Reply With Quote
Old Dec 28, 2004, 03:07 PM   #18
therevolution
macrumors 6502
 
Join Date: May 2003
Python and Java are both good choices. Python might be a little more forgiving as a first language. Java/Swing is great for getting some exposure to GUI programming.

Of possible interest to you is ESR's take on the subject. Link goes to relevant section, but I think the whole document is a good read.
therevolution is offline   0 Reply With Quote
Old Dec 28, 2004, 05:02 PM   #19
zimv20
macrumors 601
 
zimv20's Avatar
 
Join Date: Jul 2002
Location: chicago
Quote:
Originally Posted by jamdr
Java [...] for beginners it's really the only option.
wow. i started off w/ BASIC and Fortran, and i turned out okay.

now i'm going to ask the question which should have been asked in post #2. Osirius -- what are you hoping to accomplish through programming?
__________________
Oct 2011: check out my band's first album @ boxsetauthentic.com
zimv20 is offline   0 Reply With Quote
Old Jan 8, 2005, 04:06 PM   #20
northen
macrumors member
 
Join Date: Jan 2005
Location: Aalborg, Denmark
C

The language of choice would clearly be ANSI C

Very clean and logical syntax, no unwanted abstraction, very well-supported and well-defined

And let us just make a few hello-world examples, just to see what you're going to fight with

Java
Code:
public class HelloWorld {
   public static void main() {
     System.out.writeln("Hello World");
   }
}
C
Code:
#include <stdio.h>
int main() {
   printf("Hello World\n");
   return 0;
}
C++
Code:
#include <iostream>
using namespace std;
int main() {
   cout << "Hello World" << endl;
   return 0;
}
Cocoa/Objective-C
Code:
#import <Foundation/Foundation.h>
int main() {
   NSLog(@"Hello World\n");
   return 0;
}
Python
Code:
print "Hello World\n"

Now, these examples aren't much good in reality, but they show off what the language is.

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 Besides, with the knowledge of C, you can quickly move on to Objective-C, Java and C++. Because of my C knowledge, I know those languages pretty well too. But I still prefer C for a lot of things, because of its speed, elegance and simplicity

Last edited by northen; Jan 8, 2005 at 04:14 PM.
northen is offline   0 Reply With Quote
Old Jan 8, 2005, 05:22 PM   #21
Simon Liquid
macrumors regular
 
Join Date: Jul 2001
Location: Iowa
Send a message via AIM to Simon Liquid
Add to that:

Brainf•ck

Code:
++++++++[>+++++++++<-]>.<++++[>+++++++<-]>+.<+
+[>+++<-]>+..+++.++++[>++++++++<-]>.<+++++[>++++++++
++<-]>+++++.<<.+++.------.<+++[>---<-]>+.
Simon Liquid is offline   0 Reply With Quote
Old Jan 8, 2005, 05:31 PM   #22
TrumanApple
macrumors member
 
Join Date: Jan 2005
my 2 cents...

i had my intro to programming taught in Ada95 and i learned alot from it... it is very strongly typed so you develop great habits in thinking about data types and explicit type conversions... ada also forces you to keep very good track of actual and formal parameters...

Basicly for real world usage... ada is not really used anymore (cept DOD stuff, real time devices)... but its a great language to learn. Its much more important to learn how to program than it is to learn a language... a good programmer can learn a new language without a problem, so its more important to learn the basics of programming than it is to learn the syntax of a specific language...


but then again im a soph in college and i have only had 1 CS class so far (CS major), so maybe listen to more experienced programmers...
TrumanApple is offline   0 Reply With Quote
Old Jan 8, 2005, 05:33 PM   #23
jsw
Demi-God (Moderator emeritus)
 
jsw's Avatar
 
Join Date: Mar 2004
Location: Andover, MA
Quote:
Originally Posted by jamdr
Java is the best choice for a beginning programming language for a lot reasons that I'm not going to elaborate on right now. It's also a great language for a lot of other things, but for beginners it's really the only option. There is a reason almost all introductory cs courses are taught in Java nowadays.

Java and OS X is a mixed bag. On the plus side, Apple seems committed to Java because it comes preinstalled on every computer. However, historically Java releases on OS X lag behind Windows releases by years. And since Java 5 (the largest upgrade to the Java language since its first release) is going to go final soon, some recent Java software may not run on OS X. Personally, I think Java 5 is an abomination and completely ruins the language in some respects. But the truth is that if Sun releases a new version of Java, OS X needs to support it to keep up with Windows.

There is also the issue of performance. Java is a very fast language when it is run on Windows. The key word there is Windows. Java performance on OS X is less than exciting and Apple seems perfectly content with lagging behind Windows in yet another way. Now, I don't mean to give you the impression that Java is slow on OS X--it is plenty fast for most applications. But if you are creating huge, complex Swing GUIs or graphical games, you will see what I mean. And this is why Mac users generally have some aversion to Java, while Windows users have no such bias. Anyway, enough ranting. Now go learn Java.
I agree - Java is great. Many reasons have been given, and I agree with them all. To me, the single nicest part is the fact that Java GUI coding is both powerful and portable, a big plus compared to any other language. As far as non-GUI programming is concerned, I like a lot of languages (Java, C++, Objective-C, python, etc.) - but, for a beginner, Swing (Java's GUI stuff, essentially) is, I think, a big plus.

As far as OS X support: Tiger has Java 5 built in. That's a relatively minor lag, as it's barely been released on Solaris/Windows and certainly isn't the basis of any major apps yet. So, by late spring, say, OS X will be using Java 5.

Also, as a plus, OS X makes it very easy to use Java as part of an app based on Objective-C, so you can use Java when it's advantageous, then switch to Objective-C when it better suits your purposes.

However, regardless of language, the most important thing to learn while learning programming is how to approach the problem, something you'll work on regardless of language. A good programmer is a good programmer regardless of the language being used simply because that programmer uses good algorithms.

Edit: - just like TrumanApple wrote as I was replying.

But Java is pretty forgiving while being quite powerful, and it's got a stunningly good library of classes that will run on pretty much any platform you choose, automatically.
__________________
You'll be the one moaning for me to give you some. - THC(taken out of context)
jsw is offline   0 Reply With Quote
Old Jan 9, 2005, 04:16 AM   #24
northen
macrumors member
 
Join Date: Jan 2005
Location: Aalborg, Denmark
...and upon that

Quote:
Originally Posted by Simon Liquid
Brainf•ck

Code:
++++++++[>+++++++++<-]>.<++++[>+++++++<-]>+.<+
+[>+++<-]>+..+++.++++[>++++++++<-]>.<+++++[>++++++++
++<-]>+++++.<<.+++.------.<+++[>---<-]>+.
A very obfuscated language. I once coded an interpreter and compiler for a Brainf*ck-like language, which I called SIGI (Sigmund Freud's pet name :P, because it could make you insane :P)

Code:
aHpaepalppaopa pawpaoparpalpadpn0


...or my new language, Psilo

Code:
main, begin
var,message,string
assign,message,@"Hello World\n"
emits,message
exit,0
...or the C89/POSIX hello world

Code:
#include <stdio.h>
#include <unistd.h>

void print( void * str );

main() {
    pthread_t hello, world;
    char * strhello = "Hello ";
    char * strworld = "World";
 
    pthread_create(&hello, pthread_attr_default, (void*)&print, (void*)strhello);
    pthread_create(&world, pthread_attr_default, (void*)&print, (void*)strworld);

    exit(0);
}

void print( void * str ) {
     printf("%s", (char*)str);
}


Of course, if you wanted to print it out in the correct order, you would need a mutex or spinlock of some sort
northen is offline   0 Reply With Quote
Old Jan 9, 2005, 04:22 AM   #25
northen
macrumors member
 
Join Date: Jan 2005
Location: Aalborg, Denmark
Quote:
Originally Posted by jsw
I agree - Java is great. Many reasons have been given, and I agree with them all. To me, the single nicest part is the fact that Java GUI coding is both powerful and portable, a big plus compared to any other language. As far as non-GUI programming is concerned, I like a lot of languages (Java, C++, Objective-C, python, etc.) - but, for a beginner, Swing (Java's GUI stuff, essentially) is, I think, a big plus.

As far as OS X support: Tiger has Java 5 built in. That's a relatively minor lag, as it's barely been released on Solaris/Windows and certainly isn't the basis of any major apps yet. So, by late spring, say, OS X will be using Java 5.

Also, as a plus, OS X makes it very easy to use Java as part of an app based on Objective-C, so you can use Java when it's advantageous, then switch to Objective-C when it better suits your purposes.

However, regardless of language, the most important thing to learn while learning programming is how to approach the problem, something you'll work on regardless of language. A good programmer is a good programmer regardless of the language being used simply because that programmer uses good algorithms.

Edit: - just like TrumanApple wrote as I was replying.

But Java is pretty forgiving while being quite powerful, and it's got a stunningly good library of classes that will run on pretty much any platform you choose, automatically.
The main problems with Java (at least how I see it) are:

- Lack of fast, low-level file handling.
- 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.
- It enforces everything upon an Object-oriented programming paradigm, but still includes non-OOP basic types, which is very ambiguous to new users.
- 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
- 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)
- Is only available on major platforms. Platforms like the *BSD's have very poor Java support.
northen is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
My first iMac, but which one will it be? rcr iMac 17 Jul 13, 2011 10:47 AM
Learning PHP as my first programming language good idea or bad idea? jc0481 Web Design and Development 8 Jan 23, 2011 04:17 AM
Buying my first Pro, but which one? playalistic Mac Pro 0 Sep 14, 2009 06:53 AM
First programming language (yet another thread) Keytachi Mac Programming 52 Sep 6, 2008 12:19 AM
My first Mac (but which one?) joechimy Buying Tips, Advice and Discussion (archive) 14 Aug 17, 2005 12:37 AM


All times are GMT -5. The time now is 06:27 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC