<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
			<title>Tagged with "tools"</title>
			<link>http://www.addedbytes.com/feeds/tag-feed/</link>
			<description></description>
			<language>en</language>
			<copyright>Web Development in Brighton - Added Bytes 2006</copyright>
			<ttl>120</ttl>
			<item>
				<title>Text Readability Scores</title>
				<link>http://www.addedbytes.com/blog/code/readability-score/</link>
				<description><![CDATA[ A tool to give an indication of how easy text is to read, using the Flesch-Kincaid, Gunning-Fog, Coleman-Liau, SMOG and Automated Readability scoring systems. <p><strong>This tool has moved!</strong> It's now on its own domain, at <a href="http://www.readability-score.com/">Readability-Score.com</a>. (It's also had a small makeover and is now full of speedy AJAXy goodness.)</p>

<p>The code that powers the tool is still available on <a href="https://github.com/DaveChild/Text-Statistics">GitHub</a>.</p>

<!--<p>There are a few bugs in the system, so I've left the old tool up for now until everything is running smoothly.</p>

[ -- !ReadabilityScore! -- ]

<form method="post" action="blog/code/readability-score/"><fieldset style="border: 0; width: 90%;"><textarea name="text" rows="20" cols="20" style="border: 1px solid #000; width: 100%; margin-bottom: 20px;">[!Repopulate? &field=`text` !]</textarea>
<p style="text-align: center; padding: 20px 0 0 0;"><input type="submit" value="Check Text Readability" /></p></fieldset></form>--> <br><br>]]></description>
				<pubDate>Wed, 07 Jul 2004 15:14:59 +0100</pubDate>
				<guid isPermaLink="false">http://www.addedbytes.com/blog/code/readability-score/</guid>
				<dc:creator>Dave Child</dc:creator>
				<a href="/feeds/tag-feed/?tags=design&amp;start=0" class="ditto_tag" rel="tag">design</a>,<a href="/feeds/tag-feed/?tags=language&amp;start=0" class="ditto_tag" rel="tag">language</a>,<a href="/feeds/tag-feed/?tags=literature&amp;start=0" class="ditto_tag" rel="tag">literature</a>,<a href="/feeds/tag-feed/?tags=readability&amp;start=0" class="ditto_tag" rel="tag">readability</a>,<a href="/feeds/tag-feed/?tags=reference&amp;start=0" class="ditto_tag" rel="tag">reference</a>,<a href="/feeds/tag-feed/?tags=resources&amp;start=0" class="ditto_tag" rel="tag">resources</a>,<a href="/feeds/tag-feed/?tags=tool&amp;start=0" class="ditto_tag" rel="tag">tool</a>,<a href="/feeds/tag-feed/?tags=tools&amp;start=0" class="ditto_tag" rel="tag">tools</a>,<a href="/feeds/tag-feed/?tags=usability&amp;start=0" class="ditto_tag" rel="tag">usability</a>,<a href="/feeds/tag-feed/?tags=webdesign&amp;start=0" class="ditto_tag" rel="tag">webdesign</a>,<a href="/feeds/tag-feed/?tags=writing&amp;start=0" class="ditto_tag" rel="tag">writing</a>
			</item>

			<item>
				<title>RSS to iCal</title>
				<link>http://www.addedbytes.com/blog/rss-to-ical/</link>
				<description><![CDATA[ <p>I have been looking for a way to convert the BBC weather feed for my area to iCal, so I can subscribe to it. It's date-based, after all, and RSS never seemed to me to be an appropriate format for subscribing to weather information. iCal always struck me as being "better" for that purpose.</p> <p>I have been looking for a way to convert the BBC weather feed for my area to iCal, so I can subscribe to it. It's date-based, after all, and RSS never seemed to me to be an appropriate format for subscribing to weather information. iCal always struck me as being "better" for that purpose. Of course, the BBC only have an RSS feed for local weather. What I needed was a converter.</p>

<p>After some hunting, I discovered that Dean Sanvitale had written a PHP script to convert RSS feeds to iCal format. However, his site (codent.com) appears to be long since abandoned and the script is no longer available from there. Fortunately, the Wayback Machine did have a copy. Dean originally released the script under a <a href="http://creativecommons.org/licenses/by-sa/1.0/">Creative Commons License</a> which, fortunately, allows me to make the script available to download from this site (note: the script is available from this site under the same license).</p>

<p>So, if you're looking for a way to convert an RSS feed to iCal, this PHP script will do the job. Thanks Dean!</p>

<p>Source: <a href="http://www.addedbytes.com/rss2ical.txt">rss2ical.txt</a></p> <br><br>]]></description>
				<pubDate>Thu, 19 Oct 2006 12:14:16 +0100</pubDate>
				<guid isPermaLink="false">http://www.addedbytes.com/blog/rss-to-ical/</guid>
				<dc:creator>Dave Child</dc:creator>
				<a href="/feeds/tag-feed/?tags=bbc&amp;start=0" class="ditto_tag" rel="tag">bbc</a>,<a href="/feeds/tag-feed/?tags=code&amp;start=0" class="ditto_tag" rel="tag">code</a>,<a href="/feeds/tag-feed/?tags=convert&amp;start=0" class="ditto_tag" rel="tag">convert</a>,<a href="/feeds/tag-feed/?tags=ical&amp;start=0" class="ditto_tag" rel="tag">ical</a>,<a href="/feeds/tag-feed/?tags=php&amp;start=0" class="ditto_tag" rel="tag">php</a>,<a href="/feeds/tag-feed/?tags=rss&amp;start=0" class="ditto_tag" rel="tag">rss</a>,<a href="/feeds/tag-feed/?tags=rss2ical&amp;start=0" class="ditto_tag" rel="tag">rss2ical</a>,<a href="/feeds/tag-feed/?tags=tools&amp;start=0" class="ditto_tag" rel="tag">tools</a>,<a href="/feeds/tag-feed/?tags=weather&amp;start=0" class="ditto_tag" rel="tag">weather</a>,<a href="/feeds/tag-feed/?tags=web&amp;start=0" class="ditto_tag" rel="tag">web</a>,<a href="/feeds/tag-feed/?tags=webdev&amp;start=0" class="ditto_tag" rel="tag">webdev</a>
			</item>

			<item>
				<title>View Page Structure</title>
				<link>http://www.addedbytes.com/blog/code/view-page-structure/</link>
				<description><![CDATA[ A tool that outputs the structure of a page. Makes working with CSS (especially resolving inheritance issues) much easier. <p>A couple of days ago, I was having a little CSS trouble. In the end, it turned out that I had set a property of an element "above" in the document tree, and the problematic element was inheriting that property.</p>

<p>It struck me that it would be easier to work through this kind of CSS problem with some kind of simple tool to show how a page was put together. If I could see all the tags on the page in a nested format, with parent and child relationships obvious, and without all the text getting in the way, my life would be easier.</p>

<p>So, I put together this tool. In simple terms, it will fetch a page from a web server and output the tags within the page in a nested list. The JavaScript side of it will also highlight children of an element when you hover over it.</p>

<p>Classes and ids attributes are highlighted, as are tag names. Class and ID names, though, must be enclosed in quotation marks to be highlighted. Text, closing tags and line breaks are not shown. Though I can understand some people may find it useful to see text, I found it made the tree too large to be usable.</p>

<p>I've used it a few times, and am quickly finding it saves quite a lot of time solving simple CSS problems or conflicts. Which is exactly what it was supposed to do. Enjoy!</p>

<h3>Highlighting Issues</h3>

<p>When writing the tool, I came across a fairly unusual problem. I wanted, when the mouse was over an element, to highlight its children. However, this cannot be done with CSS (at least, I couldn't think of a way to make it work).</p>

<p>The problem with the CSS was that whenever you hover over an element, you are also hovering over its parents. So they, and their children, are highlighted - meaning everything is highlighted. For this reason, the highlighting of elements uses JavaScript.</p>

<h3>How to Use</h3>

<p>The page structure tool is written to accept a URL either by GET or POST. You can therefore use it one of two ways.</p>

<p>First, you can use the tool by visiting the URL below, replacing "##url##" with the address of the page you want to view:</p>

<p>http://www.addedbytes.com/view_structure.php?url=##url##</p>

<p>Alternatively, you can use the following form to submit an address to the page:</p>

<form action="http://www.addedbytes.com/view_structure.php" method="post"><label for="viewstrucinput">Enter URL</label> <input id="viewstrucinput" name="url" type="text" /> <input type="submit" value="View" /></form>

<h3>Bookmarklet</h3>

<p>To make life a little easier, I've coded a quick JavaScript bookmarklet for you to use, that, when activated, will automatically submit the URL of the page you are viewing to the tool. Simply copy or drag the link below to your links bar, your favourites folder or anywhere else you wish:</p>

<ul><li><a href="javascript:void(location.href='http://www.addedbytes.com/view_structure.php?url='+location.href);">View Page Structure</a></li></ul>

<h3>Notes</h3>

<ul><li>This tool works best with valid code, especially XHTML.</li><li>A certain amount of basic code improvement is done before processing (for example all empty tags are automatically closed).</li><li>Sites with non-empty tags that aren't closed properly may not show up correctly.</li><li>Sites with large amounts of nested code should still show up, but it may be difficult to view the output.</li></ul>

<h3>Example</h3>

<p>If you want to see an example of the output of this tool, you can view the  <a href="http://www.addedbytes.com/view_structure.php?url=http://www.addedbytes.com">structure for AddedBytes.com</a>.</p> <br><br>]]></description>
				<pubDate>Tue, 12 Oct 2004 16:24:00 +0100</pubDate>
				<guid isPermaLink="false">http://www.addedbytes.com/blog/code/view-page-structure/</guid>
				<dc:creator>Dave Child</dc:creator>
				<a href="/feeds/tag-feed/?tags=cheatsheet&amp;start=0" class="ditto_tag" rel="tag">cheatsheet</a>,<a href="/feeds/tag-feed/?tags=code&amp;start=0" class="ditto_tag" rel="tag">code</a>,<a href="/feeds/tag-feed/?tags=css&amp;start=0" class="ditto_tag" rel="tag">css</a>,<a href="/feeds/tag-feed/?tags=design&amp;start=0" class="ditto_tag" rel="tag">design</a>,<a href="/feeds/tag-feed/?tags=imported&amp;start=0" class="ditto_tag" rel="tag">imported</a>,<a href="/feeds/tag-feed/?tags=resources&amp;start=0" class="ditto_tag" rel="tag">resources</a>,<a href="/feeds/tag-feed/?tags=tool&amp;start=0" class="ditto_tag" rel="tag">tool</a>,<a href="/feeds/tag-feed/?tags=tools&amp;start=0" class="ditto_tag" rel="tag">tools</a>,<a href="/feeds/tag-feed/?tags=useful&amp;start=0" class="ditto_tag" rel="tag">useful</a>,<a href="/feeds/tag-feed/?tags=webdesign&amp;start=0" class="ditto_tag" rel="tag">webdesign</a>,<a href="/feeds/tag-feed/?tags=xhtml&amp;start=0" class="ditto_tag" rel="tag">xhtml</a>
			</item>

			<item>
				<title>Gunning-Fog Index</title>
				<link>http://www.addedbytes.com/blog/code/gunning-fog-function/</link>
				<description><![CDATA[ The Gunning-Fog Index is a measure of text readability based upon sentence length and difficult words in a passage. <p><strong><span style="color: #f00;">PLEASE NOTE:</span> This code is now considered out of date. An updated version has been released under an open source license as a Google Code project: <a href="http://code.google.com/p/php-text-statistics/">php-text-statistics</a>. There is more about this change in the post <a href="http://www.addedbytes.com/blog/readability-code-open-sourced/">Readability Code Open Sourced</a>.</strong></p>

<p>A tool for <a href="http://www.readability-score.com/">checking the readability scores of text</a> is available - this article covers the functions behind that tool.</p>

<p>The Gunning-Fog index is a measure of text readability. It represents the approximate reading age of the text - the age someone will need to be to understand what they are reading.</p>

<p>The following is the algorithm to determine the Gunning-Fog index:</p>

<code>(average_words_sentence + percentage_of_words_with_more_than_three_syllables) * 0.4</code>

<p>The above produces a number, which is a rough measure of the age someone must be to understand the content. The lower the number, the more understandable the content will be to your visitors. Web sites should aim to have content that falls roughly in the 11-15 range for this test.</p>

<p>Any number returned over the value of 22 can be taken to be just 22, and is roughly equivalent to post-graduate level.</p>

<p>Below are a selection of function you can use to determine the Gunning-Fog index of text. To calculate this, all you need to is call the function as follows, where $text is the text you wish to measure the readability of.</p>

<code>$gunning_fog_score = gunning_fog_score($text);</code>

<code>function gunning_fog_score($text) {
    return ((average_words_sentence($text) + percentage_number_words_three_syllables($text)) * 0.4);
}</code>

<code>function average_words_sentence($text) {
    $sentences = strlen(preg_replace('/[^\.!?]/', '', $text));
    $words = strlen(preg_replace('/[^ ]/', '', $text));
    return ($words/$sentences);
}</code>

<code>function percentage_number_words_three_syllables($text) {
    $syllables = 0;
    $words = explode(' ', $text);
    for ($i = 0; $i &lt; count($words); $i++) {
        if (count_syllables($words[$i]) &gt; 2) {
            $syllables ++;
        }
    }

    $score = number_format((($syllables / count($words)) * 100));

    return ($score);
}</code>

<code>function count_syllables($word) {

    $subsyl = Array(
        'cial'
        ,'tia'
        ,'cius'
        ,'cious'
        ,'giu'
        ,'ion'
        ,'iou'
        ,'sia$'
        ,'.ely$'
    );

    $addsyl = Array(
        'ia'
        ,'riet'
        ,'dien'
        ,'iu'
        ,'io'
        ,'ii'
        ,'[aeiouym]bl$'
        ,'[aeiou]{3}'
        ,'^mc'
        ,'ism$'
        ,'([^aeiouy])\1l$'
        ,'[^l]lien'
        ,'^coa[dglx].'
        ,'[^gq]ua[^auieo]'
        ,'dnt$'
    );

    // Based on Greg Fast's Perl module Lingua::EN::Syllables
    $word = preg_replace('/[^a-z]/is', '', strtolower($word));
    $word_parts = preg_split('/[^aeiouy]+/', $word);
    foreach ($word_parts as $key =&gt; $value) {
        if ($value &lt;&gt; '') {
            $valid_word_parts[] = $value;
        }
    }

    $syllables = 0;
    // Thanks to Joe Kovar for correcting a bug in the following lines
    foreach ($subsyl as $syl) { 
        $syllables -= preg_match('~'.$syl.'~', $word); 
    } 
    foreach ($addsyl as $syl) { 
        $syllables += preg_match('~'.$syl.'~', $word); 
    }
    if (strlen($word) == 1) {
        $syllables++;
    }
    $syllables += count($valid_word_parts);
    $syllables = ($syllables == 0) ? 1 : $syllables;
    return $syllables;
}</code> <br><br>]]></description>
				<pubDate>Tue, 06 Jul 2004 11:41:35 +0100</pubDate>
				<guid isPermaLink="false">http://www.addedbytes.com/blog/code/gunning-fog-function/</guid>
				<dc:creator>Dave Child</dc:creator>
				<a href="/feeds/tag-feed/?tags=code&amp;start=0" class="ditto_tag" rel="tag">code</a>,<a href="/feeds/tag-feed/?tags=language&amp;start=0" class="ditto_tag" rel="tag">language</a>,<a href="/feeds/tag-feed/?tags=php&amp;start=0" class="ditto_tag" rel="tag">php</a>,<a href="/feeds/tag-feed/?tags=programming&amp;start=0" class="ditto_tag" rel="tag">programming</a>,<a href="/feeds/tag-feed/?tags=readability&amp;start=0" class="ditto_tag" rel="tag">readability</a>,<a href="/feeds/tag-feed/?tags=tools&amp;start=0" class="ditto_tag" rel="tag">tools</a>
			</item>

			<item>
				<title>28k and 56k Modem Emulator</title>
				<link>http://www.addedbytes.com/blog/code/modem-emulator/</link>
				<description><![CDATA[ Regardless of your connection speed, this will show you how your site loads on PCs with older connections. <p><strong><span style="color: #f00;">PLEASE NOTE:</span> This tool has been taken offline and the code has been released as an open source project: <a href="http://code.google.com/p/modem-emulator/">modem-emulator</a>. There's some <a href="http://www.addedbytes.com/blog/modem-emulator-open-sourced/">background on the change here</a>.</strong></p>

<p>Some designers have taken the rise of broadband to mean that graphic intensive pages are now acceptable, that 600k Flash intros are suddenly desirable, and that otherwise bombarding the user with bandwidth-hungry sites is commendable. Sadly, plenty of users are still on dial-up, using 28k, 33.6k or 56k modems, and it's all too easy to forget that when you're surfing on a high speed office connection or even your home broadband.</p>

<p>With that in mind, I've put together a <del>modem emulator (or is it a modem simulator?)</del> <ins>throughput throttling proxy (<a href="http://www.addedbytes.com/resources/modem-emulator/comments/#comment18">apparently</a>)</ins>. In theory it should allow you to view your site through the eyes of a user with a slower connection. In practice, it isn't perfect, but might give you an idea of how some of your users actually experience your site.</p>

<p>A word of warning as well - the tool is tested (though not extensively) with sites that I use or have built. There will be unusual sites that don't work with this tool (flash is so far untested for example). Please <a href="mailto:dave@addedbytes.com">email me</a> if you have any problems.</p>

<p>The emulator suffered a great deal of abuse in the past, mainly by people wanting to bypass work internet filters. Unfortunately, that has meant that I have had to add a few features to the tool. The primary change, for my own sanity, is a blacklist of URLs. I hope to not have to change this to a whitelist, but that option is available should the need arise.</p>

<p>To use it, simply enter your URL and the speed you'd like to see the site go, and the script will show you the page desired loading as it would on a slower connection.</p>

<p><em>The tool has been taken offline, and the code has been released under an open source license. There's some <a href="http://www.addedbytes.com/blog/modem-emulator-open-sourced/">background on the change here</a>.</em></p>

<p>Finally, someone is bound to ask, so to save myself the time answering later - no, this cannot show you how your site will load on a faster connection than you have yourself :).</p>

<h3>Update 29 December 2006</h3>

<p>The emulator has been tentatively reinstated with some features to enable me to manage it.</p> <br><br>]]></description>
				<pubDate>Tue, 29 Jun 2004 01:12:00 +0100</pubDate>
				<guid isPermaLink="false">http://www.addedbytes.com/blog/code/modem-emulator/</guid>
				<dc:creator>Dave Child</dc:creator>
				<a href="/feeds/tag-feed/?tags=accessibility&amp;start=0" class="ditto_tag" rel="tag">accessibility</a>,<a href="/feeds/tag-feed/?tags=design&amp;start=0" class="ditto_tag" rel="tag">design</a>,<a href="/feeds/tag-feed/?tags=development&amp;start=0" class="ditto_tag" rel="tag">development</a>,<a href="/feeds/tag-feed/?tags=modem&amp;start=0" class="ditto_tag" rel="tag">modem</a>,<a href="/feeds/tag-feed/?tags=optimization&amp;start=0" class="ditto_tag" rel="tag">optimization</a>,<a href="/feeds/tag-feed/?tags=testing&amp;start=0" class="ditto_tag" rel="tag">testing</a>,<a href="/feeds/tag-feed/?tags=tools&amp;start=0" class="ditto_tag" rel="tag">tools</a>,<a href="/feeds/tag-feed/?tags=usability&amp;start=0" class="ditto_tag" rel="tag">usability</a>,<a href="/feeds/tag-feed/?tags=web&amp;start=0" class="ditto_tag" rel="tag">web</a>,<a href="/feeds/tag-feed/?tags=webdesign&amp;start=0" class="ditto_tag" rel="tag">webdesign</a>,<a href="/feeds/tag-feed/?tags=webdev&amp;start=0" class="ditto_tag" rel="tag">webdev</a>
			</item>
	</channel>
</rss>