You are not logged in.

#1 2004-07-14 13:05:22

_will
Member
Registered: 2004-07-08
Posts: 123

"programing"

i hate when this question is asked, but what are we if not what we hate

its summer and i am free to never sleep and be bored. so along with augmenting my currently pitiful linux skill (a quest which will likely be aided by this magnificent distro) i want to pick up some good programming knowledge

i know just enough perl to make a nice guestbook and/or a horrible forum ... but perl's the only thing i have a basic knowledge of (basic in that i don't know a lot, not in that i have a fundamental understanding by any means --i get lost at push shift and pointers  there important maybe)

i feel terribly guilty downloading all this software and bugging people on message boards, and then not being able to or qualified to give anything back

so, to anyone still reading this (sorry for my long winded-ness and overuse/abuse of parentheses) 
with intention of taking it all on full force, (1)what language should i pick up, (2)what libraries are necessary to be familiar with and most importantly (3)can anyone point me to a good all-encompassing tutorial

making it a longwinded request kinda disperses the ugly question
sorry in advance
and thanks for laboring through all that
-will

Offline

#2 2004-07-14 13:48:43

sweiss
Member
Registered: 2004-02-16
Posts: 635

Re: "programing"

There you have a well-built Python course:
http://cmbipc58.cmbi.kun.nl/pythoncours … &flag=chap

And of course you can learn BASH, which will be very useful in the linux world: http://www.tldp.org/LDP/abs/html/

Note that I have yet to review the BASH guide but a lot of people recommend it.

Offline

#3 2004-07-14 14:59:01

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: "programing"

_will wrote:

(sorry for my long winded-ness and overuse/abuse of parentheses)

Parenthetical statements are common to programmers, you've won half the battle. smile

I'd also suggest Python for stepping into it (www.python.org).  If you want to work on the majority of Linux programs, you'll have to learn C, but it's not much fun to program in.

Java is good (:P @ Sarah31) for cross platform stuff and for bridging the gap between Python and C++, maybe.

Once you learn one language, the next one is easier; They mostly have a lot in common.

Pick a language at random, pick a project, and figure out how to implement that project in that language. Then pick another language and try the same project again, see which one feels best. People have different preferences.

Dusty

Offline

#4 2004-07-14 15:33:57

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: "programing"

_will wrote:

.... not being able to or qualified to give anything back

This feeling of wanting "<b>to give a little something back to the free software community, since getting so much for free</b>" how Arch Linux got started by apeiro.... welcome to Arch!!

When I look at my few contributions, hwd and al-amlug live CD, to be honest before starting I didn't know much about programming. When the mind is set to "give a little something back" its easy to learn. To study programming just for the sake of it is not inspiring in a long run. But learning by working on a specific project is a real motivating factor. I suggest you first decide what you want to contribute then do the study what the project requires. In my case I had to study BASH.

Offline

#5 2004-07-14 22:17:51

_will
Member
Registered: 2004-07-08
Posts: 123

Re: "programing"

thanks for the positive feedback -- now i've just gotta find the pool to jump in
the python link seems like warm water
thanks again
-will

Offline

#6 2004-07-14 22:22:06

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: "programing"

it is really going to depend on what you want to do. scriptable languages such as BASH and PHP are handy. java is a good cross platform (though i rather dislike it). perl is common but messy. C is very common in open source and so is c++. there are limitations to all of them and what you want to do will help define what you use.


AKA uknowme

I am not your friend

Offline

#7 2004-07-15 00:50:06

bleak
Member
Registered: 2004-05-11
Posts: 24

Re: "programing"

I also recomend Python. It is easy and yet powerfull but after that i think you should get into C. Because of C's memory management and pointers stuff you get a very good knowledge of how programs really work. It will make you a better programmer and also avoid some mistakes in other languages.

Offline

#8 2004-07-15 03:17:05

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: "programing"

Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!
Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!! Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!
Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!Python!!!

I love Python.  I like C too, but only because Python's currently implemented through a C interpreter.  You don't really need to know memory management  inless you're really interested.  Unless you have a real talent for it, it's sometimes best to get into Python and write really great apps that you probably would've been too sick to do after all the tedious low-level code that you get stuck with in C.  Perl's just a messy scripting language and Java's just slow, (but otherwise great!).  Of course, you could always implement Python in Assembly!  That's a hell of project though, but it would solve one of my biggest issues right now...

EDITED: by Xentac because he didn't like how it extended the page.


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#9 2004-07-15 06:15:00

jochen
Member
From: Germany
Registered: 2004-06-01
Posts: 102

Re: "programing"

Offline

#10 2004-07-15 11:21:39

scottro
Member
From: NYC
Registered: 2002-10-11
Posts: 452
Website

Re: "programing"

Personally I found the two bash guides at the Linux Documentation Project rather poor for a beginner.  (I note the person who posted it mentioned that he hadn't looked at it)

I have a page with some links to a few guides that I found helpful.

http://home.nyc.rr.com/computertaijutsu … pting.html

I have that guide listed, but further down the page, as I don't think it's a good first step.

Offline

#11 2004-07-16 09:51:53

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: "programing"

I'd also recommend python smile

It made me make the switch from windows to linux because I was too lazy to set it up under windows big_smile

PHP (+sql) is also very useful, for developing more internet based stuff

they're both very fun to program in because you get good results very quicly, even if you're not used to programming or to the language, c/c++ is a bit more frustrating imho, and it's often not worth the (program) speed gain and leads to a lot more bugs (not only becuase you write 10x more lines of code, but also because of memory management, pointers,..)

I find myself being able to do almost anything I want in php or python

java also has its advantages, but it takes more time to create a program with it

however as people already said: most *nix programs are written in c(++), so if you want to submit patches etc, you'd have to study this language.

no matter what language you want to learn, there are a few paths to take, or some combination
1) learn the language from tutorials found on the web
2) learn it from a book
3) learn it by reading the manual of the language
3) study other programs and start modifying them, playing with them
4) start building your own program and learn the stuff you need step by step

I usually start by reading some tutorials, then I buy a book and I start building some apps to gain experience in this language and while making these apps, I look up a lot in the manual

to create patches or to add features to existing programs, you often have to be very good at the language, to understand what the developers were doing (especially when it's poorly documented or if their coding style sucks wink) but this might also help you to understand more and more about the language

Offline

#12 2004-07-16 12:42:40

RedShift
Member
From: Belgium
Registered: 2004-07-16
Posts: 230

Re: "programing"

I would recommend you C, because it's very flexible, and runs practically everywhere. Once you know C, it's very easy to learn other languages like perl and php.

All you need to have to learn C is a good book. I'm learning from "The C programming language second edition" from Brian Kernighan and Dennis M. Ritchie.

Translated (I have the dutch edition) from the back:
"The C programming language is not only THE official work about C: this book has been the first official definition of the language C. Because the second edition of this book is based on the ANSI-C standard, this book will undoubtly remain the standard.

Dennis Ritchie works at Bell labs from AT&T; he is seen as the mind behind the language of C. Brian Kernighan is (co)author of multiple programmingbooks for intermediates."


:?

Offline

#13 2004-07-17 18:38:29

tmadhavan
Member
From: Wales :D
Registered: 2004-03-26
Posts: 441

Re: "programing"

Wow, I've just been spending my gap year trying to learn java, as that's what's used in the course I'm going to be doing.

I've done a little C++ before, so most of java is familiar. But things like not being able to easily get keyboard input without all this BufferedReader bumf are annoying when you want to do something pretty simple (which is all I can do atm!).

So, after reading the post, I thought I'd take a look at Python. Obviously I've heard of it before, but never even looked at it. Just having a play now, and it's great! I realise the point of it is to be easily scriptable (I think?) to make little jobs simpler. How does Python work with more complicated apps? The BitTorrent client is Python, right?

I guess it's not OO - how useful is Python for writing apps of the sort of complexity I might do for a first year CS course? Simple networking, file I/O etc?

Just some basic info would be much appreciated.

T

Offline

#14 2004-07-17 18:41:49

tmadhavan
Member
From: Wales :D
Registered: 2004-03-26
Posts: 441

Re: "programing"

Scrap that bit about OO - I just bothered to go to python.org and have a gander. Still appreciate the input from anyone tho.

Offline

#15 2004-07-17 19:05:20

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: "programing"

complex apps, when written in Python, aren't complex.

About the silly cascading used in Java IO, you can always write a convenience method that returns a properly formatted Reader. wink

Dusty

Offline

#16 2004-07-18 07:30:23

tmadhavan
Member
From: Wales :D
Registered: 2004-03-26
Posts: 441

Re: "programing"

Wow, spent half the evening playing about with Python, reading etc.

I'm surprised this language isn't recommended to more newbie programmers. It seems pretty straightforward, it's very high level, easy to get the hang of. Is there a catch somewhere? I guess there are limitations somewhere - what is it like in terms of speed? Not that I'll be too bothered about that with my progs that print numbers, heh.

Think I'm going to suspend Java for a while, and give Python a crack for a while, so far I'm getting much more return for my investment (which is around 3hours worth!).

T.

Offline

#17 2004-07-18 08:05:37

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: "programing"

tmadhavan: well at my university they also teach java, at first I didn't understand why since it was obviously inferior to python, but during the year I've come to realize why smile

the python OOP is very, very basic, and they focus a lot on OOP here so that's why java should be the language of choice

python has classes and can inherent from other classes, but that's about as far as it goes...
the private variables/functions are fake, protected variables are not-existing, I've never heard of abstract classes etc

the php guys finally fixed their lacking OOP abilities with php5, so I'm hoping python will follow once :?

what I also like about java is that you can have functions with the same name, only the parameters are different

but if your design is any good, this isn't much of a problem for python

another catch is that it's slower than java - once the program is running at least (loading the jvm takes ages) but if your program doesn't need to perform huge ammounts of calculations or something, python is just fine smile

always pick the highest language possible for your program: it'll be more fun, it'll be finished a lot faster, it'll be more secure, it'll be more os independant,.....

Offline

#18 2004-07-19 08:54:46

tmadhavan
Member
From: Wales :D
Registered: 2004-03-26
Posts: 441

Re: "programing"

Where are you studying?

Could you give me an example of where Java would be superior? I kind of see what you mean about private variables etc , I've read up a little bit on Java. I guess Java apps are more secure?

Can Python be used for, say, writing a simple FTP program or something? I'm happy just having a crack with Python for now, seeing as I'm getting a bit more for my buck at the moment. It's good to see something coming out of my efforts. Guess I'll move on to Java later on at some point, when I'm forced!

Eventually I hope to do 3D animation, the physics side of it, so I guess I'll have to get into C/C++ at some point as well. Not worrying about that just yet though big_smile

T

Offline

#19 2004-07-19 10:52:52

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: "programing"

I'm studying at the KUL: the university of Leuven (in Belgium)

java is superior (to python) in for example 3D stuff, and about any other program where you have a huge ammount of calculations

I wouldn't say a java app is more secure (than c/c++), an assembly program could be more secure than a java or python app, it all depends on the programmer... it's easier to write secure apps in java or python than in c/c++ though, because you don't have to care about memory, pointers, buffer overflows,... and you have less lines of code -> there are people that claim there is one bug in each page of code, so if you have less pages of code, your program is more likely to contain less (security) bugs wink

python is perfect for an ftp program, this is the sort of program where c/c++ is really overkill imho - ftp programs are often used as examples in books about python I think

if you want to do 3d animation, depending on what you are doing, java could even be very useful - there are some very popular 3D rpg's written in java, and the computer science department at this university uses it to create raytracers etc

but once you know how to program, learning a new language shouldn't take long, if you know how to write 3d stuff in java, you can do it in c/c++ as well with little extra work smile

Offline

#20 2004-07-19 17:12:20

tmadhavan
Member
From: Wales :D
Registered: 2004-03-26
Posts: 441

Re: "programing"

Cheers big_smile

Do you know any examples of RPGs (or any 3D game, etc) that are written in Java? A student at the open day in the uni I'm going to showed us a 3D graphics engine he'd done for his final year, I guess that was written in Java.

I'm trying to find some good Python books atm, I'm going to play about with it for a bit. Thanks for the info,

T

Offline

#21 2004-07-19 18:07:18

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: "programing"

well I'm not into RPG's myself, but according to my brother, runescape is a very popular one: http://www.runescape.com/

the engine is not what you're used to with regular games though wink

Offline

#22 2004-07-19 20:07:19

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: "programing"

Java 3D rocks... but I wouldn't say that "Java is better than Python because it supports 3D programming". Python *can* support 3D programming. Nobody's written a decent API for it yet. wink

I originally thought Python was stupid because it didn't do data hiding (private variables and such), and being dynamically typed. But the truth is, you don't need all that stuff for a good language.

I imagine almost any application written in python will be shorter than one written in Java.  Shorter is simpler and easier to read... usually. I've seen some pretty short PERL programs that are bloody impossible to read. :-D

I personally prefer Java swing over the several Python UIs, but that's totally personal preference.

One other thing, with the new generics and for each loops available in Java 5, Java code can be a lot nicer than it used to be. If they open the source, I may continue with Java instead of switching primarily to Python...

Currently, Java is *much more likely* to get you a good job. However, this sort of thing changes all the time... if Sun makes a stupid move, MS C# will be better for landing a job, if MS makes a stupid move, Python might finally get the attention it deserves. Given Sun and MS's track record of stupid moves, I'd say Python has a good chance. :-D

Dusty

Offline

Board footer

Powered by FluxBB