- Podcasts
- JS Party: JavaScript, CSS, Web Development
- How do you define joy?
About this episodeJerod & the gang analyze the State of JS 2022 survey results, play a wicked game of HeadLIES & share some Pro Tips to help you live your…
Jerod & the gang analyze the State of JS 2022 survey results, play a wicked game of HeadLIES & share some Pro Tips to help you live your best dev life.
Changelog++ members get a bonus 9 minutes at the end of this episode and zero ads. Join today!
Sponsors:
- Fastly – Our bandwidth partner. Fastly powers fast, secure, and scalable digital experiences. Move beyond your content delivery network to their powerful edge cloud platform. Learn more at fastly.com
- Fly.io – The home of Changelog.com — Deploy your apps and databases close to your users. In minutes you can run your Ruby, Go, Node, Deno, Python, or Elixir app (and databases!) all over the world. No ops required. Learn more at fly.io/changelog and check out the speedrun in their docs.
Featuring:
- Jerod Santo – GitHub, LinkedIn, Mastodon, X
- Nick Nisi – Website, GitHub, Mastodon, X
- Kevin Ball – Website, GitHub, LinkedIn, X
- Christopher Hiller – Website, GitHub, Mastodon, X
Show Notes:
- The 2022 State of JS survey
- Amazon is now accepting your applications for its home surveillance drone
- ProseLint
- mason.nvim
- Store app state in the url
- Graphite
- Graphite on The Changelog
Something missing or broken? PRs welcome!
Transcript
From the publisherThis transcript comes from the podcast’s own feed, as the publisher wrote it. It has no timestamps.
How do you define joy?
It's going good. How's it going with you? I'm very excited to be here, and to get to our topics, like what's a testing framework and what's not. I'm so excited for that. Yeah, so we will have the epic debate... Chris does have opinions on what is and what is not a testing framework. What is Selenium and why is it a testing framework?
Survey results, 2022, State of JS. It's out, it's done, it's in the bag... Congrats to Sasha and the whole team. This is an epic effort each year; lots of adjustments, they've built out a lot of software to run this thing... I thought it was pretty cool - they say in the opener that this year they received almost 40,000 responses, which is about double of last year's amount. So we're starting to hit, I hope, at a certain point, critical mass. They've been working on getting more people from more places, and more areas, and more identities and stuff into this mix... We can talk about that as well.
Okay. You might just be depressed here for a few years as we continue to work on it. The question is, was it better than last year? And the answer to that is I don't know, because I didn't look at last year's. Maybe you can dig that up and we can get some results there... But let's dig into it anyways, and start with the most important category, which is favorite JavaScript podcasts... Which is the one that everybody skips to immediately, and answers, I think... Or is it just me...? And unfortunately, those blasted Syntax guys got us again. What's up with that, Nick? What can we do? How can we fix this bug?
On an infinite timeline, we are going to be the number one podcast on this survey, darn it... And then we can all die happy and old. Alright, we kid a little bit... It's definitely not the most important part. It's just the most important for us as we navel gaze. Let's get into some of the actually interesting bits. Nick, what did you find interesting out of the survey results?
Well, if you go to the frameworks one - I immediately kind of jump to the frameworks, and I like seeing that graph of like where things are landing, and I kind of thought that it was interesting... If you look at the frontend frameworks ratios over time, React was not number one last year; it actually was overtaken by Svelte. This year, it's been overtaken by Qwick, Svelte, and Solid, which are all ahead of React in retention, and interest, too. But if you actually look at usage, React is wildly popular, in terms of people are still using it and haven't quite switched over to these other frameworks. So I think it's important to take where things are headed, and where things are actually headed, and kind of compare them... But it's very interesting.
It does seem like there's a heating up of the framework wars again, where it was like React kind of sucked all the air out of the room for maybe a few years there, and now there's interesting things abounding. Kball, I know you're interested in Qwik; we had Miško Hevery on the show last year, and he's coming up again; you're gonna go deeper, a deeper dive into Qwik, I think next week, or the following... So that'll be exciting.
Yeah, I think that's great. This kind of healthy competitiveness between the frameworks... Like, they're all pushing each other forward, which is exactly what you want. You don't want things to stagnate. And there's a lot of good ideas across all of these frameworks, and they do things a little bit differently, and there's a flavor that suits you probably; if not, there will be next year when you write it. But there's a lot of cool ideas, and nobody is sitting still, which is great.
Well, and one of the things I talked with Chris Ferdinandi about last week, I think, and that is showing up a little bit in this, but it'll be interesting to see how it plays out over the next couple of years, is more and more adopting of these frameworks that try to pre-compile away a large amount, and sort of ship a minimal runtime, ship smaller amounts of JavaScript. There's more sensitivity about how much JS is going over the wire.
I was looking at this, the Percentages tab, and then I clicked the Rankings tab, and that's easier for me to read... But if I look at usage, you have to remember that it's not like -- maybe you're in a job where you're using two, maybe even three, but the numbers don't add up to 100. So the usage is "Okay, like 82% of developers use React", or is it "They've used React before"?
...and right now they're using something else? And so, you can say, "Yes, I've used multiple of these frameworks." So it's kind of hard to get a good picture from this, I think, like "What do people use today at their job?" So I think that's -- I wish there was a good way to kind of surface that, but...
Another interesting tidbit with surveys in general is like survey fatigue... So one thing that was interesting to see - they have actually completion percentages. As a completionist, I respect that 90% of people got to the end, or... What was the number? No, that's not right. It was like 73% of people made it 90% of the way through, which is less impressive, but I think more accurate than what I said the first time... But pretty good. But what I notice with myself with surveys -it's like, I start off all gung-ho and like "I'm gonna answer all these", and then eventually, I either stop taking it, or the little demon inside me comes out and I'm like "I'm going to start just hitting C for everything." You know, like we used to do in school back in the day. And there's a lot of people out there that just want to see the world burn... And I think at 40,000, you're pretty safe that like those people are fringed out and don't really matter, but I know as a person who goes through all of our Frontend Feud surveys, there's always a few that answer every question incorrectly on purpose. \[10:14\] So there's so many little things around the edges of surveys, such as that distinction you pointed out, Chris, which is a really big one when you think about... It like "How do I interpret this question and answer it?" On top of that, the people who are just trolling and lying; on top of that, the demographic problems. Like, it's fun and interesting, but there's so many problems with them that what can we really -- like, Kball, when you look at these... I know you enjoy the analysis and the dissecting, but do they affect your life? Do they help you make decisions? Do they help you - what?
Good question. I use something like this often as just a hint at "Are there new things I should be checking out?" Like, looking at this, for example, Frontend Frameworks, I notice a new addition, Stencil. I've never heard of Stencil. I'm going to go look that up. I don't know what it is, or what it's doing, but maybe we should dig into it, maybe we should have a show about it. Also look at this sometimes as a way to check my expectations a little bit, or give myself a little bit of feedback... If you go to Other Tools, and you look at libraries, the third most regularly used library by respondents to this survey is still jQuery...
And we tend to get kind of in this world of "Okay, everybody's React, and everybody's doing this", and all of this, and very like front-focused... And React is old news at this point, right? Well, you know what's older news? jQuery is older news, and it's the third most popular library listed here. So it's easy to be looking too far in the future, to be constantly thinking about "What's changing? What's new, what's new?" and sometimes I use this to sort of check my reality and say, "You know what - you can still build a lot of stuff, and a lot of people are building a lot of stuff with old, boring tools, and that's fine."
What would be really cool is we just sort by revenue. I know this is impossible, but like global revenue, or like GDP for a JavaScript library or framework. That would be so cool. I think we'd see different results -- I think React will probably at this point still be where it is, but I think we'd see different flips in different places, because a lot of them... Like, Angular tends to be used more in enterprises, less as hobby horses, and so probably driving more revenue, but less interest, less joy. That'd be cool - global joy produced, right?
Right, that's the problem, is you have to actually specify... You'd need breakdowns inside of each corporation, like which products are driving revenue. I mean, like I said, it's a pipe dream; you couldn't get it. But it'd be really cool. And actually, now that I said, I'm way more interested in global joy produced out of a library or framework; like, how cool would that be? Especially for the creators.
\[14:08\] It's a browser automation framework. That's all it does. If you're "using Selenium", you're using some other client code, whether that's written in Python or Java... You're using -- God help you if you're trying to use it directly, but you're using some other framework. Maybe that's like WebDriver IO, maybe that's water in Ruby, or something like that... But Selenium is just a server. It just sits there. It provides a way for you to automate a browser. There's nothing about testing in Selenium. There's no test organization, there's no reporting, there's no assertions... It's just a browser automation framework. And that's the thing that I think, obviously, people still don't really understand. On one hand, it seems a bit unfair to lump Selenium in with all these other ones, because it doesn't do that. It's not Cypress; it doesn't have assertions, or whatever. It doesn't work out of the box like that, and give you everything you need. So anyway, that's my Selenium rant, but... I don't think it belongs in this survey.
It's the same story as in Selenium. Appium is not a testing framework. It's a device automation framework. And so if you want to use Appium to test your device, your mobile browser, or your Smart TV or whatever, you're probably going to pick up the one -- when we want to self-test stuff, we just use Mocha with WebDriver IO, and that seems to work fine. But Appium just sits there. It's an express server, and it talks to devices. But nobody else is going to look at an Express server and say, "Oh, that's a testing framework."
In fact, it says 25% of people are still using Gulp. It has dropped off to the bottom, but that's still it. But second, Gulp is not a build tool. Gulp is a task runner. People use it for builds, but there's a fundamental category error going on here, and I think it comes to that - what are most people encountering this, in what context, and how are they using it? Most people encounter Selenium when they're writing tests. Most people encounter Gulp when they're dealing with building a frontend project of some sort... So they include it in that category, even if that's not really what it is.
I actually -- I spent quite a while pulling Gulp out of Appium. It was using Go, but no. It's just odd to me that like if you go and you look at the most dependent-upon dev dependencies, number one, I think, is ESLint, but number two is TypeScript now. So then why is Gulp higher than TypeScript? I don't know...
Or they don't think about it. I mean, if they were using it directly, they would. But when you think about TypeScript as a build tool - we know what it does, but... I mean, again, category errors; I don't think it's necessarily out of the -- it should be there, but it's not like what comes to mind. And maybe a lot of what people answer is what comes to mind. I don't know.
We can get really deep into semantics with that too, because Vite and other ones - they don't do anything with TypeScript, except ignore it. Whereas TSC is actually compiling it, and will give you errors, and things like that. But then you also have the language server part of it, that is actually probably -- like, it's probably higher than everyone, because if you're using VS Code, or have your Neovim set up, like, you're using that LSP.
"That doesn't answer the question..." It does tell us that we should know what it is... Yes, I remember, because we gave him a bunch of different acronyms that they could use, because it didn't have one, or something; like, their acronym was bad... I can't remember what it is. It's coming out of the Preact team, right?
Alright, we are back for the award-winning podcast to play its potentially award-winning game, Headlines. This is a game in which I have scoured the interwebs and I have found headlines. I have also fabricated some headlies. It is your guys' job to figure out which is which. So here's how the game works. I will read a headline, at which point each person has the opportunity to stake a claim - is that true or false? Is it a real headline, or is it a false headline? If you guessed right away, you can potentially win two points. Or you can wait for more information. I also have the first paragraph from the news stories that I will read. You can hear the first paragraph, which will give you much more information, and you can then decide whether it's true or false, at which point you score one point if you're correct, and zero if you're incorrect. For longtime listeners who are wondering why I'm not punitive anymore, and subtracting points if you get it wrong - because my math skills are terrible, and I got confused last time, and it was rather embarrassing. So we're gonna go simple, positive scores. We're going to keep it positive today, and we are going to see who's the best at detecting BS.
\[25:55\] You guys all win on that one. A dance troupe flashmobbed a funeral with a performance of Queens, "Another One Bites the Dust" at the request of a woman who wanted her send-off to be memorable, but not sad. So that actually happened. Congratulations. Everybody has two points. I'm gonna keep a running tally this time, so that I do not do what I did last time. Alright, headline number two: "Roomba testers feel misled after intimate images ended up on Facebook." I'll read it one more time, "Roomba testers feel misled after intimate images ended up on Facebook." Kball, we go to you first...
So we will not all win this round... Somebody will lose, and the loser of this round is Kball. That actually happened. An MIT Technology Review investigation recently revealed how images of a minor and a tester on the toilet ended up on social media. I Robot said it had consent to collect this kind of data from inside homes, but participants say otherwise.
After two rounds, Nick and Chris are tied in first place with four points. Kball trailing with two points. We now turn to round three. The headline is "Microsoft combat goggles score as Congress says yes to buying more." I'll read it one more time... "Microsoft combat goggles score as Congress says yes to buying more." Chris, you're up first. You can call true or false, or you can wait for the paragraph.
\[29:46\] So we have three falses, but Chris waited for the paragraph. Is that correct? And the winner of this round is \[Win, win, win, win. We all win.\] You all win. Kball was correct. He was also incorrect. It was Microsoft. The difference is that I flipped the bit... Microsoft actually did not get approved. The combat goggles falter as Congress says no to buying more this year. So Congress actually did not approve this contract.
So Nick gets two points, and Kball gets two points, and Chris gets one. So after three rounds, we have Nick in the lead with six, Chris in second with five, and Kball in third with four. It's a tight race. We now move to round four. There's five rounds, by the way, so this is the fourth of five. "Adobe closed out 2022 and celebrated 40 years with an employee-only Katy Perry concert." Are we back around to Kball going first? Or who's going first this time?
So on the one hand, we have generally a bad tech environment. People are cutting back, there's the zeitgeist of cutting back. This sounds like not generally what's going on. On the other hand, Adobe just splurged shiitake tons of money for Figma, and so it is clearly doing okay, at least along some dimensions for cash. I'm still gonna go false. I think the environment is too stingy across the board, and contagion is a thing... Also, Katy Perry? Really?
Okay, so we have two falses registered, and we also have Nick waiting to hear this paragraph. "Despite economic headwinds, Adobe went big on its 2022 holiday party. The event attendees shot hoops in an arcade, received spray-on temporary tattoos, and grabbed drinks and food from a variety of vendors. The stage then transformed into a mushroom-filled Fantasyland and out walked the night's surprise headliner, Katy Perry." \[laughter\]
It was a 90-minute concert with Katy Perry on a mushroom-filled Fantasyland, and there's pictures and videos on the internet if you want to go look for them. Okay, so in round four nobody scores; you were all wrong, so the scores remain the same. Nick in first with six, then Chris with five, Kball with four... That brings us to our final round. Kball, you run out of time to pull out a victory. Our fifth headline and final is "Boston Dynamics in talks with OpenAI to bring GPT-powered tech to their humanoid robots."
False. The blurb is "Atlas, the world's most advanced humanoid robot, may soon gain more human-like communication abilities. Their potential partnership with OpenAI would be a major step forward in the field of robotics, as it could open up new possibilities for robots in industries such as healthcare, hospitality and retail." That paragraph was 100% written by me when I made up this story, because it is not true. It is false.
I do. Maybe I have two, I don't know. My main one that I put down was - there's probably an LSP for it, or there's probably a language server for it. Over the two weeks that I had off over the holidays, I completely rewrote 1,100 lines of my dotfiles, and kind of redid everything that I'm doing... And as part of that, I switched from like the LSP installer plugin over to one called Mason, and it gives you a list of like all of the LSPs that it knows about, and linters, and formatters, and all of that. But it's just like a plugin that maintains all of those for you. And these LSPs are theoretically editor-agnostic, so they should work in other editors that support language servers, which is like VS Code, and other ones, if there are other ones. And just going through the list, there are some amazing plugins for the LSP, for like different languages, and for different everything. So like one in particular that I was having fun with was installing one for Markdown, and -- installing two for Markdown, specifically. One's called Vale, and the other one is called Proselint. And they just yell at you in LSP form for writing terribly... \[laughs\] Which is exactly what they're doing.
Okay. LSP - Language Server Protocol. It's what like TypeScript uses to tell you, "You're trying to use that as a number, but you actually passed a string", things like that. And the LSP form can vary based on your editor and how you're using it, but for myself in Neovim, it puts virtual text to the right of the line, that tells me exactly like "You're doing this wrong", or "That's a number. That's undefined, and you didn't check for that to be undefined." So that's what I mean by LSP form, I suppose. And so this is like going through -- and I just opened up like one of my very few blog posts from my website in it, and it's just kind of funny, the tips that it gives me about my horrible writing. It tells me a lot that -- for one of them specifically, I'm talking about a video that I did at a meetup called OMG, or Omaha Maker Group... But it tells me that "OMG is chat speak. Write it out." So that's like one tip that it gives me. Another one is it tells me that I'm using over 30 PPM. I don't actually know yet what PPM means, but I'm using -- it basically boils down to "I'm using too many..." It says "More than 30 ppm of exclamations. Keep them under control." So I'm being too excited in my writing, so I should use less exclamation points. I just think it's funny that these tools exist...
It is. And so yeah, it's a linter/LSP. I mean, it's not an LSP. It's a linter in that case. But I'm thinking more in terms of these plugins that theoretically are editor-agnostic at least... And so it's just really cool being able to play with them and see what they give you. So my pro tip is go explore what LSPs you can install to yell at you more, because you're not being yelled at enough by your tools.
Yeah, mine is, as is my want, a human thing, not a technical thing... But since we're in January, everybody's focusing on New Year's resolutions, and goals for the year, and things like that... And I want to share the pro tip that at least for me, it works a lot better to focus on habits rather than goals. So instead of saying "I want to write 12 blog posts this year", I'm going to develop the habit of "I'm gonna write every day." I'm going to focus on 500 words every day, or something like that... But the goal is the habit of what I'm doing there. Or similarly for fitness. I think we've talked about this before, but it's not like "I'm gonna deadlift 300 pounds." It's "I'm gonna work out three or four times a week", and build a habit there. So that is my pro tip. And there's some thinking behind this, right? So the thing with a goal, especially if you do -- like, the sexy thing is, "Oh, we're gonna make a SMART goal, and we're gonna have it be specific, and measurable", and all these different things, and time-bound. But the problem is, if you do that, what happens if you don't hit your goal? So like "Oh, I was very specific. I'm going to do this. I can measure it, I know how I'm measuring it, and I'm going to do it by this time. And that time has passed, and my specific measurement has not happened. What is my incentive to keep going and start again?" But in the real world, it's going to be a lot better if you keep going, and you accomplish that a week or two later. And if you focused, instead of "What am I specifically doing?" or whatever, you're saying, "I'm gonna build a habit of working towards this direction." You're gonna get there, and that's what's gonna keep you going and moving in the right direction, far more than your SMART goal.
Very cool. I have a pro tip... This is not out of my head. This comes from the brain of Scott Antipa, who's a programmer in San Francisco. He says, "You can store your app's entire state in the URL." He's certainly not the only one who's done this, but he lays it out very nicely... And I will just read what he had to say about that. He says that he's building this flowchart editor that runs in the browser, and he wanted a way for people to use it without having to sign in, or store any data on his servers. And he wanted to give them control over their data, and to be able to store it locally to open and edit later, and also make it easy to share with other people just by copying the URL and sharing it as a link. So he decided to encode the entire application's state as Base64, and then put it in the hash mark of the URL. I think it's called the fragment identifier... And so he has a little -- it's super-easy to do; he has laid out how you do this. You basically just take the JSON -- if you have all your app's state in JSON, you just stringify that, then you run some sort of compression on it, so you can fit more data into the URL... Of course, URLs do have a max length, and I'm not sure how much data you can fit in before you hit that... But there's some compression you can run on, and then you Base64-encode it, and then you just push that onto the URL... And then later on, when you need it, you decode it, you uncompress it, you parse it back into JSON, and you apply it into your application's state. So that's a cool way of having persistent storage that's persisted not in a cookie, on a server-side database, and not in local storage, where it's stuck in that browser session. It's stored in the URL. Which is, I think, kind of cool. There's other people that do this. He mentions Mermaid JS. I'm not sure if you've seen mermaid.live; it's a very cool diagramming tool inside of Markdown, that GitHub supports now. They do it. So people do this, and it seems like it works... And so that's something that you can do. \[46:01\] I really liked the side effect of having no sign in, no local storage. Copy and paste the URL, and you can just like refresh and rehydrate application state just using that. So check it out. I'll link to that in the show notes, his blog post, "How to store your app's entire state in the URL." So that's my pro tip. Chris, did you think of one?
Yeah. So I don't think I've mentioned this, but I may have mentioned it before... It's a thing called Graphite. It's like an app -- it's like an SaaS and a CLI, and it integrates with GitHub. Graph.dev is the site. Anyway, so what this thing does is - it like builds this metadata on top of Git, and it helps you do stack pull requests. And I've been using the heck out of it. So I don't know what it is about the way I work; maybe I'm just doing something that I shouldn't be doing... But I will make a pull request, and then I'll be like "Okay, I need to work on this other thing now", and I need the stuff that was from my pull request. And so I can either add all my new junk to that original pull request, or I can make a new one, targeting the first pull request. And so that's what this thing helps you do - it creates a stack of pull requests. So part of the dashboard thing is - because if one of these pull requests in the stack gets merged, what it'll do is it'll automatically re-stack everything, and change the targets, and rebase the merged PR onto the one that it was targeting. And so it does all this stuff automatically, and then in their dashboard they have a tool to help you review this code, because it's not so easy to do in the GitHub UI... Because if you add any sort of commit to the PR - well, there it is, and it's all mixed in to the list of files in your PR in GitHub. But what their review interface does is it splits it up by stack, and so it knows which PR, what code came from. And a reviewer can easily only review the stuff that was in one particular PR, even if it's been merged back into the original one. So this is probably really difficult to explain, and I hope they do okay, because they're just like a startup making this thing... Because again, it's like -- it's pretty technical, and it's really hard to explain... But it's really cool to use, and I would suggest check it out if you've ever been in a situation where you're like "Oh, I have this work that's in progress, but then I have this other tangential thing that I need to get done based on that work." And of course, if you use GitHub, too. But it's been really helpful; it does all this automatic rebasing, and pulling changes down, and re-stacking everything automatically, and so there's not a whole lot of -- you don't have to think too hard about managing the stack of pull requests and branches. It's cool. Graphite.dev.
Very cool. Thanks for your pro tips. So in review, there's an LSP for that, focus on habits, store stuff in the URL, and check out graphite.dev. Alright, that is our show for today. Nick, Kball, Chris - thanks so much for partying with me today. It was lots of fun. Always a good day when Kball loses at headlies, so we're happy over here... Just kidding, Kball. I love you. And that's it. That's JS Party. I'm Jerod -- um, final words? I'll give you guys a final word. What have you got?
