alexofrhodes / VBA-VBIDE-Extensibility

extending the VBIDE and its objects
4 stars 3 forks source link

Needs better procedure-level documentation #1

Open sancarn opened 11 months ago

sancarn commented 11 months ago

Awesome work on this library btw! The only problem is most of the functions... I have no idea what they do! 😛

You should absolutely work on your documentation though, many of these functions I have no idea what they do. I personally use in-code comments for instance:

'Create `stdCOM` objects from existing objects in the RunningObjectTable (ROT)
'@constructor
'@returns - A collection of `stdCOM` objects
'@remark This function is heavily inspired off code provided by `Jaafar Tribak`
'@devRemark stdCOM objects will auto-release when not needed
Public Function CreateFromActiveObjects() As Collection

I can then generate documentation from these comments :) See here:

I imagine you could do a lot better with your library, rather than my bodged together regex though xD I personally wanted something that would work automatically in a github action though :)

alexofrhodes commented 11 months ago

Hi sancarn, thank you very much for your feedback! Will work on it.

On my part, I'm not always sure how or why the functions work that way 😅

Your std library is really rich and solid. It would be lot of work to switch to it for existing projects, but all new projects would benefit to start with it.

For documentation I use this changelog manager, although I have to admit I tend to forget to mark my modifications. I think i have an update to push on it.

https://youtu.be/UUaMCb_TT3g

It can also extract the enums, types, constants, dims, declarations that I saw you marked as TODO in your vbcodegen. Regex would do well here. The fact yours runs automatically is a great point, will look into it.

I'm on holidays right now, so all work is postponed.

I wish you a happy new year!

sancarn commented 11 months ago

Your std library is really rich and solid. It would be lot of work to switch to it

Ah don't get me wrong, I wasn't suggesting a switch. There are a huge number of classes/modules/functions in your library. That would be a mammoth task.

I was only suggesting you add a description to your function definitions like:

'Property points to the user's active selection
Public Property Get Active() as Whatever
  '...
End Property

Of course it would be nice if these were added into your change manager docs too! :)

Regex would do well here.

Indeed, that's what I'm using :)

The fact yours runs automatically is a great point, will look into it.

To be fair, it doesn't yet xD I need to get around to working out how github actions work. But afterwards it will be able to run on every git-push which is nice :)

ChangeManager

It is interesting, usually I would use github integration for versioning, but I do like how this is all offline and entirely within VBA environment - good for corporate! :).

I wish you a happy new year!

And to you!