Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document psycopg concepts and features in prose #501

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

kpinc
Copy link

@kpinc kpinc commented Jan 29, 2023

Hello,

Add a section to the documentation that introduces psycopg features and vocabulary in narrative prose. Nothing wrong with what's there, which introduces by way of dissecting an example. But sometimes narration gives a better overview. Different people have different learning styles (and "the php way" of documenting by example drives me nuts!)

This patch puts each sentence on a new line, in order to make future patches easier to scan.

Some of the index entries may seem to show up too early in the prose, but I believe that they catch the earliest mention of the indexed terms.

I'm not really familiar with the content of the index, so some of the index entry pairs might be able to be improved.

I have also introduced some new comments into the example code presented in the "Basic Module Usage". There is little that is not explained in the subsequent text, where the code is dissected. But I think it's important, because people don't read. Especially people who look at examples for understanding. I suppose this part could be a separate patch. But some of the narrative I've added explicitly says "go look at the example below", and without some of the new code comments the example appears to contradict the new narrative.

Started looking at documenting how literal strings interact with execute() and wound up writing this instead. (!)

P.S. I don't like the "Transactions management" index entry, or section title. I believe both should be "Transaction management". But that's for somebody else to fix.

@dvarrazzo
Copy link
Member

Hello,

thank you very much, I am a fan of an introductive section.

The fact that you describe it to be "in prose" suggests that the rest of the documentation is written in poetry, which would actually be interesting, but maybe for a future project.

The index is this. It's worth checking that the changes you are making are the effect you want to have. I am not sure it does: I don't think you can add index entries if not on sections titles? It's worth checking before you add material that either doesn't look good or it causes us feeling the need to maintain without actually doing anything.

I haven't read the content you wrote, just skimmed it. I think it has some imprecision and I think it jumps ahead too quickly to advanced topics (e.g. mentioning pipeline mode before mentioning the cursors). I don't have time for a thorough review now: it will give it a proper read later on.

Maybe you can limit the content of your Concepts section to the basic features, and add a sort of "there's more to come" section explaining roughly problems (latency, types adaptation) and act as a teaser jumping to different "prose" sections in other parts of the documentation where you can introduce more concepts and relative features. This page, for instance, is pretty much just the ToC, whereas it could have an introductory section.

In these sections you could go fancy with "warning", "note", "see also" blocks to highlight the "jump board" nature of that section.

Feel free to change transactions -> transaction management if you think it is appropriate (I don't know if English is your primary language. It isn't mine, and it isn't the one of other major contributors, so it's not surprising if you stumble in less than idiomatic sentences every now and then. Or in pieces of poetry, too).

Thank you very much!

@kpinc
Copy link
Author

kpinc commented Jan 29, 2023 via email

@kpinc
Copy link
Author

kpinc commented Jan 30, 2023 via email

@kpinc
Copy link
Author

kpinc commented Jan 30, 2023 via email

@dlax
Copy link
Contributor

dlax commented Jan 31, 2023

Haven't read all changes either (they're big!), but, if we are to rework the documentation structure, I wonder if we shouldn't take inspiration from "well-established" practices, like what's theorized by https://diataxis.fr/ (see projects following this practice, e.g. numpy).

@dvarrazzo
Copy link
Member

@dlax I am not aware of that resource, will read it.

@kpinc will review your changes in the coming days.

Thank you very much!

@kpinc
Copy link
Author

kpinc commented Jan 31, 2023 via email

@kpinc
Copy link
Author

kpinc commented Jan 31, 2023 via email

@pauloxnet
Copy link
Contributor

… if we are to rework the documentation structure, I wonder if we shouldn't take inspiration from "well-established" practices, like what's theorized by https://diataxis.fr/

I can't agree more.
The Daniele Procida's project is excellent and I highly recommend it's workshop
https://youtu.be/710uQqIqsWk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants