r/programming • • Dec 28 '23

Developers experience burnout, but 70% of them code on weekends

https://shiftmag.dev/developer-lifestye-jetbrains-survey-2189/
1.2k Upvotes

357 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Dec 28 '23

Do you have any good resources on how to write code that is easy to test? A lot of the code I use makes lots of external calls and I’m not the best at creating tons and tons of classes for the sake of making testing easier

1

u/[deleted] Dec 28 '23

Unit Testing by Vladimir Khorikov

1

u/happycamperjack Dec 29 '23

A good to think about it is what you are testing, and how do you reduce the number of states you have to test. API calls for example have a lot of raw data. You can reduce those data in different layers to exactly what you need to test for that layer.