Coding For Dummies - WAS: Coding Competition...I Like It


If I should give you a recommendation, it'd be to start up with something even simpler, like scratch: http://scratch.mit.edu/ This is a very visual language, both in what it does (it is geared towards making animations, interactive stories, and so on) and in how it is written - Instead of writing line after line of code, you program by connecting up graphical elements, which are designed to show off their function. For instance, the loop constructs visually surrounds all the code that it is repeating. Also, you can look at the shape of elements and see where they fit - A logical (true or false) expression is a diamond-shaped thing, and places  where you could use one is a diamond-shaped slot, so you can see that the logical expression "fits".

Does this sound a bit kiddie-ish? It is. But it is also the best thing I've see yet to actually visualise and understand what statements does and what their scope is, and so on. Highly recommended.
There is even a Pandora port of Scratch...

http://repo.openpandora.org/?page=detail&app=scratch
 
True, I had forgotten about that. And if you want to go the BASIC way, there's the excellent (well, as far as basics go, at least) PandaBAS, too: http://repo.openpandora.org/?page=detail&app=pandabas.zxdunny.2994

As good as basics go, and freely available on your pandora or (by following this https://sites.google.com/site/pauldunn/ link) ordinary 'puter. With the ability for sprites and windows and stuff, too.
Crikey, many thanks :-D

I'll add that it's got all the features of other BASICs (Except for the GL bits) and it's totally free, so the FOSS nazis can get in on it too! 

Run it full screen on your PC and pretend you're hacking away on a Speccy. You know it makes sense - it was this language that created a whole generation of coders, not that awful C-stuff you get taught these days.

D.
 
If I should give you a recommendation, it'd be to start up with something even simpler, like scratch: http://scratch.mit.edu/ This is a very visual language, both in what it does (it is geared towards making animations, interactive stories, and so on) and in how it is written - Instead of writing line after line of code, you program by connecting up graphical elements, which are designed to show off their function. For instance, the loop constructs visually surrounds all the code that it is repeating. Also, you can look at the shape of elements and see where they fit - A logical (true or false) expression is a diamond-shaped thing, and places  where you could use one is a diamond-shaped slot, so you can see that the logical expression "fits".


Does this sound a bit kiddie-ish? It is. But it is also the best thing I've see yet to actually visualise and understand what statements does and what their scope is, and so on. Highly recommended.
There is even a Pandora port of Scratch...

http://repo.openpandora.org/?page=detail&app=scratch
<urk>


<insert expression of disgust for graphical 'languages' here>

That kind of thing is all very well for starting off, but generally useless for doing anything serious.


int led = 13;

void setup() {
pinMode(led, OUTPUT);
}

void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
Code:
def greet(name):
    print 'Hello', name
greet('Jack')
greet('Jill')
greet('Bob')
What's so nasty about text-based programming? Once you learn the ropes, you can code very quickly, and, if you wish, take your skills to a very high level.

I'm not a serious developer, but I find graphical languages frustrating in the extreme (not to mention that they lock you down to one IDE, which you may or may not like.)
 
Well, I was recommending it for an absolute beginner, right? :)

The brilliance of it is in learning code structure, and the tools for visually stepping through the code elements so that you see the loops and branches being executed - These things that we that got weaned on ZX Basic ( :D ) already got so firmly entrenched in our bones that we've forgotten that it is actually difficult. And also its focus on visual stuff, that makes it easy to see the codes effects, both when it goes right, but more importantly, when it goes wrong.

I most certainly agree that you need to go to a "proper" programming language once you're going to do "serious stuff". But if you never untagle the branches of an if statment, you never get to that serious stuff.
 
Well, I was recommending it for an absolute beginner, right? :)

The brilliance of it is in learning code structure, and the tools for visually stepping through the code elements so that you see the loops and branches being executed - These things that we that got weaned on ZX Basic ( :D ) already got so firmly entrenched in our bones that we've forgotten that it is actually difficult. And also its focus on visual stuff, that makes it easy to see the codes effects, both when it goes right, but more importantly, when it goes wrong.

I most certainly agree that you need to go to a "proper" programming language once you're going to do "serious stuff". But if you never untagle the branches of an if statment, you never get to that serious stuff.
This, this, this-ity-this.

You cannot just learn from a language like C without some serious handholding, and not without a huge amount of willingness to let things just drift along until you understand them, taking things as read because the reasons they're done the way they are are so fantastically complex you'd never hope to get their drift until much later on.

With BASIC you can just dive in, make a few mistakes and no real harm done.

With C, you won't even get a meaningful error message. And just what the hell is "void main()" anyway? Does my program run from the top of the file, or where now? etc, etc.

Get proficient in BASIC, Scratch, Python, whatever - FORTH even (ok, maybe not). Then pick up a really powerful language later on. Or C, if you prefer.

D.
 
Forth is funny, really. I keep meaning to learn it, just for general weirdness.
 
Forth is funny, really. I keep meaning to learn it, just for general weirdness.
PandaBAS uses an internal FORTH-like bytecode for the interpreter :)

/me loves a bit of FORTH

D.
 
Last edited by a moderator:
I started on Codecademy a few months back, first with JavaScript then Python. I found it to be an excellent learning environment. No need to set up any compilers, etc. very bite sized lessons, plenty of help on the internal forums, and nicely addictive progress bars. I was amazed how easy python was to get into. I've moved onto C++/SDL now, but I'd totally recommend that python course to everyone.
 
Python is incredibly powerful and allows you to get away with pretty stupid and ineffective code. That's why some people don't like it and think it's slow, but that's what makes it so great for beginners! You are very likely to get some useful scripts to actually do complicated things for you, while with other languages you would still be trying to get your variables set up correctly ;)

It keeps you motivated, because you actually accomplish something. And for things you wouldn't know where to start there's likely to be a well documented package available that gives you all the functions you need to get it done.
 
F_Slim, I could say the same with basic, what about LUA? Don´t python and it share a similar principle?

I don´t know much about both, just basic and a bit of assembler on old machines.
 
I used to teach C to absolute beginners at my university. It works, even with pointers. (totally 5 whole days)

With C or C++ you have a lot of potential. You can easily learn something new, something better, a whole new way to solve your problem. But you don't have to!

Your whole program can just consist of functions, loops and some variables.

If you are coming from a language like Pascal maybe you make errors like this:



Code:
fancy_function_call;
and wonder, that nothing happens. Not even an error!

But if you learn developing from the scratch, I don't think, that you even get the idea to call a parameterless function without (), why should you? You learn a function call is function(); and you do it that way. ;)

So, what I want to say: C is a great language to learn first. Especially for total beginners.
 
beginners should learn what to program and how, not just learn a language, whatever the language...
 
definitely, but people should focus on giving nice tutorial and forget altogether the language discussion...
 
beginners should learn what to program and how, not just learn a language, whatever the language...
I find you can learn just about anything if you have a set goal in mind. Learning the Language, syntax and such just comes with getting it done. Now being good at it takes time..
 
Last edited by a moderator:
See, that's what scares me.  No error messages so you know WTF to look at!!

And all this stuff looks like Greek to me.

I'd love to learn something like C or Java that you could really program in...but I am afraid of it, because I'm afraid I'll do something that will like, blow up my computer or something.
 
I used to teach C to absolute beginners at my university. It works, even with pointers.
Yes, and the difference is that you (who are an experienced programmer) are there to teach them, for five days of concentrated work, with clear targets and help at hand when things get weird. That is a big difference from the situation where you sit by yourself, on your free time, to try to make sense of something that weirds out for some reason you can't understand.

I do agree that C is an excellent language for several applications, and it is small enough to facilitate it being taught quite quickly and still cover most of the important bits. But it isn't a beginners self-study language. When you are beginner enough to not know whether a problem comes from errors in your code, errors in your handling (the files being compiled is in the wrong place), error in operation (you have the wrong options for the compiler) or something else. Given what I know about Kumaki from the forums, I'm not sure I'd even try to teach her C face-to-face, much less recommend it for self study.

(This is not in the slightest intended as some sort of put-down towards Kumaki. It is what I gather about her pre-knowledge and how comfortable she is around the hairier bits of the computer)

Language does matter. And so does the environment in which the programmer works.

I'd still recommend Scratch to get the concepts down in an easy-to-follow way, and then go on to an interpreted language such as Python or by all means Basic (but don't go paying $100 for it!), in order to get into real programming without the extra complications of compilers, files, linking, libraries and stuff like that. Whenever she wants to write that higly optimised 3D shooter, she should of course go into C or one of its derivatives, but I estimate that time to be quite some way into the future :)
 
Oh, and one more thing: If you really want to learn programming, take a course! There are now several excellent alternatives for learning to program, online, free, with good teachers and well thought out examples. I've tried Udacity (https://www.udacity.com/) and found their CS101 to be very good - It is built on short video lectures, constant feedback, and an in-your-browser python editor with automatic testing facilities. Also, it has very active forums connected to each course, with lots and lots of people happy to help out, discuss and calm each others nerves. Completely self-paced, too.
 
Back
Top