Ayende @ Rahien

Refunds available at head office

Help requests that make me want to cry

This showed up on my mail box, with the following text:

When i try to insert an item to db, VS gives a stackoverflow exception. is it because of that i am using generic classes??

image

I am not going to comment further, I am stepping away from the keyboard and going to have a lie down.

Comments

Harry S.
08/21/2009 12:56 AM by
Harry S.

Wow... just... wow..... I read that and got an instant headache.

Phillip Haydon
08/21/2009 01:41 AM by
Phillip Haydon

Some people you really need to hold their hand all the way through life huh...

JW
08/21/2009 01:54 AM by
JW

I believe the correct response is just to email back "No".

Jose Miguel Rivero
08/21/2009 02:01 AM by
Jose Miguel Rivero

actually I'm more amazed that you spend time to help people, any advice to be more productive?

firefly
08/21/2009 02:05 AM by
firefly

I don't know whether to laugh or to cry...

Howard Pinsley
08/21/2009 02:13 AM by
Howard Pinsley

Well there you have a generic case of recursion!

Haacked
08/21/2009 02:57 AM by
Haacked

"yeah, it's because you used generics. In fact, it's because you wrote code. Step away from the keyboard and never write code again or this bug will come back."

Emmanuel
08/21/2009 03:13 AM by
Emmanuel

This belongs to the dailyWTF.com.

Bala
08/21/2009 03:30 AM by
Bala

Yo dawg, i herd you like inserts...

Barry
08/21/2009 03:41 AM by
Barry

ah, those generic classes can be tricky :)

csokun
08/21/2009 04:11 AM by
csokun

Lesson learn : If you inherit from ActiveRecordBase <t don't try your own Insert

RobC
08/21/2009 04:24 AM by
RobC

Time for a career change for the submitter ! They should not be in the field at all.

Set
08/21/2009 05:56 AM by
Set

Half the people working in my company are as useful...

At least there are some generics :P

Half the wtf I'm seeing everyday would make half of the posters here shoot themself :P

JWB
08/21/2009 06:32 AM by
JWB

The curly bracket is clearly the problem, since it is highlighted. Probably too much curly brackets.

serdar
08/21/2009 06:56 AM by
serdar

Isn't that interesting? Someone is trying to use repository pattern, Activerecords, generics hey lol, where did you learned that stuff? You don't know how to code in the first place. I think he's a stackoverflow programmer, he may go to stackoverflow web site and ask for some solution maybe. There are good people there, they always help.

Martin
08/21/2009 06:57 AM by
Martin

I just hope someone's pulling your leg Ayende (seems to be quite fun, and you get a response). Or at least that the person was drunk when deciding to send that e-mail.

Arnis L.
08/21/2009 07:06 AM by
Arnis L.

Troubleshoot tip seems pretty obvious.

Dave
08/21/2009 07:07 AM by
Dave

So let me understand, a coding newb is taking his first steps with NHibernate and Activerecord, does something stupid, and requests your help.

You, on the other hand do find the inner powers to answer him (or at least refer him to some 101 course), but somehow overcomes the exhaustion and find it inside you to humiliate him just to recieve another set of claps from your admirers.

Obnoxious.

Joe Gutierrez
08/21/2009 07:13 AM by
Joe Gutierrez

If a bit bucket overflows does it make a mess?

Dave Mertens
08/21/2009 07:16 AM by
Dave Mertens

I've seen those Recursive calls more that I like. But In this case the developer only forgot the 'base' identifier. But the question is rather silly.

But I thought I read some weeks ago that repositories were obsolete. Haven't you told them..

At least you get a email. I usually find out at the end of the day that a developer has an problem. Because he don't want to look stupid, he's not gonna ask for help..

Frank Quednau
08/21/2009 07:27 AM by
Frank Quednau

Dave, fair enough,

even so, this has nothing to do with NHibernate or ActiveRecord or whatever. The error is so obvious, it took me minutes to see it. The guy stays anonymous. Every stupid humiliation show on TV is worse than this and reaches millions. Agreed, if the guy reads this blog he will not be happy, but looks like he caught Oren on the wrong foot. To send a mail like this is quite insulting to the intellect. If you retaliate immediately, this is what you get. I tend to take a break before reaction, but show me the person who never executed his immediate desire because of an abuse of his neuronal wiring.

Jamie
08/21/2009 07:56 AM by
Jamie

The sooner people READ error messages (and the often helpful text that is in the Troubleshooting Tips section) the better.

Even a simple breakpoint would highlight what is happening!

Dave
08/21/2009 08:10 AM by
Dave

@Frank

I can agree that sometimes someone just steps on your tows, but i dare saying this is not the case.

First, this is email. Staying cool is much easier on email.

Second, this was a future post hanging out there for several days, more than enough time for ayende to cool down and realize he is doing something immoral.

Third, even if you are keeping someone anonymous, posting content of a personal mail sent to you, is just, well, just not right.

Also, it seems to me, that chances are that this person is a newb, but still he is practicing NHibernate & ActiveRecord. That is something ayende should gladly encourage, as he now has certain responsibility towords the community. If someone at a learning stage - after such expirience - decides to take another path, who can blame him?

And once again, if you find an email insulting, don't answer it.

firefly
08/21/2009 08:40 AM by
firefly

@Dave,

Whatever happen happen for the best. Maybe it would be best for him to take another path at this stage, or perhaps he'll learn how to be more self reliant next time. With the troubleshooting tips, the error become blazing obvious.

Though I agree with Martin somebody probably want to pull Oren leg :)))

Mats Helander
08/21/2009 08:58 AM by
Mats Helander

Hands up anyone who hasn't written that very bug in the last month (variations count, such as public string Name get { return this.Name; } } ), I know I have - several times. The only reason I saw so quickly what was wrong is that I've written this very bug so many, many times myself.

But I guess that at one point, I wrote that bug for the first time. Probably took me a good while to figure it out that time, since it is really the kind of spelling bug that will have you waste hours reading through all your code in search of the logical error which is not there. The poster obviously asked about generics because he was unsure about that mechanism and suspected the logical bug he could not find might be hiding there.

Perhaps a beginner, but no reason to suspect the guy's an idiot.

/Mats

Peter Morris
08/21/2009 09:09 AM by
Peter Morris

The problem is indeed a generic class.

A generic class of ......

firefly
08/21/2009 09:11 AM by
firefly

@Mats,

We all make mistake. I probably make more than most :). Though if it truly a brain-dead moment then I don't see why he wouldn't be able to laugh it off. Not sure what kind of error will throw in your case but if an exception is throw then it shouldn't take long to track down at all.

Not suspecting that the guy is an idiot but there is no reason to think this post is some kind of cruel joke either.

Stephen
08/21/2009 11:00 AM by
Stephen

Hmm, I'm guilty of asking your opinions on things via your blog- but I'm really confused as to why you are getting these direct 'I can't code, can you do it for me' requests, do you send your rates back and ask for a PO number?

Kelly
08/21/2009 01:27 PM by
Kelly

Ayende, you've been trolled

PDizzle
08/21/2009 01:34 PM by
PDizzle

I saw similar source code in rhino.commons

fred
08/21/2009 02:13 PM by
fred

We have all started to program and got to similar situations... let's just remember that.

Kelly Stuard
08/21/2009 02:24 PM by
Kelly Stuard

I agree with the other Kelly - some drunk guy got the error and said: "Hmm, should I send this to dailyWTF or Ayende? He flipped a coin and tails came up.

Jason Y
08/21/2009 06:25 PM by
Jason Y

When it's revealed that the person asking for help is 7 years old, most of you will look rather stupid... unless it is a joke, in which case I would look stupid. I shall take such a risk.

The right thing to do is tell him what he should do:

-Whenever you get an exception, Google it first. (No need to give him a fish he can catch himself w/ some instruction.)

-Send appropriate questions to the appropriate places.

alwin
08/21/2009 07:23 PM by
alwin

I know someone who barely googles anything at all nowadays. He just dumps his question on Stack Overflow. The things people there will do for some rep points...

He is a beginning programmer, and I tell him: "you need to try to fix it yourself first, to train your problem-solving skills and to look deeper than just the error." But he won't listen and IMO he is just too lazy.

I'm eagerly awaiting his question on SO nobody can answer, and he has to find the answer himself. That'll make him sweat :)

gunteman
08/22/2009 12:06 AM by
gunteman

@Dave,

Couldn't agree more. This could have been a DailyWTF if it was code found lingering in some project you've just been handed, but in this case it was someone asking for help. Yes, the lack of problem solving skills is a problem, but I doubt that the cure is public humiliation.

Stephen
08/22/2009 12:25 AM by
Stephen

@Jason, can't really remember what I was doing at 7, but I imagine it wasn't implementing generic repository patterns and reading developer blogs..

But maybe thats my flaw ;)

firefly
08/22/2009 02:48 AM by
firefly

heh I bet any 7 years old who can do this stuff probably can do it better than most of us here... :) This is not even a case that require google... this is a case that require reading, though it might be hard for some :)

Mark Nijhof
08/22/2009 01:02 PM by
Mark Nijhof

Let him place a debug break point inside the try statement and ask him to count the number of times it gets hit and let him report that back too you.

Jimmy Zimms
08/22/2009 07:41 PM by
Jimmy Zimms

Perhaps a beginner, but no reason to suspect the guy's an idiot.

No he/she's just lazy. Yes it's an easy bug to write. But that is NOT what is getting ragged on here in reality. What the issue is that on the first sign of trouble the person didn't even think about say setting a break point, reading the type summary of what StackOverFlowException means, or performing any number of simple checks. Instead they go, "it's broken and buggy and doesn't work" and sends a support request. That is laziness personified.

Joe Chung
08/22/2009 11:48 PM by
Joe Chung

In order to understand recursion, one must first understand recursion.

Rick
08/24/2009 06:05 AM by
Rick

Maybe it was my son, he is just 11 but wants to learn how to program with c#..

I told him: "Son please stop NOW!, or you will loose all your social habilities and will end up insulting newbies like you in the future!!!"..

austin
08/31/2009 03:04 PM by
austin

see i know if i constrate on the what i am studying i will be a better man

but i cannot because u can say like i am lazy type person and one more think when were i think to study or do some active work then again the lazy think accour and the main reson is that i all the time i think only about the sex and porn and befautiful ladies to see there boobs and pussy help me if u can i know this also dont work then can i just sending this to u for making me a relif for some time

Anthony Gatlin
09/01/2009 06:10 PM by
Anthony Gatlin

That's absolutely hilarious! Thanks for brightening my day.

Nate Gupta
09/02/2009 05:07 PM by
Nate Gupta

With that amazing piece of code, the dude also discovered a bug in Microsoft .Net framework - The exception was not handled by the Catch block ;~)

On a different note, I agree with some of the posts - humiliation is anything but constructive!

  • Nathan
Comments have been closed on this topic.