bmx-ng / brl.mod

BlitzMax Runtime Libraries, for BlitzMax NG.
12 stars 11 forks source link

Improve documentation #83

Open woollybah opened 5 years ago

woollybah commented 5 years ago

Some of the modules could do with better documentation, especially examples to help understand general usage better.

Here's is a list of modules and what we feel are required still. They will be checked off as the work is done. Feel free to suggest more, which we can add to the list. Help is also welcome ;-)

Note that documentation and examples are provided in the following ways :

BRL.Audio

BRL.Bank

BRL.Blitz

BRL.Clipboard

BRL.Json

BRL.LinkedList

BRL.Matrix

BRL.Quaternion

BRL.StringBuilder - @woollybah

BRL.Stream

BRL.Vector

BRL.Volumes

BRL.XML

HurryStarfish commented 5 years ago

BRL.Blitz contains a lot of code examples, especially for all the keywords. Unfortunately, a lot of them are badly out of date, containing non-strict code, inaccurate information, poor formatting etc. These need a rework at some point.

woollybah commented 5 years ago

We should also have a "See Also" section at the foot of each intro.bbdoc, referring to other related modules/types.

GWRon commented 5 years ago

So it needs an automated way to reference stuff. Within bbdoc maybe add "seealso:" or even more stuff to cross-"promote" other features.

PS: check your spam folder ;-)

woollybah commented 5 years ago

I'm happy to accept PR's for documentation/examples. It is not one of my favourite chores...

GWRon commented 5 years ago

Would you mind rendering a list of todo modules so we could collaboratively work along this list?

woollybah commented 5 years ago

There's a reasonably long list in the initial issue post. I can put names next to modules once someone volunteers to work on one.

For the "geometry" modules (vector, matrix and quaternion), it would be nice if the intro.bbdoc was also an introduction to the subject, maybe with diagrams too. This would lead nicely into specific examples within the structs themselves.

GWRon commented 5 years ago

So you think it is necessary to explain vectors, matrices and so on (in detail)? Think we should not play Wikipedia and instead link to that there (aside to some basic explanation).

Same goes for the whole addition, dot product... I say this as it is a lot of effort to create diagrams, write (useful) texts ... for something people might just skip.

Or are you talking about something different in the "intro"?

GWRon commented 5 years ago

BRL.LinkedList

  • [ ] Add more function examples.
  • [ ] Add TList examples.

What is meant with "function examples" - compared to "TList examples". The one is giving examples for specific functions/methods of TList - and the other.... generic examples on when to use TLists or what to use them for?

GWRon commented 5 years ago

Also: should we try to use the "procedural" or the "OOP" interface?

I mean:

PauseChannel(myChannel)
ResumeChannel(myChannel)
'vs
myChannel.SetPaused(true)
myChannel.SetPaused(false)
GWRon commented 5 years ago

The above question is still open. Just thought about starting with something simple: TList but there is ListAddLast() and list.AddLast() which we can use.

For stringbuilder.mod you / @woollybah gave examples for the "OOP interface" (sb.Append()).

Which way should we prefer to go? Or provide the same example for both commands (if there is a procedural one) ?

GWRon commented 5 years ago

Added a PR - decided to write both: procedural and oop-eque doc/examples

GWRon commented 5 years ago

When writing documentation and there are missing "procedural functions" I try to add them - like in the latest PR.

GWRon commented 5 years ago

Add more TChannel examples. Hmm.... there are examples ... what exactly do you mean with "more". Suggestions?

GWRon commented 4 years ago

wrote the xml-doc part 7 months ago but it was not added yet -- will link it here, so it is not forgotten: https://gist.github.com/GWRon/609279d762f36472e33625d6eabb8cd4