Iris Schaffer
Iris Schaffer
Iris is a front end developer with a passion for user experience and design, currently building products at Spotify. She’s also engaged in the Swedish meetup scene where she co-organises a ReasonML meetup.
Impact: Growing as an Engineer
React Summit 2022React Summit 2022
27 min
Impact: Growing as an Engineer
Becoming a web engineer is not easy, but there are tons of resources out there to help you on your journey. But where do you go from there? What do you do to keep growing, and to keep expanding the value you bring to your company? In this talk we’ll look at the different kinds of impact you can have as a web engineer. We’ll walk through what it means to take on bigger, more complex projects, and how to scale yourself, and grow the community around you. By driving our own development we can all grow our impact, and in this talk, we’ll discuss how to go about this.
Hello everybody. Can you hear me? Awesome. How excited are we all to be here? Good conference so far? There we go. Nice. And hello also to everybody who's joining remotely. Super, super awesome to have you all.
And you already were told this is actually my second time here because that is just how excited I am to be sharing this with you. Do you think we can make it even better than yesterday? There we go. Nice.
[00:49] Yesterday I received a really interesting question and it was what's the difference between a good engineer and a great engineer? And I didn't really have an answer, but I reflected a little bit and I came to this conclusion.
Good engineers can tell you what's possible and what isn't, but great engineers find out how to make the impossible possible. And what I mean by that is there's this mindset of nothing cannot be achieved. If you just try and work on it you can probably make it.
[01:19] I did not have that mindset when I joined Spotify four years ago, and I've grown so much and learned so much over that time, and that is why I'm talking to you today. That is like my experience bundled up that I want to share with you.
And I couldn't have done it alone either. It was really, really important to have the relentless support of my managers, the people around me, the rituals and tools that we have in place at Spotify. So if anything in this talk catches your attention, that's where you can have in case you want to get a job. We are on a hiring spree this year. And for this specific talk, I also have to thank a couple of people. It is based on my experience, but I wanted to also validate, is it just me? Do other people feel the same way?
[02:00] So I actually interviewed a couple of people. I interviewed two managers, Linda and Maphisa. And also a staff engineer called Erin, as well as Tejas who's actually on the other stage speaking right now. So thank you all for coming here and missing out on his amazing talk. Sorry.
Yeah, so this talk is kind of structured into two parts. First, we'll talk about what is impact. What kind of impact does a company care about? And then we'll look into how to grow.
Part I: Impact
[02:28] The very first thing I need to do is clean up this myth. To continue growing as an engineer you need to go into management. Not true. A lot of companies, including Spotify, actually have dual career tracks. That means if you are and a senior engineer or a senior engineering manager, those are equivalent oftentimes also in terms of salary.
And you don't have to stay on one track. You can change between them. It's going to help you, but you don't have to. But now what's the difference between an engineer two and say a staff engineer?
[02:59] I think it's this fear of impact. So as a more junior developer maybe you're actually just focusing on making yourself better so that in the future you can provide more value.
Maybe you're only working on a couple of files or that one little application, but over time that fear will grow and grow until you maybe having impact on an entire department or you designing interfaces between different domains or different systems, right?
Impact Levers x Core Skills
[03:28] And how do you grow this? As engineers I think we have several impact levers that I'm going to talk about as well as core skills that play into this. And the levers or these pillars of impact, I've looked at a couple of different frameworks that I found online, career frameworks.
They call them different things, but in essence, it's usually a combination of these three. And the first one I want to talk about is mastery. You can call this tech excellence instead or craft. And the reason why I'm mentioning it first is because this is the very first thing we usually assess in say an interview process.
[04:04] This is kind of what enables you to deliver impact, Right? And we'll talk about that in a bit. This does not only mean writing code, and that's really important. The more senior you get, the less code you will likely be writing day to day, but you're still doing incredibly important engineering work because you'll be, for example, designing the interfaces between different systems. But you can't do that directly in code. You first have to plan it in a different way.
The next one is, oh, sorry. This is a pillar where underrepresented groups usually have to do a little bit more work to prove that they got what it needs. So if you're a white dude and you say, "I'm an awesome engineer," people likely believe that that's true, right? I had to prove that a little bit more. What I heard was, "I'm not technical enough." If that happens to you, don't listen to me. Head over there and watch Tanya Riley's talk on being blue. It's changed my life.
[05:04] The next one to talk about is business impact. And I already mentioned that mastery is kind of an enabler, right? Mastery can only get you so far because if you're just using your tech know how to rebuild the same application over and over again, you're not actually providing any value, and that is what your company's actually paying you to do.
So instead, if you use that to say, I don't know, improve the conversion flow, improve conversion by 3%, or maybe you are, I don't know, removing this repetitive task and by that saving $10,000, right? That is business impact.
[05:39] And to be really good at this, you need to understand your business problems. You need to understand what problems your business is facing over time. You need to understand the product vision and the business vision.
And if you can do that, the great thing is that we oftentimes have these really hard decisions to make between a little quick hack and the super scalable system that will live for years and years to come. How do you know which one you should go for? Knowing what problems the company is actually facing can help you decide.
[06:08] And the last one is culture. And this is really hard to quantify, but if you have a good culture in the company, you'll probably feel safe. You'll feel good there. You'll want to stay there for a longer time, right?
And there's so much that goes into culture. I'm only going to focus on two things for now. Collaboration and innovation. Why collaboration? Well, I'm just one engineer. So even if I was the best engineer on the planet, I could still achieve more if I could level up other people to my level.
[06:43] And then innovation, my innovation. We all work for companies that depend on creativity and innovation to stay ahead of their competition. So if we can, for example, help as engineers to foster an environment where people feel safe to be their true selves, come up with that stupid idea. Try it, fail, learn from it, try again until you succeed. You can actually foster innovation.
And this might look different at your company. So it's really important that if you want to make a career at that specific company, you talk to the people you have to talk to to figure out what matters to them. And we said it's not only these levers of impact that are important, there's also core skills. What are those?
Core Skills
[07:28] I don't like the word soft skills, although that's what you usually hear them refer to as before. This is basically what enables you to do that work, right? To work on those pillars. You need that to work with other people, basically. That's what is going to enable.
And in my interviews with the people at work ... Sorry, do you want to take the photo? There we go. The people I talked to at work, they kept pointing out these three, so that's why I figured I'd trust them rather than coming up with something myself.
[08:01] The first one is communication. By communication, I mean both written and verbal communication. This is your most important tool if you're working across teams especially. But even within a team that's going to help you a lot. You'll use it to negotiate, to persuade, to build consensus. And the one thing that I see go wrong here most often is that we don't target our message to the person on the other end, especially if they're not technical.
The next one is accountability. And this one is even trickier because a lot of languages don't even have a word for this concept. So what does it mean? If you are accountable it means you take responsibility for your actions and your inactions. And rather than say blame somebody else or sweep your mistake under the rug, you'll actually stand up and say, "Look, I messed up, but here's how I'm going to make sure it never happens again. Or this is how I'm going to fix it."
[08:57] That is being accountable. And that will help you in whatever you try to achieve because if you actually feel accountable, you'll make it happen. And you can't only hold yourself accountable. You can also do that with other people, for example, through feedback.
The last one I want to mention is decision making. And this is going to bring everything in certain in a little nice circle. The bigger your scope, the bigger your sphere of impact, the bigger decisions that you will be making.
[09:25] That will require all of your tech skills working on the right problem and all of that. It will require communication between teams, building that alignment that this is actually the right solution. But in many cases you have several options and there is no clear winner and you'll just have to call the shots. But if you are accountable, people will trust you with that position. 
Part II: Growth
[09:51] Now, let's look at how we can grow. The first thing I want to mention is we're all engineers, right? Yes? Yes. There we go. We literally solve problems for a living. That is our job.
It's no different with growth. We have somewhere that we want to be. We have somewhere where we are today. We need to figure out where those are. But then it's kind of easy to build the steps to get there.
[10:15] Let's start with where even is this be? Where do we want to go? And you might be thinking, "I know my goals. I want that raise, I want that promotion." Unfortunately, science tells us that that's a really poor motivator over a long period of time.
So for long term goals you need to tap into that motivation, into that inner purpose. And how do you find that? I'm really bad at this straight out I don't have these lofty goals. I'm not like I want to be an astronaut. I don't have that. So instead what I did was I looked around myself and I looked up to all of these amazing people that I work with, and I asked myself, "What is it that inspires me about them? Why is this project not that project that I'm drawn to?"
[10:59] And through that I've kind of built this vision for myself of where I want to be in a couple years. And it's not changed that much over the last three or four years. I do change it up a little bit, of course.
The next thing once you know where to go, and I can't stress this enough. I just did. I couldn't help it. Sorry. Find your sponsors. You need to communicate your goals to the people who can help you achieve them.
[11:24] That might be your manager, that might be your manager's manager. That might be that project manager over there who can put you on that project that you need to work on. And it's really important that we do that, even if your company doesn't have the rituals in place. At Spotify luckily we do have development talks twice a year where we talk about these things. If you don't have them in place, you need to do more of the work yourself. But the beautiful thing is most people really like helping others. So don't only look for people who can mentor you, who can help you create those skills that you need. Also look for people who can advocate for you, get you in that room that you need to be in to actually get that next project.
[12:06] And the bigger your network, the easier that will be. Right? And a pro tip I learned from Erin is don't just approach somebody, be like, "Hey, can you help me with X?" Go through them and be like, "I know you're an expert in X." You. Yeah, exactly. "Is there anything that I can do to take something off your plate and help you?"
The next thing, obviously, if I don't understand where I'm today, feedback can really help you with that. And that's super, super terrifying. The first time I heard that Spotify has two development cycles a year, and you have to gather feedback from all of your peers non-anonymous, I was like, shit.
[12:47] Like what am I going to do, right? But the three things that happened were number one, my imposter syndrome disappeared because all of a sudden all of these people telling me I was doing much better than I thought myself.
Number two, I actually understood that I had made progress because that feedback that I received six months ago didn't show up anymore. And the third thing that happened is I actually did get those pointers of other areas that I might want to improve. And on top of all of that, having those really honest but personal and good conversations with each other actually builds a mutual trust between you and your colleagues.
[13:24] Cool. We now understand where we are. We understand where we want to go. Now it's about figuring out that way there. And obviously you can't all do it in one go, right? You'll have to slice this into several milestones or smaller goals. I usually try to look for goals that are maybe three, maybe six months out, something like that.
And this is kind of my formula for those. So the most important thing here is that I have the reason of why I wanted to do this on there. That means if for some reason this goal didn't work out, I still know what I actually wanted to achieve and I can do something else instead. I don't also have a metric. How do I know if I succeeded or not? Actions, concrete, smaller steps that I can take in my day to day and super important support. Do I need to find a project where I can practice that skill or do I need to be sent to a conference for this? Can I expense another book?
[14:16] And speaking of expensing books, I'm sure you're all thinking, we are all at a conference here, so you're like, I'm here to learn. Unfortunately, bad news, 70% of learning happens on the job, 20% in social settings and only 10% at these formal educational events such as this conference. That doesn't mean that this conference is not super, super valuable. It just means if we really want to grow, we have to do it in our day to day.
And how do we go about that? Well, we can marry up our personal development goals with something that the company actually needs to do, needs to do to succeed. At Spotify, this is usually fairly easy because I go to my manager and say, "I want to go into backend." And they probably tell me, "Well, actually, there's this project that you could be working on. You could embed with this team. There's a lot of stuff that they already do for you."
[15:19] I also brought a couple of examples of what you can do to pair these things up. One coworker of mine wanted to improve his communication skills. So what he did was he offered to run sprint demos and write stakeholder updates. The most boring thing in the world. My manager was like, yes, please take it away. But it helped him, and that's the important part. Another example is a friend of mine wanted to get into this new platform, and he knew that his team was going to use that platform fairly soon. So it was an easy sell to go and embed with that team for three months to figure out how it actually works from inside out.
And yet, another friend of mine wanted to get into backend development. So his engineering manager suggested, "How about you pair up with this other engineer from a different team for four hours every week and get that skill going so you can practice what you've learned in theory in courses?"
[16:06] The other thing that I need to say about these actions that you can take is, although it's super nice to stay inside of our comfort zone outside is where the real magic happens. And that's scary, right? That's really, really scary. I was absolutely terrified when my manager asked, "Hey, Iris, do you want to lead this huge company wide backend heavy initiative?" I'm like, "I'm a web engineer. Do I really have to?" But I did it anyways and it worked out, and I've never grown as much in such a short period of time as in those three months, and now I'm hooked. Now I'm like is this initiative uncomfortable enough? Can I find something that's even worse?
And it really helps, but also pro tip. My manager paired me up with somebody else, with a staff engineer, to make it less scary for me. Somebody who would not directly be responsible for it, but who has my back in case anything happens, who can mentor me a bit. And that just took my fear.
[17:07] All right, we now kind of know where we are. We know how to get to our goal. Now it's just doing it right? That's easy. Or is it?
This has happened to me so many times. I just forget about my goals until two weeks before the DEF talk. Shit. Well, we've learned from it though. So my manager and I now check in on our goals once a month in our weekly one on ones. And on top of that, I for myself have created this little ritual of, in the beginning of the week checking in on my goals, understanding how can I make progress towards them this week in my day to day, and what other priorities do I have this week?
[17:48] The other part is that at the end of the week I reflect on how it went. I think about did I need any support? Are there any small wins that I can bite down, any learnings, anything that I can share with other people to make them grow?
And another thing that took me way, way, way too long to realize is this. Does anybody else's calendar looks something like this? A couple of hands. I feel you. My manager is now based in New York, so this is what happened to my calendar. All of our team events moved to the afternoon, and I moved all of my other recurring meetings to the afternoon as well. I just don't accept meetings in the mornings anymore, and all of a sudden I have a good four to five hours of focus time every single day to work on whatever needs doing.
[18:35] All right, we've now kind of wrapped this thing up. We understand what kind of impact we want to have, what core skills to grow, and we know how to plan our goals.
There's one more really, really important thing that I need to say. This was all about helping yourself grow, but there are almost definitely things that you can do to help others. Share what you've learned at this conference with your colleagues. Reach out to them to offer them help. If you're in a position to sponsor somebody else, do that. Growth compounds. It always takes longer than we think it does. It's not a thing you do once. It's ongoing and it's constant. But any investment, a small change today can make a huge difference tomorrow. And I firmly believe that if we just get in the driver's seats and take responsibility for our own growth, there really isn't much that we can't achieve. Thank you.
Mettin Parzinski: Thanks, Iris.
Iris Schaffer: Oh, actually, this probably goes back there.
[19:42] Mettin Parzinski: Well, if I hear the reaction from the audience, people are really enthusiastic about this topic. And I always really like that in a conference that we don't only have technical topics, but also things like how to grow as an engineer besides hard skills. Do you like that term?
[20:00] Iris Schaffer: No. Why is coding a hard skill? That doesn't make sense to me.
Mettin Parzinski: Just coding skills then.
Iris Schaffer: Yeah, exactly.
[20:07] Mettin Parzinski: All right, enough for me. Let's go to the audience questions. A question from anonymous. Does it mean that if you prefer to code more than senior position it's a career ceiling?
[20:17] Iris Schaffer: I don't think so. If you like engineering, then there won't be a problem. If you think that code is your way of getting there, then maybe that could restrict you in some ways. But it's not like I don't code, it's just very different career that I write. I, for example, would make sure that I investigate how to ... If this plan that I had, I'd write a proof of concept to make sure that it actually works in reality. I would write a load test or something. There's small tools that I can write to help a lot of teams achieve whatever they want to achieve. So there is still a lot of coding. It's just slightly different.
Mettin Parzinski: It changes. Yeah.
Iris Schaffer: It changes. Yeah.
[20:52] Mettin Parzinski: You can also still grow as an engineer, I think, even if it's maybe not in title, but you grow in responsibilities or-
Iris Schaffer: Absolutely.
Mettin Parzinski: Or just learn new things, take on different responsibilities and you can still grow. And that also will translate to a different paycheck. You mentioned, question from anonymous. You mentioned you can hold other people accountable through feedback. Can you give an example of that? How do you do that?
[21:20] Iris Schaffer: So in general, giving constructive feedback is really tough. It takes a lot of, you have to get over yourself and really deliver that in a caring way. It's good to have an exact example. It's good to ask people first, "Are you ready to receive feedback? Can I tell you something? Are you in the right mindset in the right spot?" That's really important. If they say no, step away from it. It's not your fault. You don't have to make other people grow. Take them into consideration as well, and then just be very careful and tell them how it made you feel when they did something. Rather than being blanket statement, "You always do X," right? That's not going to help anybody. But if you're really good at feedback, I think also if I come over to you and you, I'm like, "What the fuck was that today?" If-
Mettin Parzinski: That's my average day.
Iris Schaffer: But if you're good at receiving feedback, then you'll be like, "Actually, can I ask you a little bit more about that? Can we dig into that? What was it that I did?" So that's also, it takes a lot of courage to do that already. You're already feeling beaten, but it really helps.
[22:18] Mettin Parzinski: All right, thanks. Question from another anonymous. What advice would you give a developer who is just starting out to grow their career?
[22:27] Iris Schaffer: Focus on your tech skills if you're not already. I think I've broadly seen two different kinds of engineers. The ones who's super good technically, and the ones who's super good on the core skills. And depending on where you are, you need to develop the other part as well. And what I did too early was I started focusing on how can I be that glue in the team? How can I help others? I see that blocker. Can I remove that blocker? If you're good at that stuff already, maybe make it a conscious decision to step back from it. Let somebody else grow in that area for half a year and focus only on the coding or whatever other tech you need to develop.
[23:04] Mettin Parzinski: Yeah. I guess it depends. Just find what you're good at and make the mileage at the start of your career. Right. Question from Sunda. How would you suggest to deal with organizational conflict and biased decision making? Important topic.
[23:20] Iris Schaffer: Ooh, I'm not sure I have enough context to answer that one, so I'd love to talk about that at the Q and A as well. Is this the Q and A? The speaker room, right.
Mettin Parzinski: Okay. Let's go to the speaker room with that question. So what are good resources for developers to improve at impact skills?
[23:38] Iris Schaffer: That's a very good question as well. Resources ... honestly, I've read a lot of management books and they've really made me realize there's so much more than just code that we write. Every second that we spend at work we make a decision to either work on something that has impact or something that doesn't. And I'm not saying you have to be productive at all times. There's no point in that. Work life balance will be horrible. You have to do what you enjoy doing, but you can combine that with something that can actually bring a lot of value to the company. So I think it's really just making that a conscious choice, realizing that you have that choice. That you can ask, "Why are we doing that?" Understanding the reasons behind understanding the product and business roadmap. I think that really helps. But I don't have concrete resources other than a lot of management books, a lot of books about startups, design sprints, that kind of thing. Like developing products as a whole, I think can make you a better engineer.
[24:33] Mettin Parzinski: Okay. Thanks. We have, yeah, one, we have time. The question from Nico. Were there any negative aspect aspects that the company did face after introducing the "feedback your colleague" initiative?
[24:46] Iris Schaffer: I'm not sure when they introduced that. That was definitely before my time, and I've been there for four years. I don't think there's been anything negative. It's scary the first time, but it's always helped everybody I've ever spoken to, despite it being so scary the first time. I write a feedback form and I ask very specific questions. "I know I'm bad at this, or I used to be bad at this. Have you seen any improvement?" Yeah, it's only helped me.
[25:10] Mettin Parzinski: Yeah. Even though personal feedback and knowing that the person knows that you gave that feedback and then giving negative feedback might be scary, I think that's the only way for you to improve. If I give you negative feedback-
Iris Schaffer: Exactly.
Mettin Parzinski: ... then you can come to me hopefully that you'll feel comfortable enough and say, "Hey, Mettin. You said I need to grow on this. How can you help me?"
[25:30] Iris Schaffer: That's the next thing. Of course, yeah. People can help you. I always try to tell the people who are less experienced where I see a clear gap, I can tell them concrete things they can do to improve as well, even if it's helping them offering my time, whatever it is.
[25:46] Mettin Parzinski: Yeah. Valuable resource. All right. That's all the time we have for our little Q and A session. If you want to continue the conversation, Iris will be on spatial chat and on the speakers booth. And now, of course, a big round of applause for Iris.
Iris Schaffer: Thank you.

Panel Discussion: Testing
React Summit 2020React Summit 2020
21 min
Panel Discussion: Testing
♪ I would like to welcome Tomasz Lakomi, Kenzi Dotz, Iris Schaffer and Sophie Au to our panel. Are they all here? Hello? Hello. Ah, excellent. So good to see you all. Hi. How are you all doing? Yeah, not too bad, not too bad. Awesome. Sweet. That's fantastic. So I feel like a little bit, coming back to the among us thing that was brought up earlier, I feel like a little bit of the imposter in here, because I do write tests in the projects that I control, but I also worked in many different agencies and companies and projects where testing was met with skepticism, let's put it that way. So I'm really excited to hear your opinions and ideas on this topic, because I think I was not the only one struggling with this like inner tension of kind of knowing that tests provide a big value, but then also seeing like bad practices and seeing problems. So would you all very quickly introduce yourselves and what you think is like the number one value from testing? Let's start with Iris. OK, I'll start then. So my name is Iris. I work at Spotify in Stockholm in Sweden. And I think for me, the number one benefit would be the quality for the end user, just ensuring that on every release without having to manually test every time, every feature. Oh, yeah. Been there, done that, got a T-shirt. What's your take on this, Sophie? Hey, everyone. I'm Sophie. I'm a full stack front end T developer at Donut in Berlin. And for me, like I think the main thing about testing, similar to Iris, is like knowing that the stuff I'm actually pushing to production works. And like, especially because we do mobile, we do a mobile app. So it's not like you can just push a quick fix, but you actually like have to do a new release. So actually kind of being confident in that the app we're shipping to the user works and we don't have to push like 20 buck releases quick after. That's really good. Oh, that sounds convincing. Tomasz, how about you? Hey, everyone. So my name is Tomasz Rokome. I'm a senior front end engineer at Odex Group. And I also record videos for And when it comes to kind of the number one value of testing, apart from the things mentioned by both Iris and Sophie, I would like to say that testing makes me sleep better at night. As in because I push something to production, I don't have to worry for the entire evening that it is going to break. In fact, we've pushed something to production an hour ago and I am not checking Slack or notifications right now. I know that feeling and I know the other side of this. Kent, how about you? I learned a bunch from your testing talks and workshops. Thank you. Yeah. So my name is Kent and I made testing where I teach people everything that I know about testing. And I don't have a whole lot to add to what's been said. I'll just one thing is I got started with testing with my open source libraries because every time I pushed or I wanted to push a release, I had to go through this. I brought up the library on a page and clicked around all over the place. It just took a lot of time for something I was doing for free. So I thought, I wonder if I could just clone myself and make, you know, do that with my clone so I can go on and move on. And that's what tests are for me. It's like a thousand little kents going through all of these different things I always did. I see. Interesting. So I heard a bunch of really good reasons for why I would want to test. But I know, bear with me, this has been a few years ago when I started, actually not a few years ago, that has been a long time ago. But when I started with software testing, I basically had to read a really thick book and it was not very fun. But how do I, if I am a React developer who's just starting, how do I get started with writing tests? What's a good path? Well, I'll go ahead and get started there. So I think that something that's important to keep in mind with testing is that testing is not anything different from regular software development. So it's just another thing that you're writing software for. And so having an idea of what a fundamental test even is, is really useful. And basically a test is software that will give you some sort of notification when things are not working as expected. And so, yeah, like how do you get started? It really, the answer to that question is the same generally as like how do I learn FrameworkX or how do I build this feature or whatever? Because it's no different from any other software that you're going to write. Right. But I've seen lots of software out there, sorry, courses or literature that basically assumes you're starting on a greenfield project. But I think for most people, that's not the case. Most people here watching right now probably have a huge code base and wonder like how do I even get started? Even if I know how to write tests, which a lot of the material out there covers, how do I know how to start in my existing code base? How do I get the biggest bang for my buck? How do I find out? Where do I start? I'm happy to take that one. So in my experience, like I'll assume it's like React, like web app. End to end tests are usually kind of my first go to, which essentially, generally, even if you don't actually write tests yet, you have someone who's checking that the app works right. I mean, worst case, it's the user when it's in production. But you have someone that's going to tell you, hey, the checkout button is broken. And just writing end to end tests essentially kind of automates that check. So my general recommendation is kind of what's the most crucial part of your app? Is it your checkout button? Is it, I don't know, like you're sending some financial data around just write a single end to end test for the most important functionality of your app. And then from there, kind of branch out and try to cover it kind of as much as possible. And don't get too bogged down in like unit tests and like the 5000 edge cases. Just make sure you have like a rough idea that covers like 80% of the functionality. Right. That sounds good to me. And I know that I wanted to do that so many times when things broke in production and I was working with customer projects. And then you would get calls to unholy hours to your project manager who then like tries to call you while you're trying to sleep. How can I convince? So now that I might be the person who's like, OK, I see the problem. I want to write tests. I learned how to write tests. And I now know where to start. How do I convince my team to A, join the effort and B also how do I convince my manager that I'm not like slacking off and not spending time on something that's useful? I can take this one because I actually have a blog post in around the same idea. So there's a couple of things around here. First up, you shouldn't have to convince your manager, your product manager or anyone really. Because the same way I don't have to convince my manager that I would like to use your state or use effect or any other hook from React. Like I consider testing to be a part of the thing that I'm trying to deliver. In other words, I as a software engineer, I am getting paid to not only build and ship software, but also ship software that actually works and brings value to our users. Ideally, I would love to get paid for shipping broken software, but that's not how the world works. But in a more realistic scenario in which you have a legacy code base and nobody's writing any tests and you would like to create this test setup and to kind of pave the way for future generations who are going to join this project. I would like to start honestly by convincing our managers or product managers or anyone how much time do we waste resolving production issues. And how many of those production issues could have been avoided if we simply had an end-to-end test or other tests, unit tests and so on. Because for instance, consider a website like Twitter. If on Twitter, the login page is broken, you literally cannot do anything. Because if you are locked out of Twitter, you can of course read the tweets, but you cannot tweet, you cannot add anything to the platform. And with only this one test in place, you are able to ensure that, okay, by the way, we are absolutely convinced that the huge part of our website is at least accessible to our users. So start with not the fact that I want to write tests, but talk instead about I want to ensure the quality of our software. Because people are scared of the word test, but they tend to like the word quality a bit more. But what if then your manager asks, so why are you writing broken code in the first place? Right? I know the answer to that is that's something that I have been asked. Sure. I would say that I don't write broken code. My colleagues, they also don't write broken code. But all of us combined tend to produce something that can be broken. So I would like to say that everybody tries to do their best, but sometimes things just happen. And it's not anybody's fault that something is going to break in production. And by us having the best process in place that we can, we can ensure the utmost quality of our software in production. I think that's a good point. Having a process is key and is something that managers also usually do understand. Because you usually have a process already, at least for project management purposes or product planning. There should also be a quality assurance process, I guess. Also, another interesting question that does come up is when we do start to write tests, especially on a legacy code base, but the legacy code base also still is alive and still is evolving, then sometimes you end up with situations where the website is perfectly fine. It's just the tests are failing. How do you deal with that? Is there any patterns that you can spot in test code that you want to probably avoid to not end up in situations where you create tests that sometimes fail, sometimes pass with no changes in the code made, or there's small changes in the code, but not really in the functionality, but still the tests don't pass anymore? Is there any anti-patterns that I should be looking for in my tests? I think I can take this one. I would say if you have tests that keep failing over and over and over again, you're probably testing something that is internal to the component that you're testing. Rather than testing how other components communicate with you, you're testing something internal. Maybe you're testing that this function is being called, but then you change which function is being called, your test breaks, and then really what you should be testing is, is this displayed to the user or is this API being called? It shouldn't be the detail of how you implement it. It should be the end result that you should be testing. Right. Okay, cool. And you said that a valid point to start are E2E tests, but that raises the question, what do you use for E2E tests, for end-to-end testing of web applications? I don't know about everyone, I know Tomasz's opinion on this, but I'm a huge fan of Cypress. I've been using Cypress for a very long time, and it's fantastic. It has such a great developer experience. That's the biggest reason that I use it. There's Puppeteer, there's Test Café, there's Selenium, and there's various others. But of all the end-to-end testing software that I've used, Cypress is by far in a way that has the best developer experience. And that's what you really need out of a testing tool is, anything can throw an error when there's a problem, but not every testing tool is capable of helping you identify what's causing the problem, which is really critical when a test is failing. That's fair. And an interesting question follow-up on this one. End-to-end testing on browsers, I kind of know what to do, but what if I have a mobile app? So yeah, if you have a React Native app, the one tool that we're using is Detox. It works somewhat similar to Cypress. It is super annoying to set up, I have to admit. I think it took us two days, so the DX isn't great. But once you get it working, it actually does its job quite well. Yeah, it's a bit of a different experience just because you don't have a browser, but it's running in the simulator. But if I remember correctly, I haven't actually written into SSS in a while, but syntax-wise, it's very similar to Cypress as well. I see. Cool, cool. And with the testing tool conversation comes something else, because Kent, you mentioned a bunch of tools already. And I have at least the feeling that similar to JavaScript frameworks a couple of years back, where they popped up like mushrooms in autumn in a Zurich forest, which there are many if you haven't been, I think testing tools evolve quite quickly as well. And there's at least a bazillion, bajillion different test runners, and every couple of years, our opinion changes on what's the best of them. And I feel the same way. A couple of years back, we had Selenium, and everyone was happy, and then everyone hated it, and then everyone jumped to – I can't even remember what the bits and pieces in between were called, but now we're in Cypress. Once you are committed to a solution, should you stick to it, or should you pretty much continue to evaluate and jump on the bandwagon? What's your opinion and experience? I can take this one. So when it comes to testing solutions, in my humble opinion, the landscape is a bit settled, at least for me, because I'm using Jest, I'm using React Testing Library written by Kent, and I'm also using Cypress. So I am quite convinced that this stack is going to take me to great success in the software that I'm building. But when it comes to chasing this bandwagon, and I know when the next better version of something for end-to-end testing is going to be released, for instance, I am not entirely sure whether you should jump on the bandwagon right away. I tend to think of software in the way that if something is solving your problems, and you don't get any issues because of the fact that you are using a certain library, I don't think you should necessarily have to jump to a better testing solution. Although, I don't know, in the next testing solution, it will be twice as fast, or the test will be written by an AI. I would be definitely interested. Fair, I think. Yeah, I think that's a good... The fewer tests that I have to write to be confident in my software, the better. Exactly. I don't write tests because I enjoy writing tests. I write tests because I like to be able to ship software and be confident that it's working. So if I don't have to do that, if I don't have to write the test, then I'm totally fine using some AI that does that for me. Yeah, same goes for Angular code, for the record. Yeah, that's true. I think everyone agrees on that. Speaking of less tests or fewer tests, if I have unit and integration tests as well as end-to-end tests, can I just scrap these asks, Elunade, from the chat? Can I just stick with end-to-end tests? Because they are the closest to what the customer actually gets to interact with, right? I'm happy to take that one. In my experience, your end-to-end test is never going to check all edge cases, especially when it comes to interactions between components. If your end-to-end test does catch all edge cases, that's A, very impressive, and B, the suit is probably going to run for hours because it's really hard to figure out all the different combinations of component interactions. Don't scrap the tests, especially if they pass and then do their job, then leave them in. But when it comes to writing new tests, my general thing is I go for more an integration-y kind of test than actual unit tests, because you very rarely just have one component on your screen, right? It's always about components interacting with each other. So I think KenTest is a really pretty testing trophy, which is mostly end-to-end tests and then integration tests and all the stuff that is super weird tests. That's when you do unit tests. Generally, I'm also a very lazy person, so if I can cover all the edge cases with integration tests, why would I write unit tests, right? That's just more code I have to write and more stuff I have to maintain later on. That's fair. But I think the speed aspect is what's important. Sorry. Sorry. Go ahead. Flakiness as well, I think. End-to-end tests do tend to be a little bit flaky sometimes because there are so many different systems at play, right? So going a level lower already helps a lot with that because all of a sudden you're only testing your part of the application rather than also the interaction with seven different backend services. So that can help. And then I actually love unit tests as well, but I use them not as much for React components, but more for, say, all of my different functions that do stuff, like all the library stuff that is just somewhere tucked away, right? For that, unit tests are perfectly suited. All right. Sweet. Ladies and gentlemen, thank you so much for being here. You filled my brain with lots of inputs, and I hope that the audience enjoys this as well, and we try to cover as much ground as possible within 20 minutes. Unfortunately, our slot is coming to an end. Thanks again for being here. Thanks again for taking these questions and discussing this with me, and I hope that you are having a fantastic time, and stay safe and stay healthy, please. Thank you. Awesome. Cheers. Have a great day. Bye.
Fantastic Bugs and Where to Find Them
React Summit 2020React Summit 2020
34 min
Fantastic Bugs and Where to Find Them
Every bug is different: Some are lurking around for months, others appear suddenly after the upgrade of a dependency. Some are introduced us, others other teams or systems. Some are painfully obvious and affect all users, others only occur in edge (cases). And the ways of finding, and eventually, preventing them, are just as diverse: be it snapshot, unit, integration, end to end tests or automated visual tests, every kind comes with its challenges and opportunities. Testing UIs is hard, but in the end, only test automation can give us the confidence we need to move fast and refactor our code relentlessly. In this talk we are going to look at what kinds of bugs there are, which tests are most effective for catching which, and how we can implement them using modern front end technologies.

Test Kitchen: A Recipe for Good Tests
React Summit Remote Edition 2021React Summit Remote Edition 2021
29 min
Test Kitchen: A Recipe for Good Tests
Most of us have heard that tests should be isolated, composable, or deterministic, but what does that mean in practice? How do you write a good test and how does the rest of your codebase change once you do? What effect does it have on your developer experience? In this talk I'll walk through a hand full of properties good tests have, show how we can write tests that follow these guidelines in JavaScript, and discuss when to consider bending the rules a bit.