<?xml version="1.0" encoding="UTF-8"?> <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>Friendly Bit &#187; Tutor</title> <atom:link href="http://friendlybit.com/articles/tutorial/feed/" rel="self" type="application/rss+xml" /><link>http://friendlybit.com</link> <description>You have found Friendly Bit, a web development blog. I focus on client side technologies like CSS, HTML and Javascript. You find my articles below and categories to the right.</description> <lastBuildDate>Fri, 05 Feb 2010 23:32:09 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Swedish: Presentation om upplevelsedesign</title><link>http://friendlybit.com/tutorial/swedish-presentation-om-upplevelsedesign/</link> <comments>http://friendlybit.com/tutorial/swedish-presentation-om-upplevelsedesign/#comments</comments> <pubDate>Fri, 22 May 2009 11:33:18 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/?p=488</guid> <description><![CDATA[Som många av er vet så jobbar jag för ett konsultbolag som heter Valtech i stockholm. Via Valtech får jag ofta möjlighet att hålla föredrag om saker jag tycker är intressanta, och som jag tycker att våra kunder (och vi själva), borde satsa mera på. Den här gången var det upplevelsedesign: att inte bara sätta [...]]]></description> <content:encoded><![CDATA[<p>Som många av er vet så jobbar jag för ett konsultbolag som heter Valtech i stockholm. Via Valtech får jag ofta möjlighet att hålla föredrag om saker jag tycker är intressanta, och som jag tycker att våra kunder (och vi själva), borde satsa mera på. Den här gången var det upplevelsedesign: att inte bara sätta fokus på att användaren ska klara av specifika uppgifter, utan att bry sig om hur det känns att genomföra de uppgifterna. Kort sagt, att sikta lite högre.</p><p>Presentationen håller jag tillsammans med Visar, och Marwin, två av våra extremt duktiga Art Directors, och ni ser mig sist i presentationen.</p><p><object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="288" id="viddler_51c3e438"><param
name="movie" value="http://www.viddler.com/player/51c3e438/" /><param
name="allowScriptAccess" value="always" /><param
name="allowFullScreen" value="true" /><embed
src="http://www.viddler.com/player/51c3e438/" width="437" height="288" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_51c3e438"></embed></object></p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/tutorial/swedish-presentation-om-upplevelsedesign/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Follow the 10 ground rules, or fail on the web</title><link>http://friendlybit.com/tutorial/10-web-ground-rules/</link> <comments>http://friendlybit.com/tutorial/10-web-ground-rules/#comments</comments> <pubDate>Thu, 20 Nov 2008 16:58:16 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Modern web]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/?p=331</guid> <description><![CDATA[When you work with the web, there are a couple of basics you really need to get right. These are things I see people misunderstand over and over again, with a varying degree of failiure as a result. Not only individuals make these mistakes, even really big organizations make them, and suffer as a result. [...]]]></description> <content:encoded><![CDATA[<p>When you work with the web, there are a couple of basics you really need to get right. These are things I see people misunderstand over and over again, with a varying degree of failiure as a result. Not only individuals make these mistakes, even really big organizations make them, and suffer as a result. So lets get at it.</p><h2>1. Everyone is <strong>anonymous </strong>on the web, if they want to</h2><p>If you depend on trying to identify who a particular user on the web is, you will fail in every way possible. This is what lots of law firms try to do, especially in the context of file sharing. You will never ever be able to know who someone online is, if they don&#8217;t want you to.</p><p>Technical reasons: <strong>IP-numbers are easy to fake</strong>, but using proxy servers of different sorts. New services are constantly popping up, that makes this available for unexperienced users. Just push them a little more, send a couple of more <a
href="http://en.wikipedia.org/wiki/Cease_and_desist">cease and desist</a> letters and even ordinary home users will start to cloak who they are. It&#8217;s possible, it&#8217;s easy.</p><p>Social reasons: It&#8217;s very easy to surf using <strong>someone else&#8217;s internet connection</strong>. Ways vary from just connecting to an unencrypted wireless network, to just using the free connection at a library or school. And it&#8217;s getting worse: people are starting to move around while using the web (mobile), hopping from one connection to the next as their geographic position permits. The link between internet connections and users are getting blurrier as we speak.</p><p>Despite the above, there are things you can identify and use. One of those is categorizing users into user types. This is what Google (and lots of others) are successfully doing with their advertising system. &#8220;Based on what you&#8217;ve showed interest in previously, we think you will like this&#8221;. This enables you to personalize and customize your content to a particular user type, something that holds lots of economical value (if that&#8217;s what you&#8217;re after).</p><h2>2. Give your content away for <strong>free</strong>, or watch someone else do it</h2><p>The web is a gigantic content creation machine, and except for very niched content, you can find anything on it. If you are in the business of selling content online, you will see your profits <strong>steadily decline</strong>. The competition is just too intense when anyone can create content.</p><p>How do you tackle that? Well, put your previously costly content online for free, to <strong>drive people to your site</strong>. If the content is good, your will see a massive surge in number of users. Well on the site, you will need to figure out how to <strong>make money of them</strong>, either by showing them ads or getting them to buy something physical.</p><p>Industries that depend on online content creation are really living on the edge right now, and for a future prediction, just look at the music industry. You still have some time to rethink your bussiness model.</p><h2><strong>3. Linking</strong> is the core of the web, make people want to link to you</h2><p>It&#8217;s called a web because of the links. Trying to limit or control other sites linking to you is fundamentally breaking the web. It&#8217;s also downright stupid, since every external link is a vote for your site, and a sure way for people to find you. Having an &#8220;link policy&#8221;, controlling how people may link to you, is a sure way to make a fool out of yourself online. Not to say that people won&#8217;t care one bit about it.</p><p>Instead, you should encourage people to link to you. How? By first giving every piece of content a <strong>linkable address</strong>. Many flash- and frame-based sites miss this fact, and instead require users to click through your frontpage to find the content they want. This is a sure way to turn users away. Just make your content linkable, it&#8217;s not hard.</p><p>Then, make sure the content is in such a high quality that users want to link to it. This rules out saying what everyone else is saying, in the same way everyone else is saying it. You need to be <strong>different, </strong>and have <strong>genuinely interesting </strong>content, that no one else has. This is hard, but a problem you need to solve to make it on the web.</p><h2>4. Link to <strong>external sites</strong> with good content, it&#8217;s all about servicing your users</h2><p>There&#8217;s billions of sites a user can go to, and you need to work hard to servicing your users if you want their attention. Sometimes your content is so extensive, that no matter how hard you work, users will still want more. This is a perfect situation where you should link to external sites and give your users what they want.</p><p>Many newspaper make this mistake, and end up with users leaving their site for Google, trying to find more information about a particular piece of content. They have instead linked to good follow-up content directly, given the user what they wanted, and be accessible via the most used button on the web, the back-button. <strong>Happy users</strong> that have <strong>easy access to your site</strong>, or annoyed users that leave for Google, your choice.</p><h2>5. People will <strong>copy your content</strong>, and there&#8217;s nothing you can do about it</h2><p>Some people are worried about the copying of their content. And if they see that as an issue, they better be worried. You see, each time someone reads your texts, or looks at your media, it&#8217;s copied from your server to the users computer. Web browsers are really effective copyright infringement machines, and by just clicking a link, you copy that page.</p><p>So if you are worried about users copying your content, please <strong>don&#8217;t put it online at all</strong>.</p><p>Other people think that they can have their content on the web, and still prevent people from copying it. This is pure lunacy, and all ways to prevent copying have failed. People even miss the most obvious way people can copy, by hitting the &#8220;Print screen&#8221; button on their keyboards. When it comes to video and audio it&#8217;s a bit more annoying, but everything that comes out of your speakers, or is displayed on the screen, is recordable. So stop worrying about copying, <strong>you can&#8217;t stop it</strong>.</p><p>Instead, know and accept that people will copy your content, and just ask for a simple <strong>link back </strong>if they do. That way, small pieces of your content on other sites will act as marketing for the whole site.</p><p>If you want this formalized as a license, there is the <a
href="http://creativecommons.org/licenses/by/2.0/">creative commons attribution license</a>, which I use on this site (see footer).</p><h2>6. Use the web to <strong>communicate</strong> with your users, or watch your impact fade</h2><p>Almost everything is moving to the web, including most of your business and private life. This of course has implications for web sites. Back in 1999, a couple of smart people sat together and tried to formulate how the future would look for businesses. One of the fundamental truths they found was &#8220;<a
href="http://www.cluetrain.com/book/markets.html">Markets are conversations</a>&#8220;. In essence, this means that <strong>you sell stuff by talking</strong> about it with customers. It can be through marketing or through recommendation, but it is talking. When that communication moves to the web, you too better start talking <strong>on the web</strong>. And quickly.</p><p>This movement of websites for two-way instead of one-way communication has been given the techy name Web 2.0. And it turns out, this new web is a terribly effective way of communicating. The more people realize this, the more of the conversations will move to the web.</p><p>The question is, when hoards of people come to your site to talk to you about your product, are your ready? Or will you give them: &#8220;Sorry, this store is closed, but we have this nice brochure you can read&#8230;&#8221;</p><h2>7. Communicate with your users in <strong>natural language</strong>, marketing speech has no place on the web</h2><p>It&#8217;s easy to find marketing speech about products today. Companies compete with each other to make sure as much of your field of vision as possible is filled with their message. When people are subjected to that much information they have no interest in, there are consequences. On the early web, the consequences were banner blindness, people simply started ignoring some banner formats. On the modern web, people have started <strong>ignoring marketing language </strong>use instead. The words &#8220;Best&#8221;, &#8220;Revolutionize&#8221; and &#8220;Cheapest&#8221;, instantly makes people stop reading.</p><p>Why? Because companies writing about their own products don&#8217;t have anything to compare to! They can&#8217;t say what&#8217;s <strong>best</strong>, because they don&#8217;t use their competitor&#8217;s products. They don&#8217;t know if the product will <strong>revolutionize</strong> the users life, because they know nothing about the user. And any user can look up how <strong>cheap </strong>they are on a price comparison site.</p><p>So what to do? Talk to them like you would to a friend, in the afternoon, <a
href="http://www.youtube.com/watch?v=OqhXwjBVVRY">after two beers</a>. This will make sure you don&#8217;t turn customers away by trying to push to much crap on them. You wouldn&#8217;t do it to your friend? Then don&#8217;t do it to potential customers. Just changing your language has huge positive implications, but let me just sum it up like this: <strong>it builds trust</strong>.</p><h2>8. Be <strong>honest</strong> about what your strengths are, liars are easily uncovered</h2><p>Never has it been so easy to look up facts. Liars are easily uncovered by a couple of soft tappings on a keyboard. What&#8217;s even better, is that even subjective things can be checked. If someone yells: &#8220;Our product is the best one!&#8221;, you can find out if that&#8217;s the case in a few seconds. Just read a couple of reviews, look at comparison charts, and you will know.</p><p>Lying in person is rather bad, but <strong>lying on the web is worse</strong>. All the facts are so close. A customer is literally seconds away from finding out if you&#8217;re bullshitting them or telling the truth. This makes it vital not to lie on the web.</p><p>If you want to brag anyway, make sure your add a &#8220;<strong>we think</strong>&#8221; before all your bold claims, and back them up with solid arguments. Because if you say &#8220;We&#8217;ve found no cheaper product than our own&#8221;, and I find out there are others that in fact are, you&#8217;re not a liar, you&#8217;re just badly informed.</p><h2>9. Care about <strong>search engines</strong>, and double your number of users</h2><p>You are not the only site on the web, and people will spend most of their time on sites other than your own. This means, that if you don&#8217;t think about how people find your site, all your content work is in vain.</p><p>So how are people found? I have yet to see a customer of mine that gets less than 50% of their users from search engines. <strong>Usually 60-70%.</strong> People tend not to understand the implications of this. A e-store could potentially lose over half their sales by misbehaving in Google&#8217;s eyes. This is huge.</p><p>You need to <strong>care about search engines</strong>. Luckily, they are well synced with the ground rules you&#8217;re reading. If you make your content linkable, unique, interesting, and talk to them in a language they understand, you will be successful. All serious search engine optimization guides will say the same.</p><p>The last step, and what many miss, is to <strong>keep track of </strong>how people find you, and what they find. Then feed that information back to your content producers. That way, you can produce content that people actually like.</p><p>Or, you could lose half your sales. Your choice.</p><h2>10. Encouraging and acting upon <strong>feedback </strong>is currently the best form of marketing</h2><p>Asking for feedback is unfortunately still uncommon. Unfortunate because there are so many out there that could benefit from knowing how they can do better. It&#8217;s also fortunate, because it means that you have a chance to be different, and stand out, just by <strong>asking people what they want</strong>.</p><p><a
href="http://www.ideastorm.com/">Dell IdeaStorm</a> is a great example of this. They are simply saying: &#8220;Hi, we want your feedback&#8221;, and instantly they have media coverage everywhere. Additionally, they get great feedback on how to improve their business.</p><p>Of course, this means you need to act upon feedback too. Telling people that you listen, and then don&#8217;t is a much worse offense than not listening at all. So find yourself a good chair, hand out the megaphones, and listen carefully.</p><h2>Where to now?</h2><p>Thanks for reading this far. This article comes from a frustration over how some companies, and individuals, think the web is still a place were they can makes their own rules. I would therefore like to set the foot down, and tell people what I&#8217;ve learned about the web, about what works and not.</p><p>I also know that there are other people out there that needs to read this. Do you know some of them? I then appreciate if you could send them the link. <strong>More people need to read this</strong>.</p><p>Thanks.</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/tutorial/10-web-ground-rules/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>Templated User Controls in ASP.NET</title><link>http://friendlybit.com/other/templated-user-controls-in-aspnet/</link> <comments>http://friendlybit.com/other/templated-user-controls-in-aspnet/#comments</comments> <pubDate>Mon, 17 Nov 2008 23:28:43 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[HTML]]></category> <category><![CDATA[Other topics]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/?p=323</guid> <description><![CDATA[Good design repeats itself. It works hard to convey a whole, a feeling of consistency. Once you understand a part of such a design, you know your way around all of it. This is often done by repetition, using the same elements, colors, styles, positioning, and so on. This is a good thing.
Good code never [...]]]></description> <content:encoded><![CDATA[<p>Good design repeats itself. It works hard to convey a whole, a feeling of consistency. Once you understand a part of such a design, you know your way around all of it. This is often done by repetition, using the same elements, colors, styles, positioning, and so on. This is a good thing.</p><p>Good code <a
href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">never repeats itself</a>. The number of techniques to avoid it are numerous, and all new languages compete in trying to remove as much repetition as possible (Especially the dynamic ones).</p><p><strong>Good design repeats itself, good code does not. </strong></p><p>With interface development, you <strong>face the conflict</strong> above over and over again. You get a design that (rightly) reuses the same concepts over and over, and you need to implement them in code that makes you write the same logic only once. This same time both when writing the code and later when fixing bugs in it, and deep inside, all programmers know that it&#8217;s the correct way to do things.</p><p>I&#8217;m currently working in a .NET project (EPiServer CMS 5), and is faced with a design that uses the same kind of boxes all over the site. The boxes only differ by color and content, so things like shadows and rounded corners are clear repetition that I want to do only once. I&#8217;ll do the shadows and corners with CSS, but for that I need a couple of wrapper divs. Divs that I only want to specify once, and then reuse.</p><p>The prequisites are:</p><ol><li>I want a <strong>flexible </strong>solution, so I&#8217;m not tied to a specific HTML structure (number of divs, or even if I use the div tag or not).</li><li><strong>No HTML in properties</strong> that get sent to user-controls</li><li><strong>No HTML in code-behind</strong> (a common way in .NET to split logic (code-behind) and templates (ASP.NET and HTML))</li></ol><p>What I came up with was <a
href="http://msdn.microsoft.com/en-us/library/36574bf6.aspx">templated user controls</a>. They provide a way to write controls that wrap any other controls you may have, and add content around them. And it&#8217;s easy to write and user. This is how the one I wrote is used:</p><pre><code >&lt;MyProject:Box runat="server"&gt;
    &lt;Contents&gt;
        &lt;h2&gt;Random header...&lt;/h2&gt;
        &lt;asp:Repeater runat="server"&gt;...&lt;/asp:Repeater&gt;
        ...
    &lt;/Contents&gt;
&lt;/MyProject:Box&gt;</code></pre><p>It simply wraps anything inside it (in this case a heading tag and a asp repeater), and lets me do whatever I want with them. In my case, I wanted to add some generic HTML around lots of different content, but you could do anything you wanted.</p><p>This is how the above was implemented. First the code-behind:</p><pre><code >using System.Web.UI;

namespace MyProject.templates.units
{
    [ParseChildren(true)]
    public partial class Box : System.Web.UI.UserControl
    {
        private ITemplate contents = null;

        [TemplateContainer(typeof(TemplateControl))]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [TemplateInstance(TemplateInstance.Single)]
        public ITemplate Contents
        {
            get
            {
                return contents;
            }
            set
            {
                contents = value;
            }
        }

        void Page_Init()
        {
            if (contents != null)
                contents.InstantiateIn(PlaceHolder1);
        }
    }
}</code></pre><p>&#8230; and then the &#8220;code-front&#8221;:</p><pre><code >&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Box.ascx.cs" Inherits="MyProject.templates.units.Box" %&gt;
&lt;div class="box"&gt;
    &lt;div class="boxwrapper"&gt;
        &lt;asp:Placeholder runat="server" ID="PlaceHolder1" /&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre><p>I think this is a <strong>really useful</strong> way to write user controls, especially for those of you that work as interface developers in a .NET world. Asking the people around me I found that quite a few didn&#8217;t know how templated user controls worked, so I hope I will be of use to some of you out there. Happy coding!</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/other/templated-user-controls-in-aspnet/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Install MySQL-python on Mac OS X (leopard)</title><link>http://friendlybit.com/tutorial/install-mysql-python-on-mac-os-x-leopard/</link> <comments>http://friendlybit.com/tutorial/install-mysql-python-on-mac-os-x-leopard/#comments</comments> <pubDate>Fri, 31 Oct 2008 16:37:18 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Django]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/?p=299</guid> <description><![CDATA[What a pain. Getting mysql to work with python is the single most annoying step in getting Django up and running (if you choose MySQL as the database). You see, python requires drivers to be able to talk to MySQL, and you have to compile those yourself. I just devoted several hours last night to [...]]]></description> <content:encoded><![CDATA[<p>What a pain. Getting mysql to work with python is the single most annoying step in getting Django up and running (if you choose MySQL as the database). You see, python requires drivers to be able to talk to MySQL, and you have to compile those yourself. I just devoted several hours last night to help friends do what I did some months ago. This time, I thought I document it right here.</p><h2>How to install MySQL-python on Mac OS X</h2><p><strong>Step 1</strong>: <strong>Brace yourself</strong>, this proccess is really really annoying.</p><p><strong>Step 2</strong>: <a
href="http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg"><strong>Download MySQL</strong> for Mac</a> (Skip registration by clicking the link below the login form). You probably want &#8220;<a
href="http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67-osx10.5-x86.dmg/from/http://mysql.mirror.kangaroot.net/">Mac OS X 10.5 (x86)</a>&#8220;. Is it possible to use some other version of MySQL? Yes, as long as you have a version that includes the source code (<a
href="http://www.mamp.info/en/mamp.html">MAMP</a> does not include them, so it won&#8217;t work). You&#8217;ll need the source later on.</p><p><strong>Step 3</strong>: <strong>Install MySQL</strong> by mounting the image you just downloaded, and double-clicking the package file for MySQL. Also install the prefPane that&#8217;s included in the package. That adds an icon the system admin that lets you start and stop MySQL, very convenient.</p><p><strong>Step 4</strong>: <strong>Make the mysql command accessible from anywhere</strong> by adding it to your PATH (a variable that holds all directories the terminal looks in to find the command you&#8217;re trying to execute). The below just adds mysql&#8217;s bin directory (it&#8217;s probably the one I&#8217;m using below) to the PATH you currently are using:</p><pre><code >export PATH=/usr/local/mysql/bin:$PATH</code></pre><p>You probably want to add this line to a file called <strong>.bash_profile</strong> (yes, it starts with a dot), that is situated in your home directory (which you get to by just typing &#8220;cd&#8221;). This file gets run each time you start a new terminal, so it makes sure the mysql command is always accessible, no matter where you are.</p><p><strong>Step 5</strong>: <strong><a
href="https://sourceforge.net/project/showfiles.php?group_id=22307&amp;package_id=15775">Download MySQL-python</a></strong>, you probably want the file that ends with .<strong>tar.gz</strong>.</p><p><strong>Step 6</strong>: <strong>Unpack the file </strong>you just downloaded in an empty directory (anywhere)</p><p><strong>Step 7</strong>: <strong><a
href="http://developer.apple.com/technology/xcode.html">Download XCode</a></strong> from Apple. The reason you need this is because XCode includes a C++ compiler you will use when installing MySQL-python soon. The download is huge (1 Gb), and to be able to download you first need to fill in a long form. The registration process for Apple Developer Connection is about the worst things Apple has ever created, so after completing it, you will either laugh or be really annoyed, just pick and choose. You do need XCode however.</p><p><strong>Step 8</strong>: <strong>Install the XCode Tools</strong> <strong>package</strong> by first mounting the file you just downloaded, and then double-clicking on the <strong>XCode Tools</strong> package. It&#8217;s the only one you need from the huge set of junk you just downloaded.</p><p><strong>Step 9</strong>: Try installing MySQL-python by going to the directory where you unpacked it and typing:</p><pre><code >python setup.py install</code></pre><p>This will attempt to install the drivers, but <strong>will fail</strong>. This is because the coders behind MySQL-python have failed to fix a very simple bug in types.h (<a
href="https://sourceforge.net/tracker/?func=detail&amp;aid=1808476&amp;group_id=22307&amp;atid=374932">1808476</a> &#8211; &#8220;#define of uint breaks compiling on Mac OS X 10.5&#8243;). However, you can easily fix it yourself: Look for a reference to types.h in the terminal. When you find it, open that file in your favorite text editor and comment out line 92, which should say something about <code >#define</code> and <code >uint</code> (comments in C++ are double forward slashes: //).</p><p><strong>Step 10</strong>: Now, <strong>try the above command again</strong>. It should install fine. If it doesn&#8217;t, you will probably find out why by looking in the terminal for errors while compiling.</p><p>What did I say, isn&#8217;t this process about 7 steps to long? Well, I hope this little guide helps someone.</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/tutorial/install-mysql-python-on-mac-os-x-leopard/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Ten commandments of update services</title><link>http://friendlybit.com/other/ten-commandments-of-update-services/</link> <comments>http://friendlybit.com/other/ten-commandments-of-update-services/#comments</comments> <pubDate>Sun, 21 Sep 2008 21:10:25 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Other topics]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/?p=239</guid> <description><![CDATA[I&#8217;m getting increasingly annoyed with update services shipped with popular applications. It&#8217;s looks like it&#8217;s getting worse and worse, and I think someone should stand up and say enough is enough.Adobe Update
Google Update
Microsoft Update
Ten Commandments of Update ServicesLet me start by showing when updates go wrong:
Adobe Update
I start Adobe Fireworks because I want to resize [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m getting increasingly annoyed with update services shipped with popular applications. It&#8217;s looks like it&#8217;s getting worse and worse, and I think someone should stand up and say <strong>enough is enough</strong>.</p><ul><li><a
href="#adobe">Adobe Update</a></li><li><a
href="#google">Google Update</a></li><li><a
href="#microsoft">Microsoft Update</a></li><li><a
href="#ten">Ten Commandments of Update Services</a></li></ul><p>Let me start by showing when updates go wrong:</p><h2 id="adobe">Adobe Update</h2><p><img
class="secondary" src="http://friendlybit.com/wp-content/uploads/2008/09/adobe_logo.jpg" alt="">I start Adobe Fireworks because I want to resize an image I have. After it has started and the image has loaded the update service prompts me that there are new updates available. For what? It doesn&#8217;t say, so I click more info and get a list of things. Strange: <strong>None of them seem related to Fireworks</strong>.</p><p>The update starts, and tells me I <strong>have to close Fireworks</strong> to complete it. Bah, I just started it! I&#8217;m trying to resize an image here, remember? But Ok, this time. Next it tells me to close Firefox. What?! All my precious tabs I&#8217;ve saved for later reading! Bitches.</p><p>The download begins, and the <strong>progress window takes focus</strong> over the other stuff I&#8217;m doing while not looking at the progress bar. *Repeated clicking to hide the window*. Then when it&#8217;s done it takes focus again, and asks me to click the only button available. GAH?!</p><p>Ok, done. Why was I starting Fireworks again? And hey, what&#8217;s those <strong>new PDF icons</strong> doing in my Links toolbar in Internet Explorer?</p><h2 id="google">Google Update</h2><p><img
class="secondary" src="http://friendlybit.com/wp-content/uploads/2008/09/google-logo.jpg" alt="">Oh, a new web browser: Google Chrome, I surely want to try it out. *Couple of hours of fiddling*. Nah, I still like Firefox more, I&#8217;ll go back to using that one. <strong>Wait, what&#8217;s that GoogleUpdate.exe process doing there</strong>? I&#8217;ll try closing Chrome. Nope, still there. Ok, I&#8217;ll force it to close. Hmm, it restarts after a while. Ok, must be some kind of process that starts with Windows. Ah, registry setting, lets remove that one. *Reboot*. Still there?! Ah, they also installed it as a service. Lets remove that too. Finally!</p><p>What&#8217;s that? A new version of Google Gears! *Installing*. Hmm&#8230; What&#8217;s that GoogleUpdate.exe process doing there? GAH! What were you thinking Google?!</p><h2 id="microsoft">Microsoft update</h2><p><img
class="secondary" src="http://friendlybit.com/wp-content/uploads/2008/09/logo_microsoft_small.gif" alt="">I really should make sure my OS is up to date. Lets go to the windowsupdate website. What? I need to run IE5 or later? Ah, no Firefox support, damn it. Lets switch browser. Ok. Install validation thingie? Ehm&#8230; I guess I have no choice. *Waiting*. Ok, now let&#8217;s see if there&#8217;s some updates, Express or Custom? Custom, of course. *Waiting quite a long time*. Why are you making me look at a progress bar? Ok, no <abbr
title="Operating System">OS</abbr> upgrades, but there&#8217;s some update to Windows Media player. Yeye, I guess it couldn&#8217;t do any harm (not that I use that one). Trust ActiveX thingie? Yeye, I know what I&#8217;m doing. *Waiting some more, with focus stealing*. &#8220;Please restart your computer to complete the installation&#8221;. Sigh.</p><p>So why don&#8217;t I just use Windows Update program instead? Well, there&#8217;s a window that pops up every 5 minutes that remind you that you have to restart the computer. Do you know how annoying that one is? No, it&#8217;s MORE annoying than that.</p><h2 id="ten">Ten Commandments of Update Services</h2><p>So I hope that&#8217;s enough evidence that big companies have no idea how do conduct a decent update of their own program. So let me offer some (free of charge) advise:</p><ol><li>If your update is web based, <strong>let me use any modern browser I want</strong>. Don&#8217;t start by getting me annoyed.</li><li>Check for updates <strong>right before the program starts</strong>. I know that you want me to close the app while it&#8217;s being updated, but why on earth do you let me start it then? Lets keep it simple, update before the program starts, and resume starting the app when you&#8217;re done.</li><li><strong>Don&#8217;t leave processes running in the background</strong> when I close the program. When I close your program, I don&#8217;t care about you, or any updates to your program.</li><li><strong>Only update the current program</strong>, not bundled ones. I know you want me to have the latest versions of all your programs, but odds are I don&#8217;t even use them. Update those programs when I start them, not now.</li><li><strong>Show me what gets updated</strong>, and if possible link to a change log. If you want me to download 70 Mb you need to first talk me into why I need it. You may want to hide detailed info for inexperienced users, but could you please then remember that I&#8217;m not one of those?</li><li>If it&#8217;s a tiny update (less than 1 Mb), you can just <strong>go ahead and install right away</strong>. You don&#8217;t even have to prompt me.</li><li><strong>Download and install in the background</strong>, without stealing my focus. If you&#8217;re shipping a big pile of fixes (ie. the version I bought was not done), you have to let me do other stuff while you update. Like surfing the web. It&#8217;s not Ok it require that I close unrelated programs, sorry.</li><li><strong>Never ever touch my browser bookmarks</strong>. Never add things to the quicklaunch bar. Never make things start automatically unless I&#8217;ve told you that&#8217;s what I want (why do most people have a Quicktime icon in their systray?). The only way of getting into my bookmarks or my quicklaunch bar is writing a really good application. You can&#8217;t force me to like you. The opposite works well though.</li><li><strong>Never require me to restart the computer</strong>. There&#8217;s only one exception for when you may: when I&#8217;m updating the operating system. No excuses.</li><li><strong>When you&#8217;re done</strong>, just start the program. I don&#8217;t want to confirm anything, I want to get to work using your app.</li></ol><p>(Bonus point from <a
href="#comment-31047">James Socol</a> in the comments: 11. <strong>Use incremental downloads</strong>, so I don&#8217;t have to download stuff I already have installed.)</p><p>If you are a software company, and can&#8217;t manage the above, just do it the old fashion way: let me manually download a file from your website. That will annoy me much less than a bad automatic process. Or if you want things to be really convenient: <strong>write a web application instead</strong>.</p><p>Now get to work. I&#8217;ve had it.</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/other/ten-commandments-of-update-services/feed/</wfw:commentRss> <slash:comments>20</slash:comments> </item> <item><title>Quick Accessibility Testing</title><link>http://friendlybit.com/tutorial/quick-accessibility-testing/</link> <comments>http://friendlybit.com/tutorial/quick-accessibility-testing/#comments</comments> <pubDate>Sun, 24 Jun 2007 20:57:53 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/tutorial/quick-accessibility-testing/</guid> <description><![CDATA[A recent project of mine required me to do a quick review of the accessibility level of a site. Nothing serious, just to show what was possible to test and where the site scored right now. I managed to assemble a small list of tools that I believe did a rather good job. This article [...]]]></description> <content:encoded><![CDATA[<p>A recent project of mine required me to do a quick review of the accessibility level of a site. Nothing serious, just to show what was possible to test and where the site scored right now. I managed to assemble a small list of tools that I believe did a rather good job. This article is a list of those tools, and some tips on how to use them.</p><p>First off, to do a real accessibility test, you need real people, with real tasks to accomplish. These are not tools to replace people. Instead, they can give you a quick rundown on where you stand, and find things you&#8217;ve missed. I like to compare it with HTML validation: Validation is a great way to find your errors, but just because you validate does not mean you have good code.</p><p>Oh, by the way, I limited this to only free tools. Thought you&#8217;d like that. Also, for your enjoyment, I&#8217;ve split this article into three parts (you&#8217;re just soooo spoiled):</p><ul><li><a
href="#auto">Automatic testing</a></li><li><a
href="#semi">Semi-automatic testing</a></li><li><a
href="#manual">Manual testing</a></li></ul><h2 id="auto">Automatic testing</h2><p>Automatic testing is one of the quickest way you can check your site&#8217;s accessibility. What the authors of the below tools have done is to go through the available standards, and tried to find things that a computer can check. The tools will not find every error, but the things they do find, they find quickly. This is why I like to start with these.</p><ul><li><strong><a
href="http://validator.w3.org/">W3C Markup Validation Service</a></strong> &#8211; This is a real classic. It goes through your HTML or XHTML and makes sure you follow the basic syntactic rules. What does this have to do with accessibility? Well, if you deliver invalid code, you have no chance but to test every user agent and how it renders your page. Will you do that? Didn&#8217;t think so.<ul><li><strong>Bonus #1</strong>: Test up to 100 pages of your site at once with the <a
href="http://htmlhelp.com/tools/validator/">WDG HTML Validator</a>, just check &#8220;Validate entire site&#8221; before you validate.</li><li><strong>Bonus #2</strong>: As a developer it&#8217;s handy to get to know directly if the page you&#8217;re looking at validates or not. <a
href="http://users.skynet.be/mgueury/mozilla/">HTML Validator for Firefox</a> is an extension that sits in your browser&#8217;s status bar, and shows a red cross when something is wrong. When you double click the icon it shows you the exact error. Very handy.</li></ul></li><li><strong><a
href="http://jigsaw.w3.org/css-validator/">W3C CSS Validation Service</a></strong> &#8211; Even though screen readers don&#8217;t care much about the CSS you need to make sure it&#8217;s alright. Why? Because there&#8217;s more to accessibility than screen readers. Surely, most people that need your help are people surfing with their ordinary browsers: Internet Explorer, Firefox, and so on. To make sure all of them see the content and can interact with it, check your CSS for obvious errors automatically.</li><li><strong><a
href="http://www.cynthiasays.com/">Cynthia Says</a></strong>, <strong><a
href="http://webxact.watchfire.com/">WebXACT</a></strong>, and <strong><a
href="http://dev.wave.webaim.org/">Wave Accessibility Tool</a></strong> are all testing tools that are aimed at accessibility testing. They support both Section 508 (an American accessibility standard) and WCAG 1.0 (W3C&#8217;s own standard). Like the W3C tools above they do not catch all errors, in fact, most of the feedback you get is that you should check things manually. None the less, they often find simple errors that you have missed. Make sure you enable all extra options when using them.</li><li><strong><a
href="http://peterkrantz.com/bacc/">Basic accessibility analyzer</a></strong> is a much less known, but very impressive accessibility tester. Among other things it adds checks for proper heading structure and form labels, two things many have problems getting right. Built by Peter Krantz (former colleague of mine) and based on his <a
href="http://www.peterkrantz.com/raakt/wiki/">accessibility library</a> for Ruby).</li><li><strong><a
href="http://validator.w3.org/checklink">W3C Link Checker</a></strong> is another tool that&#8217;s easy to forget about. It walks through your site and picks out all the links it finds, checking that each of them works. Using a tool like this makes sense for more than accessibility reasons, but accessibility alone is a reason to use it.</li><li><strong><a
href="http://juicystudio.com/services.php#hosted">Juicy Studio</a></strong> hosts a whole series of useful online automatic tools. There&#8217;s tests for Readability, Your CSS file, Luminosity and Color Contrast (really useful), and an Image tester. You will most certainly find something to improve here.</li><li><strong><a
href="http://nikitathespider.com/">Nikita the spider</a></strong> is a great tool going through a lot of pages in search for errors. It crawls through a site and reports broken links, missing doctypes, and validation errors. Good for big batch checks after the fact.</li></ul><h2 id="semi">Semi-automatic testing</h2><p>Semi-automatic tools do part of the work for you but also requires that you twiddle with the results yourself. They can&#8217;t give you a &#8220;passed validation&#8221; stamp to put on your site, but correctly used they can give you deeper knowledge than the automatic ones.</p><ul><li><strong><a
href="http://www.visionaustralia.org.au/ais/toolbar/">Accessibility Toolbar</a></strong> for Internet Explorer is a collection of accessibility tools bundled as a toolbar. The best part of it is it&#8217;s support for color and contrast testing. Click &#8220;Colour -> Contrast Analyzer [application]&#8220;. By selecting &#8220;Simulation&#8221; from the menu you can see what your site looks like with different vision impairments. If you rely on color alone for some feature it will be obvious with some testing with this tool.</li><li><strong><a
href="http://www.standards-schmandards.com/projects/fangs">Fangs</a></strong> is a screen reader simulator in the form of a Firefox plugin. It&#8217;s simply shows (not reads) the text on a page as it would be read by a screen reader. This is a great way to get a feel of how your site works with non-visual browsers. Due to a bug in Firefox you need to run an English version of the browser before installing Fangs. It&#8217;s worth switching language to run Fangs, it helps that much.</li></ul><h2 id="manual">Manual testing</h2><p>Then we have the old fashioned gruntwork, manual testing. I&#8217;m going to put things here that you don&#8217;t use special tools for, just the browser and your accessibility knowledge.</p><ul><li><strong>Testing in several browsers</strong> is of course the most obvious way to test a site. If 10% of your users can&#8217;t access the site because it doesn&#8217;t work in Firefox you have a problem. So fire up both versions of Internet Explorer (6 and 7, not 5.5, it&#8217;s dead), the latest version of Firefox and Opera. If you have access to a Mac make sure it works on Safari there too. If not you have to try with the buggy <a
href="/other/safari-now-available-on-windows/">Safari 3 beta for Windows</a> (it&#8217;s better than nothing).</li><li><strong>Text zoom</strong> is one of the first things you should try. Firefox and Internet Explorer 6 relies on only enlarging the text, and not the whole window, so make sure you test that. Internet Explorer refuses to zoom text set in pixels, so keep a lookout for that. Text zoom helped me greatly when my old monitor broke and got all blurry. Thanks for letting me zoom!</li><li><strong>Turning off CSS and Javascript</strong> is another great way to make sure people can access your content. You don&#8217;t need to mind what the content <em>looks like</em>, just make sure it&#8217;s understandable and that things work as expected.</li><li><strong>Remove images</strong> and replace them with alt text. There&#8217;s options to do this with both <a
href="http://chrispederick.com/work/web-developer/">Web Developer Toolbar</a> and the previously mentioned Accessibility Toolbar. Testing your image alternatives helps both people that gets their content read to them and those that disable image loading due to a slow dialup connection.</li><li><strong>Keyboard navigation</strong> is another thing to test. Just push your mouse to the side and navigate using only the keyboard (use the tab-key, arrows and enter). Does things work like you expect? Good, you passed.</li></ul><p>That&#8217;s it. Lots of little tools and tricks you can use to make your site accessible to more people. If you ask <a
href="http://www.useit.com/alertbox/">Jakob Nielsen</a> or <a
href="http://www.456bereastreet.com/">Roger Johansson</a> if this is enough they will of course say no, but I say you should be proud anyway! Passing most of the above tests isn&#8217;t easy, and you&#8217;re certainly on the right track now. Well done!</p><p>Feel free to tip me off on more tools using the comments. Thanks for reading!</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/tutorial/quick-accessibility-testing/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>What is Web 2.0? Really.</title><link>http://friendlybit.com/js/what-is-web-20-really/</link> <comments>http://friendlybit.com/js/what-is-web-20-really/#comments</comments> <pubDate>Fri, 09 Mar 2007 23:59:52 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[JS]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/js/what-is-web-20-really/</guid> <description><![CDATA[Web 2.0 is really hot right now. One of Sweden&#8217;s biggest newspapers recently wrote a long article on their debate section. They had started linking back to blogs that linked to them, in a little box next to the article. The problem was that they had got into trouble with what blogs to link to. [...]]]></description> <content:encoded><![CDATA[<p>Web 2.0 is really hot right now. One of Sweden&#8217;s biggest newspapers recently wrote a long article on their debate section. They had started linking back to blogs that linked to them, in a little box next to the article. The problem was that they had got into trouble with what blogs to link to. After all, you can&#8217;t just link to anything, right?</p><p>Aside from starting to think about the implications of blog links, I got another interesting question in my head. What is Web 2.0 really? Most people working with interface development would say that Web 2.0 is everything that uses AJAX. But the newspaper didn&#8217;t use AJAX at all, and still they claim links to blogs is Web 2.0. Time for some research!</p><h2>The hunt for a definition</h2><p>The phrase &#8220;Web 2.0&#8243; was first put into widespread use at an O&#8217;Reilly conference in 2004. The organisers wanted to talk about a change that has happened on the web, and just bumping the version of the web seemed like a good idea. Paul Graham found this <a
href="http://www.paulgraham.com/web20.html#f1n">first try at defining Web 2.0</a> at the conference:</p><blockquote><p>&#8220;While the first wave of the Web was closely tied to the browser, the second wave extends applications across the web and enables a new generation of services and business opportunities.&#8221;</p></blockquote><p>Note that there&#8217;s no mention of AJAX there. Hell, there&#8217;s no mention of users either! They must have meant something else, and the definition might have changed over the years since then. Let&#8217;s keep looking for a good definition.</p><p>Tim O&#8217;Reilly comments on the issue two years later, in a <a
href="http://radar.oreilly.com/archives/2006/12/web_20_compact.html">clairification on his blog</a>:</p><blockquote><p>Web 2.0 is the business revolution in the computer industry caused by the move to the internet as platform, and an attempt to understand the rules for success on that new platform. Chief among those rules is this: Build applications that harness network effects to get better the more people use them.</p></blockquote><p>Tim acknowledges the change in meaning and talks about &#8220;network effects&#8221; here, something that starts to look a little bit more like what my idea of Web 2.0 is. But isn&#8217;t there still something missing? To me, that looks only like a small part of what I call Web 2.0. Let&#8217;s keep looking&#8230;</p><p>Gartner has tried to convince companies of the merits of Web 2.0 for a rather long time. In one of their many (business oriented) PowerPoint presentations they attempt to define &#8220;three anchor points around Web 2.0&#8243;:</p><blockquote><ul><li><strong>Technology and Architecture</strong> — Consisting of Web-oriented architecture (WOA) and Web platforms.</li><li><strong>Community</strong> — Looks at the dynamics around social networks and other personal content public/shared models, wiki and other collaborative content models.</li><li><strong>Business Model</strong> — Web service-enabled business models, mashup/remix applications and so forth.</li></ul></blockquote><p>I believe we&#8217;re getting closer. Gartner is making business models a separate point which I don&#8217;t agree with. Many of the biggest Web 2.0 sites didn&#8217;t have a business model when they started (and many still don&#8217;t). Digg has troubles covering their hosting cost with the tiny bit of money they acquire from their ads. Del.icio.us still doesn&#8217;t make any direct money (although they got sold to Yahoo, and they surely use the data&#8230;). My point is, a business plan isn&#8217;t one third of Web 2.0, it&#8217;s something sites add afterwards if things work out.</p><p>So let me state my own (slightly more general) definition of Web 2.0:</p><blockquote><p>&#8220;A collection of ideas and techniques that can be used to make more interactive sites&#8221;</p></blockquote><p>The thing is, just doing something in AJAX does not mean it gets the Web 2.0 stamp of approval. You need several of the ideas or techniques and you need to combine them in clever ways. So lets agree on the definition above and got look for ideas.</p><h2>Ideas that are part of Web 2.0</h2><p>I&#8217;d like to gather a whole bunch of ideas under the Web 2.0 roof. My selection is of course not all there is. Googling could uncover more I&#8217;m sure, but I think this is a good start.</p><ul><li><a
href="#generated">User generated content</a></li><li><a
href="#trust">Radical trust</a></li><li><a
href="#syndication">Syndication of content and services</a></li><li><a
href="#tail">Long tail</a></li><li><a
href="#collective">Collective intelligence</a></li></ul><h3 id="generated">User generated Content</h3><p>Many companies still view the web as a one-way medium, an extension of a paper catalogue, it&#8217;s main advantage being that it can be distributed to more people. It&#8217;s not like that any more! There are people that want to add content to your site, that want to contribute their ideas and thoughts. Why are you denying them to help you?</p><p>User generated content is content that your users are willing to give you. It can be everything from a simple &#8220;like it&#8221; or &#8220;don&#8217;t like it&#8221;, to fully featured articles written by users. The two most used ways of contributions are the simple ones: votes and comments. The author is still in full control of the content but users are given a chance to chip in with minor corrections. This is the least you can do. It&#8217;s what I do on this blog; let you chip in by commenting.</p><p>But if you have users that are passionate about your subject, users that are willing to use your site to get their ideas out, you should really endorse that! Allow them to post articles on your site, allow them to regroup and reprioritize according to their own wishes. It is technically possible, even rather easy to do; you just have to do it.</p><p>Six simple things your users can help you with:</p><ul><li>Reviews of your products</li><li>Comments on your articles</li><li>Stories about how people use your product</li><li>Multimedia using your product</li><li>Questions about your products</li><li>Articles in an area you choose</li></ul><h3 id="trust">Radical trust</h3><p><img
src="/files/web20/wikipedia.png" alt="Logotype of Wikipedia" class="secondary"><br
/> Another approach many sites have taken can be summarized as &#8220;radical trust&#8221;. It builds on the simple idea that users know what they want better than you do. So let them order, categorize, sort, select your data as they like!</p><p>This is exactly what wikis do. They acknowledge that there are more users doing good than doing bad. If that&#8217;s the case, why not let them in on your content directly, letting them edit and improve it like they want. They few people that do bad can be hunted away with a combination with versioning (saving old versions of content that&#8217;s easy to restore), and some simple monitoring. Wikis trust users, do you?</p><h3 id="syndication">Syndication of content and services</h3><p>Web 2.0 is not only about &#8220;user to website&#8221; interactivity. It&#8217;s also about letting other sites and tools interact with your site directly. This is often summarized as &#8220;syndication&#8221;.</p><p>It&#8217;s a very fancy word for a simple concept. Let me try to explain.</p><p>Somewhere you have some kind of database with your content, be it products in your e-store or posts on your blog. Usually you take that content, add some structure (HTML) to it, and send it to the user.</p><p>Another website that wants to access the same information could parse the HTML and try to understand what it means, something called &#8220;screen scraping&#8221; (or microformats ;). The problem with that method is that it&#8217;s very dependent on that the webmaster doesn&#8217;t decide to change the HTML. The other problem is that computers and humans often want different types of information. A computer that is going to parse a list of your products doesn&#8217;t need navigation like humans do. What you do is send your data directly to computers instead, without messing it up with HTML. Formats include: RDF, RSS, or perhaps custom XML through a Web Service.</p><p>Thing is, when you start syndicating your data you make it easier for others build services based on it. Now people get several entrances into your content instead of the one you produced. Again, your users are helping you reach more people.</p><p>Allowing full RSS feeds is another way of syndicating, I&#8217;m switching right now. Do you syndicate?</p><h3 id="tail">Long tail</h3><p><img
src="/files/web20/tail.png" alt="Graph of a sold units per item" class="secondary"><br
/> The theory of the long tail is one of the ideas that are usually associated with Web 2.0. It&#8217;s a business model that many companies that are successful on the web use. As with most business models they are invented after the fact, and as such I&#8217;m not sure it really belongs on this list, but people always bring it up, so let’s go. I&#8217;ll let you choose yourself.</p><p>Wikipedia describes the long tail like this:</p><blockquote><p>&#8220;Products that are in low demand [...] can collectively make up a market share that rivals or exceeds the relatively few current bestsellers and blockbusters, if the store or distribution channel is large enough&#8221;</p></blockquote><p>Most physical stores need to aim for the bestsellers to sell anything. There&#8217;s simply too few interested in odd products, to make it worth hiring store space and personnel to sell it.</p><p>Web based stores are in a different position. Selling another product usually means just adding another page to your site, no extra store space or personnel needed. In addition people are prepared to wait a couple of days before receiving their products. That time span means you can skip warehouses and not start producing your products until you have an order ready.</p><p>No more is there a need to estimate what people will be interested in and pre-order them. For the right kind of product the internet is a huge benefit. Amazon did it with books, iTunes did it with music, do you do it?</p><h3 id="collective">Collective intelligence</h3><p>You have let each user customize their experience and add content of their own. Now it&#8217;s time to organise that content to better help the everyone benefit from it. There&#8217;s hundreds of ways of doing it, but here&#8217;s a couple of things that you can present to your users:</p><ul><li><strong>The most popular swedish article right now&#8230;</strong> &#8211; Crawl all Swedish blogs and keep track of what they link to.</li><li><strong>Others that bought this book also bought&#8230;</strong> &#8211; Query your shipment table. Pick a product, select the number of times each other product appeared together with said product, and recommend that product to your customers. Amazon does this and it&#8217;s said that it has increased their profits considerably.</li><li><strong>You probably think this movie is a four out of five</strong> &#8211; A Swedish movie site give its users personalized ratings of movies. They find users that have similar taste as you have (based on your previous grades) and then checks what those people have rated the movie as.</li><li><strong>This is probably spam</strong> &#8211; Write a word filter that learns what is considered spam when users mark them. Share that filter with fellow users and let their markings stop your spam. A form of collective sieve filtering, Akismet does this.</li></ul><p>None of them are technologically hard to do, you just Google and copy other people&#8217;s samples. Why not?</p><h2>Techniques involved in Web 2.0</h2><p>But there are techniques involved too. Let&#8217;s go through a few of the important ones.</p><ul><li><a
href="#ajax">AJAX (and other javascript)</a></li><li><a
href="#feeds">Feeds (RSS, Atom)</a></li><li><a
href="#tags">Tags</a></li></ul><h3 id="ajax">AJAX (and other javascript)</h3><p>Everyone talks about AJAX together with Web 2.0, but I think it&#8217;s important they are kept separate.</p><p>AJAX is just a technology that helps prevent (full) page reloads. Instead you connect to the server silently in the background and receive your data that way. What&#8217;s the revolutionary about this technique? Nothing. It has been in use for at least 5 years. They new thing about it is that people started using it to build better interfaces.</p><p>Javascript is language that enables AJAX, and playing with reloads is not all it can do. Through some nifty use you can change attributes on any HTML element on the page. Move things around, react to mouse movement, fade and animate, it&#8217;s your choice. This means a lot of new controls become possible, ranging from simple sliders to interactive maps.</p><p>Why do most accessibility people hate it? Because most developers don&#8217;t know enough about accessibility. And when those start to use AJAX they disregard accessibility completely. Javascript and AJAX have different goals and I think a good compromise is making sure the basic functions of the site (buy a product and pay for it) works without javascript, but enabling it adds additional features.</p><p>When was the last time you used javascript to enhance your site? What was the last control you invented?</p><h3 id="feeds">Feeds (RSS, Atom)</h3><p><img
src="/files/web20/feeds.png" alt="The official feed icon" class="secondary"><br
/> Feeds are great for syndication of content. There are many different feed formats to choose from but they all have one purpose: to communicate pure data, skipping all design.</p><p>A feed is simply a list of feed items, each with an unique identifier. A user adds the address to their &#8220;feed reader&#8221; and it starts polling you, asking for updates. I have my reader set to just a couple of minutes, making sure I quickly notice changes in people&#8217;s feeds.</p><p>The good thing about feeds is that they make it easy to follow several at once. There&#8217;s no annoying different designs in the way if you don&#8217;t want to (you can always just visit the site if you want design). Feeds are getting more and more of a commodity; you should already be allowing your users the possibility to subscribe your content. Do you?</p><h3 id="tags">Tags</h3><p>Tags is another hip concept. It deals with the collective intelligence idea and how to categorize content efficiently. A tag consists of a phrase of some kind that describes a piece of content. This blog post could have the tag &#8220;javascript&#8221;.</p><p>There&#8217;s several ways you can use them. One is the just fix what tags are allowed and use them as regularly groups you can assign content to. But allowing more than one tag enable you to do more than just split things into groups, you can instead pick all contents bits that have the same tag. You can go further, allowing custom tags that the users can pick themselves. That gives you a wide array of descriptive words for your content, free to play around with. For example, if many users pick the same word, that one is probably a better descriptor.</p><p>Picking many bits of content and analysing all tags tied to them can be easily done with a tag cloud. In that you simply print all tags used after each other, and make those used often bigger. Doing this on a whole site is an effective way of giving users a snapshot of what you write about, something I know I like.</p><p>Can tags help you solve a categorization problem you have?</p><h2>Summary</h2><p>Now. To build a Web 2.0 site, pick from both of the lists above. You Google for more ideas and you work hard to interact with your users as much as possible. Web 2.0 is the combination that happens when your ideas and technology finally just works.</p><p>Your users want to help you, do you let them in?</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/js/what-is-web-20-really/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Click here to read this article</title><link>http://friendlybit.com/other/click-here-to-read-this-article/</link> <comments>http://friendlybit.com/other/click-here-to-read-this-article/#comments</comments> <pubDate>Wed, 18 Oct 2006 22:25:28 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Other topics]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/other/click-here-to-read-this-article/</guid> <description><![CDATA[No matter where you go on the web today you see those little anonymous links: &#8220;click here&#8220;. You clearly see them, often marked with a different color (links as they are), but you don&#8217;t immediately see where they go. Instead you need to read the text before, no wait, after, Oh! That&#8217;s a nice image [...]]]></description> <content:encoded><![CDATA[<p>No matter where you go on the web today you see those little anonymous links: &#8220;<a
href="javascript:void(0)">click here</a>&#8220;. You clearly see them, often marked with a different color (links as they are), but you don&#8217;t immediately see where they go. Instead you need to read the text before, no wait, after, Oh! That&#8217;s a nice image up there? Hmm&#8230; What was I looking for again?</p><p>It has been said over and over again; very few people actually read full articles unless they know it&#8217;s worth it. It&#8217;s all about trust. They must have previously gotten the idea that the article they are about to read is on topic, interesting, worth a read. It&#8217;s a tricky situation, before they have read the article they need to somehow already know that they are on the right track. The solution is of course good links.</p><p>A link tells you something about the page you&#8217;re about to visit. You get a quick two or three word summary, often from an author you have previously deemed trustworthy (after all, you&#8217;re reading her/his site are you not?). When you are on a trusted site and click on a link you know that the destination is a good one. Why would there be a link there otherwise? You also know roughly what the site is about, it&#8217;s summarized and underlined in blue right there. You click and you start reading.</p><p>Instead of the above scenario I see the same problem repeated over and over again. Instead of using good link text people use &#8220;click here&#8221; to name their links. You force me to read a lot more than I should need to. <strong>Damn you!</strong></p><p>But not only do you annoy your users. Search engines use link text as a primary source of information about the site linked to. Who wants to be found on Google only by those that search for &#8220;click here&#8221;? Sure, Google sometimes act like a persistent human and reads the surrounding text too, but it also values those words less. What? I can&#8217;t use Google to find you? <strong>Damn you!</strong></p><p>Many screen readers have an option to only show the links for a site. This is a useful feature if you are browsing, navigating, searching for something, but know it&#8217;s not on the current page. Since screen reader users are dependent on hearing things they navigate much slower than an average user and all ways of speeding up that process helps. On a page with the usual &#8220;click here&#8221; links, the generated list will be useless. The links are taken out of context and users are forced to read the whole site to see where a certain link goes. Why are you punishing them when it&#8217;s so easy to do it the right way? <strong>Damn you!</strong></p><p>Sometimes the existence of “click here” links has to do with design. It&#8217;s very popular right now to remove the underlining on links. This makes links harder to see and you need other methods to show the user where to click. One of them is telling the user what to do in text instead: &#8220;I want you to buy my product, but you can&#8217;t by clicking directly, you need to click here&#8221;. &#8220;Click me&#8221; designers: <strong>Damn you!</strong></p><p>And it&#8217;s so easy.</p><blockquote><p> Link with the words that best describe the content you link to.</p></blockquote><p>Now. No one is going to do funny things with their comment signatures or trackbacks will they?</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/other/click-here-to-read-this-article/feed/</wfw:commentRss> <slash:comments>33</slash:comments> </item> <item><title>Judging the technical quality of a site</title><link>http://friendlybit.com/tutorial/judging-the-technical-quality-of-a-site/</link> <comments>http://friendlybit.com/tutorial/judging-the-technical-quality-of-a-site/#comments</comments> <pubDate>Sat, 30 Sep 2006 22:28:08 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Accessibility]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/tutorial/judging-the-technical-quality-of-a-site/</guid> <description><![CDATA[When you look at a website to determine its quality on the code level, you need a different set of metrics than you did some years ago. This article is my attempt at specifying what metrics I use. Have a look at them, do they match yours?
First I look at the validation. Does the front [...]]]></description> <content:encoded><![CDATA[<p>When you look at a website to determine its quality on the code level, you need a different set of metrics than you did some years ago. This article is my attempt at specifying what metrics I use. Have a look at them, do they match yours?</p><p>First I look at the <strong>validation</strong>. Does the front page validate? Do all sub pages of the site validate? If they don’t, what kind of errors are there? While validation isn’t the most important metric, it’s a very quick way to get a feeling of if the coder is “web standards aware” or not. I use the <a
href="http://users.skynet.be/mgueury/mozilla/">Firefox validation plugin</a> that checks all the pages I visit and puts a little green check in the statusbar if the current page validates. For doing sitewide validation I use <a
href="http://www.htmlhelp.com/tools/validator/">htmlhelp’s validation spider</a> and let it loose on the site (check &#8220;Validate entire site&#8221;). Validation is slowly catching on as a standard tool in the webdev toolbox. Someone who is not using the validator probably doesn&#8217;t know much about web standards.</p><p>While on the subject of validation: don’t forget <strong>validating the CSS</strong>. There’s a lot of basic errors that the validator finds that only leads to errors in some browsers. The W3C CSS validator might help you fix some of those right away. Before you complain: the CSS validator has a few issues. If you use line-height, you need pass it a decimal number; 1 becomes 1.0, 0 becomes 0.0. Secondly, if you use CSS 2.1 or CSS 3 properties you need to inform the validator you do. Add the <a
href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Ffriendlybit.com&#038;usermedium=all&#038;profile=css21">URL parameter “profile”</a> with the value set to “css21” or “css3”, and revalidate. CSS errors and whether or not the style sheet is <strong>well organized</strong> clearly propagates what <a
href="http://friendlybit.com/css/levels-of-css-knowledge/">CSS level</a> the developer is on.</p><p>Next I look at the <strong>doctype</strong>. That single line of information at the first line of the HTML that defines what language the coder is using. Use of <a
href="http://accessites.org/gbcms_xml/news_page.php?id=23">Strict or Transitional</a> is what matters most. Most pages that validate as transitional can with very small changes be upgraded to strict. And why not? Strict signals that an effort has been made to ensure that the document separates structure from design. If you know how, there’s no reason not to. At this stage I also check that the doctype is properly set, there’s an IE bug that makes IE render things badly (quirks mode) if the doctype isn’t the first element of the page. Incorrect use of doctype is also a common way to recognize a beginner.</p><p>Sites that pass the above code tests get another batch of checks. Is the code <strong>semantic</strong>? (ie. does the HTML describe the content?) I look at elements, classes, and ids in use. Do they describe the content they contain? Bad sites use class names tied to design. Mediocre sites use general names like “wrapper” or “column2”. Great sites use “copyright”, “invitation”, and “footnote”. Many CMS:es generate design-oriented classes and ids, and only a few reach mediocre. This is one way to see that a site was robot-made.</p><p>Another code issue is the <strong>content over HTML quotient</strong>. For just a few lines of content you shouldn’t have to need huge amounts of HTML. You shouldn’t need 10 divisions just for one header. A high content over HTML quotient signals that the developer knows what he’s doing. An “overmarked” site means that the developer is on the right track but suddenly forgot that content is more important than the code behind it.</p><p>One last angle is the <strong>accessibility</strong> one. How will a screen reader read this site? Is all the content of the site available as readable text? Does the site require javascript when it isn’t needed? A good place to see if someone knows about accessibility (on the web) or not is checking the forms. Fieldsets, legends, and labels: they all tell their story about the developer and his knowledge about accessibility.</p><p>A quality site ranks high in all of the above.</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/tutorial/judging-the-technical-quality-of-a-site/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Tricks to make your site easier to use</title><link>http://friendlybit.com/html/make-your-site-easier-to-use/</link> <comments>http://friendlybit.com/html/make-your-site-easier-to-use/#comments</comments> <pubDate>Tue, 01 Aug 2006 17:17:40 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[HTML]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/html/make-your-site-easier-to-use/</guid> <description><![CDATA[There are lots of little tricks you can use to make your sites easy to use. Problem is that they are so obvious, you don’t think of them. This article is an attempt to share some of the ideas that I did think of. I&#8217;m sure I missed some; feel free to add your own [...]]]></description> <content:encoded><![CDATA[<p>There are lots of little tricks you can use to make your sites easy to use. Problem is that they are so obvious, you don’t think of them. This article is an attempt to share some of the ideas that I <em>did</em> think of. I&#8217;m sure I missed some; feel free to add your own tricks in the comments.</p><p>You rarely think of sites as &#8220;easy to use&#8221;; they just work. You enter them, click here and there, and don&#8217;t think much about how the navigation works or what to do. That&#8217;s the feeling we should go for.</p><h2>Separate the interaction layer</h2><p>A very simple way of making it easier for your users is clearly marking what can be interacted with. Are users expected to click on those small arrows of yours? Are the only links to your content through your headers? Then you better make sure those arrows or headers come across as clickable.</p><p>The fastest way to convey that something is clickable is using blue underlined text. Why? Because that&#8217;s what most sites use (see <a
href="http://www.google.com">Google</a>, <a
href="http://www.amazon.com">Amazon</a>, <a
href="http://www.ebay.com">eBay</a>). It&#8217;s what we have grown up with and it just works. Designers tend to dislike blue underlined links and have started to use other colors and skip the underlines. Jakob Nielsen, the notorious usability expert, writes about what you should think of in his <a
href="http://www.useit.com/alertbox/20040510.html">article about the visual style of links</a>. It&#8217;s a good reminder.</p><p>You don&#8217;t have to stop with just the links though. Are your images clickable? Then make sure they connect with your links somehow. If you pick orange as your link color, make something around or in the images use that color too. Make your form fields use the same color. When someone enters your site it should be possible to quickly get an idea of what to do: &#8220;I can either click a link in the menu, search for a phrase, or click this thumbnail&#8221;. Don&#8217;t make people confused by mixing in orange on the static parts of your site.</p><p>With some cleverness I&#8217;m sure this idea can be expanded to work even without being dependent on color. A small figure? A border? Use your imagination, and be sure to tell me about it.</p><h2>Split up your content</h2><p>You know those portal sites? There&#8217;s one big reason they don&#8217;t work. There&#8217;s too much content cramped into a too small area. A portal is rarely about something specific, it&#8217;s about everything that they can possibly fit in. Whatever content you are looking for you will have to search hard for it. Do you use the portal parts of Yahoo or MSN? Didn&#8217;t think so.</p><p>There has been a long discussion recently about how badly designed pages work better. <a
href="http://www.andyrutledge.com/bad-design.php" title="Bad design harms business, it does not help it">Like Andy Rutledge</a> I mostly disagree but I can understand how bad design works for ad-driven sites. Is the point of your pages to make people click ads? Then make them confused, make them think your navigation is the ads, I&#8217;m sure it drives your revenue up. If the point of your site is the content on it, stay away from being a portal.</p><p>The simplest way of avoiding the portal-look is splitting up your content. Do you have info on both crocodiles and stock numbers? Don&#8217;t put them on the same page. Make sure only the people interested in stocks get the stock info. Anyone else will just see them as &#8220;something I am not looking for&#8221;. If you have lots of info from diverse fields, perhaps a <a
href="http://dmoz.org/" rel="nofollow">directory</a> is a better bet?</p><h2>Use <code >&lt;label&gt;</code> for form elements</h2><p>Bad form elements are one of the most annoying things on the web. Worst are those tiny little checkboxes you need to check to specify if you like to get spammed or not. They are simply too small. There is an easy solution though, that everyone should be aware of: the label element. What it does is associate some text with the checkbox. The browsers use this information by making a click on the text check the box. Note: this also works for radio buttons. Here&#8217;s the markup you need:</p><pre><code >HTML:
&lt;form action=""&gt;
   &lt;input type="checkbox" checked="checked" id="send_spam"&gt;
   &lt;label for="send_spam"&gt;Send me all your "newsletters"&lt;/label&gt;
&lt;/form&gt;

CSS: [Update: This does not work in Safari, might confuse people.]
label { cursor: pointer; }</code></pre><p>There&#8217;s a lot more to learn about how to make your forms usable and accessible. Just head over to the Web standards project&#8217;s <a
href="http://www.webstandards.org/learn/tutorials/accessible-forms/beginner/">Accessible forms tutorial</a> (don&#8217;t miss the intermediate one either).</p><h2>Make it interesting</h2><p>You have a few seconds to get you visitor hooked to your site. In that time the user needs to understand he&#8217;s on the right track. &#8220;Ah, this site seems to be about web development&#8221; is what I want my users to feel when they enter Friendly Bit. Therefore almost all my pages have a little info box that tells the visitors just that. To just put this info on your front page isn&#8217;t enough, search engines or other external links can make them enter deeper into your site. Please put this little info-box somewhere on all of your sites. It&#8217;s one of the best ways for me to see I&#8217;m where I want to be.</p><p>To actually get your content interesting you need to work on your writing. My best tip is to follow the points Liz Strauss summed up nicely in her post about <a
href="http://www.successful-blog.com/1/9-1-things-every-reader-wants-from-a-writer/">what a reader wants</a>.</p><p>Read through your text over and over again, out loud if you need to. Pay attention to typography, don&#8217;t make your paragraphs too long and use headers extensively.</p><h2>Conclusion</h2><p>These are just some of the tricks I find myself using on my sites. I&#8217;m sure this site does not follow all of them perfectly but that doesn&#8217;t stop me from telling you about them, does it? Pick and choose as you like, but try to reach make you visitors feel that &#8220;it just works&#8221;-feeling.</p><p>Do you have any tricks you can share?</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/html/make-your-site-easier-to-use/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>Correcting the 20 pro tips (.NET magazine)</title><link>http://friendlybit.com/css/correcting-the-20-pro-tips/</link> <comments>http://friendlybit.com/css/correcting-the-20-pro-tips/#comments</comments> <pubDate>Wed, 26 Jul 2006 03:01:06 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/css/correcting-the-20-pro-tips/</guid> <description><![CDATA[.NET magazine is a fairly big web development magazine. I&#8217;ve recently been referenced to its articles from many separate places, and often found the articles to be of good quality. The last one, called 20 pro tips, was not too good though, so I&#8217;m going to go through and correct it. I&#8217;m not trying to [...]]]></description> <content:encoded><![CDATA[<p>.NET magazine is a fairly big web development magazine. I&#8217;ve recently been referenced to its articles from many separate places, and often found the articles to be of good quality. The last one, called <a
href="http://www.netmag.co.uk/zine/design-tutorials/20-pro-tips">20 pro tips</a>, was not too good though, so I&#8217;m going to go through and correct it. I&#8217;m not trying to attack the magazine here (remember &#8220;friendly&#8221; in the URL), I just want people to know these things.</p><p>The article consists of 20 points that a pro should know. Here are the points I found errors in:</p><h2>Stylesheets: importing vs linking (point 3)</h2><p>The point is that importing is better than linking since many older browsers will not apply the CSS then. This is correct but they also go as far as suggesting developers to add a separate stylesheet for Netscape 4 (NS4). As someone that has experimented with NS4 I can say that its CSS support is bad. Really bad. Considering the near zero percent of NS4 users I would strongly advise against fixing your site for it. That is of course, unless your site logs suggests you have a lot of users with that (old) browser.</p><p>There&#8217;s also a code error here, simple.css is included twice, and the second @import reference should probably be advanced.css. Not a big error but might confuse someone.</p><h2>Smarter gradient backgrounds (point 4)</h2><p>Again a good point. CSS can be used to repeat background images on any element, not just body. This means you can save on file size by replacing big images with smaller ones. The article then suggests using 1 pixel wide images which is something old versions of IE has problems with. A lot of repetitions can easily get the browser very slow so my best bet would be to make them at least 5 pixels wide.</p><p>In the code you would be better off using shorthand notation (I know, this is not a big deal). To add an extra pedagogic twist something else than body could have been used:</p><pre><code >form { background: white url(background.png) repeat-x; }</code></pre><h2>IE Box Model Hack (point 8)</h2><p>A lot of confusion here. Internet Explorer 5 (IE5) uses another box model than the modern browsers. The padding and border are not added to the outside of a specified width, but instead included in it. This means that if you specify a 500 pixel wide box and add a 10 pixel border to it, it will still be 500 pixels wide. Some say that this is a better way of calculating widths but that&#8217;s missing the point. The point is that according to the W3C box model the padding should be added <em>outside</em> of the width.</p><p>This problem does not appear in Internet Explorer 6 (IE6) if you <a
href="/css/cross-browser-strategies-for-css/#mode">include a proper Doctype</a>.</p><p>So IE5 is broken, should you care? Again, check your logs if people still use the ancient IE5. My guess is that they don&#8217;t which saves you a lot of work. There&#8217;s probably <em>no need for this hack</em>.</p><p>Also, the <a
href="http://tantek.com/CSS/Examples/boxmodelhack.html">Box model hack</a> is Tantek&#8217;s hack using the voice-family property to add a &#8220;}&#8221; to your CSS. It&#8217;s really ugly. The article uses the same name for another solution to the problem: wrapping the offending element in another element and moving the padding to that box. That&#8217;s a much cleaner way of fixing the problem.</p><h2>Space saver (point 9)</h2><p>Don&#8217;t use inline styles for styling. Try to keep all your styles in the external CSS file. Two more general ways of saving space across browsers are outlined in my <a
href="/css/cross-browser-strategies-for-css/#default">cross-browser CSS article</a> (the star-selector and using a premade CSS file that resets browser defaults.</p><h2>Format fundamentals (point 11)</h2><p>Good points about image formats. Use 8-bit PNGs instead of GIF, it makes you smaller files.</p><p>An addition: JPEGs are generally smaller than 32-bit PNGs but that&#8217;s because JPEG removes information in your image to improve compression. Remember that, if you use JPEG.</p><p>If you use PNG you need to know that IE has problems showing them in the exact correct color (<a
href="http://hsivonen.iki.fi/png-gamma/">technical explanation of the PNG color problem</a>). If that matters a lot to you, use another format (remember that all PNGs change color in IE, so images still match each other). Friendly Bit uses PNGs only.</p><h2>The ‘title’ and ‘alt’ attributes (point 12)</h2><p>Don&#8217;t use the title attribute unless it&#8217;s needed to convey what you mean. In the example it does not make sense at all, why repeat the alt text? The main point is still true though, always use the alt attribute and make good use of the title attribute.</p><h2>Wrapping text around images (point 17)</h2><p>Come on! Using the align attribute is going against what was just recommended, use of semantic markup (point 14). Alignment is style and should be added through CSS, nothing else. Adding a strict Doctype and validating will generate an error on this kind of ugliness. Use <code >img.typeOfImage { float: left }</code> instead.</p><p>&nbsp;</p><p
class="first">That&#8217;s it for now, hope you learned something. I just wanted to make sure my readers know more than the .NET readers :)</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/css/correcting-the-20-pro-tips/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Why you should date a front-end developer</title><link>http://friendlybit.com/other/why-you-should-date-a-front-end-developer/</link> <comments>http://friendlybit.com/other/why-you-should-date-a-front-end-developer/#comments</comments> <pubDate>Sat, 22 Jul 2006 11:01:31 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[Other topics]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/other/why-you-should-date-a-front-end-developer/</guid> <description><![CDATA[You&#8217;ve heard all those rumours of how nerdy looking people in glasses obsess over numbers they call things like &#8220;pie&#8221; or &#8220;eee&#8221;. You heard they dress up like aliens and go to big&#8230; ehm&#8230; seminars, where people sleep in sleeping bags and only eat bad food. Then you have the other side of it, in [...]]]></description> <content:encoded><![CDATA[<p>You&#8217;ve heard all those rumours of how nerdy looking people in glasses obsess over numbers they call things like &#8220;pie&#8221; or &#8220;eee&#8221;. You heard they dress up like aliens and go to big&#8230; ehm&#8230; seminars, where people sleep in sleeping bags and only eat bad food. Then you have the other side of it, in a couple of years they will have well-paid jobs at some major technological company. They also don&#8217;t switch partners easily, if they find someone they like they stick to him/her for, like, forever. You might also be able to hold an intellectual conversation with someone from this group, just try to stay away from tech-talk, you don&#8217;t want get hurt. If you are able to get their eyes off the screen, say hello to <em>the programmers</em>.</p><blockquote><p> Typical comment: &#8220;Linux is much better than Windows&#8221;</p></blockquote><p>On a trendy club in the middle of town you&#8217;ll find the next group of people. Some of these also have glasses, but not because they need them, more because it makes them look hip. These people never talk directly with the programmers; a few words could easily ruin their reputation completely. While these people also make a lot of money it&#8217;s more spread out over the year. They sometime get a creative period in January and paint images of pink goats that they sell for thousands of dollars, just to get no ideas at all in February and be broke. People from this group should be interesting if you&#8217;re in for fame and fortune, passion and flame, but be aware that you might need a couple of partners to switch between depending on their weekly mood. If they get a break in their busy schedule, you should say hello to <em>the designers</em>.</p><blockquote><p> Typical comment: &#8220;Did you see those shoes she was wearing? They where teeeeerrible!&#8221;</p></blockquote><p>In the third corner, not talking with any of the two groups above, we have a smaller group of people. These started as programmers but didn&#8217;t like sitting isolated in basements. They wanted to work more with people and what people wanted. After studying methods for doing that they suddenly stopped thinking about anything else. They quickly made enemies with the designers because of their often pretty creations that made people go &#8220;oh, this looks good&#8221; instead of using the product right away. People in this group are great at handling people, and are often good company on dates, that is, if you can take their know-it-all attitude. They tend to know everything that matters and love to tell you about it. They get decent salary and tend to stick with partners that stay &#8220;useful&#8221; (not too pretty) and focus on right things. If you find the most functional way to say hello you should try it with these people, the <em>usability experts</em>.</p><blockquote><p> Typical comment: &#8220;Door handles are really quite bad, 60% of users would be better off with something else&#8221;</p></blockquote><p>But I&#8217;m not here to talk about programmers, designers, or usability experts. I&#8217;m here to talk about a fourth group of people. These are the people that all three of the previous actually talk to. Not because they necessarily want to, but because they need it to get things done. These are the people that get frowned upon for being bad programmers, lousy designers, and for knowing too little about usability. Truth is, they still they manage to ship sites that actually work. They tend to be good at coding, but not in the way programmers are used to. While they don&#8217;t have the status of designers, they are visible in the same way. They are actually good at explaining their thinking to people around them (often without technical experience), and know who they design for. You&#8217;ll have no problems saying hello to the <em>front-end developers</em>.</p><blockquote><p> Typical comment: &#8220;Don&#8217;t use tables for layout&#8221;</p></blockquote><p>So, this fourth group of people have all the good characteristics of the other groups. Just like programmers they are able to have an intellectual conversation with someone. If you like the &#8220;nerdyness&#8221; that pretty much defines programmers, you&#8217;ll sometimes find it with the front-enders too (just try mentioning that you like XHTML). Like designers they do get some of the fame when a site gets successful, since they are the ones pulling the strings and making things work they are quite visible. But unlike designers, these people will not desert you because you used the same t-shirt two days in a row. As a final strike you&#8217;ll find that front-enders are good with people, just like the usability experts. They even know about the people that will be using the site and will gladly meet with them if they get the chance.</p><p>So front-end developers are simply the best kind of date, so what are you waiting for? Go out there and get one before they run out!</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/other/why-you-should-date-a-front-end-developer/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Concept: Four layers of web development</title><link>http://friendlybit.com/css/concept-four-tier-web-development/</link> <comments>http://friendlybit.com/css/concept-four-tier-web-development/#comments</comments> <pubDate>Sat, 03 Jun 2006 16:45:07 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[JS]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/css/concept-four-tier-web-development/</guid> <description><![CDATA[When thinking about web development on the client side, I tend to think of four different layers. Any (well built) framework will cater for all of these layers and all good developers will be aware of them. The layers I&#8217;m thinking about are: Data, Structure, Design, and Behavior. This article discusses all four of those [...]]]></description> <content:encoded><![CDATA[<p>When thinking about web development on the client side, I tend to think of four different layers. Any (well built) framework will cater for all of these layers and all good developers will be aware of them. The layers I&#8217;m thinking about are: Data, Structure, Design, and Behavior. This article discusses all four of those and explains how they relate.</p><h2>Data layer</h2><p>The data layer is the most important one and strangely the one most people get confused about. HTML is <em>not</em> the data layer, the <strong>content</strong> is. The data layer is the raw data that you are presenting, the text, the images, the sound, the video, whatever content you want to serve. For bigger sites the data is often stored in a database or perhaps XML files somewhere and then processed server side every time someone wants to access it.</p><p>This layer is also where all websites should start. What content do you have? If the content is bad no pretty design or fancy Web 2.0 technique is going to cater for that. In fact, content together with bad uses of the other layers, <a
href="http://www.andyrutledge.com/bad-design.php">might still work</a>!</p><p>One last point to make about data is that you should make sure to use the best possible media for representing your content. If it can be text, use text! Don&#8217;t use images for text, narrate your podcasts (or at least provide a text-summary), put your videos online with descriptions to them. Having that text there helps you convey your point, search engines will find you, your users will be able to skim read while it loads and disabled users will get access to at least some of your content.</p><h2>Structural layer</h2><p>The structural layer is where the much misunderstood HTML comes to play. HTML&#8217;s job is to take the data it has received from the data layer and <a
href="http://friendlybit.com/html/datatypes-of-html/" title="Some examples of data structures you have available in HTML">add some structure to it</a>. Mark up what parts are headers, make sure lists get the HTML that best describes them, split the page up in the important parts and so on.</p><p>HTML also adds some semantics to the data but since it&#8217;s quite a limited dictionary we have to work with I believe this is secondary. If you happened to have the kind of data that HTML happens to catch with its elements be sure to use them, if not make sure you at least capture the structure of it.</p><p>You know you have done this level right if your site works with nothing but data and structure.</p><h2>Design layer</h2><p>The design layer is where you define the looks of your data. Design requires a good basic structure to be useful. On the web you should use CSS for this layer, a language that has been built upon the idea of a solid structure and is remarkably powerful. As you know CSS targets certain elements and then defines their look. Without a solid structure this is not possible.</p><p>Good designers often point out that only working with the looks of a site will not accomplish good design. They also work on the structural layer by making sure structurally important content gets the most exposure in the design. This is also strengthens the idea that structure is a layer upon which design works.</p><h2>Behavioral layer</h2><p>Behavior is the last layer I&#8217;m going to talk about. It&#8217;s the one that&#8217;s least important; data, structure and design are all more effective in conveying your message. None the less, added behavioral functionality <em>can</em> be powerful if executed properly on top of the other layers.</p><p>Javascript is the most used language for adding new behavior to websites. With the whole <a
href="http://en.wikipedia.org/wiki/Web_2.0">Web 2.0</a> and <a
href="http://en.wikipedia.org/wiki/Ajax_%28programming%29">AJAX</a> wave we are experiencing many new sites that adds a behavioral layer without even thinking about it. We should be careful; becoming dependent on the new behavior (the site not working without it) means you will lose many potential visitors, the most important single one being search engines. Behavior should always be added separately and only enhance the experience for those that has it enabled. This is what&#8217;s called <a
href="http://adactio.com/atmedia2005/" title="Jeremy Keith presents the idea of unobtrusive javascript">unobtrusive javascript</a>.</p><h2>Putting it all together: four tier web development</h2><p>Putting all these four parts together we get the following:</p><p><img
src="/files/four-tier-webdev.png" alt="Adding layers step by step to a paragraph of text"></p><p>Is this the same mental model you use? Let me know through comments.</p><p>[<strong>Update:</strong> Threehouse has an image up <a
href="http://treehousemagazine.com/images/screenshots/4screen2.jpg">showing the four layers</a> in the context of javascript connection the layers together.]</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/css/concept-four-tier-web-development/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Improving the web; Blogging, Google and Web standards</title><link>http://friendlybit.com/css/improving-the-web/</link> <comments>http://friendlybit.com/css/improving-the-web/#comments</comments> <pubDate>Fri, 19 May 2006 23:12:31 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/css/improving-the-web/</guid> <description><![CDATA[The web has really changed the way we do things. Remember those paper timetables? No need for them anymore, we simply type in our destination on a box and get a step by step guide for what to do. Finding recipies? No need to look through books any more, just type in a few ingredients [...]]]></description> <content:encoded><![CDATA[<p>The web has really changed the way we do things. Remember those paper timetables? No need for them anymore, we simply type in our destination on a box and get a step by step guide for what to do. Finding recipies? No need to look through books any more, just type in a few ingredients on your favourite food site. The examples are countless but there is no time for us to sit back and relax just yet. The web <em>can</em> be improved. We can get more people to publish their stuff online, we can get better tools for finding relevant info, and we can make the information accessible to more people. In this article I&#8217;m going to talk a little about each of those three points.</p><h2>We need more information</h2><p>We need more information. People will argue and say &#8220;No, there&#8217;s enough junk online already&#8221; but I don&#8217;t care. More information is a good thing. The web is currently not a good representation of the world at large. The is a million technology weblogs and five about shoemaking. Another million sites about how it&#8217;s like to be a teenager today and another five about life as an 80 year old. You know what I&#8217;m getting at? We need a wider variety of people on the web, not only people that are just like us.</p><p>Another thing to remember is that text only is one facet of information. With today’s bandwidth available we can look at live video from all over the world. We can listen to live radio and music just as easy as we read the web. We then have a look at availability. I&#8217;d say that at most one out of 1000 people publishing on the web is using something else than text (This site is no exception). I know that there are people out there that have a video camera, that have a microphone, and know how to put it up on the web. But they don&#8217;t.</p><p>This lack of variety in information is a real problem. It builds barriers towards people we just don&#8217;t know anything about and it fools us surfers to believe the world is smaller than it seems. &#8220;No, there can&#8217;t be any problems with the Chinese government, we would have heard about it!” or what about &#8220;Christianity must be the biggest religion, just look at what people are writing most about&#8221;.</p><p>There <em>are</em> ways the tackle this problem and the concept of blogging is one of them. It makes it easy to almost anyone, anywhere to just start writing in a few minutes. You can be anonymous, you don&#8217;t have to tell the truth, there&#8217;s no age check and it doesn&#8217;t cost you money. This opens up to real diversity on the web. The technology exists, what we need to do is get people online and make them use it. So tell your friends to pick something they love or hate and blog about it. We need more information.</p><h2>We need relevant information</h2><p>The next step, after we have gotten a larger and more diversified web, is to start filtering it. I&#8217;m not talking censoring here, I mean filtering in the sense to &#8220;filter what you want&#8221;. This can be tied to a certain task you want to accomplish or it can be a strong interest of yours that you want to follow. It doesn&#8217;t matter which, what matters is that there are ways to easily find relevant information.</p><p>There are many ways of determining relevancy on the web and the one most successful is linking. Links are like recommendations; anyone that links to a site is telling their readers a certain site is recommended. It&#8217;s relevant for the subject at hand and it contains good information. If you are just looking for random information about something looking at a few links might be enough. For example, if <a
href="http://www.456bereastreet.com">Roger Johansson</a> links to something web related I can be pretty sure it&#8217;s good.</p><p>For more task oriented queries we need something else. If someone is looking for a plane ticket they will probably not know who the authority in that area is. Google is the search engine that has had the greatest success with solving this problem and the solution is simple. Gather the recommendations for as many sites as possible and reply to queries with what <em>most</em> people recommend. Just think about it, if 100 people recommend FlyPlane and 1000 people AirFlight, who would you go for?</p><p>In reality it isn’t that simple, but in essence that’s how search engines work. Something that is important to note is that the system encourages people to write <em>good content</em>. Why is that? Simply because good content gets linked to, and more links means it&#8217;s probably more relevant. This way Google and all the others are actively encouraging people to improve the web. Good, isn&#8217;t it?</p><h2>Making information accessible</h2><p>So, we have lots of information from all over the world and we have the tools to find the most relevant info at any point. The last step is actually delivering the information to our users. This is where web standards come to play.</p><p>In the early nineties browser makers raced to get the coolest new features included in their browsers. The result was things like blinking text, different methods of representing &#8220;layers&#8221; and scrolling text. Web developers had a hard time keeping up with browser differences and often you had to construct two or more separate pages to send people to depending on what browser they used.</p><p>The W3C acknowledged this and presented a solution. Instead of browsers trying to find the coolest additions, let a standards organization handle the new additions. Let hundreds of people sit together and discuss new ideas long before they are implemented. When everyone has had a chance to say their meaning and problems has been eliminated you release a document presenting the new features together with implementation details. Now the browser makers can race over who supports the most recommended standards instead, and webmasters can just pick a set of standards that is well supported. One way of doing things instead of many incompatible ones.</p><p>Right now, the current recommendation is to use the strict versions of HTML of XHTML for structure, CSS for design and Javascript for behaviour. Using those standards means that your site is accessible by more than just the few browsers you have tested with. Both people and automated crawlers that that are after just your content can easily skip your design. People with old browsers will still be able to view your content, even though they don’t see the design the still get the content.</p><p>If you adopt the recommendations I mentioned above you have gotten quite far, but there is more. <em>Accessibility</em> is an area in web development that has gotten far too little exposure. It&#8217;s focused on making it easier to people with various disabilities, varying from broken arms and color blindness to dyslexia. Previously people cared about old browsers, it’s time for a shift towards caring about people instead. Read up on accessibility, Mark Pilgrim&#8217;s <a
href="http://diveintoaccessibility.org/introduction.html">Dive into Accessibilty</a> is a good start.</p><h2>In summary</h2><p>I&#8217;ve gone over three areas where I believe there is space for improvement on the web.</p><ul><li>More diversified information. Get your friends on the web!</li><li>Better tools for filtering all the information depending on what we need. Build new and better tools for doing this!</li><li>Use web standards and care about accessibility. I try to help in this area with the help of this blog.</li></ul><p>Now I&#8217;m interested in your comments. What do you think? Are there more areas we need to look into?</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/css/improving-the-web/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>What beginners ask for (and what I tell them)</title><link>http://friendlybit.com/css/what-beginners-ask-for-and-what-i-tell-them/</link> <comments>http://friendlybit.com/css/what-beginners-ask-for-and-what-i-tell-them/#comments</comments> <pubDate>Mon, 27 Mar 2006 21:22:07 +0000</pubDate> <dc:creator>Emil Stenström</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[Tutor]]></category><guid
isPermaLink="false">http://friendlybit.com/css/what-beginners-ask-for-and-what-i-tell-them/</guid> <description><![CDATA[Being in an IRC help channel lets you meet a lot of people. Many are fresh beginners that just wrote their first lines of CSS and stumbled over something they found strange. When you look at their questions from a perspective you quickly find that many of them are repeated and come back over and [...]]]></description> <content:encoded><![CDATA[<p>Being in an IRC help channel lets you meet a lot of people. Many are fresh beginners that just wrote their first lines of CSS and stumbled over something they found strange. When you look at their questions from a perspective you quickly find that many of them are repeated and come back over and over again. This article is an attempt to list a few of the important concepts that people seem to have trouble with.</p><h2 id="separation">Separation of content and design</h2><p>Separation is the fundamental idea that CSS builds upon. Ten years ago there was only one way to make pages that worked across browsers: you mixed everything in one large file and copied that file if you wanted pages that looked similar. Then <a
href="/css/interview-why-did-css-succeed/" title="Interview with Håkon Wium Lie">Håkon</a> and Bert came up with CSS and things got much easier. Their idea is to make the code easier to maintain by extracting everything that has to do with design, put it in an external file and link to that file when we want a certain look. CSS is all about design and HTML is all about content and structure.</p><p>Even though this sounds good in theory there are a lot of cases where it&#8217;s hard to determine whether something is design or not. Is the company logo design or content? When you start thinking about those kinds of problems you know you&#8217;re on the right track. You can find a couple of examples of the separation I&#8217;m talking about on the second page of my <a
href="/css/beginners-guide-to-css-and-standards/2/">beginners guide</a>.</p><h2 id="clearing">Clearing floats</h2><p>Floats and clearing is another problem almost everyone has in the beginning. What I like to use when I explain how floats work is the old align-attribute on images. Long time ago, when you only could use HTML for design, and wanted the text to &#8220;flow around the image&#8221; you used:</p><pre><code  class="incorrect">&lt;img src="image.jpg" align="right"&gt;</code></pre><p>The above code is clearly design (placement of the image) so we should use CSS instead of HTML for this.</p><pre><code  class="correct">img#id_of_image { float: right; }</code></pre><p>CSS is not restricted to float only images, all elements can be floated. This opens up to both new layout methods and confusion. To place three divisions side by side, just give them a width and float them. You can see a layout based on this in my <a
href="/css/simple-css-templates/">article about layouts</a> or the <a
href="/files/templates/?style=3columns_float_float_float&#038;cols=3">3-column example</a>.</p><p><em>Clear</em> is also important to know of. Setting <code >clear: both;</code> on an element makes it move downwards until it&#8217;s below all previous floats. That was how the footer in the above example was made.</p><p>Floats and clears are not always easy to understand though. One thing people often ask about is what&#8217;s wrong when their container isn&#8217;t expanded to contain everything inside it. Eric Meyer excellently explains both that problem and its solution in the article <a
href="http://www.complexspiral.com/publications/containing-floats/">Containing Floats</a>.</p><h2 id="validation">Validation is a timesaver</h2><p>Why is validation so important? Because I just can&#8217;t stand you forgetting your alt attributes? Because I think that valid pages are better than non-valid? No and No. It&#8217;s because validation finds the simple errors. If I misspell width or some other property a validation will find it. If I nest my tags incorrectly a validation will find it. If I forget to close a quote in a link? A validation will find it. Validation is a great timesaver because it actually finds all the small errors that humans have trouble finding. To make validation even easier I use the <a
href="http://users.skynet.be/mgueury/mozilla/">Html Validator extension</a> for Firefox. A little icon in the bottom right corner tells me when I have an HTML error. Validation is a great tool, use it.</p><h2 id="accessibility">Accessibility is not about blind users</h2><p>It could be that I&#8217;m trying to explain why someone should add labels to their form. I say something in the lines of:</p><blockquote
class="alternate"><p> <strong>Me:</strong><br
/> &#8220;Not having labels hurts your site’s accessibility&#8221;</p></blockquote><blockquote><p> <strong>User:</strong><br
/> &#8220;But I don&#8217;t have any blind users on my site!&#8221;</p></blockquote><p>Accessibility is about making it easy for as many as possible to access your content. With, often simple, means you can make it much easier for people to access your site. Let me give you some examples or people your can help by thinking about accessibiliy.</p><table><tr><th>User</th><th>How you can help</th></tr><tr><td>Partly color blind</td><td>Don&#8217;t use only color to convey information</td></tr><tr><td>People unable to use a mouse. Either because of some physical disability or simply that they are linux hackers and dislike it.</td><td>Make sure keyboard navigation works as intended</td></tr><tr><td>Young users or users with another native language than yours</td><td>Don&#8217;t overcomplicate your text</td></tr><tr><td>People with a slow connection</td><td>Mind the size of your site</td></tr></table><p>The list could continue for a whole article. People from those groups would very much like to see your site and buy your stuff just like anyone else. Read up on the basics of accessiblity, it helps a lot of people. Robert Johansson has written a nice article about how you could <a
href="http://www.456bereastreet.com/archive/200603/evaluating_website_accessibility_part_1_background_and_preparation/">evaluate your website&#8217;s accessibility</a>.</p><h2 id="harder">Some things are harder to do with CSS, that does not mean CSS is a bad language</h2><p>People that are switching from tables to CSS often complain about what a bad language CSS is for not supporting <em>[insert favourite feature]</em>. I did so too in the beginning. What makes me like the language is all the other powers it gives me. It is not possible to do everything as easily with CSS as it is with tables. But other things are much easier, and some things aren&#8217;t even possible with tables. There are good parts and bad parts and to me the good parts greatly outweigh the bad ones.</p><h2 id="equal">Equal height columns</h2><p>The last thing I&#8217;m going to talk about in this article is equal height columns. The problem is that your have two or three columns of content that stretch down the page. You want the columns to stretch as far as the longest column but the content inside does not expand the columns that far.</p><p>This problem is most easily solved by a technique known as <em>faux columns</em>. Add a container to the columns you have and then add a background image to that container. The image will repeat down that page and make it look like your columns take up exactly as much vertical space. I&#8217;ve added a <a
href="http://friendlybit.com/files/templates/?style=faux_columns&#038;cols=3&#038;nofooter=1">faux column example</a> for you to look at.</p> ]]></content:encoded> <wfw:commentRss>http://friendlybit.com/css/what-beginners-ask-for-and-what-i-tell-them/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 5/10 queries in 0.014 seconds using disk

Served from: c8.67.364a.static.theplanet.com @ 2010-03-12 21:18:25 -->