Re: [OT, rant] unsure how to implement MFC CArray with class
"WW" <wolof@freemail .hu> wrote in message
news:blhpeb$pb0 $1@phys-news1.kolumbus. fi...[color=blue]
> Mike Wahler wrote:[color=green]
> > [sigh]
> >
> > *PLONK*[/color]
>
> Et tu, Mike? ;-)[/color]
:-)
What really got me was:
<quote>
"after almost 20 years as a professional programmer writing
in 6 languages under I'm not sure how many different OS
environments... "
</quote>
(obviously an attempt to impress people
and/or engender their 'sympathy')
<quote>
"Having 2 small children and job deadline pressures to meet,
I usually don't have the luxury of poring through docs..."
</quote>
(more childish whining)
So, to Mr. Stenzler, a reality check:
[big breath]
During my just under thirty years as a software professional,
in more languages than I can recall (in excess of two dozen),
with 10+ operating systems, dozens of special purpose libraries,
many special-purpose hardware devices with their idiosyncracies
and outright bugs, in over 20 vertical markets, dealing with many irrational
or unreasonable requests/demands, negotiating with
employers, clients, and vendors, managing subordinates,
administrating computer networks, participating in marketing,
deployment, user training, and customer service, continuing my
education via books, seminars, and consultants, in 7 U.S. states,
and often exhausting business travel (both air and land), I've
never needed to make demands of or abuse others in order to do my
job effectively.
I've never used the circumstances of my personal life (which
as is probably the case with almost anyone, have been occasionally
quite trying) to justify defaulting on my self-reponsibility
or attempting to assign that responsibility to others, in order
to acquire any additional knowledge and/or skills necessary
to to my job.
And I still somehow found time to write this rant. :-)
Employer/client: "I need this new technology integrated
into the project."
Employee/consultant: "But I don't know how to do that,
I don't have time to learn, and
I can't find anyone to do it for me."
Employer/client "Help wanted."
You need not reply, Mr. Stenzler, I won't see it.
There, I feel better now. We now return you to
your regularly scheduled programming. :-)
Re: [OT, link] unsure how to implement MFC CArray with class
"Jonathan Mcdougall" <jonathanmcdoug all@DELyahoo.ca > wrote in message news:hy0fb.8309 $yV2.132914@web er.videotron.ne t...[color=blue][color=green]
> > it seems to me that using this std::vector class to instantiate an array
> > of class objects isn't too efficient.[/color]
>
> For sure arrays are more efficient than std::vector, since it is a
> class with some book-keeping. But imho, better safe than sorry.[/color]
For sure, vectors are not slower for most of what you are doing on
a reasonable implementation. This is precisely the reason operator[]
does not do any range checking, etc...
[color=blue]
> is best you can have. In the best case, it only redirects to the
> array (assuming the internal representation _is_ an array).'[/color]
Which is no more work than what the compiler does to access
the array in most cases.
[color=blue]
> If you want to enlarge the vector, you *must* *add* elements
> via push_back() or insert().[/color]
Re: [OT, link] unsure how to implement MFC CArray with class
> int main()[color=blue]
> {
> vector<my_class > v; // a vector of my_class'es
>
> v.push_back(my_ class());
> v.push_back(my_ class());
>
> // v now contains two objects
>
> v.pop_back();
>
> // v now contains two objects[/color]
I just saw that comment, yurk! 'v' contains *one* element now,
not two. pop_back() removes the last element. Sorry.
[color=blue]
>
> // inserting a new object in front
> v.insert(v.begi n(), my_class());[/color]
Two elements now.
[color=blue]
> v[0].f(); // "hello"
> v[1].f(); // "hello"
> }[/color]
Re: [OT, link] unsure how to implement MFC CArray with class
Yeah, that did confuse me a bit, see my email.
There *is* some unusual behaviour or wrong usage on my part under VC++,
it may be have to do with reserve() vs the element allocation of
push_back(). I'll check in the AM at work.
Thanks
Mike
Jonathan Mcdougall wrote:[color=blue]
>[color=green]
> > int main()
> > {
> > vector<my_class > v; // a vector of my_class'es
> >
> > v.push_back(my_ class());
> > v.push_back(my_ class());
> >
> > // v now contains two objects
> >
> > v.pop_back();
> >
> > // v now contains two objects[/color]
>
> I just saw that comment, yurk! 'v' contains *one* element now,
> not two. pop_back() removes the last element. Sorry.
>[color=green]
> >
> > // inserting a new object in front
> > v.insert(v.begi n(), my_class());[/color]
>
> Two elements now.
>[color=green]
> > v[0].f(); // "hello"
> > v[1].f(); // "hello"
> > }[/color]
>
> Jonathan[/color]
Re: [OT, link] unsure how to implement MFC CArray with class
Mike Stenzler wrote:[color=blue]
>
> Attila Feher wrote:[color=green]
> >
> > Mike Stenzler wrote:[color=darkred]
> > > Let me see if I understand this correctly -
> > > 1. If I ask a question that is OT I can expect to be told to use
> > > another newsgroup,[/color]
> >
> > Yes.
> >[color=darkred]
> > > but if I modify my question so that it is on-topic - this is the
> > > right place.[/color]
> >
> > Yes.
> >[color=darkred]
> > > 2. If my question is on-topic I can expect to be told to RTFM as this
> > > group isn't about helping people.[/color]
> >
> > No. Only if you want people to type you in a 4 chapters book explaining
> > std::vector.[/color]
>
> Does this look like 4 chapters to you? To me it looks like a simple
> helpful answer.[/color]
It's only 5% you should or need to know about vectors.
The remaining 95% are what is written in those 4 chapters.
But it has the benefit, that if you have read those 4 chapters
you would also know how to work with std::list, std::map, std::multimap, etc ...
[color=blue]
>
> Mike aka Senior Vice President & Chief Technology Officer of a company
> that manages (very well thankyou) close to a billion (with a B) USD - of
> course I have absolutely no qualifications for the job, they just took
> pity on me once they realized what a tough time I had programming.[/color]
In this NG we don't care who you are or what your position is.
Even if Stroustroup himself posts and is wrong he will
be corrected.
Re: [OT, link] unsure how to implement MFC CArray with class
Karl Heinz Buchegger wrote:
[SNIP][color=blue]
> In this NG we don't care who you are or what your position is.
> Even if Stroustroup himself posts and is wrong he will
> be corrected.[/color]
Re: [OT, link] unsure how to implement MFC CArray with class
Karl Heinz Buchegger wrote:
[snip]
[color=blue]
> It's only 5% you should or need to know about vectors.
> The remaining 95% are what is written in those 4 chapters.
> But it has the benefit, that if you have read those 4 chapters
> you would also know how to work with std::list, std::map, std::multimap, etc ...[/color]
understood - my immediate need was just for some syntax on std::vector
or any similar animal (hence the initial misdirected request re CArray),
it would be nice to know all of the rest, but to solve my problem of the
moment I just needed to see if vector would work for me.
[color=blue][color=green]
> > Mike aka Senior Vice President & Chief Technology Officer of a company
> > that manages (very well thankyou) close to a billion (with a B) USD - of
> > course I have absolutely no qualifications for the job, they just took
> > pity on me once they realized what a tough time I had programming.[/color]
>
> In this NG we don't care who you are or what your position is.
> Even if Stroustroup himself posts and is wrong he will
> be corrected.[/color]
It was a joke son, a joke! :-) I didn't post the above to appear better
than anyone - just to sarcastically reply to the the poster below who
implies that I'm having such a tough time programming. My point was that
the evidence of my position belied the statement - I've been pretty damn
successful in life writing code. I was also kinda teasing him since he
signs his posts as "WW aka Atilla". However, it's true that position
doesn't directly equate to competence - lots of folks get promoted (or
elected) over their heads, and in the context of a newsgroup I can see
how it could be misinterpreted - so it was a poor choice of words in
this senseless pissing match.
[color=blue][color=green][color=darkred]
>>> WW wrote:
>>> [snip]
>>> Until someone such as yourself is unable to type in std::vector into his
>>> IDE, move the cursor into it and press F1 someone such as yourself will have
>>> somewhat tough time programming.[/color][/color][/color]
[snip]
[color=blue]
>
> I just saw that comment, yurk! 'v' contains *one* element now,
> not two. pop_back() removes the last element. Sorry.[/color]
No problemo - but I now see what happened - with the funky comment, I
misinterpeted your inclusion of pop_back() as somehow required rather
than illuminative, then I was led off track by looking at what may be
VC++'s internal representation of the vector. As soon as I looked at the
code snippet and your post this morning it was obvious that I didn't
need the pop_back in the context of what I was doing.
So far vector looks OK for my needs but I'll run a test against a static
array later and see if the overhead is excessive.
Attila Feher wrote:[color=blue]
>
> Mike Stenzler wrote:[color=green]
> > kinda teasing him since he signs his posts as "WW aka Atilla".[/color]
>
> Learn to read.
>
> --
> Attila aka WW[/color]
Hey, I thought I was in your kill file!
I guess you should check Google before posting, eh?
Well, I swore I was done peeing, but you are such an easy target...
[below from several earlier posts]
WW wrote:[color=blue]
>
> [SNIPPO]
> I can understand if someone is desperate. But all I can say is:
>
> http://mars-attacks.org/~boklm/browse/humor/bart.gif
>
> --
> WW aka Attila <----------- hmmmm, interesting....[/color]
WW wrote:
[snip][color=blue]
> You have time to post that f*cking bullsh*t but you did not have time to
> press F1 and look at your helpfile for vector. Congratulations . You must
> be fun to work with!
>
> [TROLLING SNIPPED]
>
> *PLONK*
>
> --
> WW aka Attila <------------ well, I guess you see my point...[/color]
What is it about this that you are unwilling to let go of?
Read your own posts above and give it up - YOU ARE WRONG.
Now, listen - I came to this newsgroup, posted a question that was OT.
OK, I'm guilty, I've admitted that several times. When it was suggested
to me that std::vector would work just as well, I modified my question
to be on-topic.
I also replied to Mike Wahler prefaced with "// small rant below" re his
telling me to read my doco twice in his post. Now, maybe my choice of
words wasn't great, but I simply tried to say I was busy, pressured, and
what was in my mind was a simple question that maybe someone who knew
the answer could help with. The "rant" preface implies the writer isn't
taking himself too seriously and the reader should do likewise. I didn't
ask for a lecture, just some help.
What I got was you pouncing all over me and acting like a bully and
autodidact. Fact is, even after claiming (see above) that I was in your
kill file, even after I stopped responding, you kept reading my posts
directed at others and further flaming me - acting like a total troll
even as you accused me of being one. Even after I stopped responding,
you continued to bash me in public with Mike Wahler who also claimed to
have "killed" me. It seems to me to be a cowardly act to "kill" someone
and then continue to bash them - they can't "fight back".
Now, I don't know you, and really don't have anything against you or
anything to gain by continuing this except I don't like being bullied or
treated rudely. I asked a question, got a rude response and replied to
your rudeness. I used sarcasm, a great weapon effective against both
fools and kings. It seems to have gone over your head. I have not
attacked you personally except one reference of your behaviour being
that of a net-nazi, you on the other hand have pursued numerous ad
hominem attacks both directly and via links that portray me as a fool
and blowhard. That doesn't seem like polite netiquette to me.
So have a happy life, YOU are now in MY kill file!
Mike Stenzler wrote:[color=blue]
> Attila Feher wrote:[color=green]
>>
>> Mike Stenzler wrote:[color=darkred]
>>> kinda teasing him since he signs his posts as "WW aka Atilla".[/color]
>> --
>> WW aka Attila <----------- hmmmm, interesting....[/color][/color]
And not Atilla.
[color=blue]
> WW wrote:[color=green]
>>
>> Mike Wahler wrote:[color=darkred]
>>> [sigh]
>>>
>>> *PLONK*[/color]
>>
>> Et tu, Mike? ;-)
>>
>> --
>> WW aka Attila <----------- again, interesting....[/color][/color]
And again, not Atilla.
[color=blue]
> WW wrote:
> [snip][color=green]
>> You have time to post that f*cking bullsh*t but you did not have
>> time to press F1 and look at your helpfile for vector.
>> Congratulations . You must be fun to work with!
>>
>> [TROLLING SNIPPED]
>>
>> *PLONK*
>>
>> --
>> WW aka Attila <------------ well, I guess you see my point...[/color][/color]
And again, not Atilla.
[color=blue]
> Attila Feher wrote:[color=green]
>>
>> [SNIP]
>> http://www.winternet.com/~mikelr/flame43.html
>>
>> --
>> Attila aka WW <------ ahh, you must be thinking about this[/color][/color]
And again, not Atilla.
[color=blue]
> What is it about this that you are unwilling to let go of?
>
> Read your own posts above and give it up - YOU ARE WRONG.[/color]
On Fri, 3 Oct 2003 18:36:11 +0300, "Attila Feher" <attila.feher@l mf.ericsson.se> wrote:
[color=blue]
>Mike Stenzler wrote:[color=green]
>> Attila Feher wrote:[color=darkred]
>>>
>>> Mike Stenzler wrote:
>>>> kinda teasing him since he signs his posts as "WW aka Atilla".
>>> --
>>> WW aka Attila <----------- hmmmm, interesting....[/color][/color]
>
>And not Atilla.
>[color=green]
>> WW wrote:[color=darkred]
>>>
>>> Mike Wahler wrote:
>>>> [sigh]
>>>>
>>>> *PLONK*
>>>
>>> Et tu, Mike? ;-)
>>>
>>> --
>>> WW aka Attila <----------- again, interesting....[/color][/color]
>
>
>And again, not Atilla.
>[color=green]
>> WW wrote:
>> [snip][color=darkred]
>>> You have time to post that f*cking bullsh*t but you did not have
>>> time to press F1 and look at your helpfile for vector.
>>> Congratulations . You must be fun to work with!
>>>
>>> [TROLLING SNIPPED]
>>>
>>> *PLONK*
>>>
>>> --
>>> WW aka Attila <------------ well, I guess you see my point...[/color][/color]
>
>
>
>And again, not Atilla.
>[color=green]
>> Attila Feher wrote:[color=darkred]
>>>
>>> [SNIP]
>>> http://www.winternet.com/~mikelr/flame43.html
>>>
>>> --
>>> Attila aka WW <------ ahh, you must be thinking about this[/color][/color]
>
>
>
>And again, not Atilla.
>[color=green]
>> What is it about this that you are unwilling to let go of?
>>
>> Read your own posts above and give it up - YOU ARE WRONG.[/color]
>
>Nope. I am Attila. Learn to read.
>
>[TROLLING SNIPPED]
>
>--
>Attila aka WW[/color]
Comment