« first day (179 days earlier)      last day (4762 days later) » 

Als
11:01 AM
@sbi: Where did Jeff reveal info about Tina's sex?
 
@jalf which answer?
 
26
A: Avoid the Streisand Effect - be clear about the reason when suspending an account

Jeff AtwoodIn general, it is a private matter between the moderators and that particular user. Note that other moderators have access to annotations on the account that will provide more context for the suspension. I believe it is the reponsibility and right of the user who was placed in timed suspension t...

 
8
A: Is mentioning sex ok or is it not?

Adam DavisIt's worth pointing out that the conversation about sex started here: http://chat.stackoverflow.com/transcript/message/573133#573133 The ongoing C++ discussion where Tina was asking for some programming help was railroaded. Further, when she requested that they stop talking about it, they refu...

 
sbi
@Als In a comment to this answer: meta.stackoverflow.com/questions/86733/…
@Tony :)
 
Als
Huh...That comment of Tina being a Man is totally uncalled for....
If he/she didnt want to reveal it
 
11:05 AM
@Als here we go again, talking about sex... just never ends does it? We always seem to end up with that
 
Als
@Tony: hehe...I dont know whats with C++ and sex, both get discussed at length
 
maybe this should be Lounge<sex> and the topic line where C++ is sometimes discussed ll
 
Sex, drugs and C++
6
 
Als
Darn someones gonna get banned lol
someone amongst us!
 
@Als LOL :)
@StackedCrooked I thought you were leaving cuz this place is too distracting?
 
11:08 AM
Yep, lunch break :)
 
@StackedCrooked good excuse :)
 
@Tony Actually, the lunch break is already over ...
 
@StackedCrooked mine too, however I'm kinda addicted to this place
 
Als
@Tony,@stackedoverflow: Heard someone say drugs ;)
 
@Als rofl
 
11:12 AM
@Als sex, drugs and C++?
 
I may be late to the party … but, all the comments to
26
A: Avoid the Streisand Effect - be clear about the reason when suspending an account

Jeff AtwoodIn general, it is a private matter between the moderators and that particular user. Note that other moderators have access to annotations on the account that will provide more context for the suspension. I believe it is the reponsibility and right of the user who was placed in timed suspension t...

were deleted?! Whoa
 
@KonradRudolph oh...
nice move
 
Als
@jalf: I sneaked in and managed to read your comments before getting deleted.....Job Well done to you on the comments:)
 
@KonradRudolph that is outrageous...
 
@Tony No, just incredibly stupid
 
11:15 AM
@Als If you heard someone say that, then you're probably already hallucinating..
 
@KonradRudolph it doesn't make SO look good for sure
 
anyway, I've got to run for 20 mins or so
 
sbi
@Tony DeadMG is not suspended, though: stackoverflow.com/users/298661/deadmg. I hope it isn't his stomach.
 
@jalf are you doing fitness?
 
his stomach is suspended?
 
sbi
11:15 AM
2 hours ago, by sbi
Regarding Tina's sex, if what Jeff says is true, I find it appalling that he publicized that information, while s/he never corrected us, obviously wanting us to consider him/her female. It's everyone's right to chose an identity and those in the know about their real identity should not announce it to the world. It makes he wonder what Jeff might publish about myself, should he happen to get annoyed enough by me.
 
@sbi I hope it's not his stomach... he's been struggling with that for too long
 
@sbi I think you just made him a bit more annoyed with you ;)
 
@sbi why would Jeff know?
access to private information on Tina's profile?
 
@ChrisBecke perhaps cuz he has email addresses of all accounts and so maybe the name in the email says enough
@ChrisBecke since he owns this place, I'd assume he does
 
@ChrisBecke Perhaps via OpenID?
 
sbi
11:17 AM
@jalf Did I? I was distracted by work, and I'm not even sure I already had my comment committed. Last I looked your comment was the last one.
 
nothing is really ever private when posted online, no matter how you put it
 
i don't think theres any information in my so profile that indicates, one way or another, what gender I am if I wanted to lie about it.
 
@ChrisBecke but maybe Tina didn't think that far
 
and I do have a habit of clicking female vs male 50% of the time on registration forms.
 
sbi
@Tony Yes, but Tina did post her/his sex online. Jeff did. And that really is outrageous.
 
11:19 AM
I don't think that posting it was as bad as the fact that Jeff potentially used neferious ways of getting the info.
 
sbi
@KonradRudolph I added a comment aksing Did you just delete all comments to this? which was deleted within two minutes.
 
@sbi that's true.... but once you submit info to a site like this or even FB, you've given in it away and they can claim it as theirs, however outrageous that is, FB works like that, and perhaps SO too
 
If Jeff happens to know via some other public channel, that tina is male, then so what.
if he used the private email address info to check up on facebook or something
thats bloody dodgey
I, for example, tend to play both female and male toons in mmorpg's
 
@ChrisBecke nothing's gonna stop him from doing that is it? that's the internet's main problem, privacy, where to draw the line
 
I don't think my real gender is a secret worth protecting when I chat on voice comms
the line in the sand, re privacy, is a long way behind where we are now.
 
11:22 AM
I'm not worried about my gender per se, but perhaps some people are
 
people just don't appreciate yet how much potential there is to link their existing public information in ways that exposes more private information than they'd ever choose to share.
sbi so far is protecting his real identity from this channel.
 
yep, that's a problem, and I have experience...
 
I can only speculate as to why.
myself, even though I routinely lie on any registration page asking for anything more identifying than my email address...
I suspect ive still leaked enough info that anyone who wanted to find where i live, work, could have the names and id numbers of my kids in less than a day.
 
The C++0x FDIS is here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3290.pdf
2
 
the problem really starts when others start posting things about you that are lies and blatant black propaganda
 
11:25 AM
That knowledge doesn't make me happy. and ironically it makes me less bothered trying to protect my privacy in the future, because ive already lost.
 
and then you can't do anything to make those go away
 
so, in terms of privacy, were all up shit creek without paddles.
and its just a matter of time before the dots are connected and the length of your penis, the names of your lovers (or lack thereof) are a matter of public record.
 
FB for example requires you to put your real name, which is BS, cause what gives them the right to require to give away private info on a site where there is no real financial data or anything...
 
sbi
@Tony This is not Facebook. Or so I thought.
 
@sbi Yes I know this is not fb, but I was merely stating a fact
 
sbi
11:33 AM
I've just replied to the comment where Jeff reveals Tina's sex:
> Suspending a user because I mentioned him/her in a completely unrelated context is bad enough (chat.stackoverflow.com/transcript/message/590655#590655), but revealing Tina's sex on top of that was a totally uncalled for and outrageous breach of online privacy. I don't feel my private data is safe with you anymore and the way the C++ chat room is up and in arms over this, I'm not alone. I'm considering suspending Stack Overflow due to this.
@Als: I couldn't help linking to your post. I'm sure you will get away with this.
 
@sbi :( don't leave us :(
lets setup an IRC channel! there we can write and do whatever we like
 
@sbi I just don't believe that Jeff suspended Tina spefifically because you mentioned him.
 
Als
@Sbi: Its no problem....My one bit of contribution
 
sbi
Anyway, now that I have brought the C++ room to his attention, a natural escalation would be to close this and delete all traces.
 
spefifically: new word? LOL
 
11:35 AM
Well, I perhaps would rather welcome that
 
sbi
@Tony The problem with SO is that it is quite appealing. IRC and Usenet don't have that.
 
because I am supposed to be converting some c++like code to macos right now
 
@sbi Then there is one thing that hasn't been learnt yet, that hiding a problem from sight does NOT make it go away
 
sbi
@Tony No, he doesn't. The whole Eeeek! debacle has shown this.
 
Als
@sbi: Don't leave us though...You are much needed
 
11:37 AM
Allthough, If I'm banned from chat but can stillpartake on themain site i'd probably still answer people. As thats really why im here. the chat is a bonus. and im in lounge<c++> because theres never a win32/winapi group to complain at :P
 
@sbi that's true, but if this place is causing too much commotion around silly matters, then I don't see many other options
 
@Jeff - I still don't like the envelope replacement you hear!?
waits
 
sbi
Anyway, in case I'm locked out, I'll probably write something about it at stacksbi.wordpress.com. And I'll leave a note where to find me.
 
@sbi I wonder if Jeff read that post?
 
fantastic. www.websense.com has flagged your blog as undesirable content for some reason.
 
Als
11:39 AM
Bookmarked your blog sbi
 
sbi
@ChrisBecke That's silly. I never fussed over them changing the UI. Which UI you prefer is a matter of preferences as long as both support the same functionality, and that the new UI does. For me, it's always been the way he dealt with the critique.
@ChrisBecke Whom are you talking to?
 
you.
 
sbi
@ChrisBecke My blog is "undesirable content"? Except for Jeff, I wouldn't know for whom.
 
sbi
What is websense anyway?
 
Als
11:41 AM
@sbi: Jeff replied your comment
 
my retarded company
@sbi WebSense is a retarded attempt to keep the honeybees busy. Basically it disallows me from doing any online research about anthing important to my job.
 
sbi
@Als Thanks.
@ChrisBecke They might have blocked all blogs then, on the gorunds of reading blogs wasting working time? Well, seeing you here in the chat kind of makes this unlikely...
 
Als
They filter out sites based on specific words in the url or just block certain specific known blog sites.....Stackoverflow chat was not in list of banned sites at my work place as well
 
@Als thank god nothing is banned where I work
 
Als
@Tony: Silly though, You can get cgi proxy list delivered daily to your mailbox to bypass the bans
 
11:48 AM
@Als true enough, bans are useless... :)
 
or just use https
(for sites that run http and https)
 
sbi
@Als I've answered him.
> I think you're seriously underestimating the damage you've done to this site over the last few weeks.
Let's see whether this will be taken down, too.
 
@sbi why isnt that part of your SO profile?
 
Als
@sbi: Looks like it will be..
 
sbi
@ChrisBecke I'm not here to cause a commotion, but to discuss C++ and get a few questions answered once in a while. (I know this might sound funny, given what happened over the last few weeks. But I just can't help speaking up whenever I think someone's done wrong to.) Those rumblings have been seen by a lot of people by now, and I bet they were too long for most of them to be read thoroughly. It was more a way for me to vent off than for attacking SO.
 
11:57 AM
@sbi I was replying to your posting of your blog link. Is it disruptive? I can't read it right now.
 
sbi
<sigh/> Some user "Shadow Wizard" just added a comment to Jeff's answer asking for something I had already asked in a comment that got deleted. Now my comment saying so was deleted, too.
 
@ChrisBecke no it's not, it's just an account of what's been happening
 
oic.
I did google for "howto make a tender chicken" and I can't find any results mentioning having to be, or using, a tough man
 
@sbi They obviously do not like you. My sarcastic comments (like this one) do not get deleted (much as it surprises me).
 
Als
Where is Alf btw? If he is the one to be taken as bothered most....He might want to have a say about all this.
 
12:06 PM
@Als haven't seen Alf in ages... not sure what's going on
 
sbi
12:18 PM
@ChrisBecke I have tried to be polite. I don't think I have used any swear words. There's no sex in it either. If you know a place I could upload the text, so that you can see it, say so.
 
Als
Hmm...Silence
 
stacksbi.wordpress.com <<bypasses websense just great
(note the https)
 
Als
@Sbi: I read it...Noting offensive in that but ts a old blog entry right..dated March20
 
sbi
@ChrisBecke It took me a while to note the 's'. :)
@Als Yep. That was back then. I only brought it up here because it's a point that some of you knew where I would be found other than here.
 
yay, fdis
 
sbi
12:26 PM
@jalf Yeah, @James is struggling hard to bring C++ back to the agenda here.
 
let's discuss C++, cause this following code seems to use an iterator out of scope, or I've lost my mind:
DSValue GetOnDate(DATE dDate)
	{
		for (valuelist::iterator it = m_Values.begin(); it != m_Values.end(); ++it)
		{
			DATE dt = (*it).m_dDate;
			if (abs(dt - dDate) < 0.0001)
				break;
		}
		if (it == m_Values.end())
			throw CDSException("DSValues::GetOnDate - No value on requested date.");
		return *it;
	}
 
@Tony Is there some other it or are you using Visual C++ 6?
 
using VS 2003? this might have been written in vs 6.0..
don't tell me VC6 allows this? by what rule would that be?
 
@Tony The rule that it is very old.
 
@JamesMcNellis oh gosh! it looks ugly and distracting...
 
sbi
12:30 PM
@Tony With VC7.1, 2003, MS introduced proper for loop scoping around its tenth birthday.
 
@sbi wow! now that is shocking to me, why do it with such weird scoping mechanisms... is there a sensible answer or is it just one of those MS things?
 
I do far prefer the old for loop scoping.
for(int i=...){} return i; was a common pattern.
 
@Chris when would you need to return the value of i?
 
sbi
@Tony It's the way C++ used to be until the standard committee changed it around the beginning of the 90ies. Of course, the standard wasn't released until '98, but everyone on the standard committee knew it much earlier. Note that MS had lost their vote in the committee sometime during the 90ies, because they hadn't shown up too often.
@ChrisBecke And I would expect nothing less of you.
 
@sbi make sense, glad I wasn't around in those days then :)
 
12:37 PM
@sbi ah. thanks :)
 
@Tony, days of mixed handling of the standard are coming back. At least if you want to take advantage of C++0X.
 
@KonradRudolph when the value of i is important to determining how successful the loop was.
 
@AProgrammer yea well, its probably cuz they take so long to get a standard being approved
 
I mean, its quite possible to go:
int i;
for(i=0; i....
return i;
 
That’s what I thought. But can’t this always (more elegantly?) be solved by returning from inside the loop? That immediately gives you whether the loop was sucessful
 
sbi
12:38 PM
> I'm sure you'll come up with something else to be deeply offended about in due time.
 
I’ve never (!) so far needed to know the value of a loop after said loo, as far as I remember
(that’s why I asked)
 
@sbi I saw that, I find it severely disturbing and unprofessional
 
sbi
@Tony But nothing he's done so far tops releasing private information about one of his customers. (I've answered, BTW:)
2
 
@Tony I think sbi was making an ironic comparison between my tendency to get upset about some c++ issue, and his to get upset about user rights issues.
As sbi is to me (in the context of lounge<c++>) Jeff is to sbi (in the context of meta)
 
@Tony A quicker standard would probably not change that. Well, it could worsen it.
 
12:41 PM
@KonradRudolph while parsing arrays of characters, its useful to remember how far you got,
 
sbi
@ChrisBecke I think you're overestimating your and my role in this. The link I posted because of the issues I have with Jeff, not with you.
 
@sbi oh. somehow I saw that as a reply to me. perhaps im just sensitive to implied criticism :P
 
@ChrisBecke sbi is removing your messages?
 
@AProgrammer no I doubt he is, perhaps merely ignoring
 
sbi
@ChrisBecke You might want to read the newbie hints, which explain how referring works. :)
 
12:56 PM
@sbi I wonder how much trouble I'll get into for flagging that one offensive
guess we'll find out. But it is offensive, and I'd have flagged it if any other user had said it
 
1:22 PM
wow, it got silent all of a sudden
 
Als
What have i missed...I was on a work break lol :)
 
@jalf I'd start my own rant, but I doubt it will help matters
 
sbi
@jalf I had to go to a meeting. It was a short one, though.
@jalf Haha!
 
@jalf did you see the comment on your comment?
you wonder why anyone puts in any effort at all...
that is not very nice to say about someone " He is hardly the go-to guy for c++ knowledge on the site, though he is one of the more vocal ones"
 
sbi
@Tony I'd disregard that guy. Look how prejudiced he dealt with us having fun about the sex topic. (Not to mention his assumption that women must, naturally, be offended by such a discussion. That's pretty sexist, if you ask me.)
 
Als
1:31 PM
@Tony: What are you referring?
Link..?
 
sbi
He's almost as bad as the other one, who went so wild over this, that he accused me as going becoming a "raving lunatic" over it. :)
 
@sbi ok :) disregarded!
<rant> I think if we just as common users of the C++ lounge, just got along with each and not bothered too much about the rest, besides answering questions occasionally on SO, things would be better. </rant>
 
sbi
@Tony Except when one of us gets the rug pulled out under him once in a while.
 
@Tony that's what I've done until now
is the reason I never got involved in @sbi's last clash with Jeff. I just pretended that meta didn't exist, and ignored whatever went on there
 
1:46 PM
@sbi True, maybe we're taking it too personal... I guess you would if you've put that much work in...
 
sbi
@Tony I think you understood wrong. As I've already said, I didn't come here because I smelled trouble. I came here to discuss C++. Trouble found me, not the other way around.
And maybe I wouldn't even have made such a fuzz over Tina getting suspended. But releasing private information about someone is outright disgusting. I somehow can't get over this, and I can't keep my mouth shut over it.
 
@sbi I know you didn't come here for trouble, it be kinda weird if you did, anyways my point was that perhaps it just isn't worth going into the discussion any longer as we're not being heard anyways... that was what I was trying to say
 
@Tony Personal? I don't think so. The problem I've with history rewriting and censorship isn't personal. Ar the core it is the answer to the question "what is the goal of moderation? How much is it possible to do to achieve that goal?". I'm pretty sure I don't agree with SO staff on the second part. I'm beginning to wonder if I agree of the first one.
 
Just returned from work, can someone summarize what happened with tina or post a relevant link?
 
sbi
2
Q: What happened to that user?

sbi Possible Duplicate: Avoid the Streisand Effect - be clear about the reason when suspending an account While we never were very fond of Tina (renamed "Model" since, I think, yesterday) this state of affairs (all postings removed, and the avatar linking to a somewhat laconic "no user dat...

That, plus Jeff's revealed (in a comment) that she's a he.
 
1:51 PM
@sbi that is pretty disturbing I admit, and even though it seems right to make a fuss, it's not like we're being heard... so why bother?
 
@Tony that's the thing. I'm not taking any of this personally, and at a pretty fundamental level, I don't care what happens to SO. But I'm here because I enjoy helping others, and this site provides a nice way to do so. And if that changes, or if other things discourage me from using the site, then I won't be here much longer.
and I think it's only responsible to voice your concerns before they become serious problems. Whether anyone chooses to listen is their problem
 
@jalf oh good :)
 
sbi
@Tony My point is that this was exactly what I was thinking after the whole Eeek! disaster: enjoying the chat, keeping my mouth shut, no talking back anymore.
And the next thing Jeff goes and tells the world what a user didn't want to reveal about himself.
 
@sbi hell hath no fury...
lets go back to singletons, at least they provided a good laugh :)
 
sbi
@jalf: Actually, we are talking me getting banned. I got an email from Jeff telling me that I am not constructive, but whining, trolling, and harmful to the community, and that I should change that.
 
2:00 PM
@Tony I think the distinction for me is that I'm here because I want to help other programmers, not because I want to help SO. Until recently, playing along with SO has been a good way to achieve that. But now? Am I helping programmers by keeping quiet when the Meta police oversteps its bounds, hurting the quality of SO as a whole? Or when they release personal information about SO users?
 
hello
offtopic question:
math
 
@sbi I know. But my point in that specific comment was that they were pushing away senior C++ users such as you, not that they were going to ban you
 
area of a cone is pi r S for S the length of surface from bottom to top. correct?
 
@sbi If you get banned, I'm gonna disappear too, perhaps with others following...
not that i will be missed or anything, just as a matter of correctness really
I'm gonna shut up now...
 
@wilhelmtell Length of a surface? That seems strange as a formulation.
 
2:11 PM
the diameter of a circle with the same area as the surface perhaps?
 
sbi
2 hours ago, by James McNellis
@sbi They obviously do not like you. My sarcastic comments (like this one) do not get deleted (much as it surprises me).
@JamesMcNellis Worry not, I just brought it to their attention in a comment to meta.stackoverflow.com/questions/86733/…. :)
@Tony I think @jalf used the wrong word in his comment, and I mindlessly copied it. I believe we're talking suspension here.
 
struct a{ virtual void m(int)=0; };
struct b{ void m(int);};
....
struct deprecated{};
struct a{ virtual deprecated m(int){} virtual void m(int,int)=0;};
opinions: horrible hack? or cleverish way to detect un-refactored virtuals?
 
@sbi even that's bad enough and not deserved if you ask me
 
sbi
@ChrisBecke I usually do something like this to find such cases, and remove it once I have found and eliminated them. Of course, that presumes you can compile the whole codebase on your machine...
 
@ChrisBecke I don't even understand the point of the code
@sbi Who's gonna be grumpy around here if you got suspended? :p
2
 
sbi
2:21 PM
@Tony He's change the pure virtual to take another parameter. In derived classes where it is overridden, this won't be detected.
Adding an overload that makes these fail helps you detect them.
@Tony :)
 
@sbi I kinda get it I guess....
 
 
1 hour later…
3:24 PM
wow! If I got paid the salaries mentioned here, I'd be extremely happy to work day and night thurn.ca/the_programmer_salary_taboo
I've never actually met a person (dev) that makes that much, is that just a US thing those high salaries or do companies in Europe pay that much too?
 
@Tony There are US companies paying this much in their european centers (for senior but purely technical positions)
@Tony Agreed.
 
@AProgrammer yea so a fool like me stands no chance of ever getting there, cuz I don't even have a degree. :(
 
@Tony I won't say "most" because I don't have any statistics at hand, but many websites store your password in plaintext anyway. I would not trust any website to keep my password safe.
 
it's not that I'm so money motivated, but a nice wage does serve as encouraging
@JamesMcNellis valid point, however why would the govt require passwords to be stored as plaintext.... that's just silly.
 
@Tony Without degree it would be more difficult. Trying to get a degree which validate your experience or in a continued education setting is probably easier than going throught HR until you get someone really able to judge you.
 
3:45 PM
@Tony UK dev salaries range from £18000 - £32000 initially, the former being a junior role in say PHP somewhere, the latter being for a central london graduate for a finance firm (probably about £27000 anywhere else in the UK) which in USD is $29313 - $52112. Senior roles weigh in at around £40-50,000 ($65140-$81425) although some are higher so it's conceivable you might get paid that amount in a senior position in the UK, but not on average.
 
I don't think the companies cited in the article linked by Tony gives average salaries in the US either.
 
@AProgrammer probably not average...
 
4:02 PM
@Tony According to Schneier, that's not exactly what the law says. schneier.com/blog/archives/2011/04/new_french_law.html
 
Hi.. I've asked this question in the chat in the morning.. Still not able to debug..
I'm using a MAC, I have an inbuilt openssl which i am able run in the terminal.. But I am not sure where to locate the library to compile my C program.. I am getting the "Undefined Symbol" error instead of the .h file not located..
It would be great if some one can throw some light. Plz let me know if u want more information..
 
@JamesMcNellis Interesting point!
 
sbi
4:31 PM
@Maverickgugu Why don't you setup a real question on SO? There's not even twenty users here, half of which haven't said a word for hours, so are probably away from their computers. On SO, you might have hundreds or thousands of users seeing your question. If you want, you can still post a link here, but if you haven't got any useful information here all day, I doubt it's be worth the trouble. All this is written down in the newbie hints, BTW, linked from the right hand bar.
 
@sbi is it the wrong word? I really don't see the big difference between a 4-month suspension and a ban. How many of us could honestly say that we would come back to the site after such a lengthy suspension? In practice, it is a "we don't want you here, go away", and nothing else
not to bring all that up again, but I just got back online :)
 
sbi
@jalf I only got online a few minutes before you. :)
I left work and went to pick up the smallest two of my kids. Now I have already bullied them through the evening bathroom procedure, which is usually the worst part of the day. In about 15mins I'll be reading them a bedtime story, and then I'm free to...uh, wrestle the laundry, deal with the dishwasher, waste time on some bureaucracy, and things like that. :(
 
4:47 PM
@sbi fun fun. I left work, then went to buy a new bike :)
 
@jalf sounds like fun :)
 
why it says string identifier syntax error in the set methods :

#ifndef CLIENT_H
#define CLIENT_H

#include<string>

namespace ClientNamespace
{
		class Client
		{
		public:
			Client();

			void setName(string name);
			void setCpf(string cpf);
			void setPhone(string phone);

			string getName(){return name;}
			string getCpf(){return cpf;}
			string getPhone(){return phone;}

		private:
			string name;
			string cpf;
			string phone;
		};
}
#endif
 
@cyberrog it's std::string when you don't have a using namespace std; statement
which you wouldn't in header files
 
@Tony so instead of the include<string> i should use just std::string ??
error C2039: 'string' : is not a member of 'std'
 
@cyberrog no instead of using string in your function args and return values you use std::string
so std::string getName() {return name; }
 
4:58 PM
setName(std::string name); is it?
 
@cyberrog yes indeed
 
ok
 
@cyberrog by the way you should add a const qualifier after your getter . void getName() const {return name;}
 
sbi
5:30 PM
4
A: The use of getters and setters for different programming languages

sbiActually, getters and setters (as well as public properties hiding these) are very little improvement over public variables, and a pretty good indicator for quasi classes.

 
6:01 PM
@sbi One major improvement is that you can add code to getter or setter. This is useful if you suddenly want the class to detect that variable was changed.
 
@Eugene but you've still tied yourself to a far too explicit interface, where you're basically telling users of your class exactly what its internals look like. Bad design doesn't magically become good just because you can think of a single marginal advantage to it over another bad design
 
sbi
@Eugene But I never want to set any variables in classes. This is what encapsulation and abstraction, some of OO's cornerstones, is all about. I want to tell an object of the type vflrg to do brgl(), and expect said object to do just that. I don't frigging care whether vflrg objects keep their state up in th air, down in a DB, or in data members, let alone which ones those are. As long as vflrg objects do brgl() when I need them to, I'm fine.
When was the last time you set the size_ member of an STL container, carefully avoiding to forget to set their data_ member accordingly? As for me, I've always called resize(), and they did take care of that all by themselves. And, frankly, I prefer it that way.
 
@sbi Or you could call it SetSize() and have it do what resize does.
But yeah, setters are questionable, but getters? Sometimes a class does something and then its users need to pick results or states in peacemeal.
 
LOL, this question just got destroyed: stackoverflow.com/questions/5653662/….
Closed and deleted in two minutes flat.
 
@Eugene, the use of getters and even more setters give the impression that there is a bunch of independent state axis.
 
Xeo
6:18 PM
@GMan I'm curious as to what that question asked?
 
More often than not, it isn't the case. Members are bound by invariants and can't be set independantly.
@Xeo It was a classic "do my homework, now!" question...
 
@AProgrammer Yep. Let's say there is http connection class. To work it needs to know what socket, proxy and other random stuff to use. It also might need to let users have access to them. They might be classes of their own, or just enum values, but they do need to be set and retrieved...
 
sbi
@Xeo It didn't ask anything, it commanded: "write a program for color adjustment in red black tree ."
 
Xeo
@Eugene Set the important stuff in the constructor :P
I see.
Then there's nothing wrong with nuking it. :)
 
@Xeo yeah, and recreate the class everytime it changes? :)
 
sbi
6:20 PM
@Eugene No, resize() does more than merely setting the container's size. If the new size is greater than the old one, it will also fill in the new space with copies of an object that you pass it. Otherwise it will destroy the old objects in a well-defined order. And that's my point: resize() provides a higher abstraction than just changing a size data member.
 
Properties are such a wonderful things. I find getters/setters to be obnoxious.
 
Xeo
that's one good thing about C# - the properties
 
sbi
@Eugene That sounds like a bunch of data thrown together into a struct. Either pass it to the class' constructor, or pass it to a connect() member function.
 
@sbi right, it changes the actual size of the container. Regardless how it is represented inside.
 
sbi
@Xeo I find that they bend programmers to a data field-centric way of programming, rather than algorithm-centric. That happens to me, even, although I struggle to avoid it, because I prefer the algorithm-centric POV.
 
6:25 PM
The worst is private variable; getVariable() { return private variable; } setVariable(value) { private variable = value; }. And the worst worst is when they claim it's because it might change in the next hundred years.
 
Xeo
I just found another problem if @sbi leaves SO ... whose messages are we gonna star all day?
 
What if every member variable automatically had underlying get and set functions?
 
@Xeo Mine.
 
You could even do something like virtual int x;, which says the get and set functions are virtual.
 
Xeo
@GMan Isn't that what c# properties do?
 
6:28 PM
@GMan That's what properties do.
 
sbi
@Eugene Ok, scratch that example, maybe it's too subtle. Take your connection class. Rather than setting what socket, proxy etc. your class should use and then calling connect(), tell it to connect to this proxy, using that socket, etc., by calling a member function that does so. In short: tell it what to do, instead of fiddling with its innards (whether through a layer or directly).
 
@GMan Would you inherit int?
 
@PiotrLegnica I just recently had to change some of my public interfaces from passing struct with bunch of public variables around, to passing a class with bunch of getters and setters. Only after 3 years :)
 
@Eugene I need to know what a class does, not with what it does it.
 
@PiotrLegnica @Xeo Yes, I'm talking about for every single member variable.
 
Xeo
6:29 PM
@AProgrammer Could be hard... myHTTPConnection.connect() okay, wait.. with what? :P
 
@sbi that means client must keep those things around. Definitely not a problem, but can get cumbersome. Much easier to set up connecting object and say pass it down the chain to be used elsewhere.
 
@StackedCrooked I think so.
 
sbi
@Xeo Yeah, it's been a strange day. I have three starred messages in that sidebar, and someone even pinned one of them.
 
Properties -- like setters and getters for which they are only syntactic sugar -- leads to thinking of classes as data container. That's true for some of them, but far from the majority in my experience.
 
@AProgrammer Is that a rebuttal to something?
 
6:32 PM
@GMan What about a template wrapper that allows you to implement operator= and operator T ? Wouldn't that give you more or less the desired behavior?
 
sbi
@Eugene Why would a client need to keep that data around? After I told the connection class what parameters it should connect with, if that class needs those parameters again (for whatever reason), I'd expect it to take care of that need by itself.
 
@StackedCrooked I'm not sure I understand where you're heading.
 
@GMan As most of them need neither and those which need the get don't need the set, it would be worse than the current situation.
 
I remember writing something like that here once.
 
@AProgrammer Worse...how?
 
6:33 PM
@GMan Variable<int> a; a.setter = mySetFunctor;
 
@StackedCrooked Are you trying to make a sort of property class?
 
@sbi but how do you tell it? Constructor is one way, but requires recreating classes when changing. A setter is another way (I consider setAllConnectionParameters(...) to be a setter too btw). And initialization might be quite removed from action.
 
@GMan I think it would boil down to that yes.
 
Xeo
@Eugene save it in the connect method?
 
6:35 PM
@GMan You'll have to desactivate somehow all the operations which aren't needed.
 
42 days ago, heh.
 
@Xeo what if you want to set them now and connect much later in the different part of the code?
 
@GMan Seems better than inheriting int.
 
@PiotrLegnica Better would be to make a custom constructor, not assignment operator. stackoverflow.com/questions/3181766/… Compiler handles the rest.
@StackedCrooked I'm not sure I follow what point you're replying to, sorry.
 
@Eugene But I still don't see why you need setters/getters for that, just set variables and call connect afterwards.
@GMan I'll keep that in mind, thanks.
 
6:38 PM
@GMan This is what I'm responding too. I'm probably confused again..
 
@StackedCrooked Right, that's just a theoretical idea I had, has nothing to do with C++ per se.
 
@Eugene For a file stream, I've an open with takes the name and the mode. Why would a network stream needs setters and getters?
 
@AProgrammer "Deactivate"? What do you mean by that?
 
@GMan Ah. Good.
 
sbi
@Eugene I don't tell it to save anything. I tell it to connect to somewhere and take care of whatever it needs to do to maintain that connection. If that includes caching the data, then it should do so. And if I want it to disconnect and connect to somewhere else, I'd expect the methods (or one, whatever seems Ok) to do so.
 
6:40 PM
Sorry if I seem dense.
 
@PiotrLegnica You mean just set public variables? That is worse that private var + set and get, because you can't add logic at the point of setting it later, without updating client code.
lol, it is rare that I get to argue from a centrist position.
 
@GMan You wanted to have automatically setters and getters for each data member. As most of them aren't needed and would be harmful if publicly provided, one would need to deactivate them in a way or another (=delete would be the obvious C++0X syntax).
 
I like a design that works with delegates instead of getters/setters. For example in Cocoa you cannot call setWidth on a window, you have to override the getWidth method instead. (Or roughly something like this.)
 
@Eugene Why would you need logic in there? You have the logic in connect.
 
Postponing state is often a good thing.
 
sbi
6:43 PM
@jalf: I couldn't get Adam get away with his latest comment, so I answered. :-x
 
@PiotrLegnica maybe you realize later you need to know when the variable changed. Maybe to emit a signal that will eventually update UI or something.
 
@AProgrammer How is that harmful? I feel like we're in circles. You said "that's harmful" and I asked why and you said "they'd need to be removed" and then said "because they are harmful".
 
HTTP connection class updating the UI?
 
@PiotrLegnica Lol, httpConnection->setOKButton(..); // :)
 
@PiotrLegnica no, but some class that handles UI will need to.
 
6:45 PM
Then why do you want setters in HTTP connection one? :P
 
All I'm suggesting is that struct foo { T x; } magically becomes struct foo { const T& __get_x() const { return __x; } T& __set_x(T x) { __x = std::move(x); return __x; } private: T __x;};.
 
lol, my example was torn apart!!
 
And that foo f; f.x = 5; becomes f.__set_x(5);, and vice versa. There's no performance overhead and no maintanence.
 
@sbi so that would be a call to setupConnection() first, that might not actually do more than saving all the parameters you passed in. Which makes it a glorified setter with or without logic.
 
@GMan The purpose being to allow the programmer to customize the set/get actions (logging,..) ?
 
6:49 PM
Anyway, that's why I prefer properties. They're variables until you need them to become something more.
 
Ah, yes, also logging!
 
@StackedCrooked Sure. The purpose of any abstraction: to allow additional functionality between the layers.
I really never understood the argument against getters and setters, is the thing. Someone debate me!
 
@GMan They're ugly. :P
 
Xeo
DeadMG anywhere to be seen? No? /me nomz an apple cookie
 
@PiotrLegnica Psha!
 
6:51 PM
Too much logic in setters is not a good thing, too. Eh, programming be hard, let's go shopping.
 
@cyberrog Prefer to pass strings in and out of your class through const references, you can avoid quite a bit of copying (or reference counting in some STL implementations) by doing so. As an example, when you call setName the compiler will add code to create a new string that is the first argument to the function, and then that copy will get copied into the actual attribute (the compiler cannot elide the copies here in the general case --it could if it inlines the setter)
 
Beware though. I once shot me in the foot with code that looked like this:
const std::string & MyClass::name() const
{
ScopedLock theLock(mMutex);
return mName;
}
 
@PiotrLegnica as for http connection updating UI, it actually might, if you consider signals/slots architecture like in Qt or boost.
 
Followed by: std::cout << obj.name() << std::endl; // getting funny results
 
@StackedCrooked Ouch.
 
6:56 PM
@GMan Yeah, didn't realize the problem at time of writing it...
@GMan I take it you didn't refer to the unnamed ScopedLock (which I just edited).
 

« first day (179 days earlier)      last day (4762 days later) »