Clean Code Is Killing Your Career | The Myth of Clean Code
HTML-код
- Опубликовано: 22 дек 2023
- In this video, I'll talk about why everyone wants to write clearer, simpler code, but sometimes trying to improve or 'refactor' your code isn't a good choice. I'll explain the unexpected problems that can come with trying to clean up code and give easy tips on how to do it the right way. Let's learn together about making code better without the extra headaches!
Links:
Open Source Cohort: harkirat.classx.co.in/
Twitter: / kirat_tw
Linkedin: / kirat-li
Instagram: / kirat_ins
Discord: / discord
Telegram: t.me/kirat_internal_group
Congrats for 299K, I wish your subscribers reach to 1 million soon,
Advance congrats for 300K kirat
🎯 Key Takeaways for quick navigation:
01:09 📝 *Overly descriptive comments in code are unnecessary if the function is self-explanatory. Use comments only for critical explanations, like weird numbers or unusual logic.*
03:02 🐳 *Containerize your application for open source projects. It helps new contributors set up the project quickly and make changes locally, improving the onboarding process.*
03:56 ⚙️ *Use a top-level .env file for managing environment variables in open source projects. It simplifies the setup for contributors and avoids the need to hunt for scattered configuration files.*
04:52 🧹 *Regularly eliminate unused code from your codebase. Dead code can accumulate, making it harder for new contributors to understand and slowing down the development process.*
07:22 🔍 *Avoid eating up errors in code. Propagate errors back through callbacks or use promises to ensure proper handling, preventing issues from being silently ignored.*
Made with HARPA AI
One underrated practice is of retries, whenever we are dependent on some other service (including AWS) it's helpful to put a retry mechanism in place, for example like an exponential backoff mechanism.
happy to see you reaching 300K, cool bro.
Finally harkirat bhaiya speaking at normal human speed😂
clean speech
😅
Very valuable video, please make a video for about more good practices
great knowledge thank you.
08:26 may be that's a Security Measure as sometimes you should not directly send the error information back to client, as sniffers in between might make a guess about the working of the system through the error info!
You are right but maybe we can take another approach like sending the error messages to some sort of error files in the server that one can lookup to see what caused the error. And yeah sending the err in the console in not a promising thing I guess. I believe that going this way we can maintain a healthy software.
Please go easy on me if i am wrong. As i am in college in Pakistan and yeah I know that my grammar sucks
Can you please make more / longer videos on this topic, I couldn't find similar informative videos in YT.
Please allocate some time for making this.
Harkirat Sir please make video on neovim setup
We can see his eyes , how he does hardwork to do code daily 12 to 14 hours
Why I am getting addiction of this channel?
Please make video on neovim setup, guys please like for neovim setup video
Yes please make video on neovim setup @harkirat1
I'll see after class
Me too
Which class
Me too
Me too
Me too
💜💜💜
bhai google opinion reward m paise h jab se apne live kri h superchat ka option dundh rha hu on kardo ek bar expire ho jayenge jan m
Why the sound for this channel is way too low comparatively to other channels? Please fix it
One more point i would say Guard clauses that can make code more readable by clearly stating assumptions upfront and reducing nested if-else blocks
Guard clauses act like bouncers at a club, checking preconditions before things crash, making code cleaner and happier!🌟🌠
cohort link is not working
The title is not related to content and could have been better. Looks like it was made dramatic to pull in the viewers
Yep, I have the same feeling. Click-bait.
At 8:30, can someone explain why using promises is better in such cases except the fact that the code looks cleaner?
Gives you a more consitent API when you're looking for standardization in your codebase.
With the "good code" example, even though you handle the error by passing `err` to the `cb` function, the eventual function that calls the `findUserByUsername` function will need to handle the error scenario separately with an `if` statment.
As opposed to if you use a `Promise`, it becomes more standard with how you would handle any other scenario; you could do this with `.then().catch()` & now since you're using promises the calling function can also use `async-await` and you can handle the error with a `try-catch` block.
Links of these projects??
And first like tooo
✌
Imagine creating swagger docs for your pm and other non-tech teams
300k this Christmas
Always have a good readme file
cohort link is not workinh
Bro could you please suggest path for perfect programming starting from my 12 th I am preparing for jee please let me know, sorry this completely irrelevant to this vedio 🙏
jan may mains hay vai parle avi galti se achha NIT may chala geya , waha isse ayese hi roadmaps mil jaye ga .....
and agar coding main hay to jee chor de na idhar ka rehe ga na udhar ka
bro leave coding and start freelancing if you really want to code and make money. If you are preparing for jee dont waste time rather start leetcode and do dsa hard if you really want to get into faang or else jee will suck few crucial years of your life, rest depends on you ,your life, your career.
@@amandwivedi7640 thanks for the information bro I will definitely be looking into it
08:26 WHAT ABOUT TRY CATCH
Why do I feel like this is a click bait....
Hello, my friend was got charged Rs 80000 for using free tier of AWS.
Although he somehow convinced amazon that he was student and was just learning.
But why is it called free tier if they charge money?
Can you tell how to learn aws without getting such big bills?
so lemme explain, what happens is AWS will give you credits which will last for x minutes (I've taken x buz i haven't tried it yet, so I'm just having a rough idea about it) and your friend probably wrote a faulty code which was repeating itself resulting in exhausting credits and thereafter that it'll charge and hence ending up with a large bill
Correct me if I'm wrong, not having a credit card so I haven't tried aws yet
Read about Cloudwatch . Set it up so that you don't get such surprises. Also, not all services are free in AWS. Eg: in a EC2 instance, only the smallest ones are free.
I do not have credit card. I am using GCP. which is much safe and it has limit and they gave me 300 credits
6:55 Why not to use DSA logic? Can anyone explain?
he is simply saying instead of using a dsa logic always better to use inbuilt functions. and alsow rite your code in smaller functions
@@none665 thank you
Sir how many hours do you sleep in a day
Don't sleep
yea dude his left eye got slouch.
another point: use a popular formatter
Just read the book on Clean Code.
Harkirat is talking from that book only. You'll learn more from the book than this video.
12min video isn't gonna teach anything. But might make a case for him to sell his course.
Why that Title, its unclear!
1st comment bhaiii
Please give Christmas Discount🎉.??
First comment
Hi, bruh !
Prime made similar video earlier
Proper timestamps Dede koi
First :D
I watched 6 mins, where are the myths?
Click-bait title. Not very professional huh
300k subs before 2024 😃@Harkirat Singh