Software Engineering Tidbits

Share this post

Fix a bug / Write a unit test

www.softwareengineeringtidbits.com

Discover more from Software Engineering Tidbits

Small (or sometimes big) tidbits about software engineering. This is where I share tips and learnings I acquired building, maintaining and supporting software in production at Airbnb, Uber and Microsoft.
Over 6,000 subscribers
Continue reading
Sign in

Fix a bug / Write a unit test

Georges El Khoury
Nov 27, 2022
6
Share this post

Fix a bug / Write a unit test

www.softwareengineeringtidbits.com
1
Share

One solid practice to have while coding is to fix a bug and at the same time write a unit test that would have uncovered it.

It is a sign of solid experience in software engineering.

The direct benefits are to avoid regressions for this bug, to ensure the fix is correct and to increase code coverage and the reliability of the test suite.

The indirect one is to promote a culture of quality and reliance on unit testing in the engineering team.


Mastering Software Engineering Course on Maven

If you liked this article, I will be teaching a “Mastering Software Engineering” course on Maven where I will teach hard-learned lessons I acquired developing large-scale products at companies such as Uber, Airbnb, and Microsoft.

View Course


Thanks for reading Software Engineering Tidbits! Subscribe for free to receive new posts and support my work.

6
Share this post

Fix a bug / Write a unit test

www.softwareengineeringtidbits.com
1
Share
1 Comment
Share this discussion

Fix a bug / Write a unit test

www.softwareengineeringtidbits.com
Davi Gray
Writes Davi Gray's Writing News
May 7

Usually I write the unit test first, to make sure it actually finds the bug, then fix it. (Which is probably how you mean this, but clarity is good.)

Red-to-green feels so nice!

Expand full comment
Reply
Share
Top
New
Community

No posts

Ready for more?

© 2023 Georges El Khoury
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing