5 Does and Don’ts of Programming
Comment your code.
Commenting your code makes it so much easier for someone else to read and understand what you were coding about, and also when you see your code after 6 months or a year you won’t be scratching your head “What the F#(k was I doing? “
Back up, back up ,save and git…
Save your code in regular intervals.Shit happens so if the power goes out or your IDE crashes or even Photoshop you want lose all of your progress.
Saving your code can be something you do in every line you write for coding languages like PHP but coding in Java or C can mean that you must write a chunk of code before you can
compile it properly.Saving can save your life or at least save you from a minor heart attack and a nervous breakdown when the lights go off.
Back your project to another medium is also necessary because disks fail or even you can accidentally press delete and lose everything.
Last but not least use Git or any other means of versioning system. Versioning can help you when you don’t know how you broke your perfectly working code.It’s so easy and the advantages of
Version Control Systems (VCS) are so great that we need another post for them.
When working on a project that evolves other programmers it’s a good thing to use pair programming. Two set of eyes are better than one after all.
Two people make less mistake and not because you will be embarrassed by the really silly ones but it’s more probable that they will be fix in the beginning.
Also the code will be easier readable because it is meant to be read by more than one person.
Just make sure no-one gets bored, staring at a screen without doing anything else is quite tiring. Take terms and do different tasks in each session, maybe one can code and the other can test and then swap.
Don’t be a programming language zealot.
It’s ok to be a evangelist but absolution is wrong is so many ways and so is proselytism. Every language has it’s strengths, merits but also disadvantages.
Don’t try to force other people that this Scala is so much better than Java or whatever. When the need occurs and if the person programming is open minded they will try to choose the right solution for the problem.
Don’t underestimate bash scripting
I know most people don’t like giving console commands, although it’s much more efficient than most GUI in many cases. But whether you are a system administrator or a programmer bash scripting will be useful for carrying out repetitive tasks. Trying to take daily backups of a website or even installing software to multiple computers.