Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
User Journal

Journal techpawn's Journal: Time to Come clean

I just took a procedure back to one of my developers, not for anything that was particularly WRONG with his SQL code, but because I just didn't want to have to figure out time in seconds needed to change from 8am to 9am if we ever decide to change it in the code if the future. I gave him the code that could fix it, and I felt vindicated that a senior developer agreed, that if you're setting the time to a static value just set it as a string and convert it. It's the same value in the end and far less headache when we look at it later and much easier to update.
When I went over to help him with it (frankly, it seemed to take him a while) he was staring at his OWN code, which while documented was quite confusing. We rewrote it and I told him that if it was hard for him to figure out, what about the other guys who may have to look at it later. So, yes while there may be some nifty date function that buy you a nanosecond in execution. I'm a DBA that says burn that to save us an hour of future development time and frankly... I'm lazy, I didn't want to do the time conversions myself to make his date functions work.
This discussion has been archived. No new comments can be posted.

Time to Come clean

Comments Filter:

Without life, Biology itself would be impossible.

Working...