Participation-Programming
rail
Portfolio
Ian Fisher
I recently adopted a new software development method:
- Everyone goes to a C file.
- The new code is set at the end of the file.
- The existing code cannot be edited.
I call it Participation-Programming.
The appointment of the program has a great deal. It presses you to explain your interfaces before your implements. It encourages you to write smaller tasks. And it produces the source code to read, because the program’s text read your train in mind – a class of consciousness Practice reading.
Don’t make a mistake: just the programming programming is not the most forgiving paradigm. If a subproceo found error, a corrected version should be set, and all its callers should also be corrected. In bad cases, the whole program may need to be reacts. Thus advised the programmer to get it for the first time.
Instead of using a custom text editor, I prefer simply cat >> main.c
that ensures that the rules (2) and (3) are strictly observed. In fact, a couple of aliases, I never need to leave the shell At all:
alias edit='cat >> main.c'
alias show='less main.c'
alias check='gcc -Wall -c main.c'
alias build='gcc -Wall main.c'
alias checkpoint='git add main.c && git commit -m "."'
alias revert='git restore main.c'
In all seriousness, only the appointment is a pleasant challenge, not a legitimate way of writing software. I am writing a Little LISP translator in a single one another one is a waste of time I have to type eval_string
.
My original idea is that, because Capts-Adject-AdVAction Types and functions, you can write an add program: Start by verification of main
Function in terms of high-level helper helper function, then write assistant functions in terms of lower level levels. This is a reasonable approach, and one I used to practice regularly.
Of course, the real coding rarely keeps smooth, and you will always discover, in the middle of writing your level with level, that the harassment is just – the intensification. Even more difficult is to resolve code without working. This is not a more compelling use of my time to type a full function to add print
statements.
Only rule is programming a noble experiment, but may not be a fruitful change. If this post inspires you to test it yourself, I recommend a couple who preserves the Spirit while simplifying some monotonous parts:
- Splitting a
main.h
The header file, to add you statements and imports independent of definitions. - Your program is part of a file for each function, and allow yourself to overwrite files.
For those you feel more enthusiastic, can I suggest blogging? Or is that Twitter? ∎
2025-02-18 11:38:00