[Asterisk-Dev] 'tonezone' in chan_zap.c
alex at pilosoft.com
alex at pilosoft.com
Tue Mar 1 20:21:52 MST 2005
On Tue, 1 Mar 2005, Andrew Kohlsmith wrote:
> On March 1, 2005 08:47 pm, alex at pilosoft.com wrote:
> > I disagree. At any case, if you can't read code, and you need your
> > hand held, you are not likely to be much of a contributor in future.
>
> I respectfully disagree. If the code is not adequately described by
> itself and the comments therein, the coder is to blame. "strange" or
> unintuitive code without sufficient comments has NO PLACE in open-source
> projects.
OK - please make sure your code conforms to those high standards. Who am I
to disagree!
> > I don't think you understand why people are contributing to Asterisk.
> > We are not doing it to help *YOU*. We are not doing it to make the
> > world a better place. We are writing code to *solve our immediate
> > need* and are gracious enough to share that code with everyone else,
> > including you.
>
> Blow it out your ear -- That kind of attitude *stinks*. If someone is
> making a decided effort to learn how the code functions and is having
> trouble, well then that is exactly what this list and #asterisk-dev is
> for. If you think code has to be hard to read to be functional, then
> your contributions *will* be replaced by clearer and ultimately better
> code by persons who don't have this massive chip on their shoulder.
No. Clean code is good. Documented code is good. However, we do not live
in a perfect world. In real world, everyone has their own criteria for
"good enough". That "good enough" code goes into production.
That same code is submitted as a patch to Asterisk - and to demand that
all contributors conform to your 'code quality' standards is silly: Having
"not documented" code is better than having no code at all (see:
app_realtime).
> If the programmer thinks his code is so great I suggest he close-source
> it and make millions off it. Oh wait, he can't, for many different and
> varied reasons, which is one of the reasons he's writing OSS in the
> first place. Open source helps everyone, including the programmer.
> Many eyes not only make the bugs shallow, but they also help the
> programmer become more proficient in his trade, so long as his ego's not
> blocking the effort.
Absolutely. I don't disagree there.
> > The worst thing you can do is bitch and moan that 'I cannot understand
> > this code, it has no documentation blah blah blah'. I [and I think, most
> > developers on this list] *simply do not care what you think about our
> > code, whether you use it or not use it*. WE DO NOT CARE. NOT AT ALL.
>
> However, said programmer *should* make the effort to describe what it is
> their code is doing if a third party asks what it is it's trying to do
> and shows that he's not only making an effort to understand it, but is
> also able to understand the explanation.
Sure, no argument. Good comments make good code.
<snip>
See, I think you misunderstood me (or are putting words in my mouth). I'm
not saying comments are bad, or that you shouldn't document your code, or
that my code somehow is superior to your code, or anything like that.
All I said is that if one needs assistance to 'grep tonezone */*c', one
probably won't be a good contributor, and instead would just sap our time
with requests for help. Nothing is wrong with requests for help - but if
you didn't do your homework, expect to be flamed.
Also, if one complains 'I can't understand your code therefore it must be
your problem, and you must help me understand' - again, expect to be
flamed for that.
Do you disagree?
-alex
More information about the asterisk-dev
mailing list