4 ms·
Adding another bit from experience. About the URL from shapado.com I mentioned above, which had its length capped: If you have to limit the length of the URL (o
by jfr 16y ago
Adding another bit from experience. About the URL from shapado.com I mentioned above, which had its length capped: If you have to limit the length of the URL (or any text string in general), try doing it at word boundaries to reduce the chances of disrupting the meaning of the text. In the title mentioned above, "Source" became "sour".
Think about what happens to "I saw him beating that assassin" if an application decided to cap the string to 26 characters to fit an URL, for example.
Breaking between words reduces the chances of these accidents happening. Sometimes it is not possible (the title is a single big word, or in a language without spaces), in which cases you may want to degrade to the normal slicing.