10 Coding Principles Explained in 5 Minutes

  Рет қаралды 144,523

ByteByteGo

ByteByteGo

Күн бұрын

Пікірлер: 99
@brhoom.h
@brhoom.h 4 ай бұрын
"remember code tells you how comments tell you why" This is actually so good 🔥
@gavinjones
@gavinjones 4 ай бұрын
Totally agree. I hate comments which just say what the next line is doing. They get so distracting that i have set my editor to color comments almost the same as the background color. So they don't interfere when reading code
@michaelvilain8457
@michaelvilain8457 4 ай бұрын
I've had a boss yell at me for putting so much commenting in my code, specifically why I'm doing something and what else I've tried. I told him "In 6 months, I'm not gonna remember any of this. Or I might get hit by a bus. Would you rather someone spend a day or a week trying to fix or implement something new on top of what I wrote?" He was all about "I want it now" rather than "I don't care about 6 months from now." Interesting that I do a lot of what you mention and only had 2 computer science classes in college. The rest were in Chemistry, yet I only use my degree in the kitchen when I cook. I'm sure there are other who code much faster but I consider myself blessed that I've NEVER had to code anything in Cobol.
@nghianguyen170192
@nghianguyen170192 4 ай бұрын
@@michaelvilain8457 I would disagree with you on this. Code itself must be self-explanatory with most high-level programming languages. If you cant understand the code, you dont have enough understanding. The comment might be misleading if you update the code and dont update the comment.
@jb5631
@jb5631 2 ай бұрын
​@@nghianguyen170192well said! Code should always be self explanatory if possible. Only use docs when it's really needed, like a weird workaround or to mark something that really needs to be changed. For external packages it can still be good to add, just to make things a little bit easier for others / save them from the potential effort to look it up
@dejangegic
@dejangegic 2 ай бұрын
​@@nghianguyen170192Nah, I disagree. Sometimes I'm tired or in a hurry and want a summary of a function, or even a loop. I sure can read and understand what's going on, but comments make it faster.
@RobertFitz-r8r
@RobertFitz-r8r 4 ай бұрын
This is a great video with really valuable recommendations. Thus, please take my comments regarding the typos not as a critique of the content. - At 2:07 in the SOLID principles explanation section, I noticed a typo ISP => Interface Segregation Principle. The word Interface is misspelled. - At 2:30 the interface Eatable is misspelled (Estable in the video) - At 3:02 the last sentence of Security Test. It probably should state "penetration" testing (instead of penetrating testing) - At 4:41 the content of the white circle probably should be Refactor instead of Refractor
@klaus-udokloppstedt6257
@klaus-udokloppstedt6257 4 ай бұрын
2:23 The bad example rectangle class has three getWidth() functions, two of them with identical signature (copy/paste error), the other one probably meant to be a setter
@quarkyquasar893
@quarkyquasar893 4 ай бұрын
I love your videos and watch every single one of them, but I have a recommendation. I have been noticing an increase in typos over recent videos, like for example in SOLID the Interface Segregation Principle has a typo and a line below that also is having a mistake in DIP acronym. I love your videos but doing a grammar review once before uploading would be a good indicator for your audience to show the amount of effort you put into your videos, and before major typos become a thing. Lovely video otherwise, lots of great information :D
@manavkhandurie
@manavkhandurie 4 ай бұрын
Yea i guess its a case of the video editor may not be from a CS background or may not be an English speaker
@georgesealy4706
@georgesealy4706 4 ай бұрын
Your comment on 'robustness' is extremely important. People usually write code on the 'happy path.' However handling errors, bad data, and anomalies is critical. Code in production simply can't fail. It has to handle any situation.
@levonog
@levonog 4 ай бұрын
I really like your content and I really like the “5 minute video” format, I think this length is optimal for tech video.
@augustsbautra
@augustsbautra 4 ай бұрын
This is a coding principles explanation video. All codedwarfship is of the highest quality. It is encrusted with clear, eye-catching visuals and reassures with simple, easy to apply tips. In the video is a reminder to write comments for "why", not "how". It relates to whole swaths of coders not writing a single line of documentation anywhere. Jokes aside, the quality and density of advice given here is through the roof!
@Tenor2
@Tenor2 4 ай бұрын
A great step by step explanation of principles developers should employ!!
@The-KP
@The-KP 3 ай бұрын
Code style != Code structure, always remember to make your code extensible and maintainable with design patterns
@LiveWithStocks
@LiveWithStocks 4 ай бұрын
I strongly agree all of them. Nonetheless, I noticed that a passion to do so and a habit to do so are more important. Often times, they compromise and do not spend 1 more hour on writing better comments but simply call it a day.
@ultankearns
@ultankearns 3 ай бұрын
Really love your videos, very informative 🙂
@eyalrin
@eyalrin 4 ай бұрын
In the SOLID section the header says Robustness
@LeakyFaucett
@LeakyFaucett 4 ай бұрын
Great graphics! Who does them for you?
@Dave-rd5bb
@Dave-rd5bb 4 ай бұрын
i want to know too, tell me if you find please
@djjiang3718
@djjiang3718 4 ай бұрын
Hello! I love it! And how to create those awesome visuals like in the video? Anyone know? Thanks
@Dave-rd5bb
@Dave-rd5bb 4 ай бұрын
adobe illustrator and after effects
@chiebidoluchinaemerem5860
@chiebidoluchinaemerem5860 4 ай бұрын
This is Nice, thanks 👍
@catcatcatcatcatcatcatcatcatca
@catcatcatcatcatcatcatcatcatca 4 ай бұрын
Commenting is very hard. I like the traditional style emacs lisp is commented: each style starts with a big comment giving some commentary. Each file also ends with a comment, but this is mostly for historical reasons. functions defined by defun, variables defined by defvar and defcustom as well as macros (note: lisp macros aren’t not preprocessor macros) have an in-build document-string. This means that documentation is defined while writing code, but accessed independently of it. If you want to use a function you first pull out the document string, not the definition. The system forces you to write actually useful comments because you can’t rely on the code to explain your documetation. After this, comments on code are rarely needed. You can still make them of course, but you already wrote few paragraphs describing the whole file and you wrote documentation for each function so you rarely need to clarify the implementation. Many comments feel necessary only because the purpose and intended usage of the whole function or module was never written down. After those are clarified, the code can be awkward and non-straightforward, but still be understood. Good types and names can do this, but one brief documentation paragraph or two makes it very clear.
@jamesgosling9959
@jamesgosling9959 3 күн бұрын
请问您的视频中的动画是用啥软件制作的?May I ask what software you used to create the animation in your video?
@nintran52
@nintran52 4 ай бұрын
Awesome video ❤
@midjhelins8383
@midjhelins8383 4 ай бұрын
informative!
@littlellama8405
@littlellama8405 4 ай бұрын
What tools do you use for your animation and video? Thanks :)
@Dave-rd5bb
@Dave-rd5bb 4 ай бұрын
Adobe Illustrator and After Effects
@scuden
@scuden 4 ай бұрын
Who spotted the typo at 2:32?
@badhombre4942
@badhombre4942 4 ай бұрын
Just do TDD.
@naa_rang
@naa_rang 4 ай бұрын
These 5min videos get very fast. They don't solve the purpose unless you already know the topic well and you just want to revise.
@phatboislym
@phatboislym 4 ай бұрын
don't think anyone opened this ~ 5 min video expecting in-depth analysis of 10 complex concepts but that's just me
@mrtienphysics666
@mrtienphysics666 4 ай бұрын
“Everybody in the world is now a programmer. This is the miracle of AI.” Jensen Huang, 2024
@xuedi
@xuedi 4 ай бұрын
I disagree on the comments, good good does not need any comments, the functions/methods/classes names should speak for itself ...
@ryanstephen6163
@ryanstephen6163 4 ай бұрын
No matter how well you name your functions etc. it would never tell you _why_ something had to be done. Nothing replaces good comments/code documentation when it comes to this.
@maxmuster7003
@maxmuster7003 4 ай бұрын
Yes, my mashine code speaks for itself.😂
@maxmuster7003
@maxmuster7003 4 ай бұрын
​@@ryanstephen6163My functions have no name, but an address to call in memory.
@homeboy6668
@homeboy6668 Ай бұрын
​@@ryanstephen6163 exactly!
@bokistepy
@bokistepy 4 ай бұрын
Buy a new mic, or improve audio editing skils, ty;)
@yaketyjak
@yaketyjak 4 ай бұрын
I thought it was fine.
@TanveerAhmed10
@TanveerAhmed10 4 ай бұрын
audio is fine, buy a new ear or improve hearing ❤
@bokistepy
@bokistepy 4 ай бұрын
@@TanveerAhmed10 sarcasm is for smart ppl
@traitpichardo2046
@traitpichardo2046 4 ай бұрын
Audio is fine buy a new life
@dev0_018
@dev0_018 4 ай бұрын
his audio is fine but you probably need to get new speakers or headset
@dhinesha9949
@dhinesha9949 4 ай бұрын
00:01 Coding style ensures consistent and readable code. 00:40 Write clean, understandable code with helpful comments 01:24 Robustness is key in coding principles 02:07 Coding principles help create modular and organized code. 02:49 Use single responsibility principle and automated testing for success 03:31 Database class helps keep main app logic clean 04:16 Passing parameters enhances code organization and understandability. 05:00 Security is everyone's job in coding. Crafted by Merlin AI.
@juliocryv
@juliocryv 4 ай бұрын
great... use single responsibility principle and automated testing... my fail :(
@KhyberKat
@KhyberKat 4 ай бұрын
SOLID has been way over hyped, and people continue to blindly cite it.
@danielvayalil8453
@danielvayalil8453 4 ай бұрын
I mean they are vital when you talking about well designed Object Oriented Design, which is good when you want properly abstracted code, it's like yes NoSql DBs are popular but there is use in being able to normalize a SQL table to make queries efficient
@KhyberKat
@KhyberKat 4 ай бұрын
@@danielvayalil8453 The only vital one might be Liskov. The others are just rules of thumb - occasionally useful.
@IndulgeBySho
@IndulgeBySho 4 ай бұрын
I have 14 years of experience as a business architect, yet I see people doing better job at summarising concepts in our pipelines here (not to mention, in the most creative way possible). I love your book too. Cheers! Thanks...🎉
@argfasdfgadfgasdfgsdfgsdfg6351
@argfasdfgadfgasdfgsdfgsdfg6351 4 ай бұрын
THANK YOU for bringing the obvious truth to the masses: Code tells you 'How', comments tell you 'Why'. My colleagues seem to be to stupid to understand this and will simply deny writing any comments at all.
@augustsbautra
@augustsbautra 4 ай бұрын
Getting to the bottom of when and why the pernicious idea of "comments mean not clear enough code" got off the ground could be real interesting. And we'd know who to off when time travel becomes a thing.
@stevefrandsen7897
@stevefrandsen7897 4 ай бұрын
Same comment for unhelpful maintenance log entries. "Fixed a date function" - what was wrong? "Added another parm" - to do what? "Initialized a variable" - which one and why? I just never understood the lack of a short in code comment like "Leap year logic". "Extra Last day of Business Month processing." "Prevent zero divide".
@skyhappy
@skyhappy 4 ай бұрын
Comments are for speed also. Id rather read a comment than a whole block of code. Too much comments is better than too little. Be generous to the next person
@TrungNguyen-mj2id
@TrungNguyen-mj2id 4 ай бұрын
@@skyhappy that's not appropriate way to use comments. When your code is long, do refactor. Comments should only be used to explain "why" you do something.
@skyhappy
@skyhappy 4 ай бұрын
@@TrungNguyen-mj2id I'm not sure how much code you've written. There are always blocks of code that should be in one function and breaking it up only breaks the flow. 1 simple comment allows someone to skip reading 10-20 lines of code. It's much more read optimized
@gus473
@gus473 4 ай бұрын
Excellent reminders and suggestions! 😎✌️
@tanvirazad5118
@tanvirazad5118 4 ай бұрын
I follow you on LinkedIn and KZbin. Out of curiosity, I have one thing mesmerizing about how you are making these beautiful gif. Keep posting content like this.
@gingerpukh7309
@gingerpukh7309 4 ай бұрын
Great 👍
@hbachme
@hbachme 4 ай бұрын
Thank you for your wonderful contents. P.S: There's a typo in 2:34, eatable interface is estable And Easy to test is East to test in the side of the circle
@GeorgeCBaez
@GeorgeCBaez 2 ай бұрын
You will make more content on each topic?
@RobertHolzapfel
@RobertHolzapfel Ай бұрын
too much of a blunt commercial !!!
@mohamedhamzaaboudi9510
@mohamedhamzaaboudi9510 4 күн бұрын
you are awesome
@VijayCotriad
@VijayCotriad 3 ай бұрын
Not sure if anybody told you this. But you are awesome. You have this capability to dumb down complex concepts in a brilliant way. "Dumbing down"... that is your super power.
@TheGryphon14
@TheGryphon14 4 ай бұрын
imagine the pain you have to go through having him as your pull request reviewer
@hinnantdw
@hinnantdw 4 ай бұрын
Finally getting serious about this path and was happy to run across this site. Looking forward to benefiting from past and future tips and guidelines.
@orkhepaj
@orkhepaj 4 ай бұрын
assertions? never seen those
@ilikegeorgiabutiveonlybeen6705
@ilikegeorgiabutiveonlybeen6705 4 ай бұрын
these ofc arent dogmas
@bikedawg
@bikedawg 4 ай бұрын
"How to write clean code" : never contract work to anyone in Bangalore.
@stonecorleone
@stonecorleone 4 ай бұрын
Haha
@ajayadav09
@ajayadav09 4 ай бұрын
hahah
@jameshunt1822
@jameshunt1822 4 ай бұрын
Or hire a good Indian engineer. You pay peanuts, expect peanut butter.
@teeesen
@teeesen 4 ай бұрын
Bad code knows no borders.
@chpsilva
@chpsilva 4 ай бұрын
@@teeesen agreed. It's a mean stereotype.
@breakunknown
@breakunknown 4 ай бұрын
Gold
@PhilLesh69
@PhilLesh69 4 ай бұрын
Saying the *_word_* sequel when you mean the *_acronym_* SQL is confusing and illogical. You don't turn an acronym into a word unless the entire acronym IS a word, or you are simply using the word *_the acronym actually represents._* Throwing that entirely unrelated word in as an unnecessary expansion of the shortened acronym is going in the opposite direction of the entire point of using an acronym in the first place, and it is only confusing. Because nobody can tell which letters comprise the actual shortened term, phrase or title and which letters were just arbitrarily thrown in to make it a word. We pronounce SWAT because all the letters are in the word, but we spell out FBI instead of throwing a few more vowels and consonants in to confuse people. We don't call the FBI "FibBIng cops" Sequel is a now defunct proprietary DBMS that stopped being used or sold in the mid 1980s. SQL is an acronym for structured query language. Is you say "ess, kyew, ell" I might have a chance at figuring out s stands for struxtured, q stands for query and l stands for language. When you say sequel I might decide that sequel is how you pronounce the acronym SEQL or SQUL and now I'm thinking you're talking about symmetrical energy quotient levels of Standardized Electronic Quartz Lighting because I lost context and have nothing to work with besides the phonetic sound "sequel."
How principled coders outperform the competition
11:11
Coderized
Рет қаралды 1,7 МЛН
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 230 М.
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 104 МЛН
The day of the sea 😂 #shorts by Leisi Crazy
00:22
Leisi Crazy
Рет қаралды 1,7 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 2,9 МЛН
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,5 МЛН
HTTP 1 Vs HTTP 2 Vs HTTP 3!
7:37
ByteByteGo
Рет қаралды 175 М.
Session Vs JWT: The Differences You May Not Know!
7:00
ByteByteGo
Рет қаралды 160 М.
20 System Design Concepts Explained in 10 Minutes
11:41
NeetCode
Рет қаралды 1 МЛН
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2,1 МЛН
Top 5 Most-Used Deployment Strategies
10:00
ByteByteGo
Рет қаралды 267 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,1 МЛН
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 824 М.
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 104 МЛН