Hello everyone. I'm basically new and over here from the Blitz website.
I code by using a diagram first which includes a rough sketch of what all the user screens will look like.
Then I sit down and write the code that will function as the front end of the screens that I created and then I write the back end of the software last.
welllll... my code... is somewhat like the "john wayne" style you described... but not completely. here's a quick idea of how i do things when starting anything that is going to end up large and/or complicated:
- Start with a few files in the beginning, usually Init, Procedures, and Main.
- Build a basic framework in which i can easily navigate. generally i do not have much code in the main loop, usually i have everything in there just do a few small checks (if needed) and call a procedure that deals with it.
- Rewrite everything 5 times. Yeah, pretty much that's what i do. I go through my code, and as i add more things to it... i realize how i did other things wrong.. or... not the best way at least. Then I go back to optimize them. usually i optimize for the least amount of code to do the job. unfortunately, it's not always the fastest code.. but honestly with anything i've made thus far in PB, speed has never been an issue.
If i need to find something, i'll usually start by looking in the main event loop, then i can find the procedure that deals with *whatever* and then move to the procedures file and easily navigate to it. I try to keep my procedures somewhat small.. so if it's something very complex, i split it up between a few, simply for my sake when coding.
> no procedure should be larger than the screen height
I disagree. Procedures can be fully self-contained routines whose length
depends on what task they perform. Such tasks may not be simple little
lines of code. And it depends on your screen resolution, too.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
You could / (should) put the Select-EndSelect stuff into a procedure
named GetVKOfString() or something like that
And after my statement earlier in this thread, I explained why I handle
it like this, I won't write it twice