Starting programming
- Lifer
- Posts: 1066
- Joined: 2008.09.26 (18:37)
- NUMA Profile: http://nmaps.net/user/EdoI
- MBTI Type: INTJ
- Location: Zenica, Bosnia and Herzegovina
- Retrofuturist
- Posts: 3131
- Joined: 2008.09.19 (06:55)
- MBTI Type: ENTP
- Location: California, USA
- Contact:
So yeah, I highly, highly recommend Python for a beginner.
If you want a tradeoff with something better suited for heavily resource-intensive tasks (if you're going into academic research or hardcore video game design, or if you are interested in low-level stuff like robotics or operating system design) but more of a pain in the ass to learn and use, go for Java or C++. The one you pick will in all likelihood come down to a style choice, although I personally would recommend C++ over Java.
If you're interested in a career in software design, .NET is the wave to ride, so you should very definitely go with something like C#.
My advice would be to go with Python, toy around enough to see where your interests lie, and then migrate to another language from there, if you insist on migrating at all.

- Lifer
- Posts: 1066
- Joined: 2008.09.26 (18:37)
- NUMA Profile: http://nmaps.net/user/EdoI
- MBTI Type: INTJ
- Location: Zenica, Bosnia and Herzegovina
What to download, Python 2.6 or 3.0.1? Does Python make executable files?Tsukatu wrote:My advice would be to go with Python, toy around enough to see where your interests lie, and then migrate to another language from there, if you insist on migrating at all.
Oh, and if I downloaded Python doesn't mean that it's definite, or that Python will be the only language that I'll (try to) learn, so continue suggesting.
- Retrofuturist
- Posts: 3131
- Joined: 2008.09.19 (06:55)
- MBTI Type: ENTP
- Location: California, USA
- Contact:
For learning purposes, it really doesn't matter. Both are very recently-updated production versions that will have support for a good long time. I'd go with 2.6, though, because if the need arises for you to use Python on a computer you don't own, it's likely they're not going to be bleeding edge on their Python install. Hell, most production machines still have Python 2.3, or 2.5 for newer machines.EdoI wrote:What to download, Python 2.6 or 3.0.1?
Also, there are some extremely useful and common add-ons that only have stable versions for 2.6.
I'm going to assume you're using Windows.
Have some direct download links for 2.6 (I don't know what kind of CPU you have):
Windows x86 MSI Installer (2.6.2)
Windows AMD64 MSI Installer (2.6.2)
Crash course on two categories of programming languages:EdoI wrote:Does Python make executable files?
- Compiled languages run your code through a compiler, which creates an executable file. The executable file is machine code specific to your processor. To run a program written in a compiled language on a different machine, you need to recompile the code on the new machine.
- Interpreted ("Scripted") languages are run by giving your code to an interpreter, which runs all of the code as though reading it like a movie script or to-do list. To run a program written in an interpreted language on a different machine, all you need to do is move the code you wrote, and that's it, assuming that the interpreter is installed on the new machine.
Python is an interpreted language. So no, you will only be making files that have source code as plaintext. If you're gung-ho about compiling your programs for some weird reason, there are ways to do this with Python.
When you install Python (in this example, in the default directory of C:\Python26\), you run programs by giving them to C:\Python26\python.exe on the Windows command prompt.
For example, here's your classic beginning program:
- open Notepad, or some other plaintext editor
- type this code:
Code: Select all
print "Hello, World!"
- save as C:\Python26\hello.py
- open the command prompt: either Start > Accessories > Command Prompt, or Start > Run > type "cmd" and press Enter
- cd C:\Python26
- python.exe hello.py
- do a dance
(Other interpreted languages like Ruby have line-by-line interpreters, too. I wouldn't recommend Ruby only because it's so new and retardedly slow for some resource-intensive tasks you may randomly find you need, and because it seems to me to be more of a proof-of-concept language than something generically useful. It is a breeze to use and learn, though, so I encourage you to have a brief affair with it.)
IPython: A particularly user-friendly interface to the line-by-line interpreter. Extremely useful in aiding you in writing your code, if you have it on the side as you're writing your code in a text editor. To install IPython, you need two installers (both of which install very smoothly; just hit Next a bunch of times and you're set): ipython-0.9.1.win32-setup.exe and pyreadline-1.5-win32-setup.exe. To run, do Start > IPython > IPython. Use it instead of Start > Python > Python (command line).
Numpy: The "Numerical Python" package. Has more functions for all flavors of math and levels of interaction with your operating system than you can fit into your brain. Probably the most commonly installed 3rd party Python package. Get it here: numpy-1.3.0-win32-superpack-python2.6.exe
Scipy: The "Scientific Python" package. Has generally useful functions for your science classes and/or post-graduate level academic research. Get it here: scipy-0.7.1rc2-win32-superpack-python2.6.exe

- Lifer
- Posts: 1099
- Joined: 2008.09.26 (21:35)
- NUMA Profile: http://nmaps.net/user/smartalco
- MBTI Type: INTJ

Tycho: "I don't know why people ever, ever try to stop nerds from doing things. It's really the most incredible waste of time."
Adam Savage: "I reject your reality and substitute my own!"
- Lifer
- Posts: 1066
- Joined: 2008.09.26 (18:37)
- NUMA Profile: http://nmaps.net/user/EdoI
- MBTI Type: INTJ
- Location: Zenica, Bosnia and Herzegovina
I've been playing around with code following a tutorial, here's what I've wrote:
Code: Select all
number = 23
guess = int(raw_input('Enter an integer : '))
if guess == number:
print 'Congratulations, you guessed it.'
print "(but you do not win any prizes!)"
elif guess < number:
print 'No, it is a little higher than that'
else:
print 'No, it is a little lower than that'
print 'Done'
Code: Select all
File "test.py", line 1
Python 2.6.2 <262:71605, Apr 14 2009, 22:40:02> [MSC v.1500 32 bit <Intel>]
on win32
^
SyntaxError: invalid syntax
P.S. that reminds me, it would be useful that text in a code box has "Select all" function.
- Damn You're Fine
- Posts: 384
- Joined: 2008.09.19 (01:47)
- NUMA Profile: http://nmaps.net/user/littleviking001
- MBTI Type: INTP
- Location: Southern California
- Contact:
I *believe* in Python 2.6 that print is a function. One of the most noticable changes between Python 2 and Python 3 was that print changed from print "my string here" to print("my string here"). And since 2.6 is meant as a stepping stone between the two, it might have print in the second form there.SyntaxError: invalid syntax

The last Metroid is in captivity. The galaxy is at peace...
- Lifer
- Posts: 1066
- Joined: 2008.09.26 (18:37)
- NUMA Profile: http://nmaps.net/user/EdoI
- MBTI Type: INTJ
- Location: Zenica, Bosnia and Herzegovina
Line 1 says "number = 23", no printing.LittleViking wrote:I *believe* in Python 2.6 that print is a function. One of the most noticable changes between Python 2 and Python 3 was that print changed from print "my string here" to print("my string here"). And since 2.6 is meant as a stepping stone between the two, it might have print in the second form there.SyntaxError: invalid syntax
- Retrofuturist
- Posts: 3131
- Joined: 2008.09.19 (06:55)
- MBTI Type: ENTP
- Location: California, USA
- Contact:
And it seems to be pointing to a completely blank line. o_O
The caret on the line all by itself usually points to the place in a line where the problem is.
For example, if you had left off the last quote on one of these lines:
Code: Select all
File "test.py", line 5
print 'Congratulations, you guessed it.
^
SyntaxError: EOL while scanning single-quoted string
Which editor are you using?

-
- Plus (Size) Member
- Posts: 42
- Joined: 2008.09.27 (02:56)
on win32" in the output is a little suspicious. Are there any other arguments in your command line, or are you just running "python test.py"?
[edit]Also, if you don't have any other command line arguments, is it possible that the aforementioned line is actually the first line of test.py? It seems to me (I don't have a python interpreter on this computer to confirm) that the colon where the caret is pointing is, in fact, the first syntax error in that line.[/edit]
-
- Ice Cold
- Posts: 202
- Joined: 2008.09.26 (11:49)
- Location: Australia
- Contact:
The only thing I can think of in line 1 is that:
- maybe there's a weird Unicode character that snuck in that looks like ASCII (sometimes when copypasting code, especially from foreign sources, I get that)
- maybe the variable name "number" is reserved somehow; try myNum or something
Although, neither of these problems should cause a syntax error, and the entirety of the code has no problems on my computer...
Anyway, in relation to the original question, although I totally agree with Tsuki on python, I can also suggest C# because it's easy to use and easy to migrate to C++ when you need more speed, and Flash, for ridiculously easy programming with graphics, and browser-embedding-ability (somewhat lacking in the speed department though).
- Lifer
- Posts: 1066
- Joined: 2008.09.26 (18:37)
- NUMA Profile: http://nmaps.net/user/EdoI
- MBTI Type: INTJ
- Location: Zenica, Bosnia and Herzegovina
Matt, what's easier, C++ or C#?
Edit: What's an integer?
- Semimember
- Posts: 22
- Joined: 2008.09.28 (14:06)
C++ leaves a lot more up to the programmer, such as clearing up memory that's no longer being used. Since C# does this automatically, it would be far easier to write if you're just beginning to program. It's also far easier to use the libraries included with C#.EdoI wrote:Matt, what's easier, C++ or C#?
An integer is a positive or negative whole number.Edit: What's an integer?
- Retrofuturist
- Posts: 3131
- Joined: 2008.09.19 (06:55)
- MBTI Type: ENTP
- Location: California, USA
- Contact:

- Albany, New York
- Posts: 521
- Joined: 2008.09.28 (02:00)
- MBTI Type: INTJ
- Location: Inner SE Portland, OR
- Contact:
That said, C# is the most popular .NET language, so as you search around the internet most of the examples you'll find are in C#. Converting from C# to VB isn't that hard but doing it all the time gets annoying.
I sometimes recommend PHP (via the command-line interpreter) as a first language because it's C-style, but very simple and quick to learn. You can go from PHP to something more complex like Perl and then go to taking on more exciting/terrifying languages like C.

Website! Photography! Robots! Facebook!
The latest computers from Japan can also perform magical operations.
- Retrofuturist
- Posts: 3131
- Joined: 2008.09.19 (06:55)
- MBTI Type: ENTP
- Location: California, USA
- Contact:
Zing!jean-luc wrote:Visual Basic now has access to all the same libraries and functions as C$
Was that a typo, or were you being awesome?

-
- Ice Cold
- Posts: 202
- Joined: 2008.09.26 (11:49)
- Location: Australia
- Contact:
- Depressing
- Posts: 1989
- Joined: 2008.09.28 (01:10)
- NUMA Profile: http://nmaps.net/user/UniverseZero
- Steam: www.steamcommunity.com/id/universezero/
- MBTI Type: ENTJ
- Location: The City of Sails, The Land of the Long White Cloud
- Contact:
- The Konami Number
- Posts: 573
- Joined: 2008.09.29 (22:27)
- NUMA Profile: http://nmaps.net/user/_destiny%5E%2D
- MBTI Type: ISTJ
- Location: UK
I believe the second post in this thread deals directly with that qustion -.-Universezero wrote:I've always wanted to program, but if I did all I would probably make is small flash applications. What would be best for me to start with, Python, Java, or C++?


- Albany, New York
- Posts: 521
- Joined: 2008.09.28 (02:00)
- MBTI Type: INTJ
- Location: Inner SE Portland, OR
- Contact:
I'm afraid it was just a typo.Tsukatu wrote:Zing!jean-luc wrote:Visual Basic now has access to all the same libraries and functions as C$
Was that a typo, or were you being awesome?
All them M$ languages!

Website! Photography! Robots! Facebook!
The latest computers from Japan can also perform magical operations.
- Antonio Banderas
- Posts: 1703
- Joined: 2008.09.26 (13:56)
- NUMA Profile: http://nmaps.net/user/donfuy
- MBTI Type: ISTP
- Location: port
I guess I'm not a programming guy.
But yeah, HELLO WORLD :D

-
- Beyond a Perfect Math Score
- Posts: 829
- Joined: 2008.09.25 (21:35)
- Location: England
- Contact:
Flash applications as in what's on the web? if so actionscript is the language used.Universezero wrote:I've always wanted to program, but if I did all I would probably make is small flash applications. What would be best for me to start with, Python, Java, or C++?
- Global Mod
- Posts: 1416
- Joined: 2008.09.26 (05:35)
- NUMA Profile: http://nmaps.net/user/scythe33
- MBTI Type: ENTP
- Location: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
ActionScript 3, of course, though Flash requires a heavy investment to get started.Universezero wrote:I've always wanted to program, but if I did all I would probably make is small flash applications. What would be best for me to start with, Python, Java, or C++?
You could look at PyGame (python) or löve (lua) which are free but don't work in the browser, if paying a license fee for Flash isn't an option for you. You could also make browser-based 3d games with Google's o3d, which uses JavaScript.
-
- Ice Cold
- Posts: 202
- Joined: 2008.09.26 (11:49)
- Location: Australia
- Contact:
- Semimember
- Posts: 23
- Joined: 2009.06.17 (19:54)
- NUMA Profile: http://nmaps.net/user/MattyMc13
- Location: Western Civilization
If you are interested in game programming, then I suggest flash, as that would be a good start. There is these video tutorials somebody found for me and they make it easier to learn it. I also agree with you about Game Maker.EdoI wrote:I was working with Game Maker.
Who is online
Users browsing this forum: No registered users and 11 guests