|
|
|
|
|
by JScarry
3784 days ago
|
|
I'm fixing someone else’s code right now and a few single line comments would have saved my client thousands of dollars. Today I put in a log statement to see why the code deletes data from the database if there is no new temperature data for the time period. The cron job has been running all day and so far every time it attempts to delete the data, there is no data to delete. Another line runs a different script if the time is 15:00. No idea what is magical about that time. I added a bunch of log statements to see what happens at 15:00 that is different from every other hour of the day. So far I have no clue. I’m sure the original coder had a reason for inserting these bits of code, but damned if I know what it was. There are dozens of instances like this in the code. A one line comment would have saved me hours of work and the client several thousand dollars. |
|