Daniel Irvine is the author of Mastering React Test-Driven Development, we got the chance to sit down and find out more about his experience of writing with Packt.
Q: What are your specialist tech areas?
Daniel: Test-driven development (TDD) and eXtreme Programming (XP) techniques
Q: How did you become an author for Packt? Tell us about your journey. What was your motivation for writing this book?
Daniel: I was doing a bunch of talks to user groups, trying to convince frontend developers that their lives could be so much easier if they would only write better automated tests.
Q: What kind of research did you do, and how long did you spend researching before beginning the book?
Daniel: My approach to TDD in React is almost a direct copy of how I test-drive Ruby on Rails applications. It’s truly amazing that the technologies are vastly different but TDD techniques work in exactly the same way. I had spent a number of years working for a software consultancy who were one of the world leaders in TDD expertise. The last project I did for them was a joint Ruby and React codebase, and we were writing and test-driving both sides: frontend and backend. We’d been doing that for two years before I started working on the book.
Q: Did you face any challenges during the writing process? How did you overcome them?
Daniel: Oh yes certainly; during the first edition, I faced a major challenge when React underwent serious change between versions 16 and 17 (they introduced hooks in favor of class components). At that time I was about half way through the first draft. I realised pretty quick that I need to scrap everything and start again. I took a few days to compose myself and then just got to work.
Q: What’s your take on the technologies discussed in the book? Where do you see these technologies heading in the future?
Daniel: React is an engrained technology so it won’t be going anywhere anytime soon, even though there are plenty of younger, nimbler competitors. React 18 introduces server-side components which I personally don’t use. Time will tell if they win people over on that, but I’m happy with all the lovely server-side languages we already have: my own personal website runs on Rust, and I am mainly working on Ruby projects these days. The rest of the React platform feels pretty stable at this point. That being said, it’ll be interesting to see what future innovations the React team has in store for us.
Q: Why should readers choose this book over others already on the market? How would you differentiate your book from its competition?
Daniel: You should choose this book because the skills you’ll learn are transferable way beyond React and will help you throughout your whole career. The book uses a “first-principles” approach to teach Test-Driven Development: these techniques aren’t related to any particular framework or library. So they’ll work even when the latest fads have past.
Q: What are the key takeaways you want readers to come away with from the book?
Daniel: There’s a misconception that TDD is about writing “better” software, whatever that means. But TDD isn’t a replacement for good design skills. TDD is simply a workflow. It gives you a structure to your daily work. It’s a social practice because it’s about communicating intent. It’s great for teams who share work on a codebase. And it helps “future you” because the specifications of what your software does (and why it does it) and recorded right there in the code. So you won’t magically be a Rockstar programmer by learning TDD, but you might just be happier, less stressed and more satisfied with your work.
Q. What advice would you give to readers learning tech? Do you have any top tips?
Daniel: Don’t panic. Find a mentor. Work on losing your ego. And always try to build the simplest thing that will solve your problem: don’t overcomplicate.
Q. Do you have a blog that readers can follow?
Daniel: Yes, at danielirvine.com.
Q. Can you share any blogs, websites and forums to help readers gain a holistic view of the tech they are learning?
Daniel: I think dev.to is great because it’s a bunch of really nice people sharing their experiences. And my own blog, ReactTDD.com, has a lot of writing that didn’t make the final cut for the book.
Q. How would you describe your author’s journey with Packt? Would you recommend Packt to aspiring authors?
Daniel: Packt are great because they set a schedule and make sure you stick to it! Exactly what I needed.
Q. Do you belong to any tech community groups?
Daniel: I’m still finding my feet again after the pandemic, but I used to attend a lot of events in the Software Craft community, like the Socrates unconferences. They are a great way to meet down-to-Earth folks who just want to write better software.
Q. What are your favorite tech journals? How do you keep yourself up to date on tech?
Daniel: I am a bit old school. I use an RSS reader and follow a bunch of blogs.
Q. Would you like to share your social handles? If so, please share.
Daniel: Twitter: danielirvine, GitHub: dirv
You can find Daniel’s book on Amazon by following this link: Please click here