What makes a good function or method? I don't think it's a single thing but a combination of things where each is significant. If one the things is flawed it affects to all others and the whole function is flawed. So what are those "things"? Have a meaningful name Function should have a name that describes it's purpose or functionality. When a function has a meaningful name it's easy to read and understand what's it's purpose. Let's take a example. If function's purpose is to find a customer by it's id a good name could be findCustomerById(id: String) or it could just as well be just findCustomer(id: String) because the function signature implies that the customer is found by it's id the word find also implies that the customer might be found or it might not be found. If the function's name would be changed to getCustomer(id: String) it's meaning changes because now it implies that there's no fallback, the customer is e
My thoughts and experiences of software development