<?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>Syntactic sugar &#187; buTTon</title>
	<atom:link href="http://syntacticsugar.nl/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://syntacticsugar.nl</link>
	<description>Random ramblings of another web-techy</description>
	<lastBuildDate>Sat, 09 Jan 2010 21:24:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>For sale : My Nokia N900</title>
		<link>http://syntacticsugar.nl/2010/01/09/for-sale-my-nokia-n900/</link>
		<comments>http://syntacticsugar.nl/2010/01/09/for-sale-my-nokia-n900/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 21:24:13 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Nokia N900]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=331</guid>
		<description><![CDATA[After a month of using the N900 I&#8217;ve come to the conclusion it&#8217;s not quite the phone for me. Yeah; the screen is incredible, the GUI is great, the Eyecandy is cool but the stuff I really need is not working the way I want it to and IMHO Nokia takes too much time updating [...]]]></description>
			<content:encoded><![CDATA[<p>After a month of using the N900 I&#8217;ve come to the conclusion it&#8217;s not quite the phone for me. Yeah; the screen is incredible, the GUI is great, the Eyecandy is cool but the stuff I really need is not working the way I want it to and IMHO Nokia takes too much time updating the software.<br />
So, it&#8217;s FOR SALE; Nokia N900 with screen protector &amp; extra battery, only used for one month and its in prestine condition.<br />
<a href="mailto:ivo@syntacticsugar.nl">Email me</a> if you&#8217;re interested</p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2010/01/09/for-sale-my-nokia-n900/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HOWTO : Bluetooth Tethering with Nokia N900</title>
		<link>http://syntacticsugar.nl/2009/12/03/bluetooth-tethering-with-nokia-n900/</link>
		<comments>http://syntacticsugar.nl/2009/12/03/bluetooth-tethering-with-nokia-n900/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 10:40:07 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Internet Sharing]]></category>
		<category><![CDATA[Tethering]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=310</guid>
		<description><![CDATA[Tethering (using you&#8217;re mobile phone to get your laptop/notebook online) is a quite important feature for me, when I&#8217;m at a meeting I do not wish to rely on wireless connections from my customers or the hotel/cafe where I&#8217;m at. With my Nokia E90 I used JoikuSpot, which turns the E90 into a wireless accesspoint, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Tethering" target="_blank">Tethering</a> (using you&#8217;re mobile phone to get your laptop/notebook online) is a quite important feature for me, when I&#8217;m at a meeting I do not wish to rely on wireless connections from my customers or the hotel/cafe where I&#8217;m at. With my Nokia E90 I used <a href="http://www.joikushop.com/" target="_blank">JoikuSpot</a>, which turns the E90 into a wireless accesspoint, worked like a charm but drains the batteries extremely fast. One very big advantage of creating a Wifi-accesspoint is speed; I have 7.2 mbit 3.5G subscription (the E90 only got to 3.2 mbit though), which is too fast for bluetooth, you usually get about 1 mbit from bluetooth.. With wifi I was able to use the full 3.2 mbit my E90 was able to provide.</p>
<p><span id="more-310"></span></p>
<p>With the new Nokia N900 I&#8217;ve been looking for a way to get my Ubuntu Karminc netbook &amp; Ubuntu Jaunty laptop online, preferably with Wifi, but at least using Bluetooth. Wifi is unfortunately not yet supported because the some kernel-modules  (iptables, iptables_nat) are not available for Maemo (<a href="http://talk.maemo.org/showthread.php?t=30916&amp;highlight=tethering&amp;page=2" target="_blank">they are working on it</a>). Bluetooth is possible, and quite easy to archive with Ubuntu Karmic. I&#8217;ll explain how to get your Ubuntu Karmic laptop online with a N900 using the DUN-service (DailUpNetworking)</p>
<p><em>You need to be comfortable with the commandline/terminal and have <a href="http://talk.maemo.org/showthread.php?t=33911" target="_blank">rootsh </a>installed </em><em>on your N900</em><em> to do this! If you&#8217;re NOT comfortable with the Terminal : do not proceed, you will need to be root, and that enables you to brick your N900!</em></p>
<p><strong>On the N900</strong></p>
<p>You&#8217;ll need the following script (taken from <a href="http://wiki.maemo.org/index.php?title=Fremantle_Unsupported_Bluetooth_profiles#DUN_server" target="_blank">Maemo Wiki</a>):</p>
<pre>sdptool add --channel 1 DUN
while true; do
        rfcomm -S -- listen -1 1 /usr/bin/pnatd '{}'
        sleep 1
done</pre>
<p>I copied the script,  pasted it into a new text-file on my laptop (called it dun.sh) and sent it to my N900 with bluetooth. Your N900 will ask where to store the script, I stored into Documents. Now fire up the terminal application on the N900 and become root:</p>
<pre>~ $ sudo gainroot</pre>
<p>Move the uploaded file to /usr/bin :</p>
<pre>/home/user # mv /home/user/MyDocs/.documents/dun.sh /usr/bin/</pre>
<p>Make the file dun.sh executable;</p>
<pre>/home/user # chmod +x /usr/bin/dun.sh</pre>
<p>Start the DUN-service:</p>
<pre>/home/user # dun.sh</pre>
<p>You should see something like this:</p>
<pre>Dial-Up Networking Service Registered
Waiting for connection on channel 1</pre>
<p>Configuring the N900 is finished, next;</p>
<p><strong>configuring Ubuntu (Karmic)<br />
</strong></p>
<p><em>Be sure you have paired the N900 with your laptop</em></p>
<p><span style="text-decoration: underline;">Configuring the network-connection</span><em><br />
</em></p>
<ul>
<li>Left click on the network-manager from the notification area of the gnome-panel, select &#8220;Edit connections&#8221;</li>
<li>Select the &#8220;Mobile Broadband&#8221;-tab and press &#8220;Add&#8221;<br />
<a href="http://syntacticsugar.nl/wp-content/uploads/2009/12/Screenshot-Network-Connections.png"><img class="alignnone size-medium wp-image-311" title="Network Connections" src="http://syntacticsugar.nl/wp-content/uploads/2009/12/Screenshot-Network-Connections-300x219.png" alt="Network Connections" width="300" height="219" /></a></li>
<li>Click &#8220;forward&#8221; (leaving the selection to &#8220;any device&#8221;)</li>
<li>Select the country, click &#8220;forward&#8221; and select your mobile operator.</li>
<li>If you have the option to select a plan, do so (I needed to select Vodafone Business to get the correct APN), else click &#8220;forward&#8221;</li>
<li>Click &#8220;Apply&#8221; to save the new Mobile Broadband-service</li>
<li>A new window will appear to configure the Service, <em>be sure to enable &#8220;Connect automatically&#8221; </em>and click<em> </em>&#8220;apply&#8221;<em><br />
</em></li>
<li>Close the window &#8220;Network connections&#8221;<em><br />
</em></li>
</ul>
<p><span style="text-decoration: underline;">Next: connecting to your N900 with DUN</span></p>
<p>First; be sure you have <a href="http://blueman-project.org/">Blueman</a> Installed, you&#8217;ll need this to configure the connections.  If you do not have Blueman running install it following the instructions <a href="http://blueman-project.org/downloads.html">found here</a><br />
<em></p>
<blockquote><p>
In Ubuntu Karmic you can add blueman repositories by issuing this command:<br />
sudo add-apt-repository ppa:blueman/ppa</p>
<p>And to install it run:<br />
sudo apt-get update<br />
sudo apt-get install blueman
</p></blockquote>
<p></em></p>
<ul>
<li>Check if you have enabled the correct plugin;</li>
<li>Right-click on the bluetooth-icon in the notification area in the panel and select &#8220;plugins&#8221;<br />
<a href="http://syntacticsugar.nl/wp-content/uploads/2009/12/screenshot_0041.png"><img class="alignnone size-full wp-image-314" title="screenshot_004" src="http://syntacticsugar.nl/wp-content/uploads/2009/12/screenshot_0041.png" alt="screenshot_004" width="273" height="33" /></a></li>
<li>Enable &#8220;NMDUNSupport&#8221; (optionally you can enable the &#8220;NetUsage&#8221; plugin to monitor data-usage) and close the Plugins window.</li>
<li>Open the bluetooth manager (by  left-clicking on the bluetooth-icon in the notification area in the panel) and look for your N900.<br />
<a href="http://syntacticsugar.nl/wp-content/uploads/2009/12/Screenshot-Bluetooth-Devices.png"><img class="alignnone size-medium wp-image-324" title="Screenshot-Bluetooth Devices" src="http://syntacticsugar.nl/wp-content/uploads/2009/12/Screenshot-Bluetooth-Devices-300x218.png" alt="Screenshot-Bluetooth Devices" width="300" height="218" /></a></li>
<li>Right-click on the N900-icon and select &#8220;Refresh Services&#8221;</li>
<li>Again; right-click on the N900 and click &#8220;Dail-Up Networking&#8221;.. your laptop will try to connect to your N900</li>
<li>If the connection is OK you can establish the network-connection to your Mobile Broadband provider, left-click on the Network-manager in the notification area and select the network connection you created in the previous section (&#8220;Configuring the network-connection&#8221;).</li>
<li><em>If all goes well you should be online now!</em> (if you had a &#8216;normal&#8217; wifi connection, disconnect it to be sure you&#8217;re using the Dail-Up with your N900).</li>
</ul>
<p><strong>Possible Issues</strong></p>
<p>If you disconnect from dail-up networking and try to reconnect you could get an error : &#8220;Connection Failed: Port already in use&#8221;.. To fix this, restart bluetooth on your laptop:</p>
<p>sudo /etc/init.d/bluetooth restart</p>
<p><strong>Loose ends</strong></p>
<p>You could leave the DUN-script running in a terminal on your N900, I&#8217;m not yet sure if this could drain the battery. If it doesn&#8217;t it may be possible to add the script into the /etc/rc2.d directory, this way the script will be started at boot and you can connect to your N900 quickly without manually starting DUN. I&#8217;ll look into this when I&#8217;m sure the script doesn&#8217;t drain the battery (Update: It doesn&#8217;t; it&#8217;s save to autostart the script).</p>
<p>Ubuntu Jaunty doesn&#8217;t have the bluetooth manager which is used in Ubuntu Karmic; I&#8217;ll update this post with instructions for Jaunty later, and if anyone has a step by step howto for Windows, please let me know so I can add a link to your site or add the howto here <img src='http://syntacticsugar.nl/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Update : If you&#8217;d like DUN started automatically, check out <a href="http://intr.overt.org/blog/?p=74">this</a> and <a href="http://intr.overt.org/blog/wp-trackback.php?p=88" target="_blank">this</a> helpful post</p>
<p>Update 12-30-09:<br />
The DUN script is now available in the Maemo-repositories; still in testing though.<br />
Also; I forgot to mention <strong>Blueman</strong> . I assumed it was part of Karmic and installed by default; but it&#8217;s not, i&#8217;ve added instructions (Thx to Alex &#038; Alex in the comments).</p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/12/03/bluetooth-tethering-with-nokia-n900/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Wave Tip: get notifications for activity in a Wave</title>
		<link>http://syntacticsugar.nl/2009/12/02/google-wave-tip-get-notifications-for-activity-in-a-wave/</link>
		<comments>http://syntacticsugar.nl/2009/12/02/google-wave-tip-get-notifications-for-activity-in-a-wave/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 15:46:26 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Google Wave Tips]]></category>
		<category><![CDATA[Google Talk]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[Notifier]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=306</guid>
		<description><![CDATA[There are not a lot of notifiers for Google WAVE available. I found one for Firefox, which is a small statusbar icon and doesn&#8217;t really attract my attention, and there&#8217;s one for Chrome (which I don&#8217;t use). I&#8217;d rather have something for my desktop (Gnome-panel-gadget or Gnome-Do-plugin) that shouts &#8221; YOU HAVE A WAVE&#8221; at [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://syntacticsugar.nl/wp-content/uploads/2009/12/google_wave_logo.jpg"><img class="alignright size-thumbnail wp-image-307" title="Google Wave" src="http://syntacticsugar.nl/wp-content/uploads/2009/12/google_wave_logo-150x150.jpg" alt="Google Wave" width="150" height="150" /></a>There are not a lot of notifiers for Google WAVE available. I found one for <a href="http://thatsmith.com/2009/10/google-wave-add-on-for-firefox" target="_blank">Firefox</a>, which is a small statusbar icon and doesn&#8217;t really attract my attention, and there&#8217;s one for <a href="http://www.jeremyselier.com/fr/entry/chrome-extension-google-wave-checker" target="_blank">Chrome</a> (which I don&#8217;t use). I&#8217;d rather have something for my desktop (Gnome-panel-gadget or Gnome-Do-plugin) that shouts &#8221; YOU HAVE A WAVE&#8221; at me, but I haven&#8217;t found anything yet. What I did find is another solution; The XMPP-bot &#8220;wave-xmpp@appspot.com&#8221;. If you add this bot into a Wave and press subscribe you&#8217;ll receive an instant message from Google Talk when someone adds something to the wave. Since GTalk messages are received on my Nokia N900 I know there&#8217;s wave activity anywhere I am, and only from the Waves I&#8217;ve subscribed to. Check out the <a href="http://wave-xmpp.appspot.com/public/xmpplite.htm" target="_blank">XMPP-Lite page</a></p>
<p>Also check out <a href="http://sites.google.com/site/gwaveextensions/extensions-list" target="_blank">this list</a> of other Wave-bots and gadgets;</p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/12/02/google-wave-tip-get-notifications-for-activity-in-a-wave/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nokia N900: first experiences</title>
		<link>http://syntacticsugar.nl/2009/12/02/nokia-n900-first-experiences/</link>
		<comments>http://syntacticsugar.nl/2009/12/02/nokia-n900-first-experiences/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 15:26:21 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Nokia N900]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Maemo]]></category>
		<category><![CDATA[N900]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=301</guid>
		<description><![CDATA[Yay! Got my N900 directly from Nokia yesterday and I&#8217;ve been playing with it a lot. Overall I&#8217;m very happy with this new phone, finally something that beats the Nokia E90.
My findings for now;

Hardware
It&#8217;s a lot smaller than I expected, ok.. I was used to a E90 which is a huge brick (or my &#8220;mobile [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_277" class="wp-caption alignright" style="width: 160px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/11/nokia-n900-3.jpg"><img class="size-thumbnail wp-image-277" title="Nokia N900" src="http://syntacticsugar.nl/wp-content/uploads/2009/11/nokia-n900-3-150x150.jpg" alt="Nokia N900" width="150" height="150" /></a><p class="wp-caption-text">Nokia N900</p></div>
<p>Yay! Got my N900 directly from Nokia yesterday and I&#8217;ve been playing with it a lot. Overall I&#8217;m very happy with this new phone, finally something that beats the Nokia E90.</p>
<p>My findings for now;</p>
<p><span id="more-301"></span></p>
<p><strong>Hardware</strong><br />
It&#8217;s a lot smaller than I expected, ok.. I was used to a E90 which is a huge brick (or my &#8220;mobile fridge&#8221; as I used to call it).  It feels well constructed and solid; no creaky sounds when you squeeze it. The keyboard is a bit too small IMHO, but again; I was used to the keyboard of the E90 which is pretty large. The keyboard sliding-mechanism feels stirdy and will probably survive the phone.<br />
The touchscreen has a very soft feel, probably not very scratch-proof (I ordered a 3M Vikuiti DQC-160 screenprotector rightaway). Touch-response is good, though I do need the stylus for browsing, clicking a link with my fingers is practically impossible without zooming in.<br />
The speakers are quite good, though not as loud as the E90, but it has a surprisingly good stereo-sound with a large range. The headphones are also pretty good, have a lot of bass, but I&#8217;ll keep using my Sony MDR-E888&#8217;s for a while.</p>
<p><strong>Software</strong><br />
It&#8217;s clearly a phone for geeks; Maemo is very stable, pretty fast, but there are some things a &#8216;regular&#8217; phone-user will miss. Don&#8217;t get me wrong; almost everything works, but there are some issues I came across;</p>
<ul>
<li>The email-client; IMAP is supported, but my IMAP-account is filled with a lot of folders and emails (from over 7 years worth of business-email) and you can&#8217;t unsubscribe IMAP folders. The N900 checks them all and this take a lot of time and processor-usage (which will eventually drain the battery). After a while the mail-client just refused to open the Inbox-folder. According to <a href="https://bugs.maemo.org/show_bug.cgi?id=3762" target="_blank">this</a> bugreport this will be fixed in Nokia&#8217;s next update. There&#8217;s a workaround; you can use Nokia Messaging, in which you can select the IMAP-folder which need to be synced. Also there&#8217;s no support for IMAP-Idle.. which kinda sucks.</li>
<li>No MMS-support unfortunately. Maybe this will be implemented in a while.</li>
<li>Almost all apps have to be used in landscape mode; only the Phone-application switches. This is supposed to be fixed in next update (though I&#8217;m not sure about that)</li>
<li>&#8220;only&#8221; 256 mb storage available in the root-filesystem; though Nokia fixed this by creating a 2GB Ext3-filesystem and mounted this in /home/opt there are a lot of app&#8217;s out there that are not &#8216;optified&#8217; and use the root-filesystem. This shouldn&#8217;t be a problem if you only use the repositories from Nokia and Maemo Extras, but if you&#8217;re using Extras-testing and Extras-Devel you&#8217;re filling up the root-filesystem.. Which I found out the hard way <img src='http://syntacticsugar.nl/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  .. Also most third-party apps are not optified, eg. Mozilla Fennec which takes roughly 35 mb of storage.  I&#8217;ll be trying some other file-system layouts later, after making backups <img src='http://syntacticsugar.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Nokia Maps is verrrry slow and uses a lot of processor. There&#8217;s no guided navigation available yet.. Sygic <a href="http://www.sygic.com/index.php/en/press-releases/press-news/225.html" target="_blank">announced</a> they will ship their navigation software at the end of 2009 .. I&#8217;d also like Google Maps for the N900, but there&#8217;s still no support for it (yet?).</li>
<li>I still haven&#8217;t found a way to select multiple files/messages (yet), mainly in the file-browser or in the mail-client.  If you want to remove multiple messages or move/delete multiple files this is annoying, you have to move/delete each file/message individually. Any tips on this are greatly appreciated.<br />
<em>Update 09-12-09</em>: selecting multiple files/email is supported, just click &#8220;delete&#8221; in the email-app and select the emails you&#8217;d like to delete, same goes for file-management..</li>
<li>Battery-life is kinda bad.. depends on what widgets and programs you&#8217;re running. I think I have to order a desktop-charger and some extra batteries soon.</li>
</ul>
<p>The good things about the N900:</p>
<ul>
<li>IM Integration: Skype, Gtalk, MSN, ICQ are integrated into the Contacts-app, which is very cool IMHO. You just select a contact and you&#8217;re able to choose; message using SMS, any kind of IM (if they are online), email, call using cellular, skype or GTalk.. the works! This really makes the N900 a multipurpose communicator ..</li>
<li>I wouldn&#8217;t use it; you can update the IM-status with your location, you can even choose which level of detail you&#8217;d like to expose: region, city or street.</li>
<li>The browser is verrrrry good, very fast, renders everything, also Flash and just works like the browser you have on your computer. Only small thing ; bookmarks.. I didn&#8217;t find a usable bookmarks-manager. You can only create folders in bookmarks by adding a bookmark, not by editting (but maybe I missed something). I&#8217;ve tried Fennec also, but the default browser is much faster, uses less memory and has better controls.</li>
<li>When connected using Wifi in my home-network the media-player and filebrowser automatically detected uPNP-shares from my Mac and my MediaTank.</li>
<li>Finally a phone on which I can be ROOT! (without hacking/jailbreaking) <img src='http://syntacticsugar.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li><span style="text-decoration: line-through;">Syncing Google Calendar works great with the Mail For Exchange-feature.. as long as you keep syncing of email and contacts disabled.<br />
</span><em>Update 09-12-09</em> : Syncing Google Calendar worked great, but now it keeps telling me &#8220;Cannot connect to server&#8221; .. annoying!<span style="text-decoration: line-through;"></span></li>
<li>The FM-transmitter is very cool.. It even sends the text &#8220;Nokia&#8221; to RDS-enabled radios..</li>
<li>I can use WAVE from my Mobile!!! w000t!</li>
</ul>
<p>In general I&#8217;m very happy with the N900, mainly because everything that in my house that has a processor is running some kind of Unix/Linux-flavour. Maemo has a promising future and I can&#8217;t wait for the next update; not only for bugfixes, also because I&#8217;m very curious what new features will be added.</p>
<div dir="ltr"><span id="result_box"><span style="background-color: #ffffff;" title="nieuwsgierig"><br />
</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/12/02/nokia-n900-first-experiences/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Finally : a new Crudder-release!</title>
		<link>http://syntacticsugar.nl/2009/11/28/finally-a-new-crudder-release/</link>
		<comments>http://syntacticsugar.nl/2009/11/28/finally-a-new-crudder-release/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 12:02:06 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[CRUD]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[PHP-Scaffold]]></category>
		<category><![CDATA[Scaffold]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=296</guid>
		<description><![CDATA[It took a while.. a long while actually.. but I finally made a new release of Crudder. This new release 0.50 has a lot of new features and bugfixes, to name a few;

New Field-type: HTML-editor
New Field-type: File-upload
New Field-type: Enum
Export to CSV
Adding records from the many-2-many-editor
Bugfixes; language-support works better, datefield has been fixed, the many-2-many-editor should [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_297" class="wp-caption alignright" style="width: 160px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/11/screenshot_001.png"><img class="size-thumbnail wp-image-297" title="screenshot_001" src="http://syntacticsugar.nl/wp-content/uploads/2009/11/screenshot_001-150x150.png" alt="Crudder in action" width="150" height="150" /></a><p class="wp-caption-text">Crudder in action</p></div>
<p>It took a while.. a long while actually.. but I finally made a new release of <a href="http://syntacticsugar.nl/crudder/">Crudder</a>. This new release 0.50 has a lot of new features and bugfixes, to name a few;</p>
<ul>
<li>New Field-type: HTML-editor</li>
<li>New Field-type: File-upload</li>
<li>New Field-type: Enum</li>
<li>Export to CSV</li>
<li>Adding records from the many-2-many-editor</li>
<li>Bugfixes; language-support works better, datefield has been fixed, the many-2-many-editor should work better</li>
</ul>
<p><a href="http://www.crudder.net/demo.php" target="_blank">Check out the DEMO</a> or <a href="http://syntacticsugar.nl/crudder/">read more</a></p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/11/28/finally-a-new-crudder-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brand new Mini-Forum / reaction-widget</title>
		<link>http://syntacticsugar.nl/2009/11/27/brand-new-mini-forum-reaction-widget/</link>
		<comments>http://syntacticsugar.nl/2009/11/27/brand-new-mini-forum-reaction-widget/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 17:16:11 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[mini-forum]]></category>
		<category><![CDATA[reactionwidget]]></category>
		<category><![CDATA[Widget]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=290</guid>
		<description><![CDATA[Check out my brand new Prototype-based reaction-widget

	 		
				document.observe('dom:loaded', function(){
					pReact = new prototypereact('439b3a44-76ce-11de-86f2-001f297dba24', 'isContainer', 'demo');
				});
	 		
	 	
]]></description>
			<content:encoded><![CDATA[<p><a href="http://syntacticsugar.nl/prototype-based-miniforum-reactionwidget/">Check out my brand new Prototype-based reaction-widget</a></p>
<div id="isContainer">
	 		<script type="text/javascript">
				document.observe('dom:loaded', function(){
					pReact = new prototypereact('439b3a44-76ce-11de-86f2-001f297dba24', 'isContainer', 'demo');
				});
	 		</script>
	 	</div>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/11/27/brand-new-mini-forum-reaction-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ordered the N900</title>
		<link>http://syntacticsugar.nl/2009/11/12/ordered-the-n900/</link>
		<comments>http://syntacticsugar.nl/2009/11/12/ordered-the-n900/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 08:19:48 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Maemo]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[N900]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=276</guid>
		<description><![CDATA[After almost 3 years of Nokia E90 usage I  ordered a Nokia N900. Imho it&#8217;s the only phone/MID worthy of replacing my E90.  Ok; it&#8217;s bulky, heavy (the E90 is a brick too)  and the OS is probably a bit rough around the edges, but it runs Linux (maemo), has a 800&#215;480 px screen, 1 [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_277" class="wp-caption alignright" style="width: 160px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/11/nokia-n900-3.jpg"><img class="size-thumbnail wp-image-277" title="Nokia N900" src="http://syntacticsugar.nl/wp-content/uploads/2009/11/nokia-n900-3-150x150.jpg" alt="Nokia N900" width="150" height="150" /></a><p class="wp-caption-text">Nokia N900</p></div>
<p>After almost 3 years of Nokia E90 usage I  ordered a Nokia N900. Imho it&#8217;s the only phone/MID worthy of replacing my E90.  Ok; it&#8217;s bulky, heavy (the E90 is a brick too)  and the OS is probably a bit rough around the edges, but it runs Linux (maemo), has a 800&#215;480 px screen, 1 gb of RAM (of which 768 mb is swap) and a whopping 32 gb storage.  I will miss Route66 though, not sure if Nokia Maps is capable of keeping me on track&#8230;</p>
<p>Can&#8217;t wait to get root on my phone <img src='http://syntacticsugar.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/11/12/ordered-the-n900/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Launched a new WPS-Demo website</title>
		<link>http://syntacticsugar.nl/2009/10/17/launched-a-new-wps-demo-website/</link>
		<comments>http://syntacticsugar.nl/2009/10/17/launched-a-new-wps-demo-website/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 16:12:05 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Content Publishing]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WPS]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Website Publication]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=266</guid>
		<description><![CDATA[For the dutchies , english folks check this page;
Op http://wps.i-v-o.nl/ staat sinds vandaag een vernieuwde demo-website van WPS.  Met deze demo-website kan je lezen over wat WPS is, wat het kan, hoe het werkt en je kan spelen met het systeem.
Wat is WPS
WPS staat voor Web Publishing System. Geen spannende afkorting, maar het dekt de [...]]]></description>
			<content:encoded><![CDATA[<p>For the dutchies , english folks check <a href="http://syntacticsugar.nl/wps/">this page</a>;</p>
<p>Op <a title="WPS demo website" href="http://demo.i-v-o.nl" target="_blank">http://wps.i-v-o.nl/</a> staat sinds vandaag een vernieuwde demo-website van WPS.  Met deze demo-website kan je lezen over wat WPS is, wat het kan, hoe het werkt en je kan spelen met het systeem.</p>
<h2>Wat is WPS</h2>
<p>WPS staat voor Web Publishing System. Geen spannende afkorting, maar het dekt de lading wel goed. WPS is namelijk geen klassiek Content Management Systeem (CMS) maar veel meer. Een klassiek CMS zorgt er eigenlijk alleen maar voor dat je de inhoud van je website kunt bewerken, dat doe je dan eigenlijk altijd op een aparte website (ook wel backend genoemd). Zo&#8217;n CMS is harstikke mooi, maar er moet ook een &#8216;voorkant&#8217;, je website, geprogrammeerd worden, en dat kan best een tijdrovende klus worden. WPS is een <em>publicatiesysteem</em> en zorgt dus niet alleen voor de CMS functie, maar ook voor het publiceren; de voorkant van je website.</p>
<p><span id="more-266"></span></p>
<h2>Publicatie-systeem</h2>
<p>Er zijn gerust wel andere publicatie-systemen, bijvoorbeeld Joomla of Wordpress, maar toch heeft I-V-O de keuze gemaakt om een heel nieuw systeem te ontwikkelen. Waarom? <strong>Flexibiliteit</strong>.<br />
De meeste andere systemen zijn nogal rigide in functionaliteit of opmaak, en dan nog maar niet te spreken over veiligheid. WPS is extreem flexibel door het gebruik van XML. Alle gegevens die in WPS rondgaan worden omgezet in XML en komen in 1 groot document samen; het WPSDoc. XML is een speciale manier van gegevens opmaak die zich uitermate goed leent tot &#8216;translaties&#8217;. Stel je voor dat je een tekst hebt ingevoerd en je wilt daar een deel van dikgedrukt maken; normaliter wordt dat in html aangegeven met de b-tag. In WPS wordt dit de bold-tag, niet &#8220;b&#8221;, en bij het publiceren van de pagina kan de programmeur dit transleren/vertalen naar de standaard &#8220;b&#8221;-tag, maar ook naar iets heel anders, bijvoorbeeld &#8220;strong&#8221; of &#8220;h1&#8243;.<br />
De taal die gebruikt wordt voor dit vertalen heet XSL-t, een soort HTML, maar dan met logica; je kan als programmeur o.a if-then-else, loops, en variabelen gebruiken. Hierdoor wordt de XML een stuk slimmer, en je site dus ook!</p>
<h2>Bewerken en beheren</h2>
<p>Wat WPS nog meer bijzonder maakt is de manier waarop je de teksten in je website kunt beheren; dit doe je namelijk gewoon <em>in</em> je site en niet op een aparte website of backend. Hierdoor zie je veel beter wat en waar je wat doet. Dit is veel gebruiksvriendelijker dan de standaard CMS&#8217;en en geeft veel beter weer wat de cohesie is tussen website en content.</p>
<h2>Plugins</h2>
<p>Een standaard WPS-site kan al heel veel;</p>
<ul>
<li>Pagina&#8217;s aanmaken, teksten maken en aanpassen</li>
<li>Meta-tags (voor zoekmachines) beheren</li>
<li>Linkjes in je teksten controleren of ze nog goed zijn</li>
<li>Bestanden (pdf&#8217;s, Word-documenten, plaatjes) uploaden</li>
<li>Een site in meerdere talen publiceren (en dat doet WPS heel slim want als je een pagina in het nederlands naar bijvoorbeeld het engels hebt vertaald dan weet WPS welke pagina&#8217;s bij elkaar horen, als een engels-sprekende op een nederlandse pagina komt kan hij/zij met 1 klik naar de engelse versie zonder de pagina opnieuw te moeten zoeken)</li>
<li>Rechten instellen per pagina</li>
</ul>
<p>Verder zijn er heel veel extra functies gemaakt in de vorm van &#8216;plugins&#8217;, een greep uit de collectie;</p>
<ul>
<li>Nieuws-plugin: zorgt voor het beheer en publicatie van nieuws-berichten (ook naar RSS!)</li>
<li>Poll-plugin: maak zelf een poll en zorg dat je bezoekers kunnen stemmen</li>
<li>Search-plugin : zorgt ervoor dat bezoekers kunnen zoeken in je website</li>
<li>Shop-plugin: volledige webwinkel, met betalingsmodule voor IDEAL en Mollie (micropayments)</li>
<li>Enquete-plugin: zeer uitgebreide plugin voor het maken van grote enquetes, compleet met uitnodigings-email-functie, toegangscodes en export-functies.</li>
<li>Catalogus/Portofolio-plugin: laat je bezoekers zien wat je verkoopt of wat je hebt gemaakt.</li>
<li>Download-beveiliging voor Audio: als je bijvoorbeeld muziek wilt laten horen vanaf je website via een zg. FlashPlayer dan zorgt WPS ervoor dat bezoekers niet stiekem de bestanden kunnen downloaden.</li>
<li>Google-Maps-plugin: zorgt ervoor dat je bezoekers op een kaartje kunnen zien waar je bedrijf is gevestigd</li>
<li>Reactie-plugin: geeft je bezoekers de mogelijkheid om korte reacties op je website te plaatsen (en ze kunnen ook op elkaar reageren)</li>
<li>PDF-output; maakt automatisch PDF-bestanden van de tekst op een pagina die bezoekers kunnen downloaden</li>
<li>Blog-Plugin: samenvoeging van de nieuws-plugin en de reactie-plugin</li>
<li>Gallery-plugin: maakt automatisch een mooie foto-gallery van foto&#8217;s</li>
<li>En in ontwikkeling; Google WAVE-integratie; een mogelijkheid om bezoekers via Google Wave te laten reageren op nieuws-berichten.</li>
</ul>
<p>Verder maakt WPS gebruik van slimme caching; je site zal altijd rete-snel blijven omdat alle veel gebruikte informatie in het geheugen van de webserver bewaard blijven, zodat ze snel weer voor handen zijn als het nodig is.</p>
<p>Voor meer informatie over WPS, <a title="WPS demo website" href="http://wps.i-v-o.nl" target="_blank">klikkerdeklik!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/10/17/launched-a-new-wps-demo-website/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dev-Tip: Check your website from slow connections</title>
		<link>http://syntacticsugar.nl/2009/09/17/dev-tip-check-your-website-from-slow-connections/</link>
		<comments>http://syntacticsugar.nl/2009/09/17/dev-tip-check-your-website-from-slow-connections/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:00:23 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=261</guid>
		<description><![CDATA[Have you ever tried one of your websites from a slow connection? Is load-time acceptable? Does the site work at all? If you use a lot of scripting and ajax-calls you might end up with a website that doesn&#8217;t work because scripts are timing out or wait for other scripts to finish (which even could [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried one of your websites from a slow connection? Is load-time acceptable? Does the site work at all? If you use a lot of scripting and ajax-calls you might end up with a website that doesn&#8217;t work because scripts are timing out or wait for other scripts to finish (which even could crash browsers). How do you test from a slow connection? Check out <a href="http://codee.pl/cband.html" target="_blank">mod_cband</a>; bandwidth throttling for Apache.</p>
<p>Installation is quite easy; there&#8217;s a <a href="http://www.howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling" target="_blank">perfect howto available on Howtoforge</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/09/17/dev-tip-check-your-website-from-slow-connections/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Palm Pre SDK (Mojo) on Linux</title>
		<link>http://syntacticsugar.nl/2009/07/14/palm-pre-sdk-mojtopo-on-linux/</link>
		<comments>http://syntacticsugar.nl/2009/07/14/palm-pre-sdk-mojtopo-on-linux/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 06:43:06 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[E97]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[leaked]]></category>
		<category><![CDATA[Mojo]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[Pre]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=245</guid>
		<description><![CDATA[Update: Palm released the SDK, you can download a Linux, Mac Or Windows-SDK at : http://developer.palm.com/
The windows-version of the Palm Pre SDK leaked out last month; though still in beta it&#8217;s supposed to work, but unfortunately the installer itself is Windows only. Wine-to-the-rescue! I installed the SDK using Wine and checked the installed files. I [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_247" class="wp-caption alignright" style="width: 160px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/07/PreVirtual.png"><img class="size-thumbnail wp-image-247" title="Palm Pre in VirtualBox on Linux" src="http://syntacticsugar.nl/wp-content/uploads/2009/07/PreVirtual-150x150.png" alt="Virtual Pre" width="150" height="150" /></a><p class="wp-caption-text">Virtual Pre</p></div>
<p><strong>Update:</strong> Palm released the SDK, you can download a Linux, Mac Or Windows-SDK at : <a href="http://developer.palm.com/">http://developer.palm.com/</a></p>
<p>The windows-version of the Palm Pre SDK <a href="http://preinsiders.com/home/2009/06/26/palm-pre-mojo-sdk-download-leaked-to-the-web/" target="_blank">leaked out last month</a>; though still in beta it&#8217;s supposed to work, but unfortunately the installer itself is Windows only. Wine-to-the-rescue! I installed the SDK using Wine and checked the installed files. I found the emulator as a VirtualBox image in ~/.wine/drive_c/Program Files/Palm/SDK/share/emulator/images/sdk47, in windows it looks like it&#8217;s booted from a bat-file using several jar&#8217;s, but that doesn&#8217;t work on linux.  So I added the virtual disk to the &#8220;Virtual Media Manager&#8221;, created a new virtual machine with 256 mb ram, added grub.iso as CD-rom and tried to boot the VM.  Booting worked, kind-of; the bootmanager complained about “<em>undefined video mode : 360</em>″, if you don&#8217;t select a display-mode the VM will eventually halt with an error</p>
<p><span id="more-245"></span></p>
<p><em>PmCertificateMg[1092]: segfault at 0 ip 0804fd18 sp bf869228 error 4 in<br />
PmCertificateMgrService[8048000+b000]<br />
</em></p>
<p>If you do select a video-mode the emulator will boot, however; the Virtual Pre doesn&#8217;t understand the resolution and controlling it with the mouse is very difficult. It seemed the Virtual Palm needed the right resolution to work OK, but this resolution/video-mode is not available from the bootmanager.<br />
Then I found <a href="http://thesweetblog.co.cc/2009/06/27/how-to-run-the-palm-pre-emulator/" target="_blank">this post</a>, you need <em>VBoxManage</em> to add some configuration to VirtualBox, so open up a terminal and enter:</p>
<pre><code>VBoxManage setextradata "NAME OF VM" "CustomVideoMode1" "320x480x32"</code></pre>
<p>Change NAME OF VM to the name you&#8217;ve given to the VirtualBox instance (and keep the quotes!), boot the VM again and your Virtual Palm Pre should work like it&#8217;s supposed to.</p>
<p>After playing around with the VM I&#8217;m quite impressed with the Pre. I was considering a Nokia N97 because the Palm is still not available here in Holland (and it will probably take some months before they release it here), but having seen the Pre-software in action I decided to keep using my 3-year-old Nokia E90 until the Palm is available here. As soon as I get the chance to look at the SDK in detail I&#8217;ll post my findings here, there&#8217;s supposed to be an Eclipse Plugin somewhere in the SDK, can&#8217;t wait to try that and write my first <span style="text-decoration: line-through;">&#8220;hello world&#8221;</span> TwitterClient <img src='http://syntacticsugar.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   (a tutorial on writing your first app for the Pre can be found <a href="http://www.clickonchris.com/2009/06/tutorial-palm-pre-sdk/" target="_blank">here</a>, has nice wordpress-skin too!)</p>
<p>More detailed description on how to get the VirtualBox image working can be found <a href="http://thesweetblog.co.cc/2009/06/27/how-to-run-the-palm-pre-emulator/" target="_blank">here</a></p>
<p>Some more screenshots:</p>
<div id="attachment_248" class="wp-caption aligncenter" style="width: 330px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir2.png"><img class="size-full wp-image-248" title="Virtual Palm" src="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir2.png" alt="Palm Pre booting in VirtualBox" width="320" height="547" /></a><p class="wp-caption-text">Palm Pre booting in VirtualBox</p></div>
<div id="attachment_250" class="wp-caption aligncenter" style="width: 332px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir3.png"><img class="size-full wp-image-250" title="Virtual Palm" src="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir3.png" alt="Splashscreen after boot on Virtual Palm Pre" width="322" height="548" /></a><p class="wp-caption-text">Splashscreen after boot on Virtual Palm Pre</p></div>
<div id="attachment_251" class="wp-caption aligncenter" style="width: 332px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir4.png"><img class="size-full wp-image-251" title="Virtual Palm" src="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir4.png" alt="Applications overview on Virtual Palm Pre" width="322" height="547" /></a><p class="wp-caption-text">Applications overview on Virtual Palm Pre</p></div>
<div id="attachment_252" class="wp-caption aligncenter" style="width: 333px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir6.png"><img class="size-full wp-image-252" title="Virtual Palm" src="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir6.png" alt="Dialer on Virtual Palm Pre" width="323" height="546" /></a><p class="wp-caption-text">Dialer on Virtual Palm Pre</p></div>
<div id="attachment_253" class="wp-caption aligncenter" style="width: 331px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir5.png"><img class="size-full wp-image-253" title="Virtual Palm" src="http://syntacticsugar.nl/wp-content/uploads/2009/07/PalmVir5.png" alt="Syntacticsugar.nl from the Pre Webbrowser" width="321" height="548" /></a><p class="wp-caption-text">Syntacticsugar.nl from the Pre Webbrowser</p></div>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/07/14/palm-pre-sdk-mojtopo-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cordless Trackman Marble FX on Ubuntu Jaunty</title>
		<link>http://syntacticsugar.nl/2009/06/28/cordless-trackman-marble-fx-on-ubuntu-jaunty/</link>
		<comments>http://syntacticsugar.nl/2009/06/28/cordless-trackman-marble-fx-on-ubuntu-jaunty/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 09:45:00 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Cordless]]></category>
		<category><![CDATA[HAL]]></category>
		<category><![CDATA[Jaunty]]></category>
		<category><![CDATA[Marble]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[Trackman Marble FX]]></category>
		<category><![CDATA[Ubuntu 9.04]]></category>
		<category><![CDATA[xorg.conf]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=232</guid>
		<description><![CDATA[My all-time-favorite mouse trackball is the Logitech Trackman Marble FX (Cordless).  Logitech stopped making those a couple of years ago, but I&#8217;ve bought 5 of them and since the first one still works fine I&#8217;ll probably be using this model until USB is replaced with a new kind of port;)
The Trackman FX has 4 buttons [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_233" class="wp-caption alignright" style="width: 160px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/06/74538_fx_marble_mouse.col.jpg"><img class="size-thumbnail wp-image-233" title="74538_fx_marble_mouse.col" src="http://syntacticsugar.nl/wp-content/uploads/2009/06/74538_fx_marble_mouse.col-150x150.jpg" alt="Trackman Marble FX Cordless" width="150" height="150" /></a><p class="wp-caption-text">Trackman Marble FX Cordless</p></div>
<p>My all-time-favorite <span style="text-decoration: line-through;">mouse</span> trackball is the Logitech Trackman Marble FX (Cordless).  Logitech stopped making those a couple of years ago, but I&#8217;ve bought 5 of them and since the first one still works fine I&#8217;ll probably be using this model until USB is replaced with a new kind of port;)</p>
<p>The Trackman FX has 4 buttons and no dedicated scrollwheel. Before Ubuntu Jaunty (9.04) I was able to configure the buttons from /etc/X11/xorg.conf, but I upgraded from Ubuntu Hedgy (8.04) to Ubuntu Intrepid (8.10) all the way to Ubuntu Jaunty (9.04) and Ubuntu dropped the mouse-configuration from xorg.conf in favour of the HAL-device-manager.</p>
<p><span id="more-232"></span><br />
My xorg.conf setup for the Trackman FX looked like this:</p>
<pre><code>Section "InputDevice"
	Identifier "TFX"
	Driver "mouse"
	Option "CorePointer"
	Option "Device" "/dev/input/mice"
	Option "Name" "TrackMan Marble FX"
	Option "Vendor" "Logitech"
	Option "Protocol" "ExplorerPS/2"
	Option "Buttons" "9"
	Option "Emulate3Buttons" "true"
	Option "EmulateWheel" "1"
	Option "EmulateWheelButton" "8"
	Option "YAxisMapping" "4 5"
	Option "XAxisMapping"   "6 7"
EndSection</code></pre>
<p>Using this configuration the upper-left button was assigned as scroll-switch; if I&#8217;d keep the button pressed and use the trackball I could scroll.  The left-middle button was used as &#8220;normal&#8221; left-mouse-button, and the lower-left button used as back-button for Firefox and Nautilus.<br />
However; xorg.conf configuration didn&#8217;t work anymore in Jaunty; HAL took over, but how to configure the Trackman FX from HAL? After several searches in Google I came across <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/313148" target="_blank">this</a> bugreport in Launchpad. According to the posts I&#8217;d had to create the file /etc/hal/fdi/policy/mouse-wheel.fdi and enter the following :</p>
<pre><code>&lt;deviceinfo version="0.2"&gt;
        &lt;device&gt;
                &lt;match key="info.product" string="Logitech USB Receiver"&gt;
                        &lt;merge key="input.x11_options.Buttons" type="string"&gt;9&lt;/merge&gt;
                        &lt;merge key="input.x11_options.EmulateWheel" type="string"&gt;true&lt;/merge&gt;
                        &lt;merge key="input.x11_options.EmulateWheelTimeout" type="string"&gt;300&lt;/merge&gt;
                        <!--<merge key="input.x11_options.ButtonMapping" type="string">1 8 3 4 5 6 7 2 9</merge>-->
                        &lt;merge key="input.x11_options.EmulateWheelButton" type="string"&gt;8&lt;/merge&gt;
                        &lt;merge key="input.x11_options.XAxisMapping" type="string"&gt;6 7&lt;/merge&gt;
                        &lt;merge key="input.x11_options.YAxisMapping" type="string"&gt;4 5&lt;/merge&gt;
                        <!--<merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>-->
                        &lt;merge key="input.x11_options.Emulate3Buttons" type="string"&gt;true&lt;/merge&gt;
                &lt;/match&gt;
        &lt;/device&gt;
&lt;/deviceinfo&gt;</code></pre>
<p>After a reboot (which isn&#8217;t neccesary; unplugging it and plug it in again is enough) the Trackman didn&#8217;t do what I wanted it to do.  After some digging I suddenly realized the Trackman I used was cordless, and the model in mouse-wheel.fdi was defined as <em>Logitech USB Trackball</em>, the wired model.  It seemed HAL didn&#8217;t match the info.product-string with the cordless Trackman, so I needed to find out what would match my Trackman.  This was quite easy; from a terminal type:</p>
<pre>sudo hal-device|less</pre>
<p>You&#8217;ll get a list of all devices in HAL,  press slash (/) and enter <em>Logitech</em> to search for any device from Logitech and you&#8217;ll run into <em>&#8220;info.product = &#8216;Logitech USB Receiver&#8217;  (string)&#8221;</em>. The Cordless Trackman FX apparently had the product-id : &#8220;Logitech USB Receiver&#8221;, so I changed the line <em>match key=&#8221;info.product&#8221;</em> in  mouse-wheel.fdi to this product-id. Unplugged the Trackman, plugged it in again and hurray!!! Scrolling worked!</p>
<p>If you have a Trackman Marble FX Cordless, all you have to do is create /etc/hal/fdi/policy/mouse-wheel.fdi and enter/copy-paste:</p>
<pre><code>&lt;deviceinfo version="0.2"&gt;
        &lt;device&gt;
                &lt;match key="info.product" string="Logitech USB Receiver"&gt;
                        &lt;merge key="input.x11_options.Buttons" type="string"&gt;9&lt;/merge&gt;
                        &lt;merge key="input.x11_options.EmulateWheel" type="string"&gt;true&lt;/merge&gt;
                        &lt;merge key="input.x11_options.EmulateWheelTimeout" type="string"&gt;300&lt;/merge&gt;
                        &lt;merge key="input.x11_options.ButtonMapping" type="string"&gt;1 8 3 4 5 6 7 2 9&lt;/merge&gt;
                        &lt;merge key="input.x11_options.EmulateWheelButton" type="string"&gt;8&lt;/merge&gt;
                        &lt;merge key="input.x11_options.XAxisMapping" type="string"&gt;6 7&lt;/merge&gt;
                        &lt;merge key="input.x11_options.YAxisMapping" type="string"&gt;4 5&lt;/merge&gt;
                        <!--<merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>-->
                        &lt;merge key="input.x11_options.Emulate3Buttons" type="string"&gt;true&lt;/merge&gt;
                &lt;/match&gt;
        &lt;/device&gt;
&lt;/deviceinfo&gt;</code></pre>
<p>Unplug the Trackman (or the Receiver), plug it in again and you should be ready!</p>
<p><em>Small update:</em><br />
The outer left button didn&#8217;t act as third-mouse-button, as I was used to. Using the method above it will be used as back-button. If you&#8217;d like it to be used as third-mouse-button, remove the line :</p>
<pre>
<code>&lt;merge key="input.x11_options.ButtonMapping" type="string"&gt;1 8 3 4 5 6 7 2 9&lt;/merge&gt;</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/06/28/cordless-trackman-marble-fx-on-ubuntu-jaunty/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Scripty2 &#8220;for a more delicious web&#8221; released</title>
		<link>http://syntacticsugar.nl/2009/06/26/scripty2-for-a-more-delicious-web-released/</link>
		<comments>http://syntacticsugar.nl/2009/06/26/scripty2-for-a-more-delicious-web-released/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 11:32:54 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[Scriptaculous]]></category>
		<category><![CDATA[scripty]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=204</guid>
		<description><![CDATA[Thomas Fuchs, the author of Scriptaculous has released Scripty2 Alpha. Scripty2 is a completely rewritten User-interface and animation framework based on Scriptaculous.   Both the library and the API are not yet final but so far it looks very promising, well documented and performs pretty good.
Be sure to check out the demo&#8217;s here. Read more about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://syntacticsugar.nl/wp-content/uploads/2009/06/Screenshot-scripty2-for-a-more-delicious-web-Mozilla-Firefox.png"><img class="alignright size-thumbnail wp-image-205" title="Screenshot-scripty2: for a more delicious web - Mozilla Firefox" src="http://syntacticsugar.nl/wp-content/uploads/2009/06/Screenshot-scripty2-for-a-more-delicious-web-Mozilla-Firefox-150x150.png" alt="Screenshot-scripty2: for a more delicious web - Mozilla Firefox" width="150" height="150" /></a>Thomas Fuchs, the author of <a href="http://script.aculo.us/" target="_blank">Scriptaculous</a> has released <a href="http://scripty2.com" target="_blank">Scripty2</a> <em>Alpha</em>. Scripty2 is a completely rewritten User-interface and animation framework based on Scriptaculous.   Both the library and the API are not yet final but so far it looks very promising, well documented and performs pretty good.</p>
<p>Be sure to check out the demo&#8217;s <a href="http://scripty2.com/demos/cards/" target="_blank">here</a>. Read more about the API <a href="http://scripty2.com/doc/" target="_blank">over here</a> and on <a href="http://mir.aculo.us/2009/06/26/scripty2-for-a-more-delicious-web/" target="_blank">this blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/06/26/scripty2-for-a-more-delicious-web-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update NMT-Shoutcast, go to your favorites directly</title>
		<link>http://syntacticsugar.nl/2009/06/25/update-nmt-shoutcast-go-to-your-favorites-directly/</link>
		<comments>http://syntacticsugar.nl/2009/06/25/update-nmt-shoutcast-go-to-your-favorites-directly/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 18:06:27 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[NMT]]></category>
		<category><![CDATA[HDX-1000]]></category>
		<category><![CDATA[nmt-shoutcast]]></category>
		<category><![CDATA[Popcorn]]></category>
		<category><![CDATA[Shoutcast]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=199</guid>
		<description><![CDATA[

I’ve added a small new feature to NMT-Shoutcast, from now on you can go to your favorites or personal channels directly from the menu of your NMT-Player.
If you’d like to go to your favorites directly use the following URL: http://hdx.i-v-o.nl/your userID]/favo.php .
Replace [your userID] with the number you’ve created before on http://hdx.i-v-o.nl/uid.php
You can also use [...]]]></description>
			<content:encoded><![CDATA[<div>
<div id="commentbody-2169">
<p><a href="http://syntacticsugar.nl/wp-content/uploads/2009/06/Screenshot-NMT-Shoutcast-the-full-shoutcast-directory-on-your-Networked-Media-Tank-Mozilla-Firefox.png"><img class="alignright size-thumbnail wp-image-200" title="NMT-Shoutcast, the full shoutcast directory on your Networked Media Tank" src="http://syntacticsugar.nl/wp-content/uploads/2009/06/Screenshot-NMT-Shoutcast-the-full-shoutcast-directory-on-your-Networked-Media-Tank-Mozilla-Firefox-150x150.png" alt="NMT-Shoutcast, the full shoutcast directory on your Networked Media Tank" width="150" height="150" /></a>I’ve added a small new feature to NMT-Shoutcast, from now on you can go to your favorites or personal channels directly from the menu of your NMT-Player.<br />
If you’d like to go to your favorites directly use the following URL: <em>http://hdx.i-v-o.nl/your userID]/favo.php</em> .<br />
Replace [your userID] with the number you’ve created before on <a onclick="javascript:pageTracker._trackPageview('/outbound/comment/hdx.i-v-o.nl');" rel="nofollow" href="http://hdx.i-v-o.nl/uid.php">http://hdx.i-v-o.nl/uid.php</a></p>
<p>You can also use <em>http://hdx.i-v-o.nl/your userID]/pfavo.php</em> to go to you personal channels directly.</p>
<p>If you have a popcorn hour / HDX-1000 (or alike) you can add these URL’s to “webservices” to get to your favorite Shoutcast stream quickly.</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/06/25/update-nmt-shoutcast-go-to-your-favorites-directly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Firefox, Moonlight and Microsoft Codecs Pack</title>
		<link>http://syntacticsugar.nl/2009/06/19/ubuntu-firefox-moonlight-and-microsoft-codecs-pack/</link>
		<comments>http://syntacticsugar.nl/2009/06/19/ubuntu-firefox-moonlight-and-microsoft-codecs-pack/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 17:17:08 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[firefox 3]]></category>
		<category><![CDATA[microsoft codecs]]></category>
		<category><![CDATA[moonlight]]></category>
		<category><![CDATA[permission denied]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=192</guid>
		<description><![CDATA[I have Ubuntu 8.04 running on my laptop, and with Wimbledon coming up I wanted to install Moonlight , the Linux alternative to Silverlight, since Net5 (the dutch channel airing Wimbledon) only uses Silverlight  (annoying!!!)
Installing Moonlight was quite easy, just go to http://www.go-mono.com/moonlight/, click on the image under &#8220;2. Download the plugin&#8221; and Firefox will [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://syntacticsugar.nl/wp-content/uploads/2009/06/moonlight_logo.png"><img class="alignright size-full wp-image-194" title="moonlight_logo" src="http://syntacticsugar.nl/wp-content/uploads/2009/06/moonlight_logo.png" alt="moonlight_logo" width="100" height="125" /></a>I have Ubuntu 8.04 running on my laptop, and with Wimbledon coming up I wanted to install <a href="http://www.go-mono.com/moonlight/" target="_blank">Moonlight </a>, the Linux alternative to Silverlight, since Net5 (the dutch channel airing Wimbledon) only uses Silverlight  (annoying!!!)</p>
<p>Installing Moonlight was quite easy, just go to <a href="http://www.go-mono.com/moonlight/" target="_blank">http://www.go-mono.com/moonlight/</a>, click on the image under <em>&#8220;2. Download the plugin&#8221;</em> and Firefox will ask if it may install the Moonlight Add-on. But; Moonlight by itself is quite useless without the copyrighted audio &amp; video codecs from Microsoft. Novell (moonlight&#8217;s daddy) can&#8217;t distribute those codecs in Moonlight itself and you need to install them after Moonlight has been installed. This is supposed to be easy, go to the Moonlight-website, rightclick on the notice at the top saying &#8220;Congratulations!! You&#8217;re running the current release of Moonlight&#8221; and select &#8220;install microsoft codecs&#8221;. You&#8217;ll need to accept that you&#8217;re willing to sell your soul to Microsoft .. eh.. the EULA and the codecs will be downloaded and installed.<br />
However, after the download I got the message &#8220;<em>Permission Denied</em>&#8220;. Obviously some directory was off limits for me, but I didn&#8217;t know which directory. So I tried to install Moonlight and the codecs as root,  <em>gksudo firefox</em>, which went fine. Next I started looking for files, where did Moonlight leave the codecs? In /usr/lib? /usr/share/firefox? I found it in the home-directory of root; /root/.mozilla/plugins/moonlight/silverlight-media-pack-linux-x86-5-1.so.  Next stop; copy the .so-file to my own home-directory, but wtf? No directory /home/[me]/.mozilla/plugins? So.. i created the directory, and while I was at it, also created /home/[me]/.mozilla/plugins/moonlight, chmodded it to allow writing by me and tried to install the codecs;  Success!!! And they actually work; the codecs:)</p>
<p><span id="more-192"></span><br />
So.. all you need to do to get Moonlight with Microsoft Codecs Pack installed, step by step</p>
<ol>
<li>Go to <a href="http://www.go-mono.com/moonlight/">http://www.go-mono.com/moonlight/</a> and click on the image under &#8220;2. Download the plugin&#8221; (see <a href="http://www.go-mono.com/moonlight/#instructions" target="_blank">here</a> for moonlight installation instructions )</li>
<li>You&#8217;ll be asked to restart firefox, don&#8217;t.. Bookmark this page and open up a terminal.</li>
<li>In the terminal; type:<br />
<em>mkdir ~/.mozilla/plugins</em> [enter]<br />
and<br />
<em>mkdir ~/.mozilla/plugins</em>/<em>moonlight</em> [enter]<br />
and<br />
<em>chmod +w ~/.mozilla/plugins/moonlight</em></li>
<li>Restart firefox</li>
<li>Go to the Moonlight website again, and if Moonlight was installed successfully you&#8217;ll see<em> &#8220;Congratulations!! You&#8217;re running the current release of Moonlight&#8221; </em>somewhere at the top of the page. Right click on that (the normal context menu of firefox will show up, click somewhere on the page to hide it)</li>
<li>Click &#8220;Install Microsoft Codecs&#8221;</li>
<li>A popup will appear with a lengthy EULA, accept it (if applicable) and the download of codecs will start</li>
<li>When finished installation will start as well and you should be done.</li>
<li>Check the moonlight site again to make sure it&#8217;s running OK; if you right click the notification you shouldn&#8217;t see the item &#8220;Install Microsoft Codecs&#8221; anymore</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/06/19/ubuntu-firefox-moonlight-and-microsoft-codecs-pack/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Funniest please-upgrade-MSIE6-message ever!</title>
		<link>http://syntacticsugar.nl/2009/06/16/funniest-please-upgrade-msie6-ever/</link>
		<comments>http://syntacticsugar.nl/2009/06/16/funniest-please-upgrade-msie6-ever/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 07:18:34 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[MSIE6]]></category>
		<category><![CDATA[please upgrade]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=185</guid>
		<description><![CDATA[Very cute and funny, yet friendly request to upgrade your browser
From: http://www.robotjohnny.com/
]]></description>
			<content:encoded><![CDATA[<p>Very cute and funny, yet friendly request to upgrade your browser</p>
<div id="attachment_186" class="wp-caption aligncenter" style="width: 520px"><a href="http://www.robotjohnny.com/blog/ie6-denial-message-for-momentilecom/"><img class="size-full wp-image-186" title="momentile-final" src="http://syntacticsugar.nl/wp-content/uploads/2009/06/momentile-final.jpg" alt="Please upgrade (by www.robotjohnny.com)" width="510" height="363" /></a><p class="wp-caption-text">Please upgrade (by www.robotjohnny.com)</p></div>
<p>From: <a href="http://www.robotjohnny.com/blog/ie6-denial-message-for-momentilecom/">http://www.robotjohnny.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/06/16/funniest-please-upgrade-msie6-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small update on NMT-Shoutcast</title>
		<link>http://syntacticsugar.nl/2009/05/09/small-update-on-nmt-shoutcast/</link>
		<comments>http://syntacticsugar.nl/2009/05/09/small-update-on-nmt-shoutcast/#comments</comments>
		<pubDate>Sat, 09 May 2009 08:25:12 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[NMT]]></category>
		<category><![CDATA[Shoutcast]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=183</guid>
		<description><![CDATA[I&#8217;ve updated NMT-Shoutcast to use cookies instead of sessions. I got some emails from people having problems with their favorites after listening to a station for a while, and I noticed a lot of favorites without userID in the database. This had to be something with a timeout on sessions (which would be 20 minutes [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated NMT-Shoutcast to use cookies instead of sessions. I got some emails from people having problems with their favorites after listening to a station for a while, and I noticed a lot of favorites without userID in the database. This had to be something with a timeout on sessions (which would be 20 minutes by default) so I changed the sessions into cookies (which will expire somewhere in 2030) and all should be dandy right now.<br />
If you still have any problems, please leave a message in the reactions-section (and pls mention what kind of NMT you&#8217;re using).</p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/05/09/small-update-on-nmt-shoutcast/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Coding-humour: the best comments in source code</title>
		<link>http://syntacticsugar.nl/2009/05/03/coding-humour-the-best-comments-in-source-code/</link>
		<comments>http://syntacticsugar.nl/2009/05/03/coding-humour-the-best-comments-in-source-code/#comments</comments>
		<pubDate>Sun, 03 May 2009 16:31:03 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[coding humour]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=178</guid>
		<description><![CDATA[If you&#8217;re a programmer and have any sense of humour, you really need to read this
My personal favorites:
//
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 16
//
//When I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a programmer and have any sense of humour, <a href="http://stackoverflow.com/questions/184618" target="_blank"><strong>you really need to read this</strong></a></p>
<p>My personal favorites:</p>
<pre><code>//
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 16
//</code></pre>
<pre><code>//When I wrote this, only God and I understood what I was doing
//Now, God only knows</code></pre>
<pre><code># To understand recursion, see the bottom of this file
<em>At the bottom of the file:</em>
# To understand recursion, see the top of this file</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/05/03/coding-humour-the-best-comments-in-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Putting the Singleton-pattern to good use</title>
		<link>http://syntacticsugar.nl/2009/05/03/putting-the-singleton-pattern-to-good-use/</link>
		<comments>http://syntacticsugar.nl/2009/05/03/putting-the-singleton-pattern-to-good-use/#comments</comments>
		<pubDate>Sun, 03 May 2009 06:35:16 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Singleton]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=167</guid>
		<description><![CDATA[I like the Singleton-pattern, it saves a lot of trouble on creating objects that you need throughout your code and need to keep their state. Though it&#8217;s very tempting, do not use the singleton too much; see here why.
There are some pretty good uses for a Singleton though; a registry and the database-connection;
Download example code [...]]]></description>
			<content:encoded><![CDATA[<p>I like the <a href="http://en.wikipedia.org/wiki/Singleton_pattern" target="_blank">Singleton-pattern</a>, it saves a lot of trouble on creating objects that you need throughout your code and need to keep their state. Though it&#8217;s very tempting, do not use the singleton too much; see <a href="http://www.sitepoint.com/blogs/2008/02/13/whats-so-bad-about-the-singleton/" target="_blank">here</a> why.</p>
<p>There are some pretty good uses for a Singleton though; a registry and the database-connection;</p>
<p><span id="more-167"></span><a href="http://syntacticsugar.nl/upload/singletons.zip">Download example code here</a></p>
<p><strong>Database-connection</strong></p>
<p>I use <a href="http://adodb.sourceforge.net/" target="_self">ADODB</a> to access databases, don&#8217;t ask me why, I just do. ADODB uses a DSN to connect to a database, which looks something like:</p>
<pre><code>mysql://dbUser:dbPass@localhost/someDb</code></pre>
<p>Normally you&#8217;d use <em>$connection = &amp;ADONewConnection($DSN)</em> to connect to the database and run your query (<em>$rs = $connection-&gt;execute($sqlQuery) </em>). The problem here; you keep creating new connections anywhere you run a query, you need to pass the value for $DSN into your objects,  you&#8217;ve made your class depend on ADODB and it take 2 lines of code <img src='http://syntacticsugar.nl/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   You can bypass these &#8216;problems&#8217; by using a Singleton to connect to your database and run a query:</p>
<pre><code>$rs = basicDBConn::getConnection()-&gt;execute($sqlQuery);</code></pre>
<p>Now, what is wrong here? Did you see $DSN anywhere?<br />
Nope&#8230; This statement assumes you&#8217;ve passed $DSN already somewhere before, in fact the <em>first</em> time you call <em>getConnection()</em> from this singleton you must pass $DSN as argument in getConnection(). The first time you call getConnection() is the moment the singleton creates an instance of itself, and uses $DSN to connect to the database (<em>&amp;ADONewConnection($DSN)). </em>After this initialization the connection is kept within the Singleton, and $DSN isn&#8217;t needed anymore. Take a look at the files, basicDBConn.php in particular to get an idea of how the Singleton creates an instance of itself and the database-connection.</p>
<p><strong>Registry</strong></p>
<p>Another good use for Singletons is a Registry-object; A registry-object is used for configuration; global settings that you might need in your code (path&#8217;s, DB-configuration etc.). Since I&#8217;m infected by the XML-virus my configuration-files always are XML :</p>
<pre><code>&lt;config&gt;
    &lt;item index="DSN"&gt;mysql://dbUser:dbPass@localhost/singletondemo&lt;/item&gt;
    &lt;item index="someKey"&gt;someValue&lt;/item&gt;
&lt;/config&gt;
</code></pre>
<p>There is a drawback though; these XML-files are <span style="text-decoration: underline;">not</span> protected by Apache by default, anyone can open them from a browser (if they are somewhere in the public root of the website). There are 2 solutions for this; prefix the file with <em>.hta</em> (in which case Apache will protect them just as .htaccess files are protected) or add the following lines to your Apache-configuration :</p>
<pre><code>&lt;Files ~ "configuration_filename.xml"&gt;
   Order allow,deny
   Deny from all
&lt;/Files&gt;</code></pre>
<p>The registry-object works the same as the Database-object; it needs a reference to a XML-file <em>the first time</em> you call it, after that it&#8217;s fully initialized and doesn&#8217;t need that reference anymore.</p>
<p>The first call to a registry object (and get the value for &#8217;some_key&#8217;):</p>
<pre><code>$someValue = basicRegistry::getInstance('/path/to/configuration/file.xml')-&gt;get("some_key");</code></pre>
<p>Any call after that:</p>
<pre><code>$someValue = basicRegistry::getInstance()-&gt;get("some_key");</code></pre>
<p><strong>Why is a singleton a good thing?</strong><br />
Getting configuration-values or a $DSN-string from within objects should be simple, you do not want to pass the path and filename to your configuration file or $DSN to a database every time you create an instance of an object. It will create dependencies and spaghetti in your code. If you make sure the registry and/or database-object are created <em>before</em> your other objects start doing something you do not need to worry about file-names and/or $DSN&#8217;s. They have been safely put away in a singleton.</p>
<p>Another very nice side-effect ; you&#8217;ve decoupled database-connections and configuration-settings. In my examples I use XML to setup the values in the registry, if you want to use some other method of keeping key-value-pairs, just modify the inner workings of the Registry-singleton, the objects using the registry won&#8217;t notice and work just as well. I usually keep session-variables in the registry, if I can&#8217;t use PHP&#8217;s $_SESSION, I can fall back onto Cookies, my classes won&#8217;t notice.</p>
<p><a href="http://syntacticsugar.nl/upload/singletons.zip">Download example code here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/05/03/putting-the-singleton-pattern-to-good-use/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Facebook ditches support for IE6..</title>
		<link>http://syntacticsugar.nl/2009/04/25/facebook-ditches-support-for-ie6/</link>
		<comments>http://syntacticsugar.nl/2009/04/25/facebook-ditches-support-for-ie6/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 14:41:34 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[Internet explorer 6]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=161</guid>
		<description><![CDATA[Hurray! Another step to annihilation of developers-nightmare Internet Explorer 6. According to this blogpost, and my own tests Facebook has ditched support for Internet Explorer 6.
rant-alert :  IHMO You would only use IE6 if  ;

You&#8217;re using an illegal version of windows and you&#8217;re not able to Windows Update, why would that be supported by anyone? [...]]]></description>
			<content:encoded><![CDATA[<p>Hurray! Another step to annihilation of developers-nightmare <em>Internet Explorer 6</em>. According to <a href="http://blog.jacobburke.com/2008/07/24/facebooks-new-design-on-ie6-doesnt-exist/" target="_blank">this</a> blogpost, and my own tests Facebook has ditched support for Internet Explorer 6.</p>
<div id="attachment_162" class="wp-caption alignright" style="width: 310px"><a href="http://syntacticsugar.nl/wp-content/uploads/2009/04/screenshot-facebook-home-microsoft-internet-explorer-60.png"><img class="size-medium wp-image-162" title="IE6 in WINE" src="http://syntacticsugar.nl/wp-content/uploads/2009/04/screenshot-facebook-home-microsoft-internet-explorer-60-300x169.png" alt="IE6 showing Facebook (in WINE)" width="300" height="169" /></a><p class="wp-caption-text">IE6 showing Facebook (in WINE)</p></div>
<p><em>rant-alert </em>:  IHMO You would only use IE6 if  ;</p>
<ul>
<li>You&#8217;re using an illegal version of windows and you&#8217;re not able to Windows Update, why would that be supported by anyone? If you&#8217;re too lame to buy a legal copy, switch to a OS that&#8217;s free (and stable, and secure, and  looks better.. and.. and.. well)</li>
<li>You&#8217;re at work and the ICT-dept.  is lame and not doing their job (security blackholes)</li>
<li>You&#8217;re a complete n00b and don&#8217;t know what windows-update is (you shouldn&#8217;t use a computer at all)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/04/25/facebook-ditches-support-for-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating your own RPC-interface in PHP</title>
		<link>http://syntacticsugar.nl/2009/04/17/creating-your-own-rpc-interface-in-php/</link>
		<comments>http://syntacticsugar.nl/2009/04/17/creating-your-own-rpc-interface-in-php/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 17:53:48 +0000</pubDate>
		<dc:creator>buTTon</dc:creator>
				<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[RPC]]></category>
		<category><![CDATA[RPC-Client]]></category>
		<category><![CDATA[RPC-server]]></category>

		<guid isPermaLink="false">http://syntacticsugar.nl/?p=142</guid>
		<description><![CDATA[Last week I got a request to create some kind of RPC-server-client in PHP.  The assignment was to create a flexible solution to allow remote updating several properties in a database. I&#8217;ve created interfaces like this before, but specifically for AJAX-calls to PHP-objects, not really for server-to-server-calls. This particular assignment also involved a PHP-client-object [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I got a request to create some kind of RPC-server-client in PHP.  The assignment was to create a flexible solution to allow remote updating several properties in a database. I&#8217;ve created interfaces like this before, but specifically for AJAX-calls to PHP-objects, not really for server-to-server-calls. This particular assignment also involved a PHP-client-object for other developers to implement in their website. The RPC-interface actually doesn&#8217;t really care if it&#8217;s used for real server-to-server calls or AJAX-calls. However; in this article I&#8217;ll focus on server-to-server communication, if designed well it shouldn&#8217;t take too much effort to make it AJAX-compatible.</p>
<p><span id="more-142"></span><br />
<a href="http://syntacticsugar.nl/upload/rpc.zip">[download code]</a></p>
<p>This is how these RPC-calls are done:</p>
<p><img class="aligncenter size-full wp-image-147" title="RPC-interface structure" src="http://syntacticsugar.nl/wp-content/uploads/2009/04/diagram11.png" alt="RPC-interface structure" width="650" height="613" /></p>
<p>Since I like XML a lot, I wanted to use XML as transport mechanism for doing requests to the RPC-interface. Because I use XML I was also able to group RPC-calls into one single request. A simple method of authenticating these RPC-calls is something to consider if you&#8217;re not running a public service, but that&#8217;s beyond the scope of this article</p>
<p>A typical call would look like this:</p>
<pre><code>&lt;command&gt;
	&lt;method name=”remote_method” object=”some_object”&gt;
		&lt;arg key=”some_argument”&gt;value_of_some_argument&lt;/arg&gt;
		&lt;arg key=”another_argument”&gt;value_of_another_argument&lt;/arg&gt;
	&lt;/method&gt;
	&lt;method name=”another_remote_method” object=”another_object”&gt;
		&lt;arg key=”some_argument”&gt;value_of_some_argument&lt;/arg&gt;
		&lt;arg key=”another_argument”&gt;value_of_another_argument&lt;/arg&gt;
	&lt;/method&gt;
&lt;/command&gt;</code></pre>
<p>Now, what does this XML actually mean?</p>
<p>First of all; the methods need to be nested into a single node: &lt;command&gt;, the XML would not be valid otherwise. Each method-node has an name-attribute and object-attribute, the object-attribute defines the remote PHP-object which contains the method you&#8217;d like to call, the method is defined in the name-attribute.</p>
<p>Each method-node contains one or more arg-nodes, these nodes are passed to the method as a hashed-array and used as arguments for the method. Attribute “key” will be the key or name in the arguments-array, the node-value will become the value.</p>
<p>The example above will eventually call 2 methods,</p>
<ol>
<li>the first method, “remote_method” 	 is part of object “some_object”, and receives 2 arguments;
<ul>
<li>“some_argument” with value 	“value_of_some_argument”</li>
<li>“another_argument” with value 	“value_of_another_argument”</li>
</ul>
</li>
<li>the second method, “another_remote_method”  is part of 	object “another_object”, and also receives 2 arguments;
<ul>
<li>“some_argument” with value 	“value_of_some_argument”</li>
<li>“another_argument” with value 	“value_of_another_argument”</li>
</ul>
</li>
</ol>
<p>Now, let get some coding done, let&#8217;s focus on the RPC-server first, download <a href="http://syntacticsugar.nl/upload/rpc.zip">this</a> code-snippet and unpack it in a fresh webroot (it contains all the files described in this article, also the RPC-client).</p>
<p>First take a look at /include/classes:</p>
<ul>
<li>tools.php : contains static 	“helper” methods, I hate procedural spaghetti-code and I always 	put methods which are not part of a larger object-model into several 	helper-classes. In this particular example a single helper-class is 	enough. All methods in this class are static and can be called 	without first creating an object.</li>
<li>abstract_object.php : this is 	important and can be confusing if you&#8217;re not used to an object 	oriented approach. This class contains methods which are inherited 	into child-classes, but you cannot create an object-instance of this 	class, because it&#8217;s abstract. Why is it abstract? It&#8217;s arguable to 	just let it be a normal class in this particular example, however; 	using abstract classes in larger projects really keeps your code 	clean and separates the implementation of your object-design from the 	structure you&#8217;re using.</li>
<li>some_object.php : inherited from 	abstract_class.php; example implementation.</li>
<li>another_object.php : inherited 	from abstract_class.php; another example implementation.</li>
</ul>
<p>The actual object available for the RPC-interface are some_object and another_object. Now let&#8217;s take a look at rpc.php, which is in the root. The only really interesting part is from line 56</p>
<pre><code>

	// gather 'method' nodes and execute them;
	$methods = $dom-&gt;getElementsByTagName('method');

	for ($i=0;$i&lt;$methods-&gt;length;$i++){
		$methodNode = $methods-&gt;item($i);
		$method = $methodNode-&gt;getAttribute('name');
		$obj = $methodNode-&gt;getAttribute('object');
		$obj = new $obj();
		$arguments = tools::getArgumentsAsArray($methodNode);
		$obj-&gt;$method($arguments);
		$messages .= $obj-&gt;getMessages();
	}

	echo tools::wrapMessages($messages);
</code></pre>
<p>So, what&#8217;s really happening here?</p>
<p>The first statement; <em>$methods = $dom-&gt;getElementsByTagName(&#8216;method&#8217;);</em> will retrieve all method-nodes from the request. PHP-DOM (or any other DOM-implementation for that matter) will always return the nodes in a nodeset, even if it&#8217;s only one method-node, but not if there aren&#8217;t any nodes found.<br />
This nodeset is used to loop upon, the classic for-next statement on the next line.</p>
<p>In each loop the method-node is examined; the attribute-values for object and method are determined (<em>$method = $methodNode-&gt;getAttribute(&#8216;name&#8217;)</em> and <em>$obj = $methodNode-&gt;getAttribute(&#8216;object&#8217;)</em>) and  using a static function from the tools-class the arguments are converted into a PHP-array (<em>$arguments = tools::getArgumentsAsArray($methodNode)</em> ).</p>
<p>Now we&#8217;re ready gathering all the values needed to really create the object ( <em>$obj = new $obj()</em> ) and execute the requested method ( <em>$obj-&gt;$method($arguments) </em>).</p>
<p>The method should not return anything, instead it&#8217;s return-values are stored into a protected variable (defined in abstract_object). To get these values, use  <em>$obj-&gt;getMessages()</em>. This method doesn&#8217;t seem to be available in the class of <em>$obj</em>, it&#8217;s defined in <em>abstract_object</em>.</p>
<p>After the loop has finished the $message-string should be wrapped into a node to make sure the XML is valid, this is done with the tools&#8217; class <em>wrapMessages</em>-method.</p>
<p>Ok, the RPC-interface is ready, let&#8217;s test it! Enter the following URL into a browser (assuming you&#8217;re running PHP on localhost, in a folder called rpc:</p>
<pre><code>http://localhost/rpc.php?req=&lt;command&gt;&lt;method name="remote_method" object="some_object"&gt; &lt;arg key="some_argument"&gt;value_of_some_argument&lt;/arg&gt;&lt;arg key="another_argument"&gt;value_of_another_argument&lt;/arg&gt; &lt;/method&gt;&lt;method name="another_remote_method" object="another_object"&gt; &lt;arg key="some_argument"&gt;value_of_some_argument&lt;/arg&gt;&lt;arg key="another_argument"&gt;value_of_another_argument&lt;/arg&gt; &lt;/method&gt;&lt;/command&gt;</code></pre>
<p>You&#8217;ve just called a 2 functions from your RPC-interface! The output should look like this:</p>
<pre><code>&lt;servermessages&gt;
    &lt;message object="some_object" method="remote_method" code="200"&gt;remote_method was executed
        succesfully with arguments : value_of_some_argument, value_of_another_argument &lt;/message&gt;
    &lt;message object="another_object" method="another_remote_method" code="200"&gt;another_remote_method
        was executed succesfully with arguments : value_of_some_argument, value_of_another_argument
    &lt;/message&gt;
&lt;/servermessages&gt;</code>
</pre>
<p>Now let&#8217;s move on to the RPC-client: take a look at rpcClient.php in the root. It&#8217;s quite large, and I will not go into all the details (the comments in the file should be enough). Most of the functions in rpcClient take care of constructing the XML needed to execute the RPC-call, absolutely no rocket-science.  However; I do want to highlight the actual &#8220;executing&#8221; of the RPC-call, take a look at the private function sendToHost:</p>
<pre><code>
 private function sendToHost($data) {
	$postdata = http_build_query(
	    array(
	        'req' =&gt; $data
	    )
	);
	$opts = array('http' =&gt;
	    array(
	        'method'  =&gt; 'POST',
	        'header'  =&gt; 'Content-type: application/x-www-form-urlencoded',
	        'content' =&gt; $postdata
	    )
	);
	$context  = stream_context_create($opts);
	$this-&gt;result = file_get_contents($this-&gt;rpcURI, false, $context);
}</code></pre>
<p>This method uses <em>file_get_contents</em>, <em>http_build_query</em> and <em>stream_context_create</em> to POST the constructed XML to the RPC-server and stores the reply in a local variable ($result). I&#8217;ve tried using fopen like this:</p>
<pre>
<code>function sendToHost($host,$path,$data) {
	$fp  = @fsockopen($host,80);
	$buf = '';
	if ($fp) {
		@fputs($fp, "POST $path HTTP/1.0\n");
		@fputs($fp, "Host: $host\n");
		@fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
		@fputs($fp, "Content-length: " . strlen($data) . "\n");
		@fputs($fp, "Connection: close\n\n");
		@fputs($fp, $data);
		while (!feof($fp)) {
		  $buf .= fgets($fp,128);
		}
		fclose($fp);
	}
	return $buf;
}</code>
</pre>
<p>This method failed. I kept getting weird responses from my RPC-server (command not understood etc.). And honestly;  I like the clean call using <em>file_get_contents</em>, <em>http_build_query</em> and <em>stream_context_create</em> much better.</p>
<p>Ok; we have a nice object-structure, a RPC-server and a RPC-Client. What&#8217;s left is a real world implementation of the client. Take a look at example.php:</p>
<pre><code> include('rpcClient.php');

 $hsClient = new rpcClient();
 $hsClient-&gt;createCall('some_object', 'remote_method', array('some_argument'=&gt;'some_value', 'another_argument'=&gt;'another_value'));
 $hsClient-&gt;createCall('another_object', 'another_remote_method', array('some_argument'=&gt;'some_value', 'another_argument'=&gt;'another_value'));
 $hsClient-&gt;execute();
 $str = $hsClient-&gt;getXMLResponse();
 echo "&lt;pre&gt;";
 echo $str;
 echo "&lt;/pre&gt;"; </code>
</pre>
<p>If you&#8217;d leave out the debugging-statement at the end you end up using 4 lines of code to create, execute and retrieve a RPC-call (ok; 5 lines if you consider I&#8217;ve made 2 RPC calls). First you create an instance of the RPC-client, secondly you create a call using createCall and last but not least; you execute the call and intepret the response. If you&#8217;d enter the URL to example.php into your browser you&#8217;ll get:</p>
<pre>
remote_method was executed succesfully with arguments : some_value, another_value
another_remote_method was executed succesfully with arguments : some_value, another_value
</pre>
<p>That&#8217;s it! You have a RPC-server, RPC-client and a working implementation! You should take care of authenticating your RPC-calls, and design a nice Object-structure to implement &#8216;behind&#8217;  the RPC-server, this all depends on the kind of logic you need. I&#8217;ve used this method of RPC-ing to allow 3rd-parties to update certain values in a shop-database, and with a little effort you could make your RPC-server handle AJAX-requests and return JSON to clients. But that something for the next article.</p>
<p><a href="http://syntacticsugar.nl/upload/rpc.zip">[download code]</a></p>
]]></content:encoded>
			<wfw:commentRss>http://syntacticsugar.nl/2009/04/17/creating-your-own-rpc-interface-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
