Document-This
One problem that I encountered (as all new coders do), is documenting my work. Initially, I would write a rough pseudocode on paper, and implement it. Naively, I would forget to actually document it, and assumed that I would remember what I did for eternity.
Of course, we all know what happened.
In this context, a quote commonly attributed to Bill Gates comes to my mind: “I will always choose a lazy person to do a difficult job because a lazy person will find an easy way to do it.”
I ended up writing a python script to help me write the documentation for any code.
(Of course, this should not be used as formal documentation, but rather a template to summarize what you all did - It’s much easier editing than it is to write something from scratch)
Aim:
It is an ambitious script which gives a template of your python code for easier documentation.
The document aims to print all your comments and also tell you where (line number) you have used For/While loops, Try/Except/Else statement blocks, If/Elif/Else statement blocks, where you have called which function etc.
Progress:
- Detected comments and unassigned multiline strings (used as multiline comments)
- Detected For/While Loops
- Detected If/Elif/Else Blocks
- Detected Try/Except/Else Blocks
- Detected defining a function
- Detected calling a self-defined function
Technology Used:
- Python