<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Clker.com - weblog</title>
	
	<link>http://www.clker.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 20 Jun 2009 04:35:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Clker" type="application/rss+xml" /><feedburner:emailServiceId>Clker</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Clipart tracer: New feature coming soon…</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/YeF3lE95a1Y/</link>
		<comments>http://www.clker.com/blog/2009/06/16/clipart-tracer-new-feature-coming-soon/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 03:26:44 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[clker.com]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=201</guid>
		<description><![CDATA[For the previous months, I&#8217;ve been putting my spare time towards a new feature that I believe will greatly help adding free vector images. The feature is an online tool, that helps tracing raster images. It works by uploading your raster image, then tracing it online to produce the vector in a semi-automated way.
There are [...]]]></description>
			<content:encoded><![CDATA[<p>For the previous months, I&#8217;ve been putting my spare time towards a new feature that I believe will greatly help adding free vector images. The feature is an online tool, that helps tracing raster images. It works by uploading your raster image, then tracing it online to produce the vector in a semi-automated way.</p>
<p>There are many useful tools available now, however none of them is able to produce what I percieve as a clipart. The tools that I regularly use are potrace (from inside inkscape) and sometimes vectormagic. The problem with both is that if you try vectorizing a colored image they will produce a fuzzy blurry svg, which does not look anywhere close to a clip art.</p>
<p>I had excellent results with potrace on lineart images, and I had no luck with colored ones.</p>
<p>This online tool solves a big part of the colored images problem. Some of the test results are here (showing both the raster and the vectorized result):</p>
<p><span style="text-decoration: underline;"><strong>Good results:</strong></span></p>
<p>Rib cage:</p>
<p><a href="http://www.clker.com/clipart-28725.html" target="_blank"></a><a href="http://www.clker.com/clipart-28725.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Rib Cage" src="http://www.clker.com/cliparts/9/0/f/f/12452070821563492883rib-cage.svg.thumb.png" alt="" /></a> <a href="http://www.clker.com/clipart-28726.html" target="_blank"><img style="margin: 5px; border: 0px initial initial;" title="Rib Cage Png" src="http://www.clker.com/cliparts/1/b/5/6/12452072211539945848Rib_cage.png.thumb.png" alt="" /></a></p>
<p>Double cherry:</p>
<div><a href="http://www.clker.com/clipart-28723.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Cherry Double" src="http://www.clker.com/cliparts/a/a/e/1/12451202891983101708cherry-double.svg.thumb.png" alt="" /></a> <a href="http://www.clker.com/clipart-28721.html" target="_blank"><img style="margin: 5px; border: 0px initial initial;" title="Cherry Double" src="http://www.clker.com/cliparts/e/4/3/2/12447867631133435093Cherry_double.png.thumb.png" alt="" /></a></div>
<p><br/>
<div>Man wearing topper:</div>
<div><a href="http://www.clker.com/clipart-28682.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Man wearing topper" src="http://www.clker.com/cliparts/e/0/3/5/1244175386101134965drawing.svg.thumb.png" alt="" /></a> <a href="http://www.clker.com/clipart-28719.html" target="_blank"><img style="margin: 5px; border: 0px initial initial;" title="Man Wearing Topper" src="http://www.clker.com/cliparts/0/0/7/9/1244780361376336362man-wearing-topper.jpg.thumb.png" alt="" /></a></div>
<div>Lady answering phone:</div>
<div><a href="http://www.clker.com/clipart-28713.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Serviced Office Space" src="http://www.clker.com/cliparts/f/6/e/e/1244693766651764455serviced-office-space.svg.thumb.png" alt="" /></a></div>
<div><a href="http://www.clker.com/clipart-28715.html" target="_blank"><img style="margin: 5px; border: 0px initial initial;" title="Secretary Answering Phone " src="http://www.clker.com/cliparts/a/7/0/e/1244726546872883118secretary-answering-phone.jpg.thumb.png" alt="" /></a></div>
<p><br/>
<div><span style="text-decoration: underline;"><strong>Unsuccessful / Bad results:</strong></span></div>
<div>1967 hair style:</div>
<div><span><strong><a href="http://www.clker.com/clipart-28717.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="1967 Hair Style" src="http://www.clker.com/cliparts/a/e/2/8/12447797562786109211967-hair-style.svg.thumb.png" alt="" /></a> <a href="http://www.clker.com/clipart-28718.html" target="_blank"><img style="margin: 5px; border: 0px initial initial;" title="1967 Hair style" src="http://www.clker.com/cliparts/7/3/b/e/12447801258940937771967_hairstyle.jpg.thumb.png" alt="" /></a></strong></span></div>
<div>It doesn&#8217;t work well either with lineart. potrace is a better candidate if you have lineart images.</div>
<div>All the raster images are in public domain. The lady answering the phone was obtained from NCI (national cancer institute website), the rest from commons.wikimedia.org .</div>
<div>Those images resemble what I call clip arts more than the output of vector magic or adobe illustrator. The tool produces an outline, which I colored using inkscape &#8211; so there is no expectation about coloring now <img src='http://www.clker.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</div>
<div>Currently, I&#8217;m adding the required services on the website to communicate with the component and as soon as they&#8217;re done I&#8217;ll have it up for everyone to play with.</div>
<img src="http://feeds.feedburner.com/~r/Clker/~4/YeF3lE95a1Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/06/16/clipart-tracer-new-feature-coming-soon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/06/16/clipart-tracer-new-feature-coming-soon/</feedburner:origLink></item>
		<item>
		<title>Apache hanging once in a while – caught the culprit</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/OYYyKyL2YlM/</link>
		<comments>http://www.clker.com/blog/2009/04/19/apache-hanging-once-in-a-while-caught-the-culprit/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 17:20:07 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[Internet programming]]></category>
		<category><![CDATA[clker.com]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=196</guid>
		<description><![CDATA[My server has been suffering from unexplainable apache hangs. Once in a while, apache would stop accepting new connections. It will keep running in memory but all incoming connections will timeout. Since then, my only solution was a bash script that runs every minute and tries to read a text file from the website. If [...]]]></description>
			<content:encoded><![CDATA[<p>My server has been suffering from <a href="http://www.clker.com/blog/2009/03/15/restarting-the-server-once-in-a-while-might-some-times-help/">unexplainable apache hangs</a>. Once in a while, apache would stop accepting new connections. It will keep running in memory but all incoming connections will timeout. Since then, my only solution was a bash script that runs every minute and tries to read a text file from the website. If it fails, it would restart apache.</p>
<p>On Fri evening, I replaced APC with Memcache. Although I know that Memcache is little bit slower than APC due to lots of reasons including network overhead, yet it was APC&#8217;s turn to get tested in the sequence of tests I&#8217;ve been running. It seems that APC was the reason apache was hanging. I know that some big websites like facebook use APC, but maybe they are using a different version. I also know that youtube is using memcahe, so APC was one of my least suspects. The server has been running for the past 48 hours without a crash or a hang, which is more than its average. Usually, it used to hang once every 20 hours or so.</p>
<p>Since I had my own caching functions, that finally called APC, the amount of code changes were very small. Hopefully it will continue running without problems.</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/OYYyKyL2YlM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/04/19/apache-hanging-once-in-a-while-caught-the-culprit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/04/19/apache-hanging-once-in-a-while-caught-the-culprit/</feedburner:origLink></item>
		<item>
		<title>Injuries from working on computers – can that be real?</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/WJotbpZWek8/</link>
		<comments>http://www.clker.com/blog/2009/04/08/injuries-from-working-on-computers-can-that-be-real/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 02:17:28 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=194</guid>
		<description><![CDATA[Some people think that injuries only happen if you&#8217;re doing physically demanding work. However, lots of people who work in the computer / IT field suffer injuries, it&#8217;s just that they don&#8217;t know it!
Have you ever felt back pain or muscle spasm &#8211; may be one that lasted like 6 weeks without being able to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clker.com/clipart-map-symbols-hospital-blue.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Hospital Blue" src="http://www.clker.com/cliparts/1/4/7/0/1207314060955899368hospital blue.svg.thumb.png" alt="" /></a>Some people think that injuries only happen if you&#8217;re doing physically demanding work. However, lots of people who work in the computer / IT field suffer injuries, it&#8217;s just that they don&#8217;t know it!</p>
<p>Have you ever felt back pain or muscle spasm &#8211; may be one that lasted like 6 weeks without being able to turn your head, lift heavy things? Some people think that <a href="http://en.wikipedia.org/wiki/Carpal_tunnel_syndrome">Carpal Tunnel Syndrome</a> is yet another injury cause by compressing a nerve as a result of using keyboards.</p>
<p>The most common is the back / shoulder / neck pains and it happens frequently to people who spend a lot of time in front of computers &amp; screens. I had a back pain recently, that reduced my activity a lot for the past eight weeks. It was horrible, once I come back from work, I&#8217;m almost grounded. That was the fourth time I get this pain, and the second time being so bad to make me go to the doctor &amp; last around 6-8 weeks.</p>
<p>My doctor referred me to a physical therapist, who gave me a good reason for this happening after some tests. As he explained, I suffer from neck muscle atrophy &#8211; more on the left side, which is simply weakening in the muscles of the neck due to not using those muscles. As a result, my other muscles had to exert more effort to carry the neck, and the result is pain in the other muscles. I noticed that when I sit and read, I actually lean my head on my hand, so the head is being carried a significant amount of time.</p>
<p>I was advised to do some exercises that should help build the neck muscles and stretch the back muscles that have pain. I also noticed lots of other people doing exercieses while sitting &#8211; so I wasn&#8217;t alone in this computer related back pain world. Best way to avoid it, stop sitting funny &amp; exercise a couple of time a week &amp; I hope no one else gets it.</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/WJotbpZWek8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/04/08/injuries-from-working-on-computers-can-that-be-real/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/04/08/injuries-from-working-on-computers-can-that-be-real/</feedburner:origLink></item>
		<item>
		<title>Restarting the server once in a while might some times help !</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/fqsPo8elVYc/</link>
		<comments>http://www.clker.com/blog/2009/03/15/restarting-the-server-once-in-a-while-might-some-times-help/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 03:22:01 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=191</guid>
		<description><![CDATA[Lately, I&#8217;ve been having so much unexplainable troubles with apache. After a two or three days of work it suddenly stops accepting connections. A test shows that it is still running with lots of forked children.
After lots of research on the internet I found more than a dozen of possibilities. One case was apache 2.2.9 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clker.com/clipart-mainframe-server.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Mainframe server" src="http://www.clker.com/cliparts/2/0/1/d/1231686170190013628kattekrab_Mainframe.svg.thumb.png" alt="" /></a>Lately, I&#8217;ve been having so much unexplainable troubles with apache. After a two or three days of work it suddenly stops accepting connections. A test shows that it is still running with lots of forked children.</p>
<p>After lots of research on the internet I found more than a dozen of possibilities. One case was <a href="http://bugs.php.net/bug.php?id=46218">apache 2.2.9 and php 5.2 combo</a>, with php running as a module. At that point when Apache runs out of MaxClients it stops killing children as they run out of MaxRequestsPerChild. At that point, apache just sits and rejects connections. Issuing a reload did not seem to solve the problem and the only way it would start responding is by restarting the server.</p>
<p>The server was not rebooted approximately for 270 days, which I don&#8217;t think should pose any problem. The only problem that I know of is holes in memory pages due to allocation and freeing memory, which may result in kswap running more, however that was not the case as I didn&#8217;t see kswap jumping up when I ran top.</p>
<p>Rebooting the server seemed to at least partially resolve this problem. Now when I lower the MaxClients and MaxRequestsPerClient to force apache in this bug, it seems that reloading works. The ulimate test is to leave it running, and see what will happen in a week.</p>
<p>That made me go back to <a href="http://www.clker.com/blog/2009/02/13/writing-my-own-webserver/">writing my own webserver project</a>. It actually turned to be much simpler that I anticipated, and I think that I will split my spare time part to add some new features in php, and the other to finish this c web server.</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/fqsPo8elVYc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/03/15/restarting-the-server-once-in-a-while-might-some-times-help/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/03/15/restarting-the-server-once-in-a-while-might-some-times-help/</feedburner:origLink></item>
		<item>
		<title>Writing my own webserver</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/rFJTM8tAL10/</link>
		<comments>http://www.clker.com/blog/2009/02/13/writing-my-own-webserver/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 04:23:42 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[clker.com]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=187</guid>
		<description><![CDATA[I&#8217;ve been seriously considering writing my own webserver instead of running apache. Although apache is very good, yet, sometimes I feel things will be much funner if write this website even in C. My reasoning is although PHP is fast and APC provides a further boost, yet at one point I will have to cluster [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clker.com/clipart-25694.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Buggi Server" src="http://www.clker.com/cliparts/d/8/d/3/123440510361688352buggi_server.svg.thumb.png" alt="" /></a>I&#8217;ve been seriously considering writing my own webserver instead of running apache. Although apache is very good, yet, sometimes I feel things will be much funner if write this website even in C. My reasoning is although PHP is fast and APC provides a further boost, yet at one point I will have to cluster a set of machines and proxy the requests because of various tweeks that need to get done in every piece of software.</p>
<p>So, I started considering seriously how to write a webserver that is optimized for high requests and can make better use of memory, and how to resolve the biggest problem in C, which is crashes due to memory allocation and writing outside arrays without slowing down the C speed even a bit.</p>
<p>I ended up writing a small library does that memory stuff, and a small webserver and I&#8217;ve been playing with them for a while and without a surprise, I found that I can serve more than 1000 pages a second very easy without attempting to optimize dealing with strings and just with basic STL string, which in my opinion is very slow.</p>
<p>What I still need to do is to support the CGI stuff, so I can execute the current PHP code and run it beside the C and that will give me more time to port the website pages in phases without stopping the website, or delaying running this server.</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/rFJTM8tAL10" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/02/13/writing-my-own-webserver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/02/13/writing-my-own-webserver/</feedburner:origLink></item>
		<item>
		<title>Flex – Zooming in on large bitmaps, with large zooms</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/AaqkoRn5puA/</link>
		<comments>http://www.clker.com/blog/2009/02/06/flex-zooming-in-on-large-bitmaps-with-large-zooms/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 08:32:18 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=181</guid>
		<description><![CDATA[If you didn&#8217;t know, Flex and actionscript flash imposes a limit on the bitmap size. For some reason, the max width or height cannot exceed 2048 pixels.
When applying a transformation matrix to a bitmap, it seems that Flex generates a temporary bitmap in memory, even for the area that are not going to be displayed. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clker.com/clipart-3322.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Macchina fotografica digitale" src="http://www.clker.com/cliparts/e/0/4/5/11949854151340247081macchina_fotografica_di_01.svg.thumb.png" alt="" /></a>If you didn&#8217;t know, Flex and actionscript flash imposes a limit on the bitmap size. For some reason, the max width or height cannot exceed 2048 pixels.</p>
<p>When applying a transformation matrix to a bitmap, it seems that Flex generates a temporary bitmap in memory, even for the area that are not going to be displayed. Since there is a limit on the bitmap size, usually it won&#8217;t resize or zoom more than a certain amount.</p>
<p>This problem will show if you have a graphical application that views a bitmap, which has a zoom-in feature. The solution that I found to this problem is: after calculating the transformation matrix (scaling from zoom, translation from the scroll bars), calculate the inverse of the matrix. Using your viewport co-ordinates (usually will be 0,0 and width,height) determine the area in the bitmap that will appear if the bitmap was zoomed. Copy that area to a temporary bitmap, Calculate a new transformation matrix composed only of the zoom, and apply it to the temporary image. That&#8217;s it!</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/AaqkoRn5puA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/02/06/flex-zooming-in-on-large-bitmaps-with-large-zooms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/02/06/flex-zooming-in-on-large-bitmaps-with-large-zooms/</feedburner:origLink></item>
		<item>
		<title>Linux average load</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/cjyOTViHQqo/</link>
		<comments>http://www.clker.com/blog/2009/01/31/linux-average-load/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 17:08:34 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=182</guid>
		<description><![CDATA[It was the first time yesterday that I took sometime to understand what is the &#8220;average load&#8221; that appears with the top shell command. It turns out that it is a very informative number, if used right.
Linux averages the number of processes running, or can run &#8211; but may be blocked waiting for I/O. The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clker.com/clipart-23701.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Motudo Powerlifting" src="http://www.clker.com/cliparts/c/0/b/6/12178614971385339408motudo_Powerlifting.svg.thumb.png" alt="" /></a>It was the first time yesterday that I took sometime to understand what is the &#8220;average load&#8221; that appears with the <strong>top </strong>shell command. It turns out that it is a very informative number, if used right.</p>
<p>Linux averages the number of processes running, or can run &#8211; but may be blocked waiting for I/O. The average is calculated three times: for a minute, 5 minutes and 15 minutes.</p>
<p>In case that no processes were blocked on I/O, this number should always be less than the number of available CPU cores. For insance, if the load average is 2.6 this means that in average 2.6 processes were running or wanted to run. If you have only two cores, this means that there&#8217;s in average 0.6 processes that cannot find an available CPU to run, which means that you need to upgrade your machine (or server).</p>
<p>Since this number grows when processes are blocked on I/O, it is nice to know whether there&#8217;s any blocked on I/O or not before going ahead and spending the last penny to buy new hardrware. The solution is a tool called <strong>atop</strong>. If the disks are stressed and cannot keep up with the requests (and consequently processes will be waiting for the disk) you will see the DSK line (or lines if you had more than one) in red.</p>
<p>At that point you should find who is the culprit, and do something to run that process in a better way.</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/cjyOTViHQqo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/01/31/linux-average-load/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/01/31/linux-average-load/</feedburner:origLink></item>
		<item>
		<title>Caching SQL with PHP</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/-mU9vj5yOdc/</link>
		<comments>http://www.clker.com/blog/2009/01/05/caching-sql-with-php/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 15:57:35 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=174</guid>
		<description><![CDATA[I wrote an blog entry about caching sql with php before, since then I re-wrote the php functions that I&#8217;ve been using. The main difference betweek the older functions, and what I will describe here is storing in memory versus the disk.
The old routines stored the results on disk and in doing so I assumed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clker.com/clipart-10756.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Database Base de donn  e" src="http://www.clker.com/cliparts/b/1/6/b/1195431327409717356database_base_de_donn__01r.svg.thumb.png" alt="" /></a>I wrote an blog entry about <a href="http://www.clker.com/blog/2008/05/12/caching-sql-results-with-php/">caching sql with php</a> before, since then I re-wrote the php functions that I&#8217;ve been using. The main difference betweek the older functions, and what I will describe here is storing in memory versus the disk.</p>
<p><span id="more-174"></span>The old routines stored the results on disk and in doing so I assumed that I will not create a mess of files. However, about two months ago I found that my server is almost running out of disk space. By testing, I found that more than 500GBs are being used by temporary and small files thrown in the tmp directory, all of which are used to store SQL queries.</p>
<p>I tried to delete those files, and it didn&#8217;t work since the files were too many for the rm command. I had to run find, pipe the result to awk and write an rm command for every file. I also had to nice the process as I didn&#8217;t want to block apache or the database servers running. Finally, after approximately 60 hours the delete process was done.</p>
<p>I had to change the way the sql results are being stored to avoid future complications and to save the disk space. I found a PHP module called APC, which remains running with apache and can store PHP data in a way similary to assocative arrays.</p>
<p>After testing, I found that around 200-300 Megs of ram is sufficient to generate more than 99% hit ratio, which is excellent. What remained is how to store the data.</p>
<p>I had to insert a set of functions that perform update, delete and insert. Those functions will invalidate the cache of the corresponding rows. In my older website versions, I used to connect to the database for every user hit. Now, I do a lazy check in a function called dbh() which is not listed here. In some instances, if the same user keeps on browsing the website and reads pages whose rows are already cached, the website will respond without actually running any queries against the database, and it can run toally 100% out of memory. I found that in some cases those simple routines can lead to speedups of approximately 30x. Only if the user requests a row which is not cached, the code will then query the database (or update), cache the results and return it.</p>
<p>The function <strong>cache_query_row</strong> takes in the table name, and the condition that will be used to query. The condition is an associative array containing the field names in the keys, and the required values as data. It will then check the cache, if that field is not in the cache, it will query the database and store the result. The function expects to find at most one row. If more than one row exists, the first is returned and stored.</p>
<p>In case there was more than one row in the database, then start by first doing a query for the keys, and calling the cache storage functions to store the row keys, then fetch every single row using <strong>cache_query_row</strong>.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="coMULTI">/* This code is released under the latest version of the GNU Public License.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* It is provided AS IS in the hope it will be useful, without any garantees or waranties</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* of any type. If you do not have a copy of the license, you may download one from:</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* http://www.gnu.org/copyleft/gpl.html .</span></div>
</li>
<li class="li2">
<div class="de2"><span class="coMULTI">&nbsp;*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* NOTE: Some parts of the code references other functions in other libraries that I built,</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* specifically the function query_row, is assumed to return the first row of multiple</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">&nbsp;* matches in a database query.</span></div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">**/</span></div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$cache_prefix</span>=<span class="st0">&#8216;/tmp/clkercache/&#8217;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$cacheenabled</span>=<span class="nu0">1</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> makewhere<span class="br0">&#40;</span><span class="re0">$array</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$where</span>=<span class="st0">&#8221;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$array</span> <span class="kw1">as</span> <span class="re0">$key</span> =&gt; <span class="re0">$value</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/strlen"><span class="kw3">strlen</span></a><span class="br0">&#40;</span><span class="re0">$where</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="re0">$where</span>.=<span class="st0">&#8216; and &#8216;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; <span class="re0">$where</span>.=<span class="re0">$key</span>.<span class="st0">&quot;=&#8217;&quot;</span>.<a href="http://www.php.net/pg_escape_string"><span class="kw3">pg_escape_string</span></a><span class="br0">&#40;</span><span class="re0">$value</span><span class="br0">&#41;</span>.<span class="st0">&quot;&#8217;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">return</span> <span class="re0">$where</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> cache_fetch<span class="br0">&#40;</span><span class="re0">$filename</span>, <span class="re0">$expiration</span>=<span class="nu0">3600</span><span class="br0">&#41;</span> <span class="co1">// One hour cache</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/global"><span class="kw3">global</span></a> <span class="re0">$cache_prefix</span>, <span class="re0">$cacheenabled</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$filename</span>=<span class="re0">$cache_prefix</span>.<span class="re0">$filename</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span>!<span class="re0">$cacheenabled</span><span class="br0">&#41;</span> <span class="kw1">return</span> <span class="kw2">false</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// See if it exists in APC</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$content</span>=apc_fetch<span class="br0">&#40;</span><span class="re0">$filename</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span>!<span class="re0">$content</span><span class="br0">&#41;</span> <span class="kw1">return</span> <span class="kw2">false</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$data</span>=<a href="http://www.php.net/unserialize"><span class="kw3">unserialize</span></a><span class="br0">&#40;</span><a href="http://www.php.net/base64_decode"><span class="kw3">base64_decode</span></a><span class="br0">&#40;</span><span class="re0">$content</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re0">$data</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> cache_store<span class="br0">&#40;</span><span class="re0">$filename</span>,<span class="re0">$data</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/global"><span class="kw3">global</span></a> <span class="re0">$cache_prefix</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$filename</span>=<span class="re0">$cache_prefix</span>.<span class="re0">$filename</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$coded</span>=<a href="http://www.php.net/base64_encode"><span class="kw3">base64_encode</span></a><span class="br0">&#40;</span><a href="http://www.php.net/serialize"><span class="kw3">serialize</span></a><span class="br0">&#40;</span><span class="re0">$data</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">apc_add<span class="br0">&#40;</span><span class="re0">$filename</span>,<span class="re0">$coded</span>,<span class="nu0">3600</span><span class="br0">&#41;</span>; <span class="co1">// One hour</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> cache_query_row<span class="br0">&#40;</span><span class="re0">$tablename</span>, <span class="re0">$condition</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$coded</span>=<a href="http://www.php.net/serialize"><span class="kw3">serialize</span></a><span class="br0">&#40;</span><span class="re0">$condition</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$row</span>=cache_fetch<span class="br0">&#40;</span><span class="st0">&quot;clker-$tablename-$coded&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span>!<span class="re0">$row</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$row</span>=query_row<span class="br0">&#40;</span><span class="st0">&quot;select * from $tablename where &quot;</span>.makewhere<span class="br0">&#40;</span><span class="re0">$condition</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$row</span>!=<span class="kw2">FALSE</span><span class="br0">&#41;</span> cache_store<span class="br0">&#40;</span><span class="st0">&quot;clker-$tablename-$coded&quot;</span>,<span class="re0">$row</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re0">$row</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> cache_delete<span class="br0">&#40;</span><span class="re0">$filename</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/global"><span class="kw3">global</span></a> <span class="re0">$cache_prefix</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$filename</span>=<span class="re0">$cache_prefix</span>.<span class="re0">$filename</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">apc_delete<span class="br0">&#40;</span><span class="re0">$filename</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> cache_update_row<span class="br0">&#40;</span><span class="re0">$tablename</span>, <span class="re0">$condition</span>, <span class="re0">$row</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/global"><span class="kw3">global</span></a> <span class="re0">$dbh</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$coded</span>=<a href="http://www.php.net/serialize"><span class="kw3">serialize</span></a><span class="br0">&#40;</span><span class="re0">$condition</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Force requery next time</span></div>
</li>
<li class="li1">
<div class="de1">cache_delete<span class="br0">&#40;</span><span class="st0">&quot;clker-$tablename-$coded&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="co1">// Update the database</span></div>
</li>
<li class="li1">
<div class="de1">dbcon<span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">// Lazy test to connect to the database if needed</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$res</span>=<a href="http://www.php.net/pg_update"><span class="kw3">pg_update</span></a><span class="br0">&#40;</span> <span class="re0">$dbh</span>,</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$tablename</span>,</div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$row</span>,</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$condition</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re0">$res</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> cache_insert_row<span class="br0">&#40;</span><span class="re0">$tablename</span>, <span class="re0">$row</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/global"><span class="kw3">global</span></a> <span class="re0">$dbh</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$coded</span>=<a href="http://www.php.net/serialize"><span class="kw3">serialize</span></a><span class="br0">&#40;</span><span class="re0">$condition</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Update the cache</span></div>
</li>
<li class="li1">
<div class="de1">cache_store<span class="br0">&#40;</span><span class="st0">&quot;clker-$tablename-$coded&quot;</span>,<span class="re0">$row</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Update the database</span></div>
</li>
<li class="li2">
<div class="de2">dbcon<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$oldsqltime</span>=<span class="re0">$sqltime</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$sqltime</span>-=getmicrotime<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$res</span>=<a href="http://www.php.net/pg_insert"><span class="kw3">pg_insert</span></a><span class="br0">&#40;</span> <span class="re0">$dbh</span>,</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$tablename</span>,</div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$row</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re0">$res</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">function</span> cache_delete_row<span class="br0">&#40;</span><span class="re0">$tablename</span>, <span class="re0">$condition</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/global"><span class="kw3">global</span></a> <span class="re0">$dbh</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$coded</span>=<a href="http://www.php.net/serialize"><span class="kw3">serialize</span></a><span class="br0">&#40;</span><span class="re0">$condition</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="co1">// Update the cache</span></div>
</li>
<li class="li1">
<div class="de1">cache_delete<span class="br0">&#40;</span><span class="st0">&quot;clker-$tablename-$coded&quot;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Update the database</span></div>
</li>
<li class="li1">
<div class="de1">dbcon<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="re0">$oldsqltime</span>=<span class="re0">$sqltime</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$sqltime</span>-=getmicrotime<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$res</span>=<a href="http://www.php.net/pg_delete"><span class="kw3">pg_delete</span></a><span class="br0">&#40;</span> <span class="re0">$dbh</span>,</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$tablename</span>,</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$condition</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re0">$res</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<img src="http://feeds.feedburner.com/~r/Clker/~4/-mU9vj5yOdc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2009/01/05/caching-sql-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2009/01/05/caching-sql-with-php/</feedburner:origLink></item>
		<item>
		<title>Wordpress plugin version 1.2 released</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/ttHNP3YR77E/</link>
		<comments>http://www.clker.com/blog/2008/12/26/wordpress-plugin-version-12-released/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 19:59:35 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[Clker WordPress Plugin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[clker.com]]></category>
		<category><![CDATA[clker.com plugin]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[plugins & extensions]]></category>
		<category><![CDATA[bug fixes]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=169</guid>
		<description><![CDATA[Bug updates stopping the plugin to run on some FreeBSD installtions. Thanks to David Newman with networktest.com for his positive &#38; helpful feedback.
You can download the latest plugin from here.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clker.com/clipart-10778.html" target="_blank"><img style="border:0px;margin:5px;float:left;" title="Beastie FreeBSD daemon" src="http://www.clker.com/cliparts/5/1/b/d/11954315391526924611beastie_freebsd_daemon_r_02.svg.thumb.png" alt="" /></a>Bug updates stopping the plugin to run on some FreeBSD installtions. Thanks to <a href="http://networktest.com">David Newman with networktest.com</a> for his positive &amp; helpful feedback.</p>
<p>You can <a href="http://downloads.wordpress.org/plugin/clkercom-clip-art.1.2.zip">download the latest plugin from here</a>.</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/ttHNP3YR77E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2008/12/26/wordpress-plugin-version-12-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2008/12/26/wordpress-plugin-version-12-released/</feedburner:origLink></item>
		<item>
		<title>Fixing vote up/vote down icons</title>
		<link>http://feedproxy.google.com/~r/Clker/~3/Pfw2Kxw-ywQ/</link>
		<comments>http://www.clker.com/blog/2008/12/17/fixing-vote-upvote-down-icons/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 00:26:27 +0000</pubDate>
		<dc:creator>Mohamed Ibrahim</dc:creator>
				<category><![CDATA[clker.com]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[clker]]></category>
		<category><![CDATA[down]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[up]]></category>
		<category><![CDATA[useability]]></category>
		<category><![CDATA[vote]]></category>

		<guid isPermaLink="false">http://www.clker.com/blog/?p=162</guid>
		<description><![CDATA[Just fixed a usability problem. Lots of visitors complained that when they clicked &#8220;download&#8221; nothing happened. By reviewing the website, I found that I used an up arrow, and a down arrow for voting for the picture with a positve vote, or a negative vote. However, users misunderstood that, and I don&#8217;t blame them!
I switched [...]]]></description>
			<content:encoded><![CDATA[<p>Just fixed a usability problem. Lots of visitors complained that when they clicked &#8220;download&#8221; nothing happened. By reviewing the website, I found that I used an up arrow, and a down arrow for voting for the picture with a positve vote, or a negative vote. However, users misunderstood that, and I don&#8217;t blame them!</p>
<p>I switched the icons to a green up thumb, and a down red thumb for voting for a picture. Also, added a disk icon, with an arrow pointing down in the area, which has the different download formats.</p>
<p>Hope this helps and reduces confusion.</p>
<img src="http://feeds.feedburner.com/~r/Clker/~4/Pfw2Kxw-ywQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.clker.com/blog/2008/12/17/fixing-vote-upvote-down-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.clker.com/blog/2008/12/17/fixing-vote-upvote-down-icons/</feedburner:origLink></item>
	</channel>
</rss>
