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

Опубликовано: 26 Апрель 2021
на канале: Programming Duck
379
23

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:
Slides: https://docs.google.com/presentation/...
Article version of this video: https://programmingduck.com/articles/...

Channel links:
Programming Duck: https://programmingduck.com
Facebook:   / programming-duck-100207231868555  
Hire me: https://sargalias.com

#programmingduck #programming #coding