What programming language would you reccomend?

Started by Dullstar, June 09, 2009, 11:08:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dullstar

Hmm, I might look at Java again for cross platform stuff.

GuyPerfect

The absolute easiest programming language to learn, in my opinion, is BASIC or one of its variants.  You can learn about it at any number of sites, such as http://www.petesqbsite.com/" class="bbc_link" target="_blank">Pete's QBASIC Site, which includes tutorials.

I've attached QBASIC 4.5 to this post. It will load up and run in the MS-DOS Promt well enough, though you may want to use DosBox for performance reasons.

Here's a simple, fundamentalist-style calculator program I wrote up:

Code: [Select]
'Declare variables
DIM NumA AS SINGLE, NumB AS SINGLE, Result AS SINGLE
DIM Operator AS STRING

'Clear the screen
CLS

'Get the first number
INPUT "Enter a number: ", NumA

'Get the operator
DO
    INPUT "Enter an operator (+, -, * or /): ", Operator

    'Check to make sure the operator is valid
    IF Operator = "+" THEN EXIT DO
    IF Operator = "-" THEN EXIT DO
    IF Operator = "*" THEN EXIT DO
    IF Operator = "/" THEN EXIT DO

    'If we're still in the loop, the operator was invalid
    PRINT "Invalid operator. Try again."
LOOP

'Get the second number
INPUT "Enter another number: ", NumB

'Perform the calculation
SELECT CASE Operator
    CASE "+": Result = NumA + NumB
    CASE "-": Result = NumA - NumB
    CASE "*": Result = NumA * NumB
    CASE "/": Result = NumA / NumB
END SELECT

'Output the result
PRINT LTRIM$(STR$(NumA));
PRINT " " + Operator + " ";
PRINT LTRIM$(STR$(NumB));
PRINT " = " + LTRIM$(STR$(Result))

Pooty

Wow, QBASIC! That's a blast from the past. I spent the majority of my teenage years playing about with that language, using a machine with a 50MHz processor. Good fun it was, too. One thing I loved was the Help system. I was clicking with it, and sometimes, I explored it in the same way as many of us explore Wikipedia.
SEGA Master System version
100% on 110/120 levels (92%). Other levels [Lemmings lost]:
Fun 03 [3], 06 [2], 18 [5]   
Taxing 19 [5], 27 [1], 28 [3]
Tricky 15 [5], 17 [2]
Mayhem 19 [7], 26 [10]

Minim

I'm sorry about this, but QBasic runs in DOS and I can't get the Dosbox to work.

I should keep looking at the posts displayed earlier in the forum.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

GuyPerfect

If you're running Windows, you'll be able to run QBASIC without DosBox.

covox

Another vote for Python! It's fun and easy to learn, and very powerful for rapid prototyping.

For quick introductions, I can recommend http://www.sthurlow.com/python/" class="bbc_link" target="_blank">this set of tutorials or http://www.freenetpages.co.uk/hp/alan.gauld/" class="bbc_link" target="_blank">this site. The latter is very good about teaching the basic building-blocks of computer science, but for the love of God IGNORE EVERYTHING IT SAYS ABOUT VBSCRIPT. Seriously, don't even entertain the idea of learning VB. That's a great way to screw you up good. For the more complex stuff, the Python docs contain just about everything, explained (remarkably enough) in English.

Some more links:  http://www.pygame.org/" class="bbc_link" target="_blank">Pygame is a popular wrapper around the SDL multimedia library. http://www.pythonchallenge.com/" class="bbc_link" target="_blank">Python Challenge is a pretty cool online puzzle which can only be solved through lots of Python hacking.

Dullstar

for the love of God IGNORE EVERYTHING IT SAYS ABOUT VBSCRIPT

What the **** is VBSCRIPT anyways?

Minim

Another vote for Python! It's fun and easy to learn, and very powerful for rapid prototyping.

Python! covox, you've just reminded me of http://pytraffic.en.softonic.com/" class="bbc_link" target="_blank">something.

Anyway, I've tried the download but unfortunately I don't know what to do next. http://www.lemmingsforums.com/Smileys/lemmings/undecided.gif" alt=":-\" title="Undecided" class="smiley" /> I've got the file on my Windows saying "ActivePython-2.6.4.8-win32-x86.msi". I just wonder if there are any additional stuff to download that goes with it. Maybe that file is a tutorial page?
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

ccexplore

http://www.lemmingsforums.com/index.php?topic=70.msg7527#msg7527">Quote from: minimac on 2009-11-16 10:19:12
Anyway, I've tried the download but unfortunately I don't know what to do next. http://www.lemmingsforums.com/Smileys/lemmings/undecided.gif" alt=":-\" title="Undecided" class="smiley" /> I've got the file on my Windows saying "ActivePython-2.6.4.8-win32-x86.msi".

".msi" is a Windows installer package, you should be able to just double-click to run it and it should launch an installation program to install whatever it contains (ie. Python).

Dullstar

Another thing I'm wondering - do game development suites always use platform specific code, or could the code for the exe's they produce be decompiled and recompiled under another OS?

ccexplore

http://www.lemmingsforums.com/index.php?topic=70.msg7533#msg7533">Quote from: Dullstar on 2009-11-16 16:52:23
Another thing I'm wondering - do game development suites always use platform specific code, or could the code for the exe's they produce be decompiled and recompiled under another OS?

Unless the suite is specifically designed to work cross-platform, there's nothing you can do to get around its "platform-specificity".  Programs compiled for different platforms are generally as different as, say, Spanish vs. Romanian, even for platforms that work on the same processor architecture.  This is because (roughly speaking) programs rely on the OS for a lot of essential functionalities, and the way to invoke these OS-provided functions are completely different from OS to OS (not to mention the set of functions themselves are totally different).

Cross-platformness takes real effort to achieve.  Basically someone has to provide a sort of common interface/library for the various functionalities normally covered by the OS/platform (files, sounds, graphics, etc.).  You program against that interface/library, instead of against a specific OS or platform.  Then for each platform/OS the common interface/library supports, there are code specific to that platform/OS, that implements the features in the common interface/library using what functionalities that particular platform/OS provides.

In other words, a cross-platform library or suite or whatever saves you from having to write separate programs for each platform, by having the work done for you--it abstracts out all those functionalities that must be implemented differently in different platforms, provides all the different code for each supported platform, and then slaps a common interface on top of it that your program talks to.  The provided platform-specific code translates the functionalities your program requires (expressed as function calls into the common interface) into the functionalities provided by the specific OS/platform.

Using the rough language analogy, the cross-platform interface/library would be a common language like English.

Because providing cross-platform support takes more effort to achieve, it's not surprising that most game development suites would just pick the most "popular" platform, like Windows.

mobius

I'd like to start learning C++ using this tutorial: http://www.cplusplus.com/doc/tutorial/" class="bbc_link" target="_blank">http://www.cplusplus.com/doc/tutorial/

what is doesn't mention is what kind of compiler should I get? And is this something I can download easily for free? I have downloaded a Python compiler in the past but there's a huge selection it seems for C++. What do you recommend?
And, do I really need this? I thought I remember hearing somebody making programs in C++, in Windows using only a notepad somehow.

unrelated: what language are batch files written in?
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Simon

For C++ under Windows, I've used MinGW, it's free software. Hunt around the web for that, I recall that one needs to install several things from their site. An alternative is Cygwin, but I've never used that.

A text editor is not a compiler. You can write code in Notepad if you insist, but you will want a more powerful editor quickly.

Batch files are shell commands that get executed one after another. :-)

Useful links for later:
http://www.sgi.com/tech/stl/table_of_contents.html" class="bbc_link" target="_blank">sgi's STL reference for std::string, std::vector, ...,
http://www.parashift.com/c++-faq/" class="bbc_link" target="_blank">C++ FAQ lite for style/avoiding concocted use of language features,
and cplusplus.com, which you already know.

-- Simon

GuyPerfect

For C++ under Windows, I've used MinGW, it's free software. Hunt around the web for that, I recall that one needs to install several things from their site.

It works just fine with just the http://sourceforge.net/projects/mingw/files/" class="bbc_link" target="_blank">mingw-get-setup.exe file linked to on their SourceForge page. I think what you have in mind is MSYS, which is an additional package that contains a Windows version of the make utility among other things.

I'd go with MinGW, möbius. It exposes the gcc and g++ commands to the Windows command prompt, and it's what you're most likely to run into out there in the real world (at least, the real world that isn't married to Microsoft).

mobius

thank you  http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />

I've downloaded the MinGW installer package and it seemed to install fine and I feel silly asking, but how do you open the compiler and start typing?  http://www.lemmingsforums.com/Smileys/lemmings/undecided.gif" alt=":-\" title="Undecided" class="smiley" />  There's no quick link or anything... All I can see easily is the installer which all it does is install things. There's nothing that stands out in my MinGW folder. What am I missing?

Also; there's such a huge amount of items in the installer list of the installer package. How much of this do I need to install as a beginner? I've installed the 'typical' install i think (including several compilers).
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain