Ian Fisher's New Methodology: Adopted a new software development methodology - append-only programming.
- Rules: Everything in a single C file, new code appended at the end, and existing code not editable.
- Benefits: Forces interface definition before implementation, encourages small functions, and produces readable source code.
- Drawbacks: Not the most forgiving. If a subprocedure is wrong, a corrected version must be appended and callers corrected. In some cases, the entire program may need to be retyped.
- Preferred Editing Method: Use
cat >> main.c
in the shell instead of a conventional text editor. Set up aliases likeedit
,show
,check
,build
,checkpoint
, andrevert
. - Original Idea: Use C's forward-declaration to write a program incrementally, starting with
main
function in terms of high-level helpers and working down. - Practical Challenges: Real coding doesn't proceed smoothly. Discovering the need to revise high-level functions while writing low-level ones is difficult. Troubleshooting is also challenging, and re-typing an entire function just to add
print
statements is not efficient. - Recommendations: Split out a
main.h
header file for independent declaration and import appending. Split the program into one file per function and allow overwriting files. - Append-only Blogging Suggestion: For those feeling adventurous, consider append-only blogging (similar to Twitter).
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。