You are viewing a single thread.
View all comments View context
5 points

Documentation should be generated from code imo

permalink
report
parent
reply
5 points

Code should be generated from documentation generated from code

permalink
report
parent
reply
2 points

@key @verstra documentation should be generated from neuro-waves, generated from a brainstorm.

permalink
report
parent
reply
5 points

If the doco we’re talking about is specifically an API reference, then the documentation should be written first. Generate code stubs (can be as little as an interface, or include some basic actual code such as validating required properties are included, if you can get that code working purely with a generated template). Then write your actual functional implementation implementing those stubs.

That way you can regenerate when you change the doco without overriding your implementation, but you are still forced to think about the user (as in the programmer implementing your API) experience first and foremost, rather than the often more haphazard result you can get if you write code first.

For example, if writing a web API, write documentation in something like OpenAPI and generate stubs using Swagger.

permalink
report
parent
reply
4 points

Same for drivers. Generate headers from documentation and distribute it you fucking morons

permalink
report
parent
reply
3 points

Yup absolutely. I mentioned web APIs because that’s what I’ve got the most experience with, but .h files, class library public interfaces, and any other time users who are not the implementor of the functionality might want to call it, the code they’ll be interacting with should be tailored to be good to interact with.

permalink
report
parent
reply
3 points

This means war

permalink
report
parent
reply
5 points

Could be .jar too.

permalink
report
parent
reply
5 points

Just run both in a loop until it reaches a state of equilibrium.

permalink
report
parent
reply
1 point

Or use LLM to generate the doc from all sources you have. Foolproof 100%

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.1K

    Monthly active users

  • 1.8K

    Posts

  • 30K

    Comments