Possible Duplicate:
Code maintenance: keeping a bad pattern when extending new code for being consistent, or not?
I'm working on a project for a Greek public organization, as a part for a course semester project. I have to develop a 3-tier application that manages financial data. A professor of mine acts as an advisor and is helping me on the project.
I write my own code but there are also pieces of code written by other developers that I can also use, and some the code is also written by my professor. The Greek developers program without using any patterns or conventions, they are generally unaware of phrases like "best-practices" and "programming methodology". They just write code of pure quality. Most of them are at least 10 years more experienced than me but I am on my way. My professor is a "pragmatic programmer" and produces "clean code that works" of high quality.
The Greek developers speak English as well. The problem is that some of them use greeklish for the various names of variables, classes and methods-obviously greek charachters cannot be used for such purposes. For example, the greek translation of "user" is "χρήστης" which in greeklish could be written in the following ways:
- xristis,
- xrhsths,
- hristis,
- christis,
- ...
As a result, the same meaning can be expressed with different characters. Some of the developers use English in their code, and there are no naming conventions at all.
I'm working on this project just for the sake of knowledge and further practice. I would like to apply practices I read in books in software that can also be used and modified by others.
Should I keep using greeklish just to be in harmony with the already existing code? In that case, who knows In a few months I may get valuable feedback for my effort, which will eventually make me a better programmer.
Or, should I just keep doing the right thing, taking example from my professor? In that case my code might be an one-use throw-away effort because none of the Greek developers would like to follow a new set of conventions.
What should I do?
I'd suggest some refactoring just to make this easier to read. Did you just use the variable "X" to refer to someone of type Professor? I would suggest renaming it to "professor", and in the case of ambiguity, perhaps "oldProfessor". Furthermore, unless "ORG" is constant, I would avoid all-caps (and even then, only if that is the convention in your implementation language). I'd also suggest renaming "OTHERS" to "greekTeam" or something else suitably identifying.