DEV Community

Discussion on: What Leads to Coding Mistakes?

Collapse
 
skyloft7 profile image
Mohammed • Edited

Testing (or lack thereof).

It's super important to make sure that your code works for all inputs, valid or invalid (and handles them gracefully). For example, what if the math works out to a division by zero in a certain statement? Or if the file name itself has a '.' in it and now your code thinks the file extension is "InsertFileNameHere"?

Image description