PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Getting Started...

Hi, I am just entering the world of programming and have decided to try to learn to program for PPC. I took a class this year in school and started with QBasic(woot!) and am now on visual basic. I know how to do most things with VB just through my own experimenting. I got the embedded Visual Basic and started doing a few things with it, but I think I want something with more capablities. So I'll finally get to the point: What would you suggest for a begginning programmer? I'm talking as far as what languages to try, programs to download, or books to read. I really want to develop some stuff, and I want to get into some more complex languages with more capabilities. Also, if possible, what PPC languages have the most examples and places for help(i'll probably need some :wink: )?

Thanks for any and all comments and opinions and sorry if this subject has been posted.

-Ryan Donnelly
Ultimately, if you want to do anything serious you will need to use Embedded Visual C++ (download from MS site). Learning enough C++ to get started is not as hard as you may think, and I would recommend jumping straight in because you will at some stage be ending up having to learn it anyhow. If you don't have much of an idea about windows programming in general then it may be a steep learning curve. Another option to consider if your motive is purely educational is to use .net - you should be able to get something running more quickly. In any case, it might be good just spending a day or three reading through the forums here and start familiarising yourself with some of the topics that are talked about because you will no doubt be running into the same problems everyone else has and if you can have that info stashed in the back of your mind it could be useful. Hope that helps a bit. Also, the people here are very helpful if you have troubles.
i suggest you try c++. you would need a reference, buy any c++ book. and before you trying to code for PPC. spend sometime programming for the desktop.

i agree that people here at the forums are very helpful.
Learn C first. O'Reilly's Practical C Programming is a good book.
Yeah, learn C then C++. You can't live without them in the PPC programming world. After you should take a look at http://ppl.arwen.com if you are looking for a complete language to do things more easily. :wink:

Regards,
Kornalius
There is a common mistaken that beginners make and I can't emphasis this point enough: WRITE SOME CODE!!

People tend to think (or hope??) that just reading some tutorials and/or books is going to do it for them. For some it works, but for most it's just not enough and you frankly won't get very far until you simply start writing some code.

Now that you've had a basic introduction to programming in QB and VB, which means you have in your head most of the basics like looping, conditionals, variables, etc., your next step, IMHO, is to simplu come up with a project and start doing it. Pick something simple, but challenging enough that your going to have to work at it. A simple game is a good thought, maybe a relatively simple puzzle game like like the prototypical peg-jumping game, or something like Checkers. Do this to really get all the basics sunk in. Once they are second nature, choosing a language is almost a secondary concern, and then other things come into play...

As others have said, C/C++ is your best bet on a PPC. I would suggest straight C at first so that you are concentrating more on the syntax of the language and getting the "procedural" part of programing down well. I suggest this because you really have a choice to make... do you want to learn procedural programming well (which is what you've been doing 'till now, mostly), or do you want to jump right into object-oriented programming?

My argument to people is always that since you have to do procedural coding WITHIN object-oriented programming, why not solidify your understanding of procedural first and THEN make the leap to OOP? OOP is in many ways a paradigm shift in terms of how you DESIGN an application, but in the end you'll be tieing your objects together with procedural code anyway, so I say learn to walk before you run.

C++ is, in a simplistic view, just C, with the addition of objects. Most of what you learn in C will still be valid in C++, but when you move to C++ you'll be tackling the whole object-oriented paradigm, so again, in my opinion, there's a logical progression to it.

Some will argue that most software these days is built on OOP principals, so therefore there is logic in just jumping right into it. I can see that point, but I think it diminishes the importance of knowing basic programming, which is still procedural.

Learning how to "think like a computer" is really what programming comes down to. What I mean by this is being able to construct a logical flow of instructions in sometimes excrutiating detail is what programming is all about at it's most basic level. True, you can abstract the complexity of a system away by thinking in OOP terms, but to implement your objects your still going to have to write out a series of instructions.

But, all this aside, my basic point is simply to come up with a project and get to it! What language you choose or whether you go write to OOP techniques is less important than simply doing it (to steal and paraphrase Nike!). You'll learn more by looking at relatively small pieces of example code and trying to implement them and modify them in your own project than reading any book in my opinion. In the beginning, spend time with Google trying to find code that does what you need, mostly, and then work on changing it here and there and see what happens. You'll learn much more that way than doing anything else I can think of.

I speak from over 20 years of experience, but I remember starting out like it was yesterday (and frankly I only learned C maybe four years ago). I remember long nights of looking at others' code, trying to understand it, and ultimately stealing it for my own use, and then hacking the hell out of it in the process. Doing is learning!
C++ contains some much more complicated topics as opposed to C, such as OO, which is why I would rather learn C first.