DEV Community

Aliameen Fatunbi Adebukola
Aliameen Fatunbi Adebukola

Posted on

What has working with multiple languages been like on your projects?

Hey everyone. I’m exploring a programming-language project and want to understand how people currently work across languages.

Thinking about your most recent project where code in different languages needed to work together:

  • What were you building, which languages were involved, and how did they communicate?
  • Did anything go wrong at that connection? If so, what happened, how did you investigate it, and roughly how long did it take?
  • What tools or approaches did you use, and how well did they work?

If it was straightforward, I’d like to hear what made it work well too. One concrete example is enough.

Top comments (4)

Collapse
 
beusebiu profile image
Eusebiu Balan •

Mine is a habit tracker: a Laravel (PHP) backend, a Vue web app and a React Native mobile app, all talking JSON to the same API.

For me the painful boundary is dates. PHP, the browser and the phone each have their own idea of what today is, and a date that crosses the API without a timezone gets read differently on each side. A check-in made late at night can land on the neighbouring day, and it only happens for some users at some hours, so it looks random until you line up where each side decides the day.

Collapse
 
n1x3n profile image
Aliameen Fatunbi Adebukola •

Thanks for sharing this.

The late-night check-in landing on a different day seems to be the problem, How did you eventually track down the cause, and what did you change to fix it?

I’m also curious roughly how long did it took to find and narrow down the issue and whether the issue has resurface/re-occur since.

Collapse
 
beusebiu profile image
Eusebiu Balan •

A user far enough east lost a streak and told me roughly what time they had checked in. Until then it looked random, because nearly everyone using it lived within an hour of me.

The change was to stop sending a bare date. The client sends the UTC time plus its offset, and the server works out the local day from those two, so the backend and both apps agree on which day it was.

Finding it took a lot longer than fixing it. Not seen it come back since... the case I still watch is someone travelling, since their offset moves in the middle of a streak.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.