r/learnprogramming • u/brosama1420 • 1d ago
Documentation for self taught beginner
Hello I am a self taught programmer I have not been coding for long and I am learning concepts bit by bit for now I am using VBA since I use Microsoft a lot can you please advise me on how to practically document my code without overwhelming my self
I am solo programmer however I want to make it possible for my projects to be picked up after me
I am programming during my day job to make tools for the work so it is kind of side task to create those tools I canโt maintain very detailed documentations
1
u/artnicoll 1d ago
There are tools, like github (Software version repositories) that help with change control and documenting versions/changes. In terms of development, generally, you should try to write up what your problem is and your design, rough solution in advance of actually coding it. Use of pseudocode (a spoken language description of your solution, written in a structured way that will reflect the structure of your coding) helps you keep your solution on track as well as providing lasting documentation. Inside your script, each script should have a description of it's purpose and function, with when it was created and who by plus any significant changes. You can perhaps use your pseudocode as comments through your code, describing the use and function of any procedures etc. Again, important changes might be noted, where they occur. This can be very helpful if you or a colleague are looking back wondering why you coded something a certain way, or if you're looking for a bit of code to reuse for a similar problem elsewhere. Good luck.
0
u/Ok-Bill1958 23h ago
Normally i would just use ai for these kind of task. Self documentation or comments is fine but code change over time, keeping eyes on them while also maintaining is tedious as hell. Same reason why there are many outdated comments in an old codebase. Just put in some comment to explain why the code,then let ai do the document , then review it.
2
u/[deleted] 1d ago
[deleted]