<?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>Flavio Castelli &#187; Uncategorized</title>
	<atom:link href="http://flavio.castelli.name/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://flavio.castelli.name</link>
	<description>debugging my life</description>
	<lastBuildDate>Wed, 11 Aug 2010 20:29:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>QJson: easier serialization of QObject instances to JSON</title>
		<link>http://flavio.castelli.name/qjson-easier-serialization-of-qobject-instances-to-json</link>
		<comments>http://flavio.castelli.name/qjson-easier-serialization-of-qobject-instances-to-json#comments</comments>
		<pubDate>Mon, 30 Nov 2009 19:20:58 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=263</guid>
		<description><![CDATA[I have just committed into trunk a couple of changes that make easier to serialize a QObject instance to JSON. This solution relies on the awesome Qt&#8217;s property system. Suppose the declaration of Person class looks like this: class Person : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int phoneNumber READ phoneNumber [...]]]></description>
			<content:encoded><![CDATA[<p>I have just committed into trunk a couple of changes that make easier to serialize a QObject instance to JSON.</p>
<p>This solution relies on the awesome <a href="http://doc.trolltech.com/latest/properties.html" target="_blank">Qt&#8217;s property system</a>.</p>
<p>Suppose the declaration of Person class looks like this:</p>
<pre name="code" class="cpp:nocontrols">
class Person : public QObject
{
  Q_OBJECT

  Q_PROPERTY(QString name READ name WRITE setName)
  Q_PROPERTY(int phoneNumber READ phoneNumber WRITE setPhoneNumber)
  Q_PROPERTY(Gender gender READ gender WRITE setGender)
  Q_PROPERTY(QDate dob READ dob WRITE setDob)
  Q_ENUMS(Gender)

public:
    Person(QObject* parent = 0);
    ~Person();

    QString name() const;
    void setName(const QString&amp; name);

    int phoneNumber() const;
    void setPhoneNumber(const int  phoneNumber);

    enum Gender {Male, Female};
    void setGender(Gender gender);
    Gender gender() const;

    QDate dob() const;
    void setDob(const QDate&amp; dob);

  private:
    QString m_name;
    int m_phoneNumber;
    Gender m_gender;
    QDate m_dob;
};</pre>
<p>The following code will serialize an instance of Person to JSON:</p>
<pre name="code" class="cpp:nocontrols">
Person person;
person.setName("Flavio");
person.setPhoneNumber(123456);
person.setGender(Person::Male);
person.setDob(QDate(1982, 7, 12));

Serializer serializer;
qDebug() << serializer.serialize( &#038;person);
</pre>
<p>The generated output will be:</p>
<pre name="code" class="cpp:nocontrols">
{ "dob" : "1982-07-12", "gender" : 0, "name" : "Flavio", "phoneNumber" : 123456 }
</pre>
<p>I hope you will find this new feature useful. I'm also considering to create a similar method inside the Parser class.</p>
<p>As usual suggestions are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/qjson-easier-serialization-of-qobject-instances-to-json/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>kaveau updates</title>
		<link>http://flavio.castelli.name/kaveau-updates</link>
		<comments>http://flavio.castelli.name/kaveau-updates#comments</comments>
		<pubDate>Mon, 14 Sep 2009 22:38:54 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kaveau]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=237</guid>
		<description><![CDATA[Some weeks have passed since the announcement of kaveau. I&#8217;m really proud and happy about this project because I received a lot of positive feedback messages and it has been chosen as one of the best Hackweek&#8217;s projects. In the meantime I kept working on kaveau, so let me show you what has changed: rdiff-backup [...]]]></description>
			<content:encoded><![CDATA[<p>Some weeks have passed since the announcement of kaveau. I&#8217;m really proud and happy about this project because I received a lot of positive feedback messages and it has been chosen as one of the best Hackweek&#8217;s projects.</p>
<p>In the meantime I kept working on kaveau, so let me show you what has changed:</p>
<ul>
<li><a href="http://rdiff-backup.nongnu.org/" target="_blank">rdiff-backup</a> has been replaced by <a href="http://www.samba.org/rsync/" target="_blank">rsync</a>.</li>
<li>the setup wizard has been improved according to the feedback messages I received.</li>
<li>old backups are now automatically removed.</li>
<li>the code has been refactored a lot.</li>
</ul>
<h3>The switch to rsync</h3>
<p>Previously kaveau used rdiff-backup as backup back-end. rdiff-backup is a great program but unfortunately it relies on the outdated <a href="http://librsync.sourceforge.net/" target="_blank">librsync</a> library. The latest release of librsync is dated 2004. It has a couple of serious bugs still open and, while rsync has reached version three, this library is still stuck at version one.</p>
<p>These are the reasons of the switch from rdiff-backup to rsync. This choice breaks the compatibility with the previous backups but it introduces a lot of advantages.<br />
One of the most important improvements brought by the adoption of rsync is an easier restore procedure: now <strong>all</strong> the backups can be accessed using a standard file manager, while previously rdiff-backup was needed to access the old backups.</p>
<h4>Backup directory structure</h4>
<p>On the backup device everything is saved under the <em>kaveau</em>/<em>hostname</em>/<em>username</em> path.</p>
<p>The directory will have a similar structure:</p>
<pre class="bash:nocontrols">drwxr-xr-x 3 flavio users 4096 2009-09-12 18:50 2009-09-12T18:50:19
drwxr-xr-x 3 flavio users 4096 2009-09-14 23:07 2009-09-14T23:07:46
drwxr-xr-x 3 flavio users 4096 2009-09-14 23:30 2009-09-14T23:30:36
lrwxrwxrwx 1 flavio users   19 2009-09-14 23:30 current -&gt; 2009-09-14T23:30:36</pre>
<p>As you can see there&#8217;s one directory per backup, plus a symlink called <em>current</em> pointing to the latest backup.</p>
<h3>Old backup deletion</h3>
<p>Nowadays big external storage devices are pretty cheap, but it&#8217;s always good to save some disk space.<br />
Now kaveau keeps:</p>
<ul>
<li>hourly backups for the past 24 hours.</li>
<li>daily backups for the past month.</li>
<li>weekly backups until the external disk is full.</li>
</ul>
<p>Thanks to hard links&#8217; magic, old backups can be deleted without causing damages to the other ones.</p>
<h3>Plans for the future</h3>
<p>Before starting to work on the restore user interface I will spend some time figuring out how to add support for network devices.</p>
<p>A lot of users requested this feature, hence I want to make them happy <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-smile.png' alt=':)' class='wp-smiley' /> .</p>
<p>I&#8217;m planning to use <a href="http://avahi.org/" target="_blank">avahi</a> to discover network shares (nfs, samba) or network machines running ssh and use them as backup devices. Honestly, I want to achieve something similar to <a href="http://www.apple.com/timecapsule/" target="_blank">Apple&#8217;s time capsule</a>.</p>
<p>As usual, feedback messages are really appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/kaveau-updates/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Using QJson under Windows</title>
		<link>http://flavio.castelli.name/using-qjson-under-windows</link>
		<comments>http://flavio.castelli.name/using-qjson-under-windows#comments</comments>
		<pubDate>Fri, 04 Sep 2009 12:44:42 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=228</guid>
		<description><![CDATA[Recently lots of people asked me how to build QJson under Windows. Most of them reported build/link errors, so I decided to try personally. The good news is that QJson can be successfully built under Window, I can show you proof I have written the build instructions on QJson website: just take a look here. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently lots of people asked me how to build QJson under Windows. Most of them reported build/link errors, so I decided to try personally.</p>
<p>The good news is that QJson can be successfully built under Window, I can show you proof <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-wink.png' alt=';)' class='wp-smiley' /> </p>

<a href='http://flavio.castelli.name/using-qjson-under-windows/qjson_windows_1' title='QJson unit test'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/09/qjson_windows_1-150x150.png" class="attachment-thumbnail" alt="QJson unit test" title="QJson unit test" /></a>
<a href='http://flavio.castelli.name/using-qjson-under-windows/qjson_windows_2' title='Building completed'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/09/qjson_windows_2-150x150.png" class="attachment-thumbnail" alt="Building completed" title="Building completed" /></a>

<p>I have written the build instructions on QJson website: just take a look <a href="http://qjson.sourceforge.net/download.html#windows" target="_blank">here</a>.</p>
<p>One last note: if you have problems with QJson please subscribe to the <a href="https://lists.sourceforge.net/lists/listinfo/qjson-devel" target="_blank">developer mailing list</a> and post a message.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/using-qjson-under-windows/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New QJson release</title>
		<link>http://flavio.castelli.name/qjson_0-6-0_release</link>
		<comments>http://flavio.castelli.name/qjson_0-6-0_release#comments</comments>
		<pubDate>Thu, 23 Jul 2009 10:51:30 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[Real life]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=167</guid>
		<description><![CDATA[Gran Canaria Desktop Summit has been great and really productive. I had the pleasure to meet people interested in QJson, chat with them but also hack with them. In fact we hacked a lot, doing lots of changes to QJson: the API has been cleaned, now it can be considered stable unicode support has been [...]]]></description>
			<content:encoded><![CDATA[<p>Gran Canaria Desktop Summit has been great and really productive. I had the pleasure to meet people interested in QJson, chat with them but also hack with them.</p>
<p>In fact we hacked a lot, doing lots of changes to QJson:</p>
<ul>
<li>the API has been cleaned, now it can be considered stable</li>
<li>unicode support has been completely rewritten</li>
<li>it&#8217;s now possible to convert QVariant objects into JSON ones</li>
</ul>
<p>So it&#8217;s with a great pleasure that I announce the release of QJson 0.6.0.</p>
<p>Beware, since the API has been changed your application will probably break. I&#8217;m really sorry about that, but I guarantee it won&#8217;t happen in the future (as I said both API and ABI interfaces can now be considered stable).</p>
<p><a href="http://qjson.sourceforge.net">QJson web site</a> has been updated, reflecting all the changes made to the library.<br />
openSUSE packages has been moved from my home repo to <a href="http://download.opensuse.org/repositories/KDE:/Qt/">KDE:Qt</a> one.</p>
<p>One last note, if you have problems with QJson please contact me using the qjson-devel mailing list. You can subscribe <a href="https://sourceforge.net/mailarchive/forum.php?forum_name=qjson-devel">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/qjson_0-6-0_release/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QJson at Gran Canaria Desktop Summit</title>
		<link>http://flavio.castelli.name/qjson_desktop_summi</link>
		<comments>http://flavio.castelli.name/qjson_desktop_summi#comments</comments>
		<pubDate>Tue, 30 Jun 2009 18:46:38 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[qjson]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=153</guid>
		<description><![CDATA[Now that I have booked both the flights and the hotel it&#8217;s official: I&#8217;ll attend the Gran Canaria Desktop Summit. On Thursday 9th July I&#8217;ll give a BoF about QJson. During the talk I will show: the advantages brought by QJson. the usage of QJson. some real programs using QJson. See you soon!]]></description>
			<content:encoded><![CDATA[<p>Now that I have booked both the flights and the hotel it&#8217;s official: I&#8217;ll attend the <a href="http://www.grancanariadesktopsummit.org/" target="_blank">Gran Canaria Desktop Summit</a>.</p>
<p>On Thursday 9th July I&#8217;ll give a BoF about <a href="http://qjson.sourceforge.net" target="_blank">QJson</a>.</p>
<p>During the talk I will show:</p>
<ul>
<li>the advantages brought by QJson.</li>
<li>the usage of QJson.</li>
<li>some real programs using QJson.</li>
</ul>
<p>See you soon!</p>
<p><img class="alignnone size-full wp-image-154" title="gcds_summit_badge.serendipityThumb" src="http://flavio.castelli.name/wp-content/uploads/2009/06/gcds_summit_badge.serendipityThumb.png" alt="gcds_summit_badge.serendipityThumb" width="300" height="154" /></p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/qjson_desktop_summi/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
