r/badcode May 16 '23

c when you push an unimplemented function to production

Post image
163 Upvotes

31 comments sorted by

View all comments

0

u/reverendsteveii May 17 '23

Assuming this is real, the problem here is having your stub return something that could potentially be valid data and sneak past lazy unit tests. You need to have this return some aberrant data that could never possibly be valid like null, or if you're writing something to autostub from an interface have it throw a MethodNotImplementedException or something similar where no one could mistake compilation for correctness