<?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>Dmitri's Blog &#187; work</title>
	<atom:link href="http://www.dmitri.me/blog/category/work/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dmitri.me/blog</link>
	<description>Dmitri Smirnov. Web development in Estonia.</description>
	<lastBuildDate>Tue, 10 Aug 2010 12:07:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IE session bug is solved</title>
		<link>http://www.dmitri.me/blog/ie-session-bug-is-solved/</link>
		<comments>http://www.dmitri.me/blog/ie-session-bug-is-solved/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 09:07:40 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[IE bug]]></category>
		<category><![CDATA[stupid microsoft]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=207</guid>
		<description><![CDATA[IE has bug which deletes session data and brakes functionality of website. In other browsers all is working fine.
Here is example in PHP:

&#60;?php
print_r($_SESSION);
//output:
//Array ()
?&#62;

After half day of breaking brain and Google really fantastic solution for this problem, but no one of them didn&#8217;t solved our problem. So Mika found that if markup have empty src [...]]]></description>
			<content:encoded><![CDATA[<p>IE has bug which deletes session data and brakes functionality of website. In other browsers all is working fine.<br />
Here is example in PHP:<br />
<code><br />
&lt;?php<br />
print_r($_SESSION);<br />
//output:<br />
//Array ()<br />
?&gt;<br />
</code></p>
<p>After half day of breaking brain and Google really fantastic solution for this problem, but no one of them didn&#8217;t solved our problem. So <a href="http://www.appelsiini.net">Mika</a> found that if markup have empty <strong>src</strong> attribute, IE makes an empty request which breaks session data. So solution is simple check if there any empty <strong>src</strong> attributes and <strong>hrefs</strong> in link tag.</p>
<p>Was:<br />
&lt;img <span style="color:red">src=&quot;&quot;</span> alt=&quot;An image&quot; id=&quot;img&quot; /&gt;</p>
<p>You need to remove this empty attribute or if you don&#8217;t need this for javascript remove <strong>IMG</strong> tag at all.<br />
&lt;img <span style="color:#ccc;text-decoration:line-through;">src=&quot;&quot;</span> alt=&quot;An image&quot; id=&quot;img&quot; /&gt;</p>
<p>That&#8217;s really stupid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/ie-session-bug-is-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate static websites with Ruby (webby)</title>
		<link>http://www.dmitri.me/blog/generate-static-websites-with-ruby-webby/</link>
		<comments>http://www.dmitri.me/blog/generate-static-websites-with-ruby-webby/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 12:00:41 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[webby]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=198</guid>
		<description><![CDATA[Often we need to generate some websites with static content, for example without any line of PHP code or without Ruby on Rails, just need to have plain HTML files. As for Me I hate to edit 50 HTML pages manually. I found a nice solution. It&#8217;s  Webby
This is a great solution to complete [...]]]></description>
			<content:encoded><![CDATA[<p>Often we need to generate some websites with static content, for example without any line of PHP code or without Ruby on Rails, just need to have plain HTML files. As for Me I hate to edit 50 HTML pages manually. I found a nice solution. It&#8217;s  <a href="http://webby.rubyforge.org">Webby</a></p>
<p>This is a great solution to complete such task.</p>
<p>You can check how it&#8217;s work <a href="http://webby.rubyforge.org/learn/">here</a> or <a href="http://clarkware.com/cgi/blosxom/2008/08/06">there (old version)</a>.</p>
<p>There are more tools like Webby, <a href="http://nanoc.stoneship.org/">Nanoc</a> and <a href="http://github.com/mojombo/jekyll/tree/master">jekyll</a>. I have didn&#8217;t tried them, but I guess the functionality is the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/generate-static-websites-with-ruby-webby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Official Estonian currency rates with PHP</title>
		<link>http://www.dmitri.me/blog/estonian-currency-rates-php/</link>
		<comments>http://www.dmitri.me/blog/estonian-currency-rates-php/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 11:35:21 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wrong world]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[web-development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=164</guid>
		<description><![CDATA[I had a bit free time today and I have written a PHP class which gets the official rates for Estonian crown. This class will be useful for internet shops or any other commercial organizations who need to keep their courses fresh.
You can download or check source. This stuff is really simple as hell, anyway [...]]]></description>
			<content:encoded><![CDATA[<p>I had a bit free time today and I have written a PHP class which gets the official rates for Estonian crown. This class will be useful for internet shops or any other commercial organizations who need to keep their courses fresh.</p>
<p>You can <a href="/misc/rates/Eesti-Money_Rates.zip">download</a> or <a href="/misc/rates/Money/Rates.phps">check source</a>. This stuff is really simple as hell, anyway there is a small documentation inside archive.<br />
<span id="more-164"></span></p>
<h3>Here you can see the most fresh Estonian currency rates</h3>
<p><iframe src="/misc/rates/fresh-rates.php" width="302px" height="1400px" frameborder="0" scrolling="no">Update your browser!</iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/estonian-currency-rates-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The power of jQuery</title>
		<link>http://www.dmitri.me/blog/the-power-of-jquery/</link>
		<comments>http://www.dmitri.me/blog/the-power-of-jquery/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 08:01:35 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[web-development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=77</guid>
		<description><![CDATA[Recently we have updated Mosaic&#8217;s site and we used for catalog nice jQuery magnify plugin.
Check this  amazing magnify stuff.
When jQuery was released became possible to do amazing stuff without usign Flash.
As for me I&#8217;m not a big fan of the Flash and I do as much as possible on JavaScript with jQuery library.
Read and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently we have updated <a href="http://www.mosaic-fashion.com/">Mosaic</a>&#8217;s site and we used for catalog nice jQuery <a href="http://www.jnathanson.com/index.cfm?page=pages/jquery/magnify/magnify">magnify plugin</a>.</p>
<p>Check this <a href="http://www.mosaic-fashion.com/en/women-graphic-contrasts.html"> amazing magnify stuff</a>.</p>
<p>When jQuery was released became possible to do amazing stuff without usign Flash.<br />
As for me I&#8217;m not a big fan of the Flash and I do as much as possible on JavaScript with jQuery library.</p>
<p>Read and learn at <a href="http://jquery.com">jquery.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/the-power-of-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Optimizing PNG images</title>
		<link>http://www.dmitri.me/blog/optimizing-png-images/</link>
		<comments>http://www.dmitri.me/blog/optimizing-png-images/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 20:09:25 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[web-development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PNG]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=6</guid>
		<description><![CDATA[PNG is quite popular and versatile format for web, but not so as we all want. Why? Because software cannot render, save and open it correctly. Only IE6 is worth to remember, I hope soon that wretched browser will stay in far-far past. Sometimes happens that PNG&#8217;s file size is quite heavy.
OK, lets begin our [...]]]></description>
			<content:encoded><![CDATA[<p>PNG is quite popular and versatile format for web, but not so as we all want. Why? Because software cannot render, save and open it correctly. Only IE6 is worth to remember, I hope soon that wretched browser will stay in far-far past. Sometimes happens that PNG&#8217;s file size is quite heavy.</p>
<p>OK, lets begin our story. When you create a PNG files in Photoshop they seems to be quite large. “Why” you ask? I answer, because Adobe Photoshop (even CS3) don&#8217;t know how to save PNG format correctly (strange, but Adobe Fireworks does). Ok, lets see why <span id="more-6"></span></p>
<p>Look at these vivid magenta zones? What are they?</p>
<table border="0">
<tbody>
<tr>
<td width="275" align="center">
<div class="png-container"><img src="/misc/png/fire_zones.png" alt="PNG Photoshop unsaved zones" width="200" height="300" /></div>
</td>
<td width="275" align="center">
<div class="png-container"><img src="/misc/png/girl_zones.png" alt="PNG Photoshop unsaved zones" width="200" height="300" /></div>
</td>
</tr>
</tbody>
</table>
<p>These magenta zones are pixels with real transparent color values, but other transparent stuff have different data (if you fluent in Russian you can read <a href="http://www.artlebedev.ru/tools/technogrette/img/png-3/">this page</a> and learn how to remove this extra data manually in Photoshop). So we need to remove this extra data to make file size lesser.</p>
<p>As technology guy I&#8217;m too lazy to do these removing operations by hand. So I have written script to make this work faster and more happy. Moreover the script uses all power of zlib to compress PNG images, what Photoshop doesn&#8217;t fully use.</p>
<p>Script is written in PHP and I recommend to run it from command line, not from browser, because it can hang up your Firefox.</p>
<p><a href="/misc/png/optpng.zip">Download</a> or check <a href="/misc/png/optpng.phps">source</a>.</p>
<p>To run script, use this command in your console, be sure that your PHP is complied correctly with GD library:<br />
<code>$php optpng.php [dir]</code><br />
For more information see comments inside script.</p>
<h3>Some examples</h3>
<table border="0">
<tbody>
<tr>
<th width="275" align="center"><strong>Before</strong></th>
<th width="275" align="center"><strong>After</strong></th>
</tr>
<tr>
<td align="center">
<div class="png-container"><img src="/misc/png/fire.png" alt="PNG before optimization" width="200" height="300" /></div>
</td>
<td align="center">
<div class="png-container"><img src="/misc/png/fire_optimized.png" alt="PNG before optimization" width="200" height="300" /></div>
</td>
</tr>
<tr>
<td align="center"><em>59 606 bytes</em></td>
<td align="center"><em>50 915 bytes</em></td>
</tr>
<tr>
<th width="275" align="center"><strong>Before</strong></th>
<th width="275" align="center"><strong>After</strong></th>
</tr>
<tr>
<td align="center">
<div class="png-container"><img src="/misc/png/girl.png" alt="PNG before optimization" width="200" height="300" /></div>
</td>
<td align="center">
<div class="png-container"><img src="/misc/png/girl_optimized.png" alt="PNG before optimization" width="200" height="300" /></div>
</td>
</tr>
<tr>
<td align="center"><em>53 696 bytes</em></td>
<td align="center"><em>50 869 bytes</em></td>
</tr>
</tbody>
</table>
<p>In this examples we get a slight gain, but when you use more larger images your winning in size up to 50% without any lose of quality. Anyway as tests show you will win average 25% in size. See example of script <a href="/misc/png/pngtest.txt">output information</a> (265 Kb less, not bad).</p>
<p>When I learn Ruby better I will do clone in Ruby.</p>
<p>So have fun and don&#8217;t believe what you see!</p>
<p>PS. You can use much better image optimizer <a href="http://www.smushit.com">Smush it!</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/optimizing-png-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>At last!</title>
		<link>http://www.dmitri.me/blog/at-last/</link>
		<comments>http://www.dmitri.me/blog/at-last/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:01:33 +0000</pubDate>
		<dc:creator>Dmitri</dc:creator>
				<category><![CDATA[me]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://www.dmitri.me/blog/?p=3</guid>
		<description><![CDATA[After years of preparations I created a normal web-page with blog. From this moment all my stuff will be here in one place.
Special thanks to Mika Tuupola.
]]></description>
			<content:encoded><![CDATA[<p>After years of preparations I created a normal web-page with blog. From this moment all my stuff will be here in one place.<br />
Special thanks to <a href="http://www.appelsiini.net">Mika Tuupola</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dmitri.me/blog/at-last/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
