Don't know whether it's weird, or wonderful
-
-
I just replaced
Math.PI
with
Trigo.π
Trigo
being a static class andπ
a const double. It works forϕ
(the Golden Number) also. I tried that with℮
also (the base of natural logarithms), but this is not a valid identifier character.I never finish anyth
X| If this becomes widespread, reading code will be even more difficult than it is now. Leaving aside Chinese ideograms, Kanji, etc., how many of you would understand the following code (not the algorithm, its purpose):
double[] מחיר = new double[100];
double[] כמות = new double[100];
...double סהכ;
for (auto אינדקס ;100 > אינדקס ;0 = אינדקס++)
[אינדקס]מחיר * [אינדקס]כמות =+ סהכ;Do we really want to have to read code with Google Translate open in a separate window?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
-
X| If this becomes widespread, reading code will be even more difficult than it is now. Leaving aside Chinese ideograms, Kanji, etc., how many of you would understand the following code (not the algorithm, its purpose):
double[] מחיר = new double[100];
double[] כמות = new double[100];
...double סהכ;
for (auto אינדקס ;100 > אינדקס ;0 = אינדקס++)
[אינדקס]מחיר * [אינדקס]כמות =+ סהכ;Do we really want to have to read code with Google Translate open in a separate window?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
That's not a Math.PI replacement proposal, is it? I was just exploring aroung Unicode and variable names and found out that using greek letter is allowed for identifiers. But I'm not saying that it should be done. Of course having localized variable names would be a nightmare.
I never finish anyth
-
I just replaced
Math.PI
with
Trigo.π
Trigo
being a static class andπ
a const double. It works forϕ
(the Golden Number) also. I tried that with℮
also (the base of natural logarithms), but this is not a valid identifier character.I never finish anyth
-
That's not a Math.PI replacement proposal, is it? I was just exploring aroung Unicode and variable names and found out that using greek letter is allowed for identifiers. But I'm not saying that it should be done. Of course having localized variable names would be a nightmare.
I never finish anyth
phil.o wrote:
That's not a Math.PI replacement proposal
I stand corrected. I thought that this was something that you had actually encountered in production code. :omg:
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
-
Using escape characters is also fun:
public const double \u0050\u0049 = 3.14;
public const double PI = 3.14; //error CS0102: The type `Test' already contains a definition for `PI' -
X| If this becomes widespread, reading code will be even more difficult than it is now. Leaving aside Chinese ideograms, Kanji, etc., how many of you would understand the following code (not the algorithm, its purpose):
double[] מחיר = new double[100];
double[] כמות = new double[100];
...double סהכ;
for (auto אינדקס ;100 > אינדקס ;0 = אינדקס++)
[אינדקס]מחיר * [אינדקס]כמות =+ סהכ;Do we really want to have to read code with Google Translate open in a separate window?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
I do! :laugh:
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
-
I just replaced
Math.PI
with
Trigo.π
Trigo
being a static class andπ
a const double. It works forϕ
(the Golden Number) also. I tried that with℮
also (the base of natural logarithms), but this is not a valid identifier character.I never finish anyth
No! No public single-character identifiers! :omg:
-
No! No public single-character identifiers! :omg:
-
X| If this becomes widespread, reading code will be even more difficult than it is now. Leaving aside Chinese ideograms, Kanji, etc., how many of you would understand the following code (not the algorithm, its purpose):
double[] מחיר = new double[100];
double[] כמות = new double[100];
...double סהכ;
for (auto אינדקס ;100 > אינדקס ;0 = אינדקס++)
[אינדקס]מחיר * [אינדקס]כמות =+ סהכ;Do we really want to have to read code with Google Translate open in a separate window?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
at least you don't need to spend money on an obfuscator.
-
at least you don't need to spend money on an obfuscator.
Dunno about that, if I had to work on that codebase, I think starting by running it through a bottom end obfuscator that replaced all the variables with 'a', 'b', 'c', etc. would be a good start.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
X| If this becomes widespread, reading code will be even more difficult than it is now. Leaving aside Chinese ideograms, Kanji, etc., how many of you would understand the following code (not the algorithm, its purpose):
double[] מחיר = new double[100];
double[] כמות = new double[100];
...double סהכ;
for (auto אינדקס ;100 > אינדקס ;0 = אינדקס++)
[אינדקס]מחיר * [אינדקס]כמות =+ סהכ;Do we really want to have to read code with Google Translate open in a separate window?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
Im working at Japan, so 1 day my task is review some code of the internship, and he naming variables with Kanji (im not Japanese). Its like a pain in the a.. :doh:
In code we trust !