<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>documentation &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/documentation/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Tue, 29 Apr 2025 08:05:10 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>documentation &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[A small contribution to curl]]></title>
		<link>https://shkspr.mobi/blog/2025/02/a-small-contribution-to-curl/</link>
					<comments>https://shkspr.mobi/blog/2025/02/a-small-contribution-to-curl/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Tue, 11 Feb 2025 12:34:13 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Open Source]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=58048</guid>

					<description><![CDATA[The venerable curl is one of the most fundamental pieces of code in the modern world.  A seemingly simply utility - it enables other programs to interact with URls - it runs on millions of cars, is inside nearly every TV, used by billions of people, and is even in use on Mars.  And, as of last week, features a small contribution by me!  Look, I&#039;m not an experienced bit-twiddler. I can&#039;t…]]></description>
										<content:encoded><![CDATA[<p>The venerable <a href="https://curl.se/">curl</a> is one of the most fundamental pieces of code in the modern world.  A seemingly simply utility - it enables other programs to interact with URls - it runs on <a href="https://daniel.haxx.se/blog/2018/08/12/a-hundred-million-cars-run-curl/">millions of cars</a>, is inside nearly every TV, used by <a href="https://daniel.haxx.se/blog/2021/04/22/so-what-exactly-is-curl/">billions of people</a>, and is even <a href="https://daniel.haxx.se/blog/2021/04/19/mars-2020-helicopter-contributor/">in use on Mars</a>.</p>

<p>And, as of last week, features a small contribution by me!</p>

<p>Look, I'm not an experienced bit-twiddler. I can't micro-optimise algorithms or spot intricate C-based memory leaks. What I <em>can</em> do is get annoyed at poor documentation!</p>

<p>You see, documentation and code comments are vitally important. Poor spelling might trip up non-native speakers, bad examples confuse learners, and ambiguous wording is a barrier to understanding.</p>

<p>As was written by the sages:</p>

<blockquote><p>a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, <strong>programs must be written for people to read, and only incidentally for machines to execute</strong>.
<cite>Abelson, Sussman, and Sussman <a href="https://web.mit.edu/6.001/6.037/sicp.pdf">Structure and Interpretation of Computer Programs</a></cite></p></blockquote>

<p>So, what did I fix? A few years ago, I noticed <a href="https://shkspr.mobi/blog/2020/01/even-google-forgets-to-renew-its-domains/">Google's documentation used example domains it didn't control</a>. The same thing was happening in the curl source code.</p>

<p>One example domain used was <code>"HTTPS://your.favourite.ssl.site"</code> - when that code was written 23 years ago, the .site TLD didn't exist. <a href="https://radix.website/dot-site">Now it does</a>.</p>

<p>Is there a serious risk that someone will register <code>ssl.site</code> and use it to take over the machine of anyone who unthinkingly follows that example? Probably not. But it also isn't terribly clear that it <em>is</em> an example. So I changed it to <code>secure.site.example</code> which uses the reserved <a href="https://en.wikipedia.org/wiki/.example"><code>.example</code></a> TLD.</p>

<p>That should make it clear to everyone that it is a placeholder example and will prevent anyone from misusing that domain.</p>

<p>Similarly, there were a few comments which used <code>domain.com</code> as an example. However, <a href="https://www.domain.com/">that's a real website</a> - so I updated those to <a href="https://example.com"><code>example.com</code></a>.</p>

<p>I was <em>delighted</em> to see the changes accepted.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/02/curl-fs8.png" alt="daniel stenberg saying &quot;Welcome Terence Eden as #curl commit author 1342&quot;" width="1328" height="988" class="aligncenter size-full wp-image-58050">

<p>And I was only <em>slightly</em> disappointed to have narrowly missed out on being <a href="https://daniel.haxx.se/blog/2025/01/29/a-1337-curl-author/">contributor 1337</a>, but being number 1342 ain't so bad 😄</p>

<p>You can <a href="https://github.com/curl/curl/pull/16270/files">see the full list of changes on GitHub</a>.</p>

<p>Much like my <a href="https://lkml.org/lkml/2014/11/17/617">patch to the Linux Kernel</a> this might be considered a <a href="https://shkspr.mobi/blog/2014/04/submitting-trivial-linux-kernel-patches/">trivial matter</a> - but I honestly believe that clear and accurate documentation can be as important as the code itself.</p>

<p>Huge thanks to Daniel for creating curl, for making such a welcoming environment for new contributors, and for handing out such brilliant stickers at FOSDEM!</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/02/laptop-stickers.webp" alt="A laptop covered with stickers - prominent is curl." width="1024" height="768" class="aligncenter size-full wp-image-58150">
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=58048&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2025/02/a-small-contribution-to-curl/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Do That After This]]></title>
		<link>https://shkspr.mobi/blog/2024/04/do-that-after-this/</link>
					<comments>https://shkspr.mobi/blog/2024/04/do-that-after-this/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 29 Apr 2024 11:34:00 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[language]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=50321</guid>

					<description><![CDATA[I was building some flatpack furniture the other day (my life is so glamorous) when I came across an interesting example of how not to write technical documentation.  Drill a hole in part A and insert part B once you have ensured part C has been aligned after its connection to A.  Most people can handle reading a whole sentence to figure out what&#039;s going on.  But, after a tiring day of building,…]]></description>
										<content:encoded><![CDATA[<p>I was building some flatpack furniture the other day (my life is <em>so</em> glamorous) when I came across an interesting example of how <em>not</em> to write technical documentation.</p>

<blockquote><p>Drill a hole in part A and insert part B once you have ensured part C has been aligned after its connection to A.</p></blockquote>

<p>Most people can handle reading a whole sentence to figure out what's going on.  But, after a tiring day of building, it is somewhat annoying having to juggle instructions into actions.</p>

<p>Most readers will assume that instructions are written in linear time. Do this, then that. But that example is <em>non-linear</em>. What it is trying to say is:</p>

<blockquote><p>Connect part C with part A. Then align part C and part A. Then drill the hole in part A. Then insert part B into part A.</p></blockquote>

<p>It is slightly less interesting writing. But it presents all the actions <em>in the order they need to be taken</em>.</p>

<p>I see this temporally-mixed anti-pattern all the time. A typical example of this in technical documentation is:</p>

<blockquote><p>Select Print from the File menu.</p></blockquote>

<p>A simpler, clearer, and less ambiguous way of writing that is:</p>

<blockquote><p>Open the File menu. Select Print.</p></blockquote>

<p>Another similar example of confusing writing is:</p>

<blockquote><p>Go to File → Print → Settings if you need to change the paper size.</p></blockquote>

<p>Again, this places cognitive burden on the reader. If they want to understand if the instruction is relevant to them, they have to read the entire sentence.  When faced with dozens of sentences, this can become confusing.  The solution is:</p>

<blockquote><p>If you want to do X, then do Y...</p></blockquote>

<p>Immediately the reader knows that they can skip this sentence because they <em>don't</em> want to do X.</p>

<p>As technical writers, we sometimes want to craft eloquent prose. We long for glorious and intricate sentences. We tire of the monotony of linear writing.</p>

<p>Tough.  We need to get over ourselves.  Go write that epic fantasy novel you've been thinking about.  The job of a technical writer isn't to entertain, enliven, or delight the reader. The job is to give them instructions in an easy to follow format, reducing the amount of cognitive burden they have, and making it quick to find the information they need.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=50321&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2024/04/do-that-after-this/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Discord is not Documentation]]></title>
		<link>https://shkspr.mobi/blog/2023/07/discord-is-not-documentation/</link>
					<comments>https://shkspr.mobi/blog/2023/07/discord-is-not-documentation/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 16 Jul 2023 11:34:04 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[watchy]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=46240</guid>

					<description><![CDATA[I&#039;m going to be slightly contrarian and say that I like Discord. It&#039;s great to be able to get real-time help on a problem. And it is fun to see, again in real-time, what other people are working on and struggling with.  In truth, Discord is no harder to sign up to than Slack, Matrix, Gitter, IRC, or whatever. And of course Open Source projects will follow the maxim of &#34;go where your audience…]]></description>
										<content:encoded><![CDATA[<p>I'm going to be slightly contrarian and say that I <em>like</em> Discord. It's great to be able to get real-time help on a problem. And it is fun to see, again in real-time, what other people are working on and struggling with.</p>

<p>In truth, Discord is no harder to sign up to than Slack, Matrix, Gitter, IRC, or whatever. And of course Open Source projects will follow the maxim of "go where your audience are". There's no point posting everything to MySpace when everyone's already on Facebook.</p>

<p>Do I care that Discord isn't open source? Well, kinda. But I can open it in Firefox and it works just fine.</p>

<p>Discord is perfect for <em>ephemeral</em> communications.</p>

<p>But it is not a fucking substitute for documentation!</p>

<p>I'm currently getting started, and increasingly frustrated, with the <a href="https://watchy.sqfmi.com/">Watchy</a> development platform. They've effectively said "here's a barebones guide to setting it up - anything else, ask on Discord" - and it fucking sucks.</p>

<p>There's no API documentation - I have to scroll through a million messages to find anything.</p>

<p>I can't use search, because people don't know how to thread. So I can see questions but not replies.</p>

<p>When I do find replies, it's hard to know how relevant they are.  A typical Discord chat looks like:</p>

<ul>
<li>Alice: What's the command to go fullscreen?</li>
<li>Bob: Anyone know how I irrevocably format my disk without confirmation?</li>
<li>Carol: Oh, yeah, it's easy. Just pass the <code>-f</code> flag.</li>
</ul>

<p>Errrr...</p>

<p>And then you get the people who get snippy with newbie for asking a question which is frequently seen!  So infuriating.</p>

<p>I'm not necessarily advocating for <a href="https://documentation.divio.com/">the Four-Document Model</a> - which has <a href="https://www.hillelwayne.com/post/problems-with-the-4doc-model/">some critics</a> - but I just don't understand why wouldn't at least collate all of the common questions and put the answers in one place.</p>

<p>Look, writing a FAQ is probably not the right way to approach comprehensive documentation. But if you can't even be bothered to do that, perhaps you shouldn't be releasing a product in the first place?</p>

<p>/rant</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=46240&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/07/discord-is-not-documentation/feed/</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Can you follow your own getting started guide?]]></title>
		<link>https://shkspr.mobi/blog/2023/06/can-you-follow-your-own-getting-started-guide/</link>
					<comments>https://shkspr.mobi/blog/2023/06/can-you-follow-your-own-getting-started-guide/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 07 Jun 2023 11:34:55 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Open Source]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=45808</guid>

					<description><![CDATA[I was trying to install a new open source project and was having a hell of a time. Nothing seemed to be working despite me following the tutorial to the letter. I was getting the most bizarre error messages and was on the verge of quitting to become a goat farmer, when I threw one last dice... I read the tutorial.  Previously I&#039;d been copying and pasting the instructions as I went.  One step said …]]></description>
										<content:encoded><![CDATA[<p>I was trying to install a new open source project and was having a <em>hell</em> of a time. Nothing seemed to be working despite me following the tutorial to the letter. I was getting the most bizarre error messages and was on the verge of quitting to become a goat farmer, when I threw one last dice... I <em>read</em> the tutorial.</p>

<p>Previously I'd been copying and pasting the instructions as I went.  One step said "Make sure the bauxite configuration command is set to true" but the code provided said <code>./configure --magic M --more-magic QxZp --bauxite false --turnip green -z</code></p>

<p>And there is was! I changed a false to a true and everything started working.  Being the good netizen that I am, I sent a pull request to fix the documentation.</p>

<p>And then it struck me.</p>

<p>There's no CI/CD for documentation.</p>

<p>Oh, don't get me wrong. Things like OpenAPI can auto-generate documentation based on your code - but it can't write a "getting started" tutorial.</p>

<p>Looking back through the documentaion I'd encountered, it was clear that the tutorial had been wrong for a few years. It was a small project, so it wasn't hugely surprising that hordes of users hadn't complained. But, to me, it points to a general problem. I find this issue <em>all the bloody time!</em>  Whether it is a big established project or a little indie gadget - I follow a tutorial only to find out it is missing a step, or assumes I have a library installed, or hasn't been updated for the latest version.</p>

<p>This is my plea to all developers. Spin up a fresh machine - without anything installed other than the base OS - and see if you can follow your own tutorial.</p>

<p>If you can't, rewrite it <em>step-by-step</em> until it works.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=45808&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/06/can-you-follow-your-own-getting-started-guide/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Everything you know about Twitter character counting is wrong]]></title>
		<link>https://shkspr.mobi/blog/2020/03/everything-you-know-about-twitter-character-counting-is-wrong/</link>
					<comments>https://shkspr.mobi/blog/2020/03/everything-you-know-about-twitter-character-counting-is-wrong/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 12 Mar 2020 12:31:04 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=34316</guid>

					<description><![CDATA[How many characters can a Tweet contain? It used to be 140, back in the good old days. Now it&#039;s 280. Unless you&#039;re Japanese.  Let me explain…  I run OpenBenches - a site which collects memorial benches. When a user adds a bench, the inscription is automatically Tweeted.  If the inscription is longer than 280 characters, it is truncated.  The PHP code to truncate text to a specific length is p…]]></description>
										<content:encoded><![CDATA[<p>How many characters can a Tweet contain? It used to be 140, back in the good old days. Now it's 280. Unless you're Japanese.  Let me explain…</p>

<p>I run OpenBenches - a site which collects memorial benches. When a user adds a bench, the inscription is automatically Tweeted.  If the inscription is longer than 280 characters, it is truncated.</p>

<p>The PHP code to truncate text to a specific length is pretty simple:</p>

<pre><code class="language-php">$tweet_inscription = mb_substr($inscription, 0, 280);
</code></pre>

<p>I use <a href="https://www.php.net/manual/en/intro.mbstring.php">Multibyte String</a> operations, because a single character can take up more than one byte. Especially if the text contains characters outside of the "Latin" range.</p>

<p>But this is not sufficient for Twitter.</p>

<p>My friend, Beck Strickland, recently added some gorgeous photographs of <a href="https://openbenches.org/location/Japan/Hiroshima">benches in Hiroshima, Japan</a>. The inscriptions were pretty long, and were <em>not</em> being Tweeted.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/02/Open-Benches-Japanese-fs8.png" alt="A large block of Japanese text." width="480" height="771" class="aligncenter size-full wp-image-34317">

<p>The error I was getting back from Twitter was "186: Tweet needs to be a bit shorter."</p>

<p>Here's the Japanese text:</p>

<blockquote><p>まち
を 緑でい っ ぱ
い に
!
広島ゾンタクラブ 医療法人あさだ会 有設計工房岩重老沼薬品 広島市立山田小学校広島県立皆実高校 小田耳鼻咽喉科医院 翠清会梶川病院 広島大学総合科学部
片桐眼科 広島歯科医院 しいのレディースクリニック 石橋三千男事務所 Akemi Engish School 高橋内科小児科 広島総合病院 川村,大迫法律事務所 (株)山本薬品
㈲)メディカルサービス 老人保険施設ベルローゼ スタッフ·トゥー·ワン 原田病院 広島大学医学部 ひろしま通訳·ガイド協会 有森信パーキングビル (株)幸房</p></blockquote>

<p>Go paste that into any character counter. Even after newlines, it's a heck of a lot less than 280. But Twitter disagrees!</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2020/02/Japanese-text-in-Twitter-fs8.png" alt="Japanese text pasted into the Twitter compose window. It is showing that there are too many characters." width="600" height="403" class="aligncenter size-full wp-image-34319">

<h2 id="what-this-problem-is-not"><a href="https://shkspr.mobi/blog/2020/03/everything-you-know-about-twitter-character-counting-is-wrong/#what-this-problem-is-not">What this problem is <em>not</em></a></h2>

<p>I wasted a lot of time looking at esoteric Unicode Normalisation Forms as directed by the <a href="https://developer.twitter.com/en/docs/basics/counting-characters">Twitter documentation on Counting Characters</a>.</p>

<blockquote><p>Tweet length is measured by the number of codepoints in the NFC normalized version of the text.</p></blockquote>

<p>That wasn't the answer.</p>

<p>The documentation did point to a page about the <a href="https://developer.twitter.com/en/docs/developer-utilities/twitter-text">Twitter Text Parsing Library</a>. Which, helpfully, has this to say on the matter:</p>

<blockquote><p>The Configuration defines Unicode code point ranges, with a weight associated with each of these ranges. <strong>This enables language density to be taken into consideration when counting characters.</strong></p></blockquote>

<p>Aha! Japanese is a fairly dense language. The English word <code>Monday</code> has six characters, the Japanese translation <code>月曜</code> has two.</p>

<p>When <a href="https://blog.twitter.com/en_us/topics/product/2017/Giving-you-more-characters-to-express-yourself.html">Twitter announced the increase to 280 characters</a> they published a blog post saying:</p>

<blockquote><p>We want every person around the world to easily express themselves on Twitter, so we're doing something new: we're going to try out a longer limit, 280 characters, in languages impacted by cramming (<strong>which is all except Japanese, Chinese, and Korean</strong>).</p></blockquote>

<p><a href="https://web.archive.org/web/20181109034213/https://heroeswiki.com/Yatta!">やった!</a></p>

<h2 id="loving-the-algorithm"><a href="https://shkspr.mobi/blog/2020/03/everything-you-know-about-twitter-character-counting-is-wrong/#loving-the-algorithm">Loving the algorithm</a></h2>

<p>When I first wrote this post, there was nothing that I could find in the official Twitter Developer Documentation which explained how these weights are calculated. Aside from the above blog post, I couldn't find anything which explained that CJK characters are counted differently.</p>

<p>The <a href="https://github.com/twitter/twitter-text">Twitter Text library</a> is open source, but doesn't explicitly spell out how the weightings are calculated.  There are implementations in Ruby, JS, Objective C, and Java. Thankfully, <a href="https://github.com/nojimage/twitter-text-php/">Takashi Nojima maintains a PHP version</a>.</p>

<p>Because Tweets can contain a mixture of languages, Twitter has developed a "Weighted Length" algorithm. For example "<code>石橋三千男事務所 Akemi Engish School</code>" looks to have 28 characters but, because some of them are in a higher density script, Twitter gives a weightedLength of 36.</p>

<p>This makes truncating Tweets automatically somewhat difficult!</p>

<pre><code class="language-_">10 Is weightedLength less than 280?
20 Yes - Tweet it.
30 No - remove one character from the end.
40 GOTO 10
</code></pre>

<p>OK, it isn't <em>quite</em> that bad. The PHP implementation lets you find the valid length of the string using:</p>

<pre><code class="language-php">$data = \Twitter\Text\Parser::create()-&amp;gt;parseTweet($tweet_inscription);
echo $data-&amp;gt;validRangeEnd;
</code></pre>

<h2 id="is-everything-you-know-about-twitter-character-counting-wrong"><a href="https://shkspr.mobi/blog/2020/03/everything-you-know-about-twitter-character-counting-is-wrong/#is-everything-you-know-about-twitter-character-counting-wrong">Is everything you know about Twitter character counting wrong?</a></h2>

<p>An inflammatory clickbait title? I don't think so. There was <em>literally</em> no way of knowing how the character count algorithm works from reading the developer documentation.</p>

<p>How do you count the characters in an emoji? Do you count the skin tone and gender modifiers separately? Again, the developer documentation didn't say anything.</p>

<p>Developer documentation is essential. And it needs to be kept up to date with the latest changes. 
I'm friends with some of the folk on the Twitter Developer Team (with friends like this, right?!) and <a href="https://github.com/twitter/twitter-text/issues/303">I shared my concerns with them</a>.</p>

<p>Since writing this post, I've been working with them to improve the developer documentation. <a href="https://web.archive.org/web/20200311200322/https://twitter.com/andypiper/status/1237809704325259264">I'm happy to say that the documentation now reflects reality</a>.</p>

<p>The <a href="https://developer.twitter.com/en/docs/basics/counting-characters">counting characters page</a> now explains how to count CJK characters and complex emoji. Enjoy!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=34316&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/03/everything-you-know-about-twitter-character-counting-is-wrong/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Hashtags and Implicit Knowledge]]></title>
		<link>https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/</link>
					<comments>https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 24 Feb 2010 16:58:27 +0000</pubDate>
				<category><![CDATA[usability]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[dabr]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[hashtags]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=1706</guid>

					<description><![CDATA[What is &#34;Implicit Knowledge&#34;?  Essentially it&#039;s stuff that everyone knows, but no one has written down.  Usually it&#039;s something that people have worked out through their own experiences.  This sort of knowledge is common in life - but is fatal in computing and design.  Take the following tweet I received.                                                          Mark Hawkins                        …]]></description>
										<content:encoded><![CDATA[<p>What is "Implicit Knowledge"?  Essentially it's stuff that everyone knows, but no one has written down.  Usually it's something that people have worked out through their own experiences.</p>

<p>This sort of knowledge is common in life - but is fatal in computing and design.  Take the following tweet I received.</p>

<blockquote class="social-embed" id="social-embed-9582463562" lang="">        <header class="social-embed-header">        <a href="https://twitter.com/Mawkins" class="social-embed-user">            <img class="social-embed-avatar social-embed-avatar-circle" src="data:image/webp;base64,UklGRj4BAABXRUJQVlA4IDIBAACwCACdASowADAAPrVQnksnJKKhpy7Y4BaJaQAOhlZvKiBqWlTYfwY+/LT+Lr5GJ/LTTHAXHYvchgLKHbRDRdOqggYmnAPtwwh0GxPZnwAA/v4S5nB6XBake6jr/oaDTDP110md+xvy6nksvzgV20eOUH6fpGTw4t3wpALwpA5aKpsOwfGzu10bRgYjZZUnbxXbVLI9m2/ANnDtVW+VJzoAzv9rszKR6KcCdNq1hoAkc5QfsfonHp8FpBy9g2AewNUVW8wvUI+ektZlY5690ryOfeTPUkAqRlOakdEUKMz7oRL2oPvRphgw47TMfV77XcPgWjz4aReffwKrJhby4swi8nMhQWo8typProOSYoZ9UrhZ/Nz9pNVJXu/On60EPpAT6yfxkJfBqvPC1EjksYAAAAA=" alt="">            <div class="social-embed-user-names">                <p class="social-embed-user-names-name">Mark Hawkins                </p>                @Mawkins            </div>        </a>        <img class="social-embed-logo" alt="Twitter" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0Aaria-label%3D%22Twitter%22%20role%3D%22img%22%0AviewBox%3D%220%200%20512%20512%22%3E%3Cpath%0Ad%3D%22m0%200H512V512H0%22%0Afill%3D%22%23fff%22%2F%3E%3Cpath%20fill%3D%22%231d9bf0%22%20d%3D%22m458%20140q-23%2010-45%2012%2025-15%2034-43-24%2014-50%2019a79%2079%200%2000-135%2072q-101-7-163-83a80%2080%200%200024%20106q-17%200-36-10s-3%2062%2064%2079q-19%205-36%201s15%2053%2074%2055q-50%2040-117%2033a224%20224%200%2000346-200q23-16%2040-41%22%2F%3E%3C%2Fsvg%3E">    </header>    <section class="social-embed-text">                    <small class="social-embed-reply"><a href="https://twitter.com/edent/status/9581804744">Replying to @edent</a></small>                <a href="https://twitter.com/edent">@edent</a> <a href="https://twitter.com/dabr">@dabr</a> you folks aware ampersands / &amp;s don't seem to work as part of hashtag links?                            </section>    <hr class="social-embed-hr">    <footer class="social-embed-footer">        <a href="">            <span aria-label="0 likes" class="social-embed-meta">❤️ 0</span>            <span aria-label="0 replies" class="social-embed-meta">💬 0</span>            <span aria-label="0 reposts" class="social-embed-meta">🔁 0</span>            <time datetime="{tweet_date}">16:27 - Wed 24 February 2010</time>        </a>    </footer></blockquote>

<p>The complaint was that #tfm&amp;a should be rendered as <span style="text-decoration: underline;">#tfm&amp;a</span> not <span style="text-decoration: underline;">#tfm</span>&amp;a.</p>

<h2 id="everyone-knows-thats-how-hashtags-work"><a href="https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/#everyone-knows-thats-how-hashtags-work">Everyone knows that's how hashtags work!</a></h2>

<p>On Twitter's website, find the page which discusses hashtag syntax.  Find where they explain how they should be styled.</p>

<p><strong>You can't.</strong></p>

<p>And thus implicit knowledge is born.  Dabr only looks at letters and numbers in a hashtag.  It assumes that any other character is the end of the tag.</p>

<p></p><div id="attachment_1708" style="width: 490px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1708" class="size-full wp-image-1708" title="Dabr's Hashtag" src="https://shkspr.mobi/blog/wp-content/uploads/2010/02/Capture16_35_30.jpg" alt="Dabr's Hashtag" width="480" height="320"><p id="caption-attachment-1708" class="wp-caption-text">Dabr's Hashtag</p></div><p></p>

<p>Without official guidance - implicit knowledge develops.</p>

<h2 id="has-dabr-got-it-wrong"><a href="https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/#has-dabr-got-it-wrong">Has Dabr Got It Wrong?</a></h2>

<p>No.  I don't think so.  Take a look at how Twitter on the web renders hashtags...</p>

<p></p><div id="attachment_1710" style="width: 392px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1710" class="size-full wp-image-1710" title="Twitter's Web Site" src="https://shkspr.mobi/blog/wp-content/uploads/2010/02/Twitters-Web-Site.png" alt="Twitter's Web Site" width="382" height="312"><p id="caption-attachment-1710" class="wp-caption-text">Twitter's Web Site</p></div><p></p>

<p>...and on the mobile.</p>

<p></p><div id="attachment_1707" style="width: 490px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1707" class="size-full wp-image-1707" title="Twitter Mobile" src="https://shkspr.mobi/blog/wp-content/uploads/2010/02/Capture16_34_33.jpg" alt="Twitter Mobile" width="480" height="320"><p id="caption-attachment-1707" class="wp-caption-text">Twitter Mobile</p></div><p></p>

<h2 id="so-where-does-render-the-full-tag"><a href="https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/#so-where-does-render-the-full-tag">So Where Does Render The Full Tag?</a></h2>

<p>Several applications don't render tags in the same way as Twitter.  Take a look at SocialScope</p>

<p></p><div id="attachment_1709" style="width: 490px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1709" class="size-full wp-image-1709" title="SocialScope Hashtags" src="https://shkspr.mobi/blog/wp-content/uploads/2010/02/Capture16_34_56.jpg" alt="SocialScope Hashtags" width="480" height="320"><p id="caption-attachment-1709" class="wp-caption-text">SocialScope Hashtags</p></div><p></p>

<p></p><div id="attachment_1727" style="width: 330px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1727" src="https://shkspr.mobi/blog/wp-content/uploads/2010/02/jsfe.jpg" alt="Tweetie2" title="Tweetie2" width="320" height="480" class="size-full wp-image-1727"><p id="caption-attachment-1727" class="wp-caption-text">Tweetie2</p></div><p></p>

<p>I'll upload more screenshots if I find examples of "badly behaved" hashtags.&nbsp; Please let me know if you find any.</p>

<h2 id="what-does-twitter-say"><a href="https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/#what-does-twitter-say">What Does Twitter Say?</a></h2>

<p>Twitter has one page devoted to hashtags.&nbsp; It is a <a href="https://web.archive.org/web/20100212023033/http://help.twitter.com/forums/10711/entries/49309-what-are-hashtags-the-symbol">support page for hashtags</a>.&nbsp; This explains to people what hashtags are.&nbsp; There's no detail on valid characters, maximum length, or any of the things which might be useful for a developer or designer.</p>

<h3 id="edit-2010-02-25"><a href="https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/#edit-2010-02-25">Edit 2010-02-25</a></h3>

<p>David Dorward has <a href="https://web.archive.org/web/20150523002321/https://twitter.com/dorward/status/9584777039">pointed out that there is an official resource</a>. On the Twitter Engineering blog - which isn't linked to from the developer site - there is a <a href="https://web.archive.org/web/20100209102432/http://engineering.twitter.com/2010/02/introducing-open-source-twitter-text.html">page discussing hashtags and how to validate them</a>.  You'll notice that they are rather circumspect on what should constitute a hashtag.</p>

<h2 id="conclusion"><a href="https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/#conclusion">Conclusion</a></h2>

<p>Standards and guidelines allow developers to create compatible applications.</p>

<p>Without explicit recommendations, developers will diverge as widely as possible.&nbsp; Twitter - and everyone with an interest in compatibility and usability - needs to ensure that the knowledge they impart is <em>explicit</em>.</p>

<p>Letting people make it up as they go along leads to confusion.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=1706&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/02/hashtags-and-implicit-knowledge/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
