Jump to content
Guest

A book about Object Pascal Style Guide

Recommended Posts

I offer help. To author.
My well-thought-out comments. Without reading a book:

  • Format the * .docx file is appalling. If you want it, I will adjust it for you
  • The CONTENTS field is not used. This is a problem with any change. Correction, addition of text. Translation
  • Indentation. The book is also about that. Well, in the examples, it's probably in the mood. I can fix it

At least there would be something useful here:classic_biggrin:

Edited by Stano

Share this post


Link to post
4 hours ago, dummzeuch said:

Don't. Either he will put it back online himself, or he won't. It's his work after all.

Quote

This book is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license.

Why put a CC BY-SA license on it then?

I don't care either way but as far as I can see that troll is out of the box.

  • Like 1

Share this post


Link to post
44 minutes ago, Anders Melander said:

Why put a CC BY-SA license on it then?

I hadn't noticed. In that case it's OK to post it.

  • Like 1

Share this post


Link to post
Guest
1 hour ago, Anders Melander said:

see that troll is out of the box

Well, true. Thankfully there are no blockchains involved. Had it been such, it would be unmutable.

Share this post


Link to post
Guest

As with any literary work, the Moors or not of his conception are the sole responsibility of the author. No matter the reactions caused to your readers.

 

However, in the case of technical literature, it is up to the reviewers to fully approve it... even knowing that science, technically speaking, is not complete, and at some point it may change its preconceived concepts.

 

Darwin say so, it's not. -- did Homo-Sapiens evolve?

 

But when you ask for help, why not do it.

Edited by Guest

Share this post


Link to post
Guest

maybe some critic on duty insensitive to the human aspect (perhaps he is not one), more hindered than helped in the search for an answer.

Thus, it was more intuitive for the alleged author to leave the enclosure, than contract some disaffection.

Edited by Guest

Share this post


Link to post

Hard to say. His book as a whole was highly praised. They discussed one issue here. In my opinion, he could not agree with the opinion presented here. He announced that he had downloaded the book and did not respond. At the same time, everyone just wanted to help him. He wrote that the comment does not resist.
I do not understand that.
I personally offered the book so that the members could help him with professional proofreading. Not me:classic_wacko:
I consider it a great pity:classic_ohmy:

Share this post


Link to post

Please share as it is allowed and even promoted by the license so we can all contribute and make it something worthwhile, all while still crediting the original author who quickly throwed the towel in. Doing thus, he can see we value his contribution. Thanks.

Share this post


Link to post

If I decide to put it here, I'll adjust the formatting first. This will take some time.

Share this post


Link to post
2 hours ago, Rinzwind said:

Please share as it is allowed and even promoted by the license so we can all contribute and make it something worthwhile, all while still crediting the original author who quickly throwed the towel in. Doing thus, he can see we value his contribution. Thanks.

Collaboration requires somebody to coordinate it, which in this case would need to be the author. 

  • Like 1

Share this post


Link to post
10 minutes ago, David Heffernan said:

Collaboration requires somebody to coordinate it

A wiki wouldn't require a coordinator once it's set up but it would still need somebody to rule in case of conflicts and since people doesn't agree on style (which is why a style guide is needed in the first place) I don't see a happy outcome of that.

  • Like 2

Share this post


Link to post
9 hours ago, Stéphane Wierzbicki said:

My first impression after opening the document: that's impressive, looks like the author spent a lot of time on it.

Indeed, good reading stuff!

Share this post


Link to post

Very impressive that a full book can be written on this topic!

It was quite easy to read, although could use some more incorrect vs correct examples, some points could be easier demonstrated like this and not trying to explain with text. All in all not boring book, considering the boring topic.

 

But the examples just reconfirmed how awful F, L and A prefixes look. I use f, v (local vars) and x (unit vars)  and a.

On 2/19/2022 at 12:59 PM, Dany Marmur said:

function Name(const AArgument: TType); // Ouch!

function Name(const aArgument: TType); // Yeah!!!

I agree with this 100%.

 

It was a bit confusing to read that L prefix for local variables is encouraged, and not a guide: "The “L” prefix is encouraged for local variables in case identical names would conflict or shadow identifiers of parameters, variables, fields, or property names."

 

When a style guide is encouraged to be used, it's not a guide but a free-for-all.

 

Too bad he left and deleted the account. I would buy the book, if it was sold.

 

Share this post


Link to post
37 minutes ago, Mike Torrettinni said:

I would buy the book, if it was sold.

I'll be happy to sell you a copy.

  • Haha 2

Share this post


Link to post
7 minutes ago, Anders Melander said:

I'll be happy to sell you a copy.

Well, just don't buy it in the first place. There's always a preview of some sort so you know what you are buying.

 

If I were you, I wouldn't worry too much about it, I doubt he will finalize it to sell it. If our ghost buster got under his skin, he probably can't stomach the English proofreading, anyway.

Share this post


Link to post
On 2/19/2022 at 11:59 AM, Dany Marmur said:

function Name(const AArgument: TType); // Ouch!

function Name(const aArgument: TType); // Yeah!!!

 

 

Argument prefixed with vowel should be An if following an English style guide.

I would use argArgument here.  Since argument is 3 syllable word passing

3 syllable argument names help readability when procedure variables are not 3 syllable.

 

L prefix or scoping would be used to avoid other similar named properties in UI. Like Width or Enabled.   

Otherwise, L is not needed when arguments are prefixed with 'a' IMHO. 

 

Short variable names. Longer Names
input a,b,c.  Either preface with 'in', arguments allready done with arg.

iterator i,j,k  Cap per current style.

graphic w,h  scope with Rect

output should be x,y,z; preface with 'out'.

 

 

 

 

  

 

Edited by Pat Foley
added text

Share this post


Link to post
Guest

like said "Linus" for Hungarian Notation and similars

  • Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged — the compiler knows the types anyway and can check those, and it only confuses the programmer.

Note: He's boring, but like all boring, best left aside.

 

I think that is valid for many others notation that rule programmers when writing code!

Of course, in a team, it's very important have a "pattern", else, the "Tower of Babel" will be re-launched from the ashes.

now, if you live in a "bubble" you can blow it without fear of seeing it pop right away... keep blowing and another one will appear soon.

 

Share this post


Link to post

Here is a modified version of docx. I didn't do anything with the content. Only with formatting.
It was totally broken. If you use it, you do not change the styles used in any way. You break the whole document.
This file can be found if you would like to do the translation. I did the translation into Slovak. I just haven't checked it yet.
Unfortunately, I did the formatting twice. First for Slovak and then the original:classic_wacko:

Object Pascal Style Guide - Developers Guide EN.docx

Share this post


Link to post
3 hours ago, Pat Foley said:

Argument prefixed with vowel should be An if following an English style guide.

And that is manifestly not the purpose here.

Share this post


Link to post

I still think that the "A" prefix looks bad. I prefer to use "_", which luckily I can get away with, because I'm the lead developer in our company.

I'm also with some others here who think that the upper case prefixes, "F" in particular, reduce readability so a lower case "f" should be used instead (but I don't put that into practice).

 

But somehow this feels like an age old discussion, that has been abandoned without a result many times only to start again when an opportunity comes up. And I'm really tired of discussing these non-problems.

  • Thanks 1

Share this post


Link to post
1 hour ago, dummzeuch said:

I still think that the "A" prefix looks bad. I prefer to use "_", which luckily I can get away with, because I'm the lead developer in our company.

I'm also with some others here who think that the upper case prefixes, "F" in particular, reduce readability so a lower case "f" should be used instead (but I don't put that into practice).

 

But somehow this feels like an age old discussion, that has been abandoned without a result many times only to start again when an opportunity comes up. And I'm really tired of discussing these non-problems. 

I'm so used to using a prefix "_", that I need many time now to read code with other prefixes (for example "a"). In this situation, i don't need to analyze whether the "a" prefix is part of the variable, i.e. I recognize the variables faster. IMHO.

I find the "_" prefix to be an excellent solution! 👍 

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×