When the Ubiquitous Language isn’t English William Bartlett (@punkstarman) Zenika Nantes

Introduction

Who am I? Introduction Parents from USA and UK. Living in France Heritage: • England • Wales • Germany • Quebec • France Bilingual English (L1), French (L2) Hobby linguist since reading The Hobbit (Tolkien) William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 2 / 40

What Language Do You Code In? William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English Introduction 3 / 40

What Language Do You Code In? Introduction English, duh! William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 3 / 40

Outline Introduction Why English isn’t the obvious answer The solution Tips and tricks William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 4 / 40

Why English isn’t the Obvious Answer

⚠️ Usage is always relative to context. Languages evolve. Why English isn’t the Obvious Answer Descriptivism > prescriptivism William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 6 / 40

⚠️ Usage is always relative to context. Languages evolve. Why English isn’t the Obvious Answer Descriptivism > prescriptivism ⚠️ Trigger Warning: Language politics can cause harm. No language or dialect is better than another. William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 6 / 40

We Code In English Why English isn’t the Obvious Answer Which English? William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 7 / 40

We Code In English Why English isn’t the Obvious Answer Which English? • UK, USA… William Bartlett (@punkstarman) colour or color? When the Ubiquitous Language isn’t English 7 / 40

We Code In English Why English isn’t the Obvious Answer Which English? • UK, USA… colour or color? • Australian, Canadian, Irish, Scottish, South African, Indian… William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 7 / 40

We Code In English Why English isn’t the Obvious Answer Which English? • UK, USA… colour or color? • Australian, Canadian, Irish, Scottish, South African, Indian… • Cockney, Geordie, Philadelphia African-American English… William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 7 / 40

We Code In English Why English isn’t the Obvious Answer Which English? • • • • UK, USA… colour or color? Australian, Canadian, Irish, Scottish, South African, Indian… Cockney, Geordie, Philadelphia African-American English… Singlish, Spanglish, Runglish… William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 7 / 40

We Code In English Why English isn’t the Obvious Answer How proficient are you? CEFR Level Description C (C1, C2) Proficient user B (B1, B2) Independent user A (A1, A2) Basic user William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 8 / 40

Difficulties Why English isn’t the Obvious Answer When you aren’t proficient in English, sometimes you can feel • tired • marginalized William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 9 / 40

Don’t Worry Why English isn’t the Obvious Answer Native English-speaking devs make mistakes, too • set and get are some of the most overloaded words • get is not safe (“get money”) • else vs. otherwise • Cloneable, Closeable William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 10 / 40

Anglica lingua dominans est Why English isn’t the Obvious Answer … sed non semper ita erat William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 11 / 40

Coding the World Why English isn’t the Obvious Answer  Coding is for everyone - as long as you speak English – Gretchen McCulloch ( @gretchenmcc.bsky.social) William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 12 / 40

Coding the World Why English isn’t the Obvious Answer  Coding is for everyone - as long as you speak English – Gretchen McCulloch ( @gretchenmcc.bsky.social) What if websites were coded in Russian? <заголовок> William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 12 / 40

Scratch William Bartlett (@punkstarman) Why English isn’t the Obvious Answer When the Ubiquitous Language isn’t English 13 / 40

Excel Why English isn’t the Obvious Answer Most widely used programming language. English Deutsch Español TRUE WAHR VERDADERO IF WENN SI SUM SUMME SUMA VLOOKUP SVERWEIS BUSCARV William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 14 / 40

Hedy Why English isn’t the Obvious Answer https://hedy.org  Design, implementation and evaluation of the Hedy programming language print Hello! print Hallo! affiche Salut ! presu Hello! William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 15 / 40

Hedy Why English isn’t the Obvious Answer https://hedy.org  Design, implementation and evaluation of the Hedy programming language print Hello! print Hallo! affiche Salut ! presu Hello! Help translate William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 15 / 40

Esperanto? William Bartlett (@punkstarman) Why English isn’t the Obvious Answer When the Ubiquitous Language isn’t English 16 / 40

Rouille? Why English isn’t the Obvious Answer rouille::rouille! { utilisons std::collections::Dictionnaire comme Dico; convention CléValeur { fonction écrire(&soi, clé: Chaîne, valeur: Chaîne); fonction lire(&soi, clé: Chaîne) -> PeutÊtre<&Chaîne>; } statique mutable DICTIONNAIRE: PeutÊtre<Dico<Chaîne, Chaîne>> = Rien; structure Concrète; réalisation CléValeur pour Concrète { fonction écrire(&soi, clé: Chaîne, valeur: Chaîne) { soit dico = dangereux { DICTIONNAIRE.prendre_ou_insérer_avec(Défaut::défaut) }; dico.insérer(clé, valeur); } fonction lire(&soi, clé: Chaîne) -> Résultat<PeutÊtre<&Chaîne>, Chaîne> { si soit Quelque(dico) = dangereux { DICTIONNAIRE.en_réf() } { Bien(dico.lire(&clé)) } sinon { Arf(“fetchez le dico”.vers()) } William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 17 / 40

APL? Why English isn’t the Obvious Answer {↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 18 / 40

APL? Why English isn’t the Obvious Answer {↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 18 / 40

Technical Debt William Bartlett (@punkstarman) Why English isn’t the Obvious Answer When the Ubiquitous Language isn’t English 19 / 40

Ubiquitous Language Why English isn’t the Obvious Answer A common language between domain experts, users and developers. Domain experts object to terms or structures that are awkward or inadequate to convey domain understanding, while developers watch for ambiguity or inconsistency that will trip up design. — 2003. Eric Evans. Domain-Driven Design William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 20 / 40

How can the ubiquitous language be common, if the users don’t speak English?

The Solution

a few solutions

a few solutions Business language English/International Nederlands Vlaams français español Deutsch … William Bartlett (@punkstarman) Code language English Nengels Vlengels franglais espanglish Denglisch When the Ubiquitous Language isn’t English 23 / 40

Everything in English

A few rules of thumb Everything in English • • • • use English word order (RaceHorse ≠ HorseRace) borrow specific terms (SICAV, arrondissement, …) only pluralize the last word (getAuthorNames not getAuthorsNames) use international English (Globish) ‣ postCode not zipCode ‣ color not colour • use count instead of nb (getAuthorCount not getNbAuthors) William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 25 / 40

Gotchas Everything in English False friends • agenda ≠ agenda • actual ≠ actueel, actuel • eventual ≠ eventueel, éventuel • magazine ≠ magazijn ≠ magasin Spelling differences English authentication address platform William Bartlett (@punkstarman) Vlaams authenticatie adres platform French authentification adresse plateforme When the Ubiquitous Language isn’t English 26 / 40

Coding in Vlengels/ franglais/…

A few rules of thumb Coding in Vlengels/franglais/… • Business terms in native language ‣ avoid diacritics and ligatures (é, ij, ñ…) until Unicode is ubiquitous • The rest in English ‣ keywords (duh!) ‣ calls to other libraries ‣ conventions (get, set, update, delete…) ‣ patterns (Repository, Factory…) unless you know the proper translations Not sure how this works in other scripts (getДеньги, get‫)مال‬ William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 🤷 28 / 40

Isn’t this going to be confusing? William Bartlett (@punkstarman) Coding in Vlengels/franglais/… When the Ubiquitous Language isn’t English 29 / 40

Isn’t this going to be confusing? Coding in Vlengels/franglais/… It’s code-switching William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 29 / 40

Example of franglais Coding in Vlengels/franglais/… @Entity public class PlacementSicav { Duration getPeriodicite() { } Contrepartie getContrepartie() { } double getTaux() { } Devise getDevise() { } ConventionDeBase getConvention() { } List<Evenement> getEvenementsDePaiements() { } } PlacementSicavRepository PlacementSicavService William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 30 / 40

Tips and tricks

Tips and tricks • • • • Tips and tricks Start with what you have Cultivate your ubiquitous language Document your conventions (ADR or other) File bug reports for conventions that don’t fit your language (Java Beans spec, pluralization…) William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 32 / 40

Refactor gradually Tips and tricks @Entity public class SicavTrade { Duration periodicity; Duration getPeriodicity() { return periodicity; } } William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 33 / 40

Refactor gradually Tips and tricks @Entity public class SicavTrade { Duration frequency; @Deprecated(forRemoval=true) Duration getPeriodicity() { return frequency; } Duration getFrequency() { return frequency; } } William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 34 / 40

Refactor gradually Tips and tricks @Entity public class SicavTrade { Duration frequency; Duration getFrequency() { return frequency; } } William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 35 / 40

If you do translate…

Put the translation in the documentation If you do translate… /** Bevek / SICAV / @Entity public class SicavTrade { /* periodiciteit / périodicité / Duration getFrequency() { } /* wederpartij / contrepartie / Counterparty getCounterparty() { } /* rente / taux */ double getRate() { } } William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 37 / 40

Look for good translations If you do translate… • Linguee • Wikipedia, Wiktionary/Wiktionnaire • Domain glossaries ‣ Mozilla ‣ Finance • Read books about the domain • Ask domain experts • Ask for training • Listen to podcasts about linguistics (Lingthusiasm, Words Unravelled, Linguisticae, Parler comme jamais) William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 38 / 40

Conclusion

Conclusion Conclusion • Naming is hard. English is hard • Language is complex (complex adaptive systems) Rule of thumb • Business terms in the domain experts’ native language • Coding terms in English Future work • Extending to other scripts • Prototype theory William Bartlett (@punkstarman) When the Ubiquitous Language isn’t English 40 / 40