Tagged Questions
1
vote
2answers
146 views
Programming by Intention, Depth-First or Breadth-First?
Say I have the following graph of dependencies between procedures/functions/methods:
o
/ \
v e
/ \ / \
r f l w
That is, function o first calls function v, and then ...
82
votes
13answers
19k views
Is it OK to split long functions and methods into smaller ones even though they won't be called by anything else? [duplicate]
Lately I've been trying to split long methods into several short ones.
For example: I have a process_url() function which splits URLs into components and then assigns them to some objects via their ...
18
votes
2answers
899 views
Is it a good idea to provide different function signatures that do the same thing?
Here is a C++ class that gets constructed with three values.
class Foo{
//Constructor
Foo(std::string, int, char);
private:
std::string foo;
char bar;
int baz;
};
All of ...