Writing code is easy. Writing clean code, though, is much harder. In this video I take a look at two different code examples from a beginner, intermediate, and advanced level. The goal of this is to show you how a senior developer will think while programming and how they will structure their code to be as clean and well-written as possible.
- How senior developers think - Using guard clauses to clean up code - The differences between senior and junior developers - What to think about when programming
? IMPORTANT:
1 Year Free Hosting: https://www.atlantic.net/webdevsimplified
Use code KYLE for an additional $50
The command pattern is probably my favorite design pattern, because of all the fun things you can do with it. The idea of the command pattern is to create an abstraction between the operations an object can do, its commands, and the actual commands themselves. This makes it really easy to combine together or chain different commands without having to change the code. The program can dynamically chain and combine these actions. The best part is since each command is its own object you can easily implement and undo function for each command and make a set of undo-able actions.
? Materials/References:
GitHub Code: https://github.com/WebDevSimplified/Design-Patterns/tree/master/Command%20Pattern
Design Patterns Playlist: https://www.youtube.com/watch?v=BWprw8UHIzA&list=PLZlA0Gpn_vH_CthENcPCM0Dww6a5XYC7f
? Concepts Covered:
- What the command pattern is
- Why the command pattern is important
- How to implement the command pattern in JavaScript
- When to use the command pattern
? Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
#CommandPattern #WDS #DesignPatterns
...
https://www.youtube.com/watch?v=GQzfF5EMD7o
Pagination is one of the easiest ways to increase the performance of any application you are working on. Luckily setting up pagination is actually pretty simple. In this video I am going to show you the exact process to set up pagination in your own API by going through three distinct steps. First we will build out the most simple pagination set up which will get us started with pagination. After that we will implement a middleware to take care of pagination for use so we can paginate all of our endpoints easily. Lastly, we will connect out paginated API to a MongoDB database so we can have a fully functional paginated API with database storage.
? Materials/References:
How To Install MongoDB: https://youtu.be/wcx3f0eUiAw
GitHub Code: https://github.com/WebDevSimplified/Paginated-API-Express
? Concepts Covered:
- How to accept pagination params in an API
- How to create a pagination middleware
- Creating a middleware that accepts parameters
- Paginating a MongoDB collection
? Find Me Here:
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
#Pagination #WDS #API
...
https://www.youtube.com/watch?v=ZX3qt0UWifc
? IMPORTANT:
Checkout Frontity: https://bit.ly/frontity-webdevsimplified
Frontity is an incredible tool for creating headless WordPress sites using React. It takes all the pain of dealing with PHP and WordPress directly and wraps it up into a nice and easy to use container. In this video I will show you how to use Frontity to create a simple WordPress theme with React and also how to use React Spring to add custom page transitions to your WordPress site.
? Materials/References:
GitHub Code: https://github.com/WebDevSimplified/Frontity-Blog
? Concepts Covered:
- How to create a Frontity site
- How to add page transitions in Frontity
- Why React is so much nicer to work with for WordPress themes
? Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:41 - Demo
01:13 - Create Initial Project
04:50 - Frontity Packages Explained
08:45 - Most Important Components
09:44 - Modifying Styles
10:43 - Page Transitions
15:19 - Deployment
18:22 - Outro
#Frontity #WDS #HeadlessWordPress
...
https://www.youtube.com/watch?v=whsYQ9fb64k
Arrow functions are great. I love how concise and easy to read they are, but I only use them in a two specific situations. In all other scenarios I use normal functions. In this video I talk about what those two scenarios are and why I prefer to use normal functions in all other cases.
? Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:38 - #1 Reason I Use Normal Functions
02:35 - When I Use Arrow Functions
05:09 - Another Reason To Use Normal Functions
#ArrowFunctions #WDS #JavaScript
...
https://www.youtube.com/watch?v=5iGGvJn8K1U
? IMPORTANT:
1 Year Free Hosting: https://www.atlantic.net/webdevsimplified
Use code KYLE for an additional $50
Should you write comments in your code? It may seem like an easy yes since comments are much easier to read than code, but it is surprisingly more complicated then that. Comments actually can cause some significant downsides to your code which are not always obvious, so in this video I will be breaking down when you should use comments and most importantly when you shouldn't use comments.
? Materials/References:
Code Review Playlist: https://www.youtube.com/watch?v=UphEnjnoxSg&list=PLZlA0Gpn_vH9zVjz-9RBOVdZa7D6QTumX&index=1
? Concepts Covered:
- When to use comments
- Why comments can be bad
- When to not use comments
? Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
#Comments #WDS #JavaScript
...
https://www.youtube.com/watch?v=QOXLoIbfm7M