|
ProjectCode should be camelCased , other than that I don't see what's wrong with it
|
|
|
|
|
Sander Rossel wrote: I don't see what's wrong with it
The only bit that's wrong is the stuff between the first and last bracket... 
|
|
|
|
|
Is the original author still around? umm not that wou'd want to hunt him/her down and hurt them or anything....
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
No, they left long ago. What confuses me the most is how you can know enough code to be able to write something like that, but not enough to know how to do it without the ridiculous switch statement. It's like a weird ignorance knife-edge.
|
|
|
|
|
Nothing like beautiful legacy code, very beautiful indeed.
|
|
|
|
|
The missing default handling and error handling (len >10) the mean exception handling shows me that some Visual Basic coder was on the loose.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
It's friggin C# code and you STILL have to bash VB?
Sounds to me like a C# dev who can't admit there are actually really very bad C# coders out there.
C# coders who are, if I dare say so, even worse than a lot of VB programmers out there
And that comes, of course, from an ex-VB coder, who has seen crap code in both VB and C# (and both make you want to spoon your eyes out)
|
|
|
|
|
I'd post a legacy code snippet but I'd be sharing all the production connection strings they hardcoded at every single db connection.
I seriously wished I could build a terminator to go back in time and shoot the coder in questions parents. 
|
|
|
|
|
Woah! I saw 'rem' and started reading it as a comment!
"Go forth into the source" - Neal Morse
|
|
|
|
|
This post is trending on my Facebook:
The other day a "hacker" stole all the money from my bank account. I sent him a message saying "I am a security expert at Microsoft, you can check my profile, and I can screw up your life if I want... So, I will believe that you are a security expert doing a training when my money comes back... I will not send the police after you and, it doesn't matter if you are really a security expert or not, you will be in the right path."
Some hours later, all my money came back and I received the picture of a nice lady on my phone.
On a completely different matter, if you want to show this to Kids... or if you want to check it out...
It requires a keyboard:
Game of Life - Philosophical approach for kids[^]
Adding the content - Looking for a Really Bad Fight! With Death! Seriously!
Click here![^]
modified 27-Apr-16 23:14pm.
|
|
|
|
|
Certainly weird, but I'm not sure about the wonderful bit
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
To me the Game of Life is wonderful....
Try playing it after drinking lots of vodka and you will see it.
|
|
|
|
|
I got me thinking about numbers, conventions and things like that.
I remember talking to some people about it, but maybe I was imagining it. Anyways...
The number one is a very interesting number.
I was thinking how all the base systems give a 10 when we use the actual base as the number. That is, 2 in binary is 10. 3 in a ternary system is 10. 10 in our decimal system, is 10. 16 in the hexadecimal system, is written as 10.
By "convention" we could say that 1 in the base 1 would give a 10...
But then we hit our first crash... or we found infinity... or whatever.
Let me explain: The binary system (base 2) only sees the 0 and the 1. A "base 1" system would only see the 0, and nothing else.
So, it would be impossible to have a "10".
But we may think about it diferently. The value for all base systems can be discovered by dividing the value we want by the base value, and we keep dividing until the value reaches zero.
That is, we could divide 1 by 1. It will result in 1, but we will still have one. So, we keep dividing one by one, and we always have an extra one. To infinity!
So, by trying to divide one by one, we are actually only making the one become bigger and bigger... or should I say that we discovered the true value?
An interesting thing is that many basic languages consider the true value to be -1 (actually, all bits set to one)... while other languages consider true to be only 1 (not a lot of ones).
I also don't know if a teacher really told me that... or if I simply imagined, but one of the rules was that it doesn't matter if we want to multiply or divide one by one... we end-up always having half of it.
Let me explain:
1/1 = 1
1*1 = 1
So, we had 2 ones on one side and, on the other side, we ended up with a single one. So, half the ones, right?
But to my perception, we only multiplied the number of ones by doing this. We had 2 number ones... then, after the equals sign, another one appeared. In the end, we have 3 number ones.
That is, by trying to either divide or multiply one by one, we always get a kind of clone. A new one!
Where am I going with this?
No idea. I simply considered it funny that multiplication or division of one by one may end-up in multiplication or division of the ones... and it is only a matter on how you look at it. Are you looking at the result (after the equals sign), are you looking at the image? Are you simply counting how many ones appeared?
Funny isn't?
Don't try to think about this under the effect of drugs. It may halt your brain! I know it kinda did it to mine... everything went white, with a really high pitched sound!
Remembering: I don't do drugs. People drugged me and tried to screw up my mind... they kinda succeeded on it.
|
|
|
|
|
All's I know is that One is the loneliest number that I'll ever do.
|
|
|
|
|
That's why I gave him a girlfriend.
|
|
|
|
|
This is the Highlander effect. There can be only one.
This space for rent
|
|
|
|
|
"But I was saying that the 1 multiplies instead of dividing"
That was actually my first thought... but then my crazy mind kept going (it is near 5:30 here, and I usually wake up near 10)...
Then I continued with:
"Oh... I see... there needs to be 57 ones for maximum power".
In my mind, you asked: "Why 57" (you probably wouldn't ask that, but anyways...)
- 57 because it is a prime and round number.
- WTF?!? Prime??? Round??? Are you crazy or stupid?
- More to crazy... see, I still didn't tell you which base I am using.
- OK... that makes sense.
- So, I am using the base 3. That makes the 57 a prime.
- Oh, oh, oh... hold on a minute. In base 3 we only have 0, 1 and 2.
- Yeah.... kinda. It's convention. We can have 5, 6 and 7. Or 5, 2 and 7... or even 5, 0 and 7, like my apartment number. So, 5, 2 and 7, representing the usual 0, 1 and 2, and 57 means 19... or it did when I divided 57 by 3... in any case, a prime.
- But how is it round?
- Can't you find a base where it is round? I know you can!
|
|
|
|
|
Reminds me of a drunken discussion in a pub garden about using π as the base for a number system.
I can't recall what the conclusion was - whether it was possible, and if it would have any uses.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I actually wanted to know more details about such a conversation.
Yet I think that discovering the right precision for the PI is fundamental... if the PI is really infinite... are we going to use it with its infinity value for the calculation?
In my opinion, using the base 11 would be ideal to fix bank problems. 5 numbers up and down the center, with a value for the actual center.
Oh... when I woke up and saw your message, I ended up getting inspired to do this:
http://cyberminds57.azurewebsites.net/CardToMyAngel.png[^]
|
|
|
|
|
But integers would be irrational in such a system... unless you allow digits to be irrational. Cool 
|
|
|
|
|
The "optimal" choice for a number base is e (the base of the natural logarithms).
(Where "optimal" is: minimizing the product of the number of distinct digits in the system and the number of digits to represent a number in that system.)
See: Non-integer representation: Base e - Wikipedia[^]
Base π is also mentioned immediately following.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
So we can't have been that drunk, then!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Paulo Zemek wrote: A "base 1" system would only see the 0, and nothing else.
Actually,a base one system would only see the 1.
Think of a tab at the pub.
More on unary systems here[^].
|
|
|
|
|
I was still locked on the decimal System when I wrote the text. But I recovered when talked about the 57. A base one system could work if the only number was the one, not the zero. Next step on the pattern. That is: By default, 0 is the starter and 10 represents the pattern. Then, 1 is the starter... And it is eternal, as there's nothing out from them division of 1 by one in base 1 represented by one.
Mind blowing? Too me, too simple. Easy and too boring.
Next question please!!!
|
|
|
|
|
Ooh, "them" instead of "the division" was on purpose. Did you see it on the first read? Also, then is replaced by "the" only, not "the division". Ah I to far/fast? Ok. I will sleep now. Have fun with numbers and encryption!!!..!!.!
|
|
|
|