| Deutsch English Français Italiano |
|
<yga7c6gr750.fsf@akutech.de> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ralf Fassel <ralfixx@gmx.de> Newsgroups: comp.lang.tcl Subject: Re: Should I write building blocks? Date: Mon, 27 Jan 2025 09:30:19 +0100 Lines: 24 Message-ID: <yga7c6gr750.fsf@akutech.de> References: <20250124203441.7a1b1c34@lud1.home> <vn1cia$2fopb$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net yFiXnN4K2BTZaiV7JewT3QDSSIbQp9PNG93CwgGDIM7joGS0Q= Cancel-Lock: sha1:LZQGwVa3nLn4re09XAvZgxQj4PY= sha1:9HSZbDj16nlp5saOslQr0bDLVwE= sha256:f6ffD+uxpTatu1TXTA702dyDRpJWVBYG2j6aksk0fOI= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) * Tim Wallace <tp_wallace@yahoo.com> | On 1/24/25 18:34, Luc wrote: | > On top of my personal problems, the long periods of inactivity make | > me very unfamiliar with my own code. Picking up where I left off is | > hard. I have to read everything again and make heads and tails of the | > whole thing and know where to look when the code throws an error. | > It's so bad I sometimes decide to just start over, from scratch. --<snip-snip>-- | Write comments before you write the code--explaining your thinking and | plans. I'd second that advice from Tim. In addition: - document the side-effects of functions calls (eg changing global variables or state, in TCL: variable traces) - document the "clever tricks" in detail (eg bit fiddling, relying on hidden features, in TCL: variable traces) - when changing *code*, check the *comments* as well and adapt them if required - write unit tests for your building blocks HTH R'