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


Hmm, I hope I am not implicated in the 'mine is bigger than yours' suggestion, as really that isn't the case, at least not from my point of view. I've said I started with ZX Basic, used Game Maker (almost entirely GUI driven, no code), used Blitz Basic (simple language, easy to use graphics/sound/input) and settled on C/C++ with a nice API (which I have pointed out can actually look very similar to other 'simpler' languages). The code snippets were really there to show that in terms of what you type into each language, it is not so different. You can argue 'FOR TO NEXT STEP' are a bit nicer, but in reality I don't really see these basic constructs being a hurdle for a new programmers.

This probably sounds extremely harsh, but for someone looking to start programming, if they are put off from having a few short snippets of code (mostly less than 10 lines) which do some relatively advanced things (draw a sprite and move it around the screen) then long term I don't think the investment/reward ratio in games programming is going to be a positive one for them.

Finally, myself (and the same for just about everyone else here) have just given insights as to how they learned to program, the fact we are all here and now programmers (of some level of competence) suggests all routes are viable. I hope no one has been scared off, would be great to have more coders in the community!
 
In this thread now:

Now not only is OP completely put off programming but it's devolved into which language is better.

More important is learning programming concepts - which you can basically do in any language. 

Anything you learn in one language can be applied to another and if you get reasonably skilled in one language moving to another language is a piece of pie as your mind is orientated into that "do this, then do that" logical concepts. 
Thank you.

I was really beginning to get overwhelmed with the "Mine's bigger than yours" competition I seem to see developing here in this thread.

All these code snips and what not...jesus, it puts me off because it all looks Greek and complicated.  OOP was never something I liked anyway, it always freaked me outbecause it is SO DIFFERENT from the way I learned...way back in the 1980's.

And then I see this sort of stuff and feel totally hopeles, like I could never learn it.

Can we stick to possibly the merits of self-taught, versus one-on-one hand-holding versus a college course?

Because I truly WOULD like to learn.  but this stuff IS off-putting.

Maybe, without code-snips and without any "mine's bigger than yours" back-and-forth, we could talk about the relative merits of which language might be best for me to try to learn, in terms of leaqrnability and functionality.
Depends on your ultimate goal mate. 

What do you want to do? 

I suspect what you want to do is create games for the Open Pandora and if that is your ultimate goal then there are no if's or buts about it - C++ is the language to learn. 

Go to codeblocks and download and install http://www.codeblocks.org/downloads/26 (you'll want the full mingw support) 

Once installed watch this video 

https://www.youtube.com/embed/K5HdaQ5b9cQ?feature=oembed and rewatch it until you understand it. 

Also type it into your codeblocks and make sure you can get "hello world" to appear. Once you've followed Buckys C++ tutorials (think they go up to like lesson 50) he then does C++ SDL tutorials which is what you want to learn to create games for the Pandora. 

If you get stuck at any point logon to www.reddit.com/r/learnprogramming and ask questins away and you'll get almost immediate feedback.
 
Last edited by a moderator:
Kumaki, I think you should follow this link: http://www.codecademy.com

and click on the Python course, there are a series of 1-5 min tutorials that get you started.  I followed it from never having seen Python before and in a week (5-6hours of work) I felt like I was really comfortable with it.

Give it 10-15mins at least to see if you like it.  Even if later on you decide on a different language, time spend learning one language is strangely transferable into another.
 
Last edited by a moderator:
I'd say: Go to Udacity. Take their cs101 online course. It goes through the basic programming constructs, using Python, in a well-designed course sequence with available help, frequent feedback, and a good community around it. Python will be useful for you later - It runs straight off on your pandora, right now - and is close enough to the C-like languages (C, C++, C#, Java, ...) that you will have no problem transfering the concepts later.

EDIT: And, forgot to add - It is free of charge, and has some seriously big names on the list of teachers (Peter Norvig does one of the later courses, for instance). It is very much distance education done right.
Thanks for the tip-off, I just might try it....if I ever get some time!!
 
Kumaki, I think you should follow this link: http://www.codecademy.com

and click on the Python course, there are a series of 1-5 min tutorials that get you started.  I followed it from never having seen Python before and in a week (5-6hours of work) I felt like I was really comfortable with it.

Give it 10-15mins at least to see if you like it.  Even if later on you decide on a different language, time spend learning one language is strangely transferable into another.
Python has been mentioned as being DIRECTLY runnable on Pandy, right?

Because that is what I want.  I want to code stuff for Pandy.

And not just games, but some useful apps as well.
 
Yeah, it's one of those languages that pops up everywhere now. It's where the Pi in Raspberry Pi got its name. And it's also the language that is now taught in computer studies 101 at MIT... (Video lectures are available for free online), but codecademy is all you need to get started if you're on a PC.
 
Yep, if you start a terminal on the pandora and type "python" at the prompt, you get a python environment straight away. Possibly a bit bare-bones for proper development work, but quite enough to try it out, if you like :)

Code:
 
 $ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "Hello"
Hello
>>> print 2+5*3
17
>>> print "Na"*16+" Batman"
NaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNa Batman
>>> exit()
$
 
Last edited by a moderator:
Hm, what about semi-dummies?

I do recommend reading other people's source code if you have practiced a while with your preferred language. Are there any programs on the pandora with decently commented and accessible source code?

I'm especially interested in learning how to use the Pandoras physical controls. 
 
I'm especially interested in learning how to use the Pandoras physical controls. 
You mean the nubs? Take a look at main.cpp in the Microbes source code (which is not well commented and written in a relatively poor style), search for lines containing "nub0" or "nub1".

The other controls are all just like normal keys, so I guess you know how to read those...
 
All these code snips and what not...jesus, it puts me off because it all looks Greek and complicated.  OOP was never something I liked anyway, it always freaked me outbecause it is SO DIFFERENT from the way I learned...way back in the 1980's.

And then I see this sort of stuff and feel totally hopeles, like I could never learn it.

Can we stick to possibly the merits of self-taught, versus one-on-one hand-holding versus a college course?

Because I truly WOULD like to learn.  but this stuff IS off-putting.

Maybe, without code-snips and without any "mine's bigger than yours" back-and-forth, we could talk about the relative merits of which language might be best for me to try to learn, in terms of leaqrnability and functionality.
I must admit that I'm on Steven's side here. If you want to learn the principles of programming you first have to learn some basic concepts: loops, conditions, Boolean algebra... I know more than a handful of people who can't get this basic concepts.

If you have mastered them you have to use the given language elements of the programming language you choose. So if those little snippets seem like greek to you this is okay because they are like greek: Elements of a foreign language. But if they are putting you off it might mean that are not comfortable with programming at all. Maybe it just shows that you like programming languages more if they are more like written English (Basic, COBOL...)

From what you wrote I got the impression that you are eager to see quick results so python might well suit you. But be aware that you do need some time to get used to it (like to any other language) and you seem to be short on time. Which might rule out a college course anyway? "One-on-one hand-holding" is the prefered method nowadays (called couching here) but most of the times really expensive when you don't have a friend/relative/community which can help you. Teaching it to yourself might end in being able to write some small scripts but leaving a gap which prevents you from writing a decent app, because most tutorials do only approach basic stuff. On the other hand what can you loose but your interest in this particular language? 
 
I'm especially interested in learning how to use the Pandoras physical controls. 
You mean the nubs? Take a look at main.cpp in the Microbes source code (which is not well commented and written in a relatively poor style), search for lines containing "nub0" or "nub1".

The other controls are all just like normal keys, so I guess you know how to read those...
Thank you for your suggestion. The problem lies within the not quoted part: "... in your preferred language...". I don't like C/C++. But nevertheless I will look into that code if only because I like your programs a lot.
 
I must admit that I'm on Steven's side here. If you want to learn the principles of programming you first have to learn some basic concepts: loops, conditions, Boolean algebra... I know more than a handful of people who can't get this basic concepts.

If you have mastered them you have to use the given language elements of the programming language you choose. So if those little snippets seem like greek to you this is okay because they are like greek: Elements of a foreign language. But if they are putting you off it might mean that are not comfortable with programming at all. Maybe it just shows that you like programming languages more if they are more like written English (Basic, COBOL...)
I cannot read or work in C or C++ at all. It really is impenetrable, and the hurdles to even getting it to build source are putting me off.

So I wrote a BASIC interpreter. I can now code on my Pandora (or my PC, my Mac or my Pi) in a very full-featured BASIC. Including sprites, advanced graphics and sound systems and lots of other cool things. I'm working on adding inline assembly to it right now, so I'll get the best of both worlds.

It really would seem that my inability to grasp C or C++ does indeed mean that I'm not comfortable with programming.

But I'm comfortable with that.

D.
 
All these code snips and what not...jesus, it puts me off because it all looks Greek and complicated.  OOP was never something I liked anyway, it always freaked me outbecause it is SO DIFFERENT from the way I learned...way back in the 1980's.
If you have mastered them you have to use the given language elements of the programming language you choose. So if those little snippets seem like greek to you this is okay because they are like greek: Elements of a foreign language. But if they are putting you off it might mean that are not comfortable with programming at all. Maybe it just shows that you like programming languages more if they are more like written English (Basic, COBOL...)
Just as a comment here - In learning theory, there is something called "Treshold concepts" - Difficult stuff in a subject that you need to 'get' in order to proceed. Programming is chock full of these, little things that seem totally simple once you've passed them, but can stump you completely when you bump into them. Variable assignment and use. Procedure calls. Recursion. Difficult stuff (possibly) before you "get" them, transformative afterwards. 

The abundance of treshold concepts in programming is one of the things behind the difficulty of actually finding a good method of teaching programming - There are so many places for students to get stuck, and they might get stuck at so different places (You do not necessarily get stuck at a TC, but you may). Also, there has been studies on the psychology of students facing a TC or two, and I'd say Kumaki is almost letter perfect - The classic reaction to TC stuckness is to be  frustrated, dismissive (this is not important, anyway), blame the teacher ("Come on! Just tell me how to do it!"), and stuff like that. Rather than say that she is "not comfortable programming", I'd say that she knows enough to recognize a stuck point, and reacts to that :D

The good thing is that usually, you get past a TC block. When working on it, either consciously or unconsciously. The bad thing is that there is no guarantee for how long it takes :D
 
Sorry, if that was misunderstanding. I didn't mean that someone might be not comfortable with programming if he/she doesn't like reading C/C++. As stated before I don't like C/C++, too.

What I meant was: In my experience there are people who can't program at all. And feeling uneasy reading these snippets looks to me that there is a tiny chance that Kumaki might be one of this persons (Hey, there are literally thousands of things I'm not capable of doing though I would like to learn them). BUT this is only pure guesswork based solely on my observations. I just wanted to express that such a possibility exists in opposition to "Everyone can learn programming it's just a question of the right language".

But I might be wrong and I can fully agree to Moxie's reasoned statements about TC.

Edited for better understanding.
 
Last edited by a moderator:
I must admit that I'm on Steven's side here. If you want to learn the principles of programming you first have to learn some basic concepts: loops, conditions, Boolean algebra... I know more than a handful of people who can't get this basic concepts.


If you have mastered them you have to use the given language elements of the programming language you choose. So if those little snippets seem like greek to you this is okay because they are like greek: Elements of a foreign language. But if they are putting you off it might mean that are not comfortable with programming at all. Maybe it just shows that you like programming languages more if they are more like written English (Basic, COBOL...)
I cannot read or work in C or C++ at all. It really is impenetrable, and the hurdles to even getting it to build source are putting me off.


So I wrote a BASIC interpreter. I can now code on my Pandora (or my PC, my Mac or my Pi) in a very full-featured BASIC. Including sprites, advanced graphics and sound systems and lots of other cool things. I'm working on adding inline assembly to it right now, so I'll get the best of both worlds.


It really would seem that my inability to grasp C or C++ does indeed mean that I'm not comfortable with programming.


But I'm comfortable with that.


D.
I don't see how you can consider C to be impenetrable to read but have no problem with assembly. That makes about as much sense to me as someone who cannot write or read English but has no problem to work with Morse code.
 
I don't see how you can consider C to be impenetrable to read but have no problem with assembly. That makes about as much sense to me as someone who cannot write or read English but has no problem to work with Morse code.
And yet there you have it. I cannot even fathom out a makefile (I usually get Sebt3 to do them for me!), and curly braces just disappear into an obfuscated mess when I'm presented with them.

Assembly is closer to BASIC than it is to C, and when you start to get into OOP with C++ you move even further away from assembler.

Anyway, I suspect I'll never really learn C or C++ beyond the basic hackery I need to port stuff to the Pandora (FMN was written in C++ and needed quite a lot of heavy modification to get running on Pandora). Having Lazarus available both as a cross-compiler and natively on the pandora means that I can continue to develop in Delphi and instantly get results on the Pandora.

So I have no need of C at all :)

D.
 
Well, nice to see I'm not the only one who doesn't like OOP.

It's just plain weird-looking.  Not like the stuff I learned which is more like English than not.  even PHP, in which I'm self-taught, is English enough for me to have figured it out.

But I don't see anyone able to write a Pandy program in PHP.  I use it strictly for programming modules for my Legend of the Green Dragon game website.
 
Last edited by a moderator:
I use OOP in PHP a bit, mostly with code that I use a lot, like a class that just handles database calls, dynamically generating SQL Insert,update and delete queries from associative arrays and such.

It's ugly for sure compared to other languages.
 
Back
Top