Search

639: DX, JSON, XML, HTML, and Databases! Oh My!

Download MP3

How important is the DX of software vs how important is the person showing off the software, Douglas Crockford and JSON, remembering XML, trying to write better HTML for email, new TC39 proposal, workshopping t-shirts, and what do you do if you want a little bit of database on your website?

Tags:

Guests

Chris Coyier and Dave Rupert in silly sunglasses and a sign that says Shawp Tawlkk Shough DOT COM

Chris Coyier and Dave Rupert

This episode is with just Chris & Dave, ShopTalk Show's hosts. Chris is the co-founder of CodePen and creator of CSS-Tricks, and Dave is lead developer at Paravel.

Time Jump Links

  • 00:20 Dave's dogs updates
  • 03:32 Chris' Web Unleashed talk on DX
  • 10:39 How often is DX based on a cool person showing it off?
  • 13:21 Sponsor: Bluehost
  • 14:05 Douglas Crockford and JSON
  • 22:49 Remember XML?
  • 25:07 HTML Email
  • 34:47 JavaScript - New TC39 proposal
  • 43:24 Workshopping some t-shirts
  • 44:15 What do you use if you want just a little bit of database for your website?

Episode Sponsors 🧡

Transcript

[Banjo music]

MANTRA: Just Build Websites!

Dave Rupert: Hey there, Shop-o-maniacs. You're listening to another episode of the ShopTalk Show. I'm Dave--in the shed with the dogs who are probably going to freak out--Rupert. With me is Chris Coyier. Hey, Chris. How are you doing?

Chris Coyier: Yeah. How are your two little dogs?

Dave: Uh...

Chris: Being puppies?

Dave: Yeah, yeah.

Chris: Not going to return them, right? [Laughter]

Dave: Well, a little too late. Um... [Laughter] I like the dogs. They're very sweet. I think I underestimated how much I would be the primary caretaker of the dogs--

Chris: Hmm...

Dave: --because, when we got them, it was summertime. Oh, yeah. Kids are around. They've got nothing to do. They can watch some dogs.

But then a week later, they went to school. And then now... [laughter] I am the sole caretaker of two dogs because my wife is working at the school most days a week and doing other stuff, and so... But it's just like--

Chris: Casa d' Dave at home.

Dave: Oh, dude.

Chris: All by your lonesome.

Dave: I'm busy at work.

Chris: Yeah.

Dave: Trying to whatever - deliver value there. But you know it's just... I've had dogs before. It's fine. Never had two young pups at the same time, but they're just--

Chris: Yeah.

Dave: One is dumb as bricks, eats rocks, they dig holes. My yard is shredded. It's just... I'm not winning the game. You know?

Chris: Yeah.

Dave: I feel that, but they're sweet pups. But I'm just... I'm not winning. I just want everyone to know that.

[Laughter]

Dave: Not winning the dog game.

Chris: Fair enough. I'm sorry, man. Life is hard, you know. [Laughter]

Dave: Yeah. Well, one dog would have been different. But then I don't even know if I'd win the one-dog game because that means that dog requires a bunch of attention. At least they go out, and they play, and run around, and rassle and stuff like that.

Chris: Together. Yeah.

Dave: Yeah, yeah.

Chris: That's kind of the point, right?

Dave: Yeah. But I think just the fact that all logistics fall on me, you know. I can't walk through a door without having two dogs take me out at the knees. You know what I mean? [Laughter] It's just like that gets you after a while. It's like raising a toddler is really what it's like - if you've been there.

Chris: Hmm...

Dave: Where you're just like, "We're just doing this all day long, huh? All day long? Is it bedtime yet?" You know what I'm feeling?

[Laughter]

Dave: Is it bedtime yet?

Chris: Just to rub it in a little bit, we're relatively new to not having any dogs after a long time. I open the door, and I just take a big whiff, and "Ah! Just the pleasure of coming home to nothing." [Laughter] I just love it.

Dave: Doesn't smell like a pile of farts, like right now.

Chris: Yeah. It's not even the smell. It's the smell of chill. [Laughter]

Dave: Yeah. Yeah, not chaos. Not clitter-clatter of a dog just peeling out, slamming into the wall, licking your guests in the crotch.

Chris: [Laughter]

Dave: Yeah. None of that is going on.

Chris: Right.

Dave: That's great. Barking at every squirrel, every person that would ever come to the house. Yeah, it's neat. Yeah, I'm sure.

I had a year of that. That was great. Oh, well. It's fine.

00:03:33

Chris: Well, I'm fresh back from Toronto at Web Unleashed. It was kind of fun. Haven't been to a Web conference in a little while.

I spoke about developer experience and things. And I had a good time putting together that talk, so I'm sure I'll turn it into some kind of long-form blog post at some point so everyone can enjoy it. I have to give it one more time. That will help me refine it a little further before I do that blog post thing.

Dave: What's kind of the big thesis? Like, "DX, it's great"? [Laughter]

Chris: Yup. Yup.

Dave: Yeah? Okay.

Chris: Yeah, and it was a funny one to talk about. I feel like when you get to talk about... Let's say your talk is about JavaScript, CSS, or whatever. It's almost, by its nature, scientific truth.

Dave: Mm-hmm.

Chris: You're going to show something, some code, and then you're going to show it execute in a Web browser. You're going to be like, "Look. This equals that. Isn't that interesting?"

You have that possibility, at least, that you can do that. You almost feel like a little scientist. You know?

Dave: Mm-hmm.

Chris: Here I'm proving something for you. Then you can talk about it. Maybe you'll have some general opinions and stuff. Then it waivers into it. But I felt pretty sound when I do that whereas, with this, it's so squishy.

Dave: Hmm...

Chris: I'm just talking about I didn't apply any scientific rigor to my opinions about what makes for a good developer experience. You could because it falls under the general realm of UX, which is a discipline that you can apply science and stuff to. But I didn't here.

Mostly it's me just being like, "Listen. I've been a developer for a long time. I'm a cofounder at a company, which we have to provide DX to the people who work here, too. And it happens to be a developer product, so we're providing DX to 10+ million users.

Dave: Yeah, yeah.

Chris: So, like, um... DX is on the mind. Not to mention we're making a new version of CodePen in which the DX of it is freshly considered in a lot of ways.

Dave: Right.

Chris: So, it's on my mind.

Dave: Mm-hmm.

Chris: And I just load it up with examples. I point at CodePen a little bit, but then I point at all kinds of other tools that I think are doing a good job. And then connect it to the larger world. I'm like, "You see how--?"

Here's one that I slipped in there. I don't know how well it lands or whatever, but here's a little one.

Dave: Mm-hmm.

00:05:53

Chris: It's not a new concept, but it's just the concept of syntax highlighting in code.

Dave: Mm-hmm. Mm-hmm.

Chris: We've had that forever, right? But if you don't have that, it's not the end of the world but just the presence of it is part of DX in a code editor.

You can look at an object, and it has one color. Then a method on the object has a different color, and it allows you to understand that.

Or the color of an open and curly bracket matches the closing bracket of curly bracket color, and then it allows you to be like, "Ooh, I see that." Through that (and indentation and stuff), I'm understanding that that's a block of code that's all related to each other, executes in that order, and things like that.

That's positive. It's helping you do something. It also helps you when you screw up.

There are some. Our high contrast theme on CodePen, when there's a problem, it can't syntax-highlight correctly because you've made some syntactical problem. It has a pretty gnarly red color it tries to apply to the problem area, which is just a little bit of DX to keep you on the rails.

Now, it's not slapping your wrist. It's not taking your focus away (like literally the browser focus). It's not popping up a modal or anything. It's just a little bit of a nudge. Any developer that's been a developer for any length of time can just instantly see a syntax highlighting problem and get there and be like, "Ooh, I better look at that." You know?

00:07:22

Dave: Yeah, especially in CodePen. It's like, "Oh, why are you mad?" You know? It's sort of like code telling you they're mad. Then it becomes kind of a game, sort of, for me. But it's like, "Why are you mad?" Ninety percent of the time now TypeScript is mad.

Chris: But mad... I don't know if it's too strong of a word or not. Those are slightly different, right? TypeScript is red squiggles.

Dave: Mm-hmm.

Chris: I go all into that, too, because I absolutely love red squiggles, Dave. I think red squiggles are one of the most important DX concepts there is.

Dave: [Laughter] Okay.

Chris: If you're building a developer product, squiggle them up, baby. Find a way to provide red squiggles about your thing.

There should be some, like, Web component red squiggles thing. There should be red squiggles for everything you can think of because it's so... oh, we already know what they are. And it's mad, I guess, is a way to put it. But it's not so mad--

Dave: That it shut down the application, yeah.

Chris: --that it stops you from what you're doing.

Dave: Yeah.

Chris: Yeah, it's like the right amount of mad, and I think that's why I like it. And syntax highlighting falls in that bucket a little bit, too, and so does, like, "Oh, my code is so malformed that Prettier can't even prettier it." Do you ever get that?

Dave: Mm-hmm. Oh, yeah, yeah.

Chris: That's also one of those, like, "Oh, it's a little mad at me. Why is this behaving?" And I like all those little moments of just light friction so that you can fix it and get back on track.

Dave: Mm-hmm.

Chris: I think that's cool. And I made an analogy to, like, rumble strips on highways. You're driving along in your car, and you're an absolute fool. You look at your phone - or whatever - and then you hear the [lip trill]. It's just bad syntax highlighting. It's that same, you know, little less life and death when it's code.

Dave: Yeah, yeah.

Chris: But that thing is trying to be, like, "Hey, you're screwing up a little bit," and correct you without instantly issuing you a ticket or stopping your car or doing something more dramatic. It's more like a subtle push, and I like that.

Dave: Yeah.

Chris: That's part of the thesis is things like that. I'm connecting real world stuff to DX stuff to get you to think about the concept.

It's not like syntax highlighting... anybody is doubting syntax highlighting as a good thing. But it gets you to think about are there other little, small things that I can push a developer back on track?

Dave: Yeah. Well, you think about, in my neighborhood, they're redoing all the curb cuts, and they're adding in those accessible bumpy bricks, the dots.

Chris: Mm-hmm. Yeah.

Dave: That's an accessibility feature, like, "Hey, you're reaching an intersection. Pay attention." But it's also awesome for me as a parent. Go to the dots. You can go to the dots and then you have to stop." It's good for just walking. If I'm looking at my phone, it's like, "Oh, shoot. I need to pay attention. I'm at the road," or something.

Chris: Mm-hmm.

Dave: I don't generally go that far, but yeah. They're cool. These feedback mechanisms help you exist, sort of.

Chris: Yeah, feedback mechanisms is good.

00:10:33

Dave: Do you get into the idea of developer advocacy as DX at all?

Chris: I want to, but I have to deliver this. In one circumstance, I have to give it in 20 minutes, and it's pretty quick. But I do get into... I quote Swix thing in there that he said something cool that I wanted to share. But there is this idea there's stuff around a product that is part of the DX of the product.

Dave: Mm-hmm.

Chris: Even though it's not the product. Docs is a clear example, and I do get into some examples of that because it's unavoidable. Good DX is good docs. It's a pretty big aspect to it. But that's not everything. The person on social media representing your product is kind of the DX of it.

Dave: I was going to say, how many times do you use a product because somebody who is cool that you trust is the face of it or part of it?

Chris: Hmm...

Dave: I feel like that is a piece of DX that is often lost.

Chris: Sure.

Dave: Just that developer advocacy. I know there's somebody I trust (through whatever means that is). I've heard them do a conference and they're funny, like Phil Hawksworth - or something.

Chris: Sure.

Dave: Is that enough to make me trust the developer experience here?

Chris: Was good? Yeah, like how many CMSs do you stop using because--?

Dave: [Laughter] Because one guy just flips out.

Chris: Yeah.

[Laughter]

Dave: Well, yeah. Not to bring up old drama because it is very hot and fresh and just keeps... It's like a fondu pot of hot drama, dude, that just keeps going.

Chris: Oh, gosh.

Dave: It just pumps it up from the bottom and spits it back out at the top, a fondu fountain.

It is not helping me in, like, "What if I have to eject from a technology?" brain because I always defensively code around that.

Chris: Mm-hmm.

Dave: I over-index on that. I know I do. And people that listen to the podcast for 12 years, you've probably said, "Yeah, Dave over-indexes on needing to suddenly leave a technology in the middle of the night."

Chris: Hmm...

Dave: This situation, this WordPress situation, is not helping me on that. [Laughter]

Chris: Uh...

Dave: It has just reaffirmed my belief that all it takes is for one person with an inordinate amount of power to turn something really weird.

Chris: Yeah. Right. My blog is going to be industry standard Markdown file and no proprietary anything because then I can move anywhere at any time.

Dave: But even if John Gruber goes weird, I've got to figure out a backup for the Markdown.

Chris: Yeah.

[Laughter]

Dave: You've got to think about this, man.

Chris: Yeah. HTML only. Fair enough.

00:13:21

[Banjo music starts]

Chris: Hey, do you got great ideas but no idea how to build a website? Get Bluehost with their AI design tool. You can quickly generate high quality, fast loading WordPress sites instantly. Once you've nailed the look, just hit enter, and your site goes live. It's really that simple.

It doesn't matter whether you're a blogger, influencer, just starting out your side hustle, Bluehost has you covered with built-in marketing and e-commerce tools to help you grow and scale your website for the long haul. When you upgrade to Bluehost Cloud, you get 100% uptime and 24/7 support to ensure your site stays online through heavy traffic.

Bluehost really makes building your dream website easier than ever. So, what's stopping you? You already got the vision. Make it real. Visit bluehost.com/shoptalk right now and get started today.

[Banjo music stops]

00:14:18

Chris: That was fun. Yeah, there's some fun stuff. I've never seen Douglas Crockford before. He was there. Have you ever--

Dave: Oh, okay. Yeah.

Chris: --met him or seen him?

Dave: I have met him and seen him before. He would not ever remember meeting me, but yeah. He's a crotchy old man.

Chris: His talk... He seemed friendly. I had all these moments. I kept thinking of moments to make a joke about JSON - or something. And I just didn't because, in each case, I could see him there in the audience. [Laughter]

I don't think he was at my talk, but I was on a couple of panels while he was there. I kept thinking, "Oh, my God. I better shut up," because I hadn't even said, "Hi," yet. You know? I feel like if we had met each other, it'd be funny to do it. But have the first thing that somebody has ever said be a jab at JSON.

Dave: Would you go so far to say you did not want to comment in JSON?

Chris: [Laughter] I will not comment.

Dave: Ha-ha-ha-ha-ha.

Chris: Yeah, I was on a panel about making mistakes. And it was like, "Chris, what mistakes have you made?" I'd be like, "I forgot to put trailing commas in the JSON specification." [Laughter]

Dave: [Laughter] That's good.

Chris: But I couldn't do it. His talk did have some stuff about JSON in it. It started that way, which is a little unavailable. And it's kind of like what the people want to hear. You know?

Dave: Mm-hmm. Yeah, play the hits.

Chris: It's like hearing the Steve Miller band play "Fly Like an Eagle," or whatever. You've got to do it.

Dave: You've got to play the hits, man.

Chris: You've got to play the hits. And he had some regrets in there. Not anything that immediately you'd think of, I think. He thinks of null as a mistake. That's one of the valid values for a thing. He's like, "It's just not necessary."

Dave: Null and undefined. Yeah.

Chris: Yeah.

Dave: Nonexistence is null kind of deal.

Chris: Nonexistence is null, so why would you put it at all? Yeah.

Dave: Hmm-hmm-hmm-hmm-hmm.

Chris: I think, except for then you could still iterate it over. I don't know what the thing there was.

Then there were a couple of mistakes, but none of them were the things that you think of. I think of mostly comments and trailing commas. I want those things.

Dave: Yeah. Things that are helpful.

00:16:23

Chris: But then he kind of goes into inventing a new format. The way that he thinks about JSON, I feel like, is a lot different than how we do - for some reason. He's just much more computer science-y than your average random front-end developer that digest JSON.

Dave: Mm-hmm.

Chris: He talks about this new format and how much more flexible it is. It has more types. But it's all the way down to like a byte format.

Dave: Oh...

Chris: He talked about lots of advantages of this new format except for that it's not human authorable. That seemed--

Dave: It's kind of like an RPC kind of deal?

Chris: I think so, yeah.

Dave: It's like you have a contract with types.

Chris: There's a continuation bit.

Dave: Yeah. Okay.

Chris: Right. Yeah, it was a little above my head, I'd say. But one of the types in it -- because it's all the same types and more -- one of the types in it is like a blob.

Dave: Okay. Yeah.

Chris: Meaning - whatever - a JPEG.

Dave: You send blobs over wire.

Chris: Yeah, it can be a binary format in which JSON cannot. But we do have blobs in JavaScript. I get that JSON is not JavaScript, but it does seem like you could extend it with that - or something.

Dave: Mm-hmm. Mm-hmm. Yeah. I mean it's just a JavaScript object notation, so it's an object that notates some sort of key value pair system.

Chris: Yeah. I think the new format is called Nota because he made a joke that's like the whole name is bad. It's like the name JavaScript is already bad because it's not Java and it's not a script. [Laughter] So, those two words sucked. Then object is weird because it's not really an object or the way that people in Java think of as an object. It's very not that, so they really don't like it.

Dave: Mm-hmm.

Chris: The only word in Jason that's any good is notation. So, he took that one and just called it Nota, which I think is the new format.

Dave: Okay.

00:18:25

Chris: But he did make a very strong point. He's like, "Listen. I have never versioned JSON at all." In fact, he'll hand out a business card, and the entire spec of JSON fits on the business card, which I think is a classy little move.

Dave: [Laughter] It's like, "Rule number one: No functions. No block."

[Laughter]

Chris: You can go to jason.org, too, and that whole page is very... There's just not much there. It also is the whole spec. You can see the kind of white box on the right is, like, "That's it. That's the spec." It's never changed ever. It just was invented or discovered (as he's once put it) and then that's it. It's been the same forever.

In this world of just unending constant change, this has never changed. It has never changed. It's not versioned and, in his mind, it will never change.

Dave: Mm-hmm. Mm-hmm.

Chris: There will never be a JSON 2 that has - whatever - trailing commas and comments and whatever other little niche features that you think it should have. He's just not going to do it.

Now, other people might do it, and he even lists criteria for that. I forget what they all were. One of the criteria, though, is: make it substantially better. I think that was his poke at the idea that, like, don't just add the comments. That's not substantially better enough to cause the churn that it's going to cause.

Dave: Fair. Fair, I guess.

Chris: Yeah.

Dave: Yeah, I mean I guess you introduce... If JSON 2 comes out and they say, "We support comments," and everyone starts chucking comments in their JSON, every JSON 1 app dies. Right? It would just choke.

Chris: Yeah. Yes. Totally.

Dave: Okay, I want to do it less.

Chris: Yeah.

[Laughter]

Chris: Right.

Dave: Yeah, yeah, yeah.

00:20:20

Chris: There are little moments where I think it's a little bit fine. The example I think of is Microsoft. When you go into VS Code, and you go "setting," look at your personal settings, it's like a UI look, but also you just click that little button - or whatever. It's really just a chunk of JSON is all your settings.

That only ever is ever digested by VS Code. It only matters to one thing in the whole world, which is VS Code. It actually uses JSON C internally. You can write comments in there. Just go ahead // write whatever you want in there.

That was Microsoft saying, "We actually are going to use a variation of JSON in here, and we can do that because we just can. It's only used in that one context. It's not sent across networks." It might be to some regard, but it's not this interchange format meant for two unknown parties to communicate.

Dave: Mm-hmm.

Chris: It's VS Code talking to VS Code.

Dave: Right.

Chris: In that case, I think it's kind of cool.

Dave: It's not a syndication. It's just - whatever - a private store.

Chris: Yeah.

Dave: Yeah. Interesting. Yeah.

Chris: It was fun. Zach was there from 11ty. It was cool to hang out with him.

Dave: Cool.

00:21:41

Chris: Interesting case of JSON not taking over is RSS. Now, there's that JSON feed. I think it was jasonfeed.org - or whatever it is.

Dave: Mm-hmm. Manton Reece, yeah, kind of was involved in that.

Chris: Yeah.

Dave: Yeah.

Chris: Right, and I don't know. It's one of those, like, can this start to slowly win?

Dave: Mm-hmm.

Chris: Wouldn't that be nice? I even asked Zach. I'm like, "Well, is 11ty supported?"

Oh, yeah, absolutely. We have JSON feeds.

I'm like, "Do you have it on your site?"

"No. No."

Dave: No.

Chris: [Laughter] I don't know. I feel like if it's going to take off, we need to all start actually doing it.

Dave: I do think it's a lot cleaner than RSS.

Chris: Oh, God. Yeah.

Dave: I don't know. Those are kind of... I don't know. As much as I love them, they are pretty brutal object formats."

Chris: Mm-hmm.

Dave: You write your first C-data statement, and you're like, "What did I do wrong here?"

[Laughter]

Dave: How did my life get me to here?

00:22:50

Chris: In the Discord there was a funny one. There's the tech nerd guy in the show "Slow Horses," which I really need to get into. So many people love it.

I have not seen it, but there's an image of the nerd. Apparently, there's a nerd character on it who, on his desk, has an easily thousand-page book about XML.

Dave: Yes. Perfect.

Chris: I'm like, "Wow!" Here I thought it was angle brackets with data in it, but probably not. It was a savior at one point. People thought XML was the real big deal there. It infected HTML for a while.

Dave: People thought it was going to take over, and there was a moment where XHTML2 Strict was what you did.

Chris: Yeah. Yeah.

Dave: Then there was a moment where they were just like, "There's going to be no HTML. It's just going to arbitrary XML that gets rendered by an XSTL (XML style sheet)." Thank goodness that didn't happen.

Chris: Yeah. I think, at the moment, that was definitely worse. Somehow I thought it was cooler - or something. Maybe it was a little newer at the time and my young brain was like, "Newer is better." Or I liked the letter X - or something. I was like, "Yeah, X."

Dave: I do like X, yeah.

Chris: Somehow, X is better.

Dave: It's extreme. It was the X-Games, that era.

Chris: Yeah.

Dave: But, well, I think it was also a gateway drug. There was this pressure to validate your website, which is an old concept (but you can still do it) where you validate your markup and XHTML Strict, it would break if you did it wrong. Then XHTML Transitional was a little more permissive about stuff. Then it just was... Yeah, I don't know.

It was like you could run it through the validator and it would tell you if you did a good job on your website, and that was great. Everyone would be like, "Great, I did a good job."

Chris: Mm-hmm.

Dave: Then I'm going to blame Paul Irish came along and said, "You could just put doc type lightning bolt," and [laughter] that's legal.

Chris: Mm-hmm.

Dave: Or dock type HTML, and that's a website. It was like, "What?! Now that's cool because that's less."

00:25:08

Chris: Yeah. It came up for me today because I was looking at putting together just a little template (kind of for myself and kind of because it makes a half decent blog post) about HTML email and my desire to use it a little bit. I've had this tirade forever where instead of using HTML email to do, like, "Columns and have big images, buttons, and calls to action, GIFs, and everything... Ack! We have all of HTML. Let's go crazy," almost pretend like it's still a plain text email.

Use semantic HTML, but because it's an HTML email, you can adjust the line height. You can rein in the line length. You can make links out of words instead of having to just paste the entire URL to see. There are just a few things that's nice about HTML email, and just use only those things and nothing more.

How little can you do to pull that off, I was kind of exploring. The answer is not little enough. You cannot provide a very chill HTML 5 document with the chill doc type and all that stuff and have it render decently in Outlook 2007 or Office 365 and stuff. There'll just be problems, so you still need... You have to use a table if you're going to rein in that width and all this stuff.

There's still kind of a lot you have to do to get full coverage on that look with a fallback that isn't super gross. But I did validate that you can mess with the doc type. There's a gross table layout, and I was like, "I'm just going to change just the doc type to the HTML 5 doc type and see if Outlook 2007 still respects all the stuff, and it does." I was like, "Well, that's my one small win here is that at least the modern doc type in email can be chill."

Dave: Yeah, that's really surprising to me just because it seems like Microsoft is hell bent on eliminating the sins of IE. [Laughter] But for their email client they're like, "Only use the old one, guys."

Chris: Hmm...

Dave: Only old stuff.

Chris: No, they want to. I'm sure that's another building far away from any building you've been in, or who knows.

Dave: Oh, yeah, yeah.

Chris: It's just such a big company that who knows, but I have a feeling. They even had an initiative at one point to fix it somehow. But you know it's arguably a harder problem than browsers are.

Dave: Mm-hmm.

Chris: At least with browsers it was like, "It was just IE and now Edge." There's just one.

Dave: Yeah.

Chris: But email, there is absolutely not just one. There's like 15 just from Microsoft.

Dave: Yeah. Yeah, I mean I think if it's Outlook 2007, there's certain people with arcane knowledge maintaining it. You know what I mean?

Chris: Right.

Dave: Yeah.

Chris: I forget why that one is of significance, but it is somehow. But then there is Web-based ones, and there is not. There's client-based ones.

00:28:23

Dave: Well, the Web-based emails are a miracle to me. When I see a blog post rendered in an RSS reader, I'm like, "Wow! How'd you do it?"

Chris: Hmm...

Dave: Sometimes, you know.

Chris: Yeah.

Dave: Or where they kind of mess with the images and make them full bleed. People do tricks with them in different... I'll shout out Feedbin does a really great job rendering RSS feeds. They'll take YouTube videos and they'll do a custom embed and stuff like that. It's really impressive.

Chris: Yeah.

Dave: But when an email client does it, man--

Chris: Also, they're not iframed. At least in Gmail and other ones I've seen. They don't appear to be, anyway. I don't know if they use some Shadow DOM thing. I don't think so, though.

Why that's so wild to me, even in this little typographic email thing I was just talking about, the CSS that I wrote to colorize the links, for example, you know what the selector is? A.

A{color blue} -- whatever the blue color I choose for the email is.

If that's rendered on a webpage, that A CSS will bleed over the entire interface of it if it's not iframed.

Dave: Wow. Yeah.

Chris: How is that being determined and scoped and all that? It even is relevant to just a reply to an email. You get an HTML email, and then I just hit the reply button, now it's still that same email, but you need that A to not bleed outside of the reply to that email. It's just... Oh, my God. Ugh! Yuck!

Dave: Yeah. Yeah. No, it's... Yeah, the replies and how they break code up. Some add those blue reply lines and all that junk. It's hard.

Chris: Yeah, I'll say. Extra claps for all the work done, HTML rendering, and how all that works. The big joke is that "Oh, it uses Microsoft Word as a rendering engine."

I guess it's not a joke. It's true. It's just that the reasons why have always been a little unclear, I think. I'm sure there are very good reasons for it. Just up and not doing that anymore also causes problems, I'm sure.

Dave: Yeah. I'm sure there is. Well, and email is such a huge vector of attack, like security stuff.

Chris: Yeah.

Dave: Just phishing and whatever. That's hard.

Chris: Certainly, the temptation is, "Just use whatever the rendering engine is for a browser."

Dave: Yeah.

Chris: It's HTML, so use an HTML thing.

Dave: Right.

Chris: Not that simple. Not that simple.

Dave: Yeah. I bet your threat model is huge.

00:31:15

Chris: Things do get simpler over time. One thing you can do is you could have an engine where the JavaScript engine is just completely turned off. You better.

Dave: Mm-hmm.

Chris: You know?

Dave: Mm-hmm.

Chris: That would be smart.

Dave: I would love... I always fantasize about making a browser that had no JS engine and maybe no CSS engine. [Laughter] I'd just say, "If you have body," and then I take the first header, and I pretend that's your main navigation. I kind of chuck it somewhere to the side. Then I take the main content, and I lay that out. If you have a search thing--

Chris: Indie HTML renderer.

Dave: Yeah.

Chris: I love it.

Dave: That just takes over. It's almost like links, but the command line browser, but a little more opinionated or something. [Laughter]

Chris: Yeah.

Dave: I don't know. It'd be interesting what you could do.

Chris: It's not unheard of. That's a little unheard of. But remember how Amazon Silk, that's a browser?

Dave: Yeah. Yeah.

Chris: It would... In a sense, it cloud rendered the website.

Dave: Mm-hmm. Mm-hmm.

Chris: Then what it sent down was almost like a PDF.

Dave: Mm-hmm. Mm-hmm.

Chris: Because it was an image of the website that you could scroll, but it retained some interactivity. Whatever the click regions were, were still active click regions.

Dave: Yep.

Chris: It was like an image with an image map on it. I don't know if that's fair, but--

Dave: Opera Mini did that kind of, too.

Chris: Yeah.

Dave: It would just give you a fake version of the website. I guess reader modes do that, too, now. I'm kind of basically describing reader mode for the entire Internet.

Chris: Yeah, perhaps.

Dave: But I don't know. I don't have the time to do that, so I'm not going to do that.

Chris: But reader mode has to get the whole website; kind of render it. I don't know if it needs to render it, actually.

Dave: It does. Yeah.

Chris: Then figure it out.

Dave: I mean it needs... Yeah, it needs text on page, right? If you're hydrating--

Chris: Mm-hmm. But it doesn't solve... What was cool about Silk in Opera Mini is that it avoided downloading the entire website. That delivering this rasterized version of it was one request.

Dave: Mm-hmm.

Chris: So, it made it way faster in those bandwidth constrained environments.

Dave: Yeah.

Chris: Which is just cool.

Dave: Yeah.

Chris: Good idea.

Dave: Slurped out images and all that.

Chris: What if the Web was a rendered target? What if instead of that network tab with 37 requests, it was one because what it got was a dot-website file - or something. All that work was already done. That is an alternate version of the Internet that's interesting to think about.

Dave: Like fully compiled websites?

Chris: Yeah.

Dave: I know Google tried to do that with Amp and stuff like that.

Chris: Yeah, I guess it was closer to that.

Dave: Basically close to that, right? Or just one CSS file, one JavaScript file, one HTML file, plus images. Then they did the trusted bundle thing. Signed bundles. I forget what they called them. I don't know. I wasn't a fan of that.

Yeah, it is interesting to think, and how far away are we from that because we do run giant servers to compress hundreds of megabytes of application data into a single screen. We kind of do that already. But then we just send 50 files down to the client.

Chris: Yeah, we do. I guess this dovetails nicely into that conversation about compiled JavaScript.

Dave: Oh, yeah.

00:34:53

Chris: The point was made during all that, which is... We'll back up and explain more, but the idea is we run a ton of build processes already. Most websites, perhaps you could argue, run some kind of build process to produce them. Because we're doing that anyway, why don't we just lean into that a little more all the way down to the language level? Do you know what I'm talking about?

Dave: It was a proposal, we should say. No one made this - or whatever.

Chris: Yeah.

Dave: The TC39 met, and somebody (I think from Chrome) proposed two JavaScripts: js0 and jsSugar, which is a cool rapper name.

Chris: Mm-hmm.

Dave: So, js0 is basically the platform, base platform. Then if you want to add features to it, you are jsSugar. That compiles down to js0. If you wanted to add--I'm just going to pick--async await, that was a huge language feature. The argument is, every time they roll out a language feature it open up all these security holes, all these problems, all this. It's a high lift to get a new thing into JavaScript core.

The idea was let's... I think people misinterpret it, but I think it was also not clear. But the idea was, "We'll freeze what JavaScript does, and then anything new," like let's say async await - we'll rewind the clock, "async await would be--" The syntax, you could custom sugar syntax that you could write that then transpiles down to promises - or something like that.

I think that was... I don't know. When I saw the deck the first time, I was like, "Oh, hell no." Then Nils in the Discord kind of broke it down. He wrote a blog post, too. We can post it here.

But it was... I think the more I read through it all, I was like, "I sort of see what they're saying." I love the idea of JavaScript being a scripted language, like you just write it and it works. You don't have to compile nothing. But I did sort of hate it less when I read through it.

Chris: Yeah. Don't know. I mean it feels like one of these lifts that's like, "Well, that's not going to happen." [Laughter]

Dave: Yeah.

Chris: There's just way too much. Way too much - I don't know. What do you call that? Momentum with the current processes. And, sure, it's a big lift, but stuff happens all the time.

Did we get async await? Absolutely, we did. We get big stuff all the time. How big of a problem really is this?

The problem is, I kind of get it. There are features that drop in JavaScript. A lot, actually. It's just ever-changing language, unlike something like Go, by the way, which changes super slowly and offers very little sugar anything.

Dave: Mm-hmm. Mm-hmm.

00:38:08

Chris: It's just a different way of rocking a language that I feel like people are liking more and more. JavaScript, with its ever-changing nature is like, "Oh, my gosh. What do we need to learn now? And is this just somebody's little pet project?"

But there are certain things that are absolutely just syntactic sugar. Some people argue that most things in languages are just syntactic sugar. But you could imagine some new kind of way to loop over arrays or something.

Dave: Mm-hmm.

Chris: You're like, "Look at this! That's a new way." In fact, I just saw one. I was looking at this other post. Pawel Grzybek - or something - a great blogger.

Dave: Oh, yeah. Yeah.

Chris: Earlier in August. What's new in ECMAScript 2024? It's just a list of the new things that are now in ES 2024. There's one of them called -- Gosh, what was it? -- array group, array grouping.

Dave: Yeah, that's cool.

Chris: So, there's going to be now object.groupby. Yeah, it is kind of cool, right?

Dave: It's my favorite function. Yeah. It's my favorite way to group objects.

Chris: [Laughter] Now I can't even tell if you--

Dave: I used Lodash - or whatever - before, right? You'd always reach for something to do this before.

Chris: Yeah. Yeah.

Dave: Basically, organize by whatever. If I have a list of blog posts, organize them by tag - or something - or author.

Chris: Something that's inside the object.

Dave: Yeah.

Chris: That's in the array, so it's one level nested deep. But this will look into the array and pull a value out and give you a callback function so you can group them by something else. It does look nice.

It also looks very Polyfillable or very Lodashable, as it was. It was literally in Lodash, right? I think this would say that we should not add that directly to the language of JavaScript.

Dave: Yeah.

Chris: That belongs in some higher abstracted thing. That I get. Leave it at some other step.

Dave: I get that. But I also like, "Let's make it better." You know? What I love is these are backed by C binaries, right? The C binary for array group is hopefully be faster than me doing it on the client in JavaScript. Give me that. I want that. I don't want the language to freeze. I want it to get better.

Chris: Kind of. The famous one in Go is that there is only a for loop. That's it. That's the only kind of loop that you can have.

Dave: Mm-hmm.

Chris: That's on purpose because it's the fastest kind.

Dave: It's the fastest. Therefore, the best.

Chris: Yeah.

[Laughter]

Chris: But that's the deal. And if that were true in JavaScript, then you want all other types to be syntactic sugar. You want something to compile it down to a for loop because that's what it needs to be to be fast anyway.

00:41:12

Dave: You can take for each from my cold, dead hands.

Chris: [Laughter] That's a good one.

Dave: For of.

Chris: Like for of, for in.

Dave: For in, map. I'm going to put map under the bus, man.

Chris: I don't like them because I can never remember.

Dave: Oh, yeah. One is good and one is from the 1930s.

[Laughter]

Dave: For of and for in. You're like, "One of these is not the right one."

Chris: It just doesn't explain the difference well. It's not a big problem in my life. I could just figure it out in two seconds. But I like features that are a little more self-explanatory.

Dave: Yeah. Yeah.

Chris: But then there are other things that feel like they cannot be in that same category. The very first one in Pawel's post here is about testing the validity of the Unicode version of emojis where you can see if that's well formed or not. It's kind of like a language feature that needs to talk to some deeper part of a Unicode standard. To me, it feels like you can't ship that in the same way.

In the world of CSS land, it reminds me of container queries. You can't just Polyfill container queries. It's not happening. There's no alternate syntax that just makes container queries work. It needs to be part of the browser itself to work.

But I guess that's the point here is that sometimes that's the case. And if it needs to be a low-level language feature because it needs to talk to the computer, the browser, and deeper things, then it can go in js0 - or whatever. But if it's just sugar and it can be compiled away, then it should be in the other thing. It's so theoretical.

Dave: [Laughter] I just searched "jsSugar" on my work computer, and I'm going to get a call from HR, dude.

[Laughter]

Dave: It is routing to very bad Japanese websites or elicit. Not bad, I guess, but elicit Japanese websites. I'm in trouble now, dude. I got fired because of JavaScript.

Chris: jsSugar.

Dave: Oh, man. I was thinking we need to maybe put some T-shirts... We should spin up a shop.

"Take for each from my cold, dead hands" is a good shirt. What was I thinking of earlier? "Sundays are for RSS" would be a good one. Oh, shoot. I had another one that was really good. But anyway, we have a few catchphrases we need to do, man. "Macho Man Randy Standards," would be good.

Chris: I'm happy to do it. I'm happy to do it.

Dave: Ooh, yeah.

Chris: Now that we've reached the age where we realize that there's no money in T-shirts. They're only for fun.

Dave: Yeah, and it has to be print on demand because I know fast fashion is bad, but I also cannot have another box full of T-shirts in my house ever again in my life. [Laughter] I'm forbidden from having that.

Chris: Yeah.

Dave: Oh, boy.

00:44:15

Chris: We have a few questions we could get to from the people.

Dave: Sure!

Chris: Here's one from Darby Dixon III. Amazing name. I hope that's your real name.

Dave: It's a power name. Yeah, that's good.

Chris: Yeah.

Dave: Good name. Good name.

Chris: It feels a little southern, doesn't it?

Dave: Yeah. Yeah.

Chris: Draws a line between two different types of websites in this question saying works for a university, knows Drupal. It's a big Drupal deal. Big, complex, whatever. Then builds other stuff where he just uses Netlify and a little 11ty - whatever - for small sites and thinks of those as two kind of extremes: simple SSG, simple hosting, whatever, and monolith Drupal bad boy thing. Fair enough.

"But there's a point between those two extremes where I want to nerd out a bit and extend my skills and just use a tiny bit of database. I want a website with, say, a single piece of dynamic data that I can do an admin backend so I can update that piece of data when and wherever, and I can channel that piece of data into a nice, light, public site. So, a little bit of database. What would you use for a little bit of database?"

Dave: There's a lot of headless CMS tools, right? You've got your hosted ones like Contentful.

Chris: That's out immediately to me because I'm like, "Oh, it's like $550 a month," or whatever.

Dave: Yeah.

Chris: It's really for enterprise.

Dave: It got expensive.

Chris: Yeah.

Dave: Strapi is another cool one that you could do. You just need a database in the cloud. Go to Heroku. Get the free one.

Chris: Sanity is a good one, I think.

Dave: Sanity was the one I couldn't think of. Yeah. But you could do Heroku. Spin up a database in Heroku. Bing, bong - that's zero dollars or $8 a month or something.

Then you get on a thing like Retool or something that hooks into that database. But the trick is now your small app needs to hit the database securely. You're talking about either at runtime hitting it, which you probably need a serverless function.

Chris: Yeah.

Dave: I would even maybe look at the cloud workers over on Cloudflare to hit that.

Chris: Mm-hmm. Well, that's where I'd stop immediately because I would just go KV.

Dave: I think you're right. Yeah.

00:46:50

Chris: You need a little bit of database. That's the point of it. KV meaning key value meaning it's not like PostgreSQL. It is not a relational database that you cannot SQL query it. It's like a flat DV. It's super dumb on purpose.

You have a key and you ask for the value of that key and it gives it to you. In your case, Darby Dixon, you could say, "My data is the key, and the value of my data is like - I don't know," it could be an integer or a string or, more likely for you, a little piece of stringified JSON that you pluck out and you do whatever you're going to do with it, and you put it back as JSON.

Now, the cool thing about this is a cloud function like that, you can hit client-side. It will have a URL, and you could fetch against it if you want to. But what's kind of cool is it's a little confusing to think about but where a Cloudflare worker can run can be pre-request. As it's serving the HTML, you can run the worker during that phase, such that the HTML that it's delivering already has been manipulated by the worker (if need be). Meaning, you could take that chunk of JSON and drop it in a text area, hidden text area, to grab - or something - or inject a script tag and say "window.data," "window.bydata=" that string of JSON - or whatever.

You can do that kind of thing, meaning a client side request for the data is not even necessary. It's already there, which adds just a little bit of power to it.

Now, I went kind of deep in the weeds a little bit there, but the point of that is spitting up a PostgreSQL and making authenticated client-side functions to hit it is a lot.

Dave: Well, yeah.

Chris: It's super doable.

Dave: The more I was talking, the more I was like, "Golly. Ugh."

Chris: Yeah.

00:48:55

Dave: I think KV would be awesome. You get an admin dashboard for KV that is, like--

Chris: Totally, you do. Yeah.

Dave: Is that a problem, though, if I'm taking customer data, like, "Enter your social security number," and I just have it in an app?

Chris: Well, every app has that problem.

Dave: Okay. Yeah. I guess so.

Chris: If you have a team or something, Cloudflare (the website itself) has roles and permissions and whatnot that you can give different people access to different parts of stuff.

Dave: Mm-hmm. Okay. Yeah. No, I think... Yeah, I would probably say Cloudflare KV is the right choice for, like, you just need a little bit of data.

Chris: Yeah.

Dave: Yeah, because otherwise you get into this whole big security context of, like, "Okay, only the authenticated admin user can hit this endpoint." If that's what you want to build, that's awesome. You could do that. I would also maybe look at Turso or something, like one of these SQLite kind of things, just to hit a database.

Chris: Yeah. I'll note that since you already use Netlify, this came a little later but Netlify's Netlify Blobs that are kind of the same thing.

Dave: Okay. All right.

Chris: That's if you--

Dave: Didn't know about Netlify Blobs.

Chris: Yeah. It's unstructured data. It has a simple key value data store thing. They could also be... I think they're even more flexible.

Dave: All right.

Chris: And very easy to write.

Dave: Well, there you go. No, I mean I think that's a really easy way to do it. I guess it's just kind of how big do you want to go. How much data are you updating? Is it really just one key value? Then make it as easy as possible on yourself.

Then that's where I was... With the database rights. Now you have this whole caching layer you need to do so you don't throttle your database every time you refresh the website. Then you have this whole thing. That's where that Cloudflare seems like really durable (would be the right word I want to use).

Chris: Yeah. We're talking so abstractly. Do you need auth anyway because what you're trying to build has that? Well, that just jumps you up in complexity a whole bunch.

00:51:19

Dave: Brad Frost, the other day, tweeted or posted on Mastodon about, like, say you want to build a simple website. What would you do?

It's a fun thought and experiment, but I think we were talking in the Discord. I think it would be really fun to be, like, "How would you build this given these client briefs?" The client is based in Washington. The client only has three engineers. The client has this and that. Really picky about fonts. Wants to tinker and update the text of the website every single day.

You could go through all your client, your past client, nightmare clients, and just write them out fully abstracted.

Chris: Mm-hmm.

Dave: Just be like, "How would you build a website for this person with these needs?" Maybe you mix and match all these things and randomly generate it.

Chris: It feels like you're describing a prompt for AI, doesn't it?

Dave: Sort of like a prompt for AI, but then it's up to people. The original idea in the Discord was we had a bracket, like a Final Four bracket of CMSs and technologies and whatever.

Chris: Mm-hmm.

Dave: Everyone would pick their favorite one. 11ty is at the top. It wins, right? But given this set of circumstances, who wins the bracket? I think it would be a neat way to battle royal things. It would be a fun play at home game or on stream game. Maybe I'll build it. I'll build it.

Chris: Okay.

Dave: No, I'm not going to build it. I'm too tired.

Chris: It does seem that the answer to the general question of what are devs going to do to quickly spin up apps in the future - or whatever. It does seem like -- like it or not -- it's probably going to be AI something.

Dave: Maybe. Maybe. Yeah.

Chris: We'll see.

Dave: Vite is really good, too. [Laughter]

00:53:24

Chris: Yeah. I'm thinking of, right now, kind of the most impressive thing that's happened recently is that StackBlitz announced this bolt.new. Have you seen it?

Dave: No.

Chris: Have you typed in bolt.new yet? Oh, gosh. You should. It's wildly impressive to me. It's one of these... It's a little bit like Vercel's V0 - or whatever.

Dave: Oh, okay.

Chris: You do have to do a prompt, but it has a bunch of examples and stuff, too. But type in kind of whatever, and it scaffolds out a whole ass working app for you based on your prompt. It does pretty good, to me, like way, way better than I thought it would.

It has... I don't know how it's all built or anything, but I wanted it to make an email for me because I've been thinking about this email stuff. I'm like, "Scaffold out a little HTML email for me," and it's like, "First, install Next.js." It made a TSX (TypeScript typed thing), and then it made an email.

The end result was kind of cool, but I was like, "Well, that's the worst set of technologies you could have possibly chosen." I'm not even trying to poke at it because the audience for this thing is designed to build stuff with JavaScript apps. That's what people use StackBlitz for. It's pushing you toward that kind of thing that StackBlitz is good at doing, so no real shade.

I am kind of impressed at what it's able to do, though. It makes me think, "Well, of course, this is how people are going to get started." They're going to be like, "Give me this boop-a-doopa-doo."

Dave: Uh, well... [Laughter] I said, "Can you build me a search results page with fluent UI Web components?" and it started using the React component. So, anyway, nailed it, dude!

Chris: [Laughter] Yeah.

Dave: Way to go. Yeah.

Chris: It really likes React, so it's going to push you towards that.

Dave: Love React. Let's see what it gets out. But anyway, all right. Well, hey, I've got to go. I've got meetings firing up.

Chris: Okay. All good.

Dave: We'll see. Next week... Tune in next week to find out if AI built a website. [Laughter] We'll find out.

Thank you, dear listener, for downloading this in your podcatcher of choice. Be sure to star, heart, favorite it up. Adam Argyle pointed out that, on 2x, that sounds like "shart." So, when I say, "Star, heart, favorite it up," it sounds like "shart."

Chris: [Laughter]

Dave: I'll just start saying that, so shart it up in the apps, man.

[Laughter]

Dave: Shart it up in the apps. Then follow us on Mastodon. That's the good one. Then join us in the D-d-d-d-discord because that's where cool people hang out. All right, Chris. Do you got anything else you'd like to say?

Chris: I just feel like when you shitting and you fart, it's fine. But if you're farting and you shit, it's a problem. You know? There needs to be different words.

Dave: Mistakes happen. Yeah.

[Laughter]

Chris: ShopTalkShow.com.