PDA

View Full Version : Cross platform programming...


total
01-11-2009, 04:28 PM
I've recently decided that I want to learn some form of programming. The only experience I have is some very limited Cobol experience (hey it was high school!) and a touch of bash scripting.

I'd like to at the very least be able to write a simple application, and if i have the drive and tenacity to try making a game of some sort. My platform of choice is Ubuntu, and would like to use (free!) compilers on it. I would love to be able to port whatever the fuck I make to Windows and possibly OSX (I can throw together a hackintosh for testing if the time comes). So far everyone I've talked to that I know has suggested I start with C, Python or Java and move up from there. I know there are some experienced individuals on this site and thought I would throw it up to you guys. Any recommendations?

Rakael
01-11-2009, 04:42 PM
No clue. I'm a hardware monkey, and code makes my brain hurt. Good luck learning it though.

Gormanimal
01-11-2009, 04:59 PM
My personal suggestion is Python; but 2.6 final, not 3.0. Version 3 just came out and the majority of code is still under 2.6, and likely will be for a while. Python's a well structured language, and there is plenty of documentation out there on it.

Codicier
01-11-2009, 05:09 PM
If you want to learn the basics of memory management and very low level stuff, start with C.

If you want to do something Internet based, Python would be good. It's a good scripting language.

If you want to learn something about object oriented programming and not even think about memory management, Java is how I started in my first programming class when I was in first year comp sci (fourth year now).

total
01-11-2009, 05:47 PM
No clue. I'm a hardware monkey, and code makes my brain hurt. Good luck learning it though.

I am too, and always have been. I've always wanted a deeper knowledge of programming though.

My personal suggestion is Python; but 2.6 final, not 3.0. Version 3 just came out and the majority of code is still under 2.6, and likely will be for a while. Python's a well structured language, and there is plenty of documentation out there on it.

This seemed to be the biggest recommendation of the Ubuntu folk also.

If you want to learn the basics of memory management and very low level stuff, start with C.

If you want to do something Internet based, Python would be good. It's a good scripting language.

If you want to learn something about object oriented programming and not even think about memory management, Java is how I started in my first programming class when I was in first year comp sci (fourth year now).

I think I will eventually move to object oriented languages but really want to start at the ground floor and make my way up. I've heard quite a few people tell me that if you know C, learning Java is quite a bit easier.

I am thinking my first step is finding a language I want to work with and then finding a decent compiler for Ubuntu. Does anyone around here use Python, C, or Java and Ubuntu and if so what compiler do you use? I am guessing for C most would use gcc. This (https://help.ubuntu.com/community/InstallingCompilers) seems like a good place for me to start.

Codicier
01-11-2009, 06:23 PM
I think I will eventually move to object oriented languages but really want to start at the ground floor and make my way up. I've heard quite a few people tell me that if you know C, learning Java is quite a bit easier.

I am thinking my first step is finding a language I want to work with and then finding a decent compiler for Ubuntu. Does anyone around here use Python, C, or Java and Ubuntu and if so what compiler do you use? I am guessing for C most would use gcc. This (https://help.ubuntu.com/community/InstallingCompilers) seems like a good place for me to start.

Starting with C is probably a good idea. Learning C after Java was probably more difficult than if I had gone the other way.

gcc will do you for C. For Java, I'd recommend getting the full JDK from Sun.

For Python you can get the standard interpreter from Python.org, but most linux distributions come with Python already installed, so you may want to check for that.

There should also be ways of getting these things via the package manager in Ubuntu instead of downloading from the browser and then manually installing so you could look into that as well.

LiquidRain
01-11-2009, 07:44 PM
Well, I think Audiosurf was made in Python. Use the right libraries and you should be able to do cross platform. :)

Chris_D
01-12-2009, 12:35 AM
Depending on what your goals are, I don't think knowing C is particularly essential these days. Java clearly is better than C for cross platform GUI applications. Also, even though you don't have to manage pointer allocation specifically in Java, there are still other ways to screw up your memory handling :).

I never really used C beyond Maths in University (it seemed better than learning Fortran just to do some assignments) and I've never felt the lack.

Ancalagon
01-12-2009, 01:10 AM
I'd do Java first - its platform neutral and has a lot of good features. Its also not a dead end language - it has a lot of uses in the industry today.

As a newbie I would probably find C a bit daunting, and thats made more so by the fact Linux doesnt make things any easier for you (in particular, working with strings, even with C++ and QT, is hell. Java makes strings a breeze).

If you are going to do C you might as well learn C++ anyway. but ya, it might be good to start with a scripting language such as Python, but I'd really recommend Java cos its a very powerful language, and you can write programs under Linux and run them under Windows if you like. I'd stay away from C/C++ until you have some idea what you are actually doing.

total
01-12-2009, 01:20 AM
Ok, those recommending Java; have you used Eclipse and or Netbeans and which do you prefer?

Ancalagon
01-12-2009, 01:22 AM
I used Eclipse for JSP programming a few years back, I remember it being pretty good. Never used Netbeans.

Chris_D
01-12-2009, 01:24 AM
Net Beans has come along miles since the early versions. Eclipse used to be gospel but from Net Beans version 5 I would use it over Eclipse. In particular, the GUI builder is awesome for Swing applications. To be honest, I haven't used Eclipse for 3 years or so though.

I think Net Beans is easier for novices too. Net Beans has most of what you need out of the box. Meanwhile Eclipse (used to) require(s) various plug-ins to get what you need. I remember I used to use MyEclipse which was a pretty good suite of plug-ins in one easy to install package.

total
01-12-2009, 01:33 AM
sudo apt-get install netbeans

Edit: Bah. The Netbeans in the Ubuntu repos is 6.1. Looks like I am grabbing this one off the site.

Codicier
01-12-2009, 04:45 AM
I use Eclipse. Never tried Net Beans but the GUI builder mentioned has me intrigued. I spent a lot of time manually doing layout code in Java for one of my co-op placements, so the next time I've got to write any Swing stuff perhaps I'll give Net Beans a go.

Chris_D
01-12-2009, 05:21 AM
If you never wanted to care about Layout Managers again then the Netbeans GUI builder works pretty well :).

spcialk
01-12-2009, 11:41 AM
Huh, these are all great suggestions, but no one has the most obvious one!

Do JavaScript. Don't laugh immediately, I hae a good case for it. 1. There are great resources on the web for using JavaScript (my favorite is the O'Reilly book, it's huge and good). 2. It allows for web mashups, arguably the coolest bunch of programming on the web. 3. Its got more power than you think; I've helped develop a number of JS projects that are cool. Check out:

http://infinitecanvas.appjet.net

And

http://livelabs.com/seadragon-ajax/gallery