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

MacBookUK

macrumors newbie
Original poster
May 18, 2010
17
0
UK
I would like to learn a programming language for writing software/apps. I do not have any programming experience, just a bit of web stuff HTML & Java Script. What would you recommend as to language and compiler?
 

foidulus

macrumors 6502a
Jan 15, 2007
904
1
All depends on your goals. If you want to do programming for a living definitely learn C first. You may not necessarily use it ever again, but learning C will give you a good idea(and appreciation for!) of what the other, higher level languages are doing.

Once you have a firm grasp of C the world is your oyster, you can try to tackle one of the "scripting" languages such as python or ruby. Though first you may want to familiarize yourself a little bit with OO programming that is a bit more like C, in that case I would recommend Java, Objective-C or, shudder to say, C#. They have a very C-like syntax while still being object oriented.

After that languages like Python and Ruby can be a dream, and since you have a firm understanding of what is going on underneath the covers you are probably more likely to avoid some of the performance pitfalls that novices can fall into....

That being said, if your goal is to just write a couple of basic utilities/applications, Python or Ruby is the way to go. As long as you don't try anything too complex you can do a lot with them without having to really know what they are doing underneath the covers. It's only when you really get into the large-scale stuff that you have to be careful with those languages.

Anyway, I've ranted on, whatever you pick just stick with it.
 

larswik

macrumors 68000
Sep 8, 2006
1,552
11
I was where you are a few years ago. I first asked what was the easiest language to learn for a beginner? Most people said Python. After learning the majority of Python I switched to objective C and much of what I learned in an easier language like Python applied to Objective C which makes learning a more complex language easier.

-Lars
 

smetvid

macrumors 6502a
Nov 1, 2009
551
433
Lars it is interesting to hear you say that. I have used a bit of Python in the past with most of my experience with Lingo (Macromedia Director), Actionscript and Javascript. I have found Objective C to be very different then Python which always made a lot of sense to me. Maybe I'm just not looking at it with the correct mindset yet.

Of course I have not spent a lot of time with Objective C yet. One of these days if work ever gets slow I want to try to wrap my brain around it a bit more. Any good references you know of that compares Python or Javascript to Objective C?
 

larswik

macrumors 68000
Sep 8, 2006
1,552
11
When I picked up Python I knew nothing at all about programing. That introduced me to things like variables, IF statements, arrays and so on. When I started with objective C they had all these same things that I learned from scratch in Python. We are talking real basic stuff but it worked for me. My challenges now are things like SELF and pointers that I am learning. People here are great in terms of helping understand.

-Lars
 

ianprime0509

macrumors newbie
Aug 31, 2010
10
0
Python is great as a starter and Objective-C is great for writing actual applications (after you've learned the foundations of programming)

Oh yeah, and Java is also pretty good if you don't like some of the more complex C stuff like pointers, but it's not that hard anyway.
 

kevin.horgan

macrumors newbie
Jul 8, 2009
2
0
Well if you are starting out you may already have some ideas what type of programming your want to do. For example programming for the web (SAAS apps etc), iPhone or Mac programming, Corporate enterprise programming etc.
This might then determine the best language to learn first. So for the Mac I would suggest Objective-C. For Web and SAAS apps take a look at Python ( with Django). For Corporate I would suggest Java or C# would be great.

If you have no specific idea today then I would suggest a language which gets you up to speed fairly quickly such as for example Python.

C has been mentioned above and is an excellent language and you will find the syntax in other languages such as Java, C#, Objective-C. So it makes a great basis to learn about programming and to learn other languages. But if you have a specific need you might find the demand for pure C programmers in that sector is limited, for example in the Corporate world you will likely find much more C# or Java work than C work.

Good luck.

Kevin

PS my first language was BASIC on a DEC PDP 11/70 but I still managed to learn the languages above as I needed them during my career so maybe the important thing is just to learn a language and not worry too much about which one first. :)
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
for example in the Corporate world you will likely find much more C# or Java work than C work.

You'll find straight C quite often in embedded systems where the overhead of C# of Java for portability would not be appropriate.

PS my first language was BASIC on a DEC PDP 11/70

I learned BASIC on three platforms: PDP/11, Apple ][ and HP-85 (In the years between 7th and 12th grade). (I also learned LOGO and UCSD Pascal shortly thereafter). ;)

I would not recommend BASIC of any kind as a first language to anyone today though. It tends to reinforce sloppy habits. (I don't have enough Python experience to know if it is as fast and loose).

B
 

milbournosphere

macrumors 6502a
Mar 3, 2009
857
1
San Diego, CA
+1. It's really too bad that this isn't the gateway language at my program any more. It's sad to see all of the now-sophomores and juniors scrambling to learn C when they reach the upper-level courses, and have to use it effectively.

C is really good to learn. It's lower level, but it isn't Assembly language. I would use C as a gateway language into Java, C++ and objective C.
 

mac2x

macrumors 65816
Sep 19, 2009
1,146
0
+1. It's really too bad that this isn't the gateway language at my program any more. It's sad to see all of the now-sophomores and juniors scrambling to learn C when they reach the upper-level courses, and have to use it effectively.

C is really good to learn. It's lower level, but it isn't Assembly language. I would use C as a gateway language into Java, C++ and objective C.

At my school the intro to programming course is C (which I'm taking now), and the next course up is Java. I'm loving C because I've had exposure on my own time to C++ and Obj–C, but I've never grasped the basics as well as I have even with just a couple of classes under my belt. :)
 

firewood

macrumors G3
Jul 29, 2003
8,108
1,345
Silicon Valley
Good programmers know multiple languages. Therefore you do not need to start with the language(s) that you will eventually use, or even a useful language.

I recommend starting with a "toy" language. Or at least an interpretive language with imperative output. After you've figured out all the basic programming tricks and it seems too easy (may take a day or two, may take forever, YMMV), then you can move on ("up").

Squeak (Smalltalk, Scratch, Alice) seems to be a good starter language leading to some of the ideas behind Objective C. I'm personally a big fan of old-fashioned Basic, as many great programmers I know started with it.
 

smetvid

macrumors 6502a
Nov 1, 2009
551
433
I just recently read that C can be used to make iDevice apps. Is this true? My understanding was that Objective C has to support everything in C but of course not the other way around. So in theory you could write an app 100% in C although that may not be the best solution. Do people write apps in C and if so is there really that much of a performance hit?
 

firewood

macrumors G3
Jul 29, 2003
8,108
1,345
Silicon Valley
I just recently read that C can be used to make iDevice apps. Is this true? My understanding was that Objective C has to support everything in C but of course not the other way around. So in theory you could write an app 100% in C although that may not be the best solution. Do people write apps in C and if so is there really that much of a performance hit?

iOS apps in C can actually perform better (for the non UI non OOP stuff). However all of the Cocoa Touch UI interaction and display requires Objective C (unless you want to manually call into the framework around the runtime using method pointers). Some apps requires no almost no Cocoa UI, and thus can be written completely in C, except for a few pages of Objective C wrapper code. Some C/Open GL games have been ported this way.
 

brianfast

macrumors regular
Jun 11, 2010
165
0
You can even make most of your application for an iOS device in C++ if you want, but I would only recommend doing this if you are porting something...

Also +1 for C/C++
 

ulbador

macrumors 68000
Feb 11, 2010
1,554
0
I'm a big fan of PHP as a starting language. Sadly it can make for some REALLY bad programming habits because of how lose it is in its syntax and typing.
 

Les Kern

macrumors 68040
Apr 26, 2002
3,063
76
Alabama
Depends on what you want to accomplish. I decided on RealStudio because of it's ease of cross-platform functionality (which I required) and excellent online resources. It's been pretty lucrative for me, so I have zero complaints. I was less interested in making Mac-Only software than I was in tapping the overwhelming numbers of PC users, i.e. moolah.
That being said, perhaps I should have spent more spare time learning how to make iPhone/iPad apps. Maybe I would have hit on a winning app... but maybe not. You need to identify your market first and go from there.
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
Depends on what you want to accomplish. I decided on RealStudio because of it's ease of cross-platform functionality (which I required) and excellent online resources. It's been pretty lucrative for me, so I have zero complaints. I was less interested in making Mac-Only software than I was in tapping the overwhelming numbers of PC users, i.e. moolah.
That being said, perhaps I should have spent more spare time learning how to make iPhone/iPad apps. Maybe I would have hit on a winning app... but maybe not. You need to identify your market first and go from there.

If you want cross platform compatibility and want to use a BASIC dialect I just don't understand why anyone would want to use RealStudio when Mono offers Visual Basic (with very good support for .Net 2.0) and is free. Plus it also has a great IDE (MonoDevelop) which is also cross platform.
 

Les Kern

macrumors 68040
Apr 26, 2002
3,063
76
Alabama
If you want cross platform compatibility and want to use a BASIC dialect I just don't understand why anyone would want to use RealStudio when Mono offers Visual Basic (with very good support for .Net 2.0) and is free. Plus it also has a great IDE (MonoDevelop) which is also cross platform.

Indeed, why? Years ago it wasn't as sophisticated as I wanted, and still may not be. but I don't care now as my business is built around RS. Like you appear to be, I am amazed to see some try to learn C++ in order to make nothing. To each their own. Mono would be considered if years ago were now. Moreover, the poster asked for input and I gave a success story and another option for them to look into. Comments back on what I used was NOT asked for, certainly not by me.
 

Chrome

macrumors newbie
Jan 31, 2003
3
0
I don't.
Depends on what you want to accomplish. I decided on RealStudio because of it's ease of cross-platform functionality (which I required) and excellent online resources. ...
...I was in tapping the overwhelming numbers of PC users, i.e. moolah.
What?!
Pardon replying in oldish thread. I was reading here because though I started with BASIC and 6520 ASM, did minimal C on Amiga and Mac, and have done a bit of PERL and JavaScript, I haven't done anything "serious" in some years and I'm having a lousy time getting my head around Objective C, Cocoa, and XCode in one gulp!

I've been looking for something pretty powerful but less intimidating and came across Real Basic, (okay Real Studio). Looked promising but I have to disagree with the resources being adequate for it. That wiki is a rotten excuse for documentation when you're just trying to learn the language, and it seems that other than forums, they have no other documentation.

I need some good reference in front of me and all I see are a couple outdated books and the horrifically annoying wiki. It's supposed to allow downloading as PDF but not in any really organized way, and a lot of the material is messed up in translation, besides it's structure being so... scattered. The code samples I've seen have been pretty... unhelpful as well. XCode/Cocoa's looking better as I try to explore Real Studio, but that's so overwhelming.

I can't believe they want $1000 for the cross-platform "Enterprise" version of Real Studio when they don't even have any decent printed/printable documentation, or am I missing something? :(
 

Amuraivel

macrumors member
Jan 31, 2006
91
0
My vote:

Java

1. strongly typed;
2. Object-oriented
3. cross-platoform



I've done plenty of projects without any C. I do think if you want to be a professional, C might be useful, as a hobbyist Obj-C and Java will get you results much quicker.
 

Littleodie914

macrumors 68000
Jun 9, 2004
1,813
8
Rochester, NY
My vote:

Java

1. strongly typed;
2. Object-oriented
3. cross-platoform



I've done plenty of projects without any C. I do think if you want to be a professional, C might be useful, as a hobbyist Obj-C and Java will get you results much quicker.
I would have to agree.

  1. Unless you're learning the language for a specific purpose, you should learn a language that makes it easy to complete fun/creative tasks without having to worry about managing memory, fighting against often-terse syntax, etc.
  2. Java's strong object-oriented 'feel' makes it easy to work with OO design patterns, which are often nearly impossible to learn in C.
  3. Lets be honest. Machines are getting faster by the minute, and pretty soon the necessity of using C for embedded systems will disappear, and the language will follow closely behind.
 

ulbador

macrumors 68000
Feb 11, 2010
1,554
0
First decide on the purpose, then decide on the language. What do you want to accomplish?

A .NET style language is practically a given if you want to do Windows development. Objective C is a given for Mac based development. If you want to write for cell phones you almost have to write for the phone and in the language you want to target. Java is cross platform so it's always a choice.

When writing for the web, you have a huge number of choices. The bottom line is pick a language that will suit what you want to accomplish.

I hate to see the argument of "learn C" or "learn python" because it will give you a strong foundation. Learn the language that will best accomplish your goal. Because if I'm interested in making an iPhone game and I'm stuck developing "hello world" forms in PHP all day, I will quickly adopt a new hobby.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.