11
HnDev
2y

Just had a discussion with a coworker. I noticed he was storing dates as string in mongodb, saying it was better for comparison and because he stored them in UTC. WTH, mongo already stores all dates in UTC and a string date is imposible to compare. I wasted 8 hours finding that last part out.

Comments
  • 5
    This is not how this works.

    This is not how any of this works.
  • 3
    Ok but hear me out. If the dates aren't strings, how will I be able to read them?

    /s
  • 1
    Your coworker do not understand mongodb at all, its that simple.
  • 0
    your coworker wants you to get good at regex . /s.

    but seriously i've run into such devs, despite telling them this is going to come back to bite them or anyone else... data modeling is good in the long run.... i will shoot you etc... they still don't create a field for datetime...lazy and or psycho people
  • 0
    Your coworker is an Idiot.
    Make him fix the problem, and any and all bugs that releate to it.
  • 0
    Worst thing is, he told me it’s his “preference” and he does it all the time.
Add Comment