896

April 23rd, 2025 × #AI#React#CSS

Do I Still Need To Know JS/CSS/HTML with AI? × How To Sell An App × Is React Context Bad? × More

Wes and Scott answer developer questions sent in by listeners covering topics like AI, React, legacy code, app ideas, web development trends, and more.

or
Topic 0 00:00

Transcript

Wes Bos

Welcome to Syntax. Today, we've got a Pollock episode for you. That's where you bring the questions. We bring the answer some really good questions today about, is React context in chatty and bad? How do you sell a website? So I talked about how I made $35 once made ESLint a simple, simple website.

Wes Bos

What should you focus on now that AI can write your HTML, CSS, JavaScript? Somebody's kinda feeling a bit bummed, and and we've got the answers for you as well as, like, how to modernize an old tech stack. Whole bunch more questions. Get ready. Also, I also changed my shirt because I forgot to record this ESLint, so I'm going to clap, and you'll see me in a new shirt.

Wes Bos

How are you doing today, Scott?

Scott Tolinski

Oh, I'm doing good, man. Just hanging out, doing all the stuff. You're wearing your new Syntax hoodie? I am. Honestly, I love it. I put it on this morning. My daughter was like, this is a Syntax. Oh my gosh. It's really cool. Honestly, very nice and heavy. Super cool. Yeah. Shout out to the designer, Wes Bos.

Wes Bos

Putting, black logo on a, for anyone visually or anyone listening to the audio, these are new hoodies that I tested forever.

Wes Bos

And it's like an oversized mineral wash, % cotton.

Wes Bos

I forget what the GSM is, but it's it's heavy, man. It's the best hoodie I've ever had. I absolutely love it. So be a new favorite over here for sure. By the time you're listening to this.

Wes Bos

That and I wish I was wearing it today, but the we also have a purple shirt that is in the same, like, kinda ass oh, he's wearing it. Oh, man. Let's see it.

Wes Bos

Yeah.

Wes Bos

So it's embroidered.

Wes Bos

It's mineral wash, slightly oversized for that modern look. You can appeal to the children.

Wes Bos

Oh, yeah.

Scott Tolinski

I knew you'd like that one. It's like a throwback to the level up purple. Right? Oh, it's yeah. Oh, yeah. Totally. And it's it's a little bit bigger, which JS, like, it's nice. I don't have too many, like, a little bit oversized,

Wes Bos

tees. So, no, I'm pretty stoked about that. The kids are are doing these days. You know? Everyone's wearing, like, a Georgetown Hoyas triple XL shirt, so it's it's nice to get some a bit more of, like, a modern cut and kinda over the whole, like, super thin Bella Canvas tee. You know? Those Yeah. Those days are done. I got the wide leg jeans on too. I'm like The June Coast?

Scott Tolinski

They're not jean no. They're not that baggy. Yeah. But they Yarn they're not my, not my typical. I'll tell you that. That that's one thing I I am dreading JS that the style of the skinny jean

Discussion on wide leg jeans becoming more popular than skinny jeans

Wes Bos

has has gone away. Oh, it's gone. Because I've been wearing the skinny jeans for, like, probably fifteen years. And I've slightly changed the, like, cut over the years, but it's now now the kids are wearing, like, the the wider ones. And I just can't see myself moving on, but I also don't wanna look like a an old guy. Yeah. I got I got my first pair of, like, wider legged jeans, and it definitely took, like, some getting used to. Like, going outside, I'm like,

Topic 2 03:02

Wes likes the new oversized Syntax hoodies and t-shirts

Scott Tolinski

Okay. But it it looks fine with, like, my Jordans or whatever I'm wearing. It actually looks good with this shirt since the shirt is oversized. Yeah. Yeah. Yeah. Totally.

Wes Bos

Alright. I'll I'll give it a shot. I'm due I'm due for a new pair. Look at the the holes in these ones. Oh, yeah. Yeah. Yeah.

Wes Bos

It's hilarious. Speaking of let let's talk about jeans a little longer JS I used to always blow at the crotch on my jeans.

Wes Bos

And and then once I had once I had kids, the the knees on them started started going much faster than crotch. But luckily, the knees are much easier to repair, so I can just either my wife does it or I bring them to a a tailor.

Scott Tolinski

I was playing some mini sticks with my kids on Sunday in the basement, Node, like, mini hockey sticks. Yeah. And I was just on my knees the whole time, and I was thinking, oh, these these jeans are getting worked right now. This is, like,

Wes Bos

throwback error for sure. Someone's gonna clip that. Yeah. Oh, boy. Awesome.

Wes Bos

Alright. Let's today, we got a Pollock episode for you, which is you bring the Wes, we bring the answers. Please keep submitting your questions. Go to syntax.fm, and there's a button in the nav that says Pollock queue. Throw your question in there, and we'll answer it on an upcoming show.

Wes Bos

You can ask us anything, anything you want about what kind of jeans we like to wear or even crazier, something about programming web development software.

Scott Tolinski

You get crazy with it. Yeah. For sure. First question from Nahari says,

Wes Bos

AI seems to be able to generate code using browser APIs and language features fairly well even though I may need to tweak it here and there. In light of this, should I still be learning JS, CSS, CSS, HTML, and detail anymore? Should I just maintain my knowledge in enough that be able to tweak things? If I shouldn't be diving deep into JS, CSS, HTML, then what should I be diving into instead? In your opinion, it does feel like AI gets to do all the fun stuff while you get to do the boring parts. Yeah. This is this is kind of an interesting one because anytime I post anything new about CSS, you always get some snarky person being, like, unnecessary that you made that video. Like, just the rudest thing ever. Yeah.

Wes Bos

And, like, I I all I had to do is type that into AI. So I I challenged him on it. I said, alright.

Topic 3 05:29

AI can generate code but developers still need knowledge to direct it

Wes Bos

Get it to do it, and it it didn't do it. So quite honestly, I I think that a lot of the, like, higher level stuff is you won't have to to look up all that much anymore.

Wes Bos

But when that stuff is table stakes, when that stuff is available to every to everyone, the bar is raised. And and what people are expecting from a website that has excellent interaction, something that wows people, something that works really well, something that uses and pushes the modern browser standards is is what people are gonna wanna know. So what should you be focusing on? I think you should be focusing on on the harder stuff. Right? As soon as all of this stuff becomes table stakes Wes literally anybody can go ahead and do it, we all move up.

Wes Bos

The people who are able to learn, the people Yarn who are able to be creative and to be able to push boundaries are the ones that are gonna keep their head above water with this type of stuff. And the people who are cranking out the same, Vercel looking website on on every landing page is are not gonna not gonna fare well with this. Yeah. I think a big part of it too is, like, being a director here. Because

Scott Tolinski

so oftentimes, the the CSS that the AI outputs is not what I want.

Scott Tolinski

It gets the job done or it might do it or it might rely on JavaScript to do the things it could do with CSS. So, like, having that knowledge of the code Bos is what allows you to generate better code because I I can tell it, use these following techniques. And if it doesn't know those techniques because it's too new, you can provide it the documentation or whatever. But you have to know those aspects of it before you can even get it to generate what you might want because Mhmm. Like I said, it could just give you a bunch of bad code or not what you're looking for even though it is getting the job done. I I've had numerous times where it's not giving me either performant code or there's a much better solution or there's a more modern solution.

Scott Tolinski

There's newer APIs that I wanna be using. And being able to direct it is only possible if you have that knowledge of how to direct it or where to direct it. So I've been seeing crazy comments about this stuff too. Somebody was like, does semantic HTML even matter anymore Node that AI generates it all? Yeah.

Scott Tolinski

Yeah. It does. Semantic HTML matters. It matters. It doesn't matter who's writing it. Semantic HTML's in for the author.

Scott Tolinski

Yeah. So it it does matter. All of these things matter. You I mean, we we've talked about this before. You are responsible for the code you were shipping even if the AI wrote it. So you gotta know what it's doing. You gotta know what it is at the end of the day. Wes it breaks it sounds stupid, but you gotta know what to type into that Bos.

Wes Bos

Yes. When it when it breaks or what it is that you you want. And and that's why, like, the we make fun of the vibe coding thing, but some of the best stuff that's coming out of vibe coding are from experienced software engineers that know exactly how to tackle this type of thing.

Scott Tolinski

Yeah. I think it's such a big part of it. Alright. This next one is from a vanilla j s gave me RSI, but I persist. Let me name someone in this episode.

Scott Tolinski

At work, I'm maintaining a 200,000 lines of code project, which is fully written in CJS, vanilla JS, and uses an old text stack with Express JS, Mongoose, and EJS.

Scott Tolinski

I'd love to move the code Bos to a more modern stack, but the question JS, where do I even start? I'd like to use React on the front end. Okay. So yeah. So this is tough because, yes, it's a big code base.

Scott Tolinski

Rewriting a code base is almost always not the right idea.

Topic 4 09:10

Don't fully rewrite old codebases, modernize them piece by piece

Scott Tolinski

I think there's some some famous quote about you don't want to fully rewrite a code base.

Scott Tolinski

I do think this is a thing you could approach potentially route by route depending on what what the project actually JS. Or let's, like a lot of times, maybe there's, like, a user facing side of the app after you've logged in, and it's more of an app thing. And there's maybe, like, more of a landing page and marketing based site that you could potentially find, like, really natural splitting points to say, hey. I'm going to move this part of it to React.

Scott Tolinski

That said, you could move this whole thing to, like, a React based platform. Right? But that is basically rewriting the entire thing, and that could be kind of tough. You could also take the approach of using React for the front end and just replacing your EJS stuff with React. Now it's it's hard to say because that stuff may be done server side via Express, probably being done server side with Express, the way that this sounds. But I I would might think you would probably not wanna do a full rewrite and take the pieces that you can, kind of really small and replace one section of it. I don't think you need to replace Mongoose. I think Mongoose is totally fine.

Scott Tolinski

Yeah. I don't think you need to replace Express. I think that's totally fine. The e, EJS stuff, yeah, to React, that does make sense to me as being a good place and something that you could, like, I'm I'm saying, like, take smaller chunks of or

Wes Bos

do that a little bit more Yeah. You're not doing the whole rewrite in a single swoop. You're that's a bad idea.

Wes Bos

I mean, I've done it. I don't wanna I don't wanna recommend that. Well, like, so my entire course platform is a similar stack. It's Express. It's Mongoose, and it was or is half Pug. And I'll I'll tell you what I've done over the years of of moving it over. The first thing I did, I don't know, maybe four or five years ago JS I moved the whole thing to TypeScript.

Wes Bos

And all of this refactoring is going to be a thousand times easier when your entire code Bos is is typed. So figuring out or maybe, I don't know, 200,000 lines of Node, that might be hard to get absolutely everything typed. But get all of your database models fully typed and then try to trickle that data through the rest of your application as much as possible. Right? Like, the server side stuff might be a little easier to to type than a lot of the front end stuff. Then once it's fully typed, you can sort of take a a step back and say, okay. What would be our ideal stack if we were to move this over? And for me, I I looked at it, and I says, okay. I have I have Express JS, I've got Mongoose, and I've got Pug. I gotta get rid of Pug because I wanna move to eventually, I wanna move to just writing React everywhere.

Wes Bos

A good chunk of the platform is in React, but a lot of the server side stuff was done in Pug. So what I did is I wrote a Scott of a second rendering engine where I could just write everything in JSX and then server render it. So, like, it it wasn't going from Pug to React. It was going from Pug to JSX or Pug to server rendered React. Those parts did not get reacted on the front end, which basically just server only React. And I did that so that, eventually, I can move the whole thing to React, but it's it's too large to do it in one. Right? There's 15 different websites running on this thing. So I just Scott just went site by site converting it. It AI is very good at converting Pug to JSX. It knows a lot about those things, And you basically just go one by one. You can have the site running. If you git branch it and then git branch there's a there's a command where you can git branch, but open it in a second folder and run both of them side by side. And then you'll be able to see. Alright. I've got most of that moved up over.

Wes Bos

Express.

Wes Bos

I am not moving off of Express anytime soon simply because the reason why Express is still big is still absolutely massive is that it's good enough for for most people. So what I've been doing is I've been thinking about Wes I code a new controller or, like, a, like, a route handler, I guess you might call it, how would I write it in such a way that I could then move it to, like, a standards based JavaScript, handler in the future? Right? So any express specific things need to happen right up top. Mhmm.

Wes Bos

And then everything else is gonna be nice query params, URL search params. I move it all to standards as much as possible. And then that way, when I do eventually move it, I'm not going to have any express specific code or or the amount of express specific code is going to be minimal. Even all of my middlewares, I moved most of my middleware off of sticking stuff on the request object, and I moved it into a sync local storage, a sync context, which is a new JavaScript API for being able to hot potato data from one function call to another. In that way, things like, user authentication or when you visit a web page, the which course you're taking is is populated in the middleware.

Wes Bos

All of that is moved over to a sync local storage.

Wes Bos

And, again, that's off of the the Express stuff. Again, I'm not gonna move off of Express anytime soon, but it's all in a a good spot for that. And then Mongoose, I'm not moving off Mongoose. It's fine. I'm really good at it. I can Wes I can do absolutely everything I want. Yeah. There's no benefit to me to to moving it onto another database.

Scott Tolinski

Yeah. Totally. Yeah. That that Mongoose piece, that would be tough anyways.

Wes Bos

Next from Shane Kuehlen. Shane actually took, Hacker. I taught him probably eleven years ago. Wow. Having built a large front end Scott and f p t s, and loving it for the most Yarn, effect dot t s is poised to be the next big thing IMO, and it's growing and maturing incredibly quickly. This is hilarious because Shaden was the guy in the boot camp that was talking about all the next level cool stuff, and everyone was stressed out about not learning the next stuff. So glad to hear you still had it. Have you looked into effect.ts at all? If so, what's your take? So we had we had Johannes on episode seven sixty seven. Go to syntax.fm4/760seven.

Wes Bos

And he talked to us all about it, all about what the the benefits of it are and and how to approach it. And it certainly seems like a awesome way to approach writing local first apps and and literally any type of, functional UI.

Wes Bos

But I I was all pumped up after it, and I've tried it a couple times. And I think it's just way too hard for the regular developer to get into. I think that people who know this stuff and understand it and are really good at it can build some really kick ass Bos, but Johannes is is probably one of the smartest developers I know, and anybody who I know that's touching effect dot t s is are extremely smart. And I've heard many times over that they people have had to rip it out of their codebase because their team could just not get up to speed. It's just it's just too different. You know? People think about their applications in a totally different way. I don't know. Have you heard of anything similar? I I don't know about anything so you Node, but effect dot t s for me, it feels like

Scott Tolinski

too much. You know? Like, you're doing too much. Yeah. Why we we why are we doing so much? But, again, it's not for me. I don't I don't think it is for me. I think it's for people who who need to do too much or who really are used to working in that type of context. I mean, the developer that I am, I came from hacking together jQuery plug ins and all that stuff. So I I'm not probably the right person for effect. When I look at it, the whole time, I'm just thinking, why do I need to do all this? You know? Yeah. But some people feel that way when they look at TypeScript period. Like, I I can just throw together some JavaScript, let alone, you know, TypeScript.

Scott Tolinski

So for me, yeah, effect t s looks cool.

Scott Tolinski

I'm probably never going to use it. I do think for the right person, it is a good fit. And if you think it would make you a better, more productive developer, I think that is totally fine and fantastic.

Scott Tolinski

But Yeah. At the end of the day, it's just it's just a lot extra stuff. Everything takes We should we should probably explain,

Wes Bos

like, what it is really quickly. So effect dot t s is a JavaScript library for, basically, architecting, like, flow through throughout your application. Right? Fetching data, retrying things, observable mutations, piping data from one to another, and it's all fully typed all the way down.

Wes Bos

And it seems really nice. But, like, man, I it's one of those things, like yeah. Like, also, Dvorak seems like a great keyboard layout, and there's a reason why people are not using the best thing for everything in the world. You know? The split keyboard is the same way as it's just too much for for the regular person to to learn this type of thing. Even just the the simple fetch, you have to just do everything in the effect way.

Wes Bos

Unless it were to, like, majorly catch on like TypeScript has, I would feel a little hesitant sinking so much into that because that would be a hell of a rewrite if you ever decide, you know what? This was not a good idea.

Scott Tolinski

It's really its own thing. And the way the way that you do it is everything is very the effect way down to console logging. So, like, you're you're learning a whole thing. It's not just a library on top of JavaScript or whatever it is a it's it's its own beast. But that said, if, I mean, if you're coming from something like Rust too, you'd might like how it handles just general control flow and things like that. There are some people who are gonna look at this and be like, this is what I want out of JavaScript. Yeah. The, like, functional programming, like, elitists, they're they're all about this type of thing. Yeah. Yeah. Well, looks cool. Let us know if you're using it. Let us know what you think about effect. Has it made your life better in any sort of way? Let us know. I'm interested. Alright. Next question from Tolu. I built a free productivity app, Nimboard.com, that I don't want to shut down because it helps people, but I no longer have the time or interest to market or monetize it. What's the best way to either hand it off or sell it to someone that can take it further, ideally, without spending money to list it? Yeah. If you have users, chances are those users enjoy the thing that you're they're using. Right? Because it seems like you have users. Although yeah. Let me make meh. Nimboard.com.

Topic 5 20:30

To sell a free app, add a banner saying it's for sale and wait for offers

Scott Tolinski

So, I mean, one, it's a nice looking app. Super nice looking site. Overall, you're having people on this thing. Right? So if you have people on this app, I I think a valid strategy, if you don't want to pay to list it, is to have a banner at the top of the site saying, this app is for sale. If you'd like it, you can reach out to us. So Syntax actually purchased fuel.co, and that's with three f's, f f f u e l dot co. And we purchased this site based on a very similar, situation

Wes Bos

Wes tweeted. Like, one night at, like, 3AM, I was, like, up with one of the kids, and he's like, oh, I think I'm selling fuel. And I was like, I freaking love fuel.

Wes Bos

Don't let anyone bad get this thing because it's one of my favorite websites out there.

Scott Tolinski

That's really it. It's that it's it's such a useful utility. We used it all the time for all kind of things.

Scott Tolinski

The last thing we wanted was for somebody to buy it and shut it down or or anything like that. And we're gonna be integrating a lot of these tools into the new Syntax site. But at the time, it was just like, well, this seems very valuable to us. It's something that we use. It's something that the community really values.

Scott Tolinski

But at the same time, he had a banner on there that was basically just saying, hey. This is for sale. So we reached out to him and and, you know, again, they have users. So if you have users, people Yarn on the site, maybe somebody who sees it will either see the potential in it or know it. That's if you don't want to pay to list it. What are the paid listing platforms? Because I know there's, like, several of these things. So the two big ones out there are and this whole space is full of skeezy dudes. But Flipa and Empire Flippers,

Wes Bos

I'm not vouching for either of those because I've gotten lots of skeezy emails from both of them. As somebody with lots of websites, I I get contacted all the time.

Wes Bos

But these are websites where you can put them up, and there's there's lots of people that are always looking to buy a a 10 to $50,000 or or even a $500 website Yeah. And because they they know that there's something that the benefit they can get out of it. Like, in fact, I had, keycode.info, which was literally just a website that you hit the key, and it shows you all of the metadata associated with that key on your keyboard. And and that was just like a little fun little website I've worked on over the Yarn. And Toptal, you might even wanna reach out to Toptal. They buy a lot of these. They wanted the website just because it's it was a huge SEO rank, and it's a website that people come back to all the time, right, every single time you need it. So they they contacted me and and made me an offer. I think I got, like, $35 for it, which is silly given that it's a website that shows a key code. Yeah. But,

Scott Tolinski

they just redirected the domain name to their own, which I guess is some sort of SEO play, but they've they've kept it up over the years. Yeah. So those are your your options. Again, I I just checked your Twitter. Not a lot of followers on there, so probably might not be the best, best option for you in terms of, like, just posting it. But, again, if there's people on the site, you never know who's gonna see it on the billboard.

Scott Tolinski

At the end of the day, I do think maybe paying the listing or listing on one of these places might get you there faster, but, you know, your mileage may vary. And if you want to see all of the errors in your application, you'll want to check out Sentry at sentry.i0/syntax.

Scott Tolinski

You don't want a production application out there that, well, you have no visibility into in case something is blowing up, and you might not even know it. So head on over to century.i0/syntax.

Scott Tolinski

Again, we've been using this tool for a long time, and it totally rules. Alright.

Wes Bos

Next one from Scott Jerry. Sorry about the barrage of questions. That's okay. Keep them coming, Jerry, or not Jerry.

Wes Bos

Have you guys used ShadCN, the component library? Well, it it says on the website it's not a component library.

Wes Bos

I noticed they use React context pretty liberally for a single component state management, which initially seemed odd to me. I remember earlier, the React docs were recommending avoiding context when possible, favoring alternative patterns like component composition instead.

Wes Bos

Is my understanding outdated, or do you have any thoughts on this approach? Yeah. So ChatCN uses contacts for several of the things, including theming and then some of the components that need to, like, talk to each other, like, for example, like a Toast or something like that. Right? You you have a button in one spot and the Toast message in another part of your application, and it needs to be able to talk to it. The best way to do that in in React is is React context. Right? You you there's no possible way to have to prop drill that all the way down. And and in many cases, it's just not there's no way to to to pass it in. So React Context is not bad. I think a lot of people got that from I don't know if it was in the docs. Like, this guy was saying, React Context can get you in a little bit of trouble when you're constantly rerendering it. But for something like changing the theme, which happens once or something like posting a a congratulations, your your item was saved in a toast, those things don't happen as often. And you when you're building a component library like this, you have to use the primitives that are built in to the framework. And and in this case, it's it's React context. If React had signals, I guarantee they would be using that. And, also, I should say, like, ShadCien uses RADIX, and it's very heavily built on top of the Radix library.

Wes Bos

So that's what they use, so the they need to use it as well. ShadCien powers, like, a good chunk of the Internet. It's funded by Vercel, which cares a lot about performance and React, and it powers a good chunk of the the Internet. So I would not sweat, any of these patterns being a bad thing.

Scott Tolinski

Yeah. I do think there was a little bit where context was used pretty heavily, and then there was the pushback of, like, be be careful.

Scott Tolinski

Context will rerender x amount of parts of your app in these ways, and it can be expensive for these following reasons, and you need to be warned about that. And that turned into a bit of, like, a don't use context.

Scott Tolinski

You if you use context, you will die.

Wes Bos

Tools over rules. Yes. Exactly. Measure it. Is it a problem? I don't know. You check. You check. Don't don't rely on some dudes on a podcast telling you what is good or not. Go get a tool that tells you how often, you can take Aiden Aiden Bai who's on the podcast. You go grab his React rendering Chrome plug in, and you can see if it's actually issue. Use your application. Put on a low, CPU profile.

Wes Bos

Is it is it laggy? Are you seeing frames rerender more excessively than it should? Then, yeah, you have a problem. But but go go test it. Tools over rules.

Scott Tolinski

Yeah. And by the way, that that, Chrome plug in is React Scott, in case you're wondering what Wes was referring to. It's a cool plug in. It shows you when your app rerenders and how much. And it Wes, really fun to follow him on Twitter showing off these, like, famous websites that are rerendering like crazy just because of how React is. Right? But like you had mentioned, context JS really the way to do this. Right? If you have I I think the the pushback on context was people who were throwing, like, 10 providers

Wes Bos

wrapping their entire site that were then updating data throughout your entire site. Even that is it's not a big deal. Like, providers are a beautiful, composable way to put them all together. There's nothing wrong with having 15 providers wrapping your entire app. There's something wrong when your app is is laggy and it re renders, and you're doing bad things. But the like, Ryan Florence tweeted this out the other day Wes he was like, it's beautiful that you can compose 15 different random plug ins and put them all together in a single application, and it works.

Scott Tolinski

Yeah. I mean, I prefer the separate, like, state living outside of that. But I agree. Works fine. Me too. At the end of the day, that's just Please. Yeah. This is just how you're supposed to do it in in in React world. And, especially in, like, micro modules of this thing has its own state without prop drilling. Yeah. It it it makes more sense to have it be in context.

Topic 6 29:00

React Context is a good way for components to communicate

Scott Tolinski

Alright. Next question from disco r d discord. What's your take on the ongoing trend where many open source projects use Discord for questions and discussions? Personally, I hate it since it's not really Googleable, and I don't want to join over 9,000 Discord servers for every project I'm using. Over 9,000.

Scott Tolinski

There must be a better solution out there. Keep out the awesome work. Yeah. You Node, I gotta say, I hate this too, and I use Discord. You Node, I think the reason why people do it is because everybody has Discord. It's really easy to just click the Discord button and add one more and then jump in there. It's actually usually faster to get, like, a response to, hey. I'm having some issues. You know? You know? Can somebody help me? But you know what? The old school forum or not even the old school forum, but, like, what was the one Discourse? Was that the, like, the more modern forum? The form software.

Wes Bos

There's Spectrum from Spectrum.

Wes Bos

Max, and then that got bought by GitHub discussions, and then just GitHub discussions kinda still suck. DevTO had their forum.

Scott Tolinski

F l r m m love the forum software more. The problem is is getting people to use it because I do remember even as recently as, like, what, like, 02/2015 in Meteor World, the Meteor Forum was a such a better place to, again, find old issues, surface them. If you're googling stuff JS coming up, you can search better.

Scott Tolinski

You can find an older issue and and restart a conversation, and it feels way more natural than just, like, Discord, which is just a giant, endless pit of conversation and chat. Discord for me, much better for building community, but not better for, you know, like, just dev conversation around issues, around those type of things, and solutions, and collaboration.

Scott Tolinski

I do wonder why we all jumped to Discord, for those types of things and that it hasn't been swinging back in any sort of other direction or if just forums are are dead and and Discord is where it's at. I I do agree a % with this, though, because the it not being searchable or it not being, like, long living is such a huge problem, I think.

Wes Bos

It's really tricky. I've thought about this a lot because, like, I have a a fairly large chat room for my courses as Wes.

Wes Bos

And they're like, the forum is way better because it is it is searchable and and whatnot, but chat is way better because it's it's ESLint. And you're able to go back and forth with people Node debug and and whatnot, and you they're threaded. And there's been many attempts at, like, merging those two, meaning, like, I want a forum that is more like a chat room. You know? And it's just like it it has never come out. And and and Discord sucks at threading.

Wes Bos

There is a thing called answer overflow, which will index all of the, Discord things and put it up online. And I'll often find especially for, like, Cloudflare workers, I'll find stuff in there, but it's by default, it's Node. There's some I I think about this as well with Facebook groups as well. There is a swath of information from some of the smartest people in the world about backyard chickens and Mhmm. Like, Toyota Sienna 2015.

Scott Tolinski

Like, there's there's some dude Which which day how many days are in the week? Is that the bodybuilding form?

Wes Bos

Oh. Oh, yeah. Yeah. The bodybuilding yeah. But, like, the bodybuilding forms were a huge spot for people to learn. And, like Oh, yeah. We don't have that anymore. It's just Facebook groups full of snarky old men, and it's awful. I that kinda sucks because, like, all those amazing information is is no longer out there and and available. Obviously, it is, but, like, I can't find a Facebook post from two weeks ago that I posted. You know? It's impossible. And I'm I'm pretty good at this stuff, let alone, like, regular people being able to search for how to rebuild a carburetor on a '94 Polaris.

Wes Bos

You know? So, yeah, I I I feel the same way as well with Discord. I don't know what the answer is. I've been hoping for many years that somebody would build something that is a a good mix between the two, but

Scott Tolinski

or it's not there. Yeah. Even if there is something that's built,

Wes Bos

getting people to use it, it's just tough. Yeah. It's tough. Yeah. But the other thing is, like like, spam is so much worse these days. And it's it's becoming very hard to run a community without it being overtaken by spam or overtaking by, like, snarky politic people online. You know? Like, the the days of the Internet back then were were kinda hard. But, also, one more thing one more thing here is that, like, the nice thing about chat rooms is that it's, like, it's also just a a place to hang out. Like, I'll often I've got, I don't know, 76 Discord rooms, and I'll often just hang out in the I'll open up the Cloudflare one or the TANSTACK one, and I'll I'll I like answering Wes, so I'll I'll try to see if there's any issues that pop up. And, like, I'm I've been that guy many times. Every month, I'm that guy where I'm like, somebody please help me. Some I just need someone to talk me through this and to ask me questions. And, like, if that was on Stack Overflow or a forum, I don't think you would have that, like, 80 messages back and forth.

Scott Tolinski

Yeah. I'm currently in somebody please help me mode on a Discord. And let me take this opportunity because I have a a platform here. Somebody please help me. I I'm working on a Torrey mobile app.

Scott Tolinski

I have submitted it to, TestFlight several times successfully.

Scott Tolinski

I make one little update to the app that is not changing anything in the code base. It was just fixing a small bug. And now when I go to update it in TestFlight, Apple rejects it and says there's a dot underscore symbols file in my APK.

Scott Tolinski

And guess what I can't do? I can't do anything about that. I can't do anything about that. I've reverted my changes, reupload, same error. So for some reason, the Dang Tori bundler or even the Apple bundler, at some point, is including a dot underscore symbols file in my APK, and I can't do anything about it. I'm, like, going nuts. And I I posted on the Tory thing, and they're like, well, revert your chain. I I did. I've tried everything. I've updated everything.

Wes Bos

What's going on?

Scott Tolinski

Somebody who knows anything about this. If if if you're out there,

Wes Bos

hit me up. I'm interested. It's one of those, am I taking crazy pills? Yeah. How am I the only person that's having this issue? Yeah. The amount of times I run into how am I the only person that has this issue makes me reconsider if I'm actually good at this or not. I know. Yeah. I know.

Scott Tolinski

Oh.

Wes Bos

Alright. Next one Wes have from Anon.

Wes Bos

This is why I despise AI, and I don't wanna hear anything about it. And he links to a TechCrunch article about, Toby, who's the CEO of Shopify, tells teams to consider using AI before growing headcount. So he Scott of like there was, like, this memo that went around Shopify where they're like, you have to use AI. Like, bet on AI. Use it for all of your things before hiring someone.

Wes Bos

Use AI, and that's obviously going to make a lot of people mad.

Wes Bos

So, yeah, it's not really not really a question, right here. But I do think, especially these companies that are trying to become, many billionaires, that's also why people don't like this as well is, aren't your red rich enough? You know? Yeah. Yeah. Right. But my thoughts on this, I think that as much as a lot of these people hate all the AI stuff and it makes you anxious and you you're kind of annoyed because it writes crappy code sometimes and, like, it's changing every five seconds. We hear you. We hear you. You hate it when we talk about AI in this podcast as well. I don't think there's there's any going around it. And I don't think it's the, like there's so many of these hucksters ESLint. You know, the the replet CEO the other day going off on Twitter.

Wes Bos

No reason to learn to code anymore. Of course, you're gonna say that. You freaking have all this money on the line, and you're you're the guy selling the the snake oil. You know? So, like, don't listen to to those guys as much, but I certainly think that the amount of the more productive we are going to be, is going to be much higher with with these AI tools. And I don't think that you can simply just, Bos blah blah, ignore it because somebody who does use these tools gonna come around and eat your ham sandwich.

Scott Tolinski

I think that's the exact exact way to look at it is yeah. Someone is gonna eat your ham sandwich. Mhmm. And you you can put your head in the sand and say, I hate these tools.

Scott Tolinski

They're bad. I don't like them. Whatever. Yeah. You can absolutely do that, but you are putting your career and job on the line. I don't think this stuff is these types of articles or these types of memos, I think these types of memos are gonna become more and more prevalent.

Scott Tolinski

And the developers who are able to utilize these tools in a way that makes them more effective are gonna be better fits, for many jobs going forward. Now I understand, like, the panic about, like, you know, losing the hand that creates the things and, you know, software is so, like I I saw some some post on Reddit that was like, I work at a bank, and they just laid off x amount of people to use AI instead. And I think that's terrible. It's a bank software. Like, you gotta have some supervision over it, especially, like, these days. You still gotta do that. But in the same regard, I think you gotta embrace these tools to a point. You have to learn to be effective with them. They are helpful in many ways. They can be. Let's say that. They can be very helpful if you are skilled with them, and that's what this is about. Yeah. Take the time to get skilled with this stuff so that way you can be more effective, in the ways that your boss might be looking for in the future. Right? Yeah. Gotta kinda give in a little bit if you wanna keep your job, I I think.

Wes Bos

I'll say this on the flip side JS about, like, six months ago, Google came out and said, like, 50% of our software is now being written with AI. So I had dinner with the person who was in charge of that team a couple days ago, and I was like, that's bull isn't it? And she's like, yeah. Yeah. So she's like said most of that was simply just converting from one framework to another, and a lot of it was simply just like you've got a a 10,000 line template, and it moves from a dot something I don't wanna say too much because I don't have permission to say this, but you're you're moving from a let's say you're moving from a dot HTML to a dot JSX file, you know, and that's 10,000 lines. Well, moving from one to another, you simply just did a couple little formatting changes in the JSX, changed class to class name, and then, boom, a hundred thousand lines of code written by AI.

Wes Bos

So that number is not as huge. But the the higher ups, the people that have a lot on the line, and especially these companies like Google and Shopify, these are big companies, and they really wanna boost confidence to the market in in how they're how they're doing. And they want they want people to invest in them, and they want people to buy their stock, and they want the stock to to keep going up, especially as everything is going down. It's no coincidence that this memo was leaked

Scott Tolinski

Oh, yeah. On Monday,

Wes Bos

the worst day that we've had in the stock market history.

Wes Bos

This is no coincidence. This was not leaked. This was a PR move from Toby to gain confidence. So as everybody was selling all of their Apple stocks and everything like that, they thought, Shopify is using AI. They're not hiring you. Press pnpm the AI marketing button. Yeah. Exactly.

Wes Bos

So Yeah. Yeah. As much as I agree with the things that were said in this, I also know that a lot of this is just hand waviness trying to congratulate themselves and and get the investors to to feel good about them, you know, Jim Kramer and all that stuff. And Shopify is a huge company as well. They're massive. There there's so many frustrating things in Shopify that we use that I've, like, told so many people that work at Shopify. Like, how about we can have a coupon code that gives us free shipping and a free item? Impossible.

Wes Bos

Impossible.

Wes Bos

For many years, some other company is gonna come

Scott Tolinski

along that is better at AI, is much more swift, and they're gonna eat Shopify's lunch. And and and Shopify JS a public company is is very scared of that. Yeah. That's my thoughts. Yeah. I I think you nailed it on all accounts. I I I think at the end of the day, though, the big message here is that, yes, you can hate when people talk about it. You could hate the concept of it.

Scott Tolinski

But if you don't embrace it to some extent, I do think your your job is probably at risk in the future. Yeah. More so than somebody who who does take the time. I I I understand too that the the amount of grifters in this space is a huge turnoff. When I watch AI YouTube, I'm just like,

Wes Bos

man, these are some of the most annoying people on the planet. So obnoxious. Yeah. If you scroll back six months in their Twitter timeline, they're talking about Ethereum and Web three. Yeah. Yeah. Sure. Yeah. Get out of here.

Wes Bos

You know? But, like Yeah. That's what we should say is that, like, approach all of this with, like, skeptical enthusiasm and make your own decisions, but make sure that you're making those decisions from a place of, like, technical soundness and not Informed. Yeah. Not being scared of of all of the stuff changed. Because it sucks. I just wanna go back to writing my selectors and and whatnot. That was fun. I really enjoyed the last fifteen years of web development. But Same. Unfortunately, it's changing, and and I'm not just gonna put my head in the sand.

Topic 7 43:12

Approach AI tools with skepticism but embrace them or risk falling behind

Scott Tolinski

Yes. Yeah. I feel you.

Scott Tolinski

Last question here from Ludwig or Ludwig.

Scott Tolinski

How do you reliably scroll to elements when they get visible on the page? In this scenario where you're rendering HTML using front end frameworks, in my case, Alpine JS, you find yourself wanting to scroll new elements when they become visible on the page. The first approach might be might be to use life cycle events of the framework to assume rendering has happened and then trigger on scroll.

Scott Tolinski

To my dismay, this did not work reliably.

Scott Tolinski

After a lot of reading and testing, I realized that calling a method in JS to manipulate the DOM is not necessarily also completely rendered by the browser.

Scott Tolinski

I'm not sure what that sentence means.

Scott Tolinski

This usually starts to manifest when you have a large number of manipulations.

Scott Tolinski

Many people on the web help themselves with a set time out assuming that a few milliseconds is enough for the browser to complete its rendering.

Scott Tolinski

This is not optimal for obvious reasons. The user has to wait longer than necessary or the browser took too long and the element is not there.

Scott Tolinski

My current solution involves a mutation observer and a resize observer, which are trying to catch as much of the actual changes as reported by the browser when they have actually been rendered.

Scott Tolinski

Honorable mention, some people use a request animation frame to somehow to wait for a render and trigger it. Is there a better solution? Hope you can help. Even knowing that there is no better solution would give me peace of mind. Man, this is something I've almost always done through a library. Why? Because it's usually a pain. Granted, things like Svelte make this easier. You could just bind the the window scroll position to a variable, check that window position, trigger an animation on values or whatever.

Scott Tolinski

But let's say you're using something like Framer, Framer Motion. I think it's just called motion now, motion dot dev. They got this stuff built in.

Wes Bos

You can use scroll scroll based animations directly based built into the library. So if I'm building I know this is Alpine. I think it's more talking about, like, he wants to scroll the page to an element when it's on the page, but it's happening

Scott Tolinski

too quickly. Oh, so, like, you're scrolling down, and then when that element is on the page, scroll

Wes Bos

like, take over your Scott? Let's say you, like, you had, like, a a list of tweets or something like that, and you every time one was added to to a a div, you wanna scroll that div up.

Wes Bos

What's happening is he's adding, like, six or seven things at once and then trying to run the scroll to the bottom, but it's, like, it's too fast or sometimes the CSS is not applied. And, like, you're starting to get into this, like, weird event loop, thing. And you have to look into, like, the how the browser rendering event loop works. Mhmm. And you mentioned here the request animation frame is the move here. What's happening is that part of a DOM rendering node, there's there's several steps to it. Right? There's they figure out what the styles are. They do the layout. Then they paint it. Then they have the composite layer.

Wes Bos

And all of those steps, it sounds like it's running too quickly.

Wes Bos

But if you explicitly run it either after a couple milliseconds or even sometimes you see people running it after zero milliseconds, or if you use request animation frame, which you should be using, what this does is it tells the browser, hey. Next time you do a paint, run this code. Don't run it right Node, but next time, as soon as you are possibly able to paint another frame, meaning that this div has been painted to the page already, then run this this piece of code. So I would certainly it's just sort of sticking it at the the end of the event loop for you there, and, that's I think that's your best approach. Because using a number of milliseconds is you're you're just guessing and hoping Yeah. That it's gonna be render ready at that point. And it might be too fast, and it might it's likely too slow.

Scott Tolinski

Yeah. Interesting interesting problem to have. I wonder what the interface

Wes Bos

of this is. Yeah. It's probably like a like a chat app or something like that Wes Yeah. Because oftentimes, you do things like like Twitter or whatever that they just pop in a, like, 32 new posts and make the user click to add them to the dump. Can I say I hate that when they are constantly moving? A lot of these AI chat apps are just, like, constantly pushing the text up. Like, I can't I can you stop? I'm trying to read.

Scott Tolinski

Yeah. That's what that's what I say all the time to, I wanna say it to my kids, but I guess I don't read very often. So no. I don't ever say that.

Wes Bos

Oh, good.

Wes Bos

That's all the questions we have here today. Thanks, everybody, for sending them in. Let's get into the next section, which is sick picks and shameless plugs.

Scott Tolinski

Yeah. I had a a resick pick, a sick pick that I've done before, which is this little 1,000 lumen little rechargeable USB c flashlight.

Scott Tolinski

Oh, yeah. I take this this thing is, like, this big. I wish I had it on me. It's I I take it everywhere. I'll tell you that. It's it's on my bedside right now. It's, like, this big, and you push the button, and it lights up the entire room. It's crazy.

Scott Tolinski

You can also double tap the button to keep it on, and it has a magnet on the back so you can stick it somewhere. I use this thing constantly. This JS, like, the handiest little flashlight in the entire world. And, you know, we went to, we went to Mexico just recently for for spring break. And, like, one thing I always use this for is checking the hotel room to make sure I didn't leave anything. I'm looking underneath all the beds. It lights up the whole underneath the bed. Like, looking in drawers or whatever, it's just so incredibly bright. Yeah. It's $19.

Scott Tolinski

It just is rechargeable, and it is the brightest darn thing. I I used this the other day. My my son had gotten something stuck in his gum. I had it, like, lit up there, and I got the tweezers in there. And it was just like

Wes Bos

I could see everything. It was incredible. You don't realize how how crappy your phone flashlight is until you have a good flashlight.

Scott Tolinski

And for being so cheap and small, the brightness that comes out of this thing is unreal. So, just I'll post a link to this. It also has, like, you know, little alarms and flashies, and you can do, like, a black light with it. I never use any of that other stuff. Just as a flashlight to have around, to pack in your suitcase, to put in your backpack, I find it to be pretty dang fantastic. So Man,

Wes Bos

I like that. I have a maybe I'll also pick this while we're on the thing. I have a really nice headlamp.

Wes Bos

And it again, it's it's I love your headlamp. Yes. Man, headlamps are you gotta get a headlamp, man.

Wes Bos

I have one at the Scott, and then I have one here. And it is so handy when you need to go outside in the dark or if you're have to crawl under something.

Wes Bos

You can just hold it. It takes an eighteen six fifty battery, which is a very common cell, so you can just slap a new one in if you need it. It also is so bright. Like, it's amazing what lithium batteries and LED technology, how far it's come in the last Yeah. Little while. Like, my buddy is a firefighter, and I was showing him he's like, this is better than what we have on our helmets. Like, they can't just go on Amazon and buy a $15 flashlight and wear it into a fire. There's obviously more steps.

Wes Bos

But it's it's amazing how good they are, and I use it so much, like you said, just bringing it absolutely everywhere.

Wes Bos

Big fan. Yeah. Alright. Shameless plugs. What do we wanna plug? Syntax? Dot f m? Leave us a comment on Spotify. We see those, by the way. Spotify is really promoting and pressing all of those comments lately, so send them our way. We love seeing them, what you thought about what do you think about AI? Leave us a leave us a good or bad comment,

Scott Tolinski

for the sub. Hey. What do you think about AI? Let us know.

Scott Tolinski

Yeah. Also, I wanna say we've been doing some CSS battles on Yes. YouTube, and they've been getting a lot of reaction. People seem to really enjoy them. So we've done three of them now, and they Yarn so much fun.

Scott Tolinski

Wes, CJ, and I are competing to see who can have the smallest CSS to recreate images.

Scott Tolinski

And the thing that I think people don't get when they leave comments being like, why didn't you see this solution or I did this and this is that we have to do these in, like, ten to fifteen minutes depending on what the problem is. And you just see that clock ticking down, and you're like, alright. I'm committed to this direction that I'm doing, and I know this is in the right direction, but I gotta do it, anyways, because I can't turn back now. And it it is stressful, and it's a lot of fun. And at the same time, you're having to explain what you're doing. So I'm having to to tell you what I'm doing as I'm doing it while I'm coding, while I'm thinking of what's the best solution. No dev tools. No dev tools. No talking all that stuff. It's crazy. Yeah. It's

Wes Bos

unbelievable.

Wes Bos

And I'll say Scott absolutely nailed the last Node. Like like like a like, pixel perfect.

Wes Bos

And, like, the the tips and tricks he's bringing out, amazing. Like, I I got absolutely flustered and and got nailed on the last one. And Scott just comes out with the most, like, inventive ways of using text shadow and whatnot. Like, the the knowledge he has of obscure CSS techniques is goes deep.

Scott Tolinski

Thank you. Yes. You know what? It's funny. On the first two, I talked a lot of trash, and people actually

Wes Bos

have been angry about it. Did you have Oh, really?

Scott Tolinski

Bro, some of the comments are absolutely hilarious. I don't I don't take personal offense to these, by the way. There there's just some of them that it's like, I'm so glad to see the cocky guy get absolutely destroyed. Oh, what a cocky ass shat, a sore loser.

Scott Tolinski

I don't know if you're a sore loser.

Scott Tolinski

But I don't Node. Man, I have not Yeah. Read the comments on this one. They're very funny. Yes. Yeah.

Scott Tolinski

Cool. Well, that's it. We will catch you in the next one. Let us know. Leave a comment on all the platforms, and we will see you in the next one. Peace. Peace.

Share