Clean code #4 - Why code comments are bad!

preview_player
Показать описание
In this fourth episode of the Clean Code Series, we delve into the topic of comments in code. Join me as I explore the different types of comments, from valid and informative ones to those that can hinder code readability and maintainability. Discover the purpose and best practices for using comments effectively, along with examples of common mistakes and how to avoid them. Whether you're a beginner or an experienced developer, this video will provide valuable insights into the role of comments in writing clean, organized, and self-explanatory code.

Timestamps:
00:00 - Introduction: Exploring the purpose of comments in code
00:38 - Types of Valid Comments
04:10 - Types of Bad Comments
06:54 - Do We Need Comments?: Exercise on removing redundant and misleading comments
10:56 - Outro

Join me on this insightful journey as we learn why comments should not be used as a crutch for bad code and how focusing on clean code can greatly improve code quality and maintenance in the long run. Don't miss out on this essential episode of the Clean Code Series!

#cleancode #CodeComments #SoftwareDevelopment

Links:

--------------------------------------------------------------------------------
Music track: Other Side by Balynt
Vlog Music for Video (Free Download)
--------------------------------------------------------------------------------

-----------------------------------------------------------------------------------
Got questions? Reach out to me here:

--------------------------------------------------------------
My Setup details (In the US):

--------------------------------------------------------------
Setup details:

On My Desk:
Keyboard-2 : HyperX RGB Cherry MX Blue Elite (₹13000):
I bought this as a renewed one and costed me ₹8000.

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

I completely agree on the thought that name of functions should define what they do instead of writing comments for same. Great video 🙌

hitesh
Автор

is AOSP mostly java? Is it due to perf reasons kotlin is not adopted?

zeusalmighty
Автор

Gaurav sir do you have an iphone? Please provide the proper roadmap to become a android developer

RajeevSharma_
Автор

I get what you're saying, but your title is misleading. You admit to yourself that there's some comments that are appropriate. I do agree that sometimes we over-comment in case we need to revisit the code after an extended time and want to recall our different functions and steps. That said, maybe name it "Why some code comments are bad" or "Using code comments correctly" or "Stop ##Commenting Everything"

MattJohnson
Автор

Hello, sometimes to achieve a complex task, I write an algorithm in multiline comments and then write actual code just below the algorithm, is this correct?

akshaypawar
Автор

Sir are you at google USA or google India?

gourabsarker
Автор

Sir do you earn dollars a year as a software engineer at google? Plz reply. Thanks a lot.

gourabsarker