-9

I've tagged this as a feature request, but I'm not sure if there is already an accepted way to do this.

I often find solutions to problems which I record somewhere and then later lose.

  • Simple example: I may have a few C files that I want to build either as an executable or shared library. I may link in some libraries and header files along with a list of optimization flags. It's too simple to bother with a makefile. I might record this in a notebook with some notes on what the flags do and the differences between making an executable or shared library. It's more likely that I will put this in a comment at the top of the main C file. Then I can edit it as needed or copy/paste when I have another similar project. When I take notes, I can be fairly certain within six months, I'll never find those notes again. If I put it in a file, it's more likely I'll be able to find it, but after a few years, there's a good chance I'll forget that file even exists.

  • More significant example where I've answered my own question, and I would like to record it so that I can find it anytime, anywhere, forever. Suppose, hypothetically, I want to have some basic understanding of the method resolution order in Python 3. Maybe I can't find any documentation. Maybe there's too much documentation, or it's too abstract and there are no examples. In any case, I write a little test program that demonstrates how the MRO works in the few cases I actually care about. I put in some comments with an explanation and links to any documentation. Then I file it away for future reference.

Now the biggest problem is if I change jobs and that test code which neatly explains exactly what I want to know is permanently lost. In fact, since this has happened to me a few times, I no longer even bother trying to be rigorous about it. I just redo the test every time it comes up.

The regular Stack Overflow forum is obviously not the right place for this since I already know what I need to know, and the content may be very specific or simply for my own convenience rather than adding to the body of programming knowledge. The new documentation feature does not make sense either. I'm not interested in spending a lot of time trying to explain something I barely understand myself. The goal is to get a working understanding, make a note of it for future reference, and move on to the real task. Nevertheless, now that SO is the place we all go to get programming related answers, it seems this would be the right place for this type of content.

I would like to have the option for my notes and experiments to be either public or private. I usually wouldn't mind others either commenting or editing my errors.

6
  • 9
    I use github for that.
    – user4639281
    Commented Dec 1, 2016 at 18:49
  • 1
    The hub of the git, yes.
    – user1228
    Commented Dec 1, 2016 at 18:50
  • I haven't used github. I thought it was a site for doing development, but I will look into it.
    – Todd
    Commented Dec 1, 2016 at 18:54
  • 2
    Check out gist.github.com while you're at it.
    – ivarni
    Commented Dec 1, 2016 at 21:00
  • @ivarni: I wasn't really asking a question. In any case, this is the most useful answer to me. If you fill in a few more details about what it's for, how to use it, why it makes more sense there than on SO, and make an actual answer, I will accept it. I was planning to delete this post since it was not well received but was warned not to. So please take advantage of the situation.
    – Todd
    Commented Dec 2, 2016 at 14:22
  • 1
    @Todd I'm happy that you found my comment useful, but I don't have time right now to post a proper answer. You can self-answer it if you want. At the end of the day, votes on meta doesn't really matter at all and the downvotes you got are most likely from people who simply believe that SO doesn't need a feature like that. It's not something you should take to heart or delete the question over. It's simply the community saying "we don't think the site needs a feature like that".
    – ivarni
    Commented Dec 2, 2016 at 18:16

2 Answers 2

19

If your problems can be shaped into good, on-topic questions that have no duplicates here, you can post them and their solutions as self-answered questions. If you don't want to submit them to such constraints, but still think they can be useful to other people, something like a GitHub repository would be a much better suited venue.

Nevertheless, now that SO is the place we all go to get programming related answers, it seems this would be the right place for this type of content.

The premise doesn't hold. There are many kinds of programming related content that do not, and should not, belong to Stack Overflow, and many useful places elsewhere on the Internet that offer them.

1

If you ever find something clever or useful that isn't covered on SO, then please either write and self-answer a question on SO, or help improve/generalize an existing question or answer (many of us have been doing this for years):

  1. Abstract the example, names etc., abstract or generalize away unnecessary detail to the absolute minimum. Never post your employer's code (unless it's been released as open-source, and even then posting it may be unnecessary detail anyway)
  2. If it was something you developed on your own time, equipment and data, and not employer-related, a private github is useful. If you're not legally clean to save the code you wrote, then next best thing is to write some succinct notes and save those. But really you should typically be able to do 1.
  3. Ultimately a good way to work such that you can release clever code you find is to try to persuade your employer to use open-source frameworks (MIT license, at least). And try to deal with OSS-friendly employers. Or release your own package, esp. when between jobs.
  4. Giving internal talks or starting an internal user-group is a good practice for promulgating knowledge.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .