Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Learning to program  (Read 1457 times)

PCpaste

  • Bay Watcher
  • This is how smithing works. (For dwarves at least)
    • View Profile
Learning to program
« on: July 24, 2011, 09:37:18 am »

Where do I start, using DarkBASIC Professional? Unfortunatley i'm not old enough for college, as i'm only 15, but i'll be damned if that's going to stop me from getting a head start for when I am.

All I see is a blank page, and i'm completely lost as to what i'm supposed to put there... Once I made a spinning cube, but any knowledge of how I did that is long gone.
Logged
Dwarf Fortress: The only game where an Artificial Intelligence-controlled unit can pull the pants off someone and the proceed to beat said someone to death with said pants.

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Learning to program
« Reply #1 on: July 24, 2011, 09:49:11 am »

Where do I start, using DarkBASIC Professional? Unfortunatley i'm not old enough for college, as i'm only 15, but i'll be damned if that's going to stop me from getting a head start for when I am.

All I see is a blank page, and i'm completely lost as to what i'm supposed to put there... Once I made a spinning cube, but any knowledge of how I did that is long gone.

Well, you *could* start out by Googling some tutorials.

Honestly, though, you're best off not using BASIC at all. It's simple, yes, but it's not especially practical for many things. I'd drop you off at the nearest Python website, myself.
Logged

Mephisto

  • Bay Watcher
    • View Profile
Re: Learning to program
« Reply #2 on: July 24, 2011, 01:11:02 pm »

For some reason, everything on python.org is timing out for me. In any case, whether or not there's a link to Dive Into Python or Dive Into Python 3, I would suggest it.
Logged

PCpaste

  • Bay Watcher
  • This is how smithing works. (For dwarves at least)
    • View Profile
Re: Learning to program
« Reply #3 on: July 24, 2011, 01:51:10 pm »

Well, it was a gift, and it was more then $100, so i'm going to use it. It's a start, anyway.
Logged
Dwarf Fortress: The only game where an Artificial Intelligence-controlled unit can pull the pants off someone and the proceed to beat said someone to death with said pants.

HideousBeing

  • Bay Watcher
    • View Profile
Re: Learning to program
« Reply #4 on: July 25, 2011, 04:40:08 pm »

Well, it was a gift, and it was more then $100, so i'm going to use it. It's a start, anyway.

If it doesn't offend anyone too bad, you should probably just return / sell it and use the money for other books. Python is a good language to learn with, easy to read and is used fairly widely. It also has an interactive shell which is really really nice for playing with code.
Logged

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Learning to program
« Reply #5 on: July 25, 2011, 04:44:27 pm »

Well, it was a gift, and it was more then $100, so i'm going to use it. It's a start, anyway.

If it doesn't offend anyone too bad, you should probably just return / sell it and use the money for other books. Python is a good language to learn with, easy to read and is used fairly widely. It also has an interactive shell which is really really nice for playing with code.

You could also start with Haskell, Scheme/Lisp, "straight" C and "Javhurr". They're all either useful for your programming-related pursuits or fun to use and learn. Sometimes both.
Logged

Thendash

  • Bay Watcher
    • View Profile
Re: Learning to program
« Reply #6 on: July 25, 2011, 07:00:55 pm »

If you're learning this solely to get a head start on college, then find out what language you're going to be using there. My college used Java for example. I'd recommend Java, it's pretty popular so there's a lot of information out there and I found it pretty easy to learn.
Logged
Thendash's Livestream

This game could honestly give out hand jobs for free and people would still bitch.

alfie275

  • Bay Watcher
    • View Profile
Re: Learning to program
« Reply #7 on: July 26, 2011, 10:13:25 am »

I'd personally start with something like c++, the move to a higher level language.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Learning to program
« Reply #8 on: July 26, 2011, 10:40:17 am »

Basic is a good start. Most other languages are roughly the same, and if you really need to learn the basics, Basic is good for that.

If you eventually want to do something useful, then you pick another language, such as c++ if you're hardcore, or python or java if you're more focused on results than on learning.


Looking at DarkBasic that looks pretty cool. Instant results with little effort. Just google for tutorials on it, then copy-paste the code, then start modifying and playing with it, and when you make something nice, post it here :)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Urist McLongbeard

  • Bay Watcher
    • View Profile
    • Similar games database
Re: Learning to program
« Reply #9 on: July 26, 2011, 01:30:17 pm »

Perl FTW! ;D
Logged
Similar games database: http://game-graph.appengine.com/

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Learning to program
« Reply #10 on: July 26, 2011, 01:39:53 pm »

When there's more than one to do it, you might just end up with something like this:
Code: [Select]
#!/usr/bin/perl
for($i=0;$i<25;$i++){print{STDOUT}chr(ord(substr("Ktru!\@onuids!Qdsm!I`bjds-",$i,1))^1);}print"\n";

A single, simple, obvious and readable way to do something is a Good Thing.
Logged

Urist McLongbeard

  • Bay Watcher
    • View Profile
    • Similar games database
Re: Learning to program
« Reply #11 on: July 27, 2011, 04:28:08 pm »

When there's more than one to do it, you might just end up with something like this:
Code: [Select]
#!/usr/bin/perl
for($i=0;$i<25;$i++){print{STDOUT}chr(ord(substr("Ktru!\@onuids!Qdsm!I`bjds-",$i,1))^1);}print"\n";

Meh, that doesn't look like JAPH at all. Use the force, Luke! Something like that is more like it (using the same string transformation approach - a one-liner):

Code: [Select]
perl -le '($_="Ktru!\@onuids!Qdsm!I`bjds-")=~s,(.),chr(ord($1)^1),ge; print'
A single, simple, obvious and readable way to do something is a Good Thing.

Not really. Not being a heroine addict writing code on a really bad trip - now that's a really Good Thing, but most people don't realise that. Most people write Perl code without proper training and supervision, that's the only reason why they get crappy results.
« Last Edit: July 27, 2011, 04:33:46 pm by Urist McLongbeard »
Logged
Similar games database: http://game-graph.appengine.com/