r/badcode • • Jul 09 '20

java Good practice: Always call java.lang.Object's constructor

Post image
704 Upvotes

52 comments sorted by

View all comments

Show parent comments

46

u/metahuman_ Jul 09 '20

Ah, we code in frenglish where I work. GetAdresse, GetDictionnaire, sendMessageToUtilisateur...

9

u/leftsaidtim Jul 09 '20

I’m really curious if this works well for you and your team. As a native English speaker I’ve had to work in mixed languages codebases that my company inherits sometimes and have always found it to be significantly worse than when the codebase has names that stick more to one language or the other.

But since I moved abroad a while ago, I’m finding that this seems to work well for some of my clients and I’m wondering if I was too narrow minded to actually see the benefits here.

13

u/LeiziBesterd Jul 09 '20

I find it awful. It's always best if you can do everything in English, because all the non proprietary will be English anyway.

Source: lives in non English speaking country and have worked with that type of mixed language codebase

2

u/metahuman_ Jul 10 '20

Well all the business related code is in french because it's all done here, in France. We deal with some foreign companies and use their terms when appropriate but thats all. It's way easier to speak to the business guys when you both use the same words

1

u/leftsaidtim Jul 10 '20

Ouais, exact. Thats precisely what I’ve been realizing - that clear communication and shared language is SO crucial. It requires the entire dev team to be somewhat fluent in English as well as French, which can be challenging as some other commenters pointed out.

1

u/blahbah Jul 10 '20

In my experience, mixed languages usually means someone in the team:

  • is insufficiently proficient in English

  • can't be bothered to lookup a proper English translation when naming their stuff

  • generally doesn't care about the team's coding standards

  • doesn't get their code corrected by other members of the team

You can't really expect a good codebase with all of these

2

u/blahbah Jul 10 '20

Ouch... I got unpleasant flashbacks from these.

I'd try to push for more consistent coding standards, and also update my resume...

2

u/metahuman_ Jul 10 '20

We are actually pushing toward consistent coding standards ^^ and the french part is sadly kind of needed because the business part is in french and no one can translate/understand it all in english, and mixing with english allows us to keep short method names. Like we use "get" and not "recuperer", etc

1

u/blahbah Jul 10 '20

Sounds logical enough. I mean i've done that too, tbh, it's just mildly infuriating to read code you've written that way :-D

1

u/rzk1911 Jul 09 '20

And we got a winner