Zettelkasten Forum


The Two Forms of a Zettel


imageThe Two Forms of a Zettel

The Zettelkasten note-taking method has made book writing and writing scientific papers easy for hundreds of years already.

Read the full story here


Comments

  • edited May 2020

    "Do you have a unique identifier for each note? How do you guarantee its uniqueness?"

    Use large numbers, it will provide uniqueness for free. Pick a random identifier from a gigantic pool of identifiers 😃.

    Also, I think timestamp are a bad idea for note identifiers. They could be unique, but they could also not be if you share notes (collaborative database of notes). I think using timestamp as identifiers could prevent you from sharing notes in the future, so even if you don't plan on sharing notes, just in case don't use timestamps.

    Large numbers do not guarantee uniqueness in the semantic way, but it does in practice. You only need to decide how big your identifiers should be to make sure the probability of collision is low enough to protect your notes.

    For example, say you and your 10 billions friends plan on writing notes together. You all are very productive and produce 10 notes a day for your whole life. Let's imagine you all are "lucky", you'll live 200 years. That's a total of 10 x 10^9 x 10 x 200 x 365 = 73 x 10^14 notes. Round this to 10^16 notes. What ID size do we need for our notes?

    Let's start with existing solutions, UUID4 for example, this universal unique identifiers use 122 random bits, that's a total of 2^122 different identifiers. We can now compute the probability of having a single collision (2 notes sharing the same "unique" ID).

    This gives a probability around 9.4 x 10^-6, that’s 0.00094% chance of this happening. I think its more likely any of the collaborator will try to destroy your whole database anyway 🤭.

    More seriously it means that even in this very optimistic scenario, it's quite unlikely that any collision occurs. That sounds pretty safe to me.
    Now the question is, how do we generate random (uniformly chosen) numbers. That’s a pretty tough job, but we are quite good at this, it’s not perfect so you won’t have this exact probability of collision, but close enough.

    Generate a uuid4.

  • If you collaborate you can just add a letter in front of the ID. Problem is then solved (Christian and I did this when we did some experiments).

    The time stamp has more benefits than just uniqueness.

    I am a Zettler

  • I like timestamp as a UID for Zettels, but I would want to put a timezone indicator in there to avoid the risk of duplicates if you are travelling and making notes from a different longitude.

  • edited October 2021

    @Dunx said:
    I like timestamp as a UID for Zettels, but I would want to put a timezone indicator in there to avoid the risk of duplicates if you are travelling and making notes from a different longitude.

    Dang. This is an edge case I never thought about! Thanks.

    I think The Archive has some protection against duplicates for convenience but I'd rather have the protection in the method and not in the software.

    I am a Zettler

  • By the way -- To test the ID creation for time zone changes, I once added a time zone override to The Archive. It's accessible as a hidden preference: https://zettelkasten.de/the-archive/help/#hidden-preferences

    This way one can also opt in to "fix" the app's time zone to wherever home is and have consistent IDs, which is what I'd probably do with all timestamp macros on my computer if I traveled more and had 1 home base that I consider to be the canonical source of truth for the clock :)

    Author at Zettelkasten.de • https://christiantietze.de/

Sign In or Register to comment.