DEV Community

loading...

Discussion on: The Importance of Slowing (Way!) Down as a Junior Software Engineer

Collapse
dzello profile image
Josh Dzielak ๐Ÿ”†

Great post Alex & congrats on making through your first deep dive into testing this week ๐Ÿ™Œ The "go slow to go fast" mentality is so crucial for learning to code. It takes a lot of patience, as you point out, to dig deeper to verify your understanding of how something works especially when you can complete the story without it. Tests are a powerful tool because they will psychologically keep you from moving forward too fast, given that you write a failing test first when you're not sure how something works and want to explore it. Until the test is green, you won't be tempted to commit or get distracted by something else! "Red, green, refactor" is a mantra I picked up about the same time I started working with Ruby and RSpec and that's another one that's served me very well. Start with the failing test, write code that will make it pass (without caring what it looks like), and then go back and see if the structure of the code can be improved. Because you have a green test, you'll know if your refactoring broke anything.