Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 09-21-2001, 11:31 PM   #1
Member (9 bit)
 
Join Date: Sep 2000
Location: Montreal, Canada.
Posts: 317
what language?

How do you chose a programming language for your specific needs? and what would you recommand to start with (did some BASIC long time ago)? Any good URL's on that topic? tia!
mofo is offline   Reply With Quote
Old 09-21-2001, 11:54 PM   #2
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
Hi mofo,

It depends on what type of programs you want to make and how much you want to learn. You can make basic programs (input, output) using C++ or Pascal. If you want to make Windows programs you can use Visual C++ (based on C++), Visual Basic (based on BASIC) or Delphi (based on Pascal). If you want to make applets for web pages you can learn Java or if you want to do scripting you can learn Perl or PHP. What exactly do you want to do/learn?
__________________
"A witty saying proves nothing." - Voltaire
DrZaius is offline   Reply With Quote
Old 09-22-2001, 09:56 AM   #3
Member (9 bit)
 
Join Date: Sep 2000
Location: Montreal, Canada.
Posts: 317
Hello Doc,
i'd like to make small programs that run under windows. I'm thinking VB since i did some BASIC long time and thought it was easy. But tell me about visual C++ is it more complex than VB and can you do a lot more with it? is it better to learn C for someone who wants to go into games?
mofo is offline   Reply With Quote
Old 09-22-2001, 10:03 AM   #4
Member (9 bit)
 
Join Date: Sep 2000
Location: Montreal, Canada.
Posts: 317
oh and what do you use ASSEMBLY for?
mofo is offline   Reply With Quote
Old 09-22-2001, 11:29 AM   #5
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
mofo,

For making basic Windows programs Visual Basic is probably the easiest to learn because it is based on BASIC. Almost everything in VB is done using plain english words so it's easy to read and understand.

If you want to go into writing games then you will want to learn C++ since most games are written C++. Even if you want to make a mod for a game you will need to code DLLs which are also written in C++. You can also use Visual C++ to write code for basic programs to learn from and also to make Windows programs like with VB, so it's the best choice. C++ is harder to learn than VB, but it's better and more useful.

Assembly is and old programming language that uses combinations of words and numbers and is very hard to write. It's based on machine code so you can only write a program for a specific processor. It's really a low-level language.

Hope that helps.
DrZaius is offline   Reply With Quote
Old 09-22-2001, 12:45 PM   #6
Member (9 bit)
 
Join Date: Sep 2000
Location: Montreal, Canada.
Posts: 317
sure does, thanks a bunch. think i'll start with VB, at least i can fool around with the GUI while i'm learning the code
mofo is offline   Reply With Quote
Old 09-22-2001, 07:07 PM   #7
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
I had a comp sci professor tell me this:

"The only reason to use machine language is to program an assembler so you'll never need to use machine language again. The only reason to use assembly is to program a compiler so you'll never need to use assembly again."

Assembly, actually, IS still used for microcontroller apps, or any apps where memory or processor speed is still at a premium, because compilers never produce as efficient of code as you can get in assembly. Once upon a time, most games were written in C++, which was then translated to assembly, and people would go through and optimize everything for speed and/or size.

Really, nowadays, you'd use assembly or machine language if:

1) You were writing code for a microcontroller and don't have the fancy programming packages.
2) You want to edit a program but don't have the source code, only the executable.
3) You're a masochist.
4) You're forced to by a class you're taking.

Overall, games are written in C++ almost without exception -- it's the work horse of the programming languages. Games are different from other kinds of apps, because they generally want as much processor time as they can get, they don't fit the event-driven programming scheme of windows very well, and unless you're careful about how you code them, you'll get terrible frame rates.

VB is handy because (I've heard) it's faster to create windows GUI programs in. I don't know much about VB; of the programming languages I've learned at one point or another, VB was never one of them.

C++ has the main strength that it can do ANYTHING that any other language can do. It has the most power and versatility. And, although Windows GUI programming in WinAPI -- which is actually C -- is hard and crummy, when you get a good C++ API (like Microsoft's MFC, or Borland's OWL) it's not that bad at all. Yesterday I wrote a simple custom image viewer app to test the output of another app I wrote, and it took me maybe 35 mins to write the code for the program, which was a simple GUI, with 4 buttons, no menu, and an image display area. And, although I did a *little* cut and paste of code, I only copied maybe 15 lines from another program of mine.

I use OWL (basically, OWL is a library of classes and functions, created by Borland, which extend C++ and simplify creating and using windows). Using OWL, a skeleton program (one that does nothing but show some kind of window) takes maybe 35 lines of code, compared to maybe 150 if you did it in C/WinAPI.

If you do want to learn C++, you have a few options. You can start with C and then do C++, but this can leave you creating bad C++ code, as, although C++ allows you to use all the C commands, it doesn't recommend many of them. Me, I write *almost* in the 'preferred' C++ style, although I use the C-style string commands... go figure.

Another way to learn C++ is to learn Java first, then C++. This has the advantage that Java forces you to use Object-Oriented Programming (which is a VERY good way to program) so you get the proper style -- the downside is that Java isn't that wonderful of a language, and you'll have to do some learning to get familiar with C++, which is *similar*, but sometimes deceptively so, because there are a lot of tiny (and some not-so-tiny) differences. If you decide to learn C++, I do recommend at some point you learn at least basic Java to learn how to do OOP, but you can learn C++ first.
__________________
Paul M. Victorey
------------------
I am not responsible for any problems that may arise as a result of following my advice. This includes, but is not limited to, computer failure, loss of data, nuclear war, famine, boils, no clean laundry, your daughter running off with a biker gang, or armageddon. Take my advice at your own risk.

Last edited by Paul Victorey; 09-22-2001 at 07:12 PM.
Paul Victorey is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:28 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2