Cleaner Code: 3 Ways You Can Write Cleaner Code

78,633
0
Published 2022-03-19
Here are 3 ways you can write cleaner code using common methods you can see online. 🧑‍💻 Writing Cleaner Code will make help you maximize productivity and readability of your code when you decide to go back into it at a later point. Let me know what tips you guys use in the comments.

—-

💬 JOIN MY DISCORD

discord.com/invite/bY6N9z26et

—-

CONNECT WITH ME ON SOCIAL
📸 Instagram:

www.instagram.com/lewismenelaws/

🎚 TikTok:

www.tiktok.com/@lewismenelaws

🐣 Twitter:

twitter.com/LewisMenelaws

—-

0:00 Intro

0:45 Comments and Naming Conventions

3:06 Guard Clauses

4:53 Single Responsibility Principle and Long Functions

3:50 Web3 & Metaverse

6:53 Outro & Discord Announcement

—-

🎵 Music

Misha, Jussi Halme - Higher chll.to/a705fd1d

—-

⛓️ Links in Video

Free Code Camp - Article about comments: www.freecodecamp.org/news/code-comments-the-good-t…

Ellen Spertus on code comments best practices - stackoverflow.blog/2021/12/23/best-practices-for-w…

DevIQ - Guard Clauses - deviq.com/design-patterns/guard-clause

Single Responsibility Principle - en.wikipedia.org/wiki/Single-responsibility_princi…

All Comments (21)
  • @jimmea6317
    People who say coding isn’t an art form are just salty they can’t do it themselves
  • @daniel-godin
    Really great video! I appreciate that you not only gave clear and concise information, you also referenced places we could learn more about these concepts. Then you put the actual links in the description. Thank you!!
  • @ziakhan-tk7rk
    Well finally a video where I can watch from the starting till the end without even getting bored for a second I hope this continues for all your videos.
  • Excellent! This tutorial shows clear maturity and professionalism! Every beginner should trust this guy! And we can all learn here, or reinforce what we may have learned already.
  • @malicious8909
    Good editing skills, keep it up. Thanks for all those shorts about open source projects too :)
  • I started really loving your content. Thank you for all these I learned many things from you. I have a small request can you please make some short videos on how to create efficient database architecture for both SQL and Non-SQL databases.
  • @methanesulfonic
    I'm just starting to learn to code and your channel is a goldmine, there's so much to learn. thanks a bunch!
  • @Eric-sy3dm
    I loved watching your video. Those are some good lessons learned.
  • @dienekes4364
    Back in 2005, I wrote code as a contractor for a company that transmitted a set of data to an external server. It was okay, written in C# 1.2. A couple of years later, I was hired back by the same company for some other projects. The manager had been replaced and the new guy was complaining about my original code, saying that it was unmaintainable and every time someone touched it, it broke. They wanted it re-written in C# 2.0. Not only did I just do an in-place upgrade to the .EXE file, I added new features that weren't available in 1.2. I re-compiled and had it up and running within a couple of hours. I went back to that manager and told him that every person who said my code was unmaintainable should be fired on the spot because my code was clean and EASILY maintainable. I have no idea who he had that "touched" it, but if they broke it, it was because of their lack of skill, not my code.
  • @hankobrat
    Thanks for the good tips and sources. Keep them coming. 🙂
  • Coding is an art form, but it's also a rigorous engineering discipline. All the fundamentals - encapsulation, defined interfaces, modularity, resilience, reusability, error-checking, exceptions, etc - are pure engineering. Building on those engineering fundamentals is where pure art can be created.
  • @xX12VincEXx
    Really great video. Helped a lot. Please make more of the longer type videos :).
  • @Aura_Mancer
    Watching the video right now. I'm a beginner, and the guard clauses was very needed! Thank you
  • here after one year and u r 340k subs, u deserve a lot Lewis all the support.