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.
@HiteshCodeLab2 жыл бұрын
It’s fine to adapt from reels. Even I will making some tricks reels, they get attention. 😁
@deepankarg21342 жыл бұрын
I want your playlist, and I'm ready to pay for that. You're a man of taste, I like that.
@geekyshows2 жыл бұрын
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
@bikidas54732 жыл бұрын
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
@adityamahimkar61382 жыл бұрын
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 😅
@DeepakHarish482 жыл бұрын
Finally...someone mentioned it. Kudos to you bro. Even i hate them.
@abhishekbajpai99202 жыл бұрын
This truth was due long long time
@ahmerpatel92832 жыл бұрын
This Gave me confidence that what I am doing or was doing , is absolutely acceptable and proud.
@segsfault2 жыл бұрын
This is something that deserved attention.
@VersusMythical2 жыл бұрын
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.
@crumpfyllc55712 жыл бұрын
but it will cnsume more memory than switch statement specially when you have a big database
@yaserhasan60042 жыл бұрын
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
@HiteshCodeLab2 жыл бұрын
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
@yaserhasan60042 жыл бұрын
@@HiteshCodeLab Oh I see now, just found your channel and subscribed, thank you for the very helpful videos man keep it up
@VersusMythical2 жыл бұрын
Me too. Object approach is much cleaner imo.
@stiphenrobert44692 жыл бұрын
We need a pro frontend course with react js in continuous of probackend
@abirroy13332 жыл бұрын
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!
@ganesh8052 жыл бұрын
Sir, Can we get this new version of 'teacher theme dark' ??? 😅😅
@shishirm.h.e14332 жыл бұрын
Recently I learned JavaScript and It's pretty hard and also Easy. I think JavaScript is an Interesting Language.
@adityakumarsingh76482 жыл бұрын
These are so informative videos please keep these coming this particular video was in my mind for like always...outro music 🔥
@Subhashchaudhary-s9p2 жыл бұрын
Thank you for this 🧡
@HiteshCodeLab2 жыл бұрын
Any time!
@aqtv77782 жыл бұрын
Yeah, every programmer should care about it... If your is code machine understandable, it should be human understandable
@DaniyalAk2 жыл бұрын
amazing video, I will add your example in my tutorial with full credit :D
@livesamarth2 жыл бұрын
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.
@HiteshCodeLab2 жыл бұрын
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. 🙂
@ChandrapalSd2 жыл бұрын
I think switch case has O(1) time complexity
@kumar_codes2 жыл бұрын
Totally agree bro..
@imamansoni2 жыл бұрын
I'll choose switch case for more readability for Future me 😅
@itsCcallahan2 жыл бұрын
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 ?
@vikashsurin5312 жыл бұрын
This question was something which I was missing in life.🤨
@nadeemahmed76222 жыл бұрын
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.
@HiteshCodeLab2 жыл бұрын
Yep, just don’t overwhelm with comments
@nishantshrestha17602 жыл бұрын
5:45 , misspelled as key instead of value nvm
@jayakumar99762 жыл бұрын
Could somebody explain what is happening on line 28?
@ap64712 жыл бұрын
What's the theme your using ? please tell me,
@sanjeevchaurasia48192 жыл бұрын
Great explanation
@murgeshpatil24792 жыл бұрын
So how can we understand production code and stuff even though if not working
@talhaibnemahmud2 жыл бұрын
The theme is quite interesting. What's the name of it?
@anilkhairnar22242 жыл бұрын
Crash course on CI/CD Please OR may be some explanation by you 😀
@shamshad_hussain2 жыл бұрын
VS code theme name plz
@Anonymous-op7yy2 жыл бұрын
Is it run js?
@iqbal0452 жыл бұрын
what's the name of songs? this video ending!!!!
@MinarMunshi2 жыл бұрын
As usual another Good content ❤ but sir, I need that VS Code theme which one you used in this vido ☺
@HiteshCodeLab2 жыл бұрын
Thanks
@nauraysheikh8 ай бұрын
So helpful
@hareeshmuddala94012 жыл бұрын
Sir please make a video on skills to become java developer
@ombudhiraja98022 жыл бұрын
But what if we have like 500 heros, are we going to write 500 if else conditions?
@HiteshCodeLab2 жыл бұрын
Would you prefer to add them in objects ? 🤔
@Anshaj2 жыл бұрын
@@HiteshCodeLab isn't a dictionary a better option in that case and dictionary is also an object, isn't it? 😊
@kumar_codes2 жыл бұрын
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..😂
@HiteshCodeLab2 жыл бұрын
If example is complicated, then it’s not an example
@adarsh-chakraborty2 жыл бұрын
@@HiteshCodeLab Example might be lame, idk but I got the point. 😃👍
@denilbhatt10052 жыл бұрын
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 🙃...
@HiteshCodeLab2 жыл бұрын
😁
@michaelgreene64412 жыл бұрын
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.
@bkcy182 жыл бұрын
Song link?
@siddharth34192 жыл бұрын
Hey is your react course enough to land a job as react dev ?
@HiteshCodeLab2 жыл бұрын
Absolutely
@chandanshetti22982 жыл бұрын
Yes
@siddharth34192 жыл бұрын
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 !!
@DarthVader119123 ай бұрын
Do the Odin project. React section. It will teach every thing you need to know to land a job and more.
@actualprogramming2 жыл бұрын
Man i leave js for s few months and these guys came up with ‘??’. What in the world is that now?
@aashiqahmed52732 жыл бұрын
nice tips
@JobinSelvanose2 жыл бұрын
Great video😂🔥
@daiveshsuryawanshi64972 жыл бұрын
Great sir
@notreallyhaarsh2 жыл бұрын
"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.aadarsh2 жыл бұрын
Today I searching this think. And i m also assuming. This.
@suryap9992 жыл бұрын
As usual , good stuff ❤️
@HiteshCodeLab2 жыл бұрын
Thank you again
@ratnadeepsaha76752 жыл бұрын
Hello Hitesh bhaiya. Felling bad after I couldn't join the Sat live😭
@HiteshCodeLab2 жыл бұрын
Chill, you can watch later or join in next Saturday live !