|
Ahh OK, its just with Halloween propaganda (adverts) & the number of Students dressed like extras from The Night of The Living Dead sprawled on the bench this am I got a little confused...
(ET caused the UK to celebrate Halloween in it current fashion anyway!)
|
|
|
|
|
In Maunderland, it's the 31st now.
This space for rent
|
|
|
|
|
There is a fifth dimension beyond that which is known to man. It is a dimension as vast as space and as timeless as infinity. It is the middle ground between light and shadow, between science and superstition, and it lies between the pit of man's fears and the summit of his knowledge. This is the dimension of imagination. It is an area which we call Maunderland.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
with your host, Rod Hamsterling.
Software Zen: delete this;
|
|
|
|
|
|
It wouldn't suit him.
He doesn't look good in stockings.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
No, no, no - if you are going sexy - go sexy and triggering with The Sexy Hand Maids Tale costume
(Although Bob probably can't pull this off too well.)
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
Amazing, all this fuss about a little red dress, hard to believe we are living in the 21st century
|
|
|
|
|
There are quite a few things that were better in the 'good old days', but I wish wish wish wish that the idea of hot slutty costumes for Halloween, an enormous cultural leap forward, had been around when I could have better taken . . .
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 read the thread - didn't have anything to add . . . until . . . until . . .
. . . I realized you never explained how you knew it was Bob. ????
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 |
|
|
|
|
|
The Eye's dude, its all in the eyes, or so I am told...
|
|
|
|
|
Because he's got a sheety job?
(Runs away without coat, too damn hot!)
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
As I am starting working again on my home project... I sometimes review and rewrite some old class I use. The general theme of most of my rewrite, if not all, is less. Less lines of code, less methods, less parameters....
Now I put that in perspective with how I like to write code and how it impact my coworkers. I like to make as many members of my classes as public.
Why not? That gives everyone more control over my objects at no cost...
But, on the other hand, make my object more complicated to use, I now realise. What are all those public members for, they might wonder? While staring at an object they might need to use...
While, if I make as many members as possible private, that make my object artificial contrived to used (to my eyes at least) but also excessively simple (look this object only has 1 method and 2 readonly properties!)
Remark this post has been brought to you by: Work colleagues complaining about all my public methods and properties. Make them private they say.
What are your thoughts on the topic?
[EDIT] Thanks to your feedback, I found out it's a matter of context
I am too much used to write reusable utility control and library... what the point of a reusable class, say DateTime, if all members are private?
But hey if I am writing things like a MVC Controller, or the DoSomethingFormClass, or DoSomethinService, everything can be private there for all I care. And from now on I should make everything private there by default, so there would be no pointless arguing...
I think I might even go one further and do private utility classes
modified 30-Oct-18 7:42am.
|
|
|
|
|
Everything that is not called from the outside should be private. Ie, as much possible.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I create a set of simple methods with default behavior but also provide methods that allow greater detail.
I may not be that good looking, or athletic, or funny, or talented, or smart
I forgot where I was going with this but I do know I love bacon!
|
|
|
|
|
To be honest, I've never seen the point of fully private properties : private setters, or private getters yes. But if the property is visible inside the class only, why have it at all - just use a private field instead since the accessibility is the same and you save a bunch of getter and setter calls ...
public /
protected / ... properties protect your fields while making your classes more "generic", more "reusable", more "flexible" to my mind.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I like private properties for event triggers, and I use them more often than I generally initially expect to.
That said, I pretty much never use a private modifier outside of a sealed class
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
Quote: Now I put that in perspective with how I like to write code and how it impact my coworkers. I like to make as many members of my classes as public.
Why not? Public interface is (or at least should be) forever. Like old fashioned marriages, you can't break the contract. There are sane OOP principles against making all class members public.
|
|
|
|
|
I guess I am too much used to write reusable utility control and library... what the point of a reusable class, say DateTime, if all members are private?
But if you are writing things like a MVC Controller, or the DoSomethingFormClass, everything can be private for all I care. And most importantly I think it is useless to argue about it so I will just make everything private to avoid wasting time arguing...
|
|
|
|
|
Quote: what the point of a reusable any class, say DateTime, if all members are private?
I fully agree.
But that's not the point.
|
|
|
|
|
yeah, I only read your post distractedly...
To fully answer your post, I only make public what I think is an here to stay method / property of the thing...
But anyhow, I (just) realised this argument really boils down to the difference between reusable utility/control/whatever and service/task-thing/web-controller-thing
I will maintain that reusable utility member should be as public as reasonable...
But now I will use the opposite logic for service/task-thing/web-controller-thing were everything will be as private as possible...
|
|
|
|
|
Someone's stalking your ideas[^] in the forums.
This space for rent
|
|
|
|
|
|
If the method does something that is useful to an external consumer, leaves the class in a fully consistent state (i.e. it doesn't only do part of the work), and doesn't expose implementation details that are likely to change, I'm a fan of public.
Otherwise, if it's possible that I may want to later derive from the class and it doesn't expose implementation details that are likely to change, I consider protected (especially if there are also some virtual methods present).
For everything else, I'm a fan of private.
I seldom use internal. I use it only when I can't find an alternative. In the rare circumstance I do use it, I also very carefully re-consider how I've modeled the object. Its "necessity" is often a red flag for a poorly modeled object.
|
|
|
|
|
My 2c:
Even if I don't implement an interface to a class, I think about what the interface would specify. This guides me on what methods should be public.
I hardly ever use private , preferring protected if for some reason that class would need a derived implementation. The only exception is if I would never want a derived class to call the base class' method.
Ideally, I really dislike properties / fields. Properties == state, and stateful data is one of the major sources of bugs and adds complexity to testing. I prefer to pass everything that a method needs into the method and have it return everything that the caller needs. But this is an ideal to which I frequently fail.
Latest Article - A Concise Overview of Threads
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|