Great guys! epsy and Jip. Thanks for improving on my version
Hey I'm not blaming you or anything nux. It's just that my mum and dad always say I make things more complicated than they already are

That's what I meant. Even my teachers are saying that about me. Like in my 10th grade, when my teacher was coming around to collect our papers (coloured and white paper). He indicated that I put the coloured in the round box while the white in the square box. So when he came to me while I just finished, when I looked at the boxes, he reverse them which caused me to cross my arms to put the sheets in. It was hilariously funny at the time
nux wrote:This is why we cant have nice things. Newbs should not learn from other newbs, it is really really stupid. This is how bad habits propagate. Same goes for the other way, do not code for newbs, dont try to teach, because you will most likely be wrong and they will think it is ok to do those things.
Well that's the thing. You may say that Newbs shouldn't learn from other newbs but what can you expect? They are desperate to learn. I don't blame them. Without a proper instructor, they tend to do something they find easier to achieve wihile we don't. In this case, I found my way easier but for you it seemed rather silly. Oh well...
nux wrote:What do you mean exactly with everything you do it too complex? Have you tried making it simpler? Maybe you think its complex when in reality it isnt. Whatever the reason, you dont get "self_control" (whatever the hell that means) from over-commenting your code.
You see, when I meant "self_control", what I was trying to say what that I wanted to be able to control most of the variables within the code so as not to lose an idea of what's happening in it. As you might have/not understood, I have short term memories. So sometimes I tend to forget what I'm doing quickly than other times (a childhood accident that nearly killed me and the same for my dad though he slipped

)
nux wrote:There is a balance you have to find yourself, no comments is as bad as too many comments. Just check out other people's scripts, not simple ones like this one, but really complex.
BUT nux, whenever I checked out the login scripts or the smf php scripts, they have so much comments, you think they are wasting their time on it?
nux wrote:Everything i pointed out, i did from a mentoring point of view. If you are not able to take constructive criticism, your code will suck, or if you are good enough, it will take you longer to realise there is a better way.
Hey, I appreciate you for it. It shows me that I got to improve but right now I can't. Studying full time with 4 subjects while keeping up with tron news and doing work is no easy joke

It's actually a lucky coincidence that I can at-least fit my time into coding something.
nux wrote:Always assume the users are going to feed badly formatted data to your script, its unintentional most of the times, so handling this properly is YOUR job, not theirs. Account for the idiots.
Ya. I know but as I'm not exactly good at making it good, it's up to the users themselves to be careful.
Jonathan wrote:You'll often see overly verbose comments in tutorial code, to help people understand the language. But if it's holding you back with real code, you're doing it wrong. If you don't understand your tools, you can't do much, and indeed that kind of code tends to be riddled with mistakes. Don't get me wrong. The comments are not the cause, just another symptom of a novice programmer. If you just stop commenting on obvious things it won't magically get better, but do consider how you could improve to get there (where you'll also get more of a clue of what you're doing, besides manipulating low-level statements).
Can you call the comments that SMF guys write on their scripts "annoying"?

I found them helpful when I was trying to link up my sql and the script of login from myportal.
Oh nux, this is one thing I'm going to share with you. I studied in programming at highschool from grade 11 to grade 12. In grade 12, I started learning VB and seriously it was such a headache but on the other hand, I was loving it. So imagine my shock of discovering two years later when I went back to my old source codes/ I had no clue of what I did. The comments I left on some of them made sense to me while others... simply no clue at all. It probably had something to do with my short term memory or something to do with the lack of memory strength I have. I know my parents keep complaining I can't remember things for too long but the doctor said I suffered a severe head injury so they aren't saying it to my face at-least (but I can hear them

). In any case, from that point I thought commenting might be a good idea.