Code Like a Pro : Comments | How to Write Code Professionally (With Code Examples)

preview_player
Показать описание
Code Like a Pro : Comments | How to Write Code Professionally (With Code Examples)

► MY COURSES
My Courses with huge discounts:
» 100 Algorithms Challenge: How to Ace Your Next JavaScript Interview

► MY MERCH
My Coding Merch - Shirts, Mugs etc.

► BOOK RECOMMENDATIONS
» The Complete Software Developer's Career Guide:
» The Total Money Makeover
» Clean Code
» The Clean Coder

► AFFILIATE LINKS FOR PRODUCTS I LOVE:
» Check out items I love on Amazon
» Humble Bundle (Low price games, books, courses etc.)
» Robinhood - Trade Stocks App (Sign up and get 1 share of stock valued between 5 and 200 dollars)
» Acorns - Easy Investment Portfolio (Sign up with my link and get $5 when you deposit)

► DONATE & SUPPORT
» Paypal

► MENTORING
» Tutoring, Mentoring and Course Walkthroughs available:

► SOCIAL MEDIA
» Patreon
» Code, Tech and Caffeine Facebook Group
» Twitter
» Website
» Instagram
Рекомендации по теме
Комментарии
Автор

Meanwhile on computer science courses...

jozef
Автор

I'm glad you spoke about regular expressions in this. Uncommented regular expressions are the worst.

EddyVinck
Автор

Great video. I was looking for a guide because I wanted to add A LOT of comments "the proper way". Now I realize that most of it was not necessary and should be out of the code

francomoises
Автор

I suggest you could share same information on medium also. Would be beneficial for learners like us

petelouis
Автор

thanks for this video, i'm a new dev at my first position and figuring out how / if comments are ever needed in production and this was really helpful especially wiht the examples. thanks again

anthonyngooo
Автор

As a general rule I would say that if you have to put a comment in to describe your code structure, you are doing it wrong.
However, implementing stuff is not just about code, but about the thing you implement, for example some mathematical model of something.
Even i the code itself is super clear, the steps of the mathematical model might need explanation. In those cases it might help with a well placed comment sometimes,
even though most of the explantion of the model should be put outside the code.

TheIllerX
Автор

My coworkers who are less experienced love to ask me to add TO-DO everywhere. I told him that's not a good commenting style. My lead just agrees with him. So hard dealing with these bad programmers.

kristineximeno
Автор

This is all really good and helpful—I learned a lot!

Other languages have some other commenting apparatus besides straight-up comments. For example, Java has JavaDocs and Python has docstrings. It’s important to do these, because they can be used for documentation.

SethWilson
Автор

can you tell me how did you learn angular, did you study source code, watch docs or courses ? how to learn and understand it properly.? Not just angular any framework

bulzay
Автор

Code is wrong in first sample line 11. Where it says "filter( () " it should say "filter((word) " because that is what is using to compare the length: word.length.

zerdnelemo
Автор

I like the video when you talk about removing comments but i was working for a company that had a lot of junior developers so when i didn't use comments people used to waste time understanding the logics instead of just do what they had to do. And everything is compiled and all the comments are removed so it's just better put the comments.

melhoresmomentosfutebol
Автор

Why are you setting the longest string to the value at index 0? Is there something about that array where the longest string will always be at index 0?

cory
Автор

Thank you so much.
Most comments add no value, are names of not extracted functions or an excuse for inintillegible or awful code.
Rarely they explain WHY something has been done the way it has.

Blast-Forward
Автор

Larger variable names are harder to work with

techverse
Автор

I don't necessarily agree with the visual markers. I feel there are certain instances where they would be helpful to easily traverse the code

Kim-byuy
Автор

nah, the best way to write comments is "I don't know why, but the code doesn't work unless we keep this terribleness. help."

a_businessman
Автор

Though I don't know its formal name, I like the natural language naming conventions, such as longestStringsOf(strings). when you use it, it will look like:

if return;

and most of the time, it literally can read without all the programmatic symbols, like:
if (the array of) longest strings in names contains bob, return.

It's fascinating.

kateiry
Автор

I've been writing JavaDoc comments for an hour😂😂😂

jk-gnfu
Автор

So, it's just like the YouTube comments.

humanrightsadvocate
Автор

Commenting isnt explaining the program to others, its explaining to the computer what your doing to the computer the naming of variables should match your comment. Then explain what you need the code to do.

Once code matches and compiles correctly remove the comments that dont explain important things to other programmers or yourself as reminders.

DeathxStrike