The data for the SQL db used in my PHP code comes from an excel file made by non-programmers. When I can’t manage to explain an issue that I am having with their excel file, I usually just try to code around it. This has lead to some pretty patchy code on my part. Does anyone else have experience with this? Is it generally better to try to code around others or is it better to be firm and demand a more robust table structure?
Share
If you decide to be firm and demand a more robust table structure, you will need to provide the non-programmers with clear, concise, and unambiguous documentation, as well as good error reporting tools to allow them to more quickly and easily figure out when they have made an error and what it is. There is nothing worse than having someone come yelling at you that “you need to do things this way, or the program won’t work” (or even saying it nicely but firmly), and then three months later having to do the task again and having no way to figure out what the criteria are without going back to ask the programmer.
So, sometimes it is easier to just code around the bad data. It also helps make your program more flexible and robust. But if you’re starting to bend over backwards to do it, then make sure there are easy ways for the non-programmers to check for errors and that the messages are clear and unambiguous, and there is good documentation on what is expected of them for the input.