Jump to content
IGNORED

What language to learn?


TwentySixHundred

Recommended Posts

Thought i would create this topic rather then running off topic in other threads and it may help others in the same boat. The biggest issue is i feel like a Magpie creating a nest when it comes to deciding what to learn. For those who are not familiar with magpies, they are an Australia native bird that goes around picking up sticks, wire and bits of trash to make a nest...

 

post-30687-0-45009900-1488143098_thumb.jpg

 

Yeah i know kinda a lame joke but that's what i feel like when it comes to learning a language. The BASIC language makes sense and thinking it is more of a stepping stone into programming? The Magpie statement comes from after 6 years or so with programming as an interest, i have never made a solid decision on a language. I have done some simple script modding in Lua, batari BASIC projects and was studying Java from a Uni text book i bought at a thrift store (still have it). I have also noticed when swapping from language to language, i have still learned over the years because changing to another language i can implement some the practices in other languages.

 

However im finding it a very slow way to learn, having to switch up methods every time obviously because of different syntax and methods. Im also aware the choice is really up to me but looking for some tips, insights and similar syntax to BASIC. Any thoughts about the language you recommend would be great, as when google searching im getting results to nearly every language out there... Basically looking for something to sink my teeth into or should i just bite the bullet and commit to a course? Im thinking the best place to ask the question is here on AA as this community really seems to know their stuff in a mature sense. All cards are on the table for this discussion it can be anything you feel will contribute in programming related for beginners trying to step on the boat.

Link to comment
Share on other sites

Hello Tony. I have had some of the same desires and concerns as you. I did a lot of research and finally decided on the Python language. While it is not capable sheer raw performance as C or of course Assembly, it is never the less a very, very good performer and likely suitable for all but the most absolutely demanding in speed.

  • It is interpreted, but can also be compiled.
  • It's available on LOTS of platforms, and included libraries give capability to handle most any programming need, but there are lots of additional libraries available too.
  • It is pretty easy to write a program in Python and have to do very little or even nothing at all to make it run on different platforms.
  • Its code is probably the easiest to read of all languages. That was actually one of its design goals.
  • It can be used in procedural, object oriented, functional, or any combination thereof programming styles.
  • It's free.
  • It's been used by extensively by some of the biggest producers of software; Google for example.

I even made a command line program to convert between ATASCII (Atari ASCII) and ASCII. I was thrilled with how easy Python made that for me. I haven't done much with GUI and object oriented programming yet as I have just started to learn that too. I haven't put the time into it, but it seems like it will be fantastically rich in capability and fun too.

  • Like 1
Link to comment
Share on other sites

Hey fujidude, yeah after doing some searching post of this topic i made, many have said Python aswell. There is lots of mixed reviews on the web saying it's great others saying it's not however i guess never know till give it a go. Guess starting with a language thats easy to read is the best idea. Im not too worried about performance for the moment as i won't be programming anything that needs to run fast. Also sounds good that Python uses an interpreter that can compile much like bB works, thats the setup im looking for as it makes things a little easier to start with. Thanks for the input :thumbsup:

Link to comment
Share on other sites

Here is that program I wrote for an example of a text based, CLI driven, procedural style program:

#!/usr/bin/env python3
# AAC - ASCII ATASCII Converter v1.1 Copyright 2015 Fujidude
# Developed under Python 3.4.3. Known not to work with versions prior to 3.3.

#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.

#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with this program.  If not, see <http://www.gnu.org/licenses/>.

import argparse #Library for easy command line argument parsing.
import platform #For determining what type of OS platform is in use.


def atascii_to_ascii(c):
    """ATASCII to ASCII conversion.

    Accepts the byte value of an ATASCII character as input.  Returns the byte
    value of the closest equivilent ASCII character.  Covers upper and lower
    case, numerals, common punctuation,  tabs, and box drawing (right angled,
    single line only) chars.  Inverse ATASCII is converted into non inverted
     versions.  Characters without a match are translated to a 0 (zero) value.
    """
    #      0     1     2     3     4     5     6     7     8     9     A     B     C     D     E     F
    t = (0x00, 0xC3, 0xDE, 0xD9, 0xB4, 0xBF, 0x2F, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # 0
         0x00, 0xDA, 0xC4, 0xC5, 0x00, 0xDC, 0xDD, 0xC2, 0xC1, 0x00, 0xC0, 0x1B, 0x00, 0x00, 0x00, 0x00, # 1
         0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, # 2
         0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, # 3
         0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, # 4
         0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, # 5
         0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, # 6
         0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x00, 0x7C, 0x00, 0x00, 0x09, # 7
         0x00, 0xC3, 0xDE, 0xD9, 0xB4, 0xBF, 0x2F, 0x5C, 0x2F, 0xFE, 0x5C, 0xDF, 0xDC, 0xC4, 0xC4, 0xDC, # 8
         0xDA, 0xC4, 0xC5, 0x00, 0x00, 0xDF, 0xDD, 0xC2, 0xC1, 0x00, 0xC0, 0x0A, 0x00, 0x00, 0x00, 0x00, # 9
         0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, # A
         0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, # B
         0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, # C
         0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, # D
         0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, # E
         0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x00, 0x07, 0x00, 0x00, 0x00) # F
    c = t[c]
    return(c)


def ascii_to_atascii(c):
    """ASCII to ATASCII conversion.

    Accepts the byte value of an ASCII character as input.  Returns the byte
    value of the closest equivilent ATASCII character.  Covers upper and lower
    case, numerals, common punctuation,  tabs, and box drawing (single line,
    right angled only) chars.  Characters without a match are translated to a
    0 (zero) value.
    """
    #      0     1     2     3     4     5     6     7     8     9     A     B     C     D     E     F
    t = (0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, # 0
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, # 1
         0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, # 2
         0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, # 3
         0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, # 4
         0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, # 5
         0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, # 6
         0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x00, 0x7C, 0x00, 0x00, 0x00, # 7
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # 8
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # 9
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # A
         0x00, 0x00, 0x00, 0x7C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, # B
         0x1A, 0x18, 0x17, 0x01, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # C
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x11, 0x00, 0x00, 0x16, 0x02, 0x00, # D
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # E
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) # F
    c = t[c]
    return(c)


def convert():
    """Convert read data to output data.
    
    Operates as a procedure.  Nothing to pass in or get back.
    """
    if tft == "ATASCII":
        for i in src:
            b = ascii_to_atascii(i)
            if b != 0x00:
                trgt.append(b)
    elif tft == "Unix":
        for i in src:
            b = atascii_to_ascii(i)
            if b != 0x00:
                trgt.append(b)
    else: #Must be ASCII
        for i in src:
            b = atascii_to_ascii(i)
            if b == 0x0A: #LF, so...
                trgt.append(0x0D) #... preceed with a CR.
            if b != 0x00:
                trgt.append(b)
    o_file = open(args.o_file, mode="wb") #Open target file in binary write mode.
    o_file.write(trgt) #Write out processed data to target file.
    o_file.close() #Close output file.
    if not args.quiet:
        print(" - Conversion complete.") #Give user notice of completion.


#Initializations.
trgt = bytearray() #Create trgt as an empty bytearray

#Write title info.
print("\nAAC (ASCII ATASCII Converter) v1.1 - Copyright 2015 by Fujidude")
print("Licensed under the GNU GPL3.  See license files in distribution.\n")

#Handle the command line argument parsing.
parser = argparse.ArgumentParser(description = 'Makes a copy of a text file doing a conversion in the process.  Source & target files must not be of same type, i.e. one must be ATASCII and the other must be one of the varieties of ASCII.  The input and output filenames may be the same name, however, if you wish to convert "in place."  AAC expects ASCII characters to be those of code page 437 (original IBM PC).  Other code pages which are closely similar (e.g. 850, 1252, etc.) should work reasonably well.  AAC also assumes the ATASCII is in the standard U.S. set that contains the line drawing characters rather than the "international" characters.  This means that AAC does not support custom or non U.S. versions of the ATASCII character set.  Inverse ATASCII characters are converted as if non inverse.  Any character which is not common to both ATASCII and ASCII are not converted, so as to not clutter the output with what would essentially be garbage.',
                                 epilog = "If no output translation is specified, one will be chosen automatically based on source file type and operating system in use.")
parser.add_argument("i_file", type = argparse.FileType(mode="rb"), help = "input file") #Input file will be read in binary mode.
parser.add_argument("o_file", help = "output file") #Will open later, if appropriate.
parser.add_argument("-q", "--quiet", action = "store_true", help = "suppress notices")
meg = parser.add_mutually_exclusive_group()
meg.add_argument("-t", "--atascii", action = "store_true", help = "translate to ATASCII - Atari (EOL)")
meg.add_argument("-a", "--ascii", action = "store_true", help = "translate to ASCII - DOS/Win (CR LF)")
meg.add_argument("-u", "--unix", action = "store_true", help = "translate to ASCII - Unix (LF)")
args = parser.parse_args()

#Read in source file and store in list.
src = bytes(args.i_file.read())
args.i_file.close()

#Determine OS type.
ostype = platform.system()

#Determine source file type.
num_eol = src.count(0x9B)
num_lf = src.count(0x0A)
num_cr = src.count(0x0D)
if (num_eol > num_lf) and (num_eol > num_cr):
    sft = "ATASCII"
    if not args.quiet:
        print(" - Source file appears to be ATASCII.")
else:
    sft = "ASCII"
    if not args.quiet:
        print(" - Source file appears to be ASCII.")

#Determine target translation type.
if (not args.atascii) and (not args.ascii) and (not args.unix): #Translation type unspecified.
    if not args.quiet:
        print(" - Output translation type not specified.")    
    if sft == "ASCII":
        if not args.quiet:
            print(" - Setting output translation to ATASCII.")        
        tft = "ATASCII"
    else: #Source file is ATASCII, so which ASCII output style to use?
        if ostype == "Windows":
            if not args.quiet:
                print(" - OS seems to be Windows.\n - Setting output translation to ASCII.")
            tft = "ASCII"
        elif ostype == "Linux":
            if not args.quiet:
                print(" - OS seems to be Linux.\n - Setting output translation to Unix.")
            tft = "Unix"
        elif ostype == "Darwin": #Mac OS-X
            if not args.quiet:
                print(" - OS seems to be Mac OS-X.\n - Setting output translation to Unix")
            tft = "Unix"
        else: #Undetermined, so go with ASCII
            if not args.quiet:
                print(" - OS is undetermined.\n - Setting output translation to ASCII.")
            tft = "ASCII"
    convert()
else: #Translation type was specified, but is the input file already that type?
    if args.atascii:
        tft = "ATASCII"
    elif args.ascii:
        tft = "ASCII"
    else:
        tft = "Unix"
    if ((sft == "ATASCII") and (tft == "ATASCII")) or ((sft != "ATASCII") and (tft != "ATASCII")): #Same.
        print("")
        print(" * ERROR: Specified output translation matches source file type.  AAC only")
        print("          handles conversion between ATASCII and ASCII variations, not between")
        print("          ASCII variations.  A good CLI program to convert between ASCII")
        print("          variations is called DOS2UNIX (with corresponding UNIX2DOS), and is")
        print("          available for multi platform on the web.")
    else: #Different so it's a go.
        convert()

  • Like 1
Link to comment
Share on other sites

I guess it's really about what your intended end result is. Right tool for the right job and all that.

 

Are you making a game? Are you interested in a particular platform?

Not really for a game or anything im just looking for one i can learn for educational purposes. I have done modding in Lua and obviously some projects in bB and thought rather then learning little parts of all different languages it would be more educational to learn a single language. However im starting to think i first need a project in mind then use it as motivation to learn a language as i will have a goal rather then just to learn (if that makes sense). The issue i have had is i found with modding in Lua was im not really learning the language just the games API and copy/pasting alot of code editing variables.

 

So oneday at a thrift shop i found a couple year old Java uni text book and thought great i will read it front to back to learn Java then. However i worked out fast that it was basically pointless just reading it because i wasn't really learning how to put it into practice. Basically what i have learned is all good for mods on games or within bB and works fine yet i have no idea how to lets say create anything else in that language. Maybe i should book myself into a course and learn the bare basic fundamentals rather then jumping in the deep end?

Edited by Tony The 2600
Link to comment
Share on other sites

If you want the keys to the kingdom then start with C. It really doesn't matter what you want to make or on what platform: they all have C compilers (NES and Sega Genesis too) :)

 

Main problem I have is the overly strict syntax makes you focus on code formatting and details that force you to cater to the language rather then what you want to do.

 

Also, setting up your own IDE can be a pain.

 

Nevertheless, my first statement above stands :)

Link to comment
Share on other sites

If you want the keys to the kingdom then start with C. It really doesn't matter what you want to make or on what platform: they all have C compilers (NES and Sega Genesis too) :)

 

Main problem I have is the overly strict syntax makes you focus on code formatting and details that force you to cater to the language rather then what you want to do.

 

Also, setting up your own IDE can be a pain.

 

Nevertheless, my first statement above stands :)

Well to be honest NES is one the systems that really tickles my fancy, mainly because it seems the limitations and restrictions are alot less then those of the Atari 2600. I think my biggest issue is the simplicity of bB that makes it hard to step away from my comfort zone. For example i can atleast make a simple game with a playfield, some sprites and simple collision detection within a few minutes therefore gives that feeling of progress. Although i soon run into the limitations really quickly when expanding the program to add more content and features. Basically i can write something simple save, compile and run all within visual bB making it user friendly for a novice like myself. Half the hoo haa of compiling and all is done for us.

 

I always never knew the NES or Gen were written in C as i always assumed they would be written in assembly much like the 2600 was back in the day. The NES has been an interest because the possibilities and amount of content i could add, i mean im a bit of a slow learner and sometimes things need to be explained in layman terms but once i understand i believe i have that mindset to produce quality. Im usually a bit of a perfectionist too, so things need to look neat and in order with most things i do in life. It's just getting the initial understanding and concepts that are the struggle.

 

Also not bias with systems as i like all hardware, so i will probably still play around with bB anyway even if i decide to pursue another system (why not both hey?) :). There is something about the 2600, even my $hity little programs written on bB kinda feels rewarding as i have a soft spot for the system. To think i created a game on a system i loved so much back in the day is great but im aware the limitations are the tricky part. Thats why something like the NES i feel would really open the gates, without so much having to use tricks and methods to produce lets say a variety of sprites within a program. I mean if i was to create 6 different enemy's i wouldn't loose the function of lets say the ball height or whatever.

 

Is there anything similar to visual bB for the NES? I ask here to those who know what they're doing rather then google search and downloading someones incomplete project or something.

Edited by Tony The 2600
Link to comment
Share on other sites

Pretty much the NES dev scene dislikes BASIC. I don't see any beginner friendly tools coming out of that crowd soon.

 

That being said, NESICIDE is a great IDE for C on the NES

https://sites.google.com/site/nesicideproject/

 

So, you learn C which is a skill set easily transferable to any other platform AND you get to make Nintendo games :)

 

UPDATE: Another web site of interest

http://shiru.untergrund.net/articles/programming_nes_games_in_c.htm

  • Like 1
Link to comment
Share on other sites

Pretty much the NES dev scene dislikes BASIC. I don't see any beginner friendly tools coming out of that crowd soon.

 

That being said, NESICIDE is a great IDE for C on the NES

https://sites.google.com/site/nesicideproject/

 

So, you learn C which is a skill set easily transferable to any other platform AND you get to make Nintendo games :)

 

UPDATE: Another web site of interest

http://shiru.untergrund.net/articles/programming_nes_games_in_c.htm

Thanks, have downloaded the installer and dependencies so i will set it up and have a good look. Could be exactly what im looking for however they do say on the other website that assembly is the preferred option as it's faster and all that. Although like you said i can learn C useful language while making games at the same time. Seems like a win win to me :) Great links :thumbsup:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...