This entry was posted on Thursday, January 24th, 2008 at 11:01 am and is filed under Delphi, News/Blog. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
I’ve seen many discussions about coding style, of course I have my own style but whenever I join new company I have to use their style.
It never was a problem for me until recently, I just can’t get used to it. here’s little sample:
if ( (not FUsePrinter)
or ( (FUsePrinter)
and (dlgPrint.Execute)
)
) then
begin
also they put blank line before any keyword (for, while, begin, if, case…)
moreover they use:
if … then
begin
…
end
else
begin
…
end;
everytime even with single line between begin/end.
seems you’re not used to forums, eh? 🙂 you can use BBCode for text formatting 😉 like the "code" code.
like this:
[code:1:1329c576dc]
if ( (not FUsePrinter)
or ( (FUsePrinter)
and (dlgPrint.Execute)
)
) then
begin
[/code:1:1329c576dc]
also they put blank line before any keyword (for, while, begin, if, case…)
moreover they use:
[code:1:1329c576dc]
if … then
begin
…
end
else
begin
…
end;
[/code:1:1329c576dc]
and yes, there are a lot of styles out there which are just plain … let’s say ugly 😀
as far as I’m concerned coding style may be ugly as long as I can easily read without wondering what going on:)
putting blank lines is another stupidty, I wrote some procedure which was 8 or 9 lines but after aplying their rules it doesn’t fit on screen.
Nightmare!
hmm formating of this if condition got scrambled, but it’s really hard to understand when you see it
I’ve seen many discussions about coding style, of course I have my own style but whenever I join new company I have to use their style.
It never was a problem for me until recently, I just can’t get used to it. here’s little sample:
if ( (not FUsePrinter)
or ( (FUsePrinter)
and (dlgPrint.Execute)
)
) then
begin
also they put blank line before any keyword (for, while, begin, if, case…)
moreover they use:
if … then
begin
…
end
else
begin
…
end;
everytime even with single line between begin/end.
I gouess I’ll pass this article to my manager:)
seems you’re not used to forums, eh? 🙂 you can use BBCode for text formatting 😉 like the "code" code.
like this:
[code:1:1329c576dc]
if ( (not FUsePrinter)
or ( (FUsePrinter)
and (dlgPrint.Execute)
)
) then
begin
[/code:1:1329c576dc]
also they put blank line before any keyword (for, while, begin, if, case…)
moreover they use:
[code:1:1329c576dc]
if … then
begin
…
end
else
begin
…
end;
[/code:1:1329c576dc]
and yes, there are a lot of styles out there which are just plain … let’s say ugly 😀
heh yeah that’s true I’m not used to forums:)
as far as I’m concerned coding style may be ugly as long as I can easily read without wondering what going on:)
putting blank lines is another stupidty, I wrote some procedure which was 8 or 9 lines but after aplying their rules it doesn’t fit on screen.
Nightmare!
here’s another good link: http://www.econos.de/delphi/cs.html