View Full Version : I want to learn programming - which language to start at?
cb911
Aug 2, 2004, 01:05 AM
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. :)
bousozoku
Aug 2, 2004, 01:15 AM
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.
jefhatfield
Aug 2, 2004, 01:23 AM
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 ;)
BakedBeans
Aug 2, 2004, 01:33 AM
why not do c sharp (cant find the key....
cb911
Aug 2, 2004, 01:41 AM
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.
ddtlm
Aug 2, 2004, 01:42 AM
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...
Nermal
Aug 2, 2004, 02:28 AM
Objective C! :D :eek:
blaster_boy
Aug 2, 2004, 02:29 AM
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.
panphage
Aug 2, 2004, 02:54 AM
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# ;)
angelneo
Aug 2, 2004, 03:09 AM
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.
broken_keyboard
Aug 2, 2004, 04:00 AM
I don't recommend C as your starting point. Try Pascal, it doesn't have much commercial application but it will give you a good solid understanding of the basics.
blaster_boy
Aug 2, 2004, 04:04 AM
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).
JFreak
Aug 2, 2004, 04:44 AM
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.
Nermal
Aug 2, 2004, 05:00 AM
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:@"Hello World"];
Easy :)
cb911
Aug 2, 2004, 07:23 AM
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. :)
bousozoku
Aug 2, 2004, 08:07 AM
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++.
broken_keyboard
Aug 2, 2004, 08:22 AM
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).
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.
scottwat
Aug 2, 2004, 08:27 AM
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.
tace
Aug 2, 2004, 08:42 AM
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.
cubist
Aug 2, 2004, 08:45 AM
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.
brap
Aug 2, 2004, 08:53 AM
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
whooleytoo
Aug 2, 2004, 09:29 AM
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.
cb911
Aug 2, 2004, 06:22 PM
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.
scottwat
Aug 2, 2004, 06:30 PM
I might be wrong but PHP would probably be easier and more functional. I never really cared for javascript.
whooleytoo
Aug 2, 2004, 06:30 PM
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.
janey
Aug 3, 2004, 12:36 AM
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...
C# does, in the form of Mono, spearheaded by Miguel de Icaza.
http://go-mono.org
They have an OS X installer if I'm not mistaken. if they dont you can use fink or dports to install.
Umm C# is okay I suppose. I learned C, Java, miscellaneous tidbits of other languages like brain****...C# might be a tad difficult to begin with though.
I'd suggest starting out with Objective-C maybe? Or just a scripting language, something simple.
Try Hillegass's Cocoa Programming for Mac OS X or Kochan's Programming in Objective-C, both highly recommended over ANY of the O'Reilly obj-c/cocoa/macosx in general books.
Learning Ruby right now. It's one sweet language :)
cb911
Aug 3, 2004, 12:57 AM
übergeek, thanks for recommending the Hillegass books, i'll check it out.
i never thought about learning PHP and then making gadgets... hhmmm... that might be alot better for me...
maxvamp
Aug 3, 2004, 01:20 AM
One thing I have not seen asked is:
( in the voice of the cheshire cat ) What do you want to write?
If you don't know, then it really doesn't matter what language you learn.
One thing I would HIGHLY RECOMMEND is a subscription to the MacDeveloperJournal(.com)
Max.
jefhatfield
Aug 3, 2004, 01:31 AM
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. outside :D
i liked visual basic in school and i don't care if bill gates owns something like 13 languages, and many other companies that develop code...in the end it's all the same after awhile, one language to the next as some hard core programmers tell me
Nermal
Aug 3, 2004, 03:02 AM
so i might try Delphi. :)
Delphi is a nightmare :eek:
VB.net (http://lab.msdn.microsoft.com/express/vbasic/) is easy to learn, as powerful as C++, and only runs on Windows :(
But Delphi also only runs on Windows.
cb911
Aug 3, 2004, 07:13 AM
well if it doesn't run on Mac, then it's not too good for me... as for being a nitghtmare - when i spoke to one of the lecturers, he was kind of like, WTH? :p :D
i guess i should stick with more of a web-centric language like PHP or something like that. i really should be focusing more on learning video editing and SFX more than coding...
Fukui
Aug 3, 2004, 09:11 AM
Here's ,my experience with languages and programming:
Started with Pascal: Yuck yuck yuck. Didn't like all the wierd rules n'stuff. My first Language and was dissapointed... maybe it was my teacher...
Learned C: This is what I should have learned in the first place because its so similar to Pascal, I felt I wasted my time re-learning more complicated but similar syntax and types etc... but C felt much better than Pascal thats for sure. Just make sure you get Pointers and pointer arithmetic understood perfectly!! Its the most important aspect, that and memory allocation and deallocation being done correctly. Bit-wise operations are also very handy/powerful/fast but hard to read sometimes. C is very powerful.
Third, learned C++: I said ahhh, this is awesome, I think I'll just use C++ objects as the base of any apps I make and have the GUI in platform specific code (like objective-c). Plus, I got the idea of objects, and the idea of funtion overloading + subclassing + streams... liked streams, didn't get multiple inheritance... (what if two objects have the same function?) Either way, I thought, "What a smart language C++ is, its fast, object oriented, platform neutral."
Moved to Java: I thought wow! Forget C++!! This is so much more fun and elegant, liked the idea of types actually being objects (numbers for example), decided everything I do would be in Java (garbage collection seemed nice (automatic freeing of memory), if slow) and the way things operated, I liked it alot, thought I could write code once, and deploy it on a desktop and a web page too, like that even more.
Lastly, tried Objective-C: I thought, this is even better than Java!! I really really liked the fact that in the syntax, methods a separate from the objects they call, so for example instread of calling object.doSomething() you call [object doSomething]; this makes the syntax so different than C you dont get confused, and I really hated the syntax of C/C++ functions TBO. Also, since methods (functions) are "sent" not called to objects, its entirely possible to send calls to objects that don't understand them and not have the app crash (this would be impossible in pure C++ without workarounds) and in fact, if an object doesn't understand a message, it can forward it somewhere else! I thought WOW! Way better! Then the idea of typlessness (id as a void object pointer) was great because any object could take the place of another as long as it implemented the methods needed AT RUNTIME. Many things about cocoa itslef, too made me like it so much, its designed very very well, and its a shame its not available on other platforms, but maybe thats the point. Anyways, as a person who has gone from zero knowledge and therefore zero prejudice and through 4 languages I think Objective C is clearly the most "Fun" yet powerful. I was also glad that Objective C was just completely implemented in C itself, and was an object system purely based in C not just "on" C, and non-proprietary like say VB, even though cocoa may be.
Anyways, here's my conclusion:
Pascal, blah.
C, YOU MUST KNOW C even if it is so confusing, just go slowly until you get it.
C++, very practical if even more messy than C. Its a fine object system, even if heavily typed, which is good and bad.
Java, very nice, fun, slow. I dont like VMs, and I don't like Garbage Collection (slower, and I wanna know whats going on with my objects)
Objective-C, absolutely simple, the most simple OO language based on C I have studied, yet the most flexible and powerful. Can be heavily typed, or typeless, no multiple inheritence (I don't like it anyways - messy), fragile base class problem is mostly a non-issue etc.Memory management is completely up to the implementor, in cocoa its reference counting (I think a good compromise). Its just great to use, and you can use C++/Java objects from it as well, which is double nice. You can program in straight C all you want in Objective C without constraint, I liked that too.
You can load a plug-in with one line of code! One line! Less code to write == less bugs on your side.
In the end I, as you can tell, found Objective-C to be the best for me... Java is good, and C++ is fine, but Objective-C has the flexibility of C without the "hairballs"; fragile base class scared me away from C++ I hear Ruby and Python are also very good, but haven't tried them lately. C# seems interesting, but I dislike the C++/Java like syntax... a lot.
Anyways, Good luck.
bousozoku
Aug 3, 2004, 10:15 AM
Delphi is a nightmare :eek:
VB.net (http://lab.msdn.microsoft.com/express/vbasic/) is easy to learn, as powerful as C++, and only runs on Windows :(
But Delphi also only runs on Windows.
I'm not sure what you're using as a basis to call Delphi a nightmare but it's hardly that. If I have to do fill-in-the-blank programming, I'd rather use a Borland environment. They're consistent and the documentation is nearly complete. If those were traits of any Microsoft environment in the last 28 years, I'd be shocked. Visual BASIC is the nightmare.
Shaun.P
Aug 3, 2004, 11:23 AM
Has anyone heard of COMAL? It is the programming language that we get taught at school. I don't think it is very popular, here is some syntax:
counter:=0
REPEAT
counter:=counter+1
PRINT counter
UNTIL counter=10
You insert internal commentary by doing '//' i.e.
//This displays the word 'Hello'
PRINT "Hello"
I've found a website of a book that we use at school. It has files for the COMAL, C and TrueBasic programming environments for you to download.
Find it here: http://www.newhighercomputing.co.uk/mac.htm
Can anyone tell, by the syntax that I have typed, if COMAL is close to any other programming language? Also, I recently installed Xcode, it looks a little daunting. What programming languages can you implement in Xcode?
Thanks in advance.
Shaun.
bousozoku
Aug 3, 2004, 11:36 AM
Has anyone heard of COMAL? It is the programming language that we get taught at school. I don't think it is very popular, here is some syntax:
counter:=0
REPEAT
counter:=counter+1
PRINT counter
UNTIL counter=10
You insert internal commentary by doing '//' i.e.
//This displays the word 'Hello'
PRINT "Hello"
I've found a website of a book that we use at school. It has files for the COMAL, C and TrueBasic programming environments for you to download.
Find it here: http://www.newhighercomputing.co.uk/mac.htm
Can anyone tell, by the syntax that I have typed, if COMAL is close to any other programming language? Also, I recently installed Xcode, it looks a little daunting. What programming languages can you implement in Xcode?
Thanks in advance.
Shaun.
It's almost exactly like Pascal, except that comments are surrounded by {} or (**) pairs.
Xcode supports projects for C, C++, Objective-C, and Java but the editor also understands the various scripting languages well enough to check the balance of paired items.
abhishekit
Aug 3, 2004, 11:38 AM
I have used BASIC, C, C++, and Java. Java is the latest I have been using. And I feel its a great language even if you are just starting programming.
cheers
janey
Aug 3, 2004, 12:29 PM
...in the end it's all the same after awhile, one language to the next as some hard core programmers tell me
i dunno about the bill gates thing...but yeah in the end its not that hard to learn a new language once you have one under your belt and you know it well.
Doesnt work with all languages, but if you know for example C++, Java won't be difficult to learn, and if you know C or Java, Objective-C isnt too hard to learn. You already have a foundation on which to build on. A real language comparison might be, for example, if you know a language like Spanish already, it becomes easier to learn French because they have many similarities. Yeah. mmm.
slughead
Aug 3, 2004, 12:51 PM
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.
I agree, LEARN OBJECT ORIENTED LANGUAGES!! (PHP 5, C++, Java, VB.net, etc).
Java's an awesome language to start on because it has datatypes, is object oriented, works on any platform, and has a bunch of cool libraries included that allow you to build an interface and draw stuff.
If you learn java, you'll be good for TONS of languages.
janey
Aug 3, 2004, 01:12 PM
Learn Ruby. :D
http://ruby-lang.org
MarkCollette
Aug 3, 2004, 01:49 PM
I think a point that several people touched on is, there's a progression. Some languages are better for when you're first learning the concepts, and others give you greater capabilities, for when you've got the basics down pat, and are wanting to expand.
My recommendation is start with a language that is simple, has strong typing, and is sufficiently close to the machine, that you will understand how the machine works, and how your code affects it.
I know this will sound totally uncool, but what I'm recommending is that you start with C and/or assembler. Once you've learned how the machine works with assembler, and how structured programming works with C, then move on to learnnig object oriented programming with C++ or Java or objective-c.
Do not start with a weakly typed language, where you can sort of fudge things until 'they work', like a scripting language. Use a compiled language. Yes, you will have to sit on your ass while it compiles, but guess what, then you'll learn to solve the problem in your head, and not just edit until it stops giving errors.
I'm in computer science, and I've programmed for 8 years or so. I've seen a lot of programmers who suck, and I think this is a good strategy to avoid ending up like that.
slughead
Aug 3, 2004, 02:31 PM
Do not start with a weakly typed language, where you can sort of fudge things until 'they work', like a scripting language. Use a compiled language. Yes, you will have to sit on your ass while it compiles, but guess what, then you'll learn to solve the problem in your head, and not just edit until it stops giving errors.
Well at least we agree on that.
Whatever you start out with, take it at school! It'll help you understand the important concepts faster, and it'll teach you how to express your problems to other programmers (or reference manuals) if you ever need help (and you will).
cb911
Aug 3, 2004, 06:56 PM
wow, even more replies. :)
i found out about Delphi, it's a double class at my college, so i'd have to enroll into two more classes for it. well i'm not too keen on that idea... :(
but i've also only got till the end of the year to do it, since i'm leaving college then. i only really wanted to get a taste of it and see what it's like, since i'm already a designer. i've never heard of a designer/programmer. :p it probably will be better for me to do some web-based thing after all.
but do keep discussing all these different languages, i'm finding it very interesting. :)
mlw1235
Aug 4, 2004, 11:33 AM
writeln ('Pascal is evil');
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.