What do you do when you don't know how you came to know something? In the field of computer science a lot of times there are things you do that you just acquired during your years of studying in the field. Be it random tutorials you found on the web but of course never wrote the URL down and now you can not find it anymore. Quite probably the website doesn't exist anymore. Be it stuff your professors taught you in their freshman classes but you are pretty sure they did not invent the concept, be it stuff that came up through mere experimentation and it somehow "worked" and years later you find out that actually everyone is doing it that way. You have absolutely no idea how you came to know about stuff, yet now you want to write about you using this knowledge to achieve some goal, for example explain a procedure that you used to acquire some data. In the most common case it would be something like "I read about it on Wikipedia a few years ago." - Wikipedia is not a citable source and the article by now looks nothing like you remember. You can follow the citations in the article in the bottom, but:

It is considered very bad practice to search for literature about something after the fact that you used it in your work. How do you deal with this conundrum of knowing stuff that needs to be explained to someone but having no source you can point to that supports your explanation? The problem isn't knowing stuff, the problem is not knowing where to look for the knowledge you already have.

An important addendum to the problem is: You have never read a textbook about anything. You are 100% sure your personal sources of knowledge do not include reading a citable book.
For purposes of citation in a paper, all you need is some appropriate source where the reader can find the relevant information.  It doesn't have to be the same source from which you originally learned it - indeed, nobody really cares how you originally learned it.

So this comes down to general literature search techniques: check standard textbooks, find other papers that use the fact and check their references, talk to collaborators or other experts in the field, ask on CS Stack Exchange, etc.  If you can find the original paper that introduced the idea, that's ideal, but a textbook that gives a modern presentation is also useful, and you can cite both.

If the fact is "common knowledge" in your field, it may not be necessary to give a citation at all.  Again, if you're not sure whether that applies to this particular fact, you can ask other experts in your field what they think.


  It is considered very bad practice to search for literature about something after the fact that you used it in your work. 


Says who?  Sure, if you're sufficiently well organized, it's nice to find references for all relevant facts as you use them.  But if you're not quite that well organized, or find that this would break up your workflow, I don't see anything wrong with going back to fill in references after the fact.  This is very common.