News for hackers. Stuff that matters.
Re:The PostgreSQL Documentation and the Limitations of Commu... by kaycebasques on Thursday June 15, 2023 @12:41PM (#36343163)
Here's my perspective. I've been a technical writer for ~10 years. 3 at an IoT startup, 7 at Google.

> The strengths of this process are also its weaknesses. A developer is, by definition, someone who spends the majority of their time doing development, which is to say writing code. Updating the documentation becomes a task that must be completed so that the code one has written can get committed so that one can move on to the next project and write some more code. If a change to the documentation would be beneficial but is unrelated to any particular patch, it's not likely to get done.

I may be misinterpreting, but I get the sense that the author feels that there is some kind of more optimal way to split up docs duties. IMO there is not. As the author said, the people implementing the code are in the best position to keep the reference information up-to-date.

I do think it's worthwhile to invest in the tools that reduce friction of keeping the reference info correct. I.e. auto-generating API references from code comments with Doxygen, docstrings, and so on. We are slowly migrating all of the Pigweed [1] references onto Doxygen with a Small CLs approach [2] and it is going great.

If I grokked the rest of the article correctly, the author is essentially saying that the engineers have trouble writing and maintaining the other main types of docs [3] --- guides, tutorials, and overviews (explanations). It also sounds like they are having a "too many cooks in the kitchen" problem with pushing through changes to the other docs. I have a simple answer to that: hire some strong technical writers and make it clear to everyone that they are Responsible and Accountable [4] for those docs. Also, make it explicit that the implementers are a Consulted role when it comes to guides/tutorials/overviews.

[1] https://pigweed.dev

[2] https://google.github.io/eng-practices/review/developer/smal...

[3] https://diataxis.fr

[4] https://en.m.wikipedia.org/wiki/Responsibility_assignment_ma...

Re:The PostgreSQL Documentation and the Limitations of Commu... by btilly on Thursday June 15, 2023 @01:19PM (#36343738)
Just curious. Where do you think that an open source project like PostgreSQL gets a budget to hire anyone? Let alone to dictate a new line of authority to the volunteers who are already maintaining it?

And don't forget that there are valuable volunteers who are likely to go elsewhere if too many new rules are added that they don't want to live with.

Re:The PostgreSQL Documentation and the Limitations of Commu... by kaycebasques on Thursday June 15, 2023 @01:28PM (#36343864)
Open Web Docs is a potential model to draw inspiration from regarding funding: https://openwebdocs.org

Presumably, PostgreSQL has leaders who are responsible for steering the ship. If the project is going to succeed long-term, those leaders have to find ways to keep their contributors happy while also creating an organizational structure that leads to good docs. Easier said than done, I know, but it really is as simple as that.

Sorry if any of my comments came off naive or obtuse when it comes to open source dynamics. But the reality is that you need good docs, and I'm just trying to give an honest assessment from my experience of the conditions that lead to good docs.

Re:The PostgreSQL Documentation and the Limitations of Commu... by btilly on Thursday June 15, 2023 @01:53PM (#36344200)
Sorry if any of my comments came off naive or obtuse when it comes to open source dynamics.

If you want that apology to be meaningful, you should learn something.

When you're talking about a highly successful open source project that has been going for more than 3 decades, it is beyond ludicrous for you to say, "If the project is going to succeed long-term..." It already has succeeded long-term. And you would be better off figuring out why it works rather than lecturing about how it must work.

When you talk about "a potential model to draw from" for funding, please note that I've been involved with open source for about a quarter of a century. I've seen a LOT of funding models attempted. Mostly they run into one big problem. And that problem is that adding funding creates bruised egos because people say, "Why is he getting paid when I'm not?"

The one funding model that DOESN'T have this problem is when a company decides to pay its employees to work on features that it wants in the project. Now there are no bruised egos - the money comes from the company and it is clear why one person gets paid while another does not. There are still challenges with this model - employees are under pressure to get their contributions accepted whether or not the project likes them - but we've learned how to navigate those.

But now we're left back where we started. Companies who hire core developers don't generally need comprehensive documentation - they build internal documentation straight for their use case. So comprehensive external documentation is hard to find. Sometimes you'll wind up with things like an excellent introductory tutorial like https://docs.python.org/3/tutorial/. Usually, you don't. And generally it is hard to simply pay someone to take care of it for you.

Re:The PostgreSQL Documentation and the Limitations of Commu... by kaycebasques on Thursday June 15, 2023 @02:53PM (#36344973)
> When you're talking about a highly successful open source project that has been going for more than 3 decades, it is beyond ludicrous for you to say, "If the project is going to succeed long-term..." It already has succeeded long-term.

Yes, your reaction here totally makes sense. Feedback acknowledged.

> If you want that apology to be meaningful, you should learn something.

I have re-read my earlier comments and I feel that you are being more hostile to me than is justified. I do not think you are adhering to HN's code of conduct guidelines for comments: https://news.ycombinator.com/newsguidelines.html#comments

> you would be better off figuring out why it works rather than lecturing about how it must work

This doesn't seem fair. The original post is about the limitations of the PostgreSQL docs. Docs have been the focus of my career for 10 years. I have experienced and analyzed docs problems in many contexts: small orgs, large orgs, open source, closed source. I made an on-topic comment about ways to resolve the problems that the PostgreSQL docs are facing. Is it the only solution? Of course not. But I totally have relevant experience in this domain and, just like you have a good idea about what generally works and doesn't work regarding open source funding, I have a pretty good idea about what generally works for creating the conditions that lead to good docs.

> So comprehensive external documentation is hard to find.

Again, I think the web platform space is relevant here. Web platform documentation could easily devolve into a tragedy of the commons situation. Yet MDN does exist and is an amazing resource.

Paragraphs 4 to 6 of your last comment seem to be arguing that hiring TWs is not an option for PostgreSQL. That is totally understandable. On another day maybe we would have arrived at that understanding on friendly terms and would have had a constructive conversation about how to create good docs when hiring TWs is not possible. But it's clear that my ideas aren't welcome here so I'll just stop now.

Re:The PostgreSQL Documentation and the Limitations of Commu... by wrs on Thursday June 15, 2023 @03:33PM (#36345371)
If someone gets weirdly hostile and condescending towards you on HN (sadly not uncommon), I recommend that you try to just ignore them and keep contributing. I’d like to hear what you have to say.
Re:The PostgreSQL Documentation and the Limitations of Commu... by burnished on Thursday June 15, 2023 @08:28PM (#36349159)
Hey, I enjoyed your comments and appreciated your experienced view.

And, that person is being overtly hostile - I can only describe their behavior as making shit up in order to justify picking a fight and talking down to you.

I don't think you should take anything they say to heart - flag and move on at this point.

Re:The PostgreSQL Documentation and the Limitations of Commu... by minorninth on Thursday June 15, 2023 @02:30PM (#36344667)
PostgreSQL, like many other open-source projects, has sponsors and accepts donations. Here's their sponsors page:

https://www.postgresql.org/about/sponsors/

Also, I think it's important to note that a lot of contributors aren't volunteering their "free time", they're being paid by some other employer to contribute to PostgreSQL as part of their job:

https://www.enterprisedb.com/blog/importance-of-giving-back-...

Re:The PostgreSQL Documentation and the Limitations of Commu... by btilly on Thursday June 15, 2023 @06:38PM (#36347710)
If you read https://www.postgresql.org/about/policies/sponsorship/ you'll find that the list of sponsors is essentially a recognition for companies paying their employees to contribute to PostgreSQL.

It isn't for contributing into a pot of money allowing some central PostgreSQL committee to hand out money for other things, like hiring people to do documentation.

Re:The PostgreSQL Documentation and the Limitations of Commu... by justinclift on Saturday June 17, 2023 @05:12AM (#36368576)
> Where do you think that an open source project like PostgreSQL gets a budget to hire anyone?

From rough memory of an informal discussion with one of the members involved in the PG sponsorship area a while back, they had something like several hundred thousand US$ sitting around mostly unused.

The real problem is proposing something like this, and getting it okay-d. Seems like a tough (political) challenge.

Re:The PostgreSQL Documentation and the Limitations of Commu... by laurenz_albe on Friday June 23, 2023 @03:57AM (#36444060)
PostgreSQL itself doesn't hire anyone. The trade mark is owned by the "PostgreSQL Community Association of Canada" (https://www.postgres.ca/), which does not hire people or engage in commercial activity. It's just there to protect the name.

There is a PostgreSQL core team (https://www.postgresql.org/developer/core/) that is a kind of steering committee, but does not make decisions concerning development. It consists of people from different companies.

The people who develop PostgreSQL are mostly hired by companies that have a commercial interest in the database and usually sell consulting, support, training, products that need PostgreSQL and customized closed-source forks of the database software.

There is no single authority in the PostgreSQL project. Decisions are made in mailing list discussions, cumbersome as that may be. The ultimate authority over the code is wielded by the committers (https://wiki.postgresql.org/wiki/Committers), which are highly trusted core developers who work for different companies. Development is slower than it might be with a single central authority, but that also part of the reason for the high software quality that PostgreSQL is known for.

Re:The PostgreSQL Documentation and the Limitations of Commu... by kaycebasques on Thursday June 15, 2023 @03:43PM (#36345468)
Just re-read the last two paragraphs from Haas. I have a couple further comments / questions.

Quote from Haas:

> But if on the other hand I propose some change to documentation that has existed for a long time, or some kind of structural change, there's a lot more room for disagreement. Because the change isn't strictly mechanical, the right answer is a lot more subjective. And because it's a change to existing content rather than the addition of new content, many more people will be familiar with it and have opinions on how it ought to be changed, if at all. Consequently, even when some developer does take time away from writing code to try to make some larger change to the documentation, it's often an uphill battle to get anything done, and people typically have to be content with small improvements.

Honest question: do PostgreSQL engineering decisions have the same dynamics as what's described here for docs decisions? If not, what is different about engineering decisions versus docs decisions? Is it just that engineering decisions can be literally benchmarked whereas docs decisions do not seem benchmark-able? Are there any other potential explanations for different dynamics between eng and docs?

If it does indeed just boil down to "docs are not benchmarkable" then I would suggest otherwise. You can create docs benchmarks. They won't have the rigor of engineering benchmarks but they at least establish some notion of docs quality and facilitate more targeted discussions during docs reviews. E.g. when there's a disagreement between an author and reviewer the author can say, "what docs benchmarks am I not following here?" The power of that kind of interaction is that you often do realize that the docs benchmarks are incomplete and some new dimension needs to be added to them. Or do the PostgreSQL contributor docs already have some guidelines along the lines of a "content quality checklist" and it's still not working?

A rigorous effort to survey the PostgreSQL community and get a deep sense of what the overall community considers "high-quality docs" can itself be a super insightful experience. Different developer communities often need / want a different focus in the docs. That can be the foundation for a fairly authoritative docs quality checklist.

Another thing that I'm very interested in, and will need to think through deeply some other day, is this notion that once you publish a doc, you can't touch it. It happens all the time and it's really weird.

Re:The PostgreSQL Documentation and the Limitations of Commu... by actuallyalys on Thursday June 15, 2023 @05:48PM (#36347047)
As someone who’s been both a software developer and a technical writer, I agree that a lot of these problems seem best suited for a technical writer. The expertise with creating different types of documents is valuable, of course, but there’s another benefit: The organization committing resources in the form of making it someone’s entire responsibility.

While I think updating reference documents lends itself to subject matter experts (especially in a project where this approach is already successful), I think structuring them can be separated and given to a technical writer with more technical expertise or a developer with more documentation expertise.

Re:The PostgreSQL Documentation and the Limitations of Commu... by tetha on Thursday June 15, 2023 @06:07PM (#36347307)
We're seeing similar things at work as the postgres documentation has.

We in infra-ops can give you more details about how our database clusters are designed for resilience, security, safety than you want on more levels than most people in the company know exist. We also have reasoning for all of this available. This is really good to have for customer question sets during sales.

However, this doesn't tell a developer how to connect his spring boot thingy to it, and how to connect and manage his service well. In fact, 80 - 90% or more of the things we know about our database are not relevant to a simple small-scale application running queries on it. And quite a lot of the issues you can have with running your application on a rock-solid database are entirely not relevant at a DBA level. Like, the database doesn't care if your DDL modification is backwards compatible.

And that's something we're currently learning together with a foundation team at work. They are documenting on how to use it well from their side, we're learning about easy mistakes to make and document those, and help with the actionable documentation. And in hard cases we kinda have to talk what's the plan, because it's usually not smart from a DBAs perspective.

Re:The PostgreSQL Documentation and the Limitations of Commu... by nightpool on Thursday June 15, 2023 @07:55PM (#36348814)
How many small/new services do you have, and how many developers / teams do you have? If most of your developers are working on "small-scale applications running queries", aren't you just spending a lot of developer time on repeating the same work over and over again?
Re:The PostgreSQL Documentation and the Limitations of Commu... by burnished on Thursday June 15, 2023 @08:21PM (#36349098)
Reusable components and code generation covers this pretty well.
Re:The PostgreSQL Documentation and the Limitations of Commu... by nightpool on Thursday June 15, 2023 @08:33PM (#36349205)
"However, this doesn't tell a developer how to connect his spring boot thingy to it, and how to connect and manage his service well" indicates that it does not
Re:The PostgreSQL Documentation and the Limitations of Commu... by burnished on Thursday June 15, 2023 @08:46PM (#36349312)
Oh, pardon me, I was answering that as a question on its own - I should have made that clear.
Re:The PostgreSQL Documentation and the Limitations of Commu... by tetha on Friday June 16, 2023 @04:57AM (#36353533)
20 - 30 development teams deploying 100 - 150 services in usually multiple stages. About half or a little more are rather new.

And we have different angles of approach here. For example, we from infra-ops have setup a bunch of reusable and versioned template modules. These modules encapsulate all of the gritty consul/nomad/certificate handling and someone actually using our databases mostly needs to supply the module with the necessary environment variables their application needs. This in turn has been extended by a bunch of these teams to provide preset templates for spring boot, .Net, python, libpq so most applications just need to configure "I'm springdev and need to go to this database".

And currently another team is looking at building our own spring boot seeds, and/or using tools like cookiecutter or backstage to provide skeleton templates including most necessary boilerplate. We've started to maintain a template nomad job for simple applications as well.

With these things maturing, getting a simple service stood up can be done fairly rapidly if you know what you're doing. Setup the skeleton, throw out a couple of things you don't need, be done in an hour or so.

This however doesn't solve the initial problem. It's still tricky to know how to approach this stack and it takes time to either teach people how to approach this stack, or to condense all of this into simple how-to documents and/or workflows to get systems going.

Re:The PostgreSQL Documentation and the Limitations of Commu... by _sharp on Thursday June 15, 2023 @08:30PM (#36349174)
Our team recently adopted the Diataxis framework, I guess. We followed this guide:

https://documentation.divio.com/

We've been referring to it as the Divio system though, which appears to be the same thing.

Re:The PostgreSQL Documentation and the Limitations of Commu... by BSEdlMMldESB on Thursday June 15, 2023 @09:07PM (#36349517)
we need to develop the techniques (and then the tooling) so that the source code is sufficient to reconstruct the documentation.

LLMs are fit for this use. I think they could get trained on assembly language.

further, I think that at this point, the whole x86 spec is as impossible to analyze 'rationally' as any natural language. funny that it was created by dozens upon dozens of engineers in a rigorous and formal way; and the result is now mega complex. but I digress...

my point is to reconsider x86 spec as a 'natural' language which is the common "tongue" between software and PC hardware.

but by this point there's no expectation that a modern intel cpu is implementing the instructions in the way they were first created. it may well be emulating the x86 spec to the best of its capacity (another computer program "written" in 'microcode', a x86 virtual machine); so when thinking about x86 assembly spec as a language, the software computer is talking to the hardware computer; and if they agree the computer works. (so the socket and motherboard's buses can be understood as network devices xP )

finally, if I can come up with this (LLMs trained on assembly) so can any security researcher from any advanced academy or corporation.... meaning security researches NOT using LLMs like this ones I imagined are not doing their jobs correctly.