Your bad coding habits - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Discussion (
https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: Your bad coding habits (
/showthread.php?tid=480890)
Re: Your bad coding habits -
ThaCrypte - 17.03.2014
I am pretty messy xD Many functions and stocks spread troughout my whole script. xD
Re: Your bad coding habits -
Ceathor - 17.03.2014
I
never put comments in my code unless they are reminders to myself such as "Hey, do this cause you need to do it to finish this feature". I haven't really made any scripts intended for release, which is part of the reason.
Also, I use loops all the time, everywhere. I'm sure if you search for "for(new" in any of my scripts you'll get a ton of results... Might not be a bad habit at all times, but I'm sure somethings I do can be done better without loops.
Re: Your bad coding habits -
Ada32 - 17.03.2014
^i don't use comments at all. IMO it would be a waste of time since everything in my script fairly easy to understand (well, for me.. because i wrote it...)
if you're a library writer, then you should comment/document almost everything (it helps people like me browse through quickly and find stuff with relative ease (just my opinion)
Re: Your bad coding habits -
CuervO - 17.03.2014
Being lazy enough to not to stop using PVars and not correctly using enums.
Re: Your bad coding habits -
Infinity - 17.03.2014
Quote:
Originally Posted by Ada32
^i don't use comments at all. IMO it would be a waste of time since everything in my script fairly easy to understand (well, for me.. because i wrote it...)
if you're a library writer, then you should comment/document almost everything (it helps people like me browse through quickly and find stuff with relative ease (just my opinion)
|
Look back at your code in 6 months or so and see if you'll say the same. Unless you have a nearly empty and very simplistic gamemode, you will most likely not remember why you did some things the way you did
Re: Your bad coding habits -
ikkentim - 17.03.2014
Code non stop for 8 hours.