HomeAuthor InterviewsInterview with Juntao Qiu

Interview with Juntao Qiu

Juntao Qiu is the author of React Anti-Patterns; we got the chance to sit down and find out more about his experience of writing with Packt.

Q: What is the name of your book?

Juntao: React Anti-Patterns

Q: What are your specialist tech areas?

Juntao: Frontend, React, Refactoring, Test-Driven Development, Design Patterns

Q: How did you become an author for Packt? Tell us about your journey. What was your motivation for writing this book?

Juntao: I already had ideas for writing a book about patterns I’ve observed in React projects of various sizes. When the editor from Packt reached out, I saw it as an excellent opportunity to create a comprehensive guide and share it with my readers. I believe it’s important to recognize code smells, bad patterns, and unnecessary complexities in your application. Being aware of these is the first step before applying changes, like refactoring them into a better state.

Q: What kind of research did you do, and how long did you spend researching before beginning the book?

Juntao: I love writing code and enjoy modifying it or making it easier to change, to adapt to new requirements. I’m proud that even today, most of my time is spent coding, refactoring, identifying patterns in real-world, complex codebases, and improving them. For this particular book, I read a lot, notably Martin Fowler’s Refactoring, Kent Beck’s Implementing Patterns, and my own book, Test-Driven Development with React. I also had numerous conversations with my colleagues at Atlassian. These books and conversations helped me structure the content more effectively and make it more readable.

Q: Did you face any challenges during the writing process? How did you overcome them?

Juntao: Yes, particularly when I was about two-thirds through the book, I got stuck. I didn’t have a suitable example to demonstrate a few patterns. I started with something simple, and halfway through, I realized it might be useful to include another example. But then I found it was too extensive for one chapter. I deleted most of the content and realized it was getting better with the simplified version. Writing, like coding, requires starting small and making incremental changes, one thing at a time, until you get it right.

Q: What’s your take on the technologies discussed in the book? Where do you see these technologies heading in the future?

Juntao: This book primarily focuses on Anti-Patterns in React, or the bad code symptoms you might find in your application. I also tried to apply many established patterns from the software industry, like Single Responsibility Principle, Inversion of Control, and Anti-Corruption Layers, in the React context. I believe these patterns and practices are universal and extremely useful in many other frameworks too.

Q: Why should readers choose this book over others already on the market? How would you differentiate your book from its competition?

Juntao: One major reason I recommend this book is the examples, many of which are from real-world applications. Additionally, I’ve structured the book in an easy-to-follow manner. We start with the fundamentals, gradually move to more advanced topics, and end with several complex, end-to-end examples demonstrating the process of TDD and Refactoring as we apply patterns.

Q: What are the key takeaways you want readers to come away with from the book?

Juntao: You can’t learn programming just by reading books; you need to apply the patterns in your codebase and give them a try. There are many details you’ll uncover when actually coding, sometimes even discovering new patterns or variations, which are all valuable experiences. So don’t just read the book; try to use the patterns and practices, like Test-Driven Development, in your daily work, and see how it goes. Once you’re familiar with the main content, you can use the book as a reference or a dictionary for useful patterns, consulting specific sections when you encounter concrete problems, such as how to use composition or when to extract data models.

Q. What advice would you give to readers jumping into this technology? Do you have any top tips?

Juntao: Learn by doing, try to proactively apply what described in the book in your daily work. Make one small change at a time, and incrementally evolving the codebase..

Q. Do you have a blog that readers can follow?

Juntao: https://juntao.substack.com/

Q: Can you share any blogs, websites, and forums to help readers gain a holistic view of the tech they are learning? What are the key takeaways you want readers to come away with from the book?

Juntao: There are quite a few website I can think of: https://martinfowler.com/, https://tidyfirst.substack.com/, https://kentcdodds.com/blog, https://icodeit.com.au/, https://www.joshwcomeau.com/

Q. How would you describe your author’s journey with Packt? Would you recommend Packt to aspiring authors?

Juntao: Definitely

Q. Do you belong to any tech community groups?

Juntao: I’m writing on my newsletter mainly on https://juntao.substack.com/ and I would like to invite people to join me there.

Q. What are your favorite tech journals? How do you keep yourself up to date on tech?

Juntao: I frequently read articles on Medium, where I am both an author and a reader. I particularly follow Kent C. Dodds and Josh Comeau for frontend topics, as well as Martin Fowler’s website and Thoughtworks Insights for general technical subjects. For me, reading is the most efficient way to systematically gain knowledge. I have a preference for long-form articles, as they allow me to delve deeper and thoughtfully consider the issues at hand.

Q. How did you organize, plan, and prioritize your work and write the book?

Juntao: I use Notion as my primary project management tool. I’ve experimented with various tools but found that Notion best suits my needs. My setup includes a backlog and several columns (todo, in progress, in review, and done), following a standard project management process. The advantage of Notion is its integrated Markdown capabilities, allowing me to write directly in the tool, which is incredibly convenient. That being said, Trello is another tool I find effective. Its ease of use and free availability make it a great option as well.

Q. What is that one writing tip that you found most crucial and would like to share with aspiring authors?

Juntao: As the renowned writing book Bird By Bird suggests, focus on writing one chapter at a time. Start with an example or a topic you’re comfortable with. The key is to complete your first rough draft (remember, no one will see it initially) and then refine it bit by bit. After finishing the first draft, work with your editor to enhance its flow and clarity and to fix common issues. Then, repeat this process for the next chapter. The crucial point here is not to overthink it. Take it one chapter at a time.

Q. Would you like to share your social handles? If so, please share.

Juntao: @JuntaoQiu for twitter, https://www.youtube.com/@icodeit.juntao for YouTube

You can find Juntao’s book on Amazon by following this link: Please click here

React Anti-Patterns on Amazon.com