Search The Blog
About this site

@RoyOsherove

Subscribe!

This site aims to connect all the dots of my online activities - from tools, books blogs and twitter accounts, to upcoming conferences, engagements and user group talks.

from 5whys.com
Twitter: @RoyOsherove
My Book: The Art of Unit Testing
Latest Posts
« Pasting nicely formatted code into your blog | Main | Sign of life »
Thursday
Feb052004

Mortal coding sin: programming in your mother tongue

If there's one nasty coding habit that gets me riled up every time it has to be coding with non English words. This probably won't mean much to the English speaking crowd, but here in Israel, and in other non English speaking countries, junior developers often choose to give their parameters, class names, database tables and sprocs names that, although written in English, are words in their mother tongue.
For example, I've come across code that looks like this:
 

Public Class MenahelLakoach

    Public Sub HosafatLachoach(ByVal shem As String, ByVal TeudatZehut As String)

        'Ugly code taken from original

        Dim sql As String = "insert into LAKOACH (shem,TeudatZehut) VALUES ('" + shem + "','" + TeudatZehut + "')"

        'more code here

    End Sub

End Class

 

Obviously, this is totally unreadable to anyone who does not speak Hebrew. Actually, it's hard to read even if you know Hebrew since you're used to read English, not translating it in your head to Hebrew. Ugh. Here's an easier to read translation:

 

 

 

Public Class CustomerManager

    Public Sub AddCustomer(ByVal Name As String, ByVal ID As String)

        'Ugly code taken from original

        Dim sql As String = "insert into CUSTOMERS (Name,ID) VALUES ('" + Name + "','" + ID + "')"

        'more code here

    End Sub

End Class

 

 

Not too hard, is it? Please, for the sake of the developer after you, write in English. Look at it this way:

  • Now you can actually send the code over to someone and they'll understand it no matter what their mother tongue is
  • it's more reusable
  • hey, you had to learn English to program , right? might as well use it.
  • You won't have to think so much about how to spell a particular non english word in english, thank god.

PrintView Printer Friendly Version

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>