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

cb911

macrumors 601
Original poster
Mar 12, 2002
4,134
4
BrisVegas, Australia
hi,

i'm thinking of giving programming a shot, i'm just wondering where to start. i should be able to do some sort of programming class at the college i'm at, but i don't have a clue where to start.

i'm kind of wondering what language should i learn if i want to be able to make apps for UNIX/Windows/Mac? is there one that covers all of those platforms?

any advice for this programming n00b is much appreciated. :)
 
Any more, C is a lowest common denominator for programming across platforms. You could also do C++ but it can be a lot more complicated. Java is also available and is less complicated than C++ but requires a special environment that can be a pain to set up on platforms other than Mac OS X.

JavaScript is something you might want to try and it's available within the safe environment of a web page. Create some HTML and embed some JavaScript. It's not a full programming language but it's a good, uncomplicated way to start.
 
at the local jc, where many take programming for the first time (many hs students also take classes at the college), they have it set up this way

beginning programming...C/C++

intermediate...advanced C++

advanced...visual basic and java with a strong recommendation that java comes last since it's much more complicated than visual basic

...so what did i do? i started with java...and it was painful ;)
 
no i'm not musically talented. i couldn't find the C sharp key either... :p

okay, so C or C++. i'll check it out. as long as it's nothing like the 'assembler' language. i've heard some real horror stories of people that program that stuff. :eek: :D

i was thinking of JavaScript, since that's similar to C. i read that it was similar to C (or C++?) but simpler and not as rich as a language.
 
AL-FAMOUS:

why not do c sharp (cant find the key....
Cause it was made by MS. Does it even run on Macs? Meh, even if it did why would anyone not MS-centric choose it over something like C, Java, Ruby, etc...
 
If you want to ease in and do some (web or file) scripting, you could go for python ( http://www.python.org ) or perl - works on all platforms (must be installed in windows, but is already installed on mac os x and most linux distros).

Otherwise, if you want to also do graphical stuff across the mac/linux/win, I've heard good things about RealBasic.

Myself, I use Python to write a script here and there, as I find I can read and understand what I wrote about 6 months ago (try that with Canything or perl). Plus it's got modules you can load for just about anything you want to do as a system admin (ftp, syslog, whatnot).

As for C,C++, C# I always found it too much hassle... but YMMV ofcourse.
 
If you want to do Cocoa, Objective-C is the way to go...for a total n00b you might wanna set your original sights a bit lower and try to pick up something like python, which is pretty easy to pick up while still being very, very powerful.

If you want to do OOP cross-platform, C++ or Java are probably your most common choices. In this case PHP might be an okay start as PHP5 has really cleaned up PHPs OOP. If you're interested in OOP, it's best to start out with a powerful OOP language, no sense learning procedural programming and unlearning it all later. Smalltalk is absurdly object-oriented but I don't know how useful it is (I don't think it's all that common anymore) or whether it's easy to pick up.

For those looking for the sharp, try holding down your shift key while pressing the "3" key. C# ;)
 
blaster_boy said:
If you want to ease in and do some (web or file) scripting, you could go for python ( http://www.python.org ) or perl - works on all platforms (must be installed in windows, but is already installed on mac os x and most linux distros).

A quick question. How popular is python and perl for web applications now? What is the frequency when client required their applications to be in python or perl. Do you guys still programmed in perl and python? I'm just curious that's all.
 
How popular is python and perl for web applications now?

In our company, most intraweb stuff is done in .asp and/or bought content site programs - but Perl is the official script language, and as such in used in quite a few front-end applications, message gateways, etc. (I work in a bank, btw).

We have one website that was developed externally that works on php.

Python is very powerfull, is easely readable, but here is not much used. I just get a headache from understanding perl programs, so I bucked the trend and learned Python.

PHP is also easely learned (my little server in the company runs mainly on php).
 
i think every universities (of technology) teach programming with C language, and although it has steeper learning curve than some others, once learnt, the C programming skills can easily be translated to other programming languages.

if you're looking for an easy-to-learn (scripting) language, that would be perl. the syntax is as close to human thinking as it comes, but it is not very powerful language.

i recommend java only if you already have basic C programming skills. it's a bad language for learning programming basics, really.
 
panphage said:
If you want to do Cocoa, Objective-C is the way to go...for a total n00b you might wanna set your original sights a bit lower and try to pick up something like python, which is pretty easy to pick up while still being very, very powerful.

Objective-C isn't THAT hard...

[myTextField setStringValue:mad:"Hello World"];

Easy :)
 
thanks for all the comments. :)

i think they teach Delphi (very similar to Pascal?) at my college as the 'beginning' class.

broken_keyboard, you mention getting a good understanding of the basics? i'm wondering what is there to learn about the basics? things like syntax and how to format the code?

and say i start on Pascal, that's right down the bottom end of the programming food chain, right? what things can you do with pascal? and if i start off with Pascal, realistically how long before i'm making small apps for OS X/Linux or Win? it's not that i've got some dream to be a developer, i'm just curious. :)
 
Delphi uses ObjectPascal, a Borland variant.

I had learnt Pascal when it was in vogue. It is neither an easy language nor an easy entry into programming because it harbours some very confusing aspects, such as procedures within procedures.

The good thing about Delphi is that you don't have to do those odd and confusing things to accomplish a lot. As far as I know, it was the second drag-and-drop programming environment for Windows and much more successful than Visual BASIC. Many Visual BASIC applications graduated to Delphi years ago. I found it great for creating visual interfaces quickly that could call substantial and lean processes coded in C++.
 
cb911 said:
broken_keyboard, you mention getting a good understanding of the basics? i'm wondering what is there to learn about the basics? things like syntax and how to format the code?

No, syntax and formatting are largely superficial. I mean things like modularity, flow control, basic data structures. In all these fields, Pascal is very strict and will get you in to good habits. The trouble with languages like C and Perl is that they let you get away will a lot of messy stuff (especially Perl). If you start out with a very strict language, then those good habits will stay with you. Also if you start with a more limited language it forces you to think harder about how to solve problems, then when you eventually get to C and Perl you appreciate their powerful language features more, and have a better understanding of when it's appropriate to use them (and when not).


cb911 said:
and say i start on Pascal, that's right down the bottom end of the programming food chain, right? what things can you do with pascal? and if i start off with Pascal, realistically how long before i'm making small apps for OS X/Linux or Win? it's not that i've got some dream to be a developer, i'm just curious. :)

It really depends on you. If you really, really in a hurry then I would suggest skip Pascal and go straight to Java. Java is also pretty strict with you about clean code. The trouble is it has automatic memory management which you won't appreciate if you have never had to do it manually. Also it has a powerful standard library, with most everything you could want right there - you could really benefit from implementing some of that stuff yourself. Also lastly it is OO. You would be forced to learn OO at the same time as the basics. If you have written large programs without OO you would more clearly grasp the benefits first hand, instead of it just being some theory written down on paper.
 
What to learn

Well I started out on c++ for unix using gcc. The mac really is a great programming platform. With free developer tools and tons of languages ported to it. You have everything from perl to ruby to python and C, C++, java, fortran, you name it, except for the microsoft stuff it's available on the mac. So with all the options you need a good platform to learn. You need to learn about data types, methods or functions depending on what language you use, you also need to learn the syntax of a particular language to get good at it. For the most part data types and methods are similiar in all languages. You also need to look at algorithms, or the way things are done. Also your language choices should reflect your level of patience and your end goal. If you aren't very patient a quick scripting language like python, perl, php is pretty quick to do decent stuff. PHP is a web scripting language so if you leave more to web development you could try it out. If you have some patience then you should try - c/c++ or java.
 
Pascal?

I agree that starting with Pascal (or Delphi) is somewhat of a wise move as it has been mentioned. It is a strict and a very structured language, so it is a good language to start out on.

Java is not as difficult as people make it out to be. If you want to built GUI front ends than some of the freely available IDEs do a pretty good job of handholding. C and C++ are obviously decent and very powerful languages. But I do not recommend them to a beginner. There is so much you can do wrong with those languages and you would have no clue why. Java has a much better/modern model in that it is a "safer" language to try things out on.
 
But there is no Pascal (Delphi) for Mac, is there? MPW, maybe?

I'd recommend Java, as it's just about as easy, and much more marketable.
 
I'd start with Visual Basic under VPC.

No, don't laugh. it's the quickest, simplest way of getting the hang of the constructs and principles you need to be able to know as second nature whilst programming. It's also still developed, and the speed tradeoff with C++ is negligible today. Nobody uses Pascal, man. Naturally there is a limit (and a nasty one to get over) to which you can do with such a simplistic language.
Once you're interested, go straight into Java or C++ on the platform of your choice. You'll love the hands-on control, especially with C++ - my favourite language. It's got it's own little quirks, but the experience you have with VB should get you through in principle, at least. Java is awesome in that the libraries you get with it are hu-uge. You have to do very little to get going in a Java app, but again it has it's own quirks. It's also truly cross platform GUI compatible, something you may find really, really useful.

Ugh, anyway, I hate computers, just my personal experience. A historian's life is so much more.... outside :D
 
Java is (IMO) a very easy to learn development language/environment. It's syntax is very similar to C, so it should be relatively easy to move between the two.

The one drawback is that if/when you move from Java, you'll have to learn about memory management - since Java handles most of that for you. So, it's a nice shallow learning curve to start with, but it'll get steeper later on.

Another option is to learn the programming basics and principles in C, then you can move from there to object oriented programming in either Java, C++ or Objective C. Note, C++ and Obj-C are both supersets of C, so still have the syntax and functionality of C (plus a whole lot more).

Of course, if you're developing for OSX, Obj-C is probably your most forward-looking option. While I personally have my gripes about it (including lack of multiple inheritance and operator overloading), the amount of work you'll be spared by using the Cocoa frameworks is well worth it.
 
thanks for all the replies. i think i've learnt more about programming from this thread then i ever knew.

i'm going to talk to some of the lecturers at my college and see what they recommend, and it also has to fit in with me existing time table. so i'm pretty sure it'll be either JavaScript (or some other web-oriented language) or Delphi. i'm not *really* keen on getting into developing apps and stuff, i just want a taste of programming, for now. so i might try Delphi. :) but i'll see what happens. also, i'll be joining the class 3 weeks into the semester, so that might affect things.
 
That might not be a bad option. Plus, you can move on from there to developing Dashboard gadgets, if you choose to take it a step further.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.