PDA

View Full Version : What language to learn (computer of course)


ast3r3x
2005-02-25, 11:48
I'm looking for a fun new language to take up so I can start making some worthless programs. I was hoping you'd give me some advice on what you think.

Some background....
I took a c++ class, but it was very simple, not visual at all, and just a class to start you thinking about programming logic. I then started to learn javascript, but got bored with that quickly because I had no use for it. I moved to PHP, and then MySQL (is all sql the same?), and now I'm looking for something so that I can make visual programs that aren't run inside a web browser.

What I've been looking at...
I bought a cocoa book a while ago, but never got into it for whatever reason. It just seemed kinda complicated, to do all the stuff you had to do to get something simple to work. Of course it wasn't that complicated, I really just never gave it a good chance.

I have been looking to java too because I hear it's pretty easy to get networking and internet aspects working with this. That is very appealing to me.

Lastly, what sucks so much about REALBasic? I mean, it seems REALLy easy to quickly churn out a basic application that is also platform independent. I don't know why, but I have a bias against it, like it's a joke.

So, what do you think? Learn a GUI language at all or learn something like perl or python? Well, let me know what you think, I'm leaning towards java, but think it would be nice to have such integrated functionality with the OS as cocoa probably allows.

My biggest fear for any language? I'm afraid I'm going to suck it up when I have to start worrying about memory, to clear unused variables and everything.

scratt
2005-02-25, 12:18
I would be interested in views on this also...

I have been out of programming for a long time and am tempted to get into OS X software, seeing as all the toos are there and widgets look like they might be a good placce to start...

The last thing I programmed was a V60 controlling a 3D rendering pipeline on SEGAs arcade platforms...

Before that it was all 680x0 and 56010 DSPs.....

I tried C++ and found it awful, but guess I am going to have to do something like that to get back into things nowadays.. *puffs on old boy pipe* *leans back in leather chair in library*

Not to steal ast3r3xs thread here but if anyone can shed some light on where we would go from here would be really cool....

Mr Beardsley
2005-02-25, 15:28
I would recommend you guys go with Cocoa. Objective-C is a neat language, and I really enjoy it. If you want to do visual stuff, then java is right out. (Unless you do java Cocoa). Having to make interfaces with straight java gives me nightmares. :(

I would recommend "Cocoa Programming for Mac OS X" by Aaron Hillegass. It really helped me get a feel for how to work with Coca and Objective-C. By the time you get done with the book, you've made a lot of small apps that show you how to work with most of the Cocoa framework. If you want to do networking, there is the follow on book which deals with that.

With interface builder and XCode, you can whip up a gui really quick. My girlfriend made a program with a little help. It doesn't do much, you som buttons and different strings come up, but she's proud of saying she made a program.

Just my thoughts.

ast3r3x
2005-02-25, 17:42
I would recommend "Cocoa Programming for Mac OS X" by Aaron Hillegass. It really helped me get a feel for how to work with Coca and Objective-C.

Ugh, thats the book I have. I guess I'll give it another chance, I don't really like how he does things. I don't feel like he describes things well enough, he just gives you the code and tells you what to do...at least as far as I got.

Edit: Which book do you have, I bought a while ago and hav this (http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=Al4YCc0BJ8&isbn=0201726831&itm=18)

The PHP O'Reilly book I have is the best, it went through functions/manipulations for strings, arrays, objects, and then went into examples and how to work with images, databases, ect...

I just need a beginning book for cocoa, I think the cocoa book just kinda assumed a knowledge of obj-c, and started.

Maybe I'll check out an O'Reilly cocoa book.

HowardG
2005-02-25, 18:30
ast3r3x,
Thats the First Edition (http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=Al4YCc0BJ8&isbn=0201726831&itm=18)

That may be why.....if you have MacOSX 10.3...
I would get the 2nd Edition (http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=k73olc0BPv&isbn=0321213149&itm=1). Its alot cleaner and covers Bindings (which appeared in 10.3) and several other new topics.

I would also take a look at Cocoa Recipes for Mac OS X (http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=k73olc0BPv&isbn=0201878011&itm=1). Its only based on the Vermont Recipes app from the StepWise (http://www.stepwise.com) site a while back. But you start with a basic app and add more and more (preferences, undo, drag & drop, etc.) along the way, so its a good read (atleast I thought so).

bassplayinMacFiend
2005-02-25, 19:19
You could always start with the Apple-suppllied docs. The only sample program is either a currency or temperature converter (I forget which) but that shoud get you started.

You could also follow the link in my sig. & download my Musical Scales program. The complete XCode project files are part of the download as a .zip file in the .dmg file.

If you're interested in (non-GUI) Java programming you can see the examples that paid for my 2G iPod :) here --> http://members.cox.net/~pevac/designExamples.html . I wrote examples 4 through 14.

Java GUI programming is about as much fun as doing your own root canal with a hand-powered drill. Definitely not recommended for the beginner.

I've found XCode/Interface Builder to be an excellent set of dev tools with one exception; I hate Obj-C's String class as compared to Java's String class. Other than this one nit I dig Obj-C & Apple's dev tools.

staph
2005-02-25, 19:49
I've been reading Kochan's Programming in Objective C (http://safari.informit.com/?x=1&mode=section&sortKey=title&sortOrder=asc&view=&xmlid=0-672-32586-1&g=&catid=&s=1&b=1&f=1&t=1&c=1&u=1&r=&o=1&n=1&d=1&p=1&a=0&page=0) and I've been finding its approach really rather excellent — it assumes no prior knowlege of C/++ at all, and goes from the basics on in.

There was a good thread on this topic over at .com, but I couldn't be arsed linking to it.

ast3r3x
2005-02-25, 20:07
I didn't check Apples documentation yet for xcode, but does it contain, or somewhere have an exhausting list of functions and everything about them/it like php.net does?

bassplayinMacFiend
2005-02-25, 20:41
I didn't check Apples documentation yet for xcode, but does it contain, or somewhere have an exhausting list of functions and everything about them/it like php.net does?

There is documentation on all Carbon & Cocoa objects. I haven't spent any time on php.net so I don't know how they're setup, but for every Cocoa object there is documentation for every property & method as well as the list of objects an object inherits properties/methods from.

Fire up XCode and click Help --> Documentation and you'll see the installed 'books' in your library.

[edit]
There's also Apple's Objective-C reference in .pdf format. (http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/ObjC.pdf)

curiousuburb
2005-02-25, 21:04
Pah... newfangled coding... for true oldtimer chops, you should learn EBCDIC (http://www.terena.nl/library/multiling/euroml/section05.html) :p

autodata
2005-02-26, 02:30
Cocoa is just plain fun.
The PHP O'Reilly book I have is the best...
Which O'Reilly PHP book?

ast3r3x
2005-02-26, 08:01
Programming PHP (http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=Al4YCc0BJ8&isbn=1565926102&itm=2)

Maybe it was the stage I was in, but I just never got bored while reading through this book. It wasn't as dull as most books are to me normally to me. Just had a way of talking about things, and telling why they are useful. It was more like being taught by a teacher then being told how the language works.

Paul
2005-02-26, 13:45
Do any of you remember scheme? (http://www.swiss.ai.mit.edu/projects/scheme/) in 1997 I coded a calculator for my first (and only) computer science class. Very cool. Does anyone know if it is still used for teaching?

good (http://www.schemers.org/) stuff (http://www.google.com/search?client=safari&rls=en-us&q=scheme&ie=UTF-8&oe=UTF-8)

Brad
2005-02-26, 15:06
As Mr Beardsley and bassplayinMacFiend said, writing a good Java GUI ranks among the most painful experiences in life. However, I'd still have to recommend learning Java.

Are you in high school, ast3r3x? Forgive my flakey memory, but I can't really remember how old everyone here is these days. Anyway, if you are and if you plan to take any computer science courses at college, I'd definitely recommend learning Java. It's the "hot" language these days for most programming courses at the university level. Most college students now will graduate knowing a lot of Java and C/C++ and not a whole lot else. ;) A lot of the courses I've taken simply assume you know how to program in Java and can at least read C.

Java is very good for teaching you object-oriented design. Everything in Java is an object that can be subclassed. However, Java is very bad at teaching you memory management. You never allocate or deallocate anything in Java; it's all automatic.

Java is the "easy" language that lots of universities use because it includes classes that already do just about everything for you from string manipulation to socket networking. Java also, as I mentioned, does memory management automatically, allocating when new instances are created and deallocating with a "garbage collector" a period of time after a variable goes out of scope. If you've worked in a traditional language like C for any length of time, the garbage collector is very difficult to get used to (it was for me, at least). If you're relatively new to memory management, though, the garbage collector is a godsend.

If you're already past college or don't plan to take university computer science classes, I'd recommend learning Cocoa... then Java. ;) Since you already know the basics of C++ (and hopefully some memory management), you'd be greatly benefitted by moving into Cocoa and Objective-C which will just be an extension of what you've learned. Learning Cocoa itself will probably not do you a whole lot of good in the "real world" (because a "real" programming job will probably require you to work in MS Visual C or MS C#), but it will give you a very solid foundation on object oriented programming while keeping your mind focused on the importance of memory management.

Java would still be nice to learn at some future point because it does at least offer easy cross-platform compatibility. A class you compile on a Mac OS X machine will run exactly the same on a Windows machine and a Linux machine and a Sun machine. You don't even have to recompile!

mdeloria
2005-02-28, 19:37
Do any of you remember scheme? (http://www.swiss.ai.mit.edu/projects/scheme/) in 1997 I coded a calculator for my first (and only) computer science class. Very cool. Does anyone know if it is still used for teaching?

good (http://www.schemers.org/) stuff (http://www.google.com/search?client=safari&rls=en-us&q=scheme&ie=UTF-8&oe=UTF-8)

Paul, as I type this, I am working on a scheme project for college. I am a CS major. So yes, it is used still for teaching despite my utter hatred for this language

scratt
2005-02-28, 19:49
Thanks y'all. This made for interesting reading....

ast3r3x
2005-02-28, 20:43
Brad, I'm a freshman in college majoring in Management Information System major, so if that is worth anything.

I go to a penn state campus, and I'm taking CmpSci 203, which is a 'business oriented computer programming class.' This means we learn how to work with functions in excel, minitab (although I just copied this lab), Visual Basic (I just used REALBasic to the lab, figured it was the same), and then after we are done with visual basic, we are going to start working with MS Access.

We didn't really work with memory management in c++ because we never made programs that were big enough or ran long enough to need it.

So I guess there is no interface builder while writing Java huh? Why is it so bad to build interfaces with Java? Can Java programs run at the same speed as cocoa apps can?

bassplayinMacFiend
2005-02-28, 20:55
Brad, I'm a freshman in college majoring in Management Information System major, so if that is worth anything.

I go to a penn state campus, and I'm taking CmpSci 203, which is a 'business oriented computer programming class.' This means we learn how to work with functions in excel, minitab (although I just copied this lab), Visual Basic (I just used REALBasic to the lab, figured it was the same), and then after we are done with visual basic, we are going to start working with MS Access.

We didn't really work with memory management in c++ because we never made programs that were big enough or ran long enough to need it.

So I guess there is no interface builder while writing Java huh? Why is it so bad to build interfaces with Java? Can Java programs run at the same speed as cocoa apps can?

If you're going to be working in Excel & Access, then spend the time to learn Visual Basic. Both of these programs are extendable through Visual Basic for Applications (VBA) which is basically VB6. Once you have the basics of VB down, you'll be able to use the object models in Excel & Access to programmatically manipulate data, so you'll want to be familiar with VB's syntax and how it works with objects so learning to use the Excel & Access object models will be that much simpler.

I've found that both Netbeans & Eclipse provide a drag & drop Java GUI builder, but I've already run into issues trying to group buttons & such using these IDEs. At this point I'd say that coding the GUI would probably be easier for me then it would be to use these GUI builders. :(

Java apps won't run as fast as Objective-C Cocoa programs because Obj-C is compiled, while Java is run through a Just In Time (JIT) compiler at run time. This is why Java can run on multiple platforms. The code is compiled into byte code, then this byte code is compiled at run time. As long as a JIT is available for an OS it can compile the byte code. So, think of the byte code as an intermediate level of compilation.

VB/VBA is also compiled at run time (although I believe you can compile VB apps but not VBA) so it will run slower than RealBASIC since RB is compiled as well.

Hope this helps. :)

[edit]
For my CS Major related classes I'd say 90+% was in Java because they wanted to drill OOP into our heads. Two classes dealt with C & one class was in ASM. The database programming classes were the only ones that didn't have any Java or C programming involved cuz that's all SQL.

Brad
2005-02-28, 21:08
What bass dude said x2. :)

ast3r3x
2005-02-28, 21:24
Well we are done with excel and nothing important with visual basic is going to be done. I've taken a VB class in high school my freshman year, and while I don't remember hardly anything, it's so stinking simple.

I hate business oriented programming, it's so boring and relatively simple, the teacher lectures verbatim from the book, she says she had to do all of this stuff, but I can't believe her with how little she seems to know.

I guess Java it is then.

bassplayinMacFiend
2005-02-28, 21:27
What bass dude said x2. :)

Thanks for gettin my back. :)

Barto
2005-03-01, 09:25
Java apps won't run as fast as Objective-C Cocoa programs because Obj-C is compiled, while Java is run through a Just In Time (JIT) compiler at run time.

I take it you haven't used .NET (aka Java done right). :p

bassplayinMacFiend
2005-03-01, 10:42
I take it you haven't used .NET (aka Java done right). :p

It's not officially available for OS X yet, is it? Last Fall I converted my home to all Macs so I only use PCs at work now so I don't have a PC to use for development.

Barto
2005-03-01, 11:00
Rotor (http://msdn.microsoft.com/net/sscli/) has been on the Mac for years, and the latest unstable (http://www.mono-project.com/downloads/) version of Mono/OSX includes Cocoa bindings for C# (Cocoa#).

thuh Freak
2005-03-01, 11:08
VB is an interesting language. It is (or atleast was) similar to REALbasic (haven't looked at RB in a long long time). But VB isn't really used very much anymore (atleast not at my job; and from my understanding not much in business). We don't even have a version of VStudio to deal with VB6- anymore; our classic-VB apps are old and time-tested and dont need active development. VB.net, the successor to VB, is a very different language (while maintaining some, perhaps most, of the VB syntax). It breaks compatibility a lot, and theres a whole lot of new concepts introduced to the language (like OO). One thing to note is that VBA is still very close to classic VB. I think I read in VS mag that VBA is going .net (or maybe it already has).

The .net languages are pretty cool. I mean, about as cool as languages can get when they don't allow you to do pointer arithmetic. I certainly wouldn't recommend going with them over anything Cocoa related, but you should be aware that the mono project made a .net compiler (i think c#.net, maybe it was vb.net; maybe both?) that works on non-windows machines, and theres a large enough f/oss .net libraries available to mimic much of the standard .net ones. one side benefit of c#.net is that it is so fucking close to java; well, that may or may not be seen as a benefit. another nifty thing about .net is that any .net language u write in (for windows, theres more than just the standard c# and vb.net) will compile to a bytecode (same idea as java, different implementation).

If you are really interested in programming, I think you should learn memory management, thence a language like c, c++ or objective-c. it is a very important part of CS. objc kind of cheats a little, wrt memory management, but theres some there. If you are just curious about programming, a higher level language like java would probably better suite you.

WRT sql, yes, they all are basically the same. you have SELECTs, INSERTs, UPDATEs, DELETEs and so on. Sometimes one has a peculiar feature that another one doesn't (like with joins, i think one db had INNER and OUTER joins before the competitors...).

ast3r3x
2005-03-01, 16:40
I guess I'll give a go at java since I'll probably have to take a programming course in that sometime in the next three years for my major.

scratt
2005-03-06, 05:23
Hi all...

Thanks for all the input.. I'll take it on board and have a think.. Just wanted to let people know I have been reading the thread after asking to be included...

:)