3
Jifuna
5y

Guess who’s back after a few months. I was so frustrated because of something at work today that I needed to vent.

So currently we are working together with a frontend company, we make the api, they do the frontend.

I got a few feedback points, one of the things was that they asked if the dates could be formatted in our language. I said no that’s not really recommend because the api should only handle data not translations or date formatting.

They responded with that it was because of speed... Date formatting is literally a few fucking milliseconds. Technically it is even slower serverside because the fact that I need to process it in a serverless function which is probably less powerful than the average client machine.

Fucking lazy fucks.

Comments
  • 2
    I'm a DevOps engineer, and I know that point. Frontends handle date manipulation. Bad things happen to people who break that rule.
  • 2
    @TheCommoner282 hahaha! I'm still recovering from the last app I supported with "time zone issues". Hours and hours of meetings all deciding that we fucked up not using GMT in the backend and letting the FE do the work.
  • 1
    @Jifuna ..One fucking line of code in the frontend to get the local date formatting, dozens of classes to get the same thing from a backend. Stupid!
  • 2
    Just send them unix timestamp and link to momentjs. FFS, frontend is more than CSS!
  • 0
    @devJs I thought of doing that but my boss was like now we can send them another invoice because of this change so quess who’s gonna implement it today?
  • 1
    @Jifuna sorry to hear that! I'm on FE side of things and prefer to get timestamps from back, it solves so many potential issues. Just recomending to make this impementation easily reversible as they probably will get to the stage when they will say something like: 'we have issues now, can you make it like it was before?'
  • 0
    @devJs Yeah, you’re right. I was already thinking of adding an optional dateType parameter. Especially because this api call wil probably be used by our own microservices too.
  • 1
    @Jifuna Eeeey welcome back man!
  • 1
    @linuxxx Thanks man! I was suprised you were still on here
Add Comment