jeudi 20 juillet 2017

What precautions you take to write a bug free code?

Which silly thing you missed in your code that costed more than 3hrs to figure out later? What is your precaution not to do the similar mistakes again?

I recently copied a code from stackoverflow for calculating gcd. I failed to recognize that function failed for -ve numbers. Eventually wasted good time to figure it out. (Precaution) Later I realized never to copy code which does not defines contract. Please share your mistake and precaution and help saving other's time too. :-)

Aucun commentaire:

Enregistrer un commentaire