l think same. You can't learn just listen and reading how to code. You just need to write. And write more and more code to write better. Some people on internet will say your code is bullshit. They are just wrong.
People that write bad code when they first start out should not be programmers. Not everyone should learn Computer Science. I had a professor that was an experienced programmer, he urged us to use simplicity and readable code.
@@matheusBBarni You fool! Try Angular with TypeScript! Really, though, as the guy says on the vid, the things you use depend a lot on what you are doing. Personally, I prefer React for small/medium projects and Angular for complex projects. I'm even using AngularJS right now as a first step to port a project that's badly written on PHP with vanilla JS... it's a nightmare
People always conflate AngularJS and Angular, missing that they're actually two quite different frameworks. Yes, AngularJS was trash, but Angular is pretty good if you want a complete solution
Step 1: write code, make sure it works Step 2: reflect on the code. See what works, what doesn't. What you like, what yo don't like Step 3: retry making said code. Maybe just some small tweaks, maybe a new radical approach Step 4: repeat 1-3 Congratulations! You're know on the path to become an actual good dev
nah man it's legit, junior/senior developer is a state of mind i'm 29 with 4 years of experience, 3 years ago i was mad at taking direction from a 20 year old but realised within a month or two i needed to leave to gain more exp elsewhere... now i'm in a company where a 40 year old is somehow the lead with very little experience... how the turn tables
I worked at a place that did government work and every contract called for 'software best practices'. Unfortunately that was never defined. So we just did what we always did. No one complained.
Best practices is to get everyone on a project writing code in a similar way. In both style and in logic. If you need to practice, do it on side projects and not with your companies project
I totally agree, so any new developer coming into the codebase won't have to learn different "best practices", by just studying one you can pretty much understand how the rest work to an extent
what bugs and entertains me most is that he will continue calling it angular.js which basically doesn't exist anymore and me not being able to should ANGULAR back
@@luci868 I know but I feel like he uses points about Angular.js sucking to bring down both lol. Everyone agrees Angular.js is bad, no new project uses it anymore
The purpose of best practices is to enable teams to quickly adapt and change to the needs of the business by following commonly agreed upon “rules”. It also enables new engineers to more quickly onboard to projects where more broadly accepted practices are used.
Really good video. I’m in BI and I see following “best practices” as a mantra everywhere. Especially, many of the best practices that companies follow today were developed in the nineties to overcome specific hardware/software limitations, that we don’t have today.
Because he is completely confused on the terminology. Like 80% of the time he said "best practice" he meant "design pattern". The rest of the time he meant framework.
Omg thank you so much for reminding me of the pottery parable! That had long since left my mind and I am actually very pleased you were able to return it to me(:
It's really not only important to learn what is a best practice in an area, but further why and when it is a best practice. A best practice has it's purpose and reason to be a best practice and is seldom universal. I totally agree to your point of view, Ben Awad.
This video was super helpful. I am a C++ programmer and here is one of the best practices I made: I started out using pure virtual to create a template class. Then I subclass it for each implementation. I used to create a new class as a wrapper but that was silly. I changed it to use a static method in the template class. I write of a lot of platform dependent code so this is really useful
I always keep true to having a set of problems, and if I don't have arguments that those 'best practices' solve them for me, I do not blindly follow them. For example, I am quite firm with code conventions. Because the problem you solve is to be able to make quick assumptions of the code without having waste time doing tons of research behind it. However, if this same problem is solved in a different way, you could argue the best practice no longer has its place. To not hold onto traditions without knowing why.. But as you stated. Write bad code to improve on it. That's why prototyping a concept is a must, especially for new ideas. For you write the bad code in the prototype, and apply the lessons learned in the final product. Great video! This channel gives a lot many programming channels are lacking. The mindset of programming.
Recently I fell into this trap again, because there's a new big project at work, and everyone kept telling me about this framework and that library to try. It made me paranoid about "falling behind" the industry best practice, and I spent so much time reading on those stuff instead of actually making the product. Funny thing is, I ended up concluding that I don't need them. It's silly how easy it is to get obsessed about these things. If whatever tools you're currently using work fine, it's totally okay to just keep using them.
With React for example, if you use Typescript and you start to split components into more manageable pieces of code FROM THE FIRST TIME maybe you realize that you need to write A LOT OF boilerplate code (types) for the props and the signature of the function component, and maybe those components are not going to be reused. So in this case, maybe it's a good idea to refactor when needed, instead of split everything because it's considered a best practice
I so agree with this! You need to experiment with code in order to find out why the best practices are the way they are and for exactly what use cases they have been developed. Never follow blindly something no matter what it is. It's extremely often in software engineering that you need to develop a custom practice and you'll just be lost and use the wrong tool if haven't experimented enough at first.
Three things that I have noticed that improve my code: - Trying to write tests for it. Going through the process of "How can I test this behavior here" reveals how the API can be improved and simplified. - Actually having users--can include yourself. - Revisiting it after a break, this usually shows some parts that aren't clear. "Why the hell is it named ______?" "Why didn't I just abstract this behavior into a function?" "Why am I passing all these parameters around instead of creating a class?"
In the parallel universe where I would work in a team doing anything other than following every anti-pattern in the book, your advice might be helpful. As it stands, my company following every best practice would be a phenomenal improvement.
I just found this channel today, and I absolutely love it, man. So much on-point material. And about 5 videos in, I'm starting to get the feeling that AngularJS killed your family... Blood vengeance that shit, bruh. Good stuff, keep it up, man.
I totally agree, from what I've learned there is no one solution that solves all problems. So based on what you're doing you may feel satisfied with the solution from someone else. Or you might try to adapt the solution to the trade offs that you want. So over all just like you said, just keep trying out new ideas and see what happens.
Ben this advice is so real, I'm self-taught and I don't have a CS degree and was able to land a job at one of the FANG companies as an SDE II, now with that said, I think I gained the most from my learning process as I was building and constantly refactoring my personal projects. I would have code I wrote months ago and end up rewriting the entire package because I learned something new or had my own standard or a more consistent way of doing things like DB handlers and such, anywho at the end of the day what I managed to realize is that all 3-4 implementations I would do for a use case, all of the required features would still work, so what was the point........what your talking bout right now was the point for me, I wrote so much bad code that I ended up developing really good coding habits in the process .........great video.
Completely agree on that. Always question WHY stuff is recommended to be done in a specific way and think for yourself if it would also be beneficial for your project. Best practices don't make any sense if they are just followed blindly without understanding the pros and cons of them.
I agree with this. "Best Practices" is not an excuse for not thinking. I am working on an application where the previous Dec heard all about "best practices" and created seven layers of abstraction between the webpage and the database. But it is just a simple crud app used by less than a few thousand people internally. Meaning that each of the layers just calls the lower layer, adding nothing.
As with everything, utilizing “best practices” requires good judgement. Does it make sense for your project? Use it. Does it not make sense? Don’t use it.
Getting good at software development is just like getting good at other skills in life. I can draw so many parallels from what you're saying and honestly it so true
I think a huge benefit to following best practices is providing uniform coding style in a collaborative project or building software in a company. New developers will be able to understand and contribute quicker if they are familiar with the practices.
i rewrite my side project code for i dont know many times, i do know the whole rewrite cost me half year, in the end my code looks really nice, well structured, easy to use and less prone to mistake, i guess i dont really need a side project, i simply enjoy the brainstorming process
I'm a programmer for almost 20 years now, and I can confirm that what you are saing is very true. Sad think is that usually when you go work in company you will be forced to user their good practices, even if you know they are wrong, and nobody will listen to you. No mather how much experience you have. For good practice I like quote from Mike Acton: "Reason must prevail. If what we are doing is unreasonable or imaginary for any reason, then it have to go"
One thing I didn't like at my web dev internship was being told my code didn't follow best practices, but then when I asked what I should do instead, there wasn't a coherent suggestion on what best practices were. I feel like workplaces should generally follow the same best practices internally so that when it comes time for code review, we all know what to expect and can easily read/debug another person's code.
I agree with the general premise of this video. Talking about specifics, though, it's still worth creating pure components even if it renders the same number of times as stateful components, because it makes it easier to write test cases and debug state-based bugs. Also helps with code organization and speeding up onboarding new members on to the project.
I briefly fell into the best practices which fed my anxiety greatly and I could not complete projects because of trying to make things perfect using best possible practices. This was during my first year of web dev, since then my eyes have opened and I realized most people are talking out of their asses. There is only one and only one goal: get things done. Doesn't matter how you get it done, if it works its as good as it can be. You do this for 100 projects and I guarantee you will develop your own best practices very naturally and have very strong opinions along with solid reasons to back those opinions with.
4 ปีที่แล้ว +1
Ok, you earned my respect 👍 *(subscribed and bell activated)*
See, now that I can understand. I can even understand eating it upsidedown because you want to suck everything out the bottom like a chupacabra and make horrible noises at the end. What I can't understand is you holding your ice cream cone upsidedown because someone told you it's a cleaner way to eat it.
Such a great video Ben, I was struggling trying to write best code right from the beginning of the projects, wasting tons of time and overengineering and not having any outcome at the end.
Hey Ben, pure components address a major issue with react paradigm. That is when a state updates, a valid state change is any new object pointer. That is a valid state change consists of two objects being the exact same. That's one problem. There is another major problem that I will go into if you inquire. Pure components have an inherent cost of in the worst case, comparing large sets of object key values to determine equality. However in most cases we can know right away, if the number of keys differ at any of the object branches
My best practice is coding while I'm high. It's great! 🍁💨 EDIT: I love that the dude in the video (Ben I guess is his name) even went on to talk about pot at around 3:40
“Best practices” are things that can be defined as something you should always do, and have good reason/logic why. For example, it’s best practice to never leave your full database credentials in code on code help for stackoverflow. But a good practice old be something that is good to do, which can be entirely ignored, but doing it too much is not good (generally anything you hear currently as ‘best practice’, is just ‘good practice). For example, it is good to use comments, you can skip them entirely if you want- it won’t absolutely hurt you, but using them too much will cause issues.
There's nothing wrong with best practices or patterns or whatever. The problem comes when people take them to the extreme, and you said it well when people use "because it's best practice" as the answer to why they did something. I'm glad you can see that being so young. That proves to me it's an attitude issue, not an experience issue.
Do you have references to that "art students making pots" story? Or is it some kind of invented anecdote created to make a point? I liked that story and the philosophy behind it, and it resonates with things i'm figuring out in my life at the moment. So, if it exists, i'd love a reference to that story/article/study/anecdote.
I agree, ill write a component or some method of doing something for one whole part say like a login part and then when I get to a register component for a website. I’ll figure some new way that is better than the old. Then convert the old code to the new and boom, faster better code Becuase I moved on to a new component
Amazing video I was facing a similarité problem when i use best practice instead of my own ideas even when i see thoses best practices does not much with the current project
I remember reading about that pottery story in Art & Fear by David Bayles & Ted Orland. It's a great book! You'd be surprised on how many similarities there are with the classical conceptual approaches towards painting and programming :)
Really insightful. Thanks. I was looking for best practices for the last 2 years and cause of that everyone think I'm as good as a tech lead. However, It prevent me from thinking simple and make it hard to learn new thing considering so many unnecessary steps I take when checking something new.
The key is to study and understand many practices and paradigms until you reach the point where you’re experienced enough to understand the bad practices. It help you decide what’s right for the task. This may be used in many aspects of life.
4:27 Yeah everyone should at least try to make their own best practice **BUT** I would say if you're in a team follow their practice and everyone should respect those. And there is tool like prettier to simplify this process.
The biggest thing that held me back from teaching myself C# was getting caught up in trying to follow best practices. I finally hit a point where I said fuck it & made some really stupid, half-ass, sloppy solutions in my code, and actually debugging all of that shit taught me way more about writing code than any best practice lecture, or me sitting there for 30 minutes trying to figure out how to implement modularization for a system that i'm only going to realistically need for one thing.
When you try to follow best practices for structuring & organizing your code before you have even tried to write that code, you won't fully understand why that practice is even relevant in the first place. You'll latch on and fixate towards certain details of the practice, miss the entire point of it, and stress yourself out. One youtuber 'javidx9' talks a lot about making mistakes and learning from them is what helps somebody understand how to write code better & he is a C++ god in my eyes.
Finally someone acknowledges that most JS frameworks are a disease in the modern web. The amount of bloat is just crazy. Most JS assets (visual effect, input verification, etc.) can be implemented in a few lines of native JS. Fun fact, most people who know React or Angular don't know native JS or what is going on behind the scenes.
Yes. And if that's all your doing, is a few forms, then native JS is fine. But then you need to navigate and then pop a modal and then store some data for persistance and then apply some business logic and then... oh you have now basically recreated a crappy version of Vue/React/Angular Right tool for the job.
You just need to understand where these "best practices" come from and what they can help you with. Then you'll be able decide for yourself whether or not it's a good idea to follow them in your context.
Hey, could not agree more.. for me often the thing is also when someone is like "this is the best pratice" often ist that they do not even udnerstand why, I think that is also part of the problem.. not understanding why one way is better than another. It kinda goes hand to hand with "you have to write bad code first". Understand why something is good and be able to say "I prefer this method because..." instead of just "it is best practice, thats why I do it" also shows way more competence (of course this is just my opionion)
Yeeee, if you are a noob your best scenario is following any 'best practice' you can find untill you can form your own opinion. The important part is being able to detach, I think that's how everyone learns anyway, everyone just comes to a realisation that 'best practices' are situational and shouldn't be blindly followed, but when you are new you don't know any better.
How many hours a week do you work as thought leader? What does a carrot farmer work, like 3-6 hours a season riding some cool heavy equipment to plant and then harvest his orange gold?
Referring to "Best practice" is basically just saying that your unable or unwilling to argue for a solution so you are going to refer to some medium article that is completely devoid from the particulars of your specific problem.
"writing bad code is a prerequisite to writing good code"
can't agree more
l think same. You can't learn just listen and reading how to code. You just need to write. And write more and more code to write better. Some people on internet will say your code is bullshit. They are just wrong.
Yeah, I write bad code, then refactor it to other bad code. c:
same. I just write something that solves my problem, then I refactor and pretify.
Not gonna lie, this hit me on a completely different level
People that write bad code when they first start out should not be programmers.
Not everyone should learn Computer Science.
I had a professor that was an experienced programmer, he urged us to use simplicity and readable code.
Roasting AngularJS is a best practice that must be followed
I officially hate you
UFO Driver XD
Angularjs haters are hipsters devs, so it must be good.... Just kidding, as a angularjs dev migrating to react, you are right hahhahah
@@matheusBBarni You fool! Try Angular with TypeScript!
Really, though, as the guy says on the vid, the things you use depend a lot on what you are doing. Personally, I prefer React for small/medium projects and Angular for complex projects. I'm even using AngularJS right now as a first step to port a project that's badly written on PHP with vanilla JS... it's a nightmare
People always conflate AngularJS and Angular, missing that they're actually two quite different frameworks. Yes, AngularJS was trash, but Angular is pretty good if you want a complete solution
Step 1: write code, make sure it works
Step 2: reflect on the code. See what works, what doesn't. What you like, what yo don't like
Step 3: retry making said code. Maybe just some small tweaks, maybe a new radical approach
Step 4: repeat 1-3
Congratulations! You're know on the path to become an actual good dev
I got fired
@@vivekvitthalraopatil2775 😂
Refactor
“this is mostly a problem with junior developers”
*looks 19*
MoonPadUSer I mean, this channel is 9 years old, and he started uploading 6 years ago.
nah man it's legit, junior/senior developer is a state of mind
i'm 29 with 4 years of experience, 3 years ago i was mad at taking direction from a 20 year old but realised within a month or two i needed to leave to gain more exp elsewhere... now i'm in a company where a 40 year old is somehow the lead with very little experience... how the turn tables
@@apolloeosphoros4345 "junior/senior developer is a state of mind" THIS.
I've heared he just got the "Pubic Hair Unlocked" achievement.
I knew a guy who started coding at 11 and now at 19 he knows more about code than me... and I'm 34.
I worked at a place that did government work and every contract called for 'software best practices'. Unfortunately that was never defined. So we just did what we always did. No one complained.
Not going to lie I have heard of contracts that have used those exact same words lol. I think "best practice" is pretty subjective.
Lmao. Was this for the air force?
I think those mean: Don't be a hack that makes Italian cuisine and write proper maintainable code.
Best practices is to get everyone on a project writing code in a similar way. In both style and in logic. If you need to practice, do it on side projects and not with your companies project
Agreed. It should look like it's been written by one author.
I totally agree, so any new developer coming into the codebase won't have to learn different "best practices", by just studying one you can pretty much understand how the rest work to an extent
I agree. As lng as the company approach isn't completely stupid, it's usually better to follow it, rather than break cohesion.
to think like that is propably a disease by framework users :D low level code from scratch has always a touch of the author. If u want it or not
It's amazing how Ben roasts angular so well, that even as an Angular developer, I'm so excited to see what roasts he comes up with every video 😂
what bugs and entertains me most is that he will continue calling it angular.js which basically doesn't exist anymore and me not being able to should ANGULAR back
@@henrymussemann3253 100x times agree, I've thought about making a response video called Angular.js is not Angular lol
He means Angular.js tho, as he separately roasted Angular.js and Angular in the same video one time
@@luci868 I know but I feel like he uses points about Angular.js sucking to bring down both lol. Everyone agrees Angular.js is bad, no new project uses it anymore
shut up! You are not angular developer.
God: What did you all do in your life.
Web developers: We build the same thing with 100 different framework.
God: ...
sounds like an incredibly interesting investigation to me...
@@joe_3y3s It's called TodoMVC :)
It's like making love with the same woman in 100 different ways--or so I tell myself
@@dealloc thats perfect, thank you!
@@deleted01 its not a women stop objectification of frameworks :D
Note to self: start growing a lot of pot to become a good developer
Programming high is the best shit ever
aidxn agredoo
I’m definitely a senior developer then
@@kickeddroid im gonna give this a go!
@@EssLoco so
Best practice: Complete your tasks on-time so you have a job the next day.
The purpose of best practices is to enable teams to quickly adapt and change to the needs of the business by following commonly agreed upon “rules”. It also enables new engineers to more quickly onboard to projects where more broadly accepted practices are used.
I can't help but notice your framed photo is slowly sinking.
Jake Birkes - he is still growing
Just like humanity
Just like angular
I looked up a hanging photos tutorial and it said that's best practise.
It's a best practice
Really good video. I’m in BI and I see following “best practices” as a mantra everywhere. Especially, many of the best practices that companies follow today were developed in the nineties to overcome specific hardware/software limitations, that we don’t have today.
You got me sweating for a minute there with that class component 😅
Waiting for ur course on new reanimated 🙌🙌🙌
Big fan of your reanimated content! 🤗
Bro, best practice makes best perfect.
Love it! I’m often hesitant to try/start new things! This is useful in any context.
I've never heard anyone refer to a framework or library as a "best practice."
ikr, that's what I thought.
I believe he is saying that the use of frameworks in general is the "best practice" not a specific one
Because he is completely confused on the terminology. Like 80% of the time he said "best practice" he meant "design pattern". The rest of the time he meant framework.
stdlib.h is a best practice for C code rather than writing dynamic memory allocations and file accesses in assembly code.
jQuery on stackoverflow...
Omg thank you so much for reminding me of the pottery parable! That had long since left my mind and I am actually very pleased you were able to return it to me(:
It's really not only important to learn what is a best practice in an area, but further why and when it is a best practice. A best practice has it's purpose and reason to be a best practice and is seldom universal. I totally agree to your point of view, Ben Awad.
"javascript frameworks are a disease"... you get a thumbs up for that sir!
I laughed out loud at this line.
@@KyleSmithNH me too ! :D everyone in the industry knows that
This video was super helpful. I am a C++ programmer and here is one of the best practices I made:
I started out using pure virtual to create a template class. Then I subclass it for each implementation. I used to create a new class as a wrapper but that was silly. I changed it to use a static method in the template class. I write of a lot of platform dependent code so this is really useful
Theres a kind of related talk: "Navigating the Hype-Driven Frontend Development World Without Going Insane"
@Shalin Singh lol okay singh
"I just learnt this perfect stack for graphql there---- aaaaand 2 of the frameworks I was using became deprecated"
"writing bad code is a prerequisite to writing good code"
Great advice !
I always keep true to having a set of problems, and if I don't have arguments that those 'best practices' solve them for me, I do not blindly follow them.
For example, I am quite firm with code conventions. Because the problem you solve is to be able to make quick assumptions of the code without having waste time doing tons of research behind it. However, if this same problem is solved in a different way, you could argue the best practice no longer has its place.
To not hold onto traditions without knowing why..
But as you stated. Write bad code to improve on it. That's why prototyping a concept is a must, especially for new ideas. For you write the bad code in the prototype, and apply the lessons learned in the final product.
Great video! This channel gives a lot many programming channels are lacking. The mindset of programming.
How have I not found you before. I didn't know that this was gonna be super insightful. Subscerbed!
This is great. I already know everything you talked about but I just never internalized it and thus never consciously made an effort to do it. Thanks
Video may be a month old, but I needed this. I'm gonna go make some pots. Thanks Ben.
Recently I fell into this trap again, because there's a new big project at work, and everyone kept telling me about this framework and that library to try. It made me paranoid about "falling behind" the industry best practice, and I spent so much time reading on those stuff instead of actually making the product. Funny thing is, I ended up concluding that I don't need them.
It's silly how easy it is to get obsessed about these things. If whatever tools you're currently using work fine, it's totally okay to just keep using them.
m8 i luv u
im so glad i found this channel
With React for example, if you use Typescript and you start to split components into more manageable pieces of code FROM THE FIRST TIME maybe you realize that you need to write A LOT OF boilerplate code (types) for the props and the signature of the function component, and maybe those components are not going to be reused. So in this case, maybe it's a good idea to refactor when needed, instead of split everything because it's considered a best practice
Everything about this video, is diamond tier advice. Otherwise known as a Best Practice.
I so agree with this! You need to experiment with code in order to find out why the best practices are the way they are and for exactly what use cases they have been developed. Never follow blindly something no matter what it is. It's extremely often in software engineering that you need to develop a custom practice and you'll just be lost and use the wrong tool if haven't experimented enough at first.
My gawd, I think this is the funniest "TECH" channel I've come across in a long while.
Three things that I have noticed that improve my code:
- Trying to write tests for it. Going through the process of "How can I test this behavior here" reveals how the API can be improved and simplified.
- Actually having users--can include yourself.
- Revisiting it after a break, this usually shows some parts that aren't clear. "Why the hell is it named ______?" "Why didn't I just abstract this behavior into a function?" "Why am I passing all these parameters around instead of creating a class?"
In the parallel universe where I would work in a team doing anything other than following every anti-pattern in the book, your advice might be helpful. As it stands, my company following every best practice would be a phenomenal improvement.
I just found this channel today, and I absolutely love it, man. So much on-point material. And about 5 videos in, I'm starting to get the feeling that AngularJS killed your family... Blood vengeance that shit, bruh. Good stuff, keep it up, man.
I totally agree, from what I've learned there is no one solution that solves all problems. So based on what you're doing you may feel satisfied with the solution from someone else. Or you might try to adapt the solution to the trade offs that you want. So over all just like you said, just keep trying out new ideas and see what happens.
this guy is so well spoken, honestly better then any programming self help book.
Love the correlation you gave with the teacher and pottery example. Pretty applicable😍
Ben this advice is so real, I'm self-taught and I don't have a CS degree and was able to land a job at one of the FANG companies as an SDE II, now with that said, I think I gained the most from my learning process as I was building and constantly refactoring my personal projects. I would have code I wrote months ago and end up rewriting the entire package because I learned something new or had my own standard or a more consistent way of doing things like DB handlers and such, anywho at the end of the day what I managed to realize is that all 3-4 implementations I would do for a use case, all of the required features would still work, so what was the point........what your talking bout right now was the point for me, I wrote so much bad code that I ended up developing really good coding habits in the process .........great video.
Completely agree on that. Always question WHY stuff is recommended to be done in a specific way and think for yourself if it would also be beneficial for your project. Best practices don't make any sense if they are just followed blindly without understanding the pros and cons of them.
Dude, our CTO whenever sees my code he always says use best practices,
Why is your cto looking at your code...
@Dave N boooiiiii
@@hassanharajly4895 must be a startup!
@@hassanharajly4895 he is tech lead also, and we are startup
@Dave N yeah i know and i appreciate that he is telling me to do in better way 🙌
"Why are you holding this ice cream upsidedown ?"
"It's a best practice ... Oh, ~icy cool~"
Everything is moving so fast that in most cases you have no other choice then to follow "Best Practices". Thanks Ben for great video.
awesome analysis bro ! keep it up !
This reminds me of my OOP teachers at uni. They're like "MVC ALL the things!", even if it's a web scraper or a to do list...
"Reflect" is a vastly underused tool in software development. Great advice!
I agree with this. "Best Practices" is not an excuse for not thinking. I am working on an application where the previous Dec heard all about "best practices" and created seven layers of abstraction between the webpage and the database. But it is just a simple crud app used by less than a few thousand people internally. Meaning that each of the layers just calls the lower layer, adding nothing.
100K subs now. You deserve a million bro
Expected a pure comedy video, not disapointed and subscribed.
Good idea! Thanks Ben
As with everything, utilizing “best practices” requires good judgement. Does it make sense for your project? Use it. Does it not make sense? Don’t use it.
And if the project doesn't use blockchain and machine learning, don't even bother with that shit.
Unfortunately, good judgment is a luxury. Otherwise the world will be a much better place to live in
Getting good at software development is just like getting good at other skills in life. I can draw so many parallels from what you're saying and honestly it so true
This is something that I had to hear. Ty!
I think a huge benefit to following best practices is providing uniform coding style in a collaborative project or building software in a company. New developers will be able to understand and contribute quicker if they are familiar with the practices.
This was so required! Thanks for creating this video :)
i rewrite my side project code for i dont know many times, i do know the whole rewrite cost me half year, in the end my code looks really nice, well structured, easy to use and less prone to mistake, i guess i dont really need a side project, i simply enjoy the brainstorming process
I'm a programmer for almost 20 years now, and I can confirm that what you are saing is very true.
Sad think is that usually when you go work in company you will be forced to user their good practices, even if you know they are wrong, and nobody will listen to you. No mather how much experience you have.
For good practice I like quote from Mike Acton: "Reason must prevail. If what we are doing is unreasonable or imaginary for any reason, then it have to go"
"writing bad code is a prerequisite to writing good code"
definitely going on the sticky note on my monitor.
One thing I didn't like at my web dev internship was being told my code didn't follow best practices, but then when I asked what I should do instead, there wasn't a coherent suggestion on what best practices were. I feel like workplaces should generally follow the same best practices internally so that when it comes time for code review, we all know what to expect and can easily read/debug another person's code.
I agree with the general premise of this video. Talking about specifics, though, it's still worth creating pure components even if it renders the same number of times as stateful components, because it makes it easier to write test cases and debug state-based bugs. Also helps with code organization and speeding up onboarding new members on to the project.
"Javascript frameworks are a disease infecting the modern web." This, but unironically.
just let prettier figure it out
Code formating != best practices
good indentations !== best practices (:
linting is not just code formatting
@@nile7999 Prettier is not a linter
What a bunch of nerds ;)
Bro whoever made typescript needs to see this
I feel so motivated and seen right now lmao 🥰😂🤣
Seriously, that was amazing thank you!🙏🏻
Writing bad code is a pre requisite to writing good code - Ben Awad, 2020
Junior developer to Senior developer *let me show you how spaghetti is made*
My thesis is about best practices in software engineering... TH-cam algorithm knows me well haha
I briefly fell into the best practices which fed my anxiety greatly and I could not complete projects because of trying to make things perfect using best possible practices. This was during my first year of web dev, since then my eyes have opened and I realized most people are talking out of their asses. There is only one and only one goal: get things done. Doesn't matter how you get it done, if it works its as good as it can be. You do this for 100 projects and I guarantee you will develop your own best practices very naturally and have very strong opinions along with solid reasons to back those opinions with.
Ok, you earned my respect 👍 *(subscribed and bell activated)*
Maybe I like holding my ice cream cone upside down, don't judge me
See, now that I can understand. I can even understand eating it upsidedown because you want to suck everything out the bottom like a chupacabra and make horrible noises at the end. What I can't understand is you holding your ice cream cone upsidedown because someone told you it's a cleaner way to eat it.
Such a great video Ben, I was struggling trying to write best code right from the beginning of the projects, wasting tons of time and overengineering and not having any outcome at the end.
This is when I realized i was fucking up my code when i know little about react and using eslint-prettier-airbnb-config. 😞
Hey Ben, pure components address a major issue with react paradigm. That is when a state updates, a valid state change is any new object pointer. That is a valid state change consists of two objects being the exact same. That's one problem. There is another major problem that I will go into if you inquire. Pure components have an inherent cost of in the worst case, comparing large sets of object key values to determine equality. However in most cases we can know right away, if the number of keys differ at any of the object branches
My best practice is coding while I'm high. It's great! 🍁💨
EDIT: I love that the dude in the video (Ben I guess is his name) even went on to talk about pot at around 3:40
“Best practices” are things that can be defined as something you should always do, and have good reason/logic why. For example, it’s best practice to never leave your full database credentials in code on code help for stackoverflow.
But a good practice old be something that is good to do, which can be entirely ignored, but doing it too much is not good (generally anything you hear currently as ‘best practice’, is just ‘good practice). For example, it is good to use comments, you can skip them entirely if you want- it won’t absolutely hurt you, but using them too much will cause issues.
As far as programming advise, this is some of the best I have heard in a long time, seriously!!!
There's nothing wrong with best practices or patterns or whatever. The problem comes when people take them to the extreme, and you said it well when people use "because it's best practice" as the answer to why they did something.
I'm glad you can see that being so young. That proves to me it's an attitude issue, not an experience issue.
Do you have references to that "art students making pots" story? Or is it some kind of invented anecdote created to make a point? I liked that story and the philosophy behind it, and it resonates with things i'm figuring out in my life at the moment. So, if it exists, i'd love a reference to that story/article/study/anecdote.
Congrats on the 100k Ben.
This video is like opening of my third eye
that anecdote was a banger
I agree, ill write a component or some method of doing something for one whole part say like a login part and then when I get to a register component for a website. I’ll figure some new way that is better than the old. Then convert the old code to the new and boom, faster better code Becuase I moved on to a new component
thank you for this video, Thought Leader Ben
Amazing video
I was facing a similarité problem when i use best practice instead of my own ideas even when i see thoses best practices does not much with the current project
I remember reading about that pottery story in Art & Fear by David Bayles & Ted Orland. It's a great book! You'd be surprised on how many similarities there are with the classical conceptual approaches towards painting and programming :)
Really insightful. Thanks.
I was looking for best practices for the last 2 years and cause of that everyone think I'm as good as a tech lead. However, It prevent me from thinking simple and make it hard to learn new thing considering so many unnecessary steps I take when checking something new.
Hey this is actually a pretty good and informative video, well done
The key is to study and understand many practices and paradigms until you reach the point where you’re experienced enough to understand the bad practices. It help you decide what’s right for the task. This may be used in many aspects of life.
4:27 Yeah everyone should at least try to make their own best practice **BUT** I would say if you're in a team follow their practice and everyone should respect those.
And there is tool like prettier to simplify this process.
Prettier solves the code formatting problem but not the code quality problem, so I prefer ESLint/TSLint to set "best practices" for a team
1:04 The face I make when I’m surfing the internet on incognito mode instead of coding
The biggest thing that held me back from teaching myself C# was getting caught up in trying to follow best practices. I finally hit a point where I said fuck it & made some really stupid, half-ass, sloppy solutions in my code, and actually debugging all of that shit taught me way more about writing code than any best practice lecture, or me sitting there for 30 minutes trying to figure out how to implement modularization for a system that i'm only going to realistically need for one thing.
When you try to follow best practices for structuring & organizing your code before you have even tried to write that code, you won't fully understand why that practice is even relevant in the first place. You'll latch on and fixate towards certain details of the practice, miss the entire point of it, and stress yourself out.
One youtuber 'javidx9' talks a lot about making mistakes and learning from them is what helps somebody understand how to write code better & he is a C++ god in my eyes.
0:07, rEaCt is a good fRaMeWork (i saw your tweet today, haha)
Finally someone acknowledges that most JS frameworks are a disease in the modern web. The amount of bloat is just crazy. Most JS assets (visual effect, input verification, etc.) can be implemented in a few lines of native JS. Fun fact, most people who know React or Angular don't know native JS or what is going on behind the scenes.
Yes. And if that's all your doing, is a few forms, then native JS is fine.
But then you need to navigate
and then pop a modal
and then store some data for persistance
and then apply some business logic
and then...
oh you have now basically recreated a crappy version of Vue/React/Angular
Right tool for the job.
You just need to understand where these "best practices" come from and what they can help you with. Then you'll be able decide for yourself whether or not it's a good idea to follow them in your context.
Hey, could not agree more.. for me often the thing is also when someone is like "this is the best pratice" often ist that they do not even udnerstand why, I think that is also part of the problem.. not understanding why one way is better than another. It kinda goes hand to hand with "you have to write bad code first". Understand why something is good and be able to say "I prefer this method because..." instead of just "it is best practice, thats why I do it" also shows way more competence (of course this is just my opionion)
Yeeee, if you are a noob your best scenario is following any 'best practice' you can find untill you can form your own opinion. The important part is being able to detach, I think that's how everyone learns anyway, everyone just comes to a realisation that 'best practices' are situational and shouldn't be blindly followed, but when you are new you don't know any better.
As an Android dev I agree with most of this but if Jake Wharton enters the chat then we must bow to our dear leader
How many hours a week do you work as thought leader? What does a carrot farmer work, like 3-6 hours a season riding some cool heavy equipment to plant and then harvest his orange gold?
Referring to "Best practice" is basically just saying that your unable or unwilling to argue for a solution so you are going to refer to some medium article that is completely devoid from the particulars of your specific problem.