📜 ⬆️ ⬇️

Commandments young developer Delphi

At one time, I was entrusted with the task of supervising young developers. It was decided to start with the formulation of brief recommendations. The result is in front of you.

1 Short and not clear

  2. Write a code that is convenient to read for everyone else.
  3. Write in the comment not WHAT the code does, but WHY
  4. Warnings and hints are more dangerous than compilation errors - the project is being built without their removal.

2 development cycle

  1. Task setting by the head
  2. Decision making
  3. Solution Review
  4. Solution implementation
  5. Code Review
  6. Placement in the version control system

3 Making the source code


5 Choice of names

6 Operators

7 Encapsulation

8 Error Handling

Exhaustive source for error handling in Delphi

9 Debugging

Delphi project settings in terms of searching for errors
How to read log files
Access Violation in detail
Why always need to use FreeAndNil instead of Free

10 Resource Leaks

  1. Memory is allocated for the object and filled with zeros.
  2. The constructor is running.
  3. If an exception is raised in the previous step, the destructor is called, the occupied memory is freed and the exception is raised.

Resource leak detection
Leak detection, continued

11 Inheritance, composition, implementation, extension

12 Interfaces

13 Visual components

14 Modules

15 Eliminating unnecessary dependencies

Source: https://habr.com/ru/post/104377/

All Articles