Back to Browse

Clean Code: What Should be the Size of a Function?

991 views
Oct 24, 2022
4:54

How large should our functions be? 🤔 [ ] The size of our screens? [ ] 50 lines? [ ] 5 lines? [ ] None of the above? Let's talk about how functions should be in Clean Code to have a better code. Robert C. Martin known as Uncle Bob wrote this book where he teaches us how to do Clean Code and in this series I walk you though the main rules he established using Dart examples. Want to go deeper into Clean Code? Here you can buy the book: 📖 for KINDLE: https://amzn.to/3BA6yx4 📚 hard copy: https://amzn.to/3BVggeJ Code Examples: https://gist.github.com/LeBaleiro/c1bacbf92e16f491b41a14f192619b66 Clean Code introduction video: https://www.youtube.com/watch?v=6TqO2EMs2L4 0:22 A function should do only one thing 1:41 Avoid passing booleans (Flags) into a function 2:26 Don’t pass more than 3 arguments into a function 3:12 A function that has a return type should not have side effects 4:09 Don’t repeat yourself #cleancode #unclebob #functions

Download

0 formats

No download links available.

Clean Code: What Should be the Size of a Function? | NatokHD