Dec. 19, 2020, 1:15 a.m.

scrapheap.txt

Known Unknowns

What do you do when you have to remember some bit of information that used a couple of weeks ago?

For me, remembering a quick snippet of code, a URL, or a database query that I used to accomplish a temporary task is nearly impossible.

But retrieving that information again has come in handy time and time again. To solve that, I created a file on my computer desktop.

I call it scrapheap.txt.

It is a daily running log containing bits of information that I may need to reference again.

Every day I open up the file and create a new header for the day. Something like this:

/* *********************************************** */
/* 2020-12-19                                      */
/* *********************************************** */

In fact, I have that little comment block in my Autohokey script so that I can type /*-*/ and it automatically creates the block and populates the current date.

As I go through my day, I’ll add all those bits of stuff to the file.

Down the road, Future John is thankful, because he can search the file and find what he needs based on a search term or two.

Some thoughts:

  • This file has been a huge help for SQL queries. In that case I might name the file scrapheap.sql so that it opens in the correct IDE (Microsoft SQL Server Manager, for example).
  • When I did a lot of queries for specific clients in a production environment, I created a separate file for each client. (e.g. Acme.sql and BigCo.sql). That way I could create variables for the CustomerID in each file and quickly query without having to look up those values each time.
  • The most difficult part is remembering to add bits to the file; especially links. More than once I’ve forgotten to add an interesting (but seemingly unimportant URL) and can’t find it again later. Even searching through a browser history seems to end up in dead ends more often than not.

Scrapheap.txt makes for a great knowledge base and history of things I’ve done in a quick, searchable format.

You just read issue #23 of Known Unknowns. You can also browse the full archives of this newsletter.

This email brought to you by Buttondown, the easiest way to start and grow your newsletter.