Syntax Video
Is Virtual DOM Bad? Answering Listener Questions
- 0:00 Welcome
- 1:27 Syntax Brought to you by Sentry.io
- 2:45 Welcome Randy, our new Producer!
- 4:14 A 'Canadian Podcast'
- 4:53 Is Alpine JS or HTMX a replacement for pug or other templating libraries?
- 8:21 What powers the "in-app" browsers and how can we test our sites on it?
- 13:16 A deep dive on generators and iterators.
- 15:25 Video podcast observations
- 17:18 PROBLEM: I need a way of managing state.
- 22:34 Why is Virtual Dom (a la React) suddenly bad?
- 28:31 In a recent episode (659), Wes mentioned he updated the OG image cards, and noticed a higher click through rate.
- 29:07 Updated logo and monster truck intro.
- 30:19 Back to OG Images.
- 31:51 Are "import * as X" exports build stripped?
- 36:46 What is the difference between S3 storage and a CDN.
- 45:00 How important are keyboard shortcuts or extensions? Are they necessary to be a good developer?
- 50:04 Sick Picks + Shameless Plugs
Welcome
welcome to syntax we got a potluck for you today we're going to be talking all about uh templating libraries HTM X Alpine JS a whole bunch of stuff around OG images some react questions felt kit stuff we're excited to get on in thanks everybody for tuning in how you doing today Scott oh yeah I'm doing good man uh after a long weekend let me tell you that um we we're heading up to the mountains you know typical trip up to the mountains is maybe hour 30 depending on which mountain you're going to yeah our lesson was at 9:00 we left out the door 5:30 uh and we did not make it to our lesson that's how bad the traffic was we we made it like a you're just sitting in traffic in the mountains which is a hard drive anyways but you got the two kids in the car it's you know 6:00 in the morning you're just not going anywhere there's a billion cars and you're just seeing that ETA climb up climb up climb up until it's like our lesson is Out Of Reach
and there's no chance we're going to make it and we had to turn around and drive all the way back to Denver uh we wouldn't got a fancy pancake breakfast because of it but um man that was a rough one and then the immediate next night my dog woke me up three times in the middle of the night so I I was like I I I rolled into Monday in total zombie mode it was like straight up zombie mode uh let's talk about Sentry real quick this podcast is brought to you by Sentry Sentry does error exception uh performance insights tracking basically will tell you why your website sucks or or what went wrong and where it went wrong and and how to fix it so you definitely want to throw Sentry on your website you throw it on your back end it supports all languages out there it's fantastic don't wait until it's too late uh to install Sentry because then you're going to be like oh well there was a major crash or this people are telling me this being slow as
Syntax Brought to you by Sentry.io
heck and I don't have any insights as to what browser they're using or uh where in the world they're coming from or or any of that information what page they were even on like what clicks did they do that's the problem we had on uh the syntax website is people were telling us like one person was being like it's not working or like I I don't know and then we just went onto the sentury replay and saw oh we can see where they were clicking and then I tried it myself and go oh I forgot that edge case you can't click on a timestamp before the audio is playing so we had to add a check for that so check it out sentry.io syntax I think you nailed an ad pitch for them too Wes sentury it shows you why your code sucks uh centes marketing te get at us right there yeah um let's talk about Randy um so we have a new producer on the team here at syntax uh Randy is here to do everything related to giving us a video podcast
Welcome Randy, our new Producer!
making us sound amazing you may notice that I changed my camera angle um it's looking much nicer I I made Randy drive all the way down here and uh and fix that all for me so we're really stoked to have Randy on board you want to say hi Randy yeah thanks for having me guys I'm I'm pumped to be here pumped to learn from you guys and to get to listen to all these episodes so I'm I'm just so stoked to be here yeah and likewise Randy does some really awesome videos of his own on YouTube so I'm going to link up his YouTube channel in here where reviews microphones and and talks audio stuff um awesome awesome content so if you want to get a feel it's it's nerdy in a good way if you want to get a feel for his Vibe uh it's it's dead on there so yeah we will uh eventually be introducing the Randy rants segment where uh Randy just rants about whatever is going on it's the name works so yeah has nothing to do with web
development at all no just it's just a platform not not that you don't have your own YouTube channel to rant on but uh we'll we'll take it how much longer until we start getting it Randy can you throw that up on the screen for us right there uh whenever we do these video podcasts and who knows U maybe that's something you know we'll get out of this importantly Randy is Canadian um so that makes syntax officially a Canadian podcast about web development and we are going to be changing our tagline from a tacy treats podcast to a Canadian podcast about all all all dressed is that a Canadian thing all oh that's that's a good name for like a segment all dressed instead of full stack we don't have that in the state so it's good you don't have ketchup either do you we have some weird chip flavors here in Canada oh yeah we don't have ketchup I thought you meant like ketchup in general yeah we got ketchup ketchup chips sure you got ketchup ketchup chips yeah all right let's get into the first
A 'Canadian Podcast'
Is Alpine JS or HTMX a replacement for pug or other templating libraries?
question we have here from chumba WBA um his question is is Alpine JS or htms a replacement for pug or other templating libraries for instance uh could Alpine JS be used in Wes's learn node course instead of pug um so pug was or is a serers side templating language it used to be called Jade they had some legal trouble and they renamed it to pug um any advantages or drawbacks so real quick let's explain what Alpine and HTM X are Alpine JS is used for client side interactivity and the way that it works is that you include Alpine very much how you would include like a jQuery on your website and instead of writing JavaScript you write like declarative HTML very similar to how angular one was so you can do loops you can do on clicks
and it's all just like attributes inside of your HTML tags and when your HTML loads and parse is it gets picked up and you add interactivity via that so we had Caleb porio on the show you can listen to episode 568 just go to Spotify type in syntax 568 or go to syntax. FM 568 um and we talked to him all about uh Alpine JS HTM X is a server fetching JavaScript framework so again it's it's client side um however it's just used for pinging your server and fetching the new refreshed HTML for the portion that you needed it is also declarative meaning that instead of writing JavaScript you just write HTML uh attributes for what you're looking for and it will work with you so many people use HDMX and Alpine together because you use HDMX for like
the server fetching refresh an Alpine JS for the client side interactivity things like clicking and looping over if data that has possibly been fetched from an API that doesn't replace what a templating language is is even though HDMX and Alpine JS have the ability to do loops and things like that they're not templating languages um so you still need some way to render out HTML so whether that's using pug whether it's using like handlebars mustache uh you could use jsx um I'm using that on on my uh node site is I'm just I'm just rendering it all client or server side and just sending it I don't use any react in the actual browser I don't need it uh what what are some of the other templating languages ejs is that one of them yeah that was a big one you said handlebars um mustache but like
obviously the other ones are like blade if you're in PHP every language has their own like templating layout liquid is a big one yeah like could can you just use spel only for templating probably I mean you can run it as a function and and get the output directly from there yeah I've I've used it before for that to answer your question no uh it's not a replacement for that you still need a templating language HTM X and Alpine JS or just added on top of your templating language word next one from KJ what powers inapp browsers and how can we test our sites on it I'm curious to know how they affect loading speeds unexpected layout shifts and accessibility if there's anything we can do about it from our side of things so Ina browsers you may have seen this on your phone you're sometimes you click a link on something and instead of taking you to the browser it opens up the
What powers the "in-app" browsers and how can we test our sites on it?
website in a mini browser that's essentially within the app that's the inapp browser and on iOS it is the inapp browser is Safari on Android the inet browser is Chrome it's whatever the browser that is shipped with the OS and in fact we we kind of have that same thing going on Mac OS as well or um Windows even though you don't see that same Ina browser flow typically in desktop apps either way typically an OS ships with a a web view so in iOS it is WK web viw webkit web view um and that is the the essentially the wrapper for many things that is not the browser and it's typically just straight up the rendering engine and I've experienced a little even like shift in terms of what works and what doesn't in this in the Tor ecosystem because not every feature
that's in Safari is in the WK web view most of them are the rendering engines the same chances are if you're testing your browser or testing your app in Safari it's going to work the exact same in the iOS web view so there shouldn't be any issues there again the most of the stuff that doesn't exist is maybe like permissions dialogues or like things that are very specific to how Safari functions itself um but again if you want to test on uh your normal browsers whether that's Safari Chrome and Firefox hey that's pretty much all you got to do unless you're get into some nitty-gritty apis I want to say that it used to be where um and this is one of those things where like it kind of sticks around people said it once and it sticked around it's stuck around forever they used to use UI web view on iOS and that was a there was like bugs that were in UI web view that were not in Safari and that was extremely frustrating and
apparently it was slower now like Scott says WK web view is what they use and iOS also provides a entire Safari embedded experience so if you are trying to embed a in browser you can either build your own with a web View and you have to recreate tabs and the input bar and the refresh button you have to implement everything or you can use the Safari view controller which I love when apps do that because it shares like login data uh so if you're like logged into us something on Safari then you're also logged in when you're inside the app the one sort of gotcha that you you should think about and I honestly I've never once in my life tested a website inside of a inapp browser it's I've never had that issue before and it's never popped up for me but these custom inapp browsers can inject their own JavaScript code so there's this website called inapp browser.com um I just sent
a link to the syntax uh Instagram account and then I went into the Instagram app and clicked it and it shows you that Facebook is injecting JavaScript code on into your website um and I never try to like especially logging in oh yeah that's but I never browse inside of inside of the Ina browser because you know they're they're scraping all that data and like oh what are you what are you looking at what are what are you logging in with what what products are you looking at so not to say that every other website that embeds a Facebook like button doesn't do that already but yeah yeah I run uh blockers on that so that's one thing to think about I tend to always open up in the browser if I can but I I think normal folks are just opening up in web View and typing in their password that's equal to password and calling it a day and not thinking about it too much um but um this actually is the principle in which the
entirety of Tori which is the rust based electron competitor t a r i. app is based and so much to this to point that they're they're now going to be shipping the ability to do mobile apps with Tori as well so you could ship a desktop app on Mac the Safari web view that's baked in Linux or or Windows but also soon to be Android and iOS just based on the fact that they all ship with a web View and you don't need to ship that with your app uh next question or or not maybe not even a question but a nice blog post by written by Danny himz uh he said this isn't a question but I was walking to the auto mechanic to pick up my car while listening to episode 709 the discussion about what generators are good for stuck in my head um and I didn't quite follow the example I was inspired to do a deep dive and I even wrote an article about it so I love this we've had we this has come up on the podcast maybe like seven or eight times
A deep dive on generators and iterators.
now and it's just us being like okay we understand what generators and JavaScript are for but like when are they actually useful and every time we come back to this I've I have stumbled upon a couple new use cases myself as well so Danny goes on to say iterators are everywhere and they are what make syntaxes like for each loops and array destructuring possible when things aren't iterable uh you can easily create an iterator with a generator function so this is kind of interesting so you have a regular JavaScript for Loop right like for blah blah blah of and if something is iterable like an array or a node list then you can Loop over those items but if something is not in iterator then you can make something iterable you can Loop over them um by making it into a generator function observables streams arrays signals anything could be iterable or a sync iterables that means
you can await inside of a 4 of loop which is love that and is a great choice for a flexible parameter and I I even thought about this a couple days ago I was working with buffers in the streaming API in node what buffers were or what the streaming API in node will do is it sends you chunks of data as it's reading it right and if you want to Loop over those chunks of data you just say four chunk of whatever if you convert it to an iterable so I'll we'll link up the actual blog post in the show notes but love when people do this it's like okay I don't totally understand but I'm going to do a deep dive and write a post about it so thank you Danny yeah thank you and uh we'll share this in our newsletter too one neat thing about having a video podcast now for those of you who don't know this this podcast episode as we mentioned being edited by Randy is also going to be released on YouTube if you want to see us uh you get to see whenever I open up a medium blog post my I have like this my monitor is
Video podcast observations
right here and it looks like a giant light box somebody just showered me with light on so uh you'll get to see that nice reflection in my glasses does medium not have dark mode I don't know yeah that's bright they've got to it's actually funny because I was was recording myself without my Lighting on and I noticed that every time I opened a white oh a softx I would get lit up but when I have my like Studio Lighting on I don't well let's try it hold on let me go between dark oh yeah you can very subtly see it a little there let me turn the lights off this is this is a treat for the video podcast oh wow when you turn your lights off your room goes from like a like a developer dungeon to a like a normal ass room yeah I'm there's like a delicate balance I'm trying to find between I
think I have a little bit too much gamer lights right now I just got them in the mail yesterday and I I set up a couple extra I had a few but uh there's a delicate balance between gamer dungeon and regular ass room I'm gonna send you a uh a uh one of those you know curly lights like you have your Hot Tips but just says gamer on it for the Love Games is number one never never play games ever I just like the last thing I'll ever want to do with my time so that's the no games just JavaScript yeah next question here is cambi from Kenya hey I like your show thank you problem I need a way of managing State spelt stores is not enough for my use case the problem is I have is that after the user logs in we perform a kyc never heard of kyc no I know I wonder if they're working I don't know if this is
PROBLEM: I need a way of managing state.
a Canadian thing but whenever you do anything with banking Investments um anything that involves money even like crypto I often get this is you have to fill out these know your customer before you're allowed to to do anything you have they ask you questions about like if you're married and um what your job is and all of those stuff so they can know your customer oh okay so know your customer so that's a new acronym I've learned they perform it after a log in a kyc where we verify their phone number collects uh documents personal ID numbers I need to enforce that the user does not visit Pages routing they don't have access to my plan is to use xstate in the client with cookies in a hook server to um ensure authentication in the kyc process a dedicated backend written in cotland does everything that the front end acting as the UI with minimal con
minimal logic happening I'm using spel kit with axios dang they got a lot of stuff going on here uh why do you need axios with spel kit why do you need a dedicated backend cotlin why do you needel spel kit if you have a cin backend and I I don't think you need xate for this I'm going to tell you right now yeah you definitely need spelit though because like he's he wants to fetch data from his server but he wants to do that on the server like you're going server to server right right yeah and it really seems like what you need here is in your authent authentication flow that user information if that's coming in as a cookie right like if you're storing your your authentication authorization token as an HTTP only cookie that then get sent to your server that server should be able to authenticate and inside of your
middleware grab your users's information and then from there you can use that user's information in locals as it is in in spelit it's a API called locals where you pass it into locals then you should be able to check for the existence of locals. user whatever inside of that that route file and then prevent access to it that's how I do it um yeah so I would say that's probably your strategy I don't think you need to bring in um anything else into this and in you know xstate Great Library lot of cool stuff but xate does the same thing as spelt rables uh there there's not a whole lot different there you can build a state machine in rbl if you want it to but they're not giving you any different functionality there yeah it sounds like he's trying to do it he's like I'm using a client cookie I'm doing it trying to do it on the on the browser it sounds like you should be doing at serers side because this is no different than doing
permissions and roles uh when you have a backend and it's you should never allow somebody to visit that website like don't just stop them from clicking the URL or if they visit the URL you need to check client side and then throw up a banner is like you should just like not let them go to those URLs until and if somebody clicks on a link or they're sent a link then your middleware before any of that rendering is happening your middleware needs to check if it exists and it should redirect them to a page that says you need to fill out your kyc before you go ahead yeah cuz that way no matter what anytime you know users hitting that page refreshed with that login if that login cookie is stored they're always going to be redirected to the correct place right you you kind of want to make sure that there's no undesirable path there but I I think you're right that having that be server side it's so so much simpler right and then like you don't have to put logic into every single page to make sure that they've done it you simply just throw a middleware and put that middleware
before ideally you put it before all the routes that you want and if it's at a like a sub route you can just put it before like for example on Scott on admin right we have for SL admin SL any other page and we're not allowed to access any of the admin unless you're actually logged in this is the same kind of idea yeah and in fact in my uh I can even play some code some spel code where we do this authenticate user check to see if the user there um and I made I made the the wrong mistake of initially saying if the path name is not equal to this then uh and there's no user then redirect um unfortunately as I made many more public URLs that if statement has now if if the path name is not logic if it's not sign up if it's not road map if it's not forgot password and I just have a comment saying this is getting ridiculous uh just um a nice little reminder to me that uh
I should not have made that choice oh that's good uh next question from verall dawn why is the virtual Dom Allah react suddenly bad uh it was a hailed as a big seller a couple years ago and I'm sure that uh this person is understanding there's a couple blog posts Cassidy Williams posted a really interesting blog post the other day Tanner Lind Lindsley posted a big blog post about react and how they're like kind of feeling like about react right now and uh a lot of that circles around the virtual Dom right and people might not necessarily know like okay I thought virtual Dom was amazing like the the whole idea of react is that there was this thing called the virtual Dom and instead of rendering the entire page react knows which parts of the page to render and it will able to reach in and render those things right that was that was the best thing about
Why is Virtual Dom (a la React) suddenly bad?
it so like why are people souring on react Dom right now I'll say like it's not bad um I think but let's explain sort of where it's coming from react has a lot of complexity right now like we just did a show on spel kit and a lot of the same doing the same things in in view or spell kit or solid a lot of them are much easier in other Frameworks right now and that's frustrating to a lot of people because react is the the dominant framework it's the default framework for building apps and stuff of course you don't have to use it but it's frustrating for people because the entire industry is just like react react react so hooks use effect a lot of like the there's a lot of really funky uh Hooks and a lot of that is because of the way that the virtual Dom Works um you have to worry about rendering if you put your state too high then too much of the page will render whereas like what felt there's no
virtual Dom so it will just it knows the elements to to render itself right you don't have to worry about memorizing data or any of that stuff um which is really nice and now we have million JS which is an alternative react renderer that doesn't use the virtual Dom and like somebody had to just go and build we had them on the EP on the show just build a new renderer that goes around or doesn't use the virtual Dom to get the the perf issues so why are that's kind of why I think people are are souring on it react has been around a long time over 10 years it was built as a client Side Library and now it's like a like a full stack framework right and there's people that are able to not take the the baggage of a older library and just build something that is brand new and that API is often nicer right yeah um well I'm I'm going to I don't know if you have anything to
add about that sory yeah I know I I have things to add about it uh I think it's bad let her rip Scott I think the virtual do is bad um so you say it's not bad I say it's bad uh it it's the uh the dominant framework but not the Dom framework who yeah uh I think it's only cool because it has a cool name these are all like little uh little hot takes I I thought of while you were talking no no you know what in in my experience the the only reason like we' we've kind of split here where we had the virtual ad approach and the only reason that the Dom the actual Dom approach is viable now is because so many of these things are compile based right uh solid compile based million compile based spelt compiled based even that there's a new version of view that is compile based that does not that does not use a virtual Dom as well so it seems like that's the split right um you either go with a compiled application which honestly I don't have any beef
with or you go with like a virtual Dom if you want this type of performance the virtual Dom has caused me more trouble than I think it's ever been good for given the fact that I'm using a compiler anyways right so if I if the the trade-off there is you have to use a compiler and you don't have to use the virtual Dom hey I'll take that because nothing really beats getting to have access to the actual Dom being able to work with the Dom with real JavaScript apis being able to throw life cycle methods onto totally um yeah and so for me that the virtual Dom gets in the way more than I like it exists as a thing that I have to deal with because that's the way that react does it and that's the way that it's fast for react to do it it doesn't exist in any way that helps me author my code or Reason about web development exactly like it's it's complex because that's the way react Works um and there have been other libraries and Frameworks that have
figured out how to do it like I that here's another question is if they were to build react from scratch today or would any Library choose a virtual Dom and I don't know like that's I'm not a performance guy enough to to know that but it certainly seems like every framework that's come out in the last couple years is not using a virtual Dom I would love for a proponent like somebody who really loves the virtual Dom to tell me why that's wrong um but you know that the not having the virtual Dom in my life has been a nit positive recently did you notice that the author of this question uh their name was a play on Virtual Dom oh they got me one day someone's going to get me to read something bad on air and I'm not going to notice it when you read it I was like I don't think he knows it this isn't a real name virtual Dom oh what did I say cut in cut in whatever I said right now uh next question from verall
dawn oh that's very funny he got me all right that's the game now subit question and try to get us to read something funny oh man next question is for Matt May there's a nine in his name I'm just going to guess that the nine is supposed to be an a Matt M M M May Matt May in recent episode Wes mentioned he updated the OG image cards and noticed a higher click-through rate I've been thinking about developing a product around OG images but have always thought it wasn't possible to get any data on whether one image would perform better than another am I mistaken or did Wes just have a gut feel that more people are clicking the shared links love the show thanks for everything you do by the way what's with the hate on the monster truck intros I think they are a big old dose of Whimsy I'm going to answer the the monster truck thing because I can't talk about Wes's uh intentions here but the monster
In a recent episode (659), Wes mentioned he updated the OG image cards, and noticed a higher click through rate.
Updated logo and monster truck intro.
truck thing is great but after I don't know seven years yeah no we haven't had it for S years we've probably had it for like 3 years but it's probably 2 years too long it's probably 2 years too long everything that is good doesn't always stay good after 700 episodes so you know I I think I'm just tired of it and uh I think that the same for us yeah we we also updated a bunch of the syntax like art you know just TW slight little tweaks and uh we updated the yellow right before we launched the new syntax website we changed the yellow to just a bit more yellow um and somebody commented it looks like the old logo was sitting out in the sun I'm like that's exactly what had happened and let's just say Sentry did not mandate us to change the yellow or change our branding this is just Wess and I evolving yeah just how we have better tastes with age uh anyways OG images can you track which
Back to OG Images.
ones do better not really um it was mo more of a gut feel you can see like link coming from Twitter if that were to increase but that's kind of a hard thing to to track a way you could do it if you really want it to do is you can put a a query program on your url that doesn't matter and what that will do is it will force uh Twitter to refetch um so Twitter and Linkedin and I went down a very dark hole with these OG images and I am very happy that the hard stuff is done because trying to understand the limits of Twitter that are documented Twitter's the worst LinkedIn second LinkedIn was very very tricker I spent probably good seven hours on LinkedIn but there's like a limit to the sizes and they're not documented anywhere so you just have to try stuff um and they're aggressively cashed meaning if you have like a cash version I think it's seven days so the only way to you
can't even bust the cash but you can get a new version to show up if you put a like a query pram like a V equals 2 on the end of the URL um so what you could do is you could put like a a UTM Google analytics pram on the end of your URLs and serve up a different OG image for each of those URLs like UTM OG equals 2 and and you could compare that against Impressions um but You' need quite a bit of data to see if that actually worked or not next question we have I don't know Rick says our import Star as X exports build stripped all right so what does what what the hell does that mean uh so when you have an esm uh module and you want to let's say you have a module that exports four things 1 2 3 4 and you import you want to import them not individually you want to import everything that is exported
Are "import * as X" exports build stripped?
from that file into another file um so the question that Rick has here is that if you're importing everything and putting it under a single variable are the ones that you don't use um like the the parts of that object are those tree shooken uh do they get removed so I I'll read the question um I'm developing a relatively big web project and came came upon the idea of always known Global variables like const for all my constants utils for functions and so on so that I could always see available variables and functions without having to remember named exports by myself just by typing cons dot um I'll first of all say I like that approach because everybody loves to just import the method directly but sometimes it's nice to just like have it namespaced you know sometimes it's nice have const do whatever you don't have to have everything destructured or imported as a
a bare top level function or variable um I don't know if wrapping all of my named exports in a import Star as const is if I lose the potential build Savings of tree shaking so tree shaking is if you import stuff and you don't actually end up using it does does that make it into the final bundle um and this is one of those things where like there's all these rules like oh never use this because of X Y and Z and as far as I can tell there's there's two ways you can do this you can read all the stack Overflow threads where people say it's not an issue anymore but you can also just test it you know so what did I do I tested it I used V here but it's probably worth testing with your own bundler if you're using web packs or partiel something like that and I created a file with four exports inside of it then I imported them so import Star as const from that file and I I referenced only one of
those four so you imported all four into a single object with four properties on it and then I only used one of them and in the end bundle only the one that I used was actually put into the end bundle the other three it realized that you didn't use them and it Tre shook them so thumbs up that's not really much of an issue but I went a little bit further and said okay but what about if you import like another library from within that right like it's not as simple as one file in another file sometimes you'll have like a a utility library or helper Library so I imported ad from low Dash and didn't even use it and you guess Scott or maybe you read it what what do you think it it it bundled I don't think it bundled it I did not read it bundled not just the ad function but the entire lash library but there's a reason behind that is that's because it's it's published as commonjs
so they L Dash also publishes lh- mhm I thought they changed that yeah that was dat sorry date FNS changed that yeah so now you got if you import ad from low Dash es it only bundles just the function and it will tree shake it if you don't end up using it the export star from low-- would also include the entire Library so it's I I I always say oh just test it yourself but maybe this is the rule at least for now don't use the export star from uh which is the like twoin One Import and Export Allin one go because I don't think that can be statically analyzed and and therefore it just threw the whole low Dash Library into my bundle when I might not have meant to do that okay cool well that's uh I love the um the work you did to find that out that's Ting I was curious to myself what's that called when somebody like
nerd sniped you know they asked a question I don't know but now I want to find out nerd I don't know if that is nerd sniping you don't know what nerd okay let's look it up nerd sniping is a slang term that describes a particularly interesting problem that presented to a nerd often a physicist techique or mathematician the nerd stops all activity to devote attention to solving the problem often his or her own Peril okay yeah that defines it perfectly okay I was wrong love it next one is from Roger Pence Roger says what is the difference between S3 storage and a CDN please discuss your recommendations for both and how to get started with a CDN for a site with users in North America and Europe I'm currently using Wasabi S3 storage and looking at bunny CDN but it's confusing and imposing bunny CDN bunny stream bunny storage bunny
What is the difference between S3 storage and a CDN.
Optimizer bunny DNS this sounds like my daughter's room she loves bunnies folks uh but yeah she actually does she loves bunnies um let's let's talk a little bit about this because S3 and a CDN are not overlapping Technologies really so I I'm I'm going to look up wasabi S3 here really quick the the thing is is that S3 is basically just a storage it's like an online cloud hard drive right it exists as storage you can even fttp into or FTP into it fttp you can FTP into it and drop some drop some data in if you want um same thing as like a back Blaze B2 or something like that it's just online storage a CDN is delivery it's delivery of an app it's maybe delivery of a file but it's it's like a global uh distributed delivery of these things so many times people put a CDN in front of
other things potentially your S3 you know um and Cloud uh or Amazon themselves has a CDN called cloudfront which is a Content delivery Network now I'm going to stop there because Wes has done some more here but that's the big difference there S3 is just data storage CDN is delivery of any assets yeah so like like an S3 is you pick where it goes right S3 in Virginia um and then a CDN is around the globe and they literally take a copy of each of the files in the uh in your data storage and distributes them around the world so that when the Australian I wanted to download your file they're not going all the way under the ocean um to get to the United States to get your file you you just store a copy over there just in case the Australians need it you know um
and I had that issue when I first launched my course like 10 years ago I I was streaming all of my videos off of uh S3 basically this was before like any of these streaming things were like available they were available to like big networks that were streaming TV online but like not to just regular people so I threw up my videos up on S3 and I was stream streaming them in and I got all these emails in the morning from Germans being like it's brutally slow to download these videos um and I thought that's that's weird and then I realized oh but my files are in Virginia Germans are not in Virginia so I don't know where they are but they uh they have to be able to download them so I threw Cloud front in front of S3 um and then you pay based on different areas and uh India is always very expensive to stream to um I've and there's a couple
different areas that are are kind of expensive but there's it the whole CDN game is much simpler now you can Cloud flare you can put cloud flare in front of a lot of your stuff they won't CDN files over a certain amount but they do pretty good for things like JavaScript files and um images Cloud ner is good for images Cloud CDN uh is Google's version Akamai is probably one of the biggest in the world um fastly and the bunny I keep hearing about bunny all the time people are talking about like it's a good spot to put both files as well as if you're they have a whole streaming product that we were talking about earlier I uh I'm going to be real I've never heard of bunny until this conversation and of course you know you go to their website there's a billion companies using it it is uh they have so many hopping puns it's a platform that truly hops you even wrote bunny has been hopping on my radar in our show notes
the prices are just extremely low um something I got to look at yeah yeah if you if you need especially like there's one I forget his name but there's a guy on my Twitter that he maintains he works for one of the large adult websites and he maintains the spreadsheet of bandwidth costs for streaming around the world um so every now and then he sends me this spreadsheet of like all right we evaluated I know it's like like 14 different streaming platforms and like just like raw bandwidth and here's the end cost um because you got to think like that guy probably spends a lot of money on streaming so a couple cents per gig is a probably significant amount one more thing about this like whole idea of storage is that generally the slower your data can be retrieved the cheaper it will be um and it so much
as Amazon has this thing called Amazon Glacier which they will back up your files to tape like I'm not a hard drive not a SSD somewhere but like literally tape um and if you don't know what that is it's like like what like what's Randy what what's tape like Magnetic Tape yeah like like actual Magnetic Tape like a like a cassette would uh you can store data apparently somewhat cheaply and long like the longevity of a tape far um exud what's the word I'm looking for outperforms exceeds there we go the longevity of tape apparently far exceeds like a hard drive or a CD or anything like that right like you Scott you've been trying to get all your DVDs off of DVD before they go but you also have VHS which is probably going to be around a
lot longer than your DVDs yeah the DVDs are like just completely falling apart like whether it is like this the old style cdrs the tops of them are just flaking off or whatever um or scratches who knows right some of that stuff has been completely you know gone gone to the loss of time so I don't think CDs are unless you're like really storing them you know a perfect environment or like great for keeping long term if you're the type of person who has a spindle I actually was just looking I have Wes a copy of radio head's kid a which is you might not know anything about radio head on tape from the original uh backups when I bought a special edition they gave people who bought this a loop of the backup tape because they were ariving at all that's a cool thing it's incredible and some people who got one um Stitch theirs together and put it in an actual reel to play the Magnetic Tape to know what section of the Masters they
got so I have no idea it could be anything from uh okay computer album to kid a of any any track of a studio master from radio head so I got it in my basement it's priz you theoretically read it yep that's cool oh one more thing is so this podcast Riverside um we we get like I think we get like a month to download the podcast and and if we want to go back more than a month you have to request access to the downloads and I did it once and it took it took like eight hours and I'm I'm assuming what they're doing is it's on tape and Jeff Bezos had to go in the the basement of Amazon pop it in rewind It Blow the dust off of the syntax episode 527 and uh put it in his cassette player and converted it to MP4 yeah I think that's the likely scenario here uh Maggie asks hello I'm a mid-level Dev
How important are keyboard shortcuts or extensions? Are they necessary to be a good developer?
in a startup based in Paris France ah we during par programming I get a lot of comments and suggestions about keyboard shortcuts or extensions on vs code for example or certain tools last one was rectangle to resize windows on Mac OS each suggestion is small and easy to learn however there are a lot of suggestions I suggest I struggle to learn and apply the mall it gets overwhelming super fast and I don't have time to master all of these skills while doing my actual job sounds like my life is like do you spend time on the tools or do you spend time on the actual like coding part right I also find a distraction from the task at hand developing the feature um where I'm feeling I'm looked down on for not being a keyboard Wizard and I'm not seen as competent by all my peers um is it even important to use the same tool as all of my colleagues are these extra skills as Dev important is it necessary to be a good developer do they save time in the
long run um I think so I totally understand this especially when you're brand new so we had Randy over at my house the other day and first of all he touched my mouse and it was like my mouse is hair trigger you know and he's just like oh holy smokes and then uh he sees me zooming around and hitting keyboard shortcuts and plop ploop on everything and he was like man you got you're pretty good at this you know um and I think that all that stuff is worth doing I don't think it's worth breaking your focus from coding it's worth logging and saying all right I'm going to learn this at some point but in the long run being able to quickly move around your editor select files open them up without using your mouse being able to um even just a simple one as being able to Jump by word and jump by line instead of just like clicking or
holding down the the arrow keys all of that stuff it might save you 10 seconds but a it adds up and B it doesn't take you away from your actual Focus um once you've learned it of course it doesn't take you away from your actual focus and that's really important to me is that like you're not oh how do I do this or how do I do that or like let me like when I taught out of boot camp people would just do file save or they would drag the windows to the left and drag their a code editor in and it's just like command tab you know like you can tab between these two two things so don't feel bad there's endless amounts especially some of us nerds who get really into it you don't need to get that deep but it is certainly worth investing in your tooling around using your computer yeah and I I even get deep under this stuff I use an app called ha to automatically sort files like oh I
have a syntax Dropbox and a Dropbox on my desktop that will like put screenshots in a certain Lo and like do a bunch of automation stuff for me I have like window management and keyboard shortcuts one thing that I don't think it's mentioned enough is that your keyboard shortcuts you know 99% of the time you're probably working on your own computer your keyboard shortcuts can be exactly that they can be your keyboard shortcuts if a certain pneumonic or the default doesn't work for you change that stuff I Chang my shortcuts in just about every app um typically I want all of my video editors to work the same so like if I have an in and out point I make that the same shortcut in all of the apps because everybody's got their own way of doing it and likewise you know if I have a a shortcut that doesn't make sense to me in vs code let's say um I was hitting um I think hyper s to to split windows like that makes sense for
me I you know that's not what the default is but it's I'm splitting the window I want to call it split so hyper s okay that's it so you have the freedom to really make these things whatever makes the most sense for you and whatever sticks in your brain and that will uh help in the long run and also in addition to like what you were saying about your keyboard mouse being like crazy that stuff just takes some time sometimes um for instance it's like the same thing as listening to a podcast at at 2x right you don't start at 2x you start at like 1.2 and and you get used to it you get you know used to the water a little bit and likewise if you go straight to as fast as possible with your mouse you might be a little wild for you and it might be you know uncontrollable but if you take it a little bit at a time you can build up that like really that feeling of what it looks like and the next thing you know you know those little things can be tuned here and there as you go so just take it small um but like what Wes said
invest some time in your personal Computing um you'll be able to get better at using your computer which we all do all the time so uh now this part of the show where we get into sick picks things that we pick are sick I actually have two sick picks for y'all today I cannot help myself I'm so sorry one of them is related to the other one the first one is perplexity doai you may have seen this thing around you may have heard people talking about it some people going as far as replacing their default search engine with perplexity because let me tell you this thing rules it's a search engine that is very different than typical it is obviously an AI based thing given its a extension and it is an AI based search search tool but let me tell you the type of things you can search on this are outrageous for instance I was seeing a personal money manager app like a mint or a personal Capital One of those and it was
Sick Picks + Shameless Plugs
open- sourced and it was on Twitter and at the time I did not follow I did not bookmark I didn't do anything and I regretted that because searching for that kind of thing was a pain I went to Google open source personal finance I went to GitHub I could not find it I went to perplexity and I typed in hey what is that open-source personal finance app I've been seeing people post on Twitter lately and it responded with uh the open source personal finance app gaining attention on Twitter is Financial Freedom by server side server side up it is described as the open source alter it found it with that search question that is an outrageous search question it was is brilliant that that's enough of a demo to me to be like this is brilliant it's amazing I can't believe this I had seen people using it and I I tested it once or twice but but
I just said on what episode of syntax did they talk about react server components which we released what as of recording six days ago and it says uh in episode 718 titled react server components Wes Scott had in-depth discussion on the react the new react server components feature including serers side rendering async data fetching form suspense and more it's crazy that's amazing it's amazing and every time I've asked it to find something for me that people have been talking about on Twitter yeah like lately it finds it every single time um so gosh this is really where it's at and so my sick pick is perplexity AI I have the app on my phone now I have the uh you know I don't have it as my default search engine but I'm also going to sip pick the open- source Finance platform app that it found for me because I think this is worth keeping an eye on I'm not using it just yet but you can roll your own Finance tracker and it is the same as personal capital or Mint or any of
those but the worst part about all those apps is that the moment you start using any of those you get people bugging you all the time hey what where are you keeping your money we want to manage your money like just leave get out of here I'm just trying to like make you know make make my budget here um so this one is self-hosted it's private and I don't think it's fully featured yet but it's a really cool project to keep an eye on I just asked it what sick pick did Scott of the syntax podcast pick it was a seasoning and it says Scott picked the trader chose everything but the bagel seasoning blend I have done that but it could be toi as well I don't know if i s pick togarashi I'm pretty sure you did um what other seasonings did he pick Scott's other sick pick was Valley heat podcast okay that could that could be a seasoning yeah um I'm going to sick pick the zo zoji rushi I don't know if
I'm saying this right zo G Japanese for the most part is all continent V continent unless you get into like she which is yeah zo G rushi so our rice maker of like 10 years we had like a quinart kind of cheap one and it gave up The Ghost and I took it apart and couldn't couldn't figure it out and also like I'll fix most things but things that heat up I generally I'm like it's fine to to retire this one so we I was talking on Instagram I was like what what do we get cuz we also have like one of the like the super cheap rice cookers that just pops up and it's yeah it has to do with the like a thermal pop and I was like that one actually works pretty good but and then like on the other side you have this like really nice zo zoi rushi buy it for life rice maker um and I was like you know what let's let's do the the
nice one I found it on the Amazon warehouse deals for about half off and this thing is amazing you it has a clock with a battery so when you unplug it it keeps the time um it obviously has like all the features you can steam stuff and do different types of rice of course but um it plays a nice little tune it makes fantastic rice they love Tunes yeah yeah all the Japanese stuff is so much so fun when it when it uh does when it finishes it plays a nice little tune for you so very happy about it and the my favorite part about it is that the cord uh retracts so you just pull the cord and it retracts into itself it makes storing it really easy and uh I'm very happy I was on the fence about it for months being like do we really need like a nice one or is a is a cheap one fine but very glad we did it I have the zoji rushi water boiler in warmer and it's like I've had that thing for a long time now and it is a beast it works as
good as the date I got it and uh what it also plays a cute tune when the water's the correct temperature so um you know apparently they one of my favorite gadgets bread maker is amazing uh so my dream one day I'll I'll find one of these at a yard sale or something like that yeah big fan of zoji rousi yeah it's good stuff uh Shameless plugs West boss.com courses list all the coures that I offer Shameless plug is level not level wow I'm so used to doing that uh Shameless plug is syntax on YouTube we're going to be releasing the podcast on YouTube along with each episode so if you want to see our beautiful faces while we talk about this or just in general you know hang out with us in that kind of way or if you want to get some more additional content we're doing all kinds of stuff on there uh whether that may be tutorials or additional videos here off there subscribe to us on
YouTube it's going to be a blast beautiful all right thanks for tuning in catch you later peace
Quote it with credit and a link. Quoting Syntax