PDA

View Full Version : What Programming language ?



PingunZ
July 15th, 2006, 08:13 PM
I'd like to learn programming
a have a LITTLE bit of php and html experience
but I'd like to create my own software / games / OS :)
It may be realy hard but I'd like to start programming now I'm still young ( 14 :p )
please also post some guides ;) and your experiences ...

Grtz PingunZ

Icon41
July 15th, 2006, 08:18 PM
When I was 14, I was just like you, my dad had an old SAMS TEACH YOURSELF C++ in 21 days book, I didnt go through the whole book but I learned the basics, and was able to make DOS programs that can solve math problems and such, right now I am 15 and when I have free time I use the book to learn. just pick up a book its the easiest way.

zxcvbnm
July 15th, 2006, 08:20 PM
IF you are just starting programming. I would start with perl..It isn't as structured as C++ which means it isn't as strict with the syntax......

And BTW I am 14 too :D

christhemonkey
July 15th, 2006, 08:28 PM
I started with python its very good for learning syntax, structure and the like.

You can then go into pygtk and pygame for graphical frontends and game making.

I am 17 if that helps... :D

I used this tutorial to get into python:
http://honors.montana.edu/~jjc/easytut/easytut/

And then moved onto this one for pygtk:
http://www.pygtk.org/pygtk2tutorial/index.html

You should use some others as well though.
The best way to learn is just to do it though!

blitzd
July 15th, 2006, 08:30 PM
I'd like to learn programming
a have a LITTLE bit of php and html experience
but I'd like to create my own software / games / OS :)
It may be realy hard but I'd like to start programming now I'm still young ( 14 :p )
please also post some guides ;) and your experiences ...

Grtz PingunZ

I would suggest C#, just because I have found it easy to learn myself and there are lots of great tools available for it (Mono for Linux/VS.NET for Windows), and plenty of information available on the net.

Different languages are more suited to certain programming situations though - you're not likely to find an OS written in C#, and probably very few games that use it. Once you get a firm grasp on the theory though it's not difficult to pick up other languages that may be better suited to your projects.

Edit: There are some good beginner articles for Mono/C# here: http://www.codeproject.com/cpnet/

Icon41
July 15th, 2006, 08:32 PM
Nah C++ would be perfect, seeing most game makers practice this language in making their games, its a little tough but once you learn and get into it theres no stopping, you understand it alot easier, and it all makes sense.

avtolle
July 15th, 2006, 08:43 PM
From an oldie (age 56); learn C++.

PingunZ
July 15th, 2006, 08:45 PM
So for normal apps python or perl
cpp for games
and C# for normal apps too ?

Wich is easy to learn and wich is really complete
btw :: in what language is Ubuntu written ( C ? )

Grtz PingunZ

christhemonkey
July 15th, 2006, 08:47 PM
Ubuntu devs apparently favour python.
Although i dont know whether that is true, but i have heard it said.

I found python really easy.
C++ and C both just seemed to be really bitty and not at all what i wanted to get from programming.

digby
July 15th, 2006, 08:51 PM
Python is a good starting point - it won't be too long before you can do small, but useful things with it, and it's easy to read someone else's code and understand it.

The python links above are a good intro to the language. It's what I started w/ and what I would recommend.

Somenoob
July 15th, 2006, 08:55 PM
I just suggest Python, it's a very powerfull and easy to use language, and one of the most common languages today.

Start learning at the Python Documentation page (http://www.python.org/doc/)

blitzd
July 15th, 2006, 09:06 PM
So for normal apps python or perl
cpp for games
and C# for normal apps too ?

Wich is easy to learn and wich is really complete
btw :: in what language is Ubuntu written ( C ? )

Grtz PingunZ

You could use any of those languages for any of those purposes if you really wanted to. I've seen games/apps done in Python/Perl/C#/Ruby/Java. But lots of commercial games and applications are done in C/C++ because they're both older more established languages. I personally found C/C++ difficult to learn and not really well suited to my needs (fast development with rapidly changing requirements), but that doesn't mean you won't like them.

The Linux kernel is mostly C AFAIK. Apps/Games that come with Ubuntu will largely be a mix of C/C++, but there is lots of perl/python involved too - they're both great for scripting, but can do plenty more as well. SLED (SUSE Linux Enterprise Desktop) seems to be doing a lot of their newer apps in C# (Novell also puts out Mono though).

You could always just try a few different languages and see which you pick up on the fastest and like the most though - it's not as if you'll be stuck with that choice for life or anything. Any of the professional programmers I know use multiple languages at various times, they just use whatever the best tool is for the job at hand.

PingunZ
July 15th, 2006, 09:25 PM
Ok I'll learn python
What exactly are the differences ( I'm new to this ... )

Grtz PingunZ

jordilin
July 15th, 2006, 10:20 PM
The latest trend in Linux programming is C Sharp and the Mono platform. If you mates are using Gnome, take into account that the top Gnome guys (those who invented it) have bet for this language and the most modern apps in Gnome like F-Spot, Tomboy, Muine, Banshee, Beagle to name a few are made using the Mono platform. As many said, python is a very easy to learn and powerful language and an excellent way to begin programming. For a 14 year old guy I would recommend python. C Sharp would be, in my opinion, quite hard to begin with.

blitzd
July 15th, 2006, 10:26 PM
Ok I'll learn python
What exactly are the differences ( I'm new to this ... )

Grtz PingunZ

Then it's decided! :D

I wouldn't worry too much about the differences for the time being - there are a few articles here though:

http://wiki.python.org/moin/LanguageComparisons

Lord Illidan
July 15th, 2006, 10:48 PM
C++ and C are the best for 3D games and stuff, as they allow more low level access... The same game in python would be much, much, much slower, believe me.

MarkSheely
July 16th, 2006, 12:57 AM
It sounds like you are very self-motivated, and that is an important personality trait to have as a beginner. I can't wait to see what you do later in life!

Also, don't be put off by how hard a language is supposed to be - I've seen 14 year olds do things on a regular basis that put some of my peers to shame.

FWIW, I started by learning Java.

--Mark

testube_babies
July 16th, 2006, 03:17 AM
I, too, started with Java. I'd recommend starting with Python or Perl, though.

wildseven
July 16th, 2006, 03:52 AM
I started with python when i was 14. I didnt really understand much, but i got the basics down. It was hard learning on my own. In high school i took Java and VB. Now in college I take Advanced Java and VB.net. Java is fun, i really like it. VB.net wont work on linux but it was fun to make fast ez programs to get minor things done. I will taking c++ next semester and I look forward to it.

As for guides...
I think if you do java, many books can help and/or the internet. If you need help, you can go to
www.programmersheaven.com/forums They are nice and friendly.

Hope that helps.

Oler1s
July 16th, 2006, 05:15 AM
You'll get lots of different responses with this question.

C# (or Mono on linux) is an excellent language. It doesn't make you break your head over mundane tasks (like strings and memory allocation), but gives you a lot of power with the language. It's not necessarily slower because of JIT compilation. It has features not available in C++ or Java.

C++ is also a solid language. It's very powerful, but the power is also a liability. You'll have to deal with everything, from properly managing memory to working with strings.

Java is popular as an enterprise language. I feel C# is better though. I say this with limited experience in Java though.

Python: I think you should start with C++ and C#. That said, Python may be worth learning eventually, as a second or third language.

wildseven
July 16th, 2006, 06:42 AM
i was under the impression C# was c sharp? correct me if i am wrong.

3rdalbum
July 16th, 2006, 07:24 AM
Yes, C# is C Sharp.

If you just want to write programs to get things done, Python is definately your best bet. You can write Python programs that can run on Windows and Mac, too. Python is a REALLY nice language, much nicer than PHP. I hear good things about Ruby too, but I think it's probably not a language for newbies.

You'll see Python a lot in Ubuntu. GDebi is written in Python. Exaile, Quod Libet, and iPodder are Python-based too. The original Bittorrent client was written in Python.

C# fulfills roughly the same functions as Java and Python, but it's more difficult than Python. It's about the same speed as Java, and faster than Python.

All I know about Java is that you sometimes have to go down a convoluted path to do certain things which are easy in Python. For instance, in Python, opening and writing a file might be two lines with one object created. In Java, it's something like seven lines with four objects created. I could never get the thing to reliably write to a file!

(One of the things I love about Python is how you can take an example of code to read a local file, and change one tiny bit of it to get it to read local files OR remote files over HTTP. Python's support for keyword arguments makes it great for writing GUIs)

C and C++ are very "low-level" languages. They run fast, are most flexible (you can write anything in them), but take a long time to develop in, a long time to learn, and programs cannot be ported to another operating system without a LOT of rewriting. Gnome is written in C and KDE is written in C++. Most action games are written in C or C++... some of them even have parts written in Assembler, which is just one step removed from the processor itself.

crystal
July 16th, 2006, 07:29 AM
I think Python is a good starting language. After you have picked up basic programming skills with Python, C++ would be good. At that point, I would recommend Accelerated C++: Practical Programming by Example (http://acceleratedcpp.com) by Andrew Koenig and Barbara E. Moo as the book to read.

Skia_42
July 16th, 2006, 07:30 AM
I have been learning Python and it is great, it's my first programming and I find it quite intuitive. I have been learning from a well written book that can be found for free here (http://www.greenteapress.com/thinkpython/thinkCSpy.pdf).

Ben Sprinkle
July 16th, 2006, 07:32 AM
ooo python is really easy im 15 doin heavy java coding

PingunZ
July 16th, 2006, 09:23 AM
I'm now learning python and after that I'm gonna learn C++ or something with C :p
python is realy easy, the variables are easy to use and I realy like it
after python I'll lear pygtk and then the big work starts ( C++ ) :p

I'm making programs in python of what I learned in math at school and its fun !

Grtz PingunZ

jordilin
July 16th, 2006, 10:29 AM
I would forget C++ and take C#. If you learn C++ you'll have to deal with pointers which in my experience have been always a nightmare.

crystal
July 16th, 2006, 01:08 PM
I would forget C++ and take C#. If you learn C++ you'll have to deal with pointers which in my experience have been always a nightmare.
C# is a proprietary language. Anyway, pointers are often an optional nightmare in modern C++, which is what my recommended book "Accelerated C++" teaches.

jordilin
July 16th, 2006, 02:29 PM
C# is a proprietary language. Anyway, pointers are often an optional nightmare in modern C++, which is what my recommended book "Accelerated C++" teaches.

Well, it was invented by Microsoft but now is an ecma international standard and heavily used in the upcoming Gnomeapps. If Miguel de Icaza(one of the top opensource leaders in the world and the one who invented Gnome) and Gnome guys are using it, it must be for something. If it were propietary I'm not sure if the Gnome community would be using it.

wildseven
July 16th, 2006, 03:46 PM
programs compiled on linux, can they be used in windows?

ProjectGod
July 16th, 2006, 03:50 PM
holy moley! ya all gromits! i'm 22. :D . python sound like a pretty nice place to start.

jordilin
July 16th, 2006, 04:40 PM
programs compiled on linux, can they be used in windows?
Depending on the type of language and its purpose. C and C++ as they are compiled languages they will not be able to run in win. Interpreted languages such as Java, Python, C# can run on Win depending on its purpose.

PingunZ
July 17th, 2006, 11:24 AM
Just a real simple Python question ::
whats wrong with
d = (b**2)*(4*a*c)
a, b, c and d are variables

Grtz PingunZ

PingunZ
July 17th, 2006, 12:12 PM
Nobody ? I realy need this :p

Grtz PingunZ

MrHorus
July 17th, 2006, 12:26 PM
C and C++ are very "low-level" languages. They run fast, are most flexible (you can write anything in them), but take a long time to develop in, a long time to learn, and programs cannot be ported to another operating system without a LOT of rewriting.

That's not true at all.

C and C++ are portable by design and if you write standards-compliant code that is platform independant then it will compile on any platform that has a C compiler without any rewriting whatsoever.

If you use platform specific libraries and extensions then of course it won't work without any rewriting but that is the same with every language on the face of the earth :)

PingunZ
July 17th, 2006, 12:30 PM
C and C++ are high level languages

But what's wrong with the line I posted above

Grtz PingunZ

MrHorus
July 17th, 2006, 12:43 PM
Maybe b*2 should only have one asterisk, not two?

Just a guess - i'm not a Python programmer.

ProjectGod
July 17th, 2006, 12:48 PM
perhaps you need a "^" not "**" ?? i'm just starting python.

PingunZ
July 17th, 2006, 12:50 PM
What its supposed to become is this :: bē * 4ac
double asterix is exponential

Grtz PingunZ

Sonic Alpha
July 17th, 2006, 12:57 PM
What its supposed to become is this :: bē

I don't know anything about Python, but try (b*b) for the first part :)

crystal
July 17th, 2006, 01:18 PM
Well, it was invented by Microsoft but now is an ecma international standard and heavily used in the upcoming Gnomeapps. If Miguel de Icaza(one of the top opensource leaders in the world and the one who invented Gnome) and Gnome guys are using it, it must be for something. If it were propietary I'm not sure if the Gnome community would be using it.
Okay, I agree that with Mono out such objections do not really hold water anymore. I still am suspicious of languages with such origins though.


But what's wrong with the line I posted above
How does it not work? As far as I can tell, it should work, unless you got the formula wrong (e.g. b**2 - 4ac instead). Anyway, Sonic Alpha has a good point: better to multiply instead of use exponentiation in this case.

ProjectGod
July 17th, 2006, 01:51 PM
hiya won't bother creating a new thread... sooooo

in windows python has the IDLE utility too... does ubuntu have this counterpart? i see the python command line but not the IDLE.

cheers.

tseliot
July 17th, 2006, 01:53 PM
I have moved the thread to the Programming Talk section

Ragazzo
July 17th, 2006, 02:37 PM
Just a real simple Python question ::
whats wrong with
d = (b**2)*(4*a*c)
a, b, c and d are variables

Grtz PingunZ

Works for me. Have you defined the variables?

Drakx
July 17th, 2006, 03:01 PM
hiya won't bother creating a new thread... sooooo

in windows python has the IDLE utility too... does ubuntu have this counterpart? i see the python command line but not the IDLE.

cheers.

Yes

sudo apt-get install idle-python2.4

asimon
July 17th, 2006, 03:19 PM
If Miguel de Icaza(one of the top opensource leaders in the world and the one who invented Gnome) and Gnome guys are using it, it must be for something.
On the other hand there is no shortage on Gnome developers who don't use it or who are even against it's usage in Gnome.

You must have missed all the discussions and flamewars in the various Gnome developers blogs and mailing list. ;-)

AFAIK so far there are no C# libs that are part of the Gnome platform or C# apps that are part of the official Gnome desktop.

PingunZ
July 17th, 2006, 03:29 PM
here's my script ::

a = raw_input(" a: ")
b = raw_input(" b: ")
c = raw_input(" c: ")
d = (b*b)*(4*a*c)
print d


and here's the output

kristof@Dapper:~/Desktop$ python discriminant.py
a: 14
b: -9
c: 14
Traceback (most recent call last):
File "discriminant.py", line 4, in ?
d = (b*b)*(4*a*c)
TypeError: can't multiply sequence by non-int
kristof@Dapper:~/Desktop$


Plz Help
Grtz PingunZ

mostwanted
July 17th, 2006, 04:02 PM
here's my script ::

a = raw_input(" a: ")
b = raw_input(" b: ")
c = raw_input(" c: ")
d = (b*b)*(4*a*c)
print d


and here's the output

kristof@Dapper:~/Desktop$ python discriminant.py
a: 14
b: -9
c: 14
Traceback (most recent call last):
File "discriminant.py", line 4, in ?
d = (b*b)*(4*a*c)
TypeError: can't multiply sequence by non-int
kristof@Dapper:~/Desktop$


Plz Help
Grtz PingunZ

a, b and c are all strings (a is not = 14 but "14" etc.) as far as I can see.

christhemonkey
July 17th, 2006, 04:04 PM
You need to change the raw_input() to just input(), that way it will use integers/floats(?) instead of strings.

PingunZ
July 17th, 2006, 04:18 PM
Ty :KS
and how do we write the V ?
I don't know its name in english so I'll explain it ;)
b = V( bē )

what's the python sign for V ?

Grtz PingunZ

Ragazzo
July 17th, 2006, 07:49 PM
Ty :KS
and how do we write the V ?
I don't know its name in english so I'll explain it ;)
b = V( bē )

what's the python sign for V ?

Grtz PingunZ

Square root? You can use x**0.5 as long as x is not negative. Or you can first import math module and then use its sqrt() function:

import math
math.sqrt(x)

wildseven
July 17th, 2006, 09:09 PM
yeh thats what i was thinking.

Christmas
August 11th, 2006, 08:40 PM
When I was 14, I was just like you
Pretty nice, when I was 14 I didn't even know what a programming language was :)

Maniek
August 16th, 2006, 11:57 AM
Hi there

I am also 14 and I would recommend Java. Now I'm learning it to and after one week I can already make simple games like pong and little Applets. Java is also good for stand-alone applications.

Why Java? :confused:
-Easy to learn
-Very powerfull
-OO language (Object Oriented)
-Less code
-A lot of libraries(extra support)
-Can run on every OS(cause everything will be calculated to bit)
-Can be applied to the internet
-Best support of the makers SunMicrosystems and communities:
a lot of codes.
and online help.
-After you have learned Java you know most basics for other programming languages

Take a book, that is easier to learn from(a good book).

Best of luck Maniek.:D

LordHunter317
August 16th, 2006, 02:15 PM
-Can run on every OS(cause everything will be calculated to bit)Actually hte number of platforms Java runs on is pretty pitifully small.

[h2o]
August 16th, 2006, 05:29 PM
Actually hte number of platforms Java runs on is pretty pitifully small.
Absolutely. It does, however, run pretty well on all major platforms. :)

anindya_m
August 16th, 2006, 08:44 PM
I think you can start with C. This is useful as the C syntax is used by many programming languages, and it helps to know C thoroughly. Then you can start learning C++ and Java (both being OOP). On the side you can practice a bit on the scripting languages like perl, python, javascript, which are very useful for web stuff. It may be useful to try some small projects so you'll get a feel of which language suits what application. This is only MHO which I found useful.

Anindya

Jessehk
August 16th, 2006, 09:30 PM
I started when I was just a bit older then you (I think I had just turned 15). I currently enjoy programming as a hobby.

I started learning on C, and later C++. That initial challenge has made learning similar languages (like C#) much easier. Despite the success I had with those two languages, I sometimes feel that the realization of the solution to the problem you are trying to solve by programming in C and C++ is burdened by the limitations of the language. (I love using "big" words. Did that make sense? :p)

To someone starting out, I would recommend either C# (with mono on Linux) or Python. I enjoy C and C++, but the amount of time learning rules and exceptions (to rules, not the language features) required in order to get things done is really not worth it. I would avoid C and C++ unless you want a challenge, or need it to write something low level.

Josh_b
August 17th, 2006, 09:24 AM
I started out with QBasic on a 386 when I was 12 (bout 6 yrs ago, and no-one laugh at me only having a 386 then. It was FREE). I found Basic useful for understanding how to program and caught on real quick.
(The best program I ever wrote in QBasic was a reformat clone, ran it whilst my mum was having a party with her tech buddies and went and complained bout my computer. She and a buddy went to go fix it (they were drunk, hehe), said 'no' to reformatting, and it responded with 'too bad'. They freaked out, whilst I was on the floor in stitches.:D )
I've been doing a fair bit of VB and just started JavaScript this year, and plan to start teaching myself C++ and Java, so that when I go to uni, I look really smart.:-$ .

I heard somewhere that C# (I used to say C Hash:( )is pretty much a combination of C++ and VB. Is that correct?

Warbo
August 18th, 2006, 05:49 AM
C# basically evolved from C++ and Java. You can think of it like:
_________Java
________/
C -> C++
________\
_________C#
(underscores are for formatting reasons, don't pay attention to them)
Although C# was developed after Java, so it does build upon it somewhat.

I tried getting into Python a while ago but didn't really have a useful project to get started on. I later tried C#, but found it a little too complicated for (what I think of as) basic stuff, so I went back to Python.

After getting through the basic concepts (lists, dictionaries, functions, etc.) I thought I'd start something relatively complex. In 2 days I managed to make the logic engine for a game, and controlled it with a GTK GUI. The only problem I am having now is changing the GUI elements to reflect the output of the game engine.

The reason I prefer Python to C# is that in Python there is very little "overhead", basically meaning that I can concentrate on what I want the program to do, rather than the syntax I use to tell it. If there is something wrong in my logic then I am really interested in fixing it, but if there is something wrong in the way I have tried to access something (for example) then I get annoyed since that is not the point of the program.

My extra pieces of advice are: Read DiveIntoPython (although maybe not in order) http://diveintopython.org and always keep a web browser containing a blank page for Google searches and a few reference sites for the current thing you are working on (like PyGTK, GTK and Pango for instance) on an adjacent workspace (and maybe use edge-flipping. I use E16 but this can be done with brightside in GNOME)

PS: In case you're interested, I'm 18 :)
PPS: If you like VB then Gambas might interest you, but it wouldn't be wise to start out on such a path, since many concepts of BASIC-like languages must be unlearnt when using more powerful languages

macogw
August 19th, 2006, 03:56 AM
I think Java's good for Object Oriented beginners. It's really not hard to learn, and it'll get you used to separating into methods (IMPORTANT--big blocks of code are a pain in the rear) and using multiple classes.

MyBigToe
August 19th, 2006, 05:42 PM
What would be a good language for programs with a gui?

X.Cyclop
August 20th, 2006, 03:57 AM
I'd like to learn programming
a have a LITTLE bit of php and html experience
but I'd like to create my own software / games / OS :)
It may be realy hard but I'd like to start programming now I'm still young ( 14 :p )
please also post some guides ;) and your experiences ...

Grtz PingunZ
I got started when i was 13 years old(now, i'm 15 years old).:mrgreen:

1st: What do you want to do?

Web apps?
Desk apps?
..........

2nd:
- Web apps: You may learn HTML, CSS, PHP and AJAX.
- Desk apps: Could be C/C++, C#, Python or Java.

3rd: You decide.

;)

Warbo
August 20th, 2006, 10:34 AM
For programming GUIs I would recommend Python and Glade. This combination has worked well for me, even with my very limited programming knowledge.
Actually, I don't use Glade to build my .glade files, I use Gazpacho, but the Python implementation is the same.

I have found a really cool Python script which makes GUI creation with Glade/Gazpacho REALLY easy, since it automates most of the implementation. It generates a GTK Python script which runs straight away, but all of the buttons and stuff it displays do nothing. However, the scripts contain blank functions for every handler that is in your .glade file, letting you concentrate on the core engine of the program, and then just attach your own logic to the handlers. It is called GladeGen, this is the article I found it in http://www.linuxjournal.com/article/7421 and here is the archive of it (which also contains an example called MathFlash) ftp://ftp.ssc.com/pub/lj/listings/issue123/7421.tgz

The only thing which takes a little effort is updating the GUI based on the code run (for example, I am making a game with it, but can't update the button's content after each move. I am pretty sure that is only because GladeGen has helped me produce a program which is way beyond my abilities to currently understand)

bonefry
August 20th, 2006, 11:45 AM
I recommend C++ or C# for desktop programming.
Python is good for beginners, but I don't like Python for desktop applications.

Also, for programming desktop applications, strong knowledge of C is required sooner or later, because there numerous APIs written in C, and you cannot always rely on the quality of the bindings of you favorite language (although Python has superb bindings for almost everything).