DEV Community

Cover image for Learn to Test, Test to Learn
Chelsea Snider
Chelsea Snider

Posted on

Learn to Test, Test to Learn

The past few weeks have been spent studying diligently to learn an unfamiliar stack. I've been taking classes on Angular, Java, Spring Boot and development methodologies. The most intriguing subject I have started to learn is test-driven development, something that I have never used in my work before.

This week, I've been learning Jasmine, and I'm starting to understand how crucial it is to test your components before deciding to use them. I've had arguments over testing at dinner tables with other developers; some saw its value, while others believed that writing components or code blocks twice would reduce their efficiency.

Even though writing tests may be tedious, as a new developer I can see the importance of testing. I don't want to accidentally write bad code and have it pushed to production, or inadvertently be responsible for making bugs and easy mistakes.

There are a lot of nice features about Jasmine as well! I like that it's written in a plain english format. It's easy to understand the tests that you are writing, and plainly stating what is expected of the tests.

The importance of writing tests in order to become a better developer is paramount to my personal journey. As I continue learning and growing, I want to put my best foot forward, lear best practices, and writing the best possible code. Creating clean, error free, and creative code is my ultimate goal.

In closing, I would like to share a quote that I came across while researching test driven development by Kent Beck.

“If you're happy slamming some code together that more or less works and you're happy never looking at the result again, TDD is not for you. TDD rests on a charmingly naïve geekoid assumption that if you write better code, you'll be more successful. TDD helps you to pay attention to the right issues at the right time so you can make your designs cleaner, you can refine your designs as you learn.”
― Kent Beck, Test-Driven Development: By Example

Top comments (1)

Collapse
 
abidullah786 profile image
ABIDULLAH786

🌟 Welcome to the dev.to community, Chelsea Snider! 🌟
It's fantastic to see you joining vibrant community of developers and tech enthusiasts. Feel free to share your insights, ask questions, and connect with fellow devs. If you need any assistance or have questions, don't hesitate to reach out