When coding, how do people make a decision on making a new file, placing classes on one file, or making it a private static attribute of a class.
To be specific, I am working on SortNames class and I created a class that implements a generic. I thought this class is small enough not create a new file, and others classes might use this capability so I decided to make the class within a file. How do others make their decision?
To make the source of a class easy to find, give it a seperate file.
To make it hard to use, put it inside another class.
If I want to show a small, working example of something in a forum, to ask or answer a question, I try to put it into a single file, so it's easy to copy that whole bunch of stuff, put it into a file, compile and see for your own what it does / an error.