Programming isn't hard...
-
Thinking of names for your classes and variables, THAT's hard... :doh: Frustration #1 of the evening... :sigh:
It's an OO world.
public class Naerling : Lazy<Person>{}
-
Thinking of names for your classes and variables, THAT's hard... :doh: Frustration #1 of the evening... :sigh:
It's an OO world.
public class Naerling : Lazy<Person>{}
-
Thinking of names for your classes and variables, THAT's hard... :doh: Frustration #1 of the evening... :sigh:
It's an OO world.
public class Naerling : Lazy<Person>{}
Not really - just use names that say what they are. If you are trying to think up polite ways to call them after your ex-girlfriends, then yes, I can see where you might have difficulty. But if a class is meant to handle user information, then I would probably call it "UserInfo" rather than "RurikoPityHerVisaRanOutAndSheHadToGoBackToJapan" or "MarionWentAllWierdAndBecameBornAgain". Similarly with open file dialog references - I generally call them "ofd" for the short time they are in existance. :laugh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
-
Thinking of names for your classes and variables, THAT's hard... :doh: Frustration #1 of the evening... :sigh:
It's an OO world.
public class Naerling : Lazy<Person>{}
Naerling wrote:
Thinking of names for your classes and variables, THAT's hard... :doh:
Frustration #1 of the evening... :sigh:I solve this by using a single
Object
variable calledtheKey
across my entire project. I assign all local references to this variable and cast to the required derived type before calling a method or property. On occasions I may need two or even three such variables (I suffix 1,2,3 to gettheKey1
and so on). Problem solved. :-\Regards, Nish
My technology blog: voidnish.wordpress.com
-
You might get something out of this classic[^].
I'd forgotten just how impenetrably Dijkstra wrote: I needed a good long run up to read him when I was a student. And several large drinks afterwards. Mind you, at least he didn't make you fall asleep like Knuth did... But that could have been the large drinks!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
-
Not really - just use names that say what they are. If you are trying to think up polite ways to call them after your ex-girlfriends, then yes, I can see where you might have difficulty. But if a class is meant to handle user information, then I would probably call it "UserInfo" rather than "RurikoPityHerVisaRanOutAndSheHadToGoBackToJapan" or "MarionWentAllWierdAndBecameBornAgain". Similarly with open file dialog references - I generally call them "ofd" for the short time they are in existance. :laugh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
Tenagra t = new Tenagra();
t.Add(new Darmok());
t.Add(new Jilad());
t.Add(new TheBeast());
t.EpicBattle();
t.MoveItemsTo(new Ocean());Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Naerling wrote:
Thinking of names for your classes and variables, THAT's hard... :doh:
Frustration #1 of the evening... :sigh:I solve this by using a single
Object
variable calledtheKey
across my entire project. I assign all local references to this variable and cast to the required derived type before calling a method or property. On occasions I may need two or even three such variables (I suffix 1,2,3 to gettheKey1
and so on). Problem solved. :-\Regards, Nish
My technology blog: voidnish.wordpress.com
Wow, you should post that as a tip/trick or even write an article about that! That just solved all my problems (and created them for future readers of my code)! ;p
It's an OO world.
public class Naerling : Lazy<Person>{}
-
Naerling wrote:
Thinking of names for your classes and variables, THAT's hard... :doh:
Frustration #1 of the evening... :sigh:I solve this by using a single
Object
variable calledtheKey
across my entire project. I assign all local references to this variable and cast to the required derived type before calling a method or property. On occasions I may need two or even three such variables (I suffix 1,2,3 to gettheKey1
and so on). Problem solved. :-\Regards, Nish
My technology blog: voidnish.wordpress.com
I assume that in accordance with good OOP / C# programming practice it is both static and in a Singleton Pattern?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
-
You might get something out of this classic[^].
You mean my code should be gibberish and no one should ever be able to read past the first line? X|
It's an OO world.
public class Naerling : Lazy<Person>{}
-
Tenagra t = new Tenagra();
t.Add(new Darmok());
t.Add(new Jilad());
t.Add(new TheBeast());
t.EpicBattle();
t.MoveItemsTo(new Ocean());Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Is that a quote from the Guardians Saga? I do note however, that when you have moved all these items into the new ocean, you then discard the reference and effectively leave them adrift waiting for the Dark Lord G'Bge Cll'ctr to come and find them...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
-
I assume that in accordance with good OOP / C# programming practice it is both static and in a Singleton Pattern?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
OriginalGriff wrote:
I assume that in accordance with good OOP / C# programming practice it is both static and in a Singleton Pattern?
Yes, that goes without saying. Always follow good practices I guess :-D
Regards, Nish
My technology blog: voidnish.wordpress.com
-
You mean my code should be gibberish and no one should ever be able to read past the first line? X|
It's an OO world.
public class Naerling : Lazy<Person>{}
Hey, be nice... Some of us made it to the second line :-D
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Thinking of names for your classes and variables, THAT's hard... :doh: Frustration #1 of the evening... :sigh:
It's an OO world.
public class Naerling : Lazy<Person>{}
i name every CWaitCursor i create the same thing: bob. true story.
-
Naerling wrote:
Thinking of names for your classes and variables, THAT's hard... :doh:
Frustration #1 of the evening... :sigh:I solve this by using a single
Object
variable calledtheKey
across my entire project. I assign all local references to this variable and cast to the required derived type before calling a method or property. On occasions I may need two or even three such variables (I suffix 1,2,3 to gettheKey1
and so on). Problem solved. :-\Regards, Nish
My technology blog: voidnish.wordpress.com
I prefer to call all my variables a1, a2, a3, a4, and so on. Also, once I get to a6, I use another letter (say, b1)... that way, I only ever have to use my left hand and can keep my right hand on the mouse. It's a very efficient technique I wish everybody else would adopt. Until then, I just refactor all the code I see with overly long variable names like "count" (that's a particularly bad name because some of the characters require the right hand to type). I sleep easily at night, comfortable in the knowledge that all my refactoring has made the world a better place. :-\
Somebody in an online forum wrote:
INTJs never really joke. They make a point. The joke is just a gift wrapper.
-
Not really - just use names that say what they are. If you are trying to think up polite ways to call them after your ex-girlfriends, then yes, I can see where you might have difficulty. But if a class is meant to handle user information, then I would probably call it "UserInfo" rather than "RurikoPityHerVisaRanOutAndSheHadToGoBackToJapan" or "MarionWentAllWierdAndBecameBornAgain". Similarly with open file dialog references - I generally call them "ofd" for the short time they are in existance. :laugh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
Allright, here it goes. I have an Object of any type that needs to have something done with/upon it. What is this Object called? Simply
obj
seems to easy.objToDoSomethingWith
is to long.handledObj
sounds as if something has already been done with it.handlingObj
is just weird.objToHandle
, well that might cause confusion. I could replaceobj
withitem
, but that does not solve anything. Perhaps I should not be thinking about this at the end of the day. Or perhaps I should just go withobj
... Oritem
. Choices, choices... :sigh:It's an OO world.
public class Naerling : Lazy<Person>{}
-
Is that a quote from the Guardians Saga? I do note however, that when you have moved all these items into the new ocean, you then discard the reference and effectively leave them adrift waiting for the Dark Lord G'Bge Cll'ctr to come and find them...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
Uh, no.... Not a Trekkie[^], are you?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Thinking of names for your classes and variables, THAT's hard... :doh: Frustration #1 of the evening... :sigh:
It's an OO world.
public class Naerling : Lazy<Person>{}
(Hands you 100 001 baby names book) this should help. :) Append] this kinda goes along with the C# numeration and collections example where by the authur used "MyCult" as an example (great idea by the way).
///////////////// -Negative, I am a meat popsicle.
-
Is that a quote from the Guardians Saga? I do note however, that when you have moved all these items into the new ocean, you then discard the reference and effectively leave them adrift waiting for the Dark Lord G'Bge Cll'ctr to come and find them...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
OriginalGriff wrote:
Is that a quote from the Guardians Saga?
Nope. Star Trek: The Next Generation [^] reference.
-
Hey, be nice... Some of us made it to the second line :-D
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Yes, but how long did it take? And this is not even code. If reading this in code would take you as long as reading this in plain text the code would not even compile anymore on the computers that, by that time, have become modern ;p
It's an OO world.
public class Naerling : Lazy<Person>{}
-
Uh, no.... Not a Trekkie[^], are you?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Sometimes - but Wesley Crusher scarred me so badly I couldn't watch TNG so the references didn't mean anything.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."