Learn Delphi Programming | Unit 9.2 | Styling and Reorganizing Your Delphi Code

preview_player
Показать описание

-- Download some video lessons for FREE
-- Download some Delphi project files used in tutorials for FREE
-- Download some PDF lesson instructions for FREE
-- Participate in chats and discussions
-- Get Early access to new tutorials
-- No need to signup and no obligation
PS: SORT VIDEOS FROM EARLIEST TO LATEST TO START AT THE BEGINNING

----------------------------------------
Delphi Programming Tutorial - Unit 9.2 - Styling and Reorganizing Your Delphi Code for Improved Readability:

When working on large-scale Delphi projects, it is possible to distribute the workload between multiple programmers. It is also possible that members in a programming team need to work on the same code units.

It is therefore important for a programmer to write "clean" code, meaning code that is easily understood by the rest of the team. A few techniques are demonstrated in this tutorial to improve the readability of Delphi code:

1. Line continuation: When instructions are getting too long in the code editor (unit), they can be shortened by splitting the statement over multiple lines. However, it is important to know where a statement can be split to avoid errors.

2. Indentation: The readability of code can also be improved by indenting nested statements in such a way that the beginning and end of code blocks stand out prominently. Indentation can be done with the Tab key or the Space key.

3. Blank lines: Another way of improving the readability of code is to "batch" statements that are related together. For example, all statements that change properties of a specific object can be "batched", while all statements calling a specific method will be placed in the same "batch". Batches can then be separated by a blank line (like new paragraphs in an essay).

We implement all three these techniques in our code for the "Contact Information" project.

Happy learning!

PS. Please, help us to keep these Delphi tutorials FREE. Keep our sponsors happy and give this video a THUMBS UP. Also SHARE these Delphi tutorials with your friends and tell them to also SUBSCRIBE. Participate in discussions, ask questions and tell us about your experience in the COMMENTS section of a Delphi tutorial.

This tutorial (Delphi Programming Tutorial - Unit 9.2 - Styling and Reorganizing Your Delphi Code for Improved Readability) is best viewed in HD. To change your settings to HD:

1. Click on the gear-icon (Settings) at the bottom of the YouTube Video Player.

2. Select "720p HD" and wait a few moments for the setting to take effect.

You may also want to visit the following resources for more information:

Рекомендации по теме
Комментарии
Автор

In Lazarus(and Delphi?) you can move selected block of lines by pressing 'ctrl+u' and "ctrl+i".

mikrandr
Автор

Great videos . i been following the whole videos series. I am learning a lot. Please continue with you good work and create more video. I would like to learn more.

muhammadshahrizal
Автор

Great video!Are you going do some videos on Refactoring, where you can rename variable, and methods (procedures).Thanks again for taking your time to help others learn Delphi.

troyfrei
Автор

Are this playlist over? Please don´t stop doing videos on the Contact Information contact, i would like to learn by your lessons things like, how do i set a database with tables to save the informations that i typing on the informations contatct program, or how do i link this form to other forms. And i have questions like, can i creat visual efects on delphi´s forms? or can i Creat a dinamic backgound?
i´m really glad to have found your channel, english is not my native language and i
understanded everything that you have explained.So Thank You! Really really Much and
please don´t stop the lessons.

MarceloBFS
Автор

This was an amazing tutorial/series but Gerhard said at the end of this video there was more to come. Was the course ever completed?
I understand there is so much that goes into making these videos not just time but expense. I did join the course on the learndelphi.net site but I got sidetracked in my studies and didn't finish it. Now I can't seem to get to it anymore.

swagman