Add an article on Docstring

This commit is contained in:
Daisuke Nakahara 2025-05-16 20:33:16 +09:00
parent f1a673970a
commit 777451fc89

14
src/blog/post-3.md Normal file
View file

@ -0,0 +1,14 @@
---
title: 'Why I Write Docstrings'
pubDate: 2025-05-16
author: 'Nakahara Daisuke'
tags: ["programming"]
---
I try to write docstrings as much as possible for two main reasons.
First, they help reviewers understand the roles of functions and classes.
Second, I believe that clear, detailed docstrings can enable AI tools to generate code more effectively.
Although I sometimes make mistakes in my docstrings,
I think that even imperfect documentation is better than none.
Moreover, both reviewers and AI tools can help identify and correct these errors.