Transcript from the "Introduction" Lesson
>> We're not gonna do really much of an intro, we're just gonna get moving. And so this is the only thing I really wanted to kind of point out and then a couple other things cuz I'm always off by one. But this is one of my favorite people out in the Twitter space is Casey Moratori, as he is called.
[00:00:14] And I just wanted to read this bottom part, which says people start to use the word optimization as if it means thinking even briefly about how efficient something is. And at that point, quotes like, premature optimization is the root of all evil, are very damaging because they were not talking about that meaning of the word.
[00:00:31] They were talking about hand optimizing assembly and stuff like that. There's no way Tony Hoare or Knuth would have ever told you number one on your list was premature optimization, yet that is what people started thinking it means. And so, you always hear this anytime you try to make something fast or you talk about making something quick, you hear the premature optimization is the root of all evil quote.
[00:02:14] This is not about how to make rendering order fantastic. This is not about any sort of paint optimizations, anything like that. You're gonna need to get Ken Wheeler in here if you wanna hear about that. It will hopefully make you write better code, because at the end of the day, things that feel really good are just awesome products.
[00:02:31] If you've used Twitter on your phone and just in the Chrome browser, it crashes about every fourth time you use it. Because it runs out of memory and the thing just locks up and then it just completely explodes on your phone. And so that's really annoying. I want to be able to just use something without having it just completely hard shut down every single time.
[00:02:48] We're not gonna deep dive into using the tool Perf or Chrome Tracing or VA Tracing. We may hit like tracing GC or trace GC as a node option for a moment. We're not gonna do anything into the deeper levels. And we're not gonna really talk about any micro optimization.
[00:03:02] There's gonna be one moment where I'll show you a micro benchmark to make a point, but that is it. Micro benchmarks are largely deceiving. You can make pretty much anything look fast if you work hard enough with the micro benchmark. So we're not gonna be doing any of that.
[00:03:16] And we're also gonna not do any sort of like, hey, when you create an object, always have your keys in the same order, always have the same types. We're not gonna be talking about that type of optimization either. That's a series of tricks that are applicable, that can be really, really good.
[00:03:28] But in five years, are they still gonna be good? We don't know, we don't know what kind of new achievements there are. We don't know what, how things are gonna be done. Think about all the dumb things you used to do, like setting an array length to be zero.
[00:03:39] Used to be the quickest way to empty an array rather than creating a new array. If you have short-lived objects, is that still a thing today? Probably not. And so it's like, now you have a whole different way you have to think about things, comparatively to the old wisdom of minusing length by one to pop something off as opposed to calling pop.
[00:04:10] Hopefully, everybody's excited about that.