5 Tips For Writing JavaScript FASTER!
HTML-код
- Опубликовано: 1 авг 2024
- Use these 5 tips to start writing JavaScript faster RIGHT NOW!
Original Tweet - jamesqquick/statu...
*DISCORD*
Join the Learn Build Teach Discord Server 💬 - / discord
*STAY IN TOUCH 👋*
Newsletter 🗞 - www.jamesqquick.com/newsletter
Follow me on Twitter 🐦 - / jamesqquick
Check out the Podcast - compressed.fm/
Courses - jamesqquick.com/courses
*QUESTIONS ABOUT MY SETUP*
Check out my Uses page for my VS Code setup, what recording equipment I use, etc. www.jamesqquick.com/uses
*TIMESTAMPS*
00:00 - Intro
00:15 - Using Intellisense in Your Editor
01:30 - Use Snippets and Snippet Extensions
03:40 - Github Copilot
05:25 - Plan For Errors
07:40 - Use TypeScript
09:15 - Additional Meta Examples
11:00 - Wrap Up
Two things I’ve done is I write a snippet of code in chatGPT and say “can you optimize this piece of code” & I just ask chatGPT to write small JavaScript snippets of code for me. I’ve saved hours writing code the past few months
This is not the best idea :) better use word refactor instead of optimize.
Optimize in most cases will only change you code syntax
@@wixoooooo ooooh what’s the differences between the two in your opinion?
Optimize and refactor are separate things. Optimize you can optimize for speed or space. Refactor is for readability and reusability.
@@JohnDoeX1966
If you have a piece of code and you want make it more performant you should look for Optimization.
If you have Spaghetti code and want make it more readable you should look for Refactoring.
But as far as I can see chatGPT has different view on this. If you will write for loop and ask GPT optimize it, it will upgrade code and will replace your for loop with .map(), but that's not optimization, because in many cases .map() is way way slower then for loop and more memory expensive.
But if you ask chatGPT to refactor your code chatGPT can 1.) Change your algorithm 2.) use some techniques to improve performance ( like add cache functions ) 3. ) and make spaghetti into a more readable code - Like all in one
Absolutely incredible ! Thanks James !
This is absolute gold.
I always have to remind myself to focus on 1 thing at a time, as it is very easy to chase the different threads when implementing something.
Yeah that's a challenge for me too!
Funny, I saw James' Twitter post yesterday asking his question about code writing speed and didn't realize it would be used as fodder for a YT video. Good stuff!
bahaha yeah I take a lot of inspiration from Twitter :)
Hi James!
Congrats for such a great channel!
I loved your VS Code settings....what set of fonts do you use?
Thanks!
I would like to know it aswell!
hi James please what is the extension name when u type the red line comes up next to the code + terminal I like to know that one u didn't mention that thx for the video so I'm not using co-pilot because I'm a beginner so maybe next year and other I know all of them thx
I wanted to ask the very same question… could you please help us out?
I am completely new to JS and VSCode, but I think that the quokka extension gives out those comments. The terminal keps mentioning quokka...
@@sebaur thank u so much bro i got it thx
@@javiercastanos9126 quokka extension
Yep, it's Quokka. It's AMAZING!
Great tips, I would definitely switch from using codepen to quokka ;d
Quokka is excellent. A real game changer. 5/5 ⭐⭐⭐⭐⭐
Been using JS for over 2 years now but started using TS for about 5 months, JUST LOVE IT!!!! NEVER GOING BACK!!!
Same! I use it for every new project!
I guessed the fifth one, when you said disclaimer about it in the initial video🤣🤣
hahahaha nicely done!
Great video, James :-) I personally couldn't live without "rfc" snippet (I think you know what I mean :-D). All types were very useful, I still consider trying co-pilot, but I'm still a junior developer. Do you think using a co-pilot is a good idea for me? And the last point, I personally think that Typescript is the future of JS, and it's necessary to know it. For example, if someone tries Angular, there is no other choice than use TS. And other frameworks, such as React and Vue, also went for TS in their new version, didn't they? In addition, in my opinion, TS captures a large number of errors already during code compilation, so it does not have to be complicated to debug in JS runtime, or even intelli sense in VS Code will catch them (depends how strict your TSConfig is ofc). Thank you!
I don't recommend Copilot for true beginners. The most important thing is to make sure that you understand all the things Copilot does for you. So, if you try it, and find it writing code for you that you couldn't write yourself, maybe back off. If you find it writing code that already makes sense for you, go for it!
When is "Copilot X" due for release?
I don't know. I actually don't know what is? Care to share?
Why aren't you on odysee bro, your content is so amazing.
Thank you! Also what is odysee?
You don't need to use typescript, jsdoc will do the same thing without needing to compile the code.
Now we need "5 Tips For Writing JavaScript that executes FASTER!"
Already planing on it!
@@JamesQQuick Bun? Bun.
like saying best tips to use Microsoft = > buy an apple computer
Not sure I'm really following that?