A Question On Programming Languages


(CubeFan973) #1

I want to try programming. I know about programming languages like C++, C, BASIC, Python, etc., but I want to know what programming language I should try out? I’d try anything (from Blender stuff to a game), and would like something easy to learn.


(acasto) #2

It really depends where you wanna go with it. What is your end goal? What do you want to use the skills for?

If you just wanna know general programming, then perhaps something applicable to your everyday such as python in blender, or some perl would be good. If you want to get serious with programming, then definitley C would be a good starter, since it isn’t that hard and is the basis for many many things and other languages.


(valarking) #3

Ok, here goes, these are my opinions:
BASIC - DO NOT start with any form of BASIC, I did and I sorely regretted it. It teaches you bad and lazy habits. Nuff said.
Python - It’s not a very fast, impressive, or flexible language IMHO, but it’s advantiges are that it can be used to script online pages.
OpenGL - This isn’t a “programming language”, but a libray of functions, classes, variables, etc. You can integrate it into almost any language, but it’s most commonly used with Visual Basic and C++, the latter being more popular.
C/C++ - This is the way you should go. It might look intimidating at first, but trust me, if you get a good book/tutorial, then you should be able to look at it line for line and understand. Now it’s arguable whether or not you should use C or C++ first. C++ has a lot of object oriented stuff in there to complicate matters. But C++ also gets rid of a lot of restrictions and simplifies some commands, making them more beginner friendly (printf - cout, malloc - new.) I think you should get started learning C++, and ignore the stuff about classes until you are completely sure you are ready. The saying goes, “With C you have the power to shoot yourself in the foot, with C++ it’s harder to do, but when you do you blow your whole leg off.” :wink: This, if you could not figure out by now, is my preferred language.
Other languages:
Pascal - A nice beginner’s languge. It was my second language, after BASIC, and before C/C++. A particualary interesting enviroment/IDE is Delphi.
Perl - I know a lot of people will disagree with me on this point, but I have to say that this is the most worthless piece of junk I have ever used. I do not at all like it’s class system. Blech.
Java - I learned this because it’s growing more popular and Java programmers are in slightly higher demand. I do not really like it either.

That’s a quick reference for what language to pick. Next, you’ll have to get a compiler. Hehehe… :wink:


(CubeFan973) #4

I have no real idea on what I want to get with the programming. I would like to program things like Blender scripts (speaking of which–oh, never mind, I’ll ask it in the Blender Foundation forum). The first major thing I’d want to make is a thing like a choose-your-own-adventure game (like a book where you make choices and can get different experiences each time). Not neccesarily 3D or even 2D, but a text game.

All right. Which do I use for a choose-your-own-adventure?

PS: I started trying C++, but it just made no sense. I’m just wondering if I should try it again or not.

PSS: What language is the open-source part of Linux?


(theeth) #5

VK: I have to disagree, once you really get into Python, it is very flexible, and it’s structure makes it one of the most easy to read language (IMHO). I think that’s one of the strongest point with Python, you can just go on and read the code like if it was a book. Unlike other languages that compiles regardless of how the layout is done, Python forces you to do it that way, which has too effects. First, block delimiters are automatic. Second, the code is always layed out nicely which makes it very easy to read and to see what goes with what.

I first started in Basic (QBasic to be exact), but I had a really good teacher, so that all the bad habbits that can be enforced in Basic were evited.

Martin


(acasto) #6

Cubefan: You can do something like that in many languages. So I think now it comes down to the question of how involved you are wanting/willing to get? I’m thinking that Python may be good for you to try. I mean, it’s something you can apply currently, it’s something where you know where you can get plenty of help (here at elysiun), and it’s something you probably won’t get bored with easily because you will be able to see results not only from the program, but in you work in blender. You have access to many many nice python scripts, in which you can study and tweak then study the changes.

If you start with C or C++, you need to be prepared to stick to it. It’s not something that you are really going to benefit from alot in the short term. Where with python, you could take a blender script, and add in your own stuff as soon as you can understand it.


(TankCoder) #7

I’m self-taught. I first started out using Q-Basic(what I was about 9 or 10) that led to some very bad habits which I am out of by now.
Here are my opinions for programming languages

BASIC: Bad choice. Horrible language(all of them) that are all very weak. Very bad choice for beginners. Not portable. Schools should be sued for teaching Visual Basic.

Pascal: I dont have much experience with Pascal myself since I only spent about a week learning it several years ago. I’ve heard its a good beginners language.

Python: Is probably the best language to start out with. Very easy to learn, very flexible, very portable, very nice. Its also Object Oriented which is a plus. It has hundreds of bindings(for OpenGL(3d), wxWindows & GTK+ & QT & etc.(for GUI creation), etc, etc.

Perl: A very powerful language mostly used for but not limited to CGI scripting. Perl’s most powerful aspect is probably its use of Regular Expressions(IMHO). Vey Nice language, its definatly something to learn, but probably not best for a beginner.

Java: Nice Languege. I dont have much experience with Java but I’ve heard its very OO and of course, very portable.

C/++: VERY POWERFUL languages. Unix, which is probably the most powerful OS in existance was written in C. C++ was made some time later. Some people like C, some people hate C++. C is faster(although not by much). unfortunatly, because of its immense power, C/++ is also very low-level meaning that some things that could be written in Python in 10 lines may take C/++ over 50 lines. Its syntax is also not as user-friendly as some other languages out there. This language is also definately a language to learn but not a good choice for a beginner programmer.

OpenGL: Not a programming language =). Although, it is the most powerful 3d API(IMHO). It absolutely rules compared to D3D and GLIDE.

Other Suggestions:

Lisp: Very nice language. very powerful. Teaches good habits. Not really a beginners language.

Intercal: For the insane

Malbolge: Programming Language from Hell

Hope this helps :smiley:


(valarking) #8

I have no real idea on what I want to get with the programming. I would like to program things like Blender scripts (speaking of which–oh, never mind, I’ll ask it in the Blender Foundation forum). The first major thing I’d want to make is a thing like a choose-your-own-adventure game (like a book where you make choices and can get different experiences each time). Not neccesarily 3D or even 2D, but a text game.

All right. Which do I use for a choose-your-own-adventure?

PS: I started trying C++, but it just made no sense. I’m just wondering if I should try it again or not.

PSS: What language is the open-source part of Linux?[/quote]

  1. I know what you mean about the adventure game. Therer are a multitude of ways to do this. It’s really not complicated. I’d say the easiest way would be to learn an objet oriented language (C++, Perl, Python, Java), and setup a system of classes/structs to do it. It would be a nice excersise in classes. I’ve done something quite similar a long time ago. One of the RPG-esque things I did a year or so ago that has just been sitting around in my Tripod account. Here’s the url:
    http://sa_hand.tripod.com/newrpg.zip
    It was the 4th or 5th rpg I made, but the only “complete” one. Look at the main.cpp, main.h, and cengine.h, those are the souce files. That’s what a not-very-complex newbie’s RPG looks like. It still doesn’t work very well, and the file system is a recipe for disaster.
  2. The open-source part of Linux is C/C++ is think. (?) Sorry, I’m not too familiar with Linux.
  3. C++ makes no sense until you get something that explains line for line a basic “Hello World” program, and then add elaborations, and familiarize yourself with those.
  4. As for compilers, this is a much debated issue, but here are the most popular:

Visual C++: (~$60 - $3000 depending on the version and license.)
-My personal favorite because of the nice IDE and widespread support. Just because it is made by M$ doesn’t mean it has to be buggy, and useless coughwinmecough.

Bloodshed Dev-C++: (Free)
-I’ve never tried this, but from what I hear it’s a nice C++ IDE, just with a strange name.

Borland Command Line: (Free)
I really don’t use these that much. They’re not that great for beginners, simply because a good IDE is better for beginners. I did like C++ Builder’s IDE though.

DJGPP: (Free)
This is most likely what you should start out with. It’s a very popular command line/Turbo C+±esque IDE. It also works very well with Allegro (http://www.allegro.cc), my favorite beginner’s 2D library.

You should research this some more online. Once you get going in C++ I would recommend getting Visual C++. Mostly, your choice on those compilers should really be based on which one you like working with the most.


(Briggs) #9

Borland Command Line: (Free)
I really don’t use these that much. They’re not that great for beginners, simply because a good IDE is better for beginners. I did like C++ Builder’s IDE though.

Of special note regarding the Borland command line tools; Borlands dev system uses a diff lib format than the standard system library on windows. This means that depending on what your doing you have to generate stupid little wrapper libs to get everything working right. Fortunatley the tools provided are fairly straightforward. Also borland uses diff name mangling conventions than microsoft which is means that when working on a lib or dll you have to provide the compiler with a file that converts your exported symbol table to equivilant microsoft garbage.

In other words if your a beginner, stay away.

If you absolutley must have an IDE and your a complete noob I would suggest bloodshed. Its good it’s free and dosn’t suffer from the same problems as the borland tools.

One nit to pick VK: Opengl dosnt have any concept of “classes” :slight_smile:

Cubefan RE: language choice: I’m a python and C junkie myself. It’s fairly straightforward to extend python with C extensions when the speed just isn’t there. Of course you might end up writing the bulk of it in C anyway. I can’t comment on C++.

(linux is written in C btw)


(valarking) #10

yes, you are right, typo on my part.


(CubeFan973) #11

All right, I get that OpenGL isn’t a programming language. Does it work if you want to make a 3D game, though? (Just wondering) I’m not going to take it off the poll, it might be useful to know it (just not yet).

It’s not the only thing I want to make! (Well, yeah, it is for now.) But which works best with that type of game? I’ll learn that one.

I just had an idea. If it doesn’t work, I’ll come back and look at your replies.


(ray_theway) #12

As far as choose-your-own adventure goes, I know of a kind of “cheater” program you can use. I believe it’s called ADRIFT Generator and Runner (don’t know the website - do a google search). It’s a simple “visual” way to do text adventures (sorry- no graphics).

As far as programming languages, I use C because it seems to have many uses. I use lcc-win32 to work with C, mainly cause it was the first one I found already compiled. (I tried using gcc, but I needed to compile the code - wait, but I needed gcc to compile gcc - :o Catch-22!)


(RipSting) #13

the order I learned in:

HTML (lol is this a language? I guess so…)
Hyperstack
True Basic
Qbasic
Visual Basic
C++
VBA
Java
Python

I think Qbasic is a good place to start. Don’t diss on it VK, it’s still a hobby of mine to go back and make games using my own 3D engine in it. Pretty fast once you get into direct memory access, but still the slowest compared to other languages. Not object oriented.

Visual basic is an excellent place to get started. The code just makes sence and it’s object orientated.

I hate any language that’s case sensitive like C++, JAVA, and Python. But I’ve learned to live with it. Of the three, C++ is the most challenging to get the hang of. The code doesn’t really resemble english and you have to remember to put those pesky semicolons at the end of each line. Java’s a little better and can be run on the web.

Python is an awesome language for a couple of reasons. It’s cross-platform capability means you don’t have to write special code to get it to port. Even if you don’t know anything about coding, you can still pretty much figure out what the code’s doing because of it’s readability. And it’s the language of Blender :slight_smile: Python is the only language I’ve programmed grass, hair, and water scripts in. I’ve done more complicated physics in basic though :wink:


(theresnothi) #14

i voted java because it is easier to use, but i learned C++ for 2 years in class and it teaches you good programming habits and how to get around most programming languages
Java and C++ are very similar, and can get you skills for modern programming.


(valarking) #15

[biased rant]
i disagree, i think it is HARDER to use qbasic. i used it for 2 years, started c++, and never looked back. take for instance the for loop, in qbasic you only have one option, whereas in c++, it can be used for almost any loop you want! and you talk about it being faster when you get into direct memory access? why dont you make it about 50 times faster by just programming it in assembly, i bet it’s easier to make a structered, advanced program in assembly than it is to make it in basic. all forms of basic are inferior in speed (including visual basic) to almost all compiled languages. about the semicolons, those are used in almost every structered language, so i’d get used to it. and i also think i prefer c++'s syntax to basic’s english-like one. besides, i think being case sensitive is a plus. it makes the code much more readable.

Python is an awesome language for a couple of reasons. It’s cross-platform capability means you don’t have to write special code to get it to port. Even if you don’t know anything about coding, you can still pretty much figure out what the code’s doing because of it’s readability. And it’s the language of Blender :slight_smile: Python is the only language I’ve programmed grass, hair, and water scripts in. I’ve done more complicated physics in basic though :wink:

isn’t python an interpreter? i HATE non-compiler languages, they are SO slow.
[/biased rant]


(overextrude) #16

C++ is an interesting language - you can get into it by merely learning the basic control constructs common to most programming languages, but that’s not why C++ was designed the way it was. C++ is about being able to design a software-based solution by modeling it in the problem space, and this is where object-oriented design comes into play. OO is more than just encapsulating code within classes. It’s strengh lies in being able to write software in a way that supports object relationships, inheritance, polymorphic behavior, information hiding, and one of its most powerful features, templates. When you use C++, you are writing as much for the person that will be maintaining/using/enhancing your code (other programmers) as you are for the end user.

Of course, one isn’t requred to use this extra stuff (it has a steep learning curve), but then if that’s the case, maybe C++ isn’t the best choice.


(Waffler) #17

If you do not have any experience with programming, then I would have to say something that’s easy to learn would be a good place to start … although you may run into some problems later when you try to switch over to a more advanced language. I was so ruined by basic that I owned a C++ compiler for a year before even taking a serious look at it. IT WAS SO DIFFORENT! But it is so much better.

Actually, now that I think of it, C++ would be the best place to start. Especially since you said that you wanted to try to make a text based adventure. That’s a great idea for getting the hang of C++'s structure without going overboard trying to learn graphics and sound libraries.

These are the programming languages I learned in the order I learned them in:

Commodore 64’s Basic - I was 7 or 8 and loved it like crazy.

QBasic - I liked working directly with memory on the C64, but I had fun with Qb.

Commodore 64’s Assembly - My uncle gave me a bunch of disks, and one was a really cheap assembler … I didn’t actually do much with this though.

Visual Basic - I never used this for any serious projects, just when I want to make some weird mathmatically generated image. It bores the heck out of me.

C++ - When I look back over all the years I’ve been programming (around 10 so far) I wish I had this back when I was first starting. I was so much more enthusiastic about learning how to do new things, and my enthusiasm would have been better spent on something usefull … but all I had was a C64 for a long time. Sigh. I really learned things a whole lot quicker back then, because I loved it so much. YEARS WASTED ON BASIC!!! Now I have to push myself just to continue going. I could have gotten to where I am now (OpenGL / Windows programming) five times quicker if C++ had been my first language.

Z80 Assembly - This was just a short break from C++, because I didn’t want to memorize any more functions for various header files. I love creating, but have memorizing. I have to force myself through books and tutorials. All I wanted to do was create, so that’s why I turned to Assembly. It was so nice and low-level, where logic is the key to solving problems instead of remembering long lists of functions somebody else made. But, since I was in school and the science fair was quickly aproaching, I hadn’t actually done much with this … though it was fun.

Python Scripting with Blender - I only really learned anough to make my exporter for Blender … although it’s not quite finished yet. It’s quite easy to learn (less than a week or so). If all you want to do is make Blender scripts this is a good to start with (but you already said you wanted to make a game).

Etc. - I also learned HTML and JavaScript, but I never felt those were really all that special.

Well, I guess I have to agree with what a majority of the people here have already said and say go with QBasic … No, just kidding. C++ would be the best to start with. C++ can do everything C can (as in C code compiles fine with C++), but it also has a lot of extra stuff you could get into after figuring out it’s basic structure.

I don’t know … it feels like I’m just rambling on about something not very important (since it has been said several times before)


(jesterKing) #18

Hmm, the first (only?) one to vote for Perl. You could also try Ruby…