|
You can manually set values for variables while debugging C#, so initialization isn't necessary (but convenient nonetheless, although I'd remove it when done debugging)
|
|
|
|
|
Sure, but why not simply code the value you want?
|
|
|
|
|
Well, since that's the wrong spelling for 'length' it's safe to assume it will only be called by an error - so if it recalls itself until it crashes, nothing's really been lost, anyway.
Thus, the balance is restored in this, the best of all possible worlds.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I suspect that the code comes from a keyboard dyslexic like myself. Since he/she regularly mis-types lenght (see?) they though it would be a good idea to cater for it... unofrtuantely they misspselt it in the function too.
|
|
|
|
|
I recently started working with Python. The IDE I use highlights every potential typo and stylistic error as I type. A variable name like Lenght would be flagged immediately, even though it is syntactically legal.
My goal when coding with the IDE is zero flaggings of code. In the long run it is worth it.
|
|
|
|
|
BucketList:
1. Learn how to write code.
2. Improve this code.
3. Climb the Mount Everest.
|
|
|
|
|
4. Stay there, not bothering anybody.
|
|
|
|
|
A lot of people should add that to their list
|
|
|
|
|
isnt that a recursive call which should crash the stack
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
KarstenK wrote: isnt that a recursive call which should crash the stack
Exactly.
|
|
|
|
|
|
How would this even work, given that "Lenght" is misspelled in both places?
|
|
|
|
|
|
You quit without finding a new job first? Possibly a little premature ... have you been reading GlennPatton-in-the-pub/not-in-the-pub/back-in-the-pub has been posting for the last year?
Good luck - I hope you won't need it!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Possibly a little premature Not at all, I've calculated my risk and it's basically none
OriginalGriff wrote: Good luck - I hope you won't need it! Thanks - and I won't!
|
|
|
|
|
Still..."unforeseen circumstances" are a thing. It can happen both to you and potential employers.
Even with 2 opportunities lined up, I still wouldn't quit a job without having anything in writing yet. But maybe that's just me. I'm in my mid-40s and have never quit a job.
|
|
|
|
|
dandy72 wrote: "unforeseen circumstances" are a thing It's all in my calculations
I'd need a whole lot of unforeseen circumstances before I get in trouble, even when these two somehow back out
|
|
|
|
|
Your self-confidence is to be commended.
|
|
|
|
|
Good luck finding a new job, looking at your profile that should not be too hard I think, and you seem to be young enough, so age should not be a problem.
If you need any tips, just let me know
|
|
|
|
|
Thanks!
I'm currently talking to two possible employers who would like me very much.
They both sound like I'd want to work there so I'm still in negotiations.
I'll know which one by the end of next week
|
|
|
|
|
Congratulations !
«While I complain of being able to see only a shadow of the past, I may be insensitive to reality as it is now, since I'm not at a stage of development where I'm capable of seeing it. A few hundred years later another traveler despairing as myself, may mourn the disappearance of what I may have seen, but failed to see.» Claude Levi-Strauss (Tristes Tropiques, 1955)
|
|
|
|
|
Thanks Bill!
|
|
|
|
|
Sander Rossel wrote: I didn't know you guys cared so much, but don't worry about me being out of a job.
I've got two possible employers lined up to take me on board and plenty of backup, even when things go awry
Assuming that you are not independently wealthy, all I can say is that you are very brave, Señor.
Stupid, but brave.
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
|
|
|
|
|
|
Having worked as a programmer and software engineer for more than 30 years, I have lived through a few downturns in the high-tech world. I know that no matter how good we are at our jobs, we have no guarantee of long-term employment. Even working for a large company is no guarantee against downsizing when the profit margin drops too far. Working for the Government is an option, if (a) you are satisfied with government pay scales and (b) you are willing to put up with the soul-deadening bureaucracy.
Given that (a) I have a family to support, and (b) I am not independently wealthy, I cannot afford to give notice for an existing position before I have a contract for another position in hand. Your tolerance of risk may be higher than mine.
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
|
|
|
|