Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stackoverflow - a fascist web-site.

497 views
Skip to first unread message

Vlad from Moscow

unread,
Nov 7, 2015, 3:26:46 PM11/7/15
to
I encountered that the Stackoverflow is providing an openly discriminatory policy now and even does not try to hide this.

My entirely correct answers are purposely down-voted.

Here is a refernce to such a question.

http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572

Sometimes it can be that somebody does not agree with your answer. But usually he points the reason of the disagreement in his comment and I can provide a reference to the C Standard that to prove my point of view.

But the problem is nobody needs my reference. The purpose is to down-vote the answer.

I tried to attract attention of moderators but all was in vain.

On the other hand if I down-vote somebody's incorrect answer and even write in a comment what is wrong in the answer then instantly a complain follows to moderators and I am banned.

As I was already said several times at the same Stackoverflow the problem is that I am from Russia and this is clear from my nickname Vlad from Moscow.

I asked a question at Meta that to discuss the situation but again I was ignored and my question was just removed.

So I am again banned after my correct answer was deliberately down-voted and after I asked a question how to behave in such situations.:)


Melzzzzz

unread,
Nov 7, 2015, 3:34:14 PM11/7/15
to
On Sat, 7 Nov 2015 12:26:14 -0800 (PST)
Vlad from Moscow <vlad....@mail.ru> wrote:

> I encountered that the Stackoverflow is providing an openly
> discriminatory policy now and even does not try to hide this.

Almost all web forums are shit, I avoid them. Unfortunately usenet is
dying because of ISP's...

Vlad from Moscow

unread,
Nov 7, 2015, 4:06:07 PM11/7/15
to
In my case all is done without any ceremony.

Now if somebody finds this reference in the internet and sees that a correct answer was down-voted he will conclude that stackoverflow is a a forum of dummies.:)

Paavo Helde

unread,
Nov 7, 2015, 5:59:00 PM11/7/15
to
Vlad from Moscow <vlad....@mail.ru> wrote in
news:d08f29be-2746-45e8...@googlegroups.com:

> I encountered that the Stackoverflow is providing an openly
> discriminatory policy now and even does not try to hide this.
>
> My entirely correct answers are purposely down-voted.

Fascism is defined as "a governmental system led by a dictator having
complete power, ...". so in this case, who is this dictator, in your mind?

If you get down-voted, then this most probably means you are dealing with a
democracy, not with fascism. Note that in democracy the voters need to like
you and (to some extent) what you are saying, the truth is not so important
(albeit a little more important than in fascism). Also note that the voters
might probably like you more if your name does not trigger negative
associations with all the other daily input the voters receive.

Luca Risolia

unread,
Nov 7, 2015, 6:11:45 PM11/7/15
to
Il 07/11/2015 23:58, Paavo Helde ha scritto:
> Fascism is defined as "a governmental system led by a dictator having
> complete power, ...". so in this case, who is this dictator, in your mind?

it's more an ideology than a "governmental system led by a dictator"

Vlad from Moscow

unread,
Nov 7, 2015, 6:22:23 PM11/7/15
to
On Sunday, November 8, 2015 at 1:59:00 AM UTC+3, Paavo Helde wrote:
> Vlad from Moscow wrote in
I wonder how many double standards there are in the West!

Well, then let you will be banned here because you are not from Russia and I do not like your answers. It will be indeed the democracy, is not it?:)

I may down vote your answers you may not. I may ban you because I do not like your answers or questions you may not.

It is a good democracy. I like it. When will we start to carry out the democracy?:)

Paavo Helde

unread,
Nov 7, 2015, 6:29:37 PM11/7/15
to
Vlad from Moscow <vlad....@mail.ru> wrote in
news:fd3ee07f-25d4-45a1...@googlegroups.com:

>
> I wonder how many double standards there are in the West!
>
> Well, then let you will be banned here because you are not from Russia
> and I do not like your answers. It will be indeed the democracy, is
> not it?:)

In usenet banning is easy and is done via "killfile". I have 3 names in my
killfile. Not sure if this is related to democracy in any way.

Vlad from Moscow

unread,
Nov 7, 2015, 6:51:09 PM11/7/15
to
I'd like to append my first post that my answer at Stackoverflow was down-voted in revenge.

When I asked the question at Meta what to do when a correct answer is down-voted because moderators had ignored my appeals then at once my answer on C was down-voted several times in spite on the fact that some partipants pointed out that my answer is correct.:)

So I was banned that I would not ask such questions any more in the future.:)

On the other hand it is enough somebody to complain to me and I am banned at once.

Moreover I was called there that I am a prostitute because I answer usually all the questions on C and C++ in a row and nobody was banned after that.:)

It is indeed a democracy!:)

woodb...@gmail.com

unread,
Nov 7, 2015, 9:27:49 PM11/7/15
to
I've experienced similarly bad behaviour at Stackoverflow.
In particular "Bill the lizard" has been, like some in this
newsgroup, in denial about the C++ Middleware Writer and
on line code generation.

Brian
Ebenezer Enterprises - If you can't join 'em, beat 'em.
http://webEbenezer.net

Geoff

unread,
Nov 7, 2015, 10:20:58 PM11/7/15
to
On Sat, 7 Nov 2015 12:26:14 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>My entirely correct answers are purposely down-voted.
>
>Here is a refernce to such a question.
>
>http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572

In this particular case at least, your answer is not "entirely
correct". You fail to address the inadequate array sizes explicitly.
You changed the array size of ckey from 5 to 6 but didn't address the
incorrect assignment of char key[5] = "april" which fails to account
for the terminating '\0' required in the initialization. You would
have been better to correct this to char key[]="april" and let the
compiler do the work and to point that out to the OP.

Your "comparison" code compares the strings based on the length of key
but takes no account of the length of ckey, allowing your comparison
to yield true for any ckey beginning with april (e.g., "aprilaaaa")
and fails to address the potential for the overflow of the ckey array.

You wrote:
>char key[5]="april";
>
>is totally valid in C though is not valid in C++.:)

This statement is completely incorrect. It is not valid in C or C++.

Alf P. Steinbach

unread,
Nov 8, 2015, 1:04:59 AM11/8/15
to
On 11/7/2015 9:26 PM, Vlad from Moscow wrote:
> I encountered that the Stackoverflow is providing an openly discriminatory
> policy now and even does not try to hide this.
>
> My entirely correct answers are purposely down-voted.
>
> Here is a refernce to such a question.
>
> http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572

First, the answer is currently /imperfect/ in that it doesn't explicitly
mention the buffer size problem /up front/. That in itself can be enough
to trigger a flood of downvotes, from those who are not aware of the
technicalities, and when they've committed to downvoting they'll not
change their minds. But originally it was much much worse, with no
mention at all of that problem until this was added:

<quote>
P.S. Do not take into account that the answer is down-voted. The reason
is that low-qualified beginners like **@Ed Heal**, **@lurker** or
**@machine_1** or **@hexasoft** do not know that this declaration

char key[5]="april";


is valid in C though is not valid in C++.:)
</quote>

Now that's a sure-fire way to attract a storm of downvotes.

I have on occasion found it probably useful to the community to point
out some convincing idiot's technical incompetence, and then I've done
it: here, on SO, and elsewhere. I've done that knowing and anticipating
the very socially oriented reaction. It sounds like you didn't expect it?

* * *

Secondly, the answer doesn't discuss how that buffer size is likely a
misunderstanding on the part of the OP.

Assuming on the one hand, that the OP doesn't know how to compare
strings, and at the same time, that the OP intentionally chooses a too
small buffer, doesn't hang together, i.e. the answer is /inconsistent/.

Now I wouldn't downvote for that but I'd add a comment asking you to fix
that, or (perhaps most likely) I'd just edit the answer.

* * *

To lift a ban on SO you have to be lucky, as I understand it. Attracting
votes via old answers. Changing old answers so they turn from downvoted
to upvoted. Of course if you're locked out you can't do that. Hm.


Cheers & hth.,

- Alf

Vlad from Moscow

unread,
Nov 8, 2015, 2:42:32 AM11/8/15
to
On Sunday, November 8, 2015 at 6:20:58 AM UTC+3, Geoff wrote:
> On Sat, 7 Nov 2015 12:26:14 -0800 (PST), Vlad from Moscow
Welcome to the C programming language!:)

Now you will know that such a declaration

char key[5] = "april";

is totally valid in C.:) And moreover is used very othen in C.

If you need not the terminating zero (and in the program that was showed in the question the terminating zero indeed is not needed) then you can declare a character array with a size that trhe initialization will not include the terminating zero in the array.

And I pointed to this peculiriaty of C in my answer. And moreover the question was about another problem and that problem is not related to the array initialization. And I showed how to resolve the problem if standard C string functions may not be used.

But in any case any particioant could give his own answer to the question where he could describe his own *opinion* about the array initialization. It is only *opinion* because the initialization is correct.

What is the matter?

Why entirely correct answer is unprecedented so much down-voted?

IsStackoverflow a parody on professinal programmers forum where wrong answers are up-voted and correct answers are down-voted?:)

What are the tasks of the Stackoverflow? To populate illiteracy? To flood the internet with wrong answer that to confuse programmers who will find answers to their questions in internet?

The facts are better any words. A person who gave a correct answer was down-voted and banned.:)

It is not the first time when my correct answers are deliberately down-voted without any reasonable explanations that even other participants sometimes write me in comments that it is because you are from Russia.:)


Bo Persson

unread,
Nov 8, 2015, 3:43:04 AM11/8/15
to
On 2015-11-08 07:04, Alf P. Steinbach wrote:
>
> To lift a ban on SO you have to be lucky, as I understand it. Attracting
> votes via old answers. Changing old answers so they turn from downvoted
> to upvoted. Of course if you're locked out you can't do that. Hm.
>
>

Vlad's page says that it is a limited 1 week ban as a cool off period.
It will be lifted automatically when it expires.


Hopefully, by then Vlad will have had some time to think this over and
realize that calling people names doesn't improve the votes. And that
technically correct answers aren't always fully appreciated.

Like in politics, you get many votes for simple solutions that people
understand. Really advanced answers can get just 1 or 2 upvotes from
those who understand it, while a simple quote from the language standard
can get you a hundred upvotes. That's life.



Bo Persson

Vlad from Moscow

unread,
Nov 8, 2015, 4:08:31 AM11/8/15
to
I was going to provide a refernce to the C Standard and usually my answers begin with such a reference.

But first of all the question was not about character arrays initializations in C and 1) the behaviour of whose who dwon-voted was so aggressive that they did not want to listen to the reason and 2) I had not at hand the open C Standard at that moment.

On the other hand whose who down-voted also could give a reference to the Standard if they think that my answer is in essence wrong.

But nine down-votes say themselves that nobody was going to do that.:)

Ben Bacarisse

unread,
Nov 8, 2015, 6:40:35 AM11/8/15
to
Yes, it's valid but I would not say it's often used. I can't remember
the last time I saw such a thing "in the wild", whereas initialisations
that include the null are very common indeed.

<snip>
> Why entirely correct answer is unprecedented so much down-voted?

It's not "entirely correct" because the question was about comparing
strings, and char key[5] = "april"; is not a string -- it's a just a
character array. (7.1.1 p1 "A string is a contiguous sequence of
characters terminated by and including the first null character.")

It's also possible that some of the reaction was because your answer was
a bit left-field. To do the comparison with a non-string, using the
size to terminate the loop, is not idiomatic C. The code is correct in
that it works, but it would be unlikely to pass a code review in most
companies.

I would not have down-voted the answer, but I'd have added a comment
about the non-idiomatic code and that fact that key not a string.

<snip>
--
Ben.

cda...@gmail.com

unread,
Nov 8, 2015, 6:51:15 AM11/8/15
to
Well this is kind of new and exciting.

Vlad from Moscow

unread,
Nov 8, 2015, 8:33:28 AM11/8/15
to
On Sunday, November 8, 2015 at 2:40:35 PM UTC+3, Ben Bacarisse wrote:
The question is not about how to compare strings. The question is about how to compare the content of the given character array key that initialized wiith 5 characters with entered 5 characters without using any other library functions.

And I showed how it can be done. And the solution is correct.

If you think that there is another better solution then what is the matter? Write your own answer!

But do not down-vote a correct answer if you even do not know how character arrays may be initialized in C. At least you always may ask in a comment why is there used such an initialization.

And moreover it was not my code. This initialization initially was in the code example of the question. It is a correct initialization. So as there is no any need to compare character strings as you are saying then I did not discuss this aspect.

I answered directly the question.

And again you (of course I mean any participant not personally you) always may write you own answer. And maybe your answer will be marked as the best by the author of the question.

To achieve this there is no any need to down-vote correct answers. Otherwise you are simply confusing others.

Ben Bacarisse

unread,
Nov 8, 2015, 8:56:43 AM11/8/15
to
Vlad from Moscow <vlad....@mail.ru> writes:

>> >> On Sat, 7 Nov 2015 12:26:14 -0800 (PST), Vlad from Moscow
<snip>
>> >> >http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572
<snip>
> On Sunday, November 8, 2015 at 2:40:35 PM UTC+3, Ben Bacarisse wrote:
>> Vlad from Moscow writes:
<snip>
>> > Why entirely correct answer is unprecedented so much down-voted?
>>
>> It's not "entirely correct" because the question was about comparing
>> strings, and char key[5] = "april"; is not a string
<snip>

> The question is not about how to compare strings.

It was called:

"Comparing strings with if else"

You can, I hope, see why some people might think the question was about
strings?

<snip>
--
Ben.

Vlad from Moscow

unread,
Nov 8, 2015, 9:54:33 AM11/8/15
to
On Sunday, November 8, 2015 at 4:56:43 PM UTC+3, Ben Bacarisse wrote:
> Vlad from Moscow writes:
>
> >> >> On Sat, 7 Nov 2015 12:26:14 -0800 (PST), Vlad from Moscow
> <snip>
> >> >> >http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572
> <snip>
> > On Sunday, November 8, 2015 at 2:40:35 PM UTC+3, Ben Bacarisse wrote:
> >> Vlad from Moscow writes:
> <snip>
> >> > Why entirely correct answer is unprecedented so much down-voted?
> >>
> >> It's not "entirely correct" because the question was about comparing
> >> strings, and char key[5] = "april"; is not a string
> <snip>
>
> > The question is not about how to compare strings.
>
> It was called:
>
> "Comparing strings with if else"
>
> You can, I hope, see why some people might think the question was about
> strings?
>
> <snip>
> --
> Ben.

Very often titles of questions do not reflect the contents and the meanings of the questions.

Many programmers incorrectly call any character array like a string.

The question is not the title. The question is its content.

There are given starting conditions and using these conditions I showed how the task can be done.

And my solution does not contradict these conditions.

My answer contains nothing wrong.

If you think that the author of the question should initialize the array in ther way you should address this question to the athor.

If the author indeed need a string then I do not see the meaning of the condition not to use library functions.

I pointed out that he could use either strncmp or memcmp.

If his character array had the terminating zero then in this case I would advice to use for example standard function strcmp.

So the question has more meaning when the character array has no the terminating zero. Otherwise it is too trivial.

But in any case my answer was not down-voted because I suggested something wrong. My question was down-voted because who want to dwon-vote it found an articificial reason to do this.

This reason is not related to my solution.

Do you think that nobody knew there how character arrays are initialized in C?

For example if I see a somebody's wrong statement I try to correct he.

It was an attack against me. As somebody betrayed himself in a comment that was deleted by the moderator it was a war against me.

I am sure that my answer would break the record of the number of down-votes if it was not locked.:)

All is fair in war. Is not it is the main principle of the democracy?:)


Now my locked answer is the symbol of the democracy and Stackoverflow: do you want the democracy?! When you will be banned!:)

My congratulations.:)

Öö Tiib

unread,
Nov 8, 2015, 10:46:55 AM11/8/15
to
On Saturday, 7 November 2015 22:26:46 UTC+2, Vlad from Moscow wrote:
> I encountered that the Stackoverflow is providing an openly discriminatory
> policy now and even does not try to hide this.
>
> My entirely correct answers are purposely down-voted.
>
> Here is a refernce to such a question.
>
> http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572

The question seems to be about how to make "security". The
code posted in question manages to contain several silly defects.
Your answer explains somewhat the issues and provides some code
that at least works.

>
> Sometimes it can be that somebody does not agree with your answer. But
> usually he points the reason of the disagreement in his comment and I
> can provide a reference to the C Standard that to prove my point of view.

Good idea! I suspect you got most of the down-votes thanks to not showing
how standards support you but instead you did build some "low qualified
beginners" lists in your answer and even had edit wars about those.

>
> But the problem is nobody needs my reference. The purpose is to down-vote
> the answer.
>
> I tried to attract attention of moderators but all was in vain.
>
> On the other hand if I down-vote somebody's incorrect answer and even
> write in a comment what is wrong in the answer then instantly a
> complain follows to moderators and I am banned.

The site is seemingly not designed for too deep discussions, fights and
name calling that you did.

Giordano Bruno was burned on stake for opposing some official views 315
years ago. Few down votes and bans for name calling in moderated q/a
site ... do you feel that you were treated as unfairly as Giordano Bruno?

> As I was already said several times at the same Stackoverflow the problem
> is that I am from Russia and this is clear from my nickname Vlad from Moscow.

You seem correct but what we can do? That issue is clearly outside of our
competence.

>
> I asked a question at Meta that to discuss the situation but again I
> was ignored and my question was just removed.
>
> So I am again banned after my correct answer was deliberately down-voted and after I asked a question how to behave in such situations.:)

Forget that stack overflow. Do something else. You are bright guy and can
certainly make some software more correct or easier to use.

Rosario19

unread,
Nov 8, 2015, 1:00:42 PM11/8/15
to
On Sat, 7 Nov 2015 12:26:14 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>I encountered that the Stackoverflow is providing an openly discriminatory policy now and even does not try to hide this.
>
>My entirely correct answers are purposely down-voted.
>
>Here is a refernce to such a question.
>
>http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572


int main( void ){
char key[5]="april",ckey[6];
printf("Enter the key: ");
scanf("%5s",ckey);

size_t i = 0;

while ( i < sizeof( key ) && key[i] == ckey[i] ) ++i;

if( i == sizeof( key ) ){
printf("Correct.");
}
else{
printf("Wrong.");
}
return 0;
}

do you try that code? it seems ok this:

>vlad
Enter the key: aprilMy
Correct.
----------------
but is good sizeof(key) or it is better (sizeof key)
than has not to be written one "\n" as last char for output?

this is my version
#include <stdio.h>

int main(void)
{char key[]="april",ckey[8];
unsigned i;
int r;

printf("Enter the key: "); r=scanf("%7s",ckey);
for(i=0 ; key[i]==ckey[i]&&key[i]!=0 ; ++i)
;

if(key[i]==0&&ckey[i]==0&&r==1)
printf("Correct.\n");
else printf("Wrong. \n");

return 0;
}


Rosario19

unread,
Nov 8, 2015, 1:09:48 PM11/8/15
to
On Sun, 08 Nov 2015 19:00:21 +0100, Rosario19 wrote:
>
>this is my version
>#include <stdio.h>
>
>int main(void)
>{char key[]="april",ckey[8];
> unsigned i;
> int r;
>
> printf("Enter the key: "); r=scanf("%7s",ckey);
> for(i=0 ; key[i]==ckey[i]&&key[i]!=0 ; ++i)
> ;
>
> if(key[i]==0&&ckey[i]==0&&r==1)
> printf("Correct.\n");
> else printf("Wrong. \n");
>
> return 0;
>}
find one error
#include <stdio.h>

int main(void)
{char key[]="april",ckey[8];
unsigned i;
int r;

printf("Enter the key: "); fflush(stdout);

asetof...@gmail.com

unread,
Nov 8, 2015, 1:38:55 PM11/8/15
to
That place wrote:
----------
Oops! Your answer couldn't be submitted because:
*Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.
*An email is required to post.
-------
The code is intended ok
4 spaces for indent are too much

Bo Persson

unread,
Nov 8, 2015, 3:11:19 PM11/8/15
to
It's not 4 spaces indents in the code, it is 4 spaces at the beginning
of each line to have it rendered as code. The spaces will not show.

You can add the 4 spaces, or mark the code and press Ctrl+K, or click
the code formatting icon above the text box.



Bo Persson

Vlad from Moscow

unread,
Nov 8, 2015, 5:24:31 PM11/8/15
to
On Sunday, November 8, 2015 at 9:00:42 PM UTC+3, Rosario19 wrote:
> On Sat, 7 Nov 2015 12:26:14 -0800 (PST), Vlad from Moscow
No I did not try the code.:)

With expressions you may use either sizeof( key ) or sizeof key.

Mr Flibble

unread,
Nov 8, 2015, 8:09:39 PM11/8/15
to
This Usenet newsgroup is concerned with C++ not C mate.

/Flibble

Vlad from Moscow

unread,
Nov 9, 2015, 4:41:53 AM11/9/15
to
Yes, I know. Your remark would be very useful if it was written in the thyread at stackoverflow that is being discussed.:)

The problem is that many C++ programmers think that C is a subset of C++ and as result make wrong conclusion.

Geoff

unread,
Nov 13, 2015, 6:04:27 PM11/13/15
to
On Sun, 8 Nov 2015 06:54:14 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>Very often titles of questions do not reflect the contents and the meanings of the questions.
>
>Many programmers incorrectly call any character array like a string.

And in the case of the posted question, the questioner also has a
problem with how strings are compared, hence his error of writing
if(ckey==key).

Clearly he has the wrong idea about how to compare strings, which is
his INTENT as stated in the title of the topic but his implementation
exposes errors in his comprehension. Your answer didn't correct those
misconceptions but rather created more confusion. Hence the
down-votes.

A correct answer would have been to explain the concept of C strings
being terminated in with null characters, sizing arrays for that
concept and use the standard library functions to perform the string
compares of properly sized, nul-terminated strings.

Vlad from Moscow

unread,
Nov 13, 2015, 7:00:56 PM11/13/15
to
суббота, 14 ноября 2015 г., 2:04:27 UTC+3 пользователь Geoff написал:
> On Sun, 8 Nov 2015 06:54:14 -0800 (PST), Vlad from Moscow
You are totally wrong and it seems you even did not read all preceding posts or you understood nothing.

My answer was absolutely correct.

I am not going to repeat specially for you what I already wrote.

It is a fascist web-site and my answer was down-voted only for reason that I am from Russia.




Geoff

unread,
Nov 13, 2015, 7:06:29 PM11/13/15
to
On Sat, 7 Nov 2015 23:41:59 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>Welcome to the C programming language!:)
>
>Now you will know that such a declaration
>
>char key[5] = "april";
>
>is totally valid in C.:) And moreover is used very othen in C.

You wouldn't be working for me very long if you wrote it this way
without a valid comment noting it, especially after talking about
comparing strings. A C char array initialized in this manner is not a
string.

Geoff

unread,
Nov 13, 2015, 7:24:45 PM11/13/15
to
On Fri, 13 Nov 2015 16:00:32 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>My answer was absolutely correct.

Your answer was not absolutely correct. It fails to say "Wrong." when
the input does not exactly match the key. A serious defect.

Yes, the world hates Russians even now more than British or Americans.
Down-vote all Russians on Stack Overflow! Drive them off the Internet
forever!

Geoff

unread,
Nov 13, 2015, 7:32:06 PM11/13/15
to
Absolutely correct C++:

#include <iostream>
#include <string>

int main(void)
{
std::string key ="april";
std::string ckey;

printf("Enter the key: ");
std::cin >> ckey;

if(key == ckey) {
std::cout << "Correct." << std::endl;
}
else {
std::cout << "Wrong." << std::endl;
}
return 0;
}

Absolutely correct C:

#include <stdio.h>
#include <string.h>

int main(void){
char key[]="april"; // auto size array as string
char ckey[sizeof key + 1]; // make buffer larger than key

printf("Enter the key: ");
fgets(ckey, sizeof ckey, stdin);

if((strlen(key) == strlen(ckey)) && !strcmp(key, ckey)) {

Vlad from Moscow

unread,
Nov 14, 2015, 12:56:47 PM11/14/15
to
On Saturday, November 14, 2015 at 3:24:45 AM UTC+3, Geoff wrote:
> On Fri, 13 Nov 2015 16:00:32 -0800 (PST), Vlad from Moscow
> wrote:
>
> >My answer was absolutely correct.
>
> Your answer was not absolutely correct. It fails to say "Wrong." when
> the input does not exactly match the key. A serious defect.
>
It is interesting to me when does it fail to say "wrong" when the input does not exactly match the key?:)


> Yes, the world hates Russians even now more than British or Americans.
> Down-vote all Russians on Stack Overflow! Drive them off the Internet
> forever!

I do not think that such a silly man as you is the whole world.:)

Vlad from Moscow

unread,
Nov 14, 2015, 1:01:43 PM11/14/15
to
This code does not satisfy the question because in the question variable key is defined the following way

char key[5]="april";

So your code is wrong and does not solve the problem described in the question.

Jorgen Grahn

unread,
Nov 14, 2015, 1:06:00 PM11/14/15
to
On Sat, 2015-11-14, Geoff wrote:
> On Fri, 13 Nov 2015 16:00:32 -0800 (PST), Vlad from Moscow
> <vlad....@mail.ru> wrote:
>
>> [...]
>
> Yes, the world hates Russians even now more than British or Americans.
> Down-vote all Russians on Stack Overflow! Drive them off the Internet
> forever!

To you, Vlad and everyone: please lay off the political/xenophobia
angle. So far, we've not had much of that on comp.lang.c++, and it
would be a sad thing if it was triggered by this thread.

The religion flame wars have been bad enough ...

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Prroffessorr Fir Kenobi

unread,
Nov 15, 2015, 6:23:30 PM11/15/15
to
W dniu sobota, 7 listopada 2015 21:26:46 UTC+1 użytkownik Vlad from Moscow napisał:
> I encountered that the Stackoverflow is providing an openly discriminatory policy now and even does not try to hide this.
>
> My entirely correct answers are purposely down-voted.
>
> Here is a refernce to such a question.
>
> http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572
>
> Sometimes it can be that somebody does not agree with your answer. But usually he points the reason of the disagreement in his comment and I can provide a reference to the C Standard that to prove my point of view.
>
> But the problem is nobody needs my reference. The purpose is to down-vote the answer.
>
> I tried to attract attention of moderators but all was in vain.
>
> On the other hand if I down-vote somebody's incorrect answer and even write in a comment what is wrong in the answer then instantly a complain follows to moderators and I am banned.
>
> As I was already said several times at the same Stackoverflow the problem is that I am from Russia and this is clear from my nickname Vlad from Moscow.
>
> I asked a question at Meta that to discuss the situation but again I was ignored and my question was just removed.
>
> So I am again banned after my correct answer was deliberately down-voted and after I asked a question how to behave in such situations.:)

SO is heavy shit last years.. This is place full of lamas they are usually not able to understand the question and so on.. they find some kind of 'dorkism' as a norm there i noticed that like five times than gave up - let them die in peace

Geoff

unread,
Nov 15, 2015, 7:14:15 PM11/15/15
to
On the contrary, I answered the question posed in the title: How to
compare strings.

My solutions addressed his misunderstanding of how C strings are
initialized and how to compare strings for exact match.

The char key[5] = "april" is a frequent novice mistake when
initializing C strings and the question is clearly from a novice who
is intending to use strings as arrays rather than character arrays. So
he forgets the extra null character in the key, then he gets a C
string from scanf and tries to compare it to the key invalid C string
in key using ==, probably because he comes to C from another language
that knows what to do with == when comparing strings, such as C++, for
instance, and is surprised when his program doesn't behave as he
expected when handling what he thinks are strings.

Incidentally, you missed an opportunity to criticize my C solution
since it uses fgets and fails to take into account the '\n' returned
in the string. This was a carry-over from some experimentation I was
doing and was posted by mistake.

Correct C solution:

#include <stdio.h>
#include <string.h>

int main(void){
char key[] = "april"; // auto size array as string
char ckey[10];

printf("Enter the key: ");
scanf("%9s", ckey);

// strings must match exactly.
if(strlen(key) == strlen(ckey) && !strcmp(key, ckey)) {

Geoff

unread,
Nov 15, 2015, 7:17:52 PM11/15/15
to
On Sat, 14 Nov 2015 09:56:21 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>On Saturday, November 14, 2015 at 3:24:45 AM UTC+3, Geoff wrote:
>> On Fri, 13 Nov 2015 16:00:32 -0800 (PST), Vlad from Moscow
>> wrote:
>>
>> >My answer was absolutely correct.
>>
>> Your answer was not absolutely correct. It fails to say "Wrong." when
>> the input does not exactly match the key. A serious defect.
>>
>It is interesting to me when does it fail to say "wrong" when the input does not exactly match the key?:)
>
>

Your solution fails to say "Wrong" and says "Correct" when the input
matches the first five characters but doesn't exactly match. Input
such as aprila, aprilaaaaaaaaaa, all produce "Correct when in fact
this would be erroneous since the arrays don't exactly match.

Vlad from Moscow

unread,
Nov 16, 2015, 3:25:59 AM11/16/15
to
On Monday, November 16, 2015 at 3:17:52 AM UTC+3, Geoff wrote:
> On Sat, 14 Nov 2015 09:56:21 -0800 (PST), Vlad from Moscow
I am sorry but you are very low qualified programmer. You are even unable to understand what is written in questions and what you can do is only read titles of questions.:)

Usually bubbies also are able to read only titles.:)

I'll help you. You can enter neither "aprila" nor "aprilaaaaaaaaaa" because the character array used to store the entered string has only 6 characters.:)

Such a task occurs very often when for example you read some data from a file or other source and the record contains an identification field. And you need to check that identification field. So usually programs contain valid identification strings that have the required size and compare them with this identification field. Or they need to compare a part of a string with the identification field that for example to be sure that the string starts with the identification's characters.

So your answer has nothing common with the code presented in the question.

I advice you to think about that titles does not reflect entirely a problem. There is no enough space in the title that to describe a problem. So titles are very often have too common meaning. For example a title can sound like "How to delete an element in a vector".:)
How are you going to answer a question with such a title? What is the vector? Is it standard container std::vector? Or is it just an array? Neither the first nor the second! It is a user-defined single-linked list that was called vector in some question.:)

It is the content of the question it is the code presented in the question that has to be taken into account.

And moreover in fact the title of this question does not contradict to the code example shown in the question. Indeed he need to compare a string with another in fact string that does not have the terminating zero.

It can be considered as a task to compare of a substring with a given number of characters with other string that has no more than the given number of characters plus one character for the terminating zero.

So you are able to understand neither the question nor the correct code I showed in my answer.

Programming is not your speciality.:)

SG

unread,
Nov 16, 2015, 7:10:25 AM11/16/15
to
On Monday, November 16, 2015 at 9:25:59 AM UTC+1, Vlad from Moscow wrote:
> On Monday, November 16, 2015 at 3:17:52 AM UTC+3, Geoff wrote:
> >
> > Your solution fails to say "Wrong" and says "Correct" when the input
> > matches the first five characters but doesn't exactly match. Input
> > such as aprila, aprilaaaaaaaaaa, all produce "Correct when in fact
> > this would be erroneous since the arrays don't exactly match.
>
> I am sorry but you are very low qualified programmer. You are even
> unable to understand what is written in questions and what you can
> do is only read titles of questions.:)
>
> Usually bubbies also are able to read only titles.:)
>
> I'll help you. You can enter neither "aprila" nor "aprilaaaaaaaaaa"
> because the character array used to store the entered string has
> only 6 characters.:)

Of course, a user can enter "aprila" or even "aprilaaaaaaaaaa". You
just ignore anything beyond 5 characters by using a short array and
"%5s" as scanf string. And that's the issue because it makes your
program accept "aprila" and "aprilaaaaaaaaaa" as correct key
regardless of whether you store the user input in full or just up to
the first five characters in the array named key.

While

char ckey[5] = "april";

is valid in C, I don't think it's good practice. You did not address
the danger of this approach and the intricacies of C string handling
w.r.t. null terminators.

> [...]
> Programming is not your speciality.:)
> [...]

One major factor in why your answer got downvoted and you got blocked
is this kind of attitude of yours, probably. You chose to engage in
an edit war about whether or not it's OK to insult other SO members as
part of your answer.

Vlad from Moscow

unread,
Nov 16, 2015, 7:42:44 AM11/16/15
to
It is very interesting can you say what are there in the array of 6 characters that contains a string beyond the five characters?:)

As for practise then i will repeat for such unexperienced weak programmers as you that it occurs very othen when you deal with records read from fro example a file or network. Usually some raw data contains identification fields.

Consider for example a record that contains a field either with "XML " or "HTML" (onlky four characters neither zero character). And you need to identify the record. In this case you can declare a character array of 5 characters initialized it with either "XML",'\0' or "HTML",'\0' and check the identification field as I shwoed in the answer.

One more for such unquakified programmers as you. This is valid correct code.

You could suggest to redesign the application (though I doubt because the record structure might exist apriori). But in any case it does not mean that my answer is incorrect.

My answer was down-voted for two reasons.

The first one is that in the West there are very many low-qualified programmers that even do not know that such an initialization for character arrays in C is valid. It is seen very well from the comment to my answer. There were other similar comments but they were deleted by the moderator.

And the second reason is the fascism that thrives in the West including the Stackoverflow.

It is so obvious that what you are doing is trying to find a reason to accuse me and to invent something that to say that my entirely correct answer is wrong.:)

Christian Gollwitzer

unread,
Nov 16, 2015, 8:10:43 AM11/16/15
to
Am 16.11.15 um 09:25 schrieb Vlad from Moscow:
>
> I am sorry but you are very low qualified programmer. You are even unable to understand what is written in questions and what you can do is only read titles of questions.:)
>
> Usually bubbies also are able to read only titles.:)

... and this is why you got banned from the "fascist" web site.


Christian

Alf P. Steinbach

unread,
Nov 16, 2015, 8:12:30 AM11/16/15
to
On 11/16/2015 1:42 PM, Vlad from Moscow wrote:
> On Monday, November 16, 2015 at 3:10:25 PM UTC+3, SG wrote:
>>
>> One major factor in why your answer got downvoted and you got blocked
>> is this kind of attitude of yours, probably. You chose to engage in
>> an edit war about whether or not it's OK to insult other SO members as
>> part of your answer.
>
> As for practise then i will repeat for such unexperienced weak programmers as you

Google is your friend Vlad, even if you think we're not. Judging from
his postings in clc++, Sebastian has quite extensive experience, and is
not at all a weak programmer. Googling him & his research bears that out.

I think the problem is that you're trying to argue that you were
technically right, believing that nobody here UNDERSTAND your answer
(just because one or two didn't), when in fact the technical has been
cleared up long ago and people such as Sebastian are trying in a very
friendly non-adversary way to help you understand what you did wrong.

So, what you did wrong:

• You focused on a single, minor technical aspect; one that considering
the OP's level of expertise was unlikely to be relevant.

• You engaged in a flame war.

• You did not properly adjust to changing circumstances, such as
recognizing that the people you talk to here, as opposed to on SO,
UNDERSTAND the technical point about C versus C++ rules etc.

So that's what to improve: (1) try much harder to adjust to continually
changing circumstances, (2) opt out of flame wars that you are not
intentionally trying to prolong, e.g. enlist the help of moderators in
such cases, and (3) look beyond your first impression and first obvious
issue, take a wider view where you consider the relevance of each thing.

Cheers & hth.,

- Alf

asetof...@gmail.com

unread,
Nov 16, 2015, 10:08:43 AM11/16/15
to
The OP in initial post said:
"Is it possible to solve the problem without using other libraries?"
The answer is yes
So answer that use strcmp or
fgets or other different from
scand()
has to be not full voted...

woodb...@gmail.com

unread,
Nov 16, 2015, 12:23:03 PM11/16/15
to
On Monday, November 16, 2015 at 7:12:30 AM UTC-6, Alf P. Steinbach wrote:
> On 11/16/2015 1:42 PM, Vlad from Moscow wrote:
> > On Monday, November 16, 2015 at 3:10:25 PM UTC+3, SG wrote:
> >>
> >> One major factor in why your answer got downvoted and you got blocked
> >> is this kind of attitude of yours, probably. You chose to engage in
> >> an edit war about whether or not it's OK to insult other SO members as
> >> part of your answer.
> >
> > As for practise then i will repeat for such unexperienced weak programmers as you
>
> Google is your friend Vlad

https://duckduckgo.com is friendlier as far as search
engines go. They don't track your searches like Google
and others do. They are doing better at saying, "What's
mine is yours and what's yours is yours."

Brian
Ebenezer Enterprises - How to tell the 20-trillion-dollar
man that he wouldn't be missed if he resigned?

http://webEbenezer.net

SG

unread,
Nov 16, 2015, 2:55:06 PM11/16/15
to
Am Montag, 16. November 2015 13:42:44 UTC+1 schrieb Vlad from Moscow:
> It is very interesting can you say what are there in the array of 6
> characters that contains a string beyond the five characters?:)

I don't understand this question. If you care about me answering it
please try to approximate the English language a little better.

> As for practise then i will repeat for such unexperienced weak
> programmers as you that it occurs very othen when you deal with
> records read from fro example a file or network. Usually some raw
> data contains identification fields.
>
> Consider for example a record that contains a field either with "XML "
> or "HTML" (onlky four characters neither zero character). And you need
> to identify the record. In this case you can declare a character array
> of 5 characters initialized it with either "XML",'\0' or "HTML",'\0'
> and check the identification field as I shwoed in the answer.

It appears as if you did not understand what Geoff and I were talking
about. I'll give you the benefit of the doubt and blame it on the
language barrier.

> One more for such unquakified programmers as you.
> This is valid correct code.

You mean "valid" as in "does not invoke undefined behaviour"? If so:
Yes, sure. It's a perfectly valid program. The question is: Does it
solve the intended problem?

$ gcc vlad.c
$ echo aprilaaaa | ./a.out
Enter the key: Correct.

I don't think so.

> [...]
> And the second reason is the fascism that thrives in the West
> including the Stackoverflow.
>
> It is so obvious that what you are doing is trying to find a reason
> to accuse me and to invent something that to say that my entirely
> correct answer is wrong.:)

My main messages to you were:
(1) The program doesn't solve the problem.
(2) You've been acting like a dick judging by the edit history.

Though, I can see how some of the downvotes were due to people
thinking your program invokes undefined behaviour because they weren't
familiar with that particular aspect of the C language.

Vlad from Moscow

unread,
Nov 16, 2015, 6:26:24 PM11/16/15
to
Show your program that returns correct.

SG

unread,
Nov 17, 2015, 3:12:03 AM11/17/15
to
Am Dienstag, 17. November 2015 00:26:24 UTC+1 schrieb Vlad from Moscow:
> On Monday, November 16, 2015 at 10:55:06 PM UTC+3, SG wrote:
> > You mean "valid" as in "does not invoke undefined behaviour"? If so:
> > Yes, sure. It's a perfectly valid program. The question is: Does it
> > solve the intended problem?
> >
> > $ gcc vlad.c
> > $ echo aprilaaaa | ./a.out
> > Enter the key: Correct.
> >
> > I don't think so.
> >
>
> Show your program that returns correct.

Wow.

It's not my program. I just copied the source code from YOUR
Stackoverflow answer and saved it under vlad.c. YOU wrote it.

The next time you feel like calling people "unqualified" keep in
mind that YOU are NOT infallible either.

Vlad from Moscow

unread,
Nov 17, 2015, 4:16:41 AM11/17/15
to
I do not see what code you run.

And in any case it does not have any relation to my answer.

Are you a prestidigitator?:)

Ian Collins

unread,
Nov 17, 2015, 4:23:44 AM11/17/15
to
What part of "I just copied the source code from YOUR Stackoverflow
answer" are you having trouble comprehending?

--
Ian Collins

Vlad from Moscow

unread,
Nov 17, 2015, 5:15:22 AM11/17/15
to
Are you an assistant of the Stackoverflow? Or are you both swindlers?:)

Wouter van Ooijen

unread,
Nov 17, 2015, 6:06:41 AM11/17/15
to
Op 17-Nov-15 om 11:15 AM schreef Vlad from Moscow:
There is no '*the* Stackoverflow'. We are all individuals, with
individual opinions. The fact that (nearly?) all of us don't agree with
you should give you some hint. And no, it is not that there is a
world-wide conspiracy against you.

Why didn't you respond to "What part of "I just copied the source code
from YOUR Stackoverflow answer" are you having trouble comprehending?"

Wouter

Vlad from Moscow

unread,
Nov 17, 2015, 6:20:16 AM11/17/15
to
I askedvery clear show the code that was run. What is not clear for you? Or are you another swindler? Can you show the code that as you are saying was run? Or instead of bla...bla...bla.. do you have nothing in your sleeve?

Wouter van Ooijen

unread,
Nov 17, 2015, 7:28:09 AM11/17/15
to
Op 17-Nov-15 om 12:19 PM schreef Vlad from Moscow:
It is the code in your posting, so you have shown it yourself.

> Or are you another swindler?

That seems to be your term for everyone who disagrees with you, so I
guess by your definition I am.

Wouter

Vlad from Moscow

unread,
Nov 17, 2015, 7:36:48 AM11/17/15
to
It is a common used name of all swindlers that refer to a magic code but do not show it.:)

So there is nothing to discuss with swindlers.

SG

unread,
Nov 17, 2015, 8:05:45 AM11/17/15
to
What prevents you from seeing it? Didn't you understand what I've
said? It's your code. You wrote it. You posted it as part of your
stackoverflow answer and you linked to it from your original post of
this usenet thread. To be specific for future reference: It's the
latest Nov 7, 2015 revision of your SO.com answer.

Please try a little harder reading and comprehending what people
write. Also, please avoid jumping to conclusions like conspiracies
against you or everybody being unqualified except you. Don't ignore
the possibility that you messed up.

> And in any case it does not have any relation to my answer.

I assure you it does. It has the *greatest* possible relation to
your answer because it was part of your answer.

Dude, you're embarrassing yourself big time. And every time I thought
it could not get worse, you proved me wrong.

Vlad from Moscow

unread,
Nov 17, 2015, 8:47:20 AM11/17/15
to
Once again there are only bla...bla..bla..

So you can not show the code you run can you?:)

My code does not compare string "aprilaaaa". It simply unable to except such a string because its character array declared as having 6 characters.:)

So you are indeed a swindler.

You substituted the actual meaning of the code with totally wrong conclusions.

It was expected when it is clear that such low-qualified programmers and men withot honor have nothing to say.

Good luck, swindler.:)

Martin Shobe

unread,
Nov 17, 2015, 9:08:57 AM11/17/15
to
Since you appear incapable of finding your own code, here it is.

#include <stdio.h>

int main( void ){
char key[5]="april",ckey[6];
printf("Enter the key: ");
scanf("%5s",ckey);

size_t i = 0;

while ( i < sizeof( key ) && key[i] == ckey[i] ) ++i;

if( i == sizeof( key ) ){
printf("Correct.");
}
else{
printf("Wrong.");
}
return 0;
}

> My code does not compare string "aprilaaaa". It simply unable to except such a string because its character array declared as having 6 characters.:)

It accepts "aprilaaaa". It leaves the "aaaa" part in the input stream,
but it still returns "Correct." when the input is "aprilaaaa".

Martin Shobe

Vlad from Moscow

unread,
Nov 17, 2015, 9:31:41 AM11/17/15
to
вторник, 17 ноября 2015 г., 17:08:57 UTC+3 пользователь Martin Shobe написал:
And what is the problem?! Are you trying to sunstitute the task of the program with your own invented task?

The program compares a string of 6 characters with the given character array. And the program is doing it corredctly.

Moreover the input stream can contain megabytes of data. It can be even a stream connected to a file.

But it is not the task of this program to check all the data are equal to given five characters.:)

The task of the program that a string that was read in the character array is equal to another character array.

That is all.

And the intention of the author of the question is clear enough. He is going to check strings that are not greater than 5 characters and which he reads in a character array of 6 characters.

This restriction that input string are not greater than 5 characters is given initially.

And I already pointed out in this thread that such a task occurs very othen for example when you need to determine the value of an identification field of an record.

So the answer is absolutely correct.

The p;roblem is only that

1) There are very many programmers in the West who do not know that it is a valid character array initialization in C.

2) There are many low-quakified programmers in the West that are unable to understand a task and try to substitute one task for another.

3) The fascism thrives in the West. It is so evident that any words are redundant.

You could for example suggest to redesign program in your own answer. But 1) it would not be the exact answer to the question and 2) it does not mean that my answer is incorrect.

Wouter van Ooijen

unread,
Nov 17, 2015, 9:32:08 AM11/17/15
to
Op 17-Nov-15 om 3:08 PM schreef Martin Shobe:
@Vlad just in case you don't trust Martin or want to claim that it is a
fascist Linux conspiracy: I got exactly the same result as Martin, on
windows, using the code freshly copied from your very own posting.

Wouter

Vlad from Moscow

unread,
Nov 17, 2015, 9:47:29 AM11/17/15
to
See my preceding answer.

Your interpretation of the output has nothing common with the task of the program.

The program correctly reports that the data it read are equal to the given array.

It would be a bug if the program reports that data
"april" read from stream buffer aprilaaaa is not equal to "april".

So the output just confirms that the program works correctly.

You may write your own program that will perform another task. For example it could check that a whole file contains only one word "april". But it will be another program and another task.

Chris Vine

unread,
Nov 17, 2015, 10:03:59 AM11/17/15
to
On Tue, 17 Nov 2015 04:36:20 -0800 (PST)
Vlad from Moscow <vlad....@mail.ru> wrote:
> It is a common used name of all swindlers that refer to a magic code
> but do not show it.:)
>
> So there is nothing to discuss with swindlers.

Fair enough, but then you have to understand that the reason you have
been (so far only temporarily) banned from stackoverflow is not because
it is "fascist", which is a ridiculous description of a website anyway,
nor because you are Russian, but because you are a complete and utter
dick with personality and anger-management issues.

Chris

SG

unread,
Nov 17, 2015, 10:12:51 AM11/17/15
to
On Tuesday, November 17, 2015 at 3:31:41 PM UTC+1, Vlad from Moscow wrote:
> вторник, 17 ноября 2015 г., 17:08:57 UTC+3 пользователь Martin Shobe написал:
> >
> > Since you appear incapable of finding your own code, here it is.
> >
> > #include <stdio.h>
> >
> > int main( void ){
> > char key[5]="april",ckey[6];
> > printf("Enter the key: ");
> > scanf("%5s",ckey);
> >
> > size_t i = 0;
> >
> > while ( i < sizeof( key ) && key[i] == ckey[i] ) ++i;
> >
> > if( i == sizeof( key ) ){
> > printf("Correct.");
> > }
> > else{
> > printf("Wrong.");
> > }
> > return 0;
> > }
> >
> > > My code does not compare string "aprilaaaa". It simply unable to except such a string because its character array declared as having 6 characters.:)
> >
> > It accepts "aprilaaaa". It leaves the "aaaa" part in the input stream,
> > but it still returns "Correct." when the input is "aprilaaaa".
> >
> > Martin Shobe
>
>
> And what is the problem?! Are you trying to sunstitute the task of
> the program with your own invented task?

Ok, if you knew all along what we were talking about why did you play
this game of asking me to show the code and then ignoring my answers
several times as if it could not possibly be your version?

This reaction of yours seems intellectually dishonest. And that's the
kind of reaction I would expect from someone with an inflated ego who
does not like admit that he was wrong.

To be honest, I would prefer a stackoverflow community WITHOUT people
such as you. This has nothing to do with you being Russian. It has
everything to do with you being an intellectually dishonest jerk.

Bye.

Vlad from Moscow

unread,
Nov 17, 2015, 10:37:55 AM11/17/15
to
Because you are even unable to understand what you are running and what you are seeing.


> This reaction of yours seems intellectually dishonest. And that's the
> kind of reaction I would expect from someone with an inflated ego who
> does not like admit that he was wrong.
>
> To be honest, I would prefer a stackoverflow community WITHOUT people
> such as you. This has nothing to do with you being Russian. It has
> everything to do with you being an intellectually dishonest jerk.
>
> Bye.


Bravo! A good conclusion!

After my absolutely correct answer and my succeding question at SO what to do in such situations when a correct answer is purposely down-voted I am suggested to leave SO because I am "intellectually dishonest jerk".:)

You are very clever cookie!:)

I only wonder why did you need all this circus performance?

You could say in the very beginning that SO is not a place for Russians.:)

At least it would be more honestly.:)

SO is a place for fascists!

Wouter van Ooijen

unread,
Nov 17, 2015, 10:53:40 AM11/17/15
to
Op 17-Nov-15 om 4:37 PM schreef Vlad from Moscow:
That being your analysis of the sitution, I don't get why would you want
to be on it?? Do you want to support a facist website?

Wouter

Vlad from Moscow

unread,
Nov 17, 2015, 11:06:54 AM11/17/15
to
I am not supporting a fascist site. Otherwise I would not create this thread.

I am supporting programmers all over the world.

Geoff

unread,
Nov 17, 2015, 12:30:30 PM11/17/15
to
On Tue, 17 Nov 2015 05:46:53 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>
>My code does not compare string "aprilaaaa".
>It simply unable to except such a string because
>its character array declared as having 6 characters.:)

This is precisely why your code is flawed. It compares a 5 character
array with the first 5 characters of the input string. Since the
implied intent of the code is a password check, your failure to
recognize the extra characters as invalid input makes the code
insecure.

This is kind of error, along with the unacceptable initialization of
the "april" string makes your answer incorrect and is the error of a
novice programmer who doesn't understand C strings and how to
initialize them. This error in your code is what got you the first
down votes. Your arrogant response is what got your account suspended.

Geoff

unread,
Nov 17, 2015, 12:42:33 PM11/17/15
to
On Tue, 17 Nov 2015 06:30:58 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>The program compares a string of 6 characters with the given character array. And the program is doing it corredctly.
>
>Moreover the input stream can contain megabytes of data. It can be even a stream connected to a file.

It is absolutely impossible for the code of the OP and your own code
to be connected to a stream of any kind. Why? int main( void )
You accept no arguments in your own code. Therefore the code, as you
yourself wrote it, cannot be coupled to a stream.

The original question was "I have a _program_ that has a key to open".
It doesn't say file, it doesn't say stream.

Your answer is a failure.

Q.E.D.

The original code as posted by the original questioner:

I want to make a program that has a key to open. But when i comparing
the key and the input, it always says "Wrong":

#include <stdio.h>

int main(){
char key[5]="april",ckey[5];
printf("Enter the key: ");
scanf("%s",ckey);
if(ckey==key){
printf("Correct.");
}
else{
printf("Wrong.");
}
return 0;
}


Your code as it currently exists in answer to the question:

Vlad from Moscow

unread,
Nov 17, 2015, 12:57:26 PM11/17/15
to
On Tuesday, November 17, 2015 at 8:42:33 PM UTC+3, Geoff wrote:
> On Tue, 17 Nov 2015 06:30:58 -0800 (PST), Vlad from Moscow
Don't disgrace yourself even more. We all already know that you are a beginner that knows neither C nor C++.:)

Vlad from Moscow

unread,
Nov 17, 2015, 1:01:47 PM11/17/15
to
On Tuesday, November 17, 2015 at 8:30:30 PM UTC+3, Geoff wrote:
> On Tue, 17 Nov 2015 05:46:53 -0800 (PST), Vlad from Moscow
Could you explain how a character array containing a string at most of length equal to 5 can have extra characters?:)

Geoff

unread,
Nov 17, 2015, 1:05:50 PM11/17/15
to
On Tue, 17 Nov 2015 09:57:08 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

[nothing responsive on the issues]

Ah, now you are merely a troll.

Geoff

unread,
Nov 17, 2015, 1:16:58 PM11/17/15
to
The intent of the program is a string match, not a string containing a
match. The program is intended to return "Correct" when the user types
in a string exactly matching "april", not a string containing april.

Your solution fails to meet the specified criteria.

I say again, the confusion of the OP about proper initialization of
the key array has made you commit a novice error of thinking that when
the OP wrote char key[5] = "april" he knew what he was doing. I assert
that he's a complete novice and the initialization should have been
char key[] = "april", erasing any doubt about whether key is a C
string or not.

If the OP wasn't a novice he wouldn't have used the term "strings" in
his title and if he had intended the array be strictly an array of
characters he would have chosen to write

char key[5] = {'a', 'p', 'r', 'i', 'l'}

and removed all doubt.

His code was erroneous for implementation of his stated intent.
Your answer was erroneous because you assumed the code was more
correct than the stated intent.

Geoff

unread,
Nov 17, 2015, 1:24:04 PM11/17/15
to
On Tue, 17 Nov 2015 10:16:45 -0800, Geoff <ge...@invalid.invalid>
It is precisely these kinds of errors:

char key[5] = "april";

that leads to this triggering an error in C++.

Vlad from Moscow

unread,
Nov 17, 2015, 1:42:06 PM11/17/15
to
On Tuesday, November 17, 2015 at 9:24:04 PM UTC+3, Geoff wrote:
> On Tue, 17 Nov 2015 10:16:45 -0800, Geoff <ge...@invalid.invalid>
> wrote:
>
> >On Tue, 17 Nov 2015 10:01:37 -0800 (PST), Vlad from Moscow
And what?! Are you an adequate person?

From the very beginning here was said that it is a C code.

And moreover in my answer at SO there is explicitly written that such an initialization is valid in C and not valid in C++.

Ian Collins

unread,
Nov 17, 2015, 2:24:26 PM11/17/15
to
Vlad from Moscow wrote:
>
> From the very beginning here was said that it is a C code.

So why did you post hare and not to a C group?

Oh wait, the ++ didn't fit in your buffer....

--
Ian Collins

Ian Collins

unread,
Nov 17, 2015, 2:25:03 PM11/17/15
to
Vlad from Moscow wrote:
> On Tuesday, November 17, 2015 at 12:23:44 PM UTC+3, Ian Collins wrote:
>> Vlad from Moscow wrote:
>>> On Tuesday, November 17, 2015 at 11:12:03 AM UTC+3, SG wrote:
>>>> Am Dienstag, 17. November 2015 00:26:24 UTC+1 schrieb Vlad from Moscow:
>>>>> On Monday, November 16, 2015 at 10:55:06 PM UTC+3, SG wrote:
>>>>>> You mean "valid" as in "does not invoke undefined behaviour"? If so:
>>>>>> Yes, sure. It's a perfectly valid program. The question is: Does it
>>>>>> solve the intended problem?
>>>>>>
>>>>>> $ gcc vlad.c
>>>>>> $ echo aprilaaaa | ./a.out
>>>>>> Enter the key: Correct.
>>>>>>
>>>>>> I don't think so.
>>>>>>
>>>>>
>>>>> Show your program that returns correct.
>>>>
>>>> Wow.
>>>>
>>>> It's not my program. I just copied the source code from YOUR
>>>> Stackoverflow answer and saved it under vlad.c. YOU wrote it.
>>>>
>>>> The next time you feel like calling people "unqualified" keep in
>>>> mind that YOU are NOT infallible either.
>>>
>>> I do not see what code you run.
>>
>> What part of "I just copied the source code from YOUR Stackoverflow
>> answer" are you having trouble comprehending?
>
> Are you an assistant of the Stackoverflow? Or are you both swindlers?:)

Who knows, but it's pretty clear that you are an arse.

Plonk.

--
Ian Collins

Geoff

unread,
Nov 17, 2015, 2:38:42 PM11/17/15
to
On Tue, 17 Nov 2015 10:41:40 -0800 (PST), Vlad from Moscow
<vlad....@mail.ru> wrote:

>
>From the very beginning here was said that it is a C code.
>

Then why are you complaining about your problems with the SO site in a
C++ newsgroup?

>And moreover in my answer at SO there is explicitly
>written that such an initialization is valid in C and
>not valid in C++.

While it is syntactically correct C, it is very poor C in practice and
anyone teaching or writing such poor C should be shown how to do it
correctly and one should not validate such code as you have done. This
is why it's an error in C++ and why I showed how to do it correctly in
C++ and C.

I showed you:
1. A correct C program handling strings as specified.
2. An exact match return, not just a containing string match.
3. Proper use of the strcmp library function instead of the
erroneous if(key == ckey) which the OP presented as his
problematic code.
4. A correct C++ program that correctly uses class string and proper
console input technique.
5. A C++ program that uses == on class string objects for comparison
of strings.
6. Both C and C++ programs return "Correct" on exact match of the
strings and "Wrong" when the match is not exact.
7. Programs given were used to handle strings as defined in the
question and not to perpetuate erroneous concepts expressed in
problematic code by someone who is clearly a novice and having
difficulty with the concepts of strings in C and how to
manipulate them.

Vlad from Moscow

unread,
Nov 17, 2015, 3:13:40 PM11/17/15
to
You showed only one thing that you are a low-qualified programmer that is slow of understanding and nothing more.:)

Bye.

Geoff

unread,
Nov 17, 2015, 3:33:42 PM11/17/15
to
You have shown that you are a troll and your ban on SO was
well-deserved and needs to be permanent.

Goodbye.

Vir Campestris

unread,
Nov 17, 2015, 4:38:52 PM11/17/15
to
On 17/11/2015 15:03, Chris Vine wrote:
> Fair enough, but then you have to understand that the reason you have
> been (so far only temporarily) banned from stackoverflow is not because
> it is "fascist", which is a ridiculous description of a website anyway,
> nor because you are Russian, but because you are a complete and utter
> dick with personality and anger-management issues.

I don't think I'd have put it _quite_ like that - but that's close enough.

Andy

Jorgen Grahn

unread,
Nov 21, 2015, 9:56:31 AM11/21/15
to
On Mon, 2015-11-16, Christian Gollwitzer wrote:
> Am 16.11.15 um 09:25 schrieb Vlad from Moscow:
>>
>> I am sorry but you are very low qualified programmer. You are even
>> unable to understand what is written in questions and what you can
>> do is only read titles of questions.:)
>>
>> Usually bubbies also are able to read only titles.:)
>
> ... and this is why you got banned from the "fascist" web site.

Yeah. Here on USENET we think for a while, see where things are
going, and then use our killfiles. Mine just got one new entry.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Vlad from Moscow

unread,
Apr 6, 2016, 6:57:48 PM4/6/16
to
On Saturday, November 7, 2015 at 11:26:46 PM UTC+3, Vlad from Moscow wrote:
> I encountered that the Stackoverflow is providing an openly discriminatory policy now and even does not try to hide this.
>
> My entirely correct answers are purposely down-voted.
>
> Here is a refernce to such a question.
>
> http://stackoverflow.com/questions/33583478/comparing-strings-with-if-else/33583572#33583572
>
> Sometimes it can be that somebody does not agree with your answer. But usually he points the reason of the disagreement in his comment and I can provide a reference to the C Standard that to prove my point of view.
>
> But the problem is nobody needs my reference. The purpose is to down-vote the answer.
>
> I tried to attract attention of moderators but all was in vain.
>
> On the other hand if I down-vote somebody's incorrect answer and even write in a comment what is wrong in the answer then instantly a complain follows to moderators and I am banned.
>
> As I was already said several times at the same Stackoverflow the problem is that I am from Russia and this is clear from my nickname Vlad from Moscow.
>
> I asked a question at Meta that to discuss the situation but again I was ignored and my question was just removed.
>
> So I am again banned after my correct answer was deliberately down-voted and after I asked a question how to behave in such situations.:)

The fascist policy of the Stanckoverflow continues.:)

Now I am banned after my correct answer to this question

http://stackoverflow.com/questions/36435991/3-recursion-problems-beginner-c/36436517#36436517

It is evident that at first my correct answer was down-voted without any comments that would explain what is wrong in the presented code.:)

After I made a note that you should not take into account the down-votings because the answer is correct and the down-votings only confuse other readers of the question and the answer I was banned.:)

SO searches for any reason to ban me.:)

Richard

unread,
Apr 6, 2016, 6:59:58 PM4/6/16
to
[Please do not mail me a copy of your followup]

Vlad from Moscow <vlad....@mail.ru> spake the secret code
<57396b09-b5a1-42de...@googlegroups.com> thusly:

>The fascist policy of the Stanckoverflow continues.:)

Whaaaaaaaaaaaa.

I don't mind someone using the term "fascist" when something is
actually fascist. However, to use it as a generic pejorative for
"anything I don't like" makes you look like an idiot and a crybaby.

If you have a rant against stack overflow, go find an appropriate
newsgroup for it.

This is not the right newsgroup for your stack overflow complaints.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Mr Flibble

unread,
Apr 6, 2016, 7:02:32 PM4/6/16
to
Your answer was probably down voted because you are doing someone's
homework for them. Doing people's homework for them is not good because
that person doesn't learn anything and it is also basically cheating.

/Flibble


Vlad from Moscow

unread,
Apr 6, 2016, 7:15:23 PM4/6/16
to
On Thursday, April 7, 2016 at 1:59:58 AM UTC+3, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Vlad from Moscow spake the secret code
I am banned only because I am from Russia. Some participants of the SO already wrote that they see the only reason that I am banned is that I am from Russia.

When I ask moderators they just ignore me. But if someone complains I am banned at once. For example my correct answers are down-voted in revenge as the answer I referenced here. But if I down-voted somebody answer I am also banned at once even if I described in a comment to the answer why I down-voted the answer.:)

Vlad from Moscow

unread,
Apr 6, 2016, 7:28:38 PM4/6/16
to
If you personally do not like some question for example because you think it is some homework then you can vote to close the question or even down vote it.

But you may not dictate me what must I do. For me the assignment is interesting and I do what isinteresting to me without asking a permisiion.

You may down-vote my answer if it is incoorect if it gives an invalid solution and so on.

But you may not down-vote correct answers in revenge if you personally do not like that I aswered the question.

The result is that I who gave a correct answer was down-voted after my correct answer was down voted in revenge.:)

Vlad from Moscow

unread,
Apr 6, 2016, 7:44:16 PM4/6/16
to
On Thursday, April 7, 2016 at 2:02:32 AM UTC+3, Mr Flibble wrote:
Take into account that when a correct answer is down-voted this confuses readers of the question. It is not just an answer. It is a solution of a task. Users usually seach internet for solutions. And if they find this thread and see that the answer is down-voted then they can think that the answer is incorrect. It is very actual for beginners.

The answers are a knowledge base.

Alf P. Steinbach

unread,
Apr 6, 2016, 7:48:41 PM4/6/16
to
On 07.04.2016 00:57, Vlad from Moscow wrote:
>
> The fascist policy of the Stanckoverflow continues.:)

Calling names is ungood.

Let out some choice swear words and phrases, get the steam out, yes --
but only to yourself!


> Now I am banned after my correct answer to this question
>
> http://stackoverflow.com/questions/36435991/3-recursion-problems-beginner-c/36436517#36436517

Stating that

<<P.S. Do not take into account the down-votings. They are down-votings
of low-qualified programnmers that are present here only to down-vote
answers of others.:) Usually they have a low reputation.:) The code
presented in the answer is correct. The answer is down-voted in revenge.>>

is just more name calling.

On the other hand I have only once, a single time, had success with
asking for an explanation of downvotes. Still I do that, asking, as a
matter of principle. Because I believe in communication, and I want the
people who think that one can vote about truth or facts or logic, to
engage in communication, to learn about them (who are they?) and
possibly to influence them -- I want that so bad that I persist.

Now, in my experience two kinds of postings mainly gather downvotes on SO:

* Something that is obviously incorrect.

* Something that's posted by someone currently at odds with a group of
others.

The first seems to not be the case here, although I haven't looked
closely at your code. Therefore I gather the second happened, which I
think could be natural given (what I perceive to be) your tendency to
call names. The theory that doing someone's homework attracts downvotes,
well, IME it's not that way, but it's not unthinkable.


> It is evident that at first my correct answer was down-voted without
> any comments that would explain what is wrong in the presented
> code.:)
>
> After I made a note that you should not take into account the
> down-votings because the answer is correct and the down-votings only
> confuse other readers of the question and the answer I was banned.:)
>
> SO searches for any reason to ban me.:)

As an example, I recently (yesterday) had [1]a question+answer heavily
downvoted. It's not apparent now, but it was posted in response to a
question that was prematurely closed, where the guy begged for an
answer. Since I was writing an answer when that question was closed, and
saw that work wasted, I got irritable and scolded the close voters, who,
possibly attracting some support, proceeded to downvote the hell out of
my response to the closing, namely the self-answered question.

I was quite happy about the whole thing, however, because for the first
time ever the mods were doing their job, removing two comments that
contained false alleged quotes, when I flagged them. Never seen that
before. :) Also, the original poster got his sorely needed answer.

And I think that last is how you should think: that the transaction
between you and whoever you're helping, is not affected by gangs of
anonymous downvoters. SO rep is nothing. For a long time I posted
answers only in comments, to avoid the silly rep-increase (and to be
able to add my customary "cheers & hth.,", not accepted in answers). ;-)


Cheers & hth.,

- Alf

Notes:
[1]
http://stackoverflow.com/questions/36435657/what-c-library-features-have-higher-level-c-alternatives-like-c-printf-and-c/36435658#36435658

Vlad from Moscow

unread,
Apr 6, 2016, 8:16:27 PM4/6/16
to
There is searched any reason at SO to down-vote my answers.:)

Ay the same day before I was banned my other correct answer was also down-voted.

Here it is.

http://stackoverflow.com/questions/36458904/one-pair-of-its-elements-sum-to-n-with-c-program/36459438#36459438

I could agree that the answer can be appended with some explanations. And I appreciate such advices in comments to my answers. But the purpose of the comment under my answer was only one to find a reason for down-voting the answer.

If you look his profile you will see that he has only 339 points of the reputation. That is he himself does not answer questions. But he is very glad to find a reason fpr down-voting my answer.:)

As for me then I have badge "Legendary".:)

Moreover there is used such a trick when my correct answer at first is down-voted. When the person who down-voted my answer copies my answer into his own answer. Then his associates down-vote my answer and up-vote the copy of my answer.:)

It is a policy of SO relative me, the policy that is conducted by moderators.:)

Jerry Stuckle

unread,
Apr 6, 2016, 8:29:52 PM4/6/16
to
Anyone can downvote an answer for any reason - including answering
someone's homework for them. And you can be banned for the same thing.

You were not banned because you are from Russia. There are other
Russians active on SO.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

Vlad from Moscow

unread,
Apr 6, 2016, 9:42:44 PM4/6/16
to
You are mistaken about other Russians. I am the only who is all the time except rare periods among the top 20 answerers in C and C++. Of course there are from Russian. But 1) it is not clear from their nicks or profiles that they are from Russia. 2) they are not so visible as me.

And even others from other contries wrote in comments that in their opinion the reason is that I am from Russia.

Moreover in comments to me there were written obscene expressions. Do you think who wrote them were banned?

You are mistaken.:)

Their comments simply were removed. It is me who is banned by any reason even if I will write a correct answer. My correct answer is also a reason to ban me.:)

The answer I showed is the reason for banning me. All I did is that I wrote a note that nobody should take into account the downvotings because the answer is correct. Otherwise this will confuse readers of the answer. And if there is something is invalid in my answer then a quakified programmer usually will write a comment pointing out what is wrong. It is usually persons with the low reputation who down-vote correct answers without explaining the reason.:)

Jerry Stuckle

unread,
Apr 6, 2016, 9:56:23 PM4/6/16
to
There are other Russians on SO. Maybe not in the C/C++ groups, but
there are other Russians. However, they don't have the attitude you do.

SO is a private site. They can allow or refuse access to any one at any
time, for any reason or no reason at all. However, I can see why they
banned you, and it has nothing to do with your answer being correct.

And BTW - your answer was NOT correct.

Vlad from Moscow

unread,
Apr 6, 2016, 9:56:31 PM4/6/16
to
On Thursday, April 7, 2016 at 3:29:52 AM UTC+3, Jerry Stuckle wrote:
Can you point out at least one Russian from the Russia in this list of the top 20 answerers?:)

http://stackoverflow.com/tags/c/topusers

Jerry Stuckle

unread,
Apr 6, 2016, 10:03:14 PM4/6/16
to
> Can you point out at least one Russian from the Russia in this list of the top 20 answerers?:)
>
> http://stackoverflow.com/tags/c/topusers
>

No, but that means absolutely nothing.

Vlad from Moscow

unread,
Apr 6, 2016, 10:09:58 PM4/6/16
to
And what is not correct in the answer?:)

Vlad from Moscow

unread,
Apr 6, 2016, 10:13:21 PM4/6/16
to
I see you have no arguments.:)

Jerry Stuckle

unread,
Apr 6, 2016, 10:22:33 PM4/6/16
to
> And what is not correct in the answer?:)
>

If you don't know and kept insisting it was correct, that would be a
good reason for banning. Maybe if you figure it out and apologize to SO
you can get back in.

And learn to trim sigs. That why there is a sig separator.

Jerry Stuckle

unread,
Apr 6, 2016, 10:23:36 PM4/6/16
to
> I see you have no arguments.:)
>

Just that your question is meaningless. There are hundreds of other
countries in the world without posters in the top 20. That doesn't mean
people from those countries don't post.

And you don't know how to trim sigs.

Richard

unread,
Apr 6, 2016, 10:24:58 PM4/6/16
to
[Please do not mail me a copy of your followup]

Vlad from Moscow <vlad....@mail.ru> spake the secret code
<580a28ee-969e-46a9...@googlegroups.com> thusly:

>[more crybaby whining]

It still has nothing to do with C++. Take it elsewhere. Start a blog
and scream at the sky for all I care, just don't do it here.

Vlad from Moscow

unread,
Apr 6, 2016, 10:44:06 PM4/6/16
to
good reason for banning." = Bravo! It is a good argument.

One more could you explain me whay is incorrect in the answer?:)

Or you will again say that If I don't know what is incorrect then it is a good reason for banning.:)

It is loading more messages.
0 new messages