Is Production code different from tutorials

  Рет қаралды 35,548

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Пікірлер
@aliofmecca
@aliofmecca 2 жыл бұрын
I started using the new method a week ago (creating an object) and i guess i know from where the reel was from... Anyway making a tutorial is one thing but helping others avoiding "mistakes" is another... sir you just gained a new subscriber! Keep it up.
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
It’s fine to adapt from reels. Even I will making some tricks reels, they get attention. 😁
@deepankarg2134
@deepankarg2134 2 жыл бұрын
I want your playlist, and I'm ready to pay for that. You're a man of taste, I like that.
@geekyshows
@geekyshows 2 жыл бұрын
Great Video Hitesh ! I was also thinking to make a video on this topic. People often ask me the same question I hope some of them got their answer from this video. I will make a video on this topic obviously it will be in Hindi. I will take inspiration from this video as well. Thanks
@bikidas5473
@bikidas5473 2 жыл бұрын
I think what hitesh is trying to convey is that the code should make sense, whenever other people who are working on the code can understand what's going on with the code
@adityamahimkar6138
@adityamahimkar6138 2 жыл бұрын
Yes i totally agree, when I started learning python, i have came across this list comprehension and used to showoff during practicals but over the time I have realised that list comprehension can be good at med levels but you can't use it all the time just to reduce LoC. Also as you mentioned it is actually hard to understand nested loops with conditions in list comprehension 😅
@DeepakHarish48
@DeepakHarish48 2 жыл бұрын
Finally...someone mentioned it. Kudos to you bro. Even i hate them.
@abhishekbajpai9920
@abhishekbajpai9920 2 жыл бұрын
This truth was due long long time
@ahmerpatel9283
@ahmerpatel9283 2 жыл бұрын
This Gave me confidence that what I am doing or was doing , is absolutely acceptable and proud.
@segsfault
@segsfault 2 жыл бұрын
This is something that deserved attention.
@VersusMythical
@VersusMythical 2 жыл бұрын
I will always for go for more readability then writing shorter code but in given example object approach is much cleaner and easy to understand.
@crumpfyllc5571
@crumpfyllc5571 2 жыл бұрын
but it will cnsume more memory than switch statement specially when you have a big database
@yaserhasan6004
@yaserhasan6004 2 жыл бұрын
personally I would go with the object approach I think it is easier to read and easier to maintain, I mean how much object of 600 keys will take memory?, it will not be bigger than 500kb in worst cases we are talking about kb here, a low end smartphone have at least 4gb ram nowdays so I see that memory is not a thing to worry about in this case
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Absolutely. Even I would do it. But point of this video is evaluate first n there is no need to write fancy code. If you can, that’s fine too
@yaserhasan6004
@yaserhasan6004 2 жыл бұрын
@@HiteshCodeLab Oh I see now, just found your channel and subscribed, thank you for the very helpful videos man keep it up
@VersusMythical
@VersusMythical 2 жыл бұрын
Me too. Object approach is much cleaner imo.
@stiphenrobert4469
@stiphenrobert4469 2 жыл бұрын
We need a pro frontend course with react js in continuous of probackend
@abirroy1333
@abirroy1333 2 жыл бұрын
I believe, Its a personal choice for most of the people. But I definitely also agree with the norm that's widely accepted throughout the community. If it's fine for company's side then great!
@ganesh805
@ganesh805 2 жыл бұрын
Sir, Can we get this new version of 'teacher theme dark' ??? 😅😅
@shishirm.h.e1433
@shishirm.h.e1433 2 жыл бұрын
Recently I learned JavaScript and It's pretty hard and also Easy. I think JavaScript is an Interesting Language.
@adityakumarsingh7648
@adityakumarsingh7648 2 жыл бұрын
These are so informative videos please keep these coming this particular video was in my mind for like always...outro music 🔥
@Subhashchaudhary-s9p
@Subhashchaudhary-s9p 2 жыл бұрын
Thank you for this 🧡
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Any time!
@aqtv7778
@aqtv7778 2 жыл бұрын
Yeah, every programmer should care about it... If your is code machine understandable, it should be human understandable
@DaniyalAk
@DaniyalAk 2 жыл бұрын
amazing video, I will add your example in my tutorial with full credit :D
@livesamarth
@livesamarth 2 жыл бұрын
I disagree here, for instance in case of 3-5 cases it's fine but when you said that say there could be thousands of such case then either if-else, or switch is not a right approach, because it's basically O(n) if you look carefully whereas a map approach is O(1) approach, plus this approach is more maintainable as in future if you need to add a new hero, you simply need to add another key-pair in the map and it will work, but in other approach if things are complicated, it could become cumbersome.
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
As I said, it’s always case dependent. No code is good, no code is bad. I just wanted to make sure people understand that now you have a new object in memory. Is memory a priority, that depends on you. 🙂
@ChandrapalSd
@ChandrapalSd 2 жыл бұрын
I think switch case has O(1) time complexity
@kumar_codes
@kumar_codes 2 жыл бұрын
Totally agree bro..
@imamansoni
@imamansoni 2 жыл бұрын
I'll choose switch case for more readability for Future me 😅
@itsCcallahan
@itsCcallahan 2 жыл бұрын
Is this the same teacher theme dark ? The background seems a little bit different and there are no purple elements unlike the theme from the marketplace, also the git repo seems to be removed ? If not can anyone tell which theme is this ?
@vikashsurin531
@vikashsurin531 2 жыл бұрын
This question was something which I was missing in life.🤨
@nadeemahmed7622
@nadeemahmed7622 2 жыл бұрын
Is it good practice to write comments in production code. Coz I am in production and can't find a single comment for anything in codebase.
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Yep, just don’t overwhelm with comments
@nishantshrestha1760
@nishantshrestha1760 2 жыл бұрын
5:45 , misspelled as key instead of value nvm
@jayakumar9976
@jayakumar9976 2 жыл бұрын
Could somebody explain what is happening on line 28?
@ap6471
@ap6471 2 жыл бұрын
What's the theme your using ? please tell me,
@sanjeevchaurasia4819
@sanjeevchaurasia4819 2 жыл бұрын
Great explanation
@murgeshpatil2479
@murgeshpatil2479 2 жыл бұрын
So how can we understand production code and stuff even though if not working
@talhaibnemahmud
@talhaibnemahmud 2 жыл бұрын
The theme is quite interesting. What's the name of it?
@anilkhairnar2224
@anilkhairnar2224 2 жыл бұрын
Crash course on CI/CD Please OR may be some explanation by you 😀
@shamshad_hussain
@shamshad_hussain 2 жыл бұрын
VS code theme name plz
@Anonymous-op7yy
@Anonymous-op7yy 2 жыл бұрын
Is it run js?
@iqbal045
@iqbal045 2 жыл бұрын
what's the name of songs? this video ending!!!!
@MinarMunshi
@MinarMunshi 2 жыл бұрын
As usual another Good content ❤ but sir, I need that VS Code theme which one you used in this vido ☺
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Thanks
@nauraysheikh
@nauraysheikh 8 ай бұрын
So helpful
@hareeshmuddala9401
@hareeshmuddala9401 2 жыл бұрын
Sir please make a video on skills to become java developer
@ombudhiraja9802
@ombudhiraja9802 2 жыл бұрын
But what if we have like 500 heros, are we going to write 500 if else conditions?
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Would you prefer to add them in objects ? 🤔
@Anshaj
@Anshaj 2 жыл бұрын
@@HiteshCodeLab isn't a dictionary a better option in that case and dictionary is also an object, isn't it? 😊
@kumar_codes
@kumar_codes 2 жыл бұрын
Well I don't find any problem with the 3rd approach, it's readable too.For most of the cases we will be dealing with more than 2 or 3 objects. It's better than writing 20 lines of if else or switch. I definitely agree with your point but the example you showed for this is pretty lame..😂
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
If example is complicated, then it’s not an example
@adarsh-chakraborty
@adarsh-chakraborty 2 жыл бұрын
@@HiteshCodeLab Example might be lame, idk but I got the point. 😃👍
@denilbhatt1005
@denilbhatt1005 2 жыл бұрын
For a moment even I felt like hey what's wrong with the second approach like if I would be building something that would be the first thought comming to my mind 😜. But then when he explains that creating an object would make use of memory power as well that's when I understood where I was going wrong🙇... Thanks for teaching something that we generally ignore 🙃...
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
😁
@michaelgreene6441
@michaelgreene6441 2 жыл бұрын
i like this video because it inspires confidence in simple things rather than overly fancy stuff that causes imposter syndrome. however i would like to see a better example because the object "heroes" is more representative of what would be received from an API or database where as if/case does not have a data source and is using literals. Point being that these two are not really comparable. in my experience you would almost never be able to use literals in any similar situation.
@bkcy18
@bkcy18 2 жыл бұрын
Song link?
@siddharth3419
@siddharth3419 2 жыл бұрын
Hey is your react course enough to land a job as react dev ?
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Absolutely
@chandanshetti2298
@chandanshetti2298 2 жыл бұрын
Yes
@siddharth3419
@siddharth3419 2 жыл бұрын
There are 2 paid courses mentioned in LCO for react ..one is react bootcamp and another is complete react for web with 10 projects in pro.learncodeonline which one to do for react getting confused man !!
@DarthVader11912
@DarthVader11912 3 ай бұрын
Do the Odin project. React section. It will teach every thing you need to know to land a job and more.
@actualprogramming
@actualprogramming 2 жыл бұрын
Man i leave js for s few months and these guys came up with ‘??’. What in the world is that now?
@aashiqahmed5273
@aashiqahmed5273 2 жыл бұрын
nice tips
@JobinSelvanose
@JobinSelvanose 2 жыл бұрын
Great video😂🔥
@daiveshsuryawanshi6497
@daiveshsuryawanshi6497 2 жыл бұрын
Great sir
@notreallyhaarsh
@notreallyhaarsh 2 жыл бұрын
"debugging is twice much harder than writing code" Thus by definition you are not smart enough to debug the code if you write it in best possible way you can.
@singh.aadarsh
@singh.aadarsh 2 жыл бұрын
Today I searching this think. And i m also assuming. This.
@suryap999
@suryap999 2 жыл бұрын
As usual , good stuff ❤️
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Thank you again
@ratnadeepsaha7675
@ratnadeepsaha7675 2 жыл бұрын
Hello Hitesh bhaiya. Felling bad after I couldn't join the Sat live😭
@HiteshCodeLab
@HiteshCodeLab 2 жыл бұрын
Chill, you can watch later or join in next Saturday live !
@1saurabhkumar1
@1saurabhkumar1 2 жыл бұрын
Next js course full stack
@Randomguy48279xyz
@Randomguy48279xyz 2 жыл бұрын
👍
@devsunil
@devsunil 2 жыл бұрын
❤️❤️❤️
@z3nitsu861
@z3nitsu861 2 жыл бұрын
Second
@rohanchoudhary4034
@rohanchoudhary4034 2 жыл бұрын
First
Production grade logger in Javascript | Winston
27:41
Hitesh Choudhary
Рет қаралды 65 М.
Junior Vs Senior Code - How To Write Better Code
22:13
Web Dev Simplified
Рет қаралды 1,1 МЛН
Every team from the Bracket Buster! Who ya got? 😏
0:53
FailArmy Shorts
Рет қаралды 13 МЛН
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН
How to optimize and monitor APIs in production
13:02
Hitesh Choudhary
Рет қаралды 20 М.
Make Your Python Code More Professional
19:43
NeuralNine
Рет қаралды 68 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 306 М.
Precise Data structures roadmap
9:09
Hitesh Choudhary
Рет қаралды 41 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
How Big Tech Ships Code to Production
4:28
ByteByteGo
Рет қаралды 87 М.
3 Tips To Write Clean Code (from an ex-Google software engineer)
17:12
Clément Mihailescu
Рет қаралды 198 М.
Data Cleaning in Pandas | Python Pandas Tutorials
38:37
Alex The Analyst
Рет қаралды 346 М.
SH - Anh trai & Em gái || Brother & Sister #shorts
0:58
Su Hao
Рет қаралды 48 МЛН
НИКОГДА не иди на сделку с сестрой!
0:11
Даша Боровик
Рет қаралды 729 М.
BIP HOUSE  .бип хаус 🥰🏡  #shorts
0:13
bip_house
Рет қаралды 1,2 МЛН