chantastic.fm

68: Lara Schenck on CSS Algorithms and Turd-Driven Development

Episode 68 · October 17, 2019 · 00:57:40

Hosted by chantastic · With Lara Schenck

Sponsored by Linode and G2i

Download MP3 · Jump to transcript

Today we sit with Lara Schenck to discuss CSS Algorithms and my favorite term of the year: Turd Driven Development.

She's brilliant, obviously.
And It's a real treat to chat with someone who shares my affinity for CSS and a stoic acceptance of how crappy our codebases are.

But she offers hope, to teams that prioritize the work of design engineering.

Do not miss her talk CSS Algorithms.
It's — hands down — my favorite talk of 2019.

Featuring

Links

Sponsors

Linode

Instantly deploy and manage an SSD server in the Linode Cloud, with your choice of Linux distro, resources and location. linode.com/react

G2i

G2i is a hiring platform for remote developers devoted exclusively to React and React Native. We vet, you get hired. g2i.co

Transcript

[00:00:00] Michael Chan: This is React Podcast. I'm Chantastic. Today we sit with Lara Schenck to discuss CSS algorithms and my favorite term of the year, Turd-Driven Development. She's brilliant, obviously, and it's a real treat to chat with someone who shares my affinity for CSS and a stoic acceptance of how crappy our codebases are. But she offers hope to teams that prioritize the work of design engineering. Don't miss her talk, CSS Algorithms. I'll link it. It's hands down my favorite talk of 2019. Before we start, let me tell you about the folks helping us put on this show today, Linode and G2i. Deploy a server to the Linode Cloud in minutes. Offering cloud computing plans for every workload, from simple web hosting to CPU-intensive needs like video encoding and machine learning, Linode offers a balance of power and price for every customer. When you're in the business of delivering content to users, you know how important it is to have that content on a server as close to your user as possible. And Linode helps you do that. They just added 2 new data centers in Toronto and Mumbai. Combine that with native SSD storage, a 40 gigabit network, and the industry's fastest processors, they can help you serve your customers as fast as possible. Visit linode.com/react and get a $20 credit. Uh, visiting that URL will automatically apply the promo code REACT2019. Oh, that's awesome. For me, the worst part of contracting by far was shoring up and maintaining business. I just wanted to write code and push to production. G2i makes that possible. They market you and your skills directly to companies. They manage all logistics, contracts, invoicing, and payments. You get personal support from their incredible team, so no previous contracting experience is required. And best of all, you join a unique collective of incredible React and React Native developers to help you through those really tricky moments. So growing your skills is integrated into a day's work. If you're a contractor, don't go it alone. Partner with the amazing people at G2i. Visit g2i.co today, apply, and find opportunities you'll love. We vet, you get hired, it's that simple. Now, let's talk about CSS. Laura Not Laura, welcome to React Podcast.

[00:03:08] Lara Schenck: You already messed up.

[00:03:09] Michael Chan: What? I messed up?

[00:03:11] Lara Schenck: Well, I'm not I'm not that- I only correct people one time and then I'm like, it's okay.

[00:03:16] Michael Chan: Okay, how did I how did I mess it up? Tell me.

[00:03:18] Lara Schenck: Lara.

[00:03:19] Michael Chan: Lara. So I did so I did I tried, but maybe-

[00:03:22] Lara Schenck: Lara, like Lara.

[00:03:24] Michael Chan: Like law?

[00:03:24] Lara Schenck: Car or larva, but without the V.

[00:03:31] Michael Chan: All right, Lara, is that better?

[00:03:34] Lara Schenck: Lara, not Laura.

[00:03:36] Michael Chan: Lara. Yeah. Lara, okay.

[00:03:37] Lara Schenck: Perfect.

[00:03:38] Michael Chan: I have to say, I love your domain. I thought that that was such a clever— uh your domain is uh notlaura.com?

[00:03:45] Lara Schenck: Correct.

[00:03:46] Michael Chan: So I imagine this is uh this has come up quite a bit in in in your life. Uh do you often have to uh correct people?

[00:03:55] Lara Schenck: Yeah, well, the main thing is the spelling, because it's L-A-R-A. So the domain name is notlaura, which means my email address is lara@notlaura.com. So a stroke of brilliance during my college years. I don't think— that'll be a tough type of domain to get right now. Well, it'd have to be like notlaura.club or something.

[00:04:19] Michael Chan: .company.

[00:04:20] Lara Schenck: .company, yeah.

[00:04:22] Michael Chan: .biz. Um, yeah, I love it. It has this very uh sorry-not-sorry kind of symmetry to it that's that's totally like on point right now. So, um, we met very briefly at JSConf. And uh you you had this talk with the most provocative title that I think I've ever heard, uh CSS Algorithms. And uh usually when I go to JSConf— was this your first JSConf or have you been in the past?

[00:04:47] Lara Schenck: Um, I went to JSConf EU the year before. I didn't I spoke at CSSConf EU the year before. But had attended JSConf.

[00:04:54] Michael Chan: Yeah. Well, it's- the the US one is like, I I kind of think of it as like just like a poolside party with like a couple of talks. And uh I have to say, yours was the best talk of the the the the the whole conference that I saw. Um but also, like, I think one of my favorite talks ever. I I thought it was just like, I thought it was brilliant. You just really nailed it. I thought all of the points just led into each other. Uh great. So, I wanted to have you on the show, talk about CSS, algorithms, all that kind of stuff. But before we dive into that, I just want to get a sense of of you, what you love, kind of what brought you to programming, and uh kind of why you're doing what you're doing right now.

[00:05:35] Lara Schenck: Yeah. So, let's see. Where do I start? Um, I grew up on a farm outside outside Pittsburgh and wanted to like get the hell out of there. And so, I went to school. For art in uh Boulder, Colorado. Started there and then transferred to a school in um Boston that was like this very open-ended art school because I wanted to make a video game. I was working on this like pretty weird project that I was very obsessed with and I was like, "This must be a video game!" Even though I had been doing like printmaking before.

[00:06:10] Michael Chan: What was the game?

[00:06:11] Lara Schenck: Um, well, it sounds like- a spiritual satire about these like little uh like androgynous creatures running around like eating poop, where poop is like a metaphor for knowledge. Um and I'm not gonna get into it any more than that.

[00:06:29] Michael Chan: Amazing. Well, that'll tie into some of the talk topics.

[00:06:32] Lara Schenck: Yes, yes, that's true.

[00:06:34] Michael Chan: So, where did you go after uh your your video game?

[00:06:36] Lara Schenck: Um so, I did— I I guess I technically like first learned a little bit of programming in Python, because I took a um like game development elective class, and made a version of the game, which may or may not run on anything anymore. Um, and then after that, one of my teachers— that I I after that, I wanted to make a website for the game. So, started learning some web languages, and uh one of my teachers at school had encouraged me to learn to build WordPress sites as a means of freelancing. 'Cause like artists, that's kind of hard to make money. So I, yeah, kind of ran with it and got way more into development than um art. Even though I'm starting to like revisit the art stuff now that I have like a job and I'm not living freelance life anymore. But um, yeah, and I think uh kind of a critical thing to mention and like very relevant to my talk and also kind of part of the the little like storyline At the end, um, I have this like art background and was kind of immediately lumped into- I mean, well, I don't want to say lumped into, but gravitated towards like UI development and also like doing some design work. So like HTML, CSS, a lot of jQuery, um, and doing these WordPress sites, but also like doing some branding work and whatnot. And kind of throughout that time, like really did not think of myself as a programmer. Or um or even like a developer, which is uh sort of like what my talk is about now is like, yes, you are a programmer.

[00:08:15] Michael Chan: Did you find the the the the tracks kind of set up at the at the time where you were uh studying art, uh did they feel kind of like fairly segmented in terms of like, you know, these types of people do programming, these types of people do art, um and you know, if you are in arts, like maybe the the most programming that you could do is like front-end design-y type of stuff.

[00:08:40] Lara Schenck: Uh yeah, absolutely. I think at— um so like the school I went to was uh had no really formal coding classes other than like a couple of electives that were through a different school. Um and so I think that my perception of those tracks was like based on kind of community and like the resources that were out there. Um, I don't know, I mean, yeah, I think there's definitely a track. Or, and actually, maybe it's even just rooted in the perceptions around like math and science, um, as like a specific type of person does that and a specific type of person does art, which is like the right and left side of the brain is like a false dichotomy anyways. Yeah. But that's like how society sees it a lot. So I was like, as a staunch math hater in high school and like in college too, I was like, oh, programming's math, like I don't do that. No, these other like other languages are what I do. Um, so yeah.

[00:09:37] Michael Chan: Yeah, in in retrospect, how do you feel about that advice that your teacher gave you to kind of study uh study WordPress as a means to uh freelancing and kind of bringing in money while also pursuing art?

[00:09:50] Lara Schenck: Um, it was excellent advice. So, like, basically responsible for like the trajectory of my entire life since then.

[00:09:59] Michael Chan: What does that trajectory look like?

[00:10:01] Lara Schenck: Well, I freelanced for- so after school I freelanced for like 6 years, 6 or 7 years doing like small business WordPress sites and also contracting with startups doing like UI development and some design work. And then I wanted to- oh, well, I guess I can talk about FizzBuzz now.

[00:10:23] Michael Chan: Yeah, do it. Everyone's favorite little programming problem.

[00:10:27] Lara Schenck: Yeah, so the little uh kind of Algorithms 101 question. So I had this kind of educate- this self-taught education, like very much learning programming on an as-needed basis, as I think a lot of us did, like as you're kind of coming through the the stages. And I had been freelancing, I was living in New York at the time and I wanted to- I was feeling like I wanted to get a job and like work on a team. Because that's something I- a lot of the projects I did either independently or like with one other person. Um, and so I went on this- I did this job interview that sounded great. I had like a referral to it. I was really excited about it. That was for a job titled- UX engineer/interaction designer.

[00:11:13] Michael Chan: Okay.

[00:11:14] Lara Schenck: I believe. And in the um job description, sounded great, sounded great. Like they listed a couple of kind of MVR JavaScript framework type things which I had done tutorials with. So I was like, okay, I can like figure this out when I need to. And uh in the interview, they had asked me FizzBuzz, and I had like never heard of algorithms questions. Because this was like the first time I had interviewed- maybe not my first job interview, but the first time I had encountered that in a job interview. And I hadn't studied computer science from like programming books and things like that. And so I was like, I was like, why would you do this?

[00:11:53] Michael Chan: That seems cruel for that role.

[00:11:57] Lara Schenck: Uh, yeah, yeah. And so, I mean, it's, it's not how I interpreted the role from the The description. And so I wrote this article for CSS-Tricks about it that was like, um, "Tales of a Non-unicorn: A Story About the Trouble with Job Titles and Descriptions." That was like, "Oh, this is weird. What happened?" And then that ended up- that got reposted on Reddit under a different title, like under on the r/programming. Um, they changed the title to like, "Designer Applies for JS Job, Fails FizzBuzz." and write a 5-page rant about it. So that was kind of my encounter with like gross internet people.

[00:12:37] Michael Chan: So that was your first uh introduction to uh the the subculture of web development and-

[00:12:43] Lara Schenck: Yeah. And also my first my first real encounter with like computer science and and like traditional algorithms and things like that. And so after that I was like, like no thank you. Like no, I do not want to be a programmer. Like this. It's horrible and mean and like why are you spending time doing these ridiculous problems instead of building things? Which I didn't really understand the like intent, the I didn't understand the power in like a um base computer science knowledge and I didn't understand like how much that impacts the like code that we write as web developers, which I do now. But at the time kind of developed this like, um which I and I've seen this kind of on Twitter and whatnot, but this like oppositional identity where I was like, I am not a programmer, I do what I do is something. Different, um, because, because I was like kind of pushed away from that community and like criticized for not having that knowledge. It wasn't like, oh, you did, you failed FizzBuzz? Like, me too at one point. Like, hey, that's funny, let's talk about it.

[00:13:44] Michael Chan: Well, yeah, and also the, the complete lack of, or the separation from the context too, because, you know, you're talking about this, uh, this role which is not an inherently programming role, right? I can't remember the title right now, but it's, you know, UI Interaction designer or interaction developer?

[00:14:02] Lara Schenck: Yeah, designer is in the title.

[00:14:04] Michael Chan: Yeah.

[00:14:04] Lara Schenck: So it's like this hybrid.

[00:14:05] Michael Chan: Yeah. And and and then to be able like to separate that and then just say like, oh, you know, every kind of goes that that conversation that's around all the time of like everyone should learn to program, like regardless of, you know, what your role in the stack is. Um, so where did that where did that put you? Like kind of you you have that experience. Did that kind of drive you more into wanting to uh to to kind of dignify the the tools that you had as a uh as a designer? Or uh did that kind of like push you away like, I I'm I'm done with this?

[00:14:38] Lara Schenck: So, for 2 years, I would think about pushed me away. And it's kind of like, I guess an advocate for- and I'm like still for sure like would advocate for this sort of role, but the designer developer role where like You're building prototypes, not necessarily writing, um, like maybe some production-level code, but you don't need to like be writing build tools, things like that. And but very very much like, I don't need to know computer science. Like those fundamental- like I and I really had this strong opinion where I was like, those fundamentals like do not have to do with what I do day to day. So like why would I spend time learning that? That's I'm using these tools. We Google everything, like you don't need to know this stuff. Um, and then I got an interview, um, for a developer relations role at a big tech company and, um, was like really, really excited about that. And it sounded like such a dream job. And, uh, so I was like, okay. And there was gonna be an algorithm, it was gonna be like a whiteboarding interview.

[00:15:44] Michael Chan: Yeah.

[00:15:44] Lara Schenck: So I was like, oh. Okay, I guess I have to learn this now. So I was like, okay, swallow my pride. And like, I was fortunate to be at like a lull in my freelance work. I mean, a lull is not necessarily a good thing, but I did have time to like really buckle down and spend some like long days learning about linked lists and hash tables and like all of these like data structures and algorithms and like the kind of core concepts that I had never really thought I needed or thought would be useful to me. I wrote a series of blog posts that are on my website called Computer Science Bootcamp, which I've made a little curriculum for myself from like the things you should know before you read this book table in Cracking the Coding Interview. So-

[00:16:31] Michael Chan: How did you find that experience uh kind of coming from design? Did things uh have natural analogs to you? Like was it easy to understand or did it all feel like super foreign not coming from a Computer science background?

[00:16:45] Lara Schenck: So, I think the language is foreign. The concept, I was like, oh, I know what this is. Because so, because um, I feel like there's a way in computer science books and like education, there's specific language you use to talk about certain programming concepts. And I'm I'm still learning this. I will be forever, everybody is.

[00:17:09] Michael Chan: Sure, yeah.

[00:17:11] Lara Schenck: But a lot of that I just, I didn't know, I didn't have the vocabulary to talk about like what I was, the code I was writing. So like coercion, for example, like implicit coercion.

[00:17:20] Michael Chan: Yeah.

[00:17:21] Lara Schenck: Things like that, which that's a little more common like in JavaScript, but like, I don't know if anything's gonna come to mind right now as an example. But kind of those concepts, I was like, oh, I've written code that uses this concept before, I understand what this does. I just never knew it was like a thing. Thing.

[00:17:37] Michael Chan: Yeah.

[00:17:37] Lara Schenck: And never knew it had like a word. So, uh, it was kind of a process of like gathering that vocabulary. And and things like learning like, oh, this is the different- like, this is what I I I actually understand what a hex code is now.

[00:17:51] Michael Chan: Yeah.

[00:17:52] Lara Schenck: And you learned about like different concepts that then you kind of spot all over the place in web development. HTML and CSS like absolutely included. So.

[00:18:01] Michael Chan: So as you're as you're going through this, as you're writing uh these this like CS bootcamp um thing on your blog, are those the things that you're trying to tackle, like kind of mapping those concepts to like things that you already know, or like kind of defining some of that language that was maybe like a knowledge gap at the time?

[00:18:17] Lara Schenck: Yeah, yeah, that was kind of the goal of- and, and it's like, um, probably for everyone, but like for myself, it's really, uh, I feel like I don't officially know something unless I write about it or teach it. So yeah, I was like, I'm gonna write blog posts about this and make myself kind of summarize it and can be useful for other people too.

[00:18:35] Michael Chan: Yeah. Have you have you had people kind of go through some of that and and learn through that as well?

[00:18:40] Lara Schenck: Yeah. Yeah. I mean, if anything, it's like a good compilation of links to other resources. So uh Base CS by Vaidehi Joshi is like a really, really wonderful resource. Um lots of blog posts and she has a podcast as well.

[00:18:55] Michael Chan: Yeah. We actually uh we're gonna get her on the show uh in in a few weeks. Oh, cool. Really excited about it. Yeah, she's amazing. Yeah, that's awesome. So, this kind of like culminated in, uh, in you kind of getting a, like maybe like a bee in your bonnet about like CSS as a programming language. Yes. And uh how these things are not as far apart as culturally we maybe make them out to be. So, uh, tell me about, uh, about that. How did that start developing in you at this point in your career?

[00:19:30] Lara Schenck: Yeah, so this was, um, so I failed the interview, did not get the job.

[00:19:35] Michael Chan: Okay.

[00:19:36] Lara Schenck: It's fine. Um, I don't know if I- I think I got like one of the- in the actual interview, I think I successfully did like maybe one of the questions. So, okay, learning all these basics, I still- I someday I'd like to revisit this and do all the like the LeetCode inter- like questions, right? Be like, okay, now I can really do algorithms, but I have a job, so I have to work. Which is good. Yeah, anyways. Um, the uh, so after that, I kind of um, I really enjoyed learning the computer science stuff. Like I thought it was really fun and I was like, this works with my brain. Like why did I think I was like fundamentally not able to do this or something? And um, and then I would note, and then I was also kind of learning a lot about how browsers worked and understanding trees, I was like, oh my god, like the browser, like of course, trees, like yes. And I had this whole like new way of seeing like CSS. So I would write some-

[00:20:36] Michael Chan: Yeah.

[00:20:36] Lara Schenck: And understanding like all of the comp- the complex piece of software that a browser is. So, like when we write CSS, we're writing that, we're calling all of that code, and if you don't have kind of an understanding of what's happening under the hood, then it becomes like rote memorization. It's a lot harder to debug things. And I was, um, I don't know, in my in my talk I have this slide that's like kind of a gray text writing of like boring CSS and then transforming into like, "Whoa, CSS! Like this is incredible!" Um, and like something like the cascade, I had, um, I was just like really able to, once I had the the um context for understanding these base computer science concepts and then I looked and learned about like the rendering pipeline and like how- Yeah. Like the creation of a render tree in the browser, I was able to like understand that in a new way. And then that's kind of like the middle layer. And then when I understand that and look at CSS again, I was like, oh my god, I have this like browser in my brain now that I can like see what's happening. Um, it's really fun. So so this kind of- that realization encouraged the the first version of this talk, which was Algorithms of CSS, because I was like a little timid about saying like, oh, you write like, I don't know if you really write algorithms in CSS, but there are algorithms related to CSS. Um, and so I proposed this talk for CSSConf Europe and didn't really know, I had kind of this like catchy description. Didn't really know what it would turn into, but it kind of turned into a talk about like writing algorithms, like the the CSS we write is algorithms in this kind of like cool declarative domain-specific way. Um so there's the algorithms that are part of the browser, but like what we write is, those are also algorithms.

[00:22:31] Michael Chan: Okay. So let's talk about like kind of the the the meta of this talk for a second as we as we kind of like transition into into talk. Um so so first of all, Um, you had this, uh, you have this, this is the first time I've ever seen this, but in one of your first slides, you actually say like the version of this talk and you've kind of alluded to this. Um, that was really nifty. How did you, like, did you just start that? Like you gave it once and then like the next time you're like, oh, this has changed like a little bit, but not drastically. And then like kind of kept doing that. Or is this like a theme for all of, uh, all the talks you've given?

[00:23:04] Lara Schenck: Oh no, this is definitely the first time. I did that.

[00:23:06] Michael Chan: What version are you on now?

[00:23:08] Lara Schenck: 3.6.1. Yeah.

[00:23:10] Michael Chan: I love it. I love it. So, I I imagine that probably like a hard shift between 2 and 3 was that title that you're talking about from Algorithms of CSS to this new CSS Algorithms.

[00:23:22] Lara Schenck: So, version 2 actually only happened one time. So, I'm kind of following like loose semantic versioning. So-

[00:23:30] Michael Chan: So are we all.

[00:23:31] Lara Schenck: Like breaking change. Yeah, yeah. So, like the- Like incrementing the first number is like kind of the fundamental takeaway is a little bit different. Mm-hmm. Is how I think about it. Um, uh second number is like new information and the third one's like maybe some conference-specific stuff or like, I don't know, whatever a bug fix in presentation terms would be. Uh but version 2, I did it, I did only one time, but that was also kind of a whole re- I'm kind of sad I didn't do that more. But that was at WordCamp US 2018, and that was "Bridging the Design to Development Gap with CSS Algorithms." So that was more about like using algorithms and the idea of like patterns as a way to help like designers and developers understand each other a little bit better. And then version 3 is like doubling down on, yes, we write algorithms. Yeah. Like the CSS we write is algorithms. So,

[00:24:30] Michael Chan: nice. So, uh, so in version 3, I think the, the one that I saw at JSConf US was version 3. Mm-hmm. Um, what, what, what's the main, what's the main arc? What's the main story, uh, uh, takeaway of this talk?

[00:24:41] Lara Schenck: So this is, uh, this is kind of where my versioning like broke down a little bit because it like forked kind of.

[00:24:48] Michael Chan: Okay.

[00:24:49] Lara Schenck: Um, and then went back. So the one at JSConf US, um, it's kind of about the practice of writing CSS algorithms a little bit more, a little bit more, um, less of like a heady talk, more practice-based. But the every talk starts with, um, a kind of the basic information where it's like, yes, CSS is a programming language, let me tell you. So, starts out with this Twitter poll- That I've done a couple of times, um, a few times, that's like, is CSS a programming language? And the answer is consistently no. Not by that not by that much, but like 53% or something will be no. And um and then that-

[00:25:34] Michael Chan: Not an overwhelming 100% yes.

[00:25:36] Lara Schenck: Right. Yeah, so it's like, okay, there's a lot of people and maybe bots that think CSS is not a programming language. Okay. And then I talk about like, what is a programming language before we decide whether or not CSS is one of these things and the realm- like the world of programming languages extends far beyond the web. Mm-hm. And there are many, many, many kinds of programming languages and people like dedicated to fields dedicated to researching what a programming language is and what types of languages there are. So, I think the main thing that comes up when someone says like CSS is not a programming language, they do not- they're not familiar with declarative languages, which is a whole category of programming languages.

[00:26:18] Michael Chan: Yeah.

[00:26:19] Lara Schenck: Um, so that's the first part is like discussing the difference between declarative and imperative languages.

[00:26:26] Michael Chan: What is the, um, so I, I thought that you tackled this topic the best I've ever seen. Uh, how do you describe the difference between like an imperative and a declarative, uh, programming language? Uh, specifically, I know that React developers like are always seeming to like want things to be more declarative and like throwing the word declarative around at without actually like fully understanding what that means. Um, so what does, um, in your definition, what does a declarative, uh, language look like and how does it differ from an imperative one?

[00:26:55] Lara Schenck: Sure. So like at the language level, and my definition slash whatever accumulation of definitions I read is what this is, um, a, an imperative language has control flow, so you can When you like a computer reads a program from top to bottom, and as it goes through the statements, certain statements say to jump to a different part of the program. So like, if this, like go execute this function, whatever. Um, that's control structures, for loops, if statement, um, conditionals. And a declarative language does not have control flow like that. So it's read top to bottom, and all any logic or control flow is like baked into the statement itself. So you have- in the example I have in my talk is like a sorting algorithm, so like bubble sort, whatever. Um, in an imperative language, you would see the actual- like you see the control structures in the algorithm, in the algorithm, the exactly what algorithm is happening. Um, and if that was declarative code, all you would see is sort, and the algorithm's kind of obscured in the underlying program. So like there's has to be some sort of imperative code happening. That might be like at the compiler level depending on the language. Um, yeah, control flow, no control flow. And and the the kind of best best distinction I think is uh in imperative language, you're telling the computer how to do something. So like at the very granular level of, you know, get these numbers, do this thing, blah, blah, blah. Um, and declarative is you're telling it what to do. So you say sort. You don't say how to sort. And and in um In the conversations I've had with people that work on programming languages, the like general thought is like as declarative as you can make it. That's like a very safe way to build a language. That's a good, very good thing. Um, but those can all, like imperative and declarative can also be used as uh styles of programming. So that's probably what it's kind of like in the React community where you talk about something being more declarative than something else.

[00:28:57] Michael Chan: Yeah, I thought that that was that was such a good illustration that you made because you were you really showed um how You know, we use algorithms like uh display flex, right? How that's kind of tying into an imperative thing that's happening in the browser. And that that imperative and declarative aren't like these opposing things. Like they're two sides of a continuum. And you can kind of get to more declarative. But um really, there's always gonna be some type of thing saying this is exactly how you do it. Uh you know, do it now. Below the code that you're writing. Now, as someone who has has written a lot of CSS, um, how do you feel about like purely declarative models for programming? Are there uh some kind of challenges there, or should we try to get all of our programming languages to be like 100% declarative if we can?

[00:29:46] Lara Schenck: I mean, I think we they should be more declarative. Um, I don't feel entirely qualified to answer that. Sure. I don't know if I know kind of language stuff quite enough.

[00:29:57] Michael Chan: Yeah, yeah, yeah.

[00:29:57] Lara Schenck: But the- I mean, the concept behind declarative code is that you're not- there's like less things you can- less things developers can mess up. Um, and more features built into the language rather than just kind of floating around as things that developers need to do, need to remember to do.

[00:30:14] Michael Chan: Yeah. So, you have this this beautiful- this is the moment kind of like in in your talk that I was like really captivated. Because I last year I gave a talk called like Hot Garbage Clean Code is Dead, talking about just kind of how like everything starts out as a mess and like you're basically, you're just kind of like trying to manage the mess. And uh so I was just, I was just like totally like swept away when you, uh you started talking about turd-driven development. Uh so tell me a little bit about the the philosophy there, how it applies to CSS uh in general.

[00:30:48] Lara Schenck: Yeah. Turd-driven development. Yeah. This has been like. The uh I don't know, I've one of the parts of the talk people were like, "Yeah, I was discussing this with my team." It was like that, and someone was like, "Yeah, that's totally a turd." And I was like, "Yes!" Um, so, turd-driven development is a riff on test-driven development, where instead of um like writing a failing test, then writing code to make it pass, and then refactoring to make it better, you just like keep writing more code. So, and and with CSS, uh and like UI development specifically, like this for sure applies to any like any HTML, whatever. You can we don't have unit testing the same way other languages do, which I definitely have a lot of ideas about that. Um, but you don't we can't like write failing tests in the same way you can write a failing test for other languages. So, you have the design as like your base test and then you write CSS and make it pass. But like the way we treat CSS, often, not everywhere, but um the default, the way you treat CSS is you kind of like write it and then you're you stop and you're like, okay, it's done, cool, like I don't have to write CSS anymore. Yeah. And then a new feature comes or something else happens where the test kind of changes, the design changes, so you need to update, you need to go back to your code and instead of like refactoring that CSS we wrote First, you write more CSS. And part of like the, I guess, the fundamental um principle of this is like the assumption that like any code you write is gonna be crap the first time you write it. So it's like it's impossible to write beautiful code first, which is one of the um principles of like test-driven development. Um so with CSS, instead of like refactoring and making the code better, we just keep writing more and more CSS until it's totally unmaintainable. And it's like, oh, what's gonna happen when I touch this?

[00:32:46] Michael Chan: So, what are some of the tools that you see as being uh valuable for empowering that cycle? So, to to to acknowledge like, hey, this is gonna be bad, uh but not living with that for forever. Because, you know, anyone who's worked on a large uh CSS codebase knows that like there's really no option to delete this stuff. Like you said, you just keep piling more and more on. And we don't really have a lot of the tools in our applications to allow for that to happen. So how do you shift into making more like transformative, agile frontend uh CSS? Mm-hmm.

[00:33:20] Lara Schenck: Um, so this is a lot of what I'm doing at work. Um, we have a lot of turdy codebases for sure. And so it's like, what do we do? Like these are huge websites that are running. We can't just go in and like change everything. Yeah. It doesn't make sense for the business to invest in like a CSS refactor on everything. So I think a big part of it is like planning for change as you're writing your CSS. Um, I've I have found like on our team, which is mostly backend engineers, backend like full stack, um, so people that don't have like a high uh CSS and HTML level of expertise. Um, I've I think the burden of naming is an extremely big problem in writing CSS because we have like, like A, everybody's gonna think of a different name for something. The designer is the person who should name it, who's the most qualified person to actually give something a name. Um, but they oftentimes are not involved in the um development process, or they don't have enough understanding of how the the development of the UI would work to give it a good name that will work for other In other contexts. So I've had a lot of success with like utility, like utility-oriented CSS where it's like, don't, like, literally just don't name anything. So it's all these tiny classes. It's like kind of disgusting and uh makes me cringe sometimes, but it's like working for, for our codebases because it's like your, your CSS is gonna stop growing at some point and you can kind of slowly refactor So, we've been using this like specific character in the class attribute that like indicates new classes versus old classes.

[00:35:10] Michael Chan: Oh, interesting.

[00:35:11] Lara Schenck: So, it's like you slowly want to remove the um classes on like the older side before. So, it's kind of this uh like strangler vine approach to refactoring, which is, I think, Martin Fowler came up with this concept where you are kind of like slowly replacing an application with new um new structures that and then removing the old stuff, so you kind of like strangle it from the base and it's eventually a totally different thing. Um Ship of Theseus is another, or Theseus, Theseus, Theseus, I think, um is another like idea where you are like have a ship and if you replace every single part of the ship, is it still the same ship? Even though it's the same thing. So-

[00:35:55] Michael Chan: Oh yeah, it's like a, a phil- uh philosophy, like brain exercise, right? Like,

[00:36:00] Lara Schenck: yeah,

[00:36:00] Michael Chan: it- what is it? It's like if it- if a ship goes out to sea and it rebuilds itself completely at sea, is it the same, same ship by the time it gets to its destination, right? Or whatnot. Which is, which is bizarre. But I don't know, do you, do you have an answer to that?

[00:36:15] Lara Schenck: Uh, no.

[00:36:17] Michael Chan: In the context of, uh, programming and, and, and like rebuilding your ships at sea?

[00:36:22] Lara Schenck: Oh, um, I mean, no. I mean, yes, it is. No, it's not the same ship. No, because I mean, it's a better ship. Ideally, it's a cleaner ship that's like less prone to regressions and easier to manage in the in the long run.

[00:36:34] Michael Chan: One that's better at actually sailing at sea.

[00:36:37] Lara Schenck: Yeah, and I think for like using a like style lint has been really amazing for um what we're doing at PMC and not allowing BEM selector concatenation. Specifically.

[00:36:54] Michael Chan: Yeah.

[00:36:56] Lara Schenck: Which is like might like really might work for some teams, but like our specific setup, like these this like nesting just becomes like so out of control.

[00:37:04] Michael Chan: Yeah.

[00:37:05] Lara Schenck: Um, but that's the kind of stuff, um, just like to think about like where, like how we treat CSS versus other languages. It's like a no-brainer that you would have some kind of like Coding code formatting style guide for JavaScript or for PHP, et cetera. And so like CSS has that too.

[00:37:23] Michael Chan: So where do you feel, uh how do you feel about this intersection right now about where, um, maybe like CSS developers sit in terms of like the the org chart? Because a lot of times we have like a separation, you know, sometimes where it's like, and and it changes at every different company, but you have like your your group of engineers and developers and then you have like your designers and then there's like a CSS person who maybe sits on like either side of that line. Uh do you have a thought about like where they should be in organizations and how we should think about the person who does the CSS, given all of these like challenges of, you know, like a a a global namespace and uh like all these things that aren't necessarily things that strictly designers think about?

[00:38:07] Lara Schenck: Well, I go I go like back and forth about this. So, I am, as the resident CSS person at PMC, my employer, Penske Media Corporation, um I am on the engineering team. So, and we have uh a very small design team, and design is like very political. So it's kind of not an option to be on the design team.

[00:38:32] Michael Chan: Okay.

[00:38:33] Lara Schenck: Um, there are other kind of folks in the front-end community and in the UI community that I've heard really advocate for developers being on- for HTML and CSS developers being on the uh design team. Because you need to be sitting- if you're implementing design, you need to be sitting next to the designer. Hmm. Like, that's where it has to come. So things like in design systems, design tokens, um, design tokens, which are the kind of set of, uh, sort of like a style guide, but the set of like micro design decisions Like font families, the name names of colors, etc., that you can start syncing up the naming in the design with the naming in the application, in the codebase. Um, that has to happen like with a designer. So, depending on the structure of your company, like you might not be able to have that kind of communication with design, which is how PMC is. Um, and and just now we're I'm starting to work more with the designer to like sync up the language we're using, but Um, that like wasn't necessarily possible at first, which has kind of made me realize like the value in coming at this from the engineering side is that like you need to have like the right testing, like even if it's visual regression testing, things like that, and figuring out like how to keep like what are your coding standards for CSS? Like how are you building CSS? Like do you need to build CSS in Webpack? Like we've had- this is like I've Oh my god. Yeah, I've tried like really hard to have a like centralized- because we have like 25 different uh brands and with different like asset building. And yeah, it's like a lot better to have CSS built with Gulp. And and we we're all and and like that's not and coming to that conclusion, I don't know if I was like deep into design land, which is also not what my interest is. Uh, those are will be hard things to figure out and and end up going they're gonna be solved at some point or people aren't gonna use the tools. Because the developers need to use these tools. So.

[00:40:39] Michael Chan: Yeah, I I think that you you talk about this really interesting space that is something that I think a lot of people don't realize is a challenge and then the responsibility of the people in these roles, the people who sit between design and uh development is is that like typically design like you know. If you have departments, a design kind of comes down through engineering. But then a lot of times your role is to, like you said, like move things, move concepts back up, right? Like we can't call this thing a a box or whatever because like that that's already taken. And so our new name is this. And if we can mirror that up, like through, if we can bring that back up through design, like the whole process like moves a little bit better instead of having this layer where we have to map these concepts, you know, from design to like engineering or, or, or our design system or, or whatnot. And it seems like these, these people have, I don't know, I guess they call 'em like unicorns or whatever. People can like go back and forth, but there's a very human element to like being able to kind of like hold both people's hands. Like hold, hold the hand of design, hold the hand of development and kind of like bridge that gap and like help these teams. Work better together instead of that traditional model where it's like, you know, someone throws something over the wall and then, you know, more CSS is written and then it gets thrown back and then back again. And then, you know, in that turd-driven development cycle. Uh, how much of this, like, I guess working through communication and like healing that organizational divide is a part of your specific role in at PMC?

[00:42:12] Lara Schenck: A lot. First of all, I really do not like using the term unicorn for this. So, because it's an actual- like, there's a lot of people that do this. Um, and like, I think more companies need this role.

[00:42:25] Michael Chan: Yeah.

[00:42:25] Lara Schenck: And a title I like quite a bit is design engineer, which comes from other industries that have this break- these silos. Um, and the design engineer, like, on a Like in building a building, for example, or designing a building, the design engineer would be the person that sits between the architect and the civil engineer and has enough of an understanding of the materials and enough of the understanding and like sympathy with um the visions of the architect to like make those two kind of bridge the gap and be the liaison between those two sides. So, um, yeah, but that's like really exactly what my job is, doing design systems, because it's figuring out like how to Um, like, while I really don't do design, and depending on who I talk to, sometimes people are like, "Oh yeah, so you're a designer, CSS." I'm like, "No." I mean, but but that said, like, I do have an I do have an art background. I could, but probably the design I would produce by default, even if I'm really critical of it, would be, um, you know, by some measures, like, better or like more informed than a design from another person who has no art background, of course. So I do have like the knowledge and sympathy with for design and like for I can recognize like, oh, that that font sizing is weird, or like that doesn't quite align. So kind of have the eye to spot those things, but I don't do I don't like make that stuff myself. I don't do the designs. So I can help, like I can understand where the designer's coming from and where like the stakeholders, etc., are coming from. Mm-hm. And then translate that and figure out like what engineering needs to do to get that to be more of a reality. And to also to say like, designers are like, we're not doing this. No.

[00:44:11] Michael Chan: Yeah.

[00:44:12] Lara Schenck: That's another thing is being like, okay, you're just gonna have to live with that line height because sorry.

[00:44:16] Michael Chan: Right. Yeah. And I love this idea that you've mentioned this a couple times. I love this idea of sympathy, right? Having sympathy for both sides. Uh and I think it plays into some of the solutions. Like you said, like no one would like go into, go into their office and come out with a utility-based CSS, right? Like it's just, it's irrational. But when you're when you're sitting in sympathy between, you know, both design and engineering, it actually comes out to be like a very rational path forward. Like one that allows you to uh say yes more often to both sides.

[00:44:51] Lara Schenck: Yeah.

[00:44:51] Michael Chan: And and that's like, that's the beauty of of the role that you have and the role that so many other people have that sometimes can be very like ill-defined.

[00:45:01] Lara Schenck: Yeah, and um and I think there's and I'd be really interested to do some kind of like questionnaire about this to see like what are the what state is codebase in at companies that do not have this role and at what point. And so I don't know if that's and this role like corresponds directly to design system. So um like is this Is this a role that like every company needs that we just don't- that's not a uh not a convention right now? Like that's not a normal thing. Because it's, you know, we're kind of like a capitalist society, so it's like what language can you build the most things with and like grow the fastest with?

[00:45:41] Michael Chan: Yeah.

[00:45:42] Lara Schenck: JavaScript. Like you're not gonna grow your entire business with just HTML and CSS. Right. Um, but if you don't invest in those technologies, it's gonna majorly bite you. At some point or you're gonna be sued because people can't use your website.

[00:45:54] Michael Chan: Yeah. Yeah. So do you feel like design systems, 'cause that that really has uh kind of risen up to the surface in the last couple of years. Uh do you feel like that's kind of the bucket that a lot of companies are putting this role into?

[00:46:07] Lara Schenck: Mm, yes, probably. I mean, you also hear titles like UI engineer, UX engineer. Um, and and this is something that we're probably gonna be like approaching soon at PMC is like do Like our design system, which is much less a component, much less a library of components and more like a frame frame or uh standards for writing front end and like really strict naming conventions. Uh because we can't commit to certain components because there's like 25 different brands and yeah and like designs change all the time. So, um like to to have a design system, like do you have to have a design systems team? 'Cause that's something that like in the design systems community is like really advocated for. And it's like, you need to have, like this has to be its own product with a roadmap, et cetera. Or can it be something that is, which is potentially where we're headed at PMC, kind of like unclear. I'd be curious what what things are like in a year. Um, like is does this become uh a piece of software that like, yeah, maybe one person kind of uh started it, is the major expert in it, but is this something like a team of people with different skills can maintain over time? And I've heard that the answer to that is no from other companies, but I don't know. Cause it's some- it is something you really need to invest in. And maybe, maybe it is enough to have one person in that role or not. I don't know.

[00:47:32] Michael Chan: Cause it seems like in your particular role where you're uh producing a lot of WordPress sites, uh you're actually building a platform for several design systems as opposed to just like a single design system that like bridges the gap between a single design team and a single group of developers.

[00:47:49] Lara Schenck: Uh yeah. I mean, that's. I mean, we do have like this- like each of the brands has a pattern library that's built of the same stuff. So, the biggest uh the biggest goal is for everything to be like really predictable and findable.

[00:48:02] Michael Chan: Yeah. Well, we are kind of like coming up to a close on our time. I wish I could like just talk to you all day about all this kind of stuff because I I find the way you think about this stuff fascinating. Um, but you had this uh really amazing takeaway at the end of your talk and I kind of wanted to end with it, which is That CSS and HTML and all these things are this this amazing like springboard into other technologies if we think about them right. You know, if we think about— like if we honor CSS as having these algorithms and then giving people the potential to then kind of like dive dive deeper. And like an invitation to come learn more. How do you see that playing out at companies? How can companies better invest in a mindset that invites people in no matter what their current level of understanding is?

[00:48:51] Lara Schenck: Well, hiring- well, I don't know. So I don't know if it's— uh trying to think like within the context of companies.

[00:48:59] Michael Chan: Or even culture, if that's easier.

[00:49:01] Lara Schenck: Yeah, yeah, culture. I mean, a lot of it just has to do with like education. So when we teach- and it's really different coming up as a developer now than it was like when I when I learned and Um, anybody who's been doing it for more than like 5 or 6 years. Um, now there are so many things you need to know, like very specific items that are like kind of, um, like not easy, not things you can just like figure out tinkering around on a web page. Um, yeah. So instead of taking HTML and CSS and cramming them into like 1 or 2 weeks at a boot camp and then like never learning anything else. about them, um, I would like highlight them as like really interesting languages that can help you learn a lot more about the browser, about this like, um, they're and they're so beautifully like resilient and easy to get started with and and easy to like see the results and see things working. You're like, that's what we love to do. And as like software developers, you love building things. And like HTML and CSS, you build something Immediately when you're starting and and kind of um embracing that power as like bringing people from more diverse backgrounds, um more diverse interests into programming. So instead of starting out with languages that you know fail with a typo, like teach people the nature of code and the nature of like programming, which is like writing instructions for computers. Teaching that and highlighting that with HTML and CSS. But then also instead of saying like, okay, cool, you figured out how to type, let's go on to real languages. Instead of doing that, say like, okay, now you understand these languages, let me show you how like what's actually happening under the surface here.

[00:50:44] Michael Chan: Yeah.

[00:50:45] Lara Schenck: And this is like another type of programming. Like this is what's powering your declarative code. And using that as an entry point. And I think that, like, and this is my like story really, is like coming from like a creative background. This is not something I would have been interested in had it not been for HTML and CSS. So, um, we can, you know, attract like get more women into programming, more people with from creative backgrounds, non-traditional backgrounds, things like that.

[00:51:11] Michael Chan: Um,

[00:51:11] Lara Schenck: so instead of saying, "That's not a real language," blah blah blah, you say like, "Yes, you are a programmer."

[00:51:17] Michael Chan: Yeah, it's all part of a continuum and you have these kind of continued ways of illuminating or just kind of like, you know, maybe stopping where you feel comfortable but knowing that you are also programming. It's no less programming just because it's this language or or the other. I love it. I love it. Now you are embarking on a new research project that actually kind of tackles like the edges of this, which is like how programmy a programming language is. Uh could you tell me a little bit more about that and like how people could uh contribute their thoughts to that?

[00:51:51] Lara Schenck: Sure. So this is a— um a little so I I just was at Strange Loop. The conference and gave this talk there, which was really cool. And I'm like, if there's a talk about CSS at Strange Loop, then it's a programming language.

[00:52:02] Michael Chan: Yep, yep.

[00:52:04] Lara Schenck: But the, um, there's a a computer science researcher in the Netherlands named Felena, and I had really resonated with her conference talk, um, that she's been giving for a while. She did a lot of research about spreadsheet programmers and looking at Excel as a programming language. And as like, yes, people are programming and spreadsheets. And I had seen her talk after I started doing this talk, and I was like, "Oh my god, like, like parallel things happening here." So I had gotten in touch with her. This is a big like thumbs up for reaching out to people you find inspirational on the internet. Um, and we ended up doing this project together for Strange Loops. So she had um this idea to do a- have this kind of spectrum where you order programming languages from most programming to least programming. Oh, cool. To try to- and gathering data about that to see if we can better understand what- how people are determining what is programming and what isn't, or what's less less programming. Because people interpret that differently. And one of the different versions of the CSS algorithms talk focuses more on our various- our different definitions of what a programming language is. So it's kind of a subjective- even though there's, you know, of sort of a really open-ended academic version of the definition, people have their own subjective understandings of what programming is, of what a programming language is. And so this uh little like data collection app is kind of a way to try to um figure out what that is and get some like basic demographic information to compare. And we have uh we have like a good amount of data so far, so if anybody sees that and wants to contribute their their response and organize programming languages on a spectrum, most to least programming.

[00:53:55] Michael Chan: Well, it's a super cool uh project. I am really excited to see like where you take it, like what you uh kind of coalesce the data into, um because it's just really fun. And I was kind of even just playing around with it uh this morning, just realizing a lot of my own internal biases about like what is programming and what is not.

[00:54:13] Lara Schenck: Yeah, like people see it, like some people say that most programming is like closest to the machine, so like assembly language, C, things like that.

[00:54:21] Michael Chan: Okay.

[00:54:22] Lara Schenck: Um, but then other people think it's like, oh, what can you ship the fastest?

[00:54:26] Michael Chan: Interesting.

[00:54:27] Lara Schenck: And and what will the world be like if most programming was like the languages that allow the most people to start programming? So it's like-

[00:54:35] Michael Chan: Wow.

[00:54:35] Lara Schenck: Yeah, it's interesting to think about. Not to bias people listening to this already, but you know, a nice like I don't know, questioning your entire life as you're filling out the survey.

[00:54:45] Michael Chan: Well, as people want to learn more about um your research there, uh how can they find you online, uh find your projects, etc., etc.?

[00:54:55] Lara Schenck: Yeah, I guess Twitter. I don't- I have like a very hot and cold relationship with using Twitter.

[00:55:01] Michael Chan: Same.

[00:55:02] Lara Schenck: But Twitter, um on my on my blog, now that my conference speaking is over for this year. Um or at least calm down a lot, uh like to do some more blog post writing. So my uh notlaura.com, my website as we discussed, um and then my Twitter handle @lauras126. And if any of this stuff resonates with listeners or have similar experiences, I'd love to hear about it. Feel free to send me an email.

[00:55:27] Michael Chan: Awesome, awesome. Well, Laura, thank you so much for your time today. I really appreciate uh everything that you're doing to bridge this gap. It's been uh it's been needing healing for a long time and I really appreciate you standing in the gap there and uh helping people uh have sympathy for both sides.

[00:55:44] Lara Schenck: All right. Thanks. Thanks for having me.

[00:55:46] Michael Chan: One more time, go watch Lara's talk. You can find a link to it and everything else discussed at reactpodcast.com/68. Thank you, Lara, for joining us today. And a big thanks to our sponsors, G2i and Linode. Instantly deploy and manage an SSD server in the Linode Cloud. Get a server running in seconds with your choice of Linux distro, resources, and node location. Get a $20 credit when you visit linode.com/react and use the promo code REACT2019 at checkout. G2i is a hiring platform for remote developers devoted exclusively to React and React Native. Check out g2i.com/react at g2i.co and get matched with React and React Native roles that are fully remote at companies who are serious about quality engineering. G2i. We vet. You get hired. It's that simple. This episode of React Podcast was edited by Mikael Delport. It was produced by Mikael Delport and Sarah Jackson. You can find React Podcast on Speck, a network to help designers and developers level up. Visit spec.fm to find other shows that will take you further in your career. Help us out by reviewing this show on iTunes. Your reviews help the show grow and help us ensure great guests and awesome content week to week. To join the discussion, visit reactpodcast.com/chat or follow us on Twitter @reactpodcast. I'm @chantastic. To stay out of the discussion but get updates, visit reactpodcast.com/reactions. Thanks so much for giving us your attention. We'll be in your ears again next week.