views:

206

answers:

9

If you are given a large n-tier project (.NET) with 15,000 lines of code written in "Spanish" (variables, tables, classes names etc) that requires feature addition and bug fixing, what would be your strategy to work on it?

  1. Converting the whole project to English(Google Translation or other tools) names does not seem to be a good options as it will be time consuming
  2. Hire a developer who knows "Spanish" or a translator

EDIT: The developers who wrote the original software does not understand English so they are not useful in this case.

+8  A: 

Attempt to work on it as it is without translating anything. If it doesn't work, start translating it on-demand, only pieces that are relevant to you.

A dictionary can get you quite far already. You can translate code elements on your own. Naturally, don't add any more pieces to the puzzle. What you add should be in English.

I would also notify the customer that due to the code being written against common sense and best practices in non-English (and even unfamiliar to you language) there will be a delivery delay. Blame on the original creator of the novel.

Developer Art
Accepted as answer for: "start translating it on-demand" and "notify the customer that there will be a delivery delay" because these make most sense to me.
A9S6
+3  A: 

Best option would be to get in touch with the guys who wrote the darn thing...if possible at all. Second best, a developer who knows Spanish.

tzup
+5  A: 

Unless this is The Project From Hell, there should be far fewer than 15000 variables and methods in your code. My on-the-cheap suggestion would be for you to extract a cross-reference list of variable names as found in your program, hire a quick cheap Spanophone to translate those names for you, and then keep the translation list handy as you and your teammates code.

It's handy to have an idea of what is meant by a variable name, but it's not essential. I spent 20 years writing programs with only 4 significant characters in the variable name.

Carl Smotricz
+5  A: 

It's subjective, but my personal opinion is Option B) Hire a developer who can speak spanish - primarily because all the commenting will likely to be in spanish and if the commenting has been done well - it will have valuable information within that should not be ignored / lost.

A translator might not be able to understand the terms within the comments / code and a translation by a non programmer could go bad.

Andrew
+1  A: 

Translate your classes first. Then you should be able to keep track of instances by their type.

ck
A: 

I think the translation should be done as needed on demand, e.g

  • All new code should be in “English”.
  • All methods that are changed should be in “English”
  • All class/methods the new code uses should have English names and summary comments.
  • The names and comments on all unit tests for class/methods with English names should be in English
  • Missing unit tests should be written for any class/method when it is not clear what the spec is. (So as to check the translation of the comments into English.)

I think a willing English programmer will be able to use Google translate to do the above, however as with any new source code base, the programme will have to spend a long timer really understanding what each class/method does before using it.

An English programmer that knows some Spanish would be able to do it quicker. However don’t use a Spanish programmer, as you always want a translator translating into their native language.

Ian Ringrose
+1  A: 

Sorry mostly questions.....

Is the customer a Spanish speaker? If so the software should be written by a Spanish programmer. As the cost of communicating with the customer is a lot less if the programmer understands the customer.

If the customers is not Spanish, why was a Spanish programmer used at all?

Was the Spanish programmer chosen to save money?

If so, is the software worth keeping at all?

How can you tell how good the code is if you can’t read Spanish?

Ian Ringrose
A: 

First step, and this is true when you inherit a legacy code base whether it's in your native tongue or not, is to set up regression tests based on "known good" output, and begin writing more tests as you go, for the changes you make.

Quite possibly, given the relatively small size of the code base, you will fairly shortly start to understand what various routines are doing, and may be capable of beginning the translation effort yourself, maybe supplemented by automated translation.

This assumes you understand the problem domain, and that the original code was written professionally.. although if it were, you'd already have tests, wouldn't you? You don't mention whether that's the case.

Doing anything here without regression tests is foolhardy. Doing it with tests, you may find the whole task relatively manageable and don't need a serious translation effort. Definitely respect the other suggestions to do this incrementally too.

Peter Hansen
A: 

I can get all of methods, fields, annotations and etc. with reflection methods and etc. to export excel or etc. Then I can send this excel file to spanish translator. After translated, i can convert all of project codes by reference which is translated excel file by text processor applications (find / change etc.)

javaloper