Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-08-22 15:50:07

bossk171
Member
Registered: 2007-07-16
Posts: 301

Best Language to Learn?

I know ActionScript (For Macromedia Flash) fairly well (enough to make cheesy games) but the consensus seems to be that it's not a very good programming language (lack of versatility maybe?)

So I'd like to learn a new one. The question is: what should learn? Java, C++, something else? And how would I go about doing that?

P.S. Is there a difference between C and C++?


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#2 2007-08-23 03:20:39

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Best Language to Learn?

My recommendation is C++.  The only real difference between C and C++ is that C++ has the ability to be object oriented.  But C++ allows you to start learning procedural code, then you can move on to learn OO.  In Java, it's all thrust upon you at once.  Also, C++ allows you to shoot yourself in the foot, which is great for learning.  No better way to learn than to make every mistake.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#3 2007-08-23 03:37:48

bossk171
Member
Registered: 2007-07-16
Posts: 301

Re: Best Language to Learn?

I guess my next question is: how would I go about that? In Flash i just write the code, then run my game to test it. What do I need to buy/download to write the code? Any books or free online tutorials that you could recommend?

Thanks!


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#4 2007-08-23 07:12:11

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Best Language to Learn?

If you can get your hands on Microsofts .NET package, then this makes it very easy.  There are a bunch of free compilers though.  If you use linux, g plus plus comes pre-installed. On windows, you can get a GNU compiler from using cygwin, which is much like a linux console on a windows desktop.  There is also a free ide called Eclipse.

But there are two different ways to compile: IDE and command line.  IDE (Integrated Development Environment) is basically a text editor, and when your done coding you click "compile" and then "run" and everything happens for you.  Command line is you actually type in what you want the compiler to do.  So for example, if I have test.cpp all written up, I would go and type:

gcc test.cpp

This would compile my code and produce an a.out file (my program).  Then I run a.out:

./a.out

The difference is that on the command line, you are typing everything out, and in the IDE, you are using menus and interfaces.  The problem with an IDE is that they often give you _tons_ and _tons_ of menus and parameters you don't care about and don't have a clue as to what they do.  And often times, there is a setting that you don't know the name of, nor where it is, that you must change.  To find this can be very difficult.

With .NET, everything is basically set up and ready to go.  You don't have to worry about including libraries or selecting how the compiler optimizes code.  With Eclipse, almost nothing is set up and you have to do it all yourself, which can be very confusing.

If you use linux, I'd go with g plus plus.  If not, I'd recommend getting cygwin.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#5 2007-08-23 07:26:57

bossk171
Member
Registered: 2007-07-16
Posts: 301

Re: Best Language to Learn?

Honestly: I didn't understand most of that. I'm just going to grab onto "I'd recommend getting cygwin" and download that. After that I'll take it step by step. Hopefully things will start to make sense as time goes on.

Any helpful advise to get me going would be great of course.

Thanks for the starting point.


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#6 2007-08-23 07:38:12

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: Best Language to Learn?

i got a book called Teach yourself C++ in 21 days. The book is nice and fat (my favorite kind of book) and very thorrough. It was reccomended to me by someone else, and i once mentioned to my professor that i used ihat series for C++ and he said "OOOooh I love those!" the seem to have a pretty good reputation. However we all agree that 21 weeks is a more realistic timeframe. tongue but if you are already familiar with programming it should take you less time.

As for compilers, i'm not sure. See i started with another book that came with a free compiler on a disk. The book was lousy but the compiler is great. Its a boreland. smile

you might want to look into borland compilers. Mine is called Borland C++ Builder X.


The professors at my school seem to think learning Java first makes learning C++ a thousand times easier. I say its probably true but Java allows you to form programming habits which are perfectly fine in java but lethal in C++. So I'm not sure if its better or not.

what do you think, Ricky? should Java be used as a stepping stone to C++?


A logarithm is just a misspelled algorithm.

Offline

#7 2007-08-23 07:39:10

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Best Language to Learn?

Sorry, if there is anything you want me to explain further, just ask.

For cygwin, the way it works is with what are called "injections".  You start out with the basic package which allows you to only the most basic of things, but you can add in programs to your system by injecting them.  So if you want g plus plus, you need to inject the g plus plus package.  I don't quite have the time right now, but I'll find the packages you need an explain the entire process later tonight.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#8 2007-08-23 07:54:47

bossk171
Member
Registered: 2007-07-16
Posts: 301

Re: Best Language to Learn?

Wow, you guys are great, thanks. Cygwin is 86% downloaded now.

I'm going to go google "Teach yourself C++ in 21 days" now, see if I can't find an (affordable) copy somewhere. (I agree fat books are better.)


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#9 2007-08-23 08:07:40

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: Best Language to Learn?

you should be able to find it easy, if not i'll go dig up the book and get more specific info to help you find it. I think the publisher is Sam's Publishing or just Sam's.


A logarithm is just a misspelled algorithm.

Offline

#10 2007-08-23 08:47:11

bossk171
Member
Registered: 2007-07-16
Posts: 301

Re: Best Language to Learn?

I found it free http://newdata.box.sk/bx/c/ but I hate reading online, so I ordered a real cheap one off of amazon. Thanks.

Last edited by bossk171 (2007-08-23 08:49:07)


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#11 2007-08-23 08:59:23

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: Best Language to Learn?

well I hope you like it!

actually i'm glad you found that online version because a page fell out of my book and i'd like to know what was on it. Ironically, it was in the section discussing memory leaks. tongue


A logarithm is just a misspelled algorithm.

Offline

#12 2007-08-23 13:02:13

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Best Language to Learn?

Edited to add: If you like programming, then unix/linux (they are almost one and the same) may seem a bit annoying to have to learn, but they are worth it.

Here is a site that will help you get cygwin setup for g++, it's a lot easier than I remember it.  But before you go there, follow the same process it says to, except also add "vim" which is under the editors category.

http://classes.cs.kent.edu/sce/cygwingccinstall.html

Cygwin is basically an attempt at running unix in a windows environment.  As such, you need to learn a few unix commands before you can do anything.

ls - list all, lets you see all the files in a certain folder.
cd directory_name - change directory to the one you give it.  "./" means root (highest level up) and "../" means go one level up.
mkdir directory_name - make a directory
vim filename - opens a text editors with the filename you give it.  If the filename is not a file in the folder you are in, it will create one for you.

vim is pretty hard to use, if you want I can give you a few basic commands.  However, most people don't like it.  But since you are on windows, you can just open up the file in your favorite text editor and program like that.

When you open up cygwin, it will start you off in C:\cygwin\home\USER_NAME.  This is pretty much the easiest place to put most your stuff, so I recommend you do so.  So once you start up cygwin, type:

mkdir Hello_World

Note after every line I give you here, press enter.  Now type:

ls

You should see "Hello_World".  That is a directory we just make.  Go into it by typing:

cd Hello_World

Now type:

ls

and you should get nothing as there is nothing in the folder yet.  So we need to make something.  We do so by typing:

vim hello_world.cpp

Now we are running a program called vim, a text editor.  We enter "input mode" by typing the letter "i".  Now type the following:

#include <iostream>

using namespace std;

int main() {
   cout << "Hello, world!" << endl;
   return 0;
}

And now press "esc" to exit the input mode.  Notice you are still in vim, but you are now in what is called command mode.  To write and quit, type ":wq".  The ':' is important.  Press enter and you should return back to where you were before you entered vim.  Now type:

ls

And you should see hello_world.cpp.  This is our source file.  To compile it, we run a program, a compiler, called g++, with our source file as the input:

g++ hello_world.cpp

Hopefully you should get no errors or warnings.  Now type:

ls

and you should see both a.exe and hello_world.cpp.  a.exe is the executable we just wrote.  To run a.exe, type:

./a.exe

And you should see the words, "Hello, world!" on your screen.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#13 2007-08-23 14:25:28

bossk171
Member
Registered: 2007-07-16
Posts: 301

Re: Best Language to Learn?

When I type:

vim hello_world.cpp

I get

bash: vim: command not found


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#14 2007-08-23 14:29:58

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: Best Language to Learn?

i hate when stuff just doesn't work. x_x


A logarithm is just a misspelled algorithm.

Offline

#15 2007-08-23 14:38:57

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Best Language to Learn?

Here is a site that will help you get cygwin setup for g++, it's a lot easier than I remember it.  But before you go there, follow the same process it says to, except also add "vim" which is under the editors category.

Also, welcome to the world of really bad (aka great) computer jokes.  A shell is a program that allows you to run other programs.  For example, Windows Explorer is the program that displays all your icons on your desktop and start menu.  It is a shell, although it's typically not called that because it's Windows.

Anyways, in linux, a popular shell is bash.  First came the Bourne Shell, and then bash: Bourne Again Shell, a pun on born again Christians.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#16 2007-08-23 15:04:55

bossk171
Member
Registered: 2007-07-16
Posts: 301

Re: Best Language to Learn?

Thanks for being so patient with me...

Installed vim and you're right, it's very hard to use. How do I go about using "my favorite text editor?"

EDIT:

Haha! I did it, this is a really great moment for me. vim just confused me, I ended up rewriting the program with Notepad, but you guys helped a lot.

Thanks for everything Ricky.
Thanks for the book suggestion and keeping things light-hearted Mikau.

Last edited by bossk171 (2007-08-23 15:17:16)


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#17 2007-09-06 03:54:21

lilly losconono
Guest

Re: Best Language to Learn?

bossk 171 what is your picture soppoused to be a deformed dog

#18 2007-09-13 15:02:23

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,562

Re: Best Language to Learn?

bosk, I use the Syn Text Editor, free off net.
It's pretty nice.
Google with double quotes "Syn Text Editor".
It remembers where you were with your cursor when you left a file days ago.
The way it does this is with a small hidden file in same directory as the file you worked on.
You can shut that off if you want to though in one of the menus if you don't
want those little hidden files made.
I like the font in Syn Text Editor.
And it prints like an electric typewriter with my printer.
Not in real time when I type, just the look of the font is like
the 1980's electric ball letters on some typewriters where the ball
hit at different angles.  Skinny clear letters, evenly spaced.
Really awesome font made just for the editor.

Last edited by John E. Franklin (2007-09-13 15:04:23)


igloo myrtilles fourmis

Offline

#19 2007-09-13 15:52:57

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Best Language to Learn?

Vim is hard to use.  I barely know how to use it myself.  But I've seen some friends of mine use it, and they are lighting fast.  If you get good at it, you can type faster on it than with a gui program (like notepad, gui is graphical user interface, as opposed to text like vim).  So it's all just a question about how much effort you want to put in.  Personally, I don't really think it's worth it, though if I get a lot of free time, I'll start trying to learn the in's and out's of vim.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#20 2008-07-25 14:18:26

careless25
Real Member
Registered: 2008-07-24
Posts: 555

Re: Best Language to Learn?

I use DEV C++ and i m tryin to learn C++ from 20 or so books i got from a torrent. Just post here i can send u a link. Try googling DEV C++ and its a freeware.

Offline

#21 2008-07-26 02:10:12

kylekatarn
Member
Registered: 2005-07-24
Posts: 445

Re: Best Language to Learn?

Ricky wrote:

Vim is hard to use.  I barely know how to use it myself.  But I've seen some friends of mine use it, and they are lighting fast.  If you get good at it, you can type faster on it than with a gui program (like notepad, gui is graphical user interface, as opposed to text like vim).  So it's all just a question about how much effort you want to put in.  Personally, I don't really think it's worth it, though if I get a lot of free time, I'll start trying to learn the in's and out's of vim.

ViM is hard. ViM is powerfull. ViM is fun. ViM is. smile

I started with VIM more than 3 years ago, when I entered university. The learning curve is...not a curve, its a vertical line one has to climb... If you are learning alone, no instructor/friend, its hard.

Things get much easier if you get some friend of yours to teach because you don't get so lost with all the commands and features. You can start working from day zero = )   Some of my friends started using ViM under my guidance, and now they are already teaching it to others! = )

And I will never forget the day pedro `mawreal' lopes told me: "forget emacs, I'll teach you the basics of ViM". cool

The more you learn, the more you *want* to learn! guess what...just like Maths!roflol

Offline

#22 2008-09-29 15:56:48

rconway
Member
Registered: 2008-09-29
Posts: 1

Re: Best Language to Learn?

Hi, my choice is go for C++ because it is working with object oriented programming. Object oriented means its all about user defined one only and here data,process are combined together. But small exception in C++ is it can allow us to do programming without object oriented programming. This can be overcome by Java, in that we cant write simple program with object oriented one. So choose your best way and all the best for your future.
--------------------
Ricky Conway
Job Opportunities

Offline

#23 2009-05-07 18:45:10

Russ
Member
Registered: 2009-05-07
Posts: 1

Re: Best Language to Learn?

Hi, what about apple script, and codeing c on the Mac? I'm just learning...

thanks

Offline

#24 2009-05-07 18:56:26

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 87,177

Re: Best Language to Learn?

Although I used to be a big advocate of C++ and lisp,  python, I am afraid, is the wave of the future.


In mathematics, you don't understand things. You just get used to them.
Of course that result can be rigorously obtained, but who cares?
Combinatorics is Algebra and Algebra is Combinatorics.

Online

#25 2009-05-08 07:19:17

simron
Real Member
Registered: 2006-10-07
Posts: 237

Re: Best Language to Learn?

I use Python as well. I find it simple to use, and a good starting block for beginning programmers like me. Also, it doesn't need too much disk space to run.


Linux FTW

Offline

Board footer

Powered by FluxBB