<?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>Divide and Conquer &#187; Web developmnet</title>
	<atom:link href="http://www.divideandconquer.se/category/web-developmnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.divideandconquer.se</link>
	<description>David's Software Development Blog</description>
	<lastBuildDate>Sat, 04 Feb 2012 20:28:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Pebble &#8211; more injection and less dependencies in PHP</title>
		<link>http://www.divideandconquer.se/2011/10/05/pebble-more-injection-and-less-dependencies-in-php/</link>
		<comments>http://www.divideandconquer.se/2011/10/05/pebble-more-injection-and-less-dependencies-in-php/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 20:03:09 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web developmnet]]></category>
		<category><![CDATA[Pebble]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=712</guid>
		<description><![CDATA[Dependency Injection (DI) is hardly anything new. I see it as a must for Test Driven Development (TDD). The thing I like most about DI in Java is Autowired in Spring or javax.annotation.Resource, they way member variables are set &#8220;magically&#8221; and the exact details about creation and implementation is located elsewhere. For PHP there are [...]]]></description>
			<content:encoded><![CDATA[<p>Dependency Injection (DI) is hardly anything new. I see it as a must for Test Driven Development (TDD). The thing I like most about DI in Java is <a href="http://static.springsource.org/spring/docs/2.5.5/api/org/springframework/beans/factory/annotation/Autowired.html" onclick="pageTracker._trackPageview('/outgoing/static.springsource.org/spring/docs/2.5.5/api/org/springframework/beans/factory/annotation/Autowired.html?referer=');">Autowired in Spring</a> or <a href="http://download.oracle.com/javase/6/docs/api/javax/annotation/Resource.html" onclick="pageTracker._trackPageview('/outgoing/download.oracle.com/javase/6/docs/api/javax/annotation/Resource.html?referer=');">javax.annotation.Resource</a>, they way member variables are set &#8220;magically&#8221; and the exact details about creation and implementation is located elsewhere.</p>
<p>For PHP there are at least the following implementations related to Dependency Injection:</p>
<ul>
<li><a href="http://www.potstuck.com/2010/09/09/php-dependency-a-php-dependency-injection-framework/" onclick="pageTracker._trackPageview('/outgoing/www.potstuck.com/2010/09/09/php-dependency-a-php-dependency-injection-framework/?referer=');">PHP-Dependency (Pd)</a> - A PHP Dependency Injection Framework</li>
<li><a href="http://pimple.sensiolabs.org/" onclick="pageTracker._trackPageview('/outgoing/pimple.sensiolabs.org/?referer=');">Pimple</a> &#8211; A simple Dependency InjectionContainer for PHP 5.3</li>
<li><a href="http://framework.zend.com/wiki/display/ZFDEV2/Zend+DI+QuickStart" onclick="pageTracker._trackPageview('/outgoing/framework.zend.com/wiki/display/ZFDEV2/Zend+DI+QuickStart?referer=');">Zend Framework 2 Dependency Injection</a></li>
</ul>
<p><a href="http://www.potstuck.com/2010/09/09/php-dependency-a-php-dependency-injection-framework/" onclick="pageTracker._trackPageview('/outgoing/www.potstuck.com/2010/09/09/php-dependency-a-php-dependency-injection-framework/?referer=');">PHP-Dependency (Pd)</a> works with @ annotation in the constructor comment, but why involve the constructor? And is a whole <strong>framework</strong> needed? PHP is not Java.</p>
<p><a href="http://pimple.sensiolabs.org/" onclick="pageTracker._trackPageview('/outgoing/pimple.sensiolabs.org/?referer=');">Pimple</a> is very much a Dependency Injection <strong>Container</strong>, not so much about the injection. <strong>Simple</strong>, yes.</p>
<p>When it comes to <a href="http://framework.zend.com/wiki/display/ZFDEV2/Zend+DI+QuickStart" onclick="pageTracker._trackPageview('/outgoing/framework.zend.com/wiki/display/ZFDEV2/Zend+DI+QuickStart?referer=');">Zend Framework 2 Dependency Injection</a> I just can&#8217;t grasp how it simplifies anything. It seems to require a lot of boilerplate.</p>
<p>Unsatisfied with the above and a given a dose of NIH Syndrome, I decided to create my own DI system for PHP. After a bit of coding yesterday evening and night I named it <a href="https://github.com/twogood/pebble" onclick="pageTracker._trackPageview('/outgoing/github.com/twogood/pebble?referer=');">Pebble</a> and it is already on github! :-)</p>
<p>My current requirements on Pebble are as follows:</p>
<ol>
<li>It must be possible to inject values of specific properties on class construction</li>
<li>It must work nicely in Zend Framework 1.x</li>
<li>It must not require any configuration files (and especially no XML)</li>
<li>It must be a single .php file for the core implementation</li>
<li>It must provide an open interface for extension and customization</li>
<li>It must work nicely with PHPUnit (especially with the getMock method)</li>
<li>It must work with autoloading of classes in PHP</li>
<li>It is allowed to use PHP 5.3 features</li>
<li>It is allowed to use @-based annotations in docComment, e.g. /** @something */</li>
</ol>
<p>However, I have not yet used Pebble with PHPUnit, so I don&#8217;t know yet if that requirement holds!</p>
<p>Now is a good time for you to examine <a href="https://github.com/twogood/pebble/blob/master/example1.php" target="_blank" onclick="pageTracker._trackPageview('/outgoing/github.com/twogood/pebble/blob/master/example1.php?referer=');">example1.php</a>! The <a href="https://github.com/twogood/pebble/blob/master/README" target="_blank" onclick="pageTracker._trackPageview('/outgoing/github.com/twogood/pebble/blob/master/README?referer=');">README</a> is currently plain-text, I&#8217;ll format it later!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2011/10/05/pebble-more-injection-and-less-dependencies-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marker and polygon tooltips in Google Maps v3</title>
		<link>http://www.divideandconquer.se/2011/09/15/marker-and-polygon-tooltips-in-google-maps-v3/</link>
		<comments>http://www.divideandconquer.se/2011/09/15/marker-and-polygon-tooltips-in-google-maps-v3/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 07:05:17 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web developmnet]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Softhouse]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=698</guid>
		<description><![CDATA[Before I get into the details, please note that this is a quick &#38; dirty solution using google.maps.InfoWindow. No demo, sorry, but please add your improvements in the comments! Marker tooltip I start with the marker, as it is the simplest implementation: function attachMarkerInfoWindow(marker, html) { marker.infoWindow = new google.maps.InfoWindow({ content: html, }); google.maps.event.addListener(marker, 'mouseover', [...]]]></description>
			<content:encoded><![CDATA[<p>Before I get into the details, please note that this is a quick &amp; dirty solution using <em>google.maps.InfoWindow</em>. No demo, sorry, but please add your improvements in the comments!</p>
<h3>Marker tooltip</h3>
<p>I start with the marker, as it is the simplest implementation:</p>
<pre id="line10">function attachMarkerInfoWindow(marker, html)
{
	marker.infoWindow = new google.maps.InfoWindow({
		content: html,
	});
	google.maps.event.addListener(marker, 'mouseover', function() {
		marker.infoWindow.open(map,marker);
	});
	google.maps.event.addListener(marker, 'mouseout', function() {
		marker.infoWindow.close();
	});
}

var marker = new google.maps.Marker({
	position: new google.maps.LatLng(56.183182,15.593239),
});

attachMarkerInfoWindow(marker, '&lt;strong&gt;Softhouse office&lt;/strong&gt;');</pre>
</pre>
<h3>Polygon tooltip</h3>
<p>A polygon does not contain a single position, so where should the tooltip show? One option is to calculate the center of the polygon using <em>getCenter()</em> on <em>google.maps.LatLngBounds</em>, but I decided to use the position of the <em>mouseover</em> event as the position of the InfoWindow. Think about it; the center of the polygon may not actually be inside the polygon!</p>
<p>As a bonus I change the fill opacity while the mouse cursor is inside the polygon.</p>
<pre id="line10">function attachPolygonInfoWindow(polygon, html)
{
	polygon.infoWindow = new google.maps.InfoWindow({
		content: html,
	});
	google.maps.event.addListener(polygon, 'mouseover', function(e) {
		var latLng = e.latLng;
		this.setOptions({fillOpacity:0.1});
		polygon.infoWindow.setPosition(latLng);
		polygon.infoWindow.open(map);
	});
	google.maps.event.addListener(polygon, 'mouseout', function() {
		this.setOptions({fillOpacity:0.35});
		polygon.infoWindow.close();
	});
}

var polygon = new google.maps.Polygon(/* omitted for brevity */);
attachPolygonInfoWindow(polygon, '&lt;strong&gt;Info about this area&lt;/strong&gt;');</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2011/09/15/marker-and-polygon-tooltips-in-google-maps-v3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Facebook Graph API limitations</title>
		<link>http://www.divideandconquer.se/2011/09/07/facebook-graph-api-limitations/</link>
		<comments>http://www.divideandconquer.se/2011/09/07/facebook-graph-api-limitations/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 20:25:21 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web developmnet]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=692</guid>
		<description><![CDATA[I have created a Facebook app for the flea market Facebook groups in my area. (Feel free to take a look at http://loppis.blekinge.it/) To read and manage posts I use the Facebook Graph API, but there are a number of limitations: My application supports deleting posts, but Facebook does not allow applications to delete a photo [...]]]></description>
			<content:encoded><![CDATA[<p>I have created a Facebook app for the flea market Facebook groups in my area. (Feel free to take a look at <a href="http://loppis.blekinge.it/" onclick="pageTracker._trackPageview('/outgoing/loppis.blekinge.it/?referer=');">http://loppis.blekinge.it/</a>)</p>
<p>To read and manage posts I use the Facebook Graph API, but there are a number of limitations:</p>
<ul>
<li>My application supports deleting <a href="https://developers.facebook.com/docs/reference/api/post/" onclick="pageTracker._trackPageview('/outgoing/developers.facebook.com/docs/reference/api/post/?referer=');">posts</a>, but Facebook does not allow applications to delete a <a href="https://developers.facebook.com/docs/reference/api/photo/" onclick="pageTracker._trackPageview('/outgoing/developers.facebook.com/docs/reference/api/photo/?referer=');">photo</a></li>
<li><a href="https://developers.facebook.com/docs/reference/api/realtime/" onclick="pageTracker._trackPageview('/outgoing/developers.facebook.com/docs/reference/api/realtime/?referer=');">Real-time Updates</a> do not include support for groups (so I have to poll)</li>
<li>Reading the <a href="https://developers.facebook.com/docs/reference/api/group/" onclick="pageTracker._trackPageview('/outgoing/developers.facebook.com/docs/reference/api/group/?referer=');">Group</a> feed and and using the <em>since</em> and <em>until</em> parameters do not guarantee that you find all posts in a high-traffic group, not even when using the <em>previous</em> and <em>next</em> links in the feed</li>
</ul>
<p><strong>Update</strong> Maybe I should start <a href="https://developers.facebook.com/docs/reference/fql/stream/" onclick="pageTracker._trackPageview('/outgoing/developers.facebook.com/docs/reference/fql/stream/?referer=');">using FQL to query the Group feed</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2011/09/07/facebook-graph-api-limitations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blogging, sharing, status updates, everywhere?</title>
		<link>http://www.divideandconquer.se/2011/07/02/blogging-sharing-status-updates-everywhere/</link>
		<comments>http://www.divideandconquer.se/2011/07/02/blogging-sharing-status-updates-everywhere/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 09:53:47 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web developmnet]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=683</guid>
		<description><![CDATA[I&#8217;ve realized a long time ago that my personal web diary in in Swedish – 2good.nu – has been obsoleted by my Facebook account. Same with the diary for our first-born child. I didn&#8217;t even start a blog for our second child. This is quite OK, as my home-made web diary software – even rewritten [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve realized a long time ago that my personal web diary in in Swedish – <a href="http://2good.nu/" onclick="pageTracker._trackPageview('/outgoing/2good.nu/?referer=');">2good.nu</a> – has been obsoleted by my Facebook account. Same with the diary for our first-born child. I didn&#8217;t even start a blog for our second child.</p>
<p>This is quite OK, as my home-made web diary software – even rewritten in Zend Framework – will never have the same features as Facebook. There are no comments, photo uploads, likes, mentions of friends, etc, that the existing social networks already implement.</p>
<p>Of course I also have a Twitter account, <a href="https://twitter.com/#!/davideriksson" onclick="pageTracker._trackPageview('/outgoing/twitter.com/_/davideriksson?referer=');">@davideriksson</a>, that complements this blog with mostly English-language updates regarding software development and related topics. I actually use <a href="http://www.google.com/buzz" onclick="pageTracker._trackPageview('/outgoing/www.google.com/buzz?referer=');">Google Buzz</a> for sharing some stuff with friends, and it is also connected to my Twitter account.</p>
<p>I never use my <a href="http://www.orkut.com/" onclick="pageTracker._trackPageview('/outgoing/www.orkut.com/?referer=');">Orkut</a> account so let&#8217;s ignore that. Should I mention <a href="http://www.linkedin.com/in/davideriksson" onclick="pageTracker._trackPageview('/outgoing/www.linkedin.com/in/davideriksson?referer=');">my LinkedIn account</a>? By its nature it is almost purely for my professional relations.</p>
<p>Now comes <a href="https://plus.google.com/" onclick="pageTracker._trackPageview('/outgoing/plus.google.com/?referer=');">Google+</a> and I will give it a try as soon as they accept the invitation I have. Should I spend/waste my time on yet another social network, connected to more or less the same people?</p>
<p>What I want is to publish stuff (blog posts, links, photos, videos, status updates) in one place, and have it reach the desired target group (or Social Cicle, in Google+ speak). Something like <a href="https://joindiaspora.com/" onclick="pageTracker._trackPageview('/outgoing/joindiaspora.com/?referer=');">Diaspora</a> sounds like a good idea, but it is not click-and-play and does it integrate with the other social networks mentioned previously? I&#8217;m not so sure.</p>
<p>Ideally I publish something on Facebook and it ends up in the corresponding social circles in Google+, and the other way around.</p>
<p>Another solution would to be that I publish everything from my personal site, and it pushes it to the corresponding systems. Maybe I have to implement photo upload after all? And build an Android client? No, I should not have to.</p>
<p>A better solution would be that a single social network is my &#8220;main&#8221; one and it provides an API that I can use to share data to other social networks. Maybe Google+ is that social network, but it does not have a public API yet. I still have to build stuff, but integrating systems is much more fun than implementing photo upload&#8230; :-)</p>
<p>To see what others publish I realize that I still need to connect to each social network, but I&#8217;m probably curious enough!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2011/07/02/blogging-sharing-status-updates-everywhere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dutch PHP Conference 2011</title>
		<link>http://www.divideandconquer.se/2011/06/03/dutch-php-conference-2011/</link>
		<comments>http://www.divideandconquer.se/2011/06/03/dutch-php-conference-2011/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 06:54:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web developmnet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/2011/06/03/dutch-php-conference-2011/</guid>
		<description><![CDATA[I was fortunate enough to be able to attend DPC11 on May 19-21 and it was very inspiring. I hope to write more about it in future blog posts!]]></description>
			<content:encoded><![CDATA[<p>I was fortunate enough to be able to attend <a href="http://www.phpconference.nl/" onclick="pageTracker._trackPageview('/outgoing/www.phpconference.nl/?referer=');">DPC11</a> on May 19-21 and it was very inspiring. I hope to write more about it in future blog posts!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2011/06/03/dutch-php-conference-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop forum spam!</title>
		<link>http://www.divideandconquer.se/2011/01/24/stop-forum-spam/</link>
		<comments>http://www.divideandconquer.se/2011/01/24/stop-forum-spam/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 11:59:06 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web developmnet]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=676</guid>
		<description><![CDATA[I run a Swedish site about energy drinks, along with a Swedish forum for energy drink collectors. In a tie between phpBB and Simple Machines (SMF) I chose the latter as forum software. Since I opened the forum there has been more and forum spam attempts. Actually there have been very few spam posts, and [...]]]></description>
			<content:encoded><![CDATA[<p>I run a <a href="http://taurin.se/" onclick="pageTracker._trackPageview('/outgoing/taurin.se/?referer=');">Swedish site about energy drinks</a>, along with a <a href="http://forum.taurin.se/" onclick="pageTracker._trackPageview('/outgoing/forum.taurin.se/?referer=');">Swedish forum for energy drink collectors</a>. In a tie between phpBB and <a href="http://www.simplemachines.org/" onclick="pageTracker._trackPageview('/outgoing/www.simplemachines.org/?referer=');">Simple Machines (SMF)</a> I chose the latter as forum software.</p>
<p>Since I opened the forum there has been more and forum spam attempts. Actually there have been very few spam posts, and no spam personal messages that I know of, but several spammers did register only to add links for SEO purposes in their user profile. (Note to self: set rel=&#8221;nofollow&#8221; on links in user profiles?)</p>
<p>The first counter-measure I added was reCAPTCHA for SMF and it has saved me quite a bit of work.</p>
<p>When that was not enough I found an SMF plugin for the <a href="http://www.stopforumspam.com/" onclick="pageTracker._trackPageview('/outgoing/www.stopforumspam.com/?referer=');">Stop Forum Spam</a> API. Unlike <a href="http://akismet.com/" onclick="pageTracker._trackPageview('/outgoing/akismet.com/?referer=');">Akismet</a> that &#8211; AFAIK &#8211; goes for the content of the spam, <a href="http://www.stopforumspam.com/" onclick="pageTracker._trackPageview('/outgoing/www.stopforumspam.com/?referer=');">Stop Forum Spam</a> simply stores IP address, user names and e-mail addresses that have been used for forum spam. When a spammer try to register on my forum they get a message (in Swedish) that an extra security check is needed, and instructions to e-mail the webmaster (that&#8217;s me). I have loads of registration attempts in the forum log, but no e-mails to webmaster&#8230; :-)</p>
<p>I realize that it is not realistic to get rid of all spammers, but I&#8217;m pretty close now!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2011/01/24/stop-forum-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Policy notification from Google</title>
		<link>http://www.divideandconquer.se/2009/12/15/policy-notification-from-google/</link>
		<comments>http://www.divideandconquer.se/2009/12/15/policy-notification-from-google/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 13:11:10 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web developmnet]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=603</guid>
		<description><![CDATA[My Swedish site Folkmun allows anyone to add words and their definitions. It&#8217;s a simple Swedish version of Urban Dictionary. Some people add very explicit words and I had totally forgotten that such words may clash with Google AdSense policies. Today I received a friendly warning: While reviewing your account, we noticed that you are [...]]]></description>
			<content:encoded><![CDATA[<p>My Swedish site <a href="http://folkmun.se/" onclick="pageTracker._trackPageview('/outgoing/folkmun.se/?referer=');">Folkmun</a> allows anyone to add words and their definitions. It&#8217;s a simple Swedish version of <a href="http://www.urbandictionary.com/" onclick="pageTracker._trackPageview('/outgoing/www.urbandictionary.com/?referer=');">Urban Dictionary</a>. Some people add very explicit words and I had totally forgotten that such words may clash with Google AdSense policies. Today I received a friendly warning:</p>
<blockquote><p>While reviewing your account, we noticed that you are currently displaying Google ads in a manner that is not compliant with our policies. For instance, we found violations of AdSense policies on pages such as<br />
<a href="http://www.folkmun.se/definition/Apaj%C3%A4vel" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.folkmun.se/definition/Apaj_C3_A4vel?referer=');">http://www.folkmun.se/definition/Apaj%C3%A4vel</a>. Please note that this URL is an example and that the same violations may exist on other pages of your website.</p></blockquote>
<p>Needless to say, I have made a couple of modifications to the site, including hiding ads when displaying explicit words or definitions. If this wasn&#8217;t good enough, I&#8217;ll know in a couple of days&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/12/15/policy-notification-from-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New site: Blekinge.IT</title>
		<link>http://www.divideandconquer.se/2009/12/08/new-site-blekingeit/</link>
		<comments>http://www.divideandconquer.se/2009/12/08/new-site-blekingeit/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 08:57:17 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web developmnet]]></category>
		<category><![CDATA[Blekinge.IT]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=596</guid>
		<description><![CDATA[As much as I try to get rid of domains I don&#8217;t use, I can&#8217;t avoid registering new domains. I recently registered two domains (singular and plural) for a project with codename Green November. Another domain I recently registered is Blekinge.IT. At some point in the future I want it to be a site about [...]]]></description>
			<content:encoded><![CDATA[<p>As much as <a href="/2009/09/30/letting-go-of-domain-names-is-never-easy/">I try to get rid of domains I don&#8217;t use</a>, I can&#8217;t avoid registering new domains. I recently registered two domains (singular and plural) for a project with codename <em>Green November</em>.</p>
<p>Another domain I recently registered is <a href="http://blekinge.it" onclick="pageTracker._trackPageview('/outgoing/blekinge.it?referer=');">Blekinge.IT</a>. At some point in the future I want it to be a site about IT and telecommunications in the Swedish province Blekinge, but for now I only use it to aggregate local news sources.</p>
<p>This was also a test in registering .it domains. I had to print, sign and send a fax (!) to fulfill the registration, but otherwise it was really easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/12/08/new-site-blekingeit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fmod() in PHP is the worst !&#8221;#¤%&amp;/()= function ever!</title>
		<link>http://www.divideandconquer.se/2009/11/10/fmod-in-php-is-the-worst-function-ever/</link>
		<comments>http://www.divideandconquer.se/2009/11/10/fmod-in-php-is-the-worst-function-ever/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 19:50:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web developmnet]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=580</guid>
		<description><![CDATA[I hate floating point artithmetic and I really hate fmod() in PHP. It&#8217;s useless. fmod — Returns the floating point remainder (modulo) of the division of the arguments If you calculate 36 modulo 7.2?  What do you get? Zero, yes. 7.2*5=36. No remainder! What if you use fmod in PHP? $ php -r 'echo fmod(36,7.2);' [...]]]></description>
			<content:encoded><![CDATA[<p class="refpurpose"><span class="dc-title">I hate floating point artithmetic and I really hate fmod() in PHP. It&#8217;s useless.</span></p>
<blockquote>
<p class="refpurpose"><a href="http://php.net/fmod" onclick="pageTracker._trackPageview('/outgoing/php.net/fmod?referer=');"><span class="refname">fmod</span></a> — <span class="dc-title">Returns the floating point remainder (modulo) of the division   of the arguments</span></p>
</blockquote>
<p class="refpurpose"><span class="dc-title">If you calculate 36 modulo 7.2?  What do you get? Zero, yes. 7.2*5=36. No remainder!</span></p>
<p class="refpurpose"><span class="dc-title">What if you use fmod in PHP? </span></p>
<blockquote>
<pre class="refpurpose"><span class="dc-title">$ php -r 'echo fmod(36,7.2);'
7.2</span></pre>
</blockquote>
<p>WTF? Excuse me? Is that the result from IEEE 754 hell, a parallel universe, or what?</p>
<p>Now I&#8217;m betting on the function below. I hope it won&#8217;t let me down.</p>
<blockquote><p><code><span class="html">function modulo($n,$b) {<br />
return $n-$b*floor($n/$b);<br />
}</span></code></p>
<p><span class="html"><br />
</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/11/10/fmod-in-php-is-the-worst-function-ever/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Online PHP MySQL CRUD Scaffold generator</title>
		<link>http://www.divideandconquer.se/2009/07/06/online-php-mysql-crud-scaffold-generator/</link>
		<comments>http://www.divideandconquer.se/2009/07/06/online-php-mysql-crud-scaffold-generator/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 18:08:39 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Web developmnet]]></category>
		<category><![CDATA[CRUD]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[scaffold]]></category>

		<guid isPermaLink="false">http://www.divideandconquer.se/?p=506</guid>
		<description><![CDATA[I needed some simple PHP MySQL CRUD and found www.phpscaffold.com. Perfect!]]></description>
			<content:encoded><![CDATA[<p>I needed some simple PHP MySQL CRUD and found <a href="http://www.phpscaffold.com/" onclick="pageTracker._trackPageview('/outgoing/www.phpscaffold.com/?referer=');">www.phpscaffold.com</a>. Perfect!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.divideandconquer.se/2009/07/06/online-php-mysql-crud-scaffold-generator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

