<?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>pedant.dk &#187; IT</title>
	<atom:link href="http://www.pedant.dk/category/it/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pedant.dk</link>
	<description>Honesty in small things is not a small thing</description>
	<lastBuildDate>Thu, 05 Aug 2010 16:11:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>On the untimely demise of google wave</title>
		<link>http://www.pedant.dk/2010/08/05/on-the-untimely-demise-of-google-wave/</link>
		<comments>http://www.pedant.dk/2010/08/05/on-the-untimely-demise-of-google-wave/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 16:07:49 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=803</guid>
		<description><![CDATA[Alas, Google wave is no more. I knew it well.
Or.. rather. I knew the api&#8217;s well. All the cool technology behind it &#8211; I knew that.  The google wave team tackled some tough issues to get it up and running. Google wave included an implementaion of  Operational transforms for largescale realtime collaboration. The google wave [...]]]></description>
			<content:encoded><![CDATA[<p>Alas, Google wave is no more. I knew it well.</p>
<p>Or.. rather. I knew the api&#8217;s well. All the cool technology behind it &#8211; I knew that.  The google wave team tackled some tough issues to get it up and running. Google wave included an implementaion of  <a title="Operational transforms" href="http://en.wikipedia.org/wiki/Operational_transformation">Operational transforms</a> for largescale realtime collaboration. <a title="google wave API" href="http://code.google.com/intl/uk/apis/wave/">The google wave api</a> was also pretty nifty.</p>
<p>Now &#8211; when thinking about it , I remember email conversations about google wave &#8211; facebook conversations about google wave. Real life conversations about wave. Hackathons about wave. I never actually did anything useful in wave itself.  All the fun memories I have about google wave is basically learning about new technologies and meeting new people. There is nothing bad in hacking on interesting tech &#8211; during this process I learned about google app engine, cloud computing, python,  protocol design and some longhaired math &#8211; all these things are usefull to me in the long run.</p>
<p>It looks like that <a href="http://googleblog.blogspot.com/2010/08/update-on-google-wave.html">some of  the technologies of google wave will live on in other google products</a>.  One of the main features &#8211; realtime collaboration in documents is now available in google docs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2010/08/05/on-the-untimely-demise-of-google-wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>adventures with mingw , ruby,java, rhino and jspec</title>
		<link>http://www.pedant.dk/2009/10/21/adventures-with-mingw-rubyjava-rhino-and-jspec/</link>
		<comments>http://www.pedant.dk/2009/10/21/adventures-with-mingw-rubyjava-rhino-and-jspec/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 23:09:06 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=689</guid>
		<description><![CDATA[update 2009-10-21: This post is a writeup of my early experiences with gemcutter and rubygems. The strange runtime error I did not understand was probably related to that I needed to update rubygems to 1.3.5.  I now know how to use gemcutter from ruby1.8.6 using the oneclick installer .
I have been using jspec on [...]]]></description>
			<content:encoded><![CDATA[<p><strong>update 2009-10-21: This post is a writeup of my early experiences with gemcutter and rubygems. The strange runtime error I did not understand was probably related to that I needed to update rubygems to 1.3.5.  <a href="http://www.pedant.dk/2009/10/21/gemcutter-the-missing-manual/">I now know how to use gemcutter from ruby1.8.6 using the oneclick installer</a> .</strong></p>
<p>I have been using <a href="http://github.com/visionmedia/jspec/tree/3.x">jspec</a> on macosx for a while  and decided to give it a try on windows vista today. Installing jspec on macosx and linux can be done using the instructions <a href="http://github.com/visionmedia/jspec/blob/3.x/README.md">here</a> .</p>
<p>I want to run the automated jspec tests available via rhino at a client site. Sadly , I am forced to use windows there, so I have given some thought on how to make jspec run on windows.</p>
<p>First of all you need to install ruby.  I used the automated 1.8.6 One-Click Installer available <a href="http://www.ruby-lang.org/en/downloads/">here</a> . After installing i ran</p>
<p><code lang="bash"><br />
gem update<br />
</code></p>
<p>the instructions in the README file for jspec currently states that I should install gemcutter and install jspec via that . I was not able to do that on windows  ( my system decided to report an obscure runtime error that I did not understand). So i decided to do this instead:</p>
<p><code lang="bash"><br />
gem sources -a http://gems.github.com<br />
gem install visionmedia-jspec<br />
</code></p>
<p>I let gem install the required dependencies visionmedia-commander and visionmedia-bind. After this I had the jspec script available. Sadly this gave me version 2.7.2 (I noticed \ruby\lib\ruby\gems\1.8\gems\visionmedia-jspec-2.7.2 ) <a href="http://gemcutter.org/gems/jspec">The listing on gemcutter</a>  told me that a version 2.11.10 is a avaiable , so I decided to dig deeper. Maybe I could make gemcutter work anyway?</p>
<p>After a little browsing on github.com I found the <a href="http://github.com/oneclick/rubyinstaller/">oneclick installer</a> </p>
<p>I cloned this repo using git  </p>
<p>using the following command:<br />
<code lang="bash"><br />
git clone git://github.com/oneclick/rubyinstaller.git<br />
</code></p>
<p> and pressed </p>
<p><code lang="bash"><br />
rake ruby19<br />
</code></p>
<p>This project creates a sandbox that compiles a working ruby environment using <a href="http://mingw.org/">mingw</a>. </p>
<p>After contemplating the insanity of what I was doing for a couple of minutes (remember : installing a working ruby on linux is a single shell command) I grabbed some coca cola and started browsing through the source code for ruby distro while the rubyinstall was compiling. I looked a bit at ruby.c and  vm_exec.c  and had grim flashbacks to my c days. Luckily the compile finished and I copied ruby19_mingw to my c:\ drive and set it up on my PATH variable. Then I could check which version I was using:</p>
<p><code lang="bash"><br />
C:\>ruby -v<br />
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]<br />
</code></p>
<p>Now I was able to do:<br />
<code lang="bash"><br />
gem install gemcutter<br />
gem tumble<br />
gem install jspec<br />
</code></p>
<p>(Note that there is  information sent to the terminal during these steps)</p>
<p>Now for the interesting part(!) jspec was working , so I could do this:</p>
<p><code lang="bash"><br />
jspec init SolitaireCipher --freeze<br />
</code></p>
<p>This created a directory where I can train doing the <a href="http://www.rubyquiz.com/quiz1.html">SolitaireCipher</a> using javascript. I renamed lib/yourlib.core.js to lib/SolitaireCipher.js  and spec/spec.core.js to spec/spec.SolitaireCipher.js and spec/spec.dom.html accordingly.</p>
<p>After 20 mins of fiddling I managed to get some running tests in a browser by opening spec.dom.html. Then I decided I want to automate the tests using <a href="http://www.mozilla.org/rhino/download.html">mozilla rhino</a>. After installing rhino , I could run automated tests like this</p>
<p><code lang="bash"><br />
 cd c:\projects\SolitaireCipher<br />
 jspec --rhino<br />
</code></p>
<p>This opens up a proces that listens to file changes in the lib and spec folders. All very well &#8211; untill I discovered that jspec currently uses ANSI codes to render colors to the terminal screens. ANSI codes are not supported on windows vista (something with ANSI.SYS being obsoleted), so if I want the nice colors then I need an alternative terminal than my command prompt in vista.</p>
<p>I found rxvt available from <a href="http://code.google.com/p/msysgit/downloads/list">PortableGit</a> on google code. This renders the colors just nicely &#8211; but has some other drawbacks. If I just use rxvt for rendering feedback from the jspec tests, then it seems to work though. </p>
<p>One thing to note is that rhino needs the java sdk to be installed and js.jar needs to be on your CLASSPATH. when starting jspec from rxvt on the msys from PortableGit, then CLASSPATH could be set like this (assuming rhino is installed in c:\tools ):</p>
<p><code lang="bash"><br />
export CLASSPATH=/c/tools/rhino1_7R2/js.jar<br />
</code></p>
<p>I probably want to avoid using rxvt on PortableGit too much . There are some major flaws listed <a href="http://code.google.com/p/msysgit/wiki/WhyIsRxvtNotTheDefault">here</a> .</p>
<p>Maybe I should look into doing a adobe air frontend for jspec? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/10/21/adventures-with-mingw-rubyjava-rhino-and-jspec/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>BDD is not about testing</title>
		<link>http://www.pedant.dk/2009/10/03/bdd-is-not-about-testing/</link>
		<comments>http://www.pedant.dk/2009/10/03/bdd-is-not-about-testing/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 20:17:11 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=671</guid>
		<description><![CDATA[When talking to people about BDD and my lame example using Paris Hilton, then I got the question &#8220;it was really interesting reading about Paris Hiliton .. but what is BDD really about?. 
The central insight of BDD is that TDD is really computer aided specifications of the executable behaviour of your system. BDD tries [...]]]></description>
			<content:encoded><![CDATA[<p>When talking to people about BDD and my lame example using Paris Hilton, then I got the question &#8220;it was really interesting reading about Paris Hiliton .. but what is BDD really about?. </p>
<p>The central insight of BDD is that TDD is really computer aided specifications of the executable behaviour of your system. BDD tries to express this using a Domain Specific language.</p>
<p>Back in 2006 , Dave Astels described how to ascend from the focus on 1-1 testing of production code to use the test proces as a way to describe the way you want your system to behave.</p>
<p><embed id=VideoPlayback src=http://video.google.com/googleplayer.swf?docid=8135690990081075324&#038;hl=da&#038;fs=true style=width:400px;height:326px allowFullScreen=true allowScriptAccess=always type=application/x-shockwave-flash> </embed></p>
<p>In the video Dave makes the valid point that &#8220;The words you use shape how you think&#8221;.  So we should go away from thinking about &#8220;testing&#8221; constantly to think about describing how you want your system to work.</p>
<p>So to me &#8211; BDD sounds like a kickstart to be productive in TDD &#8211; and do it well from the start. So if you are starting out on TDD , you should really start out doing BDD.</p>
<p>Dave walks through some examples using rspec in ruby. I am  currently using <a href="http://github.com/visionmedia/jspec">jspec</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/10/03/bdd-is-not-about-testing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Paris Hilton and Behaviour Driven Development</title>
		<link>http://www.pedant.dk/2009/09/27/paris-hilton-and-behaviour-driven-development/</link>
		<comments>http://www.pedant.dk/2009/09/27/paris-hilton-and-behaviour-driven-development/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 18:36:20 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=644</guid>
		<description><![CDATA[Recently, I have been giving  Behaviour Driven Development some thought. 
Let&#8217;s take a an example of how to develop and test a  music video search and storage  system. A traditional way of developing this would require formulating a object oriented system architecture, thinking about streaming and metadata enabled search. The system architecture [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I have been giving  <a href="http://behaviour-driven.org/Introduction">Behaviour Driven Development</a> some thought. </p>
<p>Let&#8217;s take a an example of how to develop and test a  music video search and storage  system. A traditional way of developing this would require formulating a object oriented system architecture, thinking about streaming and metadata enabled search. The system architecture could consist  of a well chosen database server, a streaming server and a metadata enabled search engine &#8211; combining these technologies with a modern UI  and encapsulating theme in carefully designed object oriented structures. During all these important choices , and all during development we would make sure to write tests before we write a single line of code.</p>
<p> All these things put together would lead to a well thought out system architecture , but all the effort put into the system architecture can be in vain &#8211; if we don&#8217;t have a solid business understanding of what a video storage system should do. What will the users expect?</p>
<p>While browsing on <a href="http://www.facebook.com">facebook</a> this other day I found the <a href="http://www.facebook.com/group.php?gid=5299495387">&#8220;The Paris Hilton &#038; Jacques Derrida Appreciation Society&#8221; </a>  &#8211; this group explores the connections between the works of Paris Hilton and Jacques Derrida. When we deconstruct the &#8220;pretty blonde&#8221; facade of Paris Hilton, then you can actually find some deep insights. Take &#8220;Nothing in this world&#8221; for instance:</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/32DwYTRmmto&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/32DwYTRmmto&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>Take the phrase &#8220;when you are with somebody else, that&#8217;s me in your eye&#8221;.  There is the obvious interpretation of the sentence .  But thinking about that sentence also let&#8217;s you reflect on the <em>real meaning</em> . When you look at Paris Hilton in this video, what do you see? Do you see the pretty blonde or the millionaire , hard working young girl . In this video I am seeing the image of the pretty blonde &#8211; but I am also thinking about the millions of dollars she is earning portraying herself in this way.  So in a sense &#8211; I am reading the original message out of context. I am admiring what Paris Hilton in some other way than she intended &#8211; the original meaning of the words seem to have disappeared &#8211; but my understanding of the sentence is more useful to me.  I wish I could do what Paris Hilton does &#8211; but in a way that would make sense in my world .</p>
<p>The producers of the &#8220;Nothing in this world&#8221; video are not likely to convey information about the business empire of Paris Hilton in the metadata supplied for the video. So a system formulated as a &#8220;video storage system&#8221; would not let me exploit the information I found in the facebook group.</p>
<p>BDD introduces the use of a Domain Specific language to express the users expectations in a manner more directly focused on the behavioural aspects of the system. This lifts the clouds from the system aspects and focuses on <em>intent</em>.</p>
<p>A better way to formulate my expectations for the system would be:</p>
<pre>
Describe the music video storage system:
  I should be able to search for videos using metadata
  it should play videos  in my browser
  I should be able to query facebook for information about it
  </pre>
<p>If I had those expectations formulated to me , then I would choose to implement this system as a mashup between youtube and facebook as a facebook application. This would be a radically different system architecture than the one describe above.</p>
<p>Furthermore , by leveraging one of the <a href="http://behaviour-driven.org/Implementations">several BDD test frameworks available</a>, then the expectations could be formulated in way that can be used as tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/09/27/paris-hilton-and-behaviour-driven-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>what is information?</title>
		<link>http://www.pedant.dk/2009/08/10/what-is-information/</link>
		<comments>http://www.pedant.dk/2009/08/10/what-is-information/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 19:25:56 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=574</guid>
		<description><![CDATA[Listed as one of the of five deep questions in computing , this questions stands out to me as the one question we have to answer before we can answer questions like &#8220;what is computable&#8221; and &#8220;(how) can we build complex systems simply&#8221;.   
To me the concept of &#8220;information&#8221; only makes sense if [...]]]></description>
			<content:encoded><![CDATA[<p>Listed as one of the of <a href="http://mags.acm.org/communications/200801/?pg=60">five deep questions in computing</a> , this questions stands out to me as the one question we have to answer before we can answer questions like &#8220;what is computable&#8221; and &#8220;(how) can we build complex systems simply&#8221;.   </p>
<p>To me the concept of &#8220;information&#8221; only makes sense if it can be extracted or related using wellknown techniques. In this sense &#8220;information&#8221; is put in the context of a &#8220;subject&#8221; and a &#8220;object&#8221; , e.g. the information identifies facts about the &#8220;object&#8221; in a manner that is understandable for the &#8220;subject&#8221;. When information allways should occur &#8220;in context&#8221;, then it should be clear that the information should be codified in a manner that is understandable by the &#8220;subject&#8221;. </p>
<p>This &#8220;codification process&#8221; is successfull  when the information about the &#8220;object&#8221; is conveyed to the &#8220;subject&#8221; in a manner that is easily understood &#8211; so in my interpretation &#8220;information&#8221; can be expressed in many ways , and still be intended as the same information about the  the same &#8220;object&#8221;.</p>
<p>In most concrete circumstances involving human communication &#8220;codification&#8221; will mean &#8220;telling&#8221; somebody &#8220;else&#8221;. E.g saying &#8220;I am hungry&#8221; .. or &#8220;do you mind passing me the water&#8221;. Information is revealed through use of language in a sentence and placed in the context of the situation where the sentence is spoken.</p>
<p>In most traditional computing software  information is stored to examine facts about phenomena or physical items. The wealth of information in context has been lost in the process of gathering these facts. Take a traditional supply store. It is not very common for the desk clerk to capture the facial expression of the customers while entering the  items bought in the cash register. So in this way, the information from the facial expression is available to the desk clerk but not the store manager. </p>
<p>In our current computing systems, then it is not easy to compute &#8220;the mood of the customers&#8221; &#8211; but if we understand the wealth of information lost in the &#8220;codification process&#8221; then we can exploit this  for a better understand of the market siutation . But we will still not be able the compute the &#8220;mood of the customers&#8221;.</p>
<p>So &#8211; to me information can only be understood as &#8220;information in context&#8221;.  I will try to design complex systems from this where it makes sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/08/10/what-is-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloud computing man kan bruge til noget</title>
		<link>http://www.pedant.dk/2009/07/11/cloud-computing-man-kan-bruge-til-noget/</link>
		<comments>http://www.pedant.dk/2009/07/11/cloud-computing-man-kan-bruge-til-noget/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 12:08:30 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Cloud]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=499</guid>
		<description><![CDATA[Jeg har tidligere kigget på brugen af vmware ifm test og udvikling. Jeg har fundet ud af det det kan være fordelagtigt at opbevare udviklingsmiljøer og databaseopsætninger på virtuelle maskiner &#8211; det hjælper typisk med at min hoved-udviklingsmaskine ikke bliver &#8216;møget&#8217; til af diverse projekter jeg kigger på i løbet af ugen.  Jeg har [...]]]></description>
			<content:encoded><![CDATA[<p>Jeg har tidligere kigget på brugen af <a href="http://vmware.com">vmware</a> ifm test og udvikling. Jeg har fundet ud af det det kan være fordelagtigt at opbevare udviklingsmiljøer og databaseopsætninger på virtuelle maskiner &#8211; det hjælper typisk med at min hoved-udviklingsmaskine ikke bliver &#8216;møget&#8217; til af diverse projekter jeg kigger på i løbet af ugen.  Jeg har også kigget på <a href="http://code.google.com/intl/da/appengine/docs/java/overview.htmlhttp://">Google App Engine for java </a>- det er godt med nogle fasttømrede api&#8217;er der er klargjort til af fungere på en større gruppe af maskiner på en gang &#8211; så performance og skalerbarhed har været der fra starten ( Jeg hører også gode ting om Amazon EC2)</p>
<p>Det har dog bæret sådan at det bliver lidt bøvlet at vedligeholde diverse images rundt omkring &#8211; og Google App Engine for java stiller væsentlige begrænsninger på hvordan man kan skrive SQL &#8211; og det kan blive vanskeligt at få benyttet GIS operatorer på GAE (Bemærk at jeg slet ikke har prøvet microsofts <a href="http://www.microsoft.com/azure/default.mspx">nye Azure platform</a>) </p>
<p><a href="http://oddthesis.org">Bob McWhirter </a>kører iøjeblikket et projekt for jboss , hvor han iøjeblikket eksperimenterer med <a href="http://reductivelabs.com/trac/puppet">puppet </a> til at administrere virtuelle maskiner. Jboss håndterer udviklingen under projektet <a href="http://github.com/bobmcwhirter/jboss-cloud/tree/master">jboss cloud</a> . Ideen er at man kan benytte &#8220;metaappliance&#8221; til at generere de øvrige &#8220;appliances&#8221;.  <a href="http://github.com/bobmcwhirter/jboss-cloud/tree/master">Jboss understøttede clustering allerede fra version 4</a> &#8211; det nye i eksperimentet er nu maskin-håndteringen, hvor deployment-platformene inkluderer <a href="http://aws.amazon.com/ec2/"> ec2</a>, <a href="http://www.vmware.com/products/server/">vmware</a>, <a href="http://www.linux-kvm.org/page/Main_Page">kvm</a> .</p>
<p>Jeg håber at kunne bruge jboss-cloud projektet til at håndtere mine udviklingsservere på en mere fornuftig vis <img src='http://www.pedant.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/07/11/cloud-computing-man-kan-bruge-til-noget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nåda. &#8220;ting&#8221; kan også JSON!</title>
		<link>http://www.pedant.dk/2009/06/28/nada-ting-kan-ogsa-json/</link>
		<comments>http://www.pedant.dk/2009/06/28/nada-ting-kan-ogsa-json/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 15:04:43 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Search engines]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=462</guid>
		<description><![CDATA[Her i eftermiddags kiggede jeg lidt videre på ting projektet. Det viser sig at andre end mig har haft problemer med at bruge webservicen : http://krakoa.dk/wordpress/2009/05/31/refindting/ . Her bemærkede jeg en kommentar der nævnte ting også kunne json , så jeg kastede mig ud i flg php  kode :

class Ting_Client {
   var [...]]]></description>
			<content:encoded><![CDATA[<p>Her i eftermiddags kiggede jeg lidt videre på <a href="http://gnit.dk/">ting</a> projektet. Det viser sig at andre end mig har haft problemer med at bruge webservicen : <a href="http://krakoa.dk/wordpress/2009/05/31/refindting/">http://krakoa.dk/wordpress/2009/05/31/refindting/</a> . Her bemærkede jeg en kommentar der nævnte ting også kunne json , så jeg kastede mig ud i flg php  kode :</p>
<p><code lang="php"><br />
class Ting_Client {<br />
   var $opensearch = "http://didicas.dbc.dk/opensearch/";</p>
<p>   public function search($query){<br />
     $hc=new HTTPClient();<br />
     $url = $this->opensearch."?action=searchRequest&#038;query=$query&#038;facets.number=10&#038;outputType=json";<br />
     $host = $hc->extractHost($url);<br />
     $hc->connect($host);<br />
     return( $hc->Get($url) );<br />
   }<br />
 }<br />
</code></p>
<p>Her antager jeg at din php klient også kan hente HTML sider ligesom <a href="http://github.com/jacobandresen/yase/blob/155ea553a3dd72ca4df07950c236a594fb1872ba/classes/HTTPClient.php">min</a> kan . På den facon kunne man tænke sig noget i denne her stil:</p>
<p><code lang="php"><br />
<?php<br />
 $t=new Ting_Client();<br />
 $searchResponse = json_decode($t->search($query));<br />
 if($searchResponse->searchResult->hitCount>0) {<br />
 print "
<ul>\r\n";<br />
 foreach( $searchResponse->searchResult->records->tingRecord<br />
           as $rec){<br />
    $isbn=$rec->dc->identifier[0];<br />
    $isbn=preg_replace("/ISBN\:/","",$isbn);<br />
    print "
<li><a href=\"http://slashdemocracy.org/isbn/".$isbn."\">".$rec->dc->title[0]."</a></li>
<p>";<br />
  }<br />
 }<br />
</code></p>
<p>hvor beskrivelsen på de enkelte poster kan benyttes til at lave et mashup. Jeg har her prøvet med <a href="http://slashdemocracy.org/">slashdemocracy</a>, men det virker vist ikke helt for andet end ISBN.</p>
<p>Da jeg kiggede på outputtet fra ting , så undrede jeg mig lidt over hvorfor at man ikke havde valgt at bruge <a href="http://www.loc.gov/z3950/agency/Z39-50-2003.pdf">Z39.50</a> , men det er så også ok.  Når man har kigget på outputtet fra ting i et stykke tid, så giver det nogenlunde mening.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/06/28/nada-ting-kan-ogsa-json/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ding på github &#8211; mine første 20 minutter</title>
		<link>http://www.pedant.dk/2009/06/27/ding-pa-github-mine-f%c3%b8rste-20-minutter/</link>
		<comments>http://www.pedant.dk/2009/06/27/ding-pa-github-mine-f%c3%b8rste-20-minutter/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 21:29:40 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Search engines]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=455</guid>
		<description><![CDATA[Jeg fald lige over http://github.com/kdb/ding/tree/master på github, hvor Københavns biblioteker er igang med at kode en drupal baseret frontend til ting projektet. Nu er jeg jo ikke lige en haj til drupal og php , så jeg startede med at nøjes med at kigge på en klient til php5. Den var også enormt kompliceret , [...]]]></description>
			<content:encoded><![CDATA[<p>Jeg fald lige over <a title="ding" href="http://github.com/kdb/ding/tree/master">http://github.com/kdb/ding/tree/master</a> på github, hvor Københavns biblioteker er igang med at kode en <a title="drupal" href="http://drupal.org/">drupal </a>baseret frontend til <a href="http://gnit.dk">ting</a> projektet. Nu er jeg jo ikke lige en haj til drupal og php , så jeg startede med at nøjes med at kigge på en klient <a title="klienten til php5" href="http://github.com/kdb/ting-dbc-php5-client/tree/master">til php5</a>. Den var også enormt kompliceret , så jeg skøjtede videre til <a href="http://didicas.dbc.dk/opensearch/opensearch.wsdl">http://didicas.dbc.dk/opensearch/opensearch.wsdl</a> og prøvede at lave en php5 webservice klient vha <a href="http://sourceforge.net/projects/nusoap/">nusoap. </a></p>
<p>Den virkede ikke lige, så prøvede jeg istedet at skrive &#8220;wsdl http://didicas.dbc.dk/opensearch/opensearch.wsdl&#8221; på kommandolinjen (her var det heldigt at jeg havde installeret <a title="windows sdk'et" href="http://msdn.microsoft.com/en-us/windows/bb980924.aspx">Windows SDK&#8217;et</a> ) . Den kommando lavede filen tingService.cs til mig .</p>
<p>Jeg så straks at designeren af skemaet kan lide <a href="http://en.wikipedia.org/wiki/CamelCase">lower camelcase </a>- det undrede mig dog at typerne resulterer i små begyndelsesbogstaver for mine klasser.</p>
<p>Ved at kigge lidt i tingService.cs så jeg hvilke parametre man skulle bruge . Jeg ved ikke lige hvad formatType og sortType skal bruges til ,så jeg lavede bare en default constructor på den. Det førte til flg kode:</p>
<p><code lang="c#"><br />
using System;</p>
<p>public class test {<br />
 public static void Main(){</p>
<p> tingService t=new tingService();<br />
 searchResult sr = t.search("test", "", null, new formatType(), true, 1, true, 5, true, new sortType(), true);<br />
 Console.Write(sr.hitCount);<br />
 //Console.Write(sr.records[0].relations[0]);<br />
 }<br />
}<br />
</code></p>
<p>jeg kompilerede koden med &#8220;csc test.cs tingService.cs&#8221; og fik umiddelbart en køretidsfejl. .NET frameworket rapporterede om en Ikke-afviklet undtagelse ifm en HTTP fejl 301  hvor det blev meddelt at endepunktet var flyttet til http://didicas.dbc.dk/opensearch/ </p>
<p>Efter at have tilføjet et &#8220;/&#8221; til endepunktet for servicen i tingService.cs , så kunne jeg se at der er &#8220;1320&#8243; svar på søgningen &#8220;test&#8221; .</p>
<p>Jeg kan se at resultaterne bliver afleveret i en struktur kaldet &#8220;tingRecord&#8221; i det returnerede searchResult, men jeg kan ikke umiddelbart overskue hvordan man hiver resultaterne ud derfra.  Jeg vil prøve at følge lidt med i projektet og kigge lidt nærmere på wsdl filen ved lejlighed <img src='http://www.pedant.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/06/27/ding-pa-github-mine-f%c3%b8rste-20-minutter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>En maskine der siger &#8220;bing&#8221;</title>
		<link>http://www.pedant.dk/2009/05/30/en-maskine-der-siger-bing/</link>
		<comments>http://www.pedant.dk/2009/05/30/en-maskine-der-siger-bing/#comments</comments>
		<pubDate>Sat, 30 May 2009 10:53:22 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Search engines]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=418</guid>
		<description><![CDATA[Jeg prøver at følge med i hvad der sker inden for søgemaskine-feltet . Det forlyder at Microsoft også har opfundet en maskine der siger Bing:

Microsoft har beskrevet den nærmere her :

]]></description>
			<content:encoded><![CDATA[<p>Jeg prøver at følge med i hvad der sker inden for søgemaskine-feltet . Det forlyder at Microsoft også har opfundet en maskine der siger Bing:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/lusXJIfB4ys&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lusXJIfB4ys&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Microsoft har beskrevet den nærmere her :</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/4w4W7fQHgYw&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/4w4W7fQHgYw&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/05/30/en-maskine-der-siger-bing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>om autoriteter i brugerskabt indhold</title>
		<link>http://www.pedant.dk/2009/02/14/om-autoriteter-i-brugerskabt-indhold/</link>
		<comments>http://www.pedant.dk/2009/02/14/om-autoriteter-i-brugerskabt-indhold/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 16:11:28 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Search engines]]></category>

		<guid isPermaLink="false">http://www.pedant.dk/?p=216</guid>
		<description><![CDATA[Den bedste internet søgemaskine på markedet idag er baseret på begreberne &#8216;hubs&#8217; og &#8216;authorities&#8217;. En &#8216;authority&#8217; opfattes som en side der er central i et netværk for et givent emne og opfattes af netværket som centralt for emnet. En &#8216;hub&#8217; er et knudepunkt i netværket der indeholder mange henvisninger til øvrige steder.
Efterhånden som flere og [...]]]></description>
			<content:encoded><![CDATA[<p>Den bedste internet søgemaskine på markedet idag er baseret på begreberne &#8216;hubs&#8217; og &#8216;authorities&#8217;. En &#8216;authority&#8217; opfattes som en side der er central i et netværk for et givent emne og opfattes af netværket som centralt for emnet. En &#8216;hub&#8217; er et knudepunkt i netværket der indeholder mange henvisninger til øvrige steder.</p>
<p>Efterhånden som flere og flere steder på internettet tillader brugerskabt indhold så mener jeg at vi må ændre på beregning af autoritet vha af henvisninger i et netværk. F.eks på &#8216;blogs&#8217; så indeholder kommentarer typisk en henvisning tilbage til hjemmesiden til ham eller hende der har skrevet kommentaren, derved vender vi op og ned på hvad en &#8216;hub&#8217; og en &#8216;authority&#8217; er &#8211; idet linket nu går den anden vej i kommentaren.</p>
<p><strong>Den traditionelle &#8216;hubs&#8217; and &#8216;authorities&#8217; model<br />
</strong><br />
Hvis vi i den traditionelle situation betragter et endeligt antal websider uden brugerskabt indhold i et sæt {1,2, &#8230; ,n} så kan vi opstille en matrice <strong>B</strong> med links i mellem de forskellige websider hvor 1 markerer at der link mens 0 markerer intet link &#8211; indgang (i,j) i B markerer så at der er et link fra i til j.</p>
<p>Hvis vi så yderligere betragter &#8216;hubs&#8217;  som <img title="inline h=&lt;h_1,h_2, .., h_n&gt;" src="http://latex.codecogs.com/gif.latex? h=&lt;h_1,h_2, .., h_n&gt;" alt="" /> og authorities <img src="http://latex.codecogs.com/gif.latex?%5Cinline%20a=%3Ca_1,a_2,..,a_n%3E" alt="" /></p>
<p>Så kan vi beregnene vægtene i netværket således :</p>
<p><img title="inline h=Bcdot a" src="http://latex.codecogs.com/gif.latex? h=Bcdot a" alt="" /> og      <img title="inline a=B^{T}cdot h" src="http://latex.codecogs.com/gif.latex?a=B^{T}cdot h" alt="" /></p>
<p>Hvis vi itererer en gang så når vi</p>
<p><img title=" h = left( BB^{T} righ) a" src="http://latex.codecogs.com/gif.latex? h = left( BB^{T} right) a" alt="" /> og   <img title="a=left( B^{T}Bh right)h" src="http://latex.codecogs.com/gif.latex? a=left( B^{T}Bh right)h" alt="" /></p>
<p>næste iteration giver</p>
<p><img title="inline h = left( B B^{T} right)^2a" src="http://latex.codecogs.com/gif.latex?h = left( B B^{T} right)^2a" alt="" /> og <img title="inline a = left ( B^{T} B right)^2 a" src="http://latex.codecogs.com/gif.latex? a = left ( B^{T} B right)^2 a" alt="" /></p>
<p>Den matematisk kyndige læser vil her indse at at resultaterne vil konvergere imod de principielle egenvektorer for <a href="http://www.codecogs.com/eqnedit.php?latex=inline left( B B^{T} right)" target="_blank"><img title=" left( B B^{T} right)" src="http://latex.codecogs.com/gif.latex? left( B B^{T} right)" alt="" /></a> og <a href="http://www.codecogs.com/eqnedit.php?latex=inline B^{T}B" target="_blank"><img title="B^{T}B" src="http://latex.codecogs.com/gif.latex?B^{T}B" alt="" /></a></p>
<p>Rent intuitivt ses det at samlingen af autoritetsvægte for siderne i netværket udtrykker at en gennemsøgning i netværket vil have større sandsynlighed for at ende på en side hvor vægten er større end på en side hvor vægten er lille.</p>
<p>Google har benyttet princippet til at opstille deres <a href="http://infolab.stanford.edu/~backrub/google.html">PageRank </a></p>
<p><a href="http://www.codecogs.com/eqnedit.php?latex=inline PR(A)=(1-d) @plus; d(PR(T_1)/C/T_1) @plus; ... @plus; PR(T_n)/C(T_n))" target="_blank"><img title="inline PR(A)=(1-d) + d(PR(T_1)/C(T_1)) + ... + PR(T_n)/C(T_n))" src="http://latex.codecogs.com/gif.latex?PR(A)=(1-d) + d(PR(T_1)/C(T_1)) + ... + PR(T_n)/C(T_n))" alt="" /></a></p>
<p>Hvor <a href="http://www.codecogs.com/eqnedit.php?latex= C(T_i)" target="_blank"><img title=" C(T_i)" src="http://latex.codecogs.com/gif.latex? C(T_i)" alt="" /></a> er antallet af links ud fra side <a href="http://www.codecogs.com/eqnedit.php?latex=inline T_i" target="_blank"><img title="inline T_i" src="http://latex.codecogs.com/gif.latex? T_i" alt="" /></a> og d er valgt til 0.85.</p>
<p><strong>Min mulige ændring af beregning af autoriteter </strong></p>
<p>Når vi betragter modeller hvor &#8220;autoritet&#8221; tages som et udtryk for at en læser vil have høj sandsynlighed for at opleve en henvisning fra side A til side B som autoritet, så vil et brugerskabt links fra A til B have mulighed for at vende situationen om. Et kendt eksempel er ved brugen af blogs, hvor en hyppig bruger af mange blogs vil opnå mange indgående links (Man kunne kalde det en &#8216;invers hub&#8217;). Brugen af henvisninger i brugerskabt indhold går nu fra at være en måde at udtrykke mening om relevans inden for et emne til at udtrykke interesse for et emne.</p>
<p>Det er så her at jeg tænker på om man kan finde de typiske steder hvor brugeren af blogs skriver på og foretage tilpasninger af link-beregningen der. Lad os antage at vi kunne finde en passende måde at beregne om der er tale om lille koncentreret klynge af websteder der henviser til hinanden . Efter at have opnået listen af sider kunne vi ændre på den vægt der tilføjes pr iteration ved betragtninger over linkafstanden til klyngecenteret. Altså at hvis vi betrager et websted , der er inde i den lille klynge, så har et link ikke så stor betydning som hvis det optrådte udenfor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pedant.dk/2009/02/14/om-autoriteter-i-brugerskabt-indhold/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
