Qbasicnews.com

Full Version: I just noticed, that when I'm coding...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
When I'm coding really complex (for me) functions and such, I'll say the stuff out loud to make sense of it. Just now, I was saying to myself out loud "okay... he says when isfalling equals zero then you can start going downwards..." i think wheni said "he says", i was refering to logic.
I think I've done that before, but not with QB... oh wait... I have when trying to read Optimus' code Tongue
interestingly enough, when I program, the code writes itself... i'll be sitting there and try to figure out what I just did that made the thing run so slow...

<-- was also, interestingly enough, working on a GUI called Optimum... gave up.
I should probably comment my work now that it's getting more complex. You know?
Quote:I should probably comment my work now that it's getting more complex. You know?

Commenting is for potheads or people working for potheads.
I know, and I've never commented any code in my life! But then again, I've never actually made a good QBasic program in my life yet either Wink
Quote:
seph Wrote:I should probably comment my work now that it's getting more complex. You know?

Commenting is for potheads or people working for potheads.
It's wierd, because I tend to make my variable and procedure names descriptive enough that comments would be extraneus... well... at the time anyway. Give me my own source from 5 years ago and it's a little different story...
Quote:And only a crackhead would say *that*.

Whatever you say, old man Wink
YOU PEOPLE DON'T COMMENT?
I have been told by many people (mainly C++ programmers) that I don't comment enough. Because I don't comment the main body of my code at all (except for things like):
"REM Put all other item names here"
What I do comment is my variable lists, because with my games I have a few hundred variables. Sure, they have descriptive names, but I dont want to take any chances. I do this not just for myself but for others. Even though I say now that I will never release the source for any of my games (stop using other people's code, lazy fucks Wink I know, I know, looking at other people's code can be helpful. But more often than not it just brings the creator of the code/game a lot of grief. What do you think the creators of Vanillaband think of all those Zbands, Cthbands, Easybands, Drbands...) I never know what may happen in the future. Even though I don't do it well, commenting is a good programming practise. I'm sure that many of us have experienced this, at least in our early or more drug-affected programming days:
"DIM SHARED var.foo(100)? What the hell?"
or
"DIM SHARED snoz.bucket2? Ah, yes. That's used for the difficulty level. If I increase it... what? Why is it purple?"

As you can see, I have mainly experienced this with variables.
Pages: 1 2