June 11, 2002
"andy" <acoliver@apache.org> wrote in message news:3D05ED45.8060906@apache.org...

> -1 - The standard should be that the code is readable.  If that is the case, who cares where the braces are.  This is the stuff of pedantic flamewars that have no logical conclusion.

Yep, you are right. But who decides whether the code is readable or not?
I say, some sort of guidelines (not even strict rules) for this purpose
would be
nice to have.


June 11, 2002
> This looks really good. It looks like we may be up and running sooner
than I
> first thought. I'll have to start organising the contributors soon.

How soon depends on where I suppose, do we have a server yet, or just the domains???

> Are we to take it that you've kind of volunteered yourself as the layout/presentation guy?

Oh go on then, you talked me into it, however, I'm on holiday for 5 weeks starting July 8th (I think) and will be thoroughly incommunicado, I'll do as much as I can before I go, and if I find my self at a loose end, then while I'm away to (I'm sure I have a laptop somewhere)...

Alix Pexton...
June 11, 2002
I agree, some of the code will probably be coming out of other programs people have done. They don't want to have to re-style there work again. It's just extra work.

"andy" <acoliver@apache.org> wrote in message news:3D05ED45.8060906@apache.org...
> Pavel Minayev wrote:
> > "Alix Pexton" <Alix@seven-point-star.co.uk> wrote in message news:01c210a2$3ac60ec0$e1257ad5@jpswm...
> >
> >
> >>I'm still alive, so I attached a very simple mockup of what the journal might look like...
> >
> >
> > Looks great!
> >
> > I wonder how was this piece of code made? The colors look very familiar
> > (in fact, those are my preferences in Visual C++ editor)... =)
> >
> > By the way, I guess we'll need some kind of coding standarts for the site, like where to put braces etc... =)
> >
> >
>
> -1 - The standard should be that the code is readable.  If that is the case, who cares where the braces are.  This is the stuff of pedantic flamewars that have no logical conclusion.
>
> -Andy
>


June 11, 2002
> 
> Yep, you are right. But who decides whether the code is readable or not?
> I say, some sort of guidelines (not even strict rules) for this purpose
> would be
> nice to have.
> 
> 

No.. Flamewars on brackets have no conclusion and are never productive.
Readibility is subjective, but then again, one can comply with such guidelines to the letter and produce horrible unreadible code.  Whats the goal?  Push your bracketing standard on the world (hasn't worked for the last 30 or so years, but your incarnation of this flamewar will be different...really!), or make sure the code is helpful and readible?  If the subjective consideration is the goal, go directly to the subjective consideration.  If you just really have to have the machine-generated code view, then employ the use of a code formatter.

-Andy

June 11, 2002
anderson wrote:
> I agree, some of the code will probably be coming out of other programs
> people have done. They don't want to have to re-style there work again. It's
> just extra work.
>

#define I genericPerson
#define you genericPersonNotEqualToI

Good point.  I wouldn't do it.  So the question becomes.  I port the java servlet API over to D and launch cool website X under D and its fast and everyone loves it and its achieving widespread adoption of the language.  You're like "Wow can you write an article for the journal". I'm like "sure why not".  I write a wonderful inciteful article (like walter's in Doctor Dobbs that got me interested in D), and employ code samples from my servlet API.  You're like "Wow that's great!" Then you notice that I use

if (request != NULL) {
 // do something
}

instead of your standard of

if (request != NULL)
{

}

You ask me to change it.  I ask if its readible and understandable.  you say yes, but it doesn't conform to our somewhat arbitrary guidelines.  I  I don't have time or feel like it and gee you're not paying for it anyhow, how dare you enforce arbitrary pedantic rules on me (you have to pay to do that ;-) ).  You get letters from all sorts of folks saying "Gee D is great if it just had a Servlet API, I could ditch Java, C, C# and C++ and use it". . .  Do you publish the article or squelch it on your pedantic consideration?

So there you have why the subjective consideration of "is this source readible to the average joe with C, C++ or Java skills" .. if it is... well...

-Andy


> "andy" <acoliver@apache.org> wrote in message
> news:3D05ED45.8060906@apache.org...
> 
>>Pavel Minayev wrote:
>>
>>>"Alix Pexton" <Alix@seven-point-star.co.uk> wrote in message
>>>news:01c210a2$3ac60ec0$e1257ad5@jpswm...
>>>
>>>
>>>
>>>>I'm still alive, so I attached a very simple mockup of what the journal
>>>>might look like...
>>>
>>>
>>>Looks great!
>>>
>>>I wonder how was this piece of code made? The colors look very familiar
>>>(in fact, those are my preferences in Visual C++ editor)... =)
>>>
>>>By the way, I guess we'll need some kind of coding standarts for the
>>>site, like where to put braces etc... =)
>>>
>>>
>>
>>-1 - The standard should be that the code is readable.  If that is the
>>case, who cares where the braces are.  This is the stuff of pedantic
>>flamewars that have no logical conclusion.
>>
>>-Andy
>>
> 
> 
> 


June 11, 2002
"andy" <acoliver@apache.org> wrote in message news:3D060E26.60001@apache.org...

> samples from my servlet API.  You're like "Wow that's great!" Then you notice that I use
>
> if (request != NULL) {
>   // do something
> }
>
> instead of your standard of
>
> if (request != NULL)
> {
>
> }
>
> You ask me to change it.  I ask if its readible and understandable.  you

No, I don't. I run a program which does it automatically. No need for you to worry. =)




June 11, 2002
"Alix Pexton" <Alix@seven-point-star.co.uk> wrote in message news:01c2114d$7ed77a80$834a7ad5@jpswm...

> I wrote in all the highlighting by hand on this occasion, but I have also rewritten a certain D sample program so that it emits code that is
css-able
> (uses spans instead of font tags). The colo(u)r values came from the
> aforementioned sample program...

Heh... I should have updated it looong ago. Yes, I've seen your HTML code.
By the way, source code formatter and HTML generator could in fact be
one single program. I should think about this...




June 11, 2002
> By the way, I guess we'll need some kind of coding standarts for the site, like where to put braces etc... =)

I just thought of a novel new solution to the problem with code formatting
in the journal...
We (which would probably mean me) could right a javascript code formatter
that loaded the individual's preferences from a cookie. Everyone is happy
because code only has to be written once, but will look just like every one
prefers...

I think it is possible, but not necessarily easy...

Alix Pexton...
June 11, 2002
>>
>>You ask me to change it.  I ask if its readible and understandable.  you
> 
> 
> No, I don't. I run a program which does it automatically. No need for you to
> worry. =)
> 
> 
> 
> 

Which is exactly the point.  Its you're issue (in every sense of the word).  If you're the editor, and you're doing the work.  Format it as you like.  No need for a long flamewar on brackets unless you really enjoy that sort of thing (in which case, have fun, but after like 30 years I'd think that particular flamewar would be old).

-Andy

June 11, 2002
"Alix Pexton" <Alix@seven-point-star.co.uk> wrote in message news:01c2116c$7555e9a0$48957ad5@jpswm...

> We (which would probably mean me) could right a javascript code formatter that loaded the individual's preferences from a cookie. Everyone is happy because code only has to be written once, but will look just like every
one
> prefers...

Write a JavaScript code formatter? This means both lexer and parser _very_ slow... we could then put "best viewed on Athlon 1GHz or higher" logo on the site. =)

Maybe a server-side script could be better idea, but anyhow, does it worth it? As long as the code is readable, I personally don't care much of whether there are braces or not; thus, preformatting the code, making it more readable, before putting it to the site, seems a better idea to me.