telecoda
Still Fresh
I've been around the block a few times coding wise, new to the GP2X though.
Thought it might be worth compiling a list of tips to make life easier for new developers though.
Feel free to add a few yourselves.
These are a few tips to make life generally easier in the long run, instead of ripping off your eyelids in frustration as it JUST WON'T WORK!
i.) Make regular copies of your working code. As soon as you get to a point in your code when something is fully working. Take a copy of the full directory structure. Year ago I never adopted this and would just rework the same old tired piece of code. Introduce a bug somewhere and be unable to unravel my mess.
(Didn't do this last week and got in a hell of a state with forward declares and includes in my code and took me two evenings to get back to square one....)
ii.) Working code first, optimised code second. Get something working first, THEN concentrate on speeding it up to eek out the optimum performance possible later. Drop in your ARM assembly later when you're ready. A C/C++ function will do at first.
iii.) The debugger is your friend. Step through the code when it is failing, look for uninitialised pointers,variables etc.
iv.) If something can fail code for it to fail. If you are calling an initialisation function that returns an error code. Add some so to check if was successful or not. Don't let your code blindly continue assuming everythings ok.
v.) If you spot a bug in your code, fix it now. Otherwise you'll forget it and it'll come back and bite you later, in one of your 3am coffee induced debugging sessions.
vi.) Don't be afraid to ask. Noboby knows everything. There is a great community here, a few people with god like abilities do appear to know everything GP2X related but the are not shy sharing their knowledge.
vii.) Start small. Don't run before you can walk. If you are completely new to coding there is a LOT of stuff you've got to learn. Toolchains, language syntax, computer logic in general, help libraries like SDL.
We all started with a "Hello World" app of some sort. Feel a sense of a achievement even if you have only got that far. There are an awful lot of people in this world who couldn't even do that.
viii.) Stick at it, have fun. If you run into a problem, be like a dog with a bone. Keep at it until you crack it. The sense of achievement afterwards is what keeps us idiots coding time and time again with often no financial reward.
Take or leave this advice.
Thought it might be worth compiling a list of tips to make life easier for new developers though.
Feel free to add a few yourselves.
These are a few tips to make life generally easier in the long run, instead of ripping off your eyelids in frustration as it JUST WON'T WORK!
i.) Make regular copies of your working code. As soon as you get to a point in your code when something is fully working. Take a copy of the full directory structure. Year ago I never adopted this and would just rework the same old tired piece of code. Introduce a bug somewhere and be unable to unravel my mess.
(Didn't do this last week and got in a hell of a state with forward declares and includes in my code and took me two evenings to get back to square one....)
ii.) Working code first, optimised code second. Get something working first, THEN concentrate on speeding it up to eek out the optimum performance possible later. Drop in your ARM assembly later when you're ready. A C/C++ function will do at first.
iii.) The debugger is your friend. Step through the code when it is failing, look for uninitialised pointers,variables etc.
iv.) If something can fail code for it to fail. If you are calling an initialisation function that returns an error code. Add some so to check if was successful or not. Don't let your code blindly continue assuming everythings ok.
v.) If you spot a bug in your code, fix it now. Otherwise you'll forget it and it'll come back and bite you later, in one of your 3am coffee induced debugging sessions.
vi.) Don't be afraid to ask. Noboby knows everything. There is a great community here, a few people with god like abilities do appear to know everything GP2X related but the are not shy sharing their knowledge.
vii.) Start small. Don't run before you can walk. If you are completely new to coding there is a LOT of stuff you've got to learn. Toolchains, language syntax, computer logic in general, help libraries like SDL.
We all started with a "Hello World" app of some sort. Feel a sense of a achievement even if you have only got that far. There are an awful lot of people in this world who couldn't even do that.
viii.) Stick at it, have fun. If you run into a problem, be like a dog with a bone. Keep at it until you crack it. The sense of achievement afterwards is what keeps us idiots coding time and time again with often no financial reward.
Take or leave this advice.