How to write clean code units (functions and methods) - Clean code and programming principles

preview_player
Показать описание
In this video we examine how to write good code units (functions and methods) in your application. We start by looking at "edge" code units. Those are units that don't call any other functions when they run. Then, we generalise the concepts to all code units. Finally, we link those concepts back to the programming principles and writing good code in general.

Chapters:
00:00 Intro
00:48 Example
01:03 Edge code units
01:51 Examples of good and bad edge code units
03:28 Example - add function (non-local scope)
06:57 Example - getProperty (non-local scope)
08:03 Example - appendElementToBody (conditionals)
13:37 Example - doubleSpeed (conditionals)
15:40 Example - incrementSpeed (Boolean arguments)
22:38 Linking back to programming principles
24:58 Other code units
29:46 Be pragmatic
31:18 Outro

Video links:

Channel links:

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

Great video Spyros. I agree that it is very important to try to keep your code units small as it makes it much more comprehensible. Thanks for the video :)

galias
Автор

Practical examples and convincing arguments. Thanks!

ranelpadon
Автор

Awesome video, great examples and explanations helped me to understand the concepts thank you :)

suerose
Автор

This is great but if you were drawing or pointing to code would be more helpful than hand movements

ChrisAthanas
visit shbcf.ru