Why do people ignore advice?



  • I'm not the brightest person on Earth nor the best programmer, not even close, however when I give advice I expect people to actually listen or pretend to.  What is the point in asking for advice and then doing whatever you please.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    The thing is when they are asking about something impossible to do, fine sooner or later they will realize that is impossible.  But when is not impossible but a bad, bad idea they will plow throw it and ride a project to the ground.

    I could put an example of this, but is more of a general trend but the most recent example was something like this:

    P: Is there a way to loop by my properties (this is C#)

    Me: Yes there is but don't do it like that, use a collection to store the values and loop that

    P: Can I use reflection?

    Me: Yes but bad idea, read on reflection, you will see what I mean

    P: What can I use to set the value

    Me: SetValue, link here ________ (bang head against desk, give up)

    Specific details and other stuff have been trimmed to protect the innocent and because of my inherent laziness

    PS: I am hardly coherent in my own language, even less in English, so you know



  •  'cause people are stupid and petty. Eventually you'll become jaded, and when people ask you stupid questions where the answer is "yes, but you shouldn't" you'll either say "no" or "I don't fucking know, stop asking me"



  • The correct response to P's first question is, "What are you trying to do?" (translation: "Why are you trying to loop over the properties of the object?", but one level of abstraction up.)

    This usually reveals (and may prevent) the particular variety of spectacularly misguided WTFery that is in progress, because it makes the person stop and think about what he is doing.  This provides an opportunity to explore better ways of doing it, and even ways of not doing it because you can do something else instead.



  • @serguey123 said:

    I'm not the brightest person on Earth nor the best programmer, not even close, however when I give advice I expect people to actually listen or pretend to.  What is the point in asking for advice and then doing whatever you please.

    The thing is when they are asking about something impossible to do, fine sooner or later they will realize that is impossible.  But when is not impossible but a bad, bad idea they will plow throw it and ride a project to the ground.

    I could put an example of this, but is more of a general trend but the most recent example was something like this:

    P: Is there a way to loop by my properties (this is C#)

    Well, the person is asking how they do it, not whether it's sane thing to do, so they'll only listen for answer how to do it.

    I'd probably continue something like:

    Me:Why do you need to do that?
    P: Can I use reflection?
    Me: But WHY for $DIETY's sake do you need to do that?

    The person gives up sooner or later and tells you what is their ultimate goal with it. Than it's either sensible (e.g. using reflection might well be) and I'd answer the original question, or I'd say it will be easiest/fastest/shortest to refactor the thing in one or another way.

    Eventually the people will learn that you only answer smart questions and learn to ask them (at least some of them)



  • @serguey123 said:

    I'm not the brightest person on Earth nor the best programmer, not even close, however when I give advice I expect people to actually listen or pretend to.  What is the point in asking for advice and then doing whatever you please.

    The thing is when they are asking about something impossible to do, fine sooner or later they will realize that is impossible.  But when is not impossible but a bad, bad idea they will plow throw it and ride a project to the ground.

    I could put an example of this, but is more of a general trend but the most recent example was something like this:

    P: Is there a way to loop by my properties (this is C#)

    Me: Yes there is but don't do it like that, use a collection to store the values and loop that

    P: Can I use reflection?

    Me: Yes but bad idea, read on reflection, you will see what I mean

    P: What can I use to set the value

    Me: SetValue, link here ________ (bang head against desk, give up)

    Specific details and other stuff have been trimmed to protect the innocent and because of my inherent laziness

    PS: I am hardly coherent in my own language, even less in English, so you know

    BTW, this person is simply refusing to takes sides in the strong-typed vs. dynamic struggle.  The chose C#, so they get all of the benefits of strong typing, but now they want to easily add properties and have the code automatically recognize them and use them.  They are essentially trying to turn C# into JavaScript.  If they succeed, then they will have lost most of the benefits of strong typing, but will have kept C#'s cumbersome syntax for pretending to be dynamic (reflection).  This way, they can have the worst of both worlds.

    Most likely, whatever problem they are trying to solve can be solved better with Generics.



  • I trimmed some parts of this to make it more coherent with the title at hand, his first question was:

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>P: Hey I have this class<o:p></o:p>class MyClass<o:p></o:p>{ <o:p></o:p>public int Property1{get;set;}<o:p></o:p>public string Property2{get;set;}<o:p></o:p>//Some other properties like this one here 

    }

    <o:p></o:p>I need to initialize members to default value, how to do so?<o:p></o:p>Me: You don't need to, the compiler do this for you because fields need to be initialized not properties.  Anyhow in order to initialize fields the correct place is the constructor. For future references when actually needed put the code there.<o:p></o:p>Insert part of the conversation you know.....<o:p></o:p>So, the object would at later part interact with a db and P wanted to be extra sure the object was correctly initialized in case the compiler did not worked as intended (what are the odds?) and was to lazy to do this for every property (in P defense there where a lot of properties there).<o:p></o:p>So sane choices where, trust the compiler, put initialization code in the constructor for the object, create a method called Reset or Initialize in the class that does this for you, other sane choices, ...., reflection<o:p></o:p>

     



  • Also what on earth is wrong with this editor and why it keeps eating my formatting

    I trimmed some parts of this to make it more coherent with the title at hand, his first question was:

     

    P: Hey I have this class

     

    class MyClass

    {

     

    public int Property1{get;set;}

     

    public string Property2{get;set;}

     

    //Some other properties like this one here 

    }

    I need to initialize members to default value, how to do so?

     

    Me: You don't need to, the compiler do this for you because fields need to be initialized not properties.  Anyhow in order to initialize fields the correct place is the constructor. For future references when actually needed put the code there.

     

    Insert part of the conversation you know.....

     

    So, the object would at later part interact with a db and P wanted to be extra sure the object was correctly initialized in case the compiler did not worked as intended (what are the odds?) and was to lazy to do this for every property (in P defense there where a lot of properties there).

     

    So sane choices where, trust the compiler, put initialization code in the constructor for the object, create a method called Reset or Initialize in the class that does this for you, other sane choices, ...., reflection



  • @Steve The Cynic said:

    The correct response to P's first question is, "What are you trying to do?" (translation: "Why are you trying to loop over the properties of the object?", but one level of abstraction up.)

    This usually reveals (and may prevent) the particular variety of spectacularly misguided WTFery that is in progress, because it makes the person stop and think about what he is doing.  This provides an opportunity to explore better ways of doing it, and even ways of not doing it because you can do something else instead.

    Yup.

    If someone comes at you with a zany scheme, the first step is to figure out what they're trying to do *BEFORE* telling them whether or not their crazy scheme will work. Without knowing what they are trying to accomplish, your advice (while correct) could be very very destructive or wasteful.

    And if they refuse, and they're trying to use something pointless-- like reflection in C#, or Eval in JavaScript, or whatever-- lie and tell them you can't do it. Sure, they might get mad at you 4 years later when they realize you're lying*, but by that point you'll have saved the company tens of thousands of dollars in WTF-management.

    ASTERISK: The kind of people who ask questions like this never read code forums or articles, so they'll most likely never realize you were lying. This type of meta-advice is really something programmers need to be better at-- interacting with code isn't enough, learn to interact with human beings.



  • But I have seen this outside programming, as I said is a trend

    Ex: Company A decides to build hospital in land A1 and subcontract company B to do a survey on the land.  Company B specialist says: the ground is unstable, you should not build tall buildings in this land because there is an inherent risk that the building will sink. Company A pays company B for services but build big tall building anyways.

    Now you think that this is it, right, nothing else could go wrong?

    Think again

    Company C that has a building in adjacent lot A2 that is build within safety specs (two floors, pylons, etc) has a sewage pipe burst and unproven rumors said that is because of building sinking (it is not, a team of specialists checked the place).  This building get close because of public security reasons.  The other aka: disaster waiting to happen is open to the general population.

    The moral of this is that your advice (the advice of a specialist) is less worthy than the advice of anybody else.



  • @serguey123 said:

    But I have seen this outside programming, as I said is a trend

    Ex: Company A decides to build hospital in land A1 and subcontract company B to do a survey on the land.  Company B specialist says: the ground is unstable, you should not build tall buildings in this land because there is an inherent risk that the building will sink. Company A pays company B for services but build big tall building anyways.

    Now you think that this is it, right, nothing else could go wrong?

    Think again

    Company C that has a building in adjacent lot A2 that is build within safety specs (two floors, pylons, etc) has a sewage pipe burst and unproven rumors said that is because of building sinking (it is not, a team of specialists checked the place).  This building get close because of public security reasons.  The other aka: disaster waiting to happen is open to the general population.

    The moral of this is that your advice (the advice of a specialist) is less worthy than the advice of anybody else.

    Come on, has this actually happened? I'm sorry, but without any kind of cite or references, I doubt this has ever happened, much less is a trend.



  • You give me more imagination capacity that what I'm capable off.  Then again, the first example is easy to verify, is actually in the msdn forum, see he actually asked and my response was the same. My username is the same so and is in the c# language forum, I cut some slack to people in the forum because they are newbies and such, that is why my complaint is not that he does not know what he is doing, is more like what is the point in asking when you are not listening.

    The other part, I could give you the name of the company and other specifics but I doubt it would do any good, I live in a very backward country and this example is very, very common so is more of a trend in my country than a global trend. I was just surprised to find this in other places, I thought the civilized world was better

    Regards



  • @serguey123 said:

    You give me more imagination capacity that what I'm capable off.  Then again, the first example is easy to verify, is actually in the msdn forum, see he actually asked and my response was the same. My username is the same so and is in the c# language forum, I cut some slack to people in the forum because they are newbies and such, that is why my complaint is not that he does not know what he is doing, is more like what is the point in asking when you are not listening.

    The other part, I could give you the name of the company and other specifics but I doubt it would do any good, I live in a very backward country and this example is very, very common so is more of a trend in my country than a global trend. I was just surprised to find this in other places, I thought the civilized world was better

    Regards

    Well if you live on Corruptsylvania, then yeah I guess I could buy the story-- although I still don't get why they'd pay him money, only to ignore his report.



  • Actually I live in the tropics and I don't get it either but it was done that way.  I'm actually thinking on moving to Corruptsylvania or Dumbsylvania, so let me know, if you want on Monday I'll tell you how we buyed snow sweeping machines on a country that is on a perpetual summer.

    Regards



  • @blakeyrat said:

    they're trying to use something pointless-- like reflection in C#

    Reflection in C# is pointless? Like, as a general rule? Or in specific cases like the OP?



  • @toth said:

    @blakeyrat said:
    they're trying to use something pointless-- like reflection in C#

    Reflection in C# is pointless? Like, as a general rule? Or in specific cases like the OP?

    No, it's more like... if a guy's going to ask you a stupid question like that, especially for the reasons Serguey gave (basically: "what if the language forgets to run the constructor?"), then that type of person should not be using reflection. He's only going to shoot himself in the foot, and destroy your product's reputation with it.

    Like I tried to imply in my asterisk, you need to judge the *human* factor of the situation, not just the *computer* factor.

    Incidentally, this is also why I support simple languages over complex ones. Eventually, Serguey's co-worker is going to get at that code and do something monumentally stupid-- the fewer stupid things possible, the better.



  • @blakeyrat said:

    No, it's more like... if a guy's going to ask you a stupid question like that, especially for the reasons Serguey gave (basically: "what if the language forgets to run the constructor?"), then that type of person should not be using reflection. He's only going to shoot himself in the foot, and destroy your product's reputation with it.

    Yeah, I looked at that and counted myself lucky that the people I work with are smart enough to trust constructors to do what they're supposed to do.



  • @blakeyrat said:

    Come on, has this actually happened? I'm sorry, but without any kind of cite or references, I doubt this has *ever* happened, much less is a trend.
     

    The Tower of Pisa?



  • @blakeyrat said:

    although I still don't get why they'd pay him *money*, only to ignore his report.
     

    because it's mandatory in some countries to have these reports before you start building?



  • @serguey123 said:

    I'm not the brightest person on Earth nor the best programmer, not even close, however when I give advice I expect people to actually listen or pretend to.  What is the point in asking for advice and then doing whatever you please.
     

    Surprisingly many people "ask for advice" when they're already dead set on what they're planning to do, and just want validation for what they're doing.

    This can be seen in various circles. My wife frequents a board where professional pet trainers go to, and every now and then someone pops in, and says something like whether their gold fish is happy in the 3-liter vase they're held in, and then get insulted when they're accused of animal cruelty. "It looks happy in there!". As if anyone knows what a happy fish looks like.



  • @Sol_HSA said:

    Surprisingly many people "ask for advice" when they're already dead set on what they're planning to do, and just want validation for what they're doing.
    QFT.

    yes, it's a common (and very dumb) thing for some people : if the "expert" tells them « OK you can use eval and document.write in Javascript, it's very sane and clever », they just go for it and feel good about themselves because they found the right thing to do. If he insults them or starts to cry miserably mumbling " omg wtf", then it was not the good person to ask : maybe someone on stupidcoderboard.com will have a "better advice" (the answer they wait for). And they go on until some goof tells them : OK, you're fucking right...



  • @Sol_HSA said:

    As if anyone knows what a happy fish looks like.

    [Dopefish]


  • @serguey123 said:

    I'm not the brightest person on Earth ...... when I give advice I expect people .. listen or pretend to.  What is the point in asking for advice and then doing whatever you please.

     

     

    TRWTF is that you expect them to pretend to listen and then get upset when they pretend to listen.



  • @Helix said:

    @serguey123 said:

    I'm not the brightest person on Earth ...... when I give advice I expect people .. listen or pretend to.  What is the point in asking for advice and then doing whatever you please.

     

     

    TRWTF is that you expect them to pretend to listen and then get upset when they pretend to listen.

    Pretending to listen is somewhat different than ignoring you, even if you don't do it saying stuff like, "I'll consider it" or "I'll give it a try" or whatever is common courtesy.  I agree that this person was just asking for somebody to confirm what he already knew in his head.  Reflection per se is not pointless but has (like almost anything) a potential for doing something dead wrong and in this case is pointless.

    Regards



  • We all like to try crazzzy things now and again.

    Like writing a web app to automatically parse .RDL's and create parameter entry screens because corporate IT decides that oracle reports is going to be the only supported report environment and Microsoft Reporting Services server gets yanked out from under you with no warning and over 250 existing heavily used reports have to be salvaged.



  • @Medezark said:

    We all like to try crazzzy things now and again.

    Like writing a web app to automatically parse .RDL's and create parameter entry screens because corporate IT decides that oracle reports is going to be the only supported report environment and Microsoft Reporting Services server gets yanked out from under you with no warning and over 250 existing heavily used reports have to be salvaged.

    And deciding that the built-in funtion that tell you if a char is a digit, a letter, a symbol, etc that exist in c# is not good enough and doing one yourself giving birth to beauties as: 

    if (mychar=='a'||mychar=='b'.....mychar=='Z')

    //Similar "if" for symbol and number, etc.

    The madness has to stop somewhere.

    Regards


Log in to reply