Recent

Author Topic: clean code? How do you write  (Read 558 times)

Weiss

  • Full Member
  • ***
  • Posts: 127
clean code? How do you write
« on: July 11, 2022, 06:11:33 am »
fellas. I am sure you know what I mean. How do you write program, which will not be plagued with variables and names you no longer use, or could do without. Generally, is there a strategy on how to test the idea if it works, and keep adding functionality without sinking into a mess? There must a method to it. I will develop my style eventually, but a quick pointer is what I need right now. Thank you kindly.

440bx

  • Hero Member
  • *****
  • Posts: 4029
Re: clean code? How do you write
« Reply #1 on: July 11, 2022, 06:24:34 am »
How do you write program, which will not be plagued with variables and names you no longer use, or could do without.
The compiler tells you if an identifier is not used and/or assigned but never used.  When you see that case, you get rid of the identifier.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Awkward

  • Full Member
  • ***
  • Posts: 135
Re: clean code? How do you write
« Reply #2 on: July 11, 2022, 06:58:16 am »
Additionally, i still use (well, trying to use) sometime PascalAnalizer https://peganza.com. It not supports FPC directly but have free version.

 

TinyPortal © 2005-2018