×

Smok Code's video: What is Clean Code

@What is Clean Code?
Let's discover what exactly this term means for professional software developers with . Clean Code (R. Martin) - US: https://amzn.to/3jVUEDU | UK: https://amzn.to/2Iij4Jz Best Practices for Programmers - US: https://amzn.to/2SPRSEg | UK: https://amzn.to/2Fr2h6e What Is Clean Code? This is a term you might hear when professional software developers discuss the quality of their work. Standing on the bleachers you might think that code that does it’s job, or plainly: works is a good code. programmers believe that code not only has to work, but it also has to be easy to work with. Such code is following Clean Code practices. These make your code: easy to understand and explain, easy to change and extend, easy to debug and fix performant and focused . So all in all, Clean Code is meant to be beautiful in a sense: elegant, optimal, maintainable, concise, and ready for new features. All this makes the code pleasant to work with, but don’t get me wrong: it’s not easy to write clean code. There are a lot of rules that you have to follow. I’ll mention some of them in a second, but first a caveat: You see: programming clean code is a little bit like an art - you have to make a lot of subtle, implicit choices when painting a picture. When you’re done anyone can tell if you did well or badly, even if they themselves cannot paint at all. Same goes with clean code: your subtle choices will matter, and getting really good takes a lot of practice. When distilling the rules of clean coding we can start by looking at the opposite: I know that all of us have seen some messy code, very often written by ourselves. Such code may be produced in rush, or just as a proof of concept. Eventually we forget what the code was all about, and move on. Few weeks later we get back to it and discover in horror that we no longer know what’s going on: where we can stick this new bit of functionality without causing an avalanche of bugs, errors and regression. So what are key practices of clean code? Meaningful names: label your symbols clearly, in a pronounceable, searchable manner that avoids mental mapping, puns, cleverness. Pick one word per concept and keep names short. Write elegant functions: Small, well-defined, without side effects. Make them do one thing well, and one thing only. Keep your code DRY, structured and focused. Use correct comments: avoid redundant, misleading, mandated or journal comments, but keep and use legal, informative and clarification comments. Format your code correctly, according to standard agreed upon in your product and team Avoids unnecessary classes, keep them small, and cohesive. Define your abstraction well, focus on responsibilities and isolation. Handle all errors: define normal flow, use try-catch-finally, unchecked exceptions and provide context when throwing Test your code. At least with unit tests. Preferably also use integration, component, and end-to-end tests. Use all the safeguards you can. Becoming a good, clean programmer requires practice, and a lot of work and introspection to master this craft. In other words: when reading clean code, you can tell that it is written by someone who cares. You can learn more in resources from the description. I wish you all the best in improving your skills. Subscribe, and I’ll see you in the next one, cheers!

127

15
Smok Code
Subscribers
15K
Total Post
87
Total Views
318.6K
Avg. Views
5.7K
View Profile
This video was published on 2020-10-14 19:30:10 GMT by @Smok on Youtube. Smok Code has total 15K subscribers on Youtube and has a total of 87 video.This video has received 127 Likes which are lower than the average likes that Smok Code gets . @Smok receives an average views of 5.7K per video on Youtube.This video has received 15 comments which are lower than the average comments that Smok Code gets . Overall the views for this video was lower than the average for the profile.Smok Code #QuickAnswer. #programming #tech #softwaredevelopment #developer #sde Clean has been used frequently in this Post.

Other post by @Smok