Overclockers Australia Forums

OCAU News - Wiki - QuickLinks - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Software Topics > Other Operating Systems

Notices


Sign up for a free OCAU account and this ad will go away!
Search our forums with Google:
Reply
 
Thread Tools
Old 6th April 2008, 7:23 PM   #1
Marlborosmoker Thread Starter
Member
 
Join Date: Jun 2007
Location: Sydney
Posts: 909
Default Programming in *nix

Guys I've just started using Xubuntu in dual boot with xp home. I'm trying to learn the ins and outs of *nix as well as starting to learn some basic programming with Java and C. I start my uni course next for next semester as I deferred this semester, But I'd really like to get a head start. I'm not too familiar with what C compilers and Java tools are available for *nix.

As you can tell I know nothing my only programming experience has been with VB so I need to get a head start as quickly as possible otherwise I won't pass.

Any help is appreciated
Marlborosmoker is offline   Reply With Quote

Join OCAU to remove this ad!
Old 6th April 2008, 7:44 PM   #2
checkers
Member
 
checkers's Avatar
 
Join Date: Jan 2007
Location: Perth
Posts: 613
Default

Quote:
Originally Posted by Marlborosmoker View Post
Guys I've just started using Xubuntu in dual boot with xp home. I'm trying to learn the ins and outs of *nix as well as starting to learn some basic programming with Java and C. I start my uni course next for next semester as I deferred this semester, But I'd really like to get a head start. I'm not too familiar with what C compilers and Java tools are available for *nix.

As you can tell I know nothing my only programming experience has been with VB so I need to get a head start as quickly as possible otherwise I won't pass.

Any help is appreciated
On linux, you'll be using GCC as your C compiler, and javac for java compilation. As for text editor, you are basically free to use whatever you want, although I'd suggest something with syntax highlighting
__________________
CCCP
checkers is offline   Reply With Quote
Old 6th April 2008, 9:33 PM   #3
cibyr
Member
 
cibyr's Avatar
 
Join Date: Jun 2006
Location: Sydney
Posts: 92
Default

Check out netbeans or eclipse for a Java IDE. Dunno what you'd use for C though, I just use vim. Now, someone has to tell you to use emacs...
cibyr is offline   Reply With Quote
Old 7th April 2008, 12:28 PM   #4
Cypher_FTW
Member
 
Cypher_FTW's Avatar
 
Join Date: Dec 2005
Location: Auz
Posts: 159
Default

If I was you I would start out with Java before C. Java gets you into programming a lot quicker than C does and is easier to learn because it has great documentation [Link]. I would start with a simple text editor rather than an IDE as chances are you will not be needing any of the advanced features that an IDE provides other than syntax highlighting and the compile button. So try out vim, emacs, and jed for programming in the console or kate, and SciTE on the desktop. I used Scite for learning java on windows and it is perfect: text editor, output window, syntax highlighting, tabs and build/compile buttons.

As for C you might want to find a book to learn from like K&R's The C Programming Language, I picked up a copy off ebay for about ~$35. I also remember finding a neat little tutorial on making a pong clone in C using SDL at LinuxDevCenter [Link] if you want to give games a go.

The thing to do is find a lot of examples and try to replicate them. You should also try to make your own little redundant app's that use as many different data types and statements as possible. Text based adventure games are the best things for this really.

Have FUN!
__________________
You can't spell slaughter without laughter!
Main System[Arch]: AMD Phenom II x4 955 @ 3.2GHz # NVIDIA GeForce GTX275 # Thermaltake Shark case # ASUS M4A78T-E # Samsung SyncMaster 2233 21.5" LCD 1080p
MacBook[Tiger]: 13" # 2Ghz # 1GB RAM # 60GB HDD
Cypher_FTW is offline   Reply With Quote
Old 7th April 2008, 1:16 PM   #5
GumbyNoTalent
Member
 
GumbyNoTalent's Avatar
 
Join Date: Jan 2003
Location: Briz Vegas
Posts: 2,333
Default

Personally, if your going to use *nix and want to learn some programing I would start with Perl, then C and Java last. Also since your using Ubuntu, Python would be a good language to learn if you want to use GTK+, as a quick knock up language.
GumbyNoTalent is offline   Reply With Quote
Old 7th April 2008, 1:20 PM   #6
Crinos
Member
 
Crinos's Avatar
 
Join Date: Jul 2002
Location: Tasmania
Posts: 4,019
Default

Quote:
Originally Posted by GumbyNoTalent View Post
Personally, if your going to use *nix and want to learn some programing I would start with Perl, then C and Java last. Also since your using Ubuntu, Python would be a good language to learn if you want to use GTK+, as a quick knock up language.
Python > Perl

I found a really good lightweight IDE called Geany the other day. Seriously unbloated, and it's got all the useful features I want/need.

http://geany.uvena.de/
__________________
OCAU MetaL Club Member #666 | last.fm
2005: Megadeth | 2006: Opeth | 2007: Blind Guardian, Sodom | 2008: Iron Maiden | 2009: Pain of Salvation, Dream Theater
2010: Ensiferum, Sonata Arctica, Wolves in the Throne Room
Crinos is offline   Reply With Quote
Old 7th April 2008, 3:05 PM   #7
GLoLiTe
Member
 
Join Date: Jun 2001
Location: Sydney
Posts: 108
Default

i know at my uni they teach java with an IDE called Blue J which is a lightweight introduction to classes IDE available free for download. you might want to check this out.
GLoLiTe is offline   Reply With Quote
Old 7th April 2008, 4:08 PM   #8
predder
Member
 
predder's Avatar
 
Join Date: Jun 2003
Location: Gold Coast, Qld.
Posts: 1,364
Default

Quote:
Originally Posted by cibyr View Post
Check out netbeans or eclipse for a Java IDE. Dunno what you'd use for C though, I just use vim. Now, someone has to tell you to use emacs...
This man is a fool. Men of the one true faith use emacs. To suggest vi is heresy. Give me emacs or give me death.

Quote:
Truly, our responsibility to spread the Gospel of the Gnu is weighty.
Cleave to what is good. Remember the words the prophet Stallman
brought down from the Mount MIT, graved in Lisp on tablets of
crystalline lambda calculus.

Only this true: Emacs is pure.
All else is false.
Do not be misled by false gods like Vi, the Editor of the Beast.
Do not be seduced by Word, the Scarlet Woman of Babylon.
Do not be driven to madness by Xcode, the Blind Priest of the Children of Asherath.

When the wild winds of chaos blow, stay pure.
When the universe collapses in shards around you, stay holy.
When the gibbering hobgoblins of apostate Editors attack with shards
of broken syntax, seek the crystalline stillness within you.

Brethren, ensure that you (Meta-x-say-hallel-to-Emacs) daily for otherwise you will be lost.
When the Beast comes, only Emacs can save you.

This was brought to you as a public service by the Holy and Ineffable Church of The Mighty Emacs.
SUPPORT THIS CRUSADE WITH YOUR DONATIONS. EMAIL THE STILL BEATING
HEART OF A VILE VI USER TO emacs-highpriest@god-hates-vi-users

Source


In other news, I would suggest if you are learning a programming language for academic purposes that you start with C, by reading this book. From there, move to C++ to make the leap in learning the object oriented approach to problems, overloading operators, the scope resolution operator ( :: ), const, using new and delete for dynamic memory allocation and so on.

Once you have all that under your belt, Java will be a cinch. In my opinion you'll be a better programmer starting with C, then C++ and finally moving to Java rather than the other way around. Shell scripting is also important, learn a little bit of bash and from there move to either Perl, Python or Ruby. All of these have their pros and cons. Python looks like a solid choice as both a unix scripting language and for writing quick apps using GTK+ libraries if you require a GUI. Ruby is just as powerful as Python from what I understand as a scripting language (although its libraries may not be quite as good as Python's) and using the Rails framework you can rapidly develop decent web apps. Finally, Ruby will facilitate you learning some advanced concepts you'll find in Lisp, your final language in the journey of being a master programmer on the *nix platform.

Now, I should stress that there is no correct answer for the question you've posed - many are going to have differing opinions on the subject. Over the last year this debate has erupted on slashdot no less than 3 times, reading those discussions is a wise choice if you'd like to hear more opinions before you make your own. Disclaimer: I don't know Python or Ruby yet - I've been reading about the two for months to figure out which to learn. Final disclaimer: I use Vim. If you choose to, first create a .vimrc in your home directory and put in it:
set nu
set background=dark
syntax on

This will get you line numbers and syntax highlighting.
__________________
im details trades list (un/pw ocau)
predder is offline   Reply With Quote
Old 7th April 2008, 5:17 PM   #9
checkers
Member
 
checkers's Avatar
 
Join Date: Jan 2007
Location: Perth
Posts: 613
Default

Quote:
Originally Posted by GumbyNoTalent View Post
Personally, if your going to use *nix and want to learn some programing I would start with Perl, then C and Java last. Also since your using Ubuntu, Python would be a good language to learn if you want to use GTK+, as a quick knock up language.
I think perl would be a Bad Idea to learn first. Not because it's a bad programming language (it's not), but because there is a lot of bad perl code out there. Even a lot of perl guides out there basically encourage you to hack stuff together in a "just get it to work, she'll be right mate" sort of way. Bad!! Start with at least basic structure and don't do hacky stuff until you know why it's a bad idea :P

Anyway, it sounds like the OP is going to be using c + java because that's what uni will require. </attempt to underail thread>
__________________
CCCP
checkers is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

Posting 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

Forum Jump


All times are GMT +10. The time now is 9:41 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. -
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Internode!