🚨 STOP Listening to Tech Twitter & Do THIS Instead

  Рет қаралды 259,294

Dave Gray

Dave Gray

Күн бұрын

Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGra...
🚨 STOP Listening to Tech Twitter & Use This VS Code Extension Instead
🚩 Subscribe ➜ bit.ly/3nGHmNn
📬 Course Updates ➜ courses.davegr...
❓ Questions - Please post them to my Discord ➜ / discord
☕ Buy Me A Coffee ➜ www.buymeacoff...
👇 Follow Me On Social Media:
Github: github.com/git...
Twitter: / yesdavidgray
LinkedIn: / davidagray

Пікірлер: 162
@chawkichalladia1812
@chawkichalladia1812 Жыл бұрын
I personally prefer being explicit and even my variable names sometimes look like a sentence.
@michaelatorn8380
@michaelatorn8380 Жыл бұрын
"const consoleLog = console.log"
@chawkichalladia1812
@chawkichalladia1812 Жыл бұрын
@@michaelatorn8380 why tho xD
@michaelatorn8380
@michaelatorn8380 Жыл бұрын
@@chawkichalladia1812 It's explicit!
@chawkichalladia1812
@chawkichalladia1812 Жыл бұрын
@@michaelatorn8380 isn't leaving it as is more explicit lol
@michaelatorn8380
@michaelatorn8380 Жыл бұрын
@@chawkichalladia1812 It do be like that sometimes😳
@ahmad-murery
@ahmad-murery Жыл бұрын
In JavaScript you can even modify/extend a built-in function/method as needed, and while this looks cool it will certainly confuse the others. Thanks Dave!
@play005517
@play005517 Жыл бұрын
Literal example for you can doesn't mean you should
@ahmad-murery
@ahmad-murery Жыл бұрын
@@play005517 so true
@stevenson1142
@stevenson1142 Жыл бұрын
or use snippets. I use "cl" and don't have to worry about another keyboard shortcut and extra boilerplate
@zaki_1337
@zaki_1337 Жыл бұрын
Same, all of this is unnecessary
@emanuelefavero
@emanuelefavero Жыл бұрын
Yeah you can even type just one letter and the snippet will come out. Idk why this is issue is a thing
@Eggs-n-Jakey
@Eggs-n-Jakey 5 ай бұрын
Mm babe just like me fr
@kotted
@kotted Жыл бұрын
There is a built in feature for loging in vscode. You can log just by marking, instead of writing statements
@zynferno
@zynferno Жыл бұрын
Thanks for constantly uploading no BS content Dave. I am currently starting a coding tutorial channel and you are one of my main inspirations. Thank you
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
That's awesome! Thank you for the kind words! 🙏
@8koi245
@8koi245 Жыл бұрын
having the extension always visible is just *chef kiss* perfect!
@alexanderten9540
@alexanderten9540 Жыл бұрын
Your suggestions are clear for the right. Bottom questions are who will be able to investigate this problems and for what reason; and add second log of reasons and accept. Well, it is not console at all
@ShortFilmVD
@ShortFilmVD 7 ай бұрын
Anyone else just use a custom logger function? Adds a layer of abstraction between the calling code and the console log. Ergo, you can easily control whether or not logging is turned on, useful in production where you might not want to clutter a client's console, but you can set a flag to enable logging for debugging. You can also change where the logs go to should you wish, e.g. record to a dump and have the application download/send it somewhere for analysis if an exception is encountered. Decoupling and flexibility 👌
@widevader
@widevader Жыл бұрын
i write and delete console.logs so often that renaming it would just confuse me as by now console.log is muscle memory for debugging.
@thatonefoxxy
@thatonefoxxy Жыл бұрын
Same
@zimzimph
@zimzimph Жыл бұрын
You.. don't use breakpoints?
@_kitaes_
@_kitaes_ Жыл бұрын
​@@zimzimphbreakwhat?
@widevader
@widevader Жыл бұрын
@@zimzimph GET OUT OF MY COMMENTS YOU HERETIC. You dare use breakpoints for nodejs instead of console.log. my god man you need some serious help. But no not really i just use console.logs its a habbit ig, plus its easier to print out changes to specific variables at least to me.
@farhanaditya2647
@farhanaditya2647 Жыл бұрын
@@zimzimph nah, too complicated for me.
@dougc84
@dougc84 Жыл бұрын
In Ruby, you have multiple ways to output text. puts, p, print, printf, $stdout, and actually even more. p is shorthand for puts, and people only use it for debugging. Perhaps a “c” function could be an alias not to console.log, but to console.debug.
@MIO9_sh
@MIO9_sh Жыл бұрын
consider a debugger instead of dumping console logs everywhere
@ryankhart
@ryankhart Жыл бұрын
And I was about to say to just use a snippet, but this extension is even better because not only do you not have to type Console.Log, but also the variable value you want it to print.
@trombecher
@trombecher Жыл бұрын
WebStorm or any other JetBrains product supports live templates and you only have to type “log” and are immediately greeted with “console.log()” when pressing TAB
@avrukin
@avrukin Жыл бұрын
This is the first of these posts that comes from someone who actually knows what they are talking about. Thank you for doing your little part in squashing the silliness floating around.
@Ch0rr1s
@Ch0rr1s Жыл бұрын
I agree with the video in a more general form. After 10 years in the industry I'm tired of idiots using abbreviations in their code. It just makes the whole thing hard to read. Be expressive as possible even if you end up with a two line interface name. "CanSendBusSignalViaTransformationProxy" is way easier to understand than "CanSBSviaTP" (real example from coue years ago ...)
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
That is a good example! I have also inherited abbreviations that are meaningless.
@leonardoraele
@leonardoraele Жыл бұрын
You can also just use a Debugger, like a normal person.
@bowiemtl
@bowiemtl Жыл бұрын
It clearly runs in a browser
@leonardoraele
@leonardoraele Жыл бұрын
​@@bowiemtlAre you suggesting browsers don't have debuggers?
@caffeinated-pixels
@caffeinated-pixels Жыл бұрын
I just started using turbo console log this past week, it's definitely a time saver 😀
@petrlaskevic1948
@petrlaskevic1948 5 ай бұрын
Also, if you rename console log like this, it will remove meaningful line numbers where its called from, I think. (maybe its only if I make a custom log function and call console log from there idk now)
@pawe1
@pawe1 Жыл бұрын
I learned a new thing today, Thanks Dave.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad to hear it!
@Eggs-n-Jakey
@Eggs-n-Jakey 5 ай бұрын
That’s rad I just have a snippet called “clog” and usually only need to type cl tab
@abenjamin13
@abenjamin13 Жыл бұрын
WOW 🤩 Thank you 🙏 Dave. Added to VS Code immediately ✅
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@nextProgram
@nextProgram 5 ай бұрын
Moral of the story is don't ever listen to tech twitter
@DaveGrayTeachesCode
@DaveGrayTeachesCode 5 ай бұрын
I don't usually think in absolutes as it can be helpful and yet, there is a lot of noise at the same time. Pretty much just like KZbin 😂
@songokussj4cz
@songokussj4cz Жыл бұрын
So I tried it and it's very, very buggy... Some lines are not logged, some are skipping rows, sometimes it comments out only few and ignores the rest. I really LIKE this extension, thanks for showing it to me but it's in beta state right now. Usable only for simple quick things.
@danielwatson6529
@danielwatson6529 Жыл бұрын
Keep going buddy!!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Will do! 🚀
@9622AX
@9622AX Жыл бұрын
I think traditional methods with proper comments is still good.
@ManvendraSK
@ManvendraSK Жыл бұрын
Thanks for extension suggestion.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@zombiefacesupreme
@zombiefacesupreme Жыл бұрын
The only good thing about this advice was the memes that resulted. (My favorite was renaming it to the log emoji.)
@Its.all.goodman
@Its.all.goodman Жыл бұрын
So insightful sir. Thank you
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Glad it was helpful!
@ShiloBuff
@ShiloBuff Жыл бұрын
I honestly wish it was just named "print". It's so annoying switching between multiple languages and switching back to "console.log" or "Debug.Log", ect. Things would be so much easier if all languages just did "print" as its primary console logging.
@hbrockster
@hbrockster Жыл бұрын
Thanks for sharing!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You're welcome!
@Ryskorrel
@Ryskorrel Жыл бұрын
Destructuring makes the function lose its 'this' context. const arr = [] const {push} = arr push(1) //error
@myanrueller91
@myanrueller91 Жыл бұрын
If it’s just your project and no one else is ever going to touch it, rename the console print function to whatever works for you and the language you’re using. But with code anyone else is going to touch, keep the language print function. Console Log, System.out, cout, printf, the usual suspects.
@NithinJune
@NithinJune Жыл бұрын
the destructing thing looks like magic i can't tell how it works
@gavincoulson3900
@gavincoulson3900 7 ай бұрын
Awesome stuff 😊
@pixelstriko1642
@pixelstriko1642 Жыл бұрын
I actually really like having a console.log function, i fimd it odd that other languages choose to have a global print or println function, and python has the input function also globally, why are you cluttering your global space with console related functions when you can organize them into a namespace: go also has fmt.Printf
@emmanueltech9705
@emmanueltech9705 Жыл бұрын
Dave you're the best 💯
@user-wh6ki2oj3l
@user-wh6ki2oj3l Жыл бұрын
yeah, everyone knows it
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
And thank you, too!
@yadusolparterre
@yadusolparterre Жыл бұрын
I use Wrap Console Log.
@dinoscheidt
@dinoscheidt Жыл бұрын
Exactly. Juniors trying to save keystrokes
@jaydeep-p
@jaydeep-p Жыл бұрын
Instead of renaming it to something like 'c' why not rename it to something readable like 'print'?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
That's better, but I give the reasons you should stick with console.log in the video. Best not to rename it at all.
@it_is_ni
@it_is_ni Жыл бұрын
Are y’all not using OS level text expansion?
@johnyepthomi892
@johnyepthomi892 Жыл бұрын
I hate when people do hacky shit unless there’s actually no other option. People like to flex a lot and that just manifests toxic code.
@lukelubala4330
@lukelubala4330 Жыл бұрын
I always change console.log 2 print, BC I'm a big Python fan and I'm learning JS(JS just require an person to write 2 much, like why do I to write like 10 letters just to print sum on console?)
@РоманДвачевский-ц7к
@РоманДвачевский-ц7к Жыл бұрын
Or be a normal person and use proper tools to debug your code, and logging libraries to log, instead of console.
@sourabhkulkarni1731
@sourabhkulkarni1731 Жыл бұрын
You are so right!
@punkerts7711
@punkerts7711 Жыл бұрын
Yes, make code easily readable.
@erice.3892
@erice.3892 7 ай бұрын
but did you know that ctrl + h pulls up your browser history
@TranNguyen-mv6ln
@TranNguyen-mv6ln Жыл бұрын
I still dont understand
@dabbopabblo
@dabbopabblo Жыл бұрын
As far as I’m concerned if you’re building a framework and expect people to read/write code with that framework you also expect them to learn how to use the framework in the first place, i’m not gonna tailor to people’s laziness
@krishnaSahu-dy6ho
@krishnaSahu-dy6ho Жыл бұрын
Using Ctrl alt C shortcut adds a weird character looks like offset dotc character
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
The video doesn't say to use that combination.
@0xmassive526
@0xmassive526 Жыл бұрын
"Tech Twitter" ahh. just the best place to get tech advices.
@graymars1097
@graymars1097 7 ай бұрын
While I understand the reasoning behind it, I personally don't use and in fact hate little things like turbo console log why? because it adds crap to the code base. crap that if removed is not gonna change functionality but will cause headache for coders , that's one! and second, just write it! that little line of code, just write it yourself man don't be lazy console.log 😮 is it that hard to write this? Jesus Christ 🤦‍♂️ it's simple, expressive and universal (everyone knows what the words console and log mean in JS) like they have solved all issues of coding and programming, and now it's time to think about solving this console.log issue 🤦‍♂️ come on people
@thatonefoxxy
@thatonefoxxy Жыл бұрын
Me who has made console.log to muscle memory:
@dabbopabblo
@dabbopabblo Жыл бұрын
You wouldn’t if you were a more serious developer who programs in multiple languages and not just JavaScript
@_kitaes_
@_kitaes_ Жыл бұрын
​@@dabbopabbloi sometimes even writr console.log in python lol
@OcarinaOfVali
@OcarinaOfVali Жыл бұрын
​@@dabbopabbloor you just know their print statements?
@ratofthecity6351
@ratofthecity6351 Жыл бұрын
​@@dabbopabblo a significant amount of developers only know and focus on 1 language, and of course youd have boilerplate code in muscle memory after a while?
@mark1A100
@mark1A100 5 ай бұрын
genuine question with modern ides wont constant.log appear by the time you type consta
@stevenpillay6725
@stevenpillay6725 7 ай бұрын
I prefer my trusty pino logger
@snek_john_titor
@snek_john_titor Жыл бұрын
Still I prefer set breakpoints
@papa_ethan
@papa_ethan 4 ай бұрын
just use the destructure
@davidmarkleach
@davidmarkleach Жыл бұрын
Does no one use ‘CLG’ ???????????
@travelan
@travelan Жыл бұрын
Wow, someone with actual valid advice on KZbin Shorts? Didn't think I would see that day...
@iAbhijeetShukla
@iAbhijeetShukla 10 ай бұрын
where do u all get advices from twitter 😭
@UwU-dx5hu
@UwU-dx5hu Жыл бұрын
Thankss sensei
@mitchellmigala4107
@mitchellmigala4107 Жыл бұрын
My man over here doing super Nintendo codes to do shit. He says all you need to is hit up down up down left right select start to add a log! I'm dying 🤣 😭!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
😆
@b1n1yam
@b1n1yam Жыл бұрын
clo + command + space 💁‍♂️
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Another good option / snippet shortcut!
@mctechcraft7
@mctechcraft7 5 ай бұрын
I prefer “with (console) { log(“hi”); }” 😂
@HHJoshHH
@HHJoshHH 7 ай бұрын
It’s not verbose it’s for clarity. Come on people. Shorter isn’t always better. 🤦🏻‍♂️
@DatabaseAdministration
@DatabaseAdministration 9 ай бұрын
Didn't know that Jordan Peterson is doing voice over to your tutorials❤
@lewisone
@lewisone Жыл бұрын
making my consle.log a variable might be a good hack for a recent problem. I use Intelisense and when i save it changes my console.log to console . log which pulls an error. Cool extension tho.
@SnowboardPlata
@SnowboardPlata Жыл бұрын
Too many new developers trying to be fancy instead of practical, everyone has been guilty at one point
@duruiz
@duruiz Жыл бұрын
looks nice! I don't vscode tho 😔
@ratofthecity6351
@ratofthecity6351 Жыл бұрын
great idea for a neovim plugin, maybe i should write it
@duruiz
@duruiz Жыл бұрын
​@@ratofthecity6351 yep! I was thinking of configuring something like that in my nvimrc, sounds like just a macro actually (except for the multi cursor part)
@ratofthecity6351
@ratofthecity6351 Жыл бұрын
@@duruiz haha nice! youre right about that, i said the wrong word lol
@guy7524
@guy7524 Жыл бұрын
What theme is that?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Github theme
@GyroCannon
@GyroCannon Жыл бұрын
You can tell that those Tiktokers are more social media types than they are programming types No real software engineer will say "Make something shorter and harder to read"
@flora_76
@flora_76 Жыл бұрын
just type log and wait for the IDE to autocomplete it lol
@VirtualOA
@VirtualOA Жыл бұрын
Unless it is open source nope. Sounds to me like a virus. Especially with it being on youtube shorts.
@sayedulkrm
@sayedulkrm 5 ай бұрын
All I hear is "Alt+"
@jalaleddinebellouchi6317
@jalaleddinebellouchi6317 Жыл бұрын
I have a snipet for console log
@final8087
@final8087 Жыл бұрын
So do I. Snippet is a way easier that this extension
@senoraraton
@senoraraton Жыл бұрын
Just use snippets...
@bloodaid
@bloodaid Жыл бұрын
Call it conlog
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
This deserves a Nicolas Cage meme 😆
@devkumar9889
@devkumar9889 Жыл бұрын
This is great
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@codewithenima
@codewithenima 5 ай бұрын
i use ninja console
@tiezeehc
@tiezeehc Жыл бұрын
People are actually that lazy they can't write console.log?
@BruceWayneReal
@BruceWayneReal Жыл бұрын
Just use print wtf
@slipperyeel9206
@slipperyeel9206 Жыл бұрын
Agreed 🎉
@askholia
@askholia Жыл бұрын
OK, if you trying to rename console.log you doing way too much. Like go take a nap and rethink your life.
@JorgetePanete
@JorgetePanete Жыл бұрын
I'd just use Rust...
@Smongo412
@Smongo412 Жыл бұрын
Only us developers would spend hours learning a way to save 500ms writing console.log. typing it out the long way is like C O down enter . L O G. Then one you have it written once you would usually just copy paste from somewhere else in your file. Don't need shortcuts or snippets. No one is efficient enough to need to save this minimal amount of time
@joshcorbett768
@joshcorbett768 Жыл бұрын
What an awful way to console log
@MechanicalMooCow
@MechanicalMooCow Жыл бұрын
Web developers, particularly javascript developers sure to love to overcomplicate everything in the name of simplifying. they just can't help but fuck everything up
@aoof6742
@aoof6742 Жыл бұрын
Jordan Peterson is doing coding advice videos
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Others have said this, too - interesting.
@magicalmonke
@magicalmonke Жыл бұрын
that’s epic
@dog4ik
@dog4ik 7 ай бұрын
people, learn how to type fast please
@Jay-wb7hw
@Jay-wb7hw Жыл бұрын
Oh lord, js needs to be put out of its misery.
@shawn-skull
@shawn-skull Жыл бұрын
It looks viciously verbose.
@arthurdev2028
@arthurdev2028 Жыл бұрын
S
@tresvecesno7071
@tresvecesno7071 6 ай бұрын
Nicee
@thadtayo
@thadtayo Жыл бұрын
I personally prefer to be more coherent for the developers after me, so I set console.log to pleasePrintTheParametersToTheConsole().
@itsmaxim01
@itsmaxim01 Жыл бұрын
i will rename it to System.Out.PrintLn thank you very much
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
😆😆
@WantOxide
@WantOxide Жыл бұрын
Lol, js people always doing the fkn mess with their awkward Frameworks and useless code sugar. They're always laughable. If you really want so much to rename console log just do it and use autodoc for the function so you just hover on it and see that it replaces console log with a shortened name
@SagarTakoresdt
@SagarTakoresdt Жыл бұрын
Type lg and did you try quokka
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
I did try quokka over a year ago. Things may have changed but it frequently got in my way.
@Mr-Raptor
@Mr-Raptor Жыл бұрын
I don't mind writing console.log
@nothappyz
@nothappyz Жыл бұрын
Who the f renames console.log
@georgeGetsKSubsWithoutVideos
@georgeGetsKSubsWithoutVideos Жыл бұрын
0:00
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,7 МЛН
«Кім тапқыр?» бағдарламасы
00:16
Balapan TV
Рет қаралды 284 М.
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 14 МЛН
ТИПИЧНОЕ ПОВЕДЕНИЕ МАМЫ
00:21
SIDELNIKOVVV
Рет қаралды 1,3 МЛН
The AutoHotkey Experience
12:07
Bog
Рет қаралды 49 М.
ChatGPT-o1 Created A Programming Language...
19:45
Conner Ardman
Рет қаралды 100 М.
Please, don’t use viewport units for font sizes
9:55
Kevin Powell
Рет қаралды 19 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 246 М.
Git Tutorial for Absolute Beginners
36:21
Dave Gray
Рет қаралды 74 М.
Code faster with these VS Code shortcuts
8:44
Coder Coder
Рет қаралды 371 М.
How to Land a 100K/yr Tech Job - 10 Strategies
11:17
Fireship
Рет қаралды 1,3 МЛН
«Кім тапқыр?» бағдарламасы
00:16
Balapan TV
Рет қаралды 284 М.