Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Looking into learning some programming languages.

Looking into learning some programming languages.
Thread Tools
larrinski
Mac Enthusiast
Join Date: Sep 2005
Location: Canada... be nice, eh?
Status: Offline
Reply With Quote
Mar 7, 2006, 01:53 AM
 
I recently found a local community college that is offering an intro course on perl, and I thought I might try it out. Now, the various languages are not too obvious to me, as to which are more specific to Windows and Apple/Unix/Linux. I know I have perl installed, so it must be more mac specific, but which ones should I focus on if i get more interested in programming? Can someone let me know what "cross platform" languages are and can they really be used on both sides. I really don't want to ever buy another windows machine if i dont have to...
     
SirCastor
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status: Offline
Reply With Quote
Mar 7, 2006, 03:30 AM
 
C is popular, it's everywhere. It's offshoots are C++, which is immensly popular, and on the OS side of things:
C# for windows
and Object C for macs.

Java is the most portable, but it's starting to show it's age according to many. It's benefit is "Write once, run anywhere" via the virtual machine. So your program will run anywhere, any platform, and architecture. That's the theory anyway.
Python is pretty popular too.

You can find the more popular languages have compilers on any platform. The trick to languages is that you eventually have to depend on certain libraries and resources that the OS provides for your program. So porting your software to another language is a little more involved than just recompiling it.

That's my run down. My recommendation, if you have no prior programming experience, is to learn PHP a bit. I think it's a good springboard into programming. Give you some conceptual stuff to start with.

** This list not definitive in any way.
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
     
Gavin
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Mar 7, 2006, 10:13 AM
 
I second the php idea.

Basically php is a scripting language that runs on web servers to produce web pages. It is similar to c in syntax. The basic concepts are identical to any language you will learn.

There are two main types of languages, interpreted and compiled.

Interpreted languages are processed on the fly while the computer is running them. They are slow but easier to work with as a programmer and are generally used for short simple programs called scripts. PERL, php, asp, applescript, ruby, visual basic, are interpreted languages. Scripts do things like deliver a web page, back up files, produce a report, etc. visual basic (pc) and applescript (mac) can be used to make GUI applications.

Compiled languages are pre-processed to a form that can be run directly on the CPU. They run much faster and let you have access to low level stuff on the computer like memory. Applications like Photoshop and Word are written in compiled languages. Examples are: c, c++, Objective C, c#, pascal, fortran, etc.

java falls in between.

You can't go wrong with c. Just about everything you are using right now is written in c, at least partially. It's syntax is used by C++, java, c#, Objective C, etc. all of which kind of expand on it with their own object oriented stuff. C++ and Objective C are really just c with extra goodies.

PERL is standard on all UNIX systems including OS X. You can get it to run on windows too.

visual basic and c# are windows only.

c, c++, and java are used on all platforms.

Objective C is generally Mac only with some Linux uses.

The basic stuff you learn in ANY language will apply to all of them. So what you learn first doesn't matter really - it depends on what you have better access to on your machine.

For me actually making something happen using php (text editor, web server) is simpler than with PERL (text editor, terminal) which is easier to get started with than c (xCode). BUT, there are probably better beginner tutorials for xCode.

Object oriented stuff like C++ and java can be harder to wrap your head around, but some people actually do best by diving right in.

Have fun
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 8, 2006, 02:37 PM
 
Originally Posted by larrinski
I know I have perl installed, so it must be more mac specific, but which ones should I focus on if i get more interested in programming? Can someone let me know what "cross platform" languages are and can they really be used on both sides. I really don't want to ever buy another windows machine if i dont have to...
Most languages are fairly cross-platform. Objective-C isn't used much outside the Mac, and C# and all of Microsoft's other bastard spawn aren't used much outside Windows, but otherwise, all the main languages are cross-platform. C, C++, Java, Python, Perl, Ruby — all of them supported on pretty much every platform out there, and are included with OS X if you have the devtools installed.

Keep in mind, though, that cross-platform is not necessarily the same as write once, run anywhere. Even in Java, where that was a main goal, platform differences can cause problems.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Alcoholica
Junior Member
Join Date: Sep 2005
Status: Offline
Reply With Quote
Mar 10, 2006, 05:04 AM
 
I say go with the PHP idea as well. You learn C syntax, can learn OOP concepts if you'd like, and also acquire the knowledge of a really useful language.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 09:57 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,