Syntax - Tasty Web Development Treats
Hosted by Scott Tolinski and Wes Bos
9,636 words · 2 speakers
Speaker names marked ? are inferred from speaking time and the show’s known hosts — they are not voice-verified.
Welcome to Syntax. Today, we've got a Pollock episode for you. That's where you bring the questions. We bring the answers. Some really good questions today about is React context in Shadsee and bad? How do you sell a website? So I talked about how I made 35 grand once, may sell on a simple, simple website. What should you focus on now that AI can write your HTML, CSS, JavaScript? Somebody's kind of feeling a bit bummed 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 intro. So I'm going to clap and you'll see me in a new shirt. How you doing today, Scott?
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 Boss.
Putting a black logo on a, for anyone visually or anyone listening to the audio. These are new hoodies that I tested forever and it's like an oversized mineral wash, 100% cotton. 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.
It's gonna be a new favorite over here for sure.
Probably by the time you're listening to this, that and I wish I was wearing it today, but the, we also have a purple shirt that is in the same like kind of ass. Oh, he's wearing it. Oh, man. Let's see it. Yeah. So it's embroidered, it's mineral wash, slightly oversized for that modern look. You can appeal to the children. Oh, yeah. 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 is like, uh, it's nice. I don't have too many like a little bit oversized tees. So no, I'm pretty set for that.
That's what the kids 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. I'm kind of 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 Co's?
They're not jean though. They're not that baggy. Yeah, but they are, they're not my, uh, not my typical. I'll tell you that.
Uh, that, that's one thing I, I am dreading is that the style of the skinny jean has, has gone away.
Oh, it's gone, yeah.
Funny because I've been wearing the skinny jeans for like probably 15 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 want to 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, huh, okay. Uh, but it looks fine. It's like my Jordans, whatever I'm wearing. It actually looks good with this shirt since the shirt is oversized.
Yeah, yeah.
Yeah, totally.
All right. I'll, I'll give it a shot. I'm due, I'm due for a new pair. Look at the, look at the holes in these ones.
Oh, yeah. Yeah, yeah.
It's hilarious. Speaking of, let's, let's talk about jeans a little longer is
Ah.
I used to always blow at the crotch on my jeans and, and then once I had
Once I had kids, the, the knees on them started, started going much faster than
Oh, yeah, yeah.
The 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.
I was playing, uh, some mini sticks with my kids on, uh, Sunday in the basement and some like mini hockey sticks.
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 throwback era for sure.
Someone's gonna clip that.
Oh, boy. Awesome.
All right, let's, today we got a Pollock episode for you, which is you bring the questions, 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 upcoming show. 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.
Get crazy with it, yeah, for sure.
First question from Nahari says, 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, HTML in 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. Well, 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.
And like, I, all I had to do is type that into AI. So I, I challenged him on it. I said, all right, get it to do it. And it didn't do it. So quite honestly, I think that a lot of the like, higher level stuff is, you won't have to, to look up all that much anymore. But when that stuff is table stakes, when that stuff is available to everything, 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 going to want to 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, where literally anybody can go ahead and Do it, we all move up. The people who are able to learn, the people 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 Versal looking website on every landing pages 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 so oftentimes the CSS that the AI outputs is not what I want. 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 base is what allows you to generate better code because 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 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'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. There's newer APIs that I want to 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 now that AI generates it all? Yeah. Yeah, it does. Semantic HTML matters. It matters. It doesn't matter who's writing it. Semantic HTML is in for the author. So it does matter.
All of these things matter. I mean, we've talked about this before. You are responsible for the code you are 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.
When it breaks, it sounds stupid, but you gotta know what to type into that box.
Yes.
When it breaks, or what it is that you want. And that's why. Like 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.
Yeah, I think that's such a big part of it. All right, this next one is from Vanilla JS gave me RSI, but I persist. Funny name someone in this episode. 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. I'd love to move the codebase to a more modern stack, but the question is, where do I even start? Ha ha, I'd like to use React on the front end. Okay, so yeah, so this is tough because yes, it's a big codebase. Rewriting a codebase is almost always not the right idea.
I think there's some some famous quote about you don't want to fully rewrite a codebase. I do think this is a thing you could approach potentially route by route, depending on what what the project actually is. 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 a 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. 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 would might think you would probably not want to 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.
I don't think you need to replace Express. I think that's totally fine. The EJS stuff, yeah, to react, that does make sense to me as being a good place and something that you could. Like I'm saying, like, take smaller chunks of or do that a little bit more.
Yeah, you're not doing this whole rewrite in a single swoop. That's a bad idea.
I mean, I've done it. I don't want to. I don't want to 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 tell you what I've done over the years of moving it over. The first thing I did, I don't know, maybe four or five years ago, is I moved the whole thing to TypeScript. And all of this refactoring is going to be a thousand times easier when your entire code base is typed. So figuring out, or maybe, I don't know, 200,000 lines of code, 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 type than a lot of the front end stuff. Then, once it's fully typed, you can sort of take a step back and say, okay, what would be our ideal stack if we were to move this over? And for me, I looked at it and I says, okay, I have Express JS, I've got Mongoose, and I've got Pug. I gotta get rid of Pug because I want to move to, eventually I want to move to just writing React everywhere. 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 sort of a second rendering engine where I could just write everything in JSX and then server render it. So like, 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. It was basically just server only React. And I did that so that eventually I can move the whole thing to React. But it's too large to do it in one, right? There's 15 different websites running on this thing. So I just sort of just went site by site converting 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, all right, I've got most of that moved up over. Express, I'm 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 when 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. And then everything else is going to 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 the amount of Express specific code is going to be minimal. Even all of my middleware's, 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.
And that way, things like user authentication or when you visit a webpage, the which course you're taking is populated in the middleware, all of that is moved over to a sync local storage. And again, that's off of the, the Express stuff. Again, I'm not going to 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 work, I can do absolutely everything I want. Yeah. There's no benefit to me to, to moving it onto another database.
Yeah, totally. Yeah, that mongoose piece, that would be tough anyways.
Uh, next from Shane Cullen. Shane actually took, uh, Hackery. I taught him probably 11 years ago.
Wow.
Having built a large front-end IOTS and FPTS, um, and loving it for the most part, effect dot TS is poised to be the next big thing IMO. And it's growing and maturing incredibly quickly. This is hilarious because Shane was the guy in the bootcamp 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 he still had it. Have you looked into effect dot TS at all? If so, what's your take? So we had, we had Johannes on episode 767. Go to syntax.fm/767.
And he talked to us all about it, uh, all about what the, the benefits of it are and how to approach it. And it certainly seems like a awesome way to approach writing local first apps and literally any type of, um, functional UI. But I, I was all pumped up after it and I've tried it a couple of 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 apps. But Johannes is, is probably one of the smartest developers I know.
And anybody who I know that's touching effect dot TS 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. And have you heard of anything similar?
I don't know about anything similar, you know, but effect dot TS for me, it feels like too much. You know, like you're doing too much. Yeah. Why, 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 plugins 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?
But some people feel that way when they look at TypeScript, period. Like, I can just throw together some JavaScript, let alone, you know, TypeScript. So for me, yeah, Effect TS looks cool. 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. But at the end of the day, it's just, it's just a lot of extra stuff. Everything takes a lot of extra steps.
We should probably explain like what it is really quickly. So effect dot TS 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. And it seems really nice, but like, man, I, it's one of those things like, yeah, like also Devorak 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.
It's just too much for, for the regular person to, to learn this type of thing. Even just the simple fetch, you have to just do everything in the effect way. 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.
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 its own beast. But that said, if, uh, I mean, if you're coming from something like Rust too, you'd like, like how it handles just general control flow and things like that. There are some people who are going to 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. All right. 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, nimboard.com. 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 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 Fs, F-F-F-U-E-L.co. And we purchased this site based on a very similar situation.
Yeah, he just tweeted, like, one night, like, 3:00 AM, I was, like, up with one of the kids, and he's like, "I think I'm selling fuel." And I was like, "I frickin' love fuel. Don't let anyone bad get this thing, because it's one of my favorite websites out there."
That's really it, is that it's such a useful utility. We used it all the time for all kinds of things. The last thing we wanted was for somebody to buy it and shut it down, or anything like that. And we're going to 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." 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, you know, again, they have users. So if you have users, people are 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? Cause 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.
Flipper and Empire Flippers. 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 get contacted all the time. 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 $10 to $50,000 or even a $500 website.
And because they, they know that there's something that benefit they can get out of it. Like in fact, I had a 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 that was just like a little fun little website I've worked on over the years. And TopTal, you might even want to 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 grand for it, which is silly, given that it's a website that shows a key code.
But 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 just checked your Twitter, not a lot of followers on there. So probably might not be the best, uh, 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 going to see it on a billboard. At the end of the day, I do think maybe paying to list it or listening on one of these places might be 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.io forward slash syntax. 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 sentry.io forward slash syntax. Again, we've been using this tool for a long time and it totally rules.
All right.
Next one from not Jerry. Sorry about the barrage of questions. That's okay. Keep them coming, Jerry, or not Jerry. Have you guys used ShadCN, the component library? Well, it says on the website, it's not a component library. 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 recommending avoiding context when possible, favoring alternative patterns like component composition instead. Is my understanding outdated, or do you have any thoughts on this approach? Yeah, so ShadCN uses context 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 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 React is React context, right? There's no possible way to have to prop drill that all the way down. And in many cases, it's just not, there's no way 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 re-rendering it, but for something like changing the theme, which happens once,
or something like posting a congratulations, 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 in this case, it's React context. If React had signals, I guarantee they would be using that. And also, I should say, like, ShadCN uses Radix, and it's very heavily built on top of the Radix library. So that's what they use, so that they need to use it as well. ShadCN 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 internet.
So I would not sweat any of these patterns being a bad thing.
Yeah, I do think there was a little bit where context was used pretty heavily. And then there was the pushback of like, be careful. Context will re-render 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. If you use context, you will die.
Tools over rules.
Yes, exactly.
Measure it. Is it a problem? I don't know. You check. You check. 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 Bi, he was on the podcast. You go grab his React rendering Chrome plugin. And you can see if it's actually issue. Use your application, put on a low CPU profile. Is it laggy? Are you seeing frames re-render more excessively than it should? Then yeah, you have a problem. But go test it. Tools over rules.
Yeah. And by the way, that Chrome plugin is React Scan. In case you're wondering what Wes was referring to. It's a cool plugin, shows you when your app re-renders and how much. And it was really fun to follow him on Twitter, showing off these like famous websites that are re-rendering like crazy, just because of how React is, right? But like you had mentioned, context was really the way to do this, right? If you have, I think the pushback on context was people who were throwing like 10 providers wrapping their entire site that were then updating data throughout your entire site.
Even then, 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 laggy and re-renders and you're doing bad things. But Ryan Florence tweeted this out the other day where he was like, "It's beautiful that you can compose 15 different random plugins and put them all together in a single application and it works."
Yeah. I mean, I prefer the separate like state living outside of that, but.
I agree. Yes.
But at the end of the day, that's just. Yeah, this is just how you're supposed to do it in React world. And especially in like micro modules of this thing has its own state.
Without prop drilling, yeah, it makes more sense to have it be in context. All right, next question from Disco RD 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. There must be a better solution out there. Keep up the awesome work. Yeah, you know, I gotta say, I hate this too, and I use Discord. You know, 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?
Yeah, Discourse was like the forum software. There's Spectrum from Max. And then that got bought by GitHub Discussions and the GitHub Discussions kind of still suck. DevTO had their forum.
I still love the forum software more. The problem is getting people to use it because I do remember even as recently as like, what? Like 2015 and Meteor World? The Meteor Forum was such a better place to, again, find old issues, surface them. If your Googling stuff is coming up, you can search better. You can find an older issue 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 types of things and solutions and collaboration. 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 dead and Discord is where it's at. I do agree 100% with this, though, because it not being searchable or it not being like long living is such a huge problem, I think.
It's really tricky. I've thought about this a lot because like I have a fairly large chat room for my courses as well. And they're like, the forum is way better because it is searchable and whatnot. But chat is way better because it's instant and you're able to go back and forth with people and debug and whatnot. And 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 has never come out and Discord sucks at threading.
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 not. There's some, 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 like Toyota Sienna 2015. Like there's some dude.
Which, how many days are in the week?
Bodybuilding forum. Oh.
Oh, yeah, yeah, the bodybuilding, yeah, but like the bodybuilding forums 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 kind of sucks because like all this 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 carbureator on a 94 Polaris, you know? So, yeah, 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 it's not there.
Yeah, even if there is something that's built and getting people to use it, it's just tough. Yeah, it's tough.
Yeah. 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 kind of 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 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 like answering
questions, 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.
Yeah, I'm currently in somebody please help me mode on a discord and let me take this opportunity because I have a platform here. Somebody please help me. I'm working on a Tori mobile app. I have submitted it to TestFlight several times successfully. I make one little update to the app that is not changing anything in the codebase. 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 .symbols file in my APK. 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, re-upload, same error. So for some reason,
the dang Tori bundler, or even the Apple bundler, at some point is including a .symbols file in my APK, and I can't do anything about it. I'm like going nuts. And I posted on the Tori thing and they're like, well revert your change. I did. I've tried everything. I've updated everything. What's going on? Somebody who knows anything about this. If you're out there, 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.
All right. Next one we have from Anon. This is why I despise AI and I don't want to 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's sort 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, use AI. And that's obviously going to make a lot of people mad. So yeah, it's 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 you 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'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 online, you know, the Replit CEO, the O'Degh going off on Twitter, 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, um, is going to be much higher with, with these AI tools. And I don't think that you can simply just bah, bah, bah, ignore it because somebody who does use these tools gonna come around and eat your ham sandwich.
I think that's the exact, exact way to look at it is, yeah, someone is gonna eat your ham sandwich. And you, you can put your head in the sand and say, I hate these tools. 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 going to become more and more prevalent. 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.
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?
You gotta kind of give in a little bit if you want to keep your job, I think.
I'll say this on the flip side is 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 of days ago. And I was like, that's bull, isn't it? And she's like, yeah.
So she 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 10,000 line template and it moves from a dot something. I don't want to say too much because I don't have permission to say this, but 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 of little formatting changes in the JSX, changed class to class name. And then boom, 100,000 lines of code written by AI.
So that number is not as huge, but 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 want to 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.
On Monday, the worst day that we've had in the stock market history.
Right.
It's 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, hmm, Shopify is using AI. They're not hiring these expensive people.
Press the AI marketing button.
Yeah, exactly. So.
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 get the investors to feel good about them. You know, Jim Cramer and all that stuff. And Shopify is a huge company as well. They're massive. 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, impossible. For many years, some other company is going to come along that is better at AI, is much more swift, and they're going to eat Shopify's lunch. And Shopify, as a public company, is very scared of that.
That's my thoughts.
Yeah, I think you nailed it on all accounts. 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. But if you don't embrace it to some extent, I do think your job is probably at risk in the future.
More so than somebody who does take the time. 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, man, these are some of the most annoying people on the planet.
So obnoxious. Yeah. You scroll back six months in their Twitter timeline. They're talking about Ethereum and
Web three, yeah, yeah, yeah.
Yeah, get out of here, you know? But like, that's what we should say is that, like, approach all of this with 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 all of the stuff changes. Because it sucks. I just want to go back to writing my selectors and whatnot. That was fun. I really enjoyed the last 15 years of web development. But
Same.
Unfortunately, it's changing and I'm not just gonna put my head in the sand.
Yes. Yeah, I feel you. Last question here from Ludwig or Ludwig. 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 to use lifecycle events of the framework to assume rendering has happened and then trigger on scroll. To my dismay, this did not work reliably. 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.
I'm not sure what that sentence means. This usually starts to manifest when you have a large number of manipulations. Many people on the web help themselves with a set timeout, assuming that a few milliseconds is enough for the browser to complete its rendering. 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. 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. Honorable mention, some people use RequestAnimationFrame 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 window scroll position to a variable, check that window position, trigger an animation on values or whatever. But let's say you're using something like Framer, Framer Motion. I think it's just called Motion now, motion.dev. They got this stuff built in. 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 he's more talking about like, he wants to scroll the page to an element when it's on the page, but it's happening too quickly.
Oh, so like you're scrolling down and then when that element is on the page, scroll, like take over your scroll?
Let's say you're like, you had like a list of tweets or something like that. And every time one was added to, to a div, you want to scroll that div up. 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. 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. And all of those steps, it sounds like it's running too quickly. But if you explicitly run it either after a couple of 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 now, 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 that it's going to be ready at that point. And it might be too fast and it might, it's likely too slow.
Yeah. Interesting, interesting problem to have. I wonder what the interface of this is.
Yeah, it's probably like a chat app or something like that.
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.
Yeah, 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, can you stop? I'm trying to read.
Yeah, that's what, that's what I say all the time to, I want to say it to my kids, but I guess I don't read very often. So, no, I don't ever say that.
Oh, good. 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 pics and shameless plugs.
Yeah, I have a re-sick pic, a sick pic that I've done before, which is this little 1,000 lumen, little rechargeable USB C flashlight. Oh, yeah. I take this, this thing is like this big. I wish I had it on me. It's, I take it everywhere. I'll tell you that. 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. 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 is 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.
It's 19 bucks. It just is rechargeable and it is the brightest darned 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, I could see everything. It was incredible.
You don't realize how, how crappy your phone flashlight is until you have a good flashlight.
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, I like that. I have a, maybe I'll sick pick this while we're on the thing. I have a really nice headlamp. And again, it's.
I love your headlamp. Yes.
Man, headlamp's a, you gotta get a headlamp, man. I have one at the cottage and 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, you can just hold it. It takes an 18 650 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 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.
But it's, it's amazing how good they are and I use it so much. Like you said, just bringing it absolutely everywhere. Big fan.
All right. Shameless plugs. What do we want to plug? Syntax.fm. 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.
For this episode. Hey, what do you think about AI? Let us know. Uh, yeah. Also, I want to say we've been doing some CSS battles on 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 are so much fun. Uh, Wes, CJ and I are competing to see who can have the smallest CSS to recreate images. 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 10 to 15 minutes, depending on what the problem is. And you just see that clock ticking down and you're like, all right, 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. Cause I can't turn back now and it's, 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 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, talking, all that stuff. It's crazy. Yeah.
It's unbelievable. And I'll say it, Scott absolutely nailed the last one. Like, like, like a hot, like pixel perfect. 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 tech shadow and whatnot, like the, the knowledge he has of obscure CSS techniques is, goes deep.
Thank you. Yes. You know what? It's funny. And the first two, I talked a lot of trash and people actually have been angry about it.
Oh, really?
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 chat, a sore loser. Well, I don't know if you're a sore loser.
But I don't care.
I have not read the comments on this one.
They're very funny. Yes. 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.
Page updated November 3, 2026 · transcript and summary are machine-generated