Hacker News new | ask | show | jobs
by alecbenzer 3280 days ago
> I trust the previous author, the test suite and ultimately, the project.

I agree with your first point (functions should abstract some things away), but I disagree here. I feel like this falls into a "let's just not do stupid things" category of stuff that we just can't achieve. If people didn't make mistakes, we wouldn't need tests or monitoring.

I trust people but that doesn't mean I assume everything they do will be flawless. What if you're working on this project and you're debugging an issue where the function's not working right?

Or, what if you want to change how the function works? Pi is admittedly a poor example of this but the general concept is sound I think.

> Programmers seem to fall into two camps. Those that need to know details to understand a method and those that need to know the contract to understand a method.

A user of a software module shouldn't need to know the details of a function, but readability is much more for other engineers working on the codebase than it is for users of the codebase.