Jump to content


Photo

Computer Science:


  • Please log in to reply
41 replies to this topic

#26 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7499 posts

Posted 25 June 2018 - 03:41 AM

My first experience was coding on the C64 in BASIC. You just typed a number and code right on the console and push enter and it automatically became the code in working memory, and it ran in the number order when you typed RUN. So you could actually type it in out of order. And you skipped by 10s to allow you some space to enter new lines in between existing lines later if you needed to.

 

I too had a C64, but on that machine the BASIC was awful. Better-designed programming computers such as the BBC Micro had useful features like AUTO (start the next 10-numbered code line as soon as you press Enter), RENUMBER (change the numbering of code lines so that they were all separated by 10, even if you'd added new lines in between), commands to control graphics and sound etc.

 

C64 BASIC was so primitive you couldn't do anything related to sound or graphics without using PEEK and POKE into memory locations, and these operations were so slow it was effectively impossible to write a sound or graphics program without resorting to machine code: not even assembly language, but actual, literal numeric codes looked up on a separate reference sheet and loaded into memory with the DATA command.



#27 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5385 posts

Posted 25 June 2018 - 06:56 AM

Yep, I recall the table you had to make on graph paper to convert sprites into the numbers for the DATA lines, and typing in programs from the backs of magazines with pages of DATA numbers, hoping you didn't miss or flub any. I'm really nostolgic about it, and still make little games on a C64 emulator sometimes. It's awful by today's standards, ok maybe by its own time's standards too, but circa 1986, when it's the only computer you have and there are lots of games that are easy to break and see examples of (relatively) complex code, it was pretty liberating and exciting. It's more about what inspires people to perservere than the technicalities sometimes.

Speaking of machine language on that chip, one thing worse than coding for a C64 was coding for an Atari 2600! That's really low level stuff you have to do. But there's something undeniably retro chic about making your own C64 and Atari games.
Posted Image

#28 Jetrell

Jetrell

    Member

  • Member
  • PipPip
  • 75 posts

Posted 25 June 2018 - 09:39 AM

 

I too had a C64, but on that machine the BASIC was awful. Better-designed programming computers such as the BBC Micro had useful features like AUTO (start the next 10-numbered code line as soon as you press Enter), RENUMBER (change the numbering of code lines so that they were all separated by 10, even if you'd added new lines in between), commands to control graphics and sound etc.

 

Yep, I recall the table you had to make on graph paper to convert sprites into the numbers for the DATA lines, and typing in programs from the backs of magazines with pages of DATA numbers, hoping you didn't miss or flub any. I'm really nostolgic about it, and still make little games on a C64 emulator sometimes. It's awful by today's standards, ok maybe by its own time's standards too, but circa 1986, when it's the only computer you have and there are lots of games that are easy to break and see examples of (relatively) complex code, it was pretty liberating and exciting. It's more about what inspires people to perservere than the technicalities sometimes.

 

If I may ask, how old were you guys when you were doing these things?

.



#29 Sneaker

Sneaker

    Member

  • Member
  • PipPip
  • 12 posts

Posted 27 June 2018 - 11:58 AM

 

 

If I may ask, how old were you guys when you were doing these things?

.

 

I was in middle school at the time (so probably around 11 years old?).  I had a Commodore 128 and also spent much time typing in those peeks and pokes and data numbers from the back of magazines.  I look back in nostalgia (one was a simple baseball game!) but that particular experience was positively awful for learning in hindsight. :D (or maybe not, it does demand attention to detail and perseverance).

 

On the other hand, the C128 came with a manual (remember them?) which taught you Commodore Basic and the use of the built-in sprite maker.  I'd make simple "demos" and dream about cracking games. heh.



#30 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5385 posts

Posted 28 June 2018 - 12:45 AM

Yeah, 11 is when I got the C64 and I started trying to program on it right away. That strikes me as the right kind of age to start really studying and experimenting with it, and before then it's probably helpful to do the logic games to get in the habit of clear & algorithmic thinking. But of course it depends on the kid.


Posted Image

#31 elwing

elwing

    Member

  • Member
  • PipPip
  • 132 posts

Posted 29 June 2018 - 06:21 AM

Languages are implementation details, anyone with correct algorithmic approach and capable of abstract reasoning can adapt in any of these languages in less than a couple of month. discussing learning method is much better than talking about languages... I can't really help OP as I have not used such resources since years through.



#32 Diego

Diego

    Modeler

  • Member
  • PipPipPip
  • 1206 posts

Posted 29 June 2018 - 07:53 AM

Demagogue and richisbored covered all my game suggestions. The fun thing is that these games make use of one of assembly, the most infamously difficult and complicated programming languages and turn it into entertainment. Goes to show how far gamefication can go and how much presentation influences how we perceive something. 

 

Anyway, the reason I learned any programming at all is because I needed it. I like programming but not for programming itself, it's the means to an end. So maybe once he finds something he likes and requires programming he'll bite into it with more interest. Game development is great fun, so with that there are some obvious choices like game maker, unity, godot engine, uzebox etc. All very fun ways of making games that require learning programming



#33 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 435 posts

Posted 29 June 2018 - 11:07 AM

Languages are implementation details, anyone with correct algorithmic approach and capable of abstract reasoning can adapt in any of these languages in less than a couple of month.

That implementation detail is responsible for almost all of todays software security bugs in all big operating systems. It is the reason, why we can enjoy games featuring pathfinding AI with 60 FPS. And it also has a huge impact on bug density, code maintainability and development time in every non-trivial project - even for the most experienced teams.

Chosing the right language for the job is really important if you don't want to make the task unneccessarily hard and lengthy.

 

I started with Basic and ASM on the C64 too. But the two are horrible languages to get anything done.

It is possible. But it is much harder and takes much more time than doing it in most of the more modern languages.

 

If you are an experienced programmer seeking the challenge, go ahead and try some serious ASM, C(++), Whitespace, Brainfuck... And Shenzhen I/O is fun too.

But if you are a programming noob, have a low attention span, or don't like bugs that much - chose something that is less error prone and easier to code in. Doesn't have to be Python - every modern so-called "scripting language" are much better suited for the job than ASM, C(++), or that Basic v2 from the C64.



#34 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7499 posts

Posted 18 July 2018 - 05:48 AM

 

 

If I may ask, how old were you guys when you were doing these things?

.

 

Like Demagogue, I was around 11. The C64 was my first computer and I thought it was awesome. You could write text in 16 different colors, including orange and brown! Even if you had to drag the whole thing downstairs and plug it into the family television in order to use it.



#35 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7499 posts

Posted 18 July 2018 - 05:53 AM

Languages are implementation details, anyone with correct algorithmic approach and capable of abstract reasoning can adapt in any of these languages in less than a couple of month. discussing learning method is much better than talking about languages...

 

For an experienced programmer, you are correct that learning a new language is trivial. But we are not talking about experienced programmers here, we're talking about a child who may or may not have the correct abstract reasoning skills, and may or may not be interested in learning programming at all. In the case the language makes a big difference, because the language is the learning method.

 

For example, if he started to program with C64 BASIC (which is not very practical these days unless you use an emulator), he would never learn about structured programming or functions, and would think that the only way to make decisions in code is to jump around to hard-coded line numbers with GOTO, which is not how any modern programming works and is unmaintainable for anything other than a trivial program.

 

If he starts with C, he's going to have difficulty with anything more complex than printing the result of simple numeric calculations, until he's learned about standard libraries, the compilation and linking process, #includes and declarations etc. If he wants to accept input from the user ("What is your name?"), he will have to learn about pointers and memory allocation, which I recall was very difficult to understand at that age (even if it seems trivial to us experienced programmers now).

 

As Abusimplea said, he doesn't have to pick Python. But choosing an inappropriate, restricted or low-level language is likely to be highly confusing and possibly put him off learning programming altogether.



#36 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5385 posts

Posted 18 July 2018 - 06:05 AM

Interesting that this thread was bumped. I've recently been starting with a new project that's got me learning Python for the first time.

 

While it gets a bad rap for slow performance (in many cases the user doesn't even notice unless it's chugging some massive amount of data), it's actually really great to work with. It's an interpreted language, so there's no compiling; you just write & run. And the interactive function takes me back to the C64 days, when you could just program right in the shell and it instantly works. Anyway, I've only just started but I'm already a big fan. It's the kind of programming language that you experiment with, because you can have different ideas & test them right off with the interactive section. I think it's the language you use when you don't really know what you want to do, to figure out what to do, which is me for most of the kinds of projects I do... Just for my own edification and not really professionally. And even then, after you figure it out & have it programmed, then you can still think about porting it to C++ or whatever for performance, after you know exactly what to do. It probably still saves time in the end. Anyway, learning a new language & thinking about how I'd do things in it has made me excited about coding again recently, so it's appropriate this thread would bump.


Posted Image

#37 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7499 posts

Posted 18 July 2018 - 11:07 AM

Yes, Python is a great language. I always enjoy programming in it, and would never hesitate to recommend it to someone who wanted to learn programming and wasn't dead-set on web development specifically (where something like JavaScript might be more appropriate, although I've always hated that language).

 

If you haven't found it already, try the iPython interpreter instead of the default one. It's much more optimised for the sort of immediate-mode programming you are doing, and has nice features like TAB completion, advanced history searching and other shell-like functionality.

 

I wouldn't worry about the performance concerns at all. The vast majority of programming is not going to have issues with the performance of an interpreted language, and there are faster implementations of Python available in any case. While you wouldn't want to program a graphics-intensive game in Python, it's perfectly fine for everyday command-line or GUI applications. When I have encountered performance issues it has generally been the result of poor algorithmic design (such as using "if object not in some_list:" repeatedly, when that is a potentially slow linear search).



#38 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 97 posts

Posted 19 July 2018 - 02:06 PM

 

 

 

C64 BASIC was so primitive you couldn't do anything related to sound or graphics without using PEEK and POKE into memory locations, and these operations were so slow it was effectively impossible to write a sound or graphics program without resorting to machine code: not even assembly language, but actual, literal numeric codes looked up on a separate reference sheet and loaded into memory with the DATA command.

 

Do you recall the sound wizards from back then with names like Rob Hubbard or Martin Galway or Chris Hülsbeck? Sure you do.  :)

 

I am still wondering how they created their alchemy on the C64. What did they use to create their music? Did they fill in hex data via a machine code display tool?


Edited by JackFarmer, 19 July 2018 - 02:07 PM.


#39 OrbWeaver

OrbWeaver

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 7499 posts

Posted 20 July 2018 - 11:36 AM

Do you recall the sound wizards from back then with names like Rob Hubbard or Martin Galway or Chris Hülsbeck? Sure you do.  :)


I personally don't know such names, because my time on the C64 was as a child in the 90s, with no internet or any means to become exposed to the wider community. At one point my Dad found a large book on C64 programming in the local library, which I read with interest but didn't have the skills to put into practice, and I think at one point someone bought me a Commodore Format magazine which was basically all about games.
 

I am still wondering how they created their alchemy on the C64. What did they use to create their music? Did they fill in hex data via a machine code display tool?


Yes, I wonder too. I did have a tape of The Music System which was probably my favourite app for the C64. On one side was a tool which allowed you to manipulate synthesizer parameters and save them out to tape, and on the other side was a sequencer which allowed you to use those saved sounds to create music (it had to be two separate apps because of memory limitations). It was pretty decent for its time, and had full graphic control over parameters and a very impressive musical notation editor. But I have no idea if the "sound gurus" would have used this program, or something they wrote themselves.



#40 Jetrell

Jetrell

    Member

  • Member
  • PipPip
  • 75 posts

Posted 06 September 2018 - 10:00 AM

Thanks for all the feedback and suggestions, it's all very helpful.

 

I introduced my son to several of these programs, some he liked more than others and then I showed him the "computer programing" section on Khan Academy. He seems to like their program the most which comes with lots of tutorials and background support. They do a good job making it fun and interesting and he seems to like the challenge of making things.

 

We also got him a robot from a hobby store which works by programing various commands and this, he really likes. He's got it programed to go all through the house doing all sorts of things...


  • Aosys likes this

#41 Snehk

Snehk

    Member

  • Member
  • PipPip
  • 48 posts

Posted 07 September 2018 - 03:56 AM

Sounds really great with that robot, and it's awesome that he liked coding!

I started learning C++ when I was 11 or 12. Now I'm learning it again to catch up with latest standards and refresh my memory. Grasping the basic concepts and most of advanced ones isn't that hard, but I do agree that pointers and memory management is one of the greatest hardships in the beginning. It's one of the things that takes a lot of practice, as there are many concepts that can be understood just by reading theory.

Edited by Snehk, 07 September 2018 - 03:57 AM.

  • Jetrell likes this

#42 brethren

brethren

    Advanced Member

  • Member
  • PipPipPip
  • 557 posts

Posted 13 September 2018 - 09:30 PM

A bit late to the party here, but if anyone is interested in programming specifically related to games, then Gamemaker Studio is a great place to start.   It's fairly easy to learn and get going, and there's tons of youtube and web tutorials out there that are really helpful in getting an actual game up and running.  Gamemaker has it's on language called GML, and I've heard it's similar to Python (no firsthand experience though).

 

I should add too that several commercial games have been made with Gamemaker, such as Hotline Miami and Hyper Light Drifter.


Edited by brethren, 13 September 2018 - 09:31 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users