<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>erlang &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/erlang/</link>
	<description>Feed of posts on WordPress.com tagged "erlang"</description>
	<pubDate>Fri, 27 Nov 2009 19:14:52 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Google releases new programming language with concurrency features]]></title>
<link>http://softtalkblog.wordpress.com/2009/11/25/google-releases-new-programming-language-with-concurrency-features/</link>
<pubDate>Wed, 25 Nov 2009 17:03:41 +0000</pubDate>
<dc:creator>softtalkblog</dc:creator>
<guid>http://softtalkblog.wordpress.com/2009/11/25/google-releases-new-programming-language-with-concurrency-features/</guid>
<description><![CDATA[It had to happen sooner or later: Google has released so many technologies, it was bound to end up i]]></description>
<content:encoded><![CDATA[It had to happen sooner or later: Google has released so many technologies, it was bound to end up i]]></content:encoded>
</item>
<item>
<title><![CDATA[Dynamic Offline Reports]]></title>
<link>http://developeraspirations.wordpress.com/2009/11/23/dynamic-offline-reports/</link>
<pubDate>Tue, 24 Nov 2009 00:38:41 +0000</pubDate>
<dc:creator>jearil</dc:creator>
<guid>http://developeraspirations.wordpress.com/2009/11/23/dynamic-offline-reports/</guid>
<description><![CDATA[Many applications have the primary concern of storing and retrieving data. The raw data by itself is]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Many applications have the primary concern of storing and retrieving data. The raw data by itself is often not very useful, so an additional process is put into place to turn that data into useful information. Many applications generate these reports from the data quickly at the user&#8217;s request through either a narrow SQL select statement, in application data processing, or both. However, in larger applications where the data is too large to handle in memory at a time, processing is too heavy, and report customization is too varied, information generation needs to be pushed to its own scalable system.</p>
<p>A lot of data has various pieces of metadata associated with it naturally. Data such as what user added the record, the date it was added or modified (or both), maybe the size of the record, categories, tags, keywords, or other pieces of associate data that is used to break it up into more manageable chunks. This meta data is useful, but only if we can use it as an aggregate to generate specific information relating to the grouping of items based on this data.</p>
<p>Sometimes generating these more specific reports is as easy as adding additional WHERE or GROUP BY clauses in SQL. However, when more advanced business rules are taking place where there isn&#8217;t an easy or succinct way of extracting this information via a query, or if the query returns such a large amount of data as to cause memory issues, a different approach can be taken.</p>
<p>For instance; in an application I am currently working on we need to generate reports based on a table with about 5 million rows. The SQL queries we use can limit the amount of rows returned to perhaps a few hundred thousand for some of our larger reports. However, a lot of the data needs to be processed in application code rather than by the database itself due to some special business rules. Because of this, we end up creating a large number of objects in Java to hold these result rows. If multiple users are generating different reports we might end up holding too many of these objects in memory at a time and receive an OOM error. Also, the processing on this data can be intense enough that if the server is slammed with report requests that the entire system slows down, causing difficulties for people wanting to insert or modify data. This is the case I am in while I contemplate offline report generation.</p>
<p>The basic idea is that the main application should be concerned purely with manipulating the data of the system. That is basic CRUD stuff such as creating new records, updating them, the rare deletions, and showing single records to the user (so they can edit or delete it). We want that part of the application to remain fast, and not be effected by the purely read-only needs imposed by report generation. In order to nullify the impact, we move reporting to its own system that reads from a separate read-only replication of our production database.</p>
<p>When a report request comes in to our application, we send a request to the separate reporting system. This can be done either as a web service or maybe an RPC call. The reporting system uses its read-only copy of the data to generate the report numbers and send it back, causing no speed delay for insertion or regular operation of the main application.</p>
<p>This doesn&#8217;t solve our OOM issues however, as many drivers for our database (MySQL) return ResultSet objects with the entire contents of the results which might be too large to fit into memory. However, since we&#8217;re using a read-only list anyway we can convert the table or tables we use to process our results into flat files that can be read in on a line by line basis, perform some intermediate result processing, deallocate those lines and work on additional lines. Since our reports are mostly generating statistical data over a large data set, we can process results on that data set in parallel using multiple threads or possibly multiple computers using a Hadoop cluster.</p>
<p>By making report generation asynchronous to our applications general work flow we will free up the processing power and the connection pool that&#8217;s used to handle requests by asking users to either poll for when the result is finished or to notify the system when a report is finished and thereby avoid the instances where we use all of our available connections or resources processing reports. There is also the added possibility of continuously generating all possible report data on a separate machine or cluster to decrease access time by increasing storage requirements.</p>
<p>I&#8217;m currently researching the use of MapReduce in Hadoop for processing this flat file of all data for reports. In addition, I&#8217;m researching a few languages that are reported to be good at concurrent processing so that I can benefit from multiple cores when generating reports from our raw data. My current focus is on Scala, Erlang, and Clojure, but I do not have much to report on those areas yet. If anyone has any information those languages as far as report generation based on a largish data set (currently 5 million, but the rate of growth is fairly alarming), let me know.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Os Melhores Podcasts de Tecnologia para Desenvolvedores  ]]></title>
<link>http://andrefaria.com/2009/11/20/os-melhores-podcasts-de-tecnologia-para-desenvolvedores/</link>
<pubDate>Fri, 20 Nov 2009 14:32:29 +0000</pubDate>
<dc:creator>andrefaria</dc:creator>
<guid>http://andrefaria.com/2009/11/20/os-melhores-podcasts-de-tecnologia-para-desenvolvedores/</guid>
<description><![CDATA[Um dos maiores problemas da sociedade moderna é a dificuldade de locomoção diária, a maioria das pes]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Um dos maiores problemas da sociedade moderna é a dificuldade de locomoção diária, a maioria das pessoas passa horas em seus carros, ou em meios de transporte públicos para irem de lugar a outro. Há alguns anos atrás quando morava na zona norte de São Paulo e trabalha na zona sul, essa era minha realidade. Uma vez que naquela época passar por isso era inevitável procurei formas de fazer com esse tempo pudesse de alguma forma torna-se produtivo, foi então que comecei a ouvir à podcasts.</p>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.flickr.com/photos/dantaylor/87397283/"><img class=" " title="iPod FM radio remote por dan taylor" src="http://farm1.static.flickr.com/41/87397283_ebc7fbaadc.jpg" alt="iPod FM radio remote por dan taylor" width="400" height="300" /></a><p class="wp-caption-text">iPod FM radio remote por dan taylor</p></div>
<p>De acordo com a Wikipedia, Podcasting é uma forma de publicação de arquivos de mídia digital (áudio, vídeo, foto, etc.) pela Internet, através de um feed RSS, que permite aos utilizadores acompanhar a sua atualização. Assim, é possível o acompanhamento e/ou download automático do conteúdo de um podcast.</p>
<p>Neste post apresentarei os podcasts aos quais escuto e os episódios principais para que você ouça. Sugiro que você utilize o iTunes para inscrever-se nos podcasts e sincronizar com seu iPod.</p>
<h2>Desenvolvimento Ágil</h2>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.flickr.com/photos/pcalcado/2268593480/in/set-72157604854195771/"><img class=" " title="por pcalcado" src="http://farm3.static.flickr.com/2050/2268593480_68100bfa7c.jpg" alt="por pcalcado" width="400" height="300" /></a><p class="wp-caption-text">por pcalcado</p></div>
<h4>Podcast da ImproveIt</h4>
<p><span style="font-weight:normal;">por Vinícius Teles<br />
<a href="http://improveit.com.br/podcast">http://improveit.com.br/podcast<br />
</a>Português</span></p>
<ul>
<li><a href="http://improveit.com.br/podcast/improvecast-13-entrevista-alisson-vale-experiencias-ageis">Entrevista com Alisson Vale da Phidelis</a></li>
<li><a href="http://improveit.com.br/podcast/improvecast-11-entrevista-alexandre-magno-fdd-scrum-experiencias-ageis">Entrevista com Alexandre Magno na Série Experiências Ágeis</a></li>
<li><a href="http://improveit.com.br/podcast/improvecast-8-entrevista-carlos-barbieri-mpsbr">Entrevista com Carlos Barbieri sobre o MPS.BR</a></li>
<li><a href="http://improveit.com.br/podcast/improvecast-19-entrevista-ancar-experiencias-ageis">Entrevista com a equipe da Ancar na Série Experiências Ágeis</a></li>
</ul>
<h4>AgilCast</h4>
<p><span style="font-weight:normal;">Por AgilCoop<br />
<a href="http://agilcoop.incubadora.fapesp.br/portal/agilcast">http://agilcoop.incubadora.fapesp.br/portal/agilcast<br />
</a>Português</span></p>
<ul>
<li><a href="http://agilcoop.incubadora.fapesp.br/portal/agilcast/episodios/Agilcast03-Testes.mp3">Uma Visão Geral Sobre Scrum</a></li>
<li><a href="http://agilcoop.incubadora.fapesp.br/portal/agilcast/episodios/Agilcast03-Testes.mp3">Testes Automatizados</a></li>
<li><a href="http://agilcoop.incubadora.fapesp.br/portal/agilcast/episodios/Agilcast04-bds-ageis.mp3">Bancos de dados ágeis e refatoração de bancos de dados</a></li>
</ul>
<h4>Agile Toolkit Podcast<br />
<span style="font-weight:normal;"><a href="http://agiletoolkit.libsyn.com">http://agiletoolkit.libsyn.com</a><br />
Inglês</span></h4>
<ul>
<li><a href="http://agiletoolkit.libsyn.com/index.php?post_id=537344">Tom Goulet &#8211; Cucumber, Ruby and the transition to Generalizing Specialist (2009)</a></li>
<li><a href="http://agiletoolkit.libsyn.com/index.php?post_id=530103">Jim Miller &#8211; The Product Owner Role and Business Alignmnet</a></li>
<li><a href="http://agiletoolkit.libsyn.com/index.php?post_id=482372">Tips and Advice &#8211; Retrospectives</a></li>
</ul>
<h4>ThoughtWorks Podcast</h4>
<p><span style="font-weight:normal;"><a href="http://www.thoughtworks.com/what-we-say/podcasts.html">http://www.thoughtworks.com/what-we-say/podcasts.html</a><br />
Inglês</span></p>
<h2>Open Source</h2>
<h4><strong>FLOSS Weekly</strong></h4>
<p><span style="font-weight:normal;">por Leo Laport, Jono Bacon e Randal Schwartz<br />
Inglês</span></p>
<ul>
<li><a href="http://twit.tv/floss87">Entrevista com Kent Beck sobre Extreme Programming (XP)</a></li>
<li><a href="http://twit.tv/floss88">Entrevista com Linus Torvalds, o criador do Linux e do Git</a></li>
<li><a href="http://twit.tv/floss79">Entrevista com David Heinemeier Hansson criador do Ruby On Rails</a></li>
<li><a href="http://twit.tv/floss73">Entrevista com Tim O&#8217;Reilly, fundador e CEO da  O&#8217;Reilly Media</a></li>
<li><a href="http://twit.tv/floss55">Entrevista com John Resig criador e líder do Projeto jQuery</a></li>
<li><a href="http://twit.tv/floss36">Entrevista com Jan Lehnardt evangelista do projeto CouchDB</a></li>
<li><a href="http://twit.tv/floss34">Entrevista com  Jacob Kaplan-Moss criador do Django</a></li>
<li><a href="http://twit.tv/floss33">Entrevista com Bruno Souza sobre o OpenJDK</a></li>
<li><a href="http://twit.tv/floss27">Entrevista com Ward Cunningham inventor do Wiki e grande Personalidade da Comunidade Ágil</a></li>
<li><a href="http://twit.tv/floss26">Entrevista com  D. Richard Hipp criador do SQLite</a></li>
<li><a href="http://twit.tv/floss23">Entrevista com Nate Koechley sobre o Yahoo User Interface Library (YUI)</a></li>
<li><a href="http://twit.tv/floss19">Entrevista com Junio Hamano, Mantenedor do Git</a></li>
<li><a href="http://twit.tv/floss12">Entrevista com Rasmus Lerdorf, criador do PHP</a></li>
<li><a href="http://twit.tv/floss11">Entrevista com Guido van Rossum, Criador do Python</a></li>
<li><a href="http://twit.tv/floss7">Entrevista com o fundador da Wikipedia, Jimmy Wales</a></li>
</ul>
<h2>Java</h2>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.flickr.com/photos/amloq/302981047/"><img class=" " title="HorecaExpo - Java por bramloquet" src="http://farm1.static.flickr.com/107/302981047_6e74b21ecb.jpg" alt="HorecaExpo - Java por bramloquet" width="400" height="300" /></a><p class="wp-caption-text">HorecaExpo - Java por bramloquet</p></div>
<h4>JavaPosse</h4>
<p><span style="font-weight:normal;">Por Tor Norbye, Carl Quinn, Dick Wall e Joe Nuxoll<br />
Inglês<br />
<a href="http://www.javaposse.com"> http://www.javaposse.com</a></span></p>
<h4>Java Technology Insider</h4>
<p><span style="font-weight:normal;">Inglês<br />
<a href="http://www.javaworld.com/podcasts/jtech/"> http://www.javaworld.com/podcasts/jtech</a></span></p>
<ul>
<li><a href="http://www.javaworld.com/podcasts/jtech/2008/100708jtech.html">Rod Johnson: SpringSource and the future of Spring (2008)</a></li>
</ul>
<h4>Grails Podcast</h4>
<p><span style="font-weight:normal;">Por Glen Smith e Sven Haiges<br />
<a href="http://grailspodcast.com"> http://grailspodcast.com</a></span></p>
<h2>Ruby</h2>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.flickr.com/photos/nez/177722693/"><img class=" " title="Ruby on Rails por Andrew*" src="http://farm1.static.flickr.com/74/177722693_8aca6c7e82.jpg" alt="Ruby on Rails por Andrew*" width="400" height="320" /></a><p class="wp-caption-text">Ruby on Rails por Andrew*</p></div>
<h4>Rails Envy</h4>
<p><span style="font-weight:normal;">Por Jason Seifer e Gregg Pollack<br />
Inglês<br />
<a href="http://railsenvy.com"> http://railsenvy.com</a></span></p>
<h4>Rails Podcast</h4>
<p><span style="font-weight:normal;">por Geoffrey Grosenbach<br />
Inglês<br />
<a href="http://podcast.rubyonrails.com/"> http://podcast.rubyonrails.com/</a></span></p>
<ul>
<li><a href="http://podcast.rubyonrails.com/programs/1/episodes/david_heinemeier_hansson">Entrevista com David Heinemeier Hansson (2005)</a></li>
<li><a href="http://podcast.rubyonrails.com/programs/1/episodes/dave_thomas">Entrevista com Dave Thomas (2005)</a></li>
<li><a href="http://podcast.rubyonrails.com/programs/1/episodes/chad_fowler">Entrevista com Chad Fowler (2005)</a></li>
<li><a href="http://podcast.rubyonrails.com/programs/1/episodes/obie_fernandez">Entrevista com Obie Fernandez (2006)</a></li>
<li><a href="http://podcast.rubyonrails.com/programs/1/episodes/dave_thomas_and_mike_clark">Entrevista com Dave Thomas e Mike Clark (2006)</a></li>
</ul>
<h4>Rubiverse Podcast</h4>
<p><span style="font-weight:normal;">Por Mike Moore<br />
Ingles<br />
<a href="http://rubiverse.com"> http://rubiverse.com</a></span></p>
<ul>
<li><a href="http://rubiverse.com/podcasts/8-dave-hoover-on-software-craftsmanship">Dave Hoover on Software Crafsmanship (2009)</a></li>
<li><a href="http://rubiverse.com/podcasts/6-obie-fernandez-on-rails-maturity-model">Obie Fernandez on the Rails Maturity Model (2009)</a></li>
<li><a href="http://rubiverse.com/podcasts/5-ola-bini-on-polyglot-programming">Ola Bini on Polyglot Programming (2008)</a></li>
</ul>
<h2>JavaScript</h2>
<h4>jQuery Podcast</h4>
<p><span style="font-weight:normal;">Português<br />
<a href="http://blog.jquery.com/2009/11/13/announcing-the-official-jquery-podcast/"> http://blog.jquery.com/2009/11/13/announcing-the-official-jquery-podcast/</a></span></p>
<h2>Gadgets</h2>
<h4>GeekBrief TV</h4>
<p><span style="font-weight:normal;">por Cali Lewis<br />
Inglês<br />
<a href="http://www.geekbrief.tv"> http://www.geekbrief.tv</a></span></p>
<h2>Software</h2>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.flickr.com/photos/gesteves/2103477382/"><img class=" " title="Desk por Guillermo Esteves" src="http://farm3.static.flickr.com/2134/2103477382_ddce67a270.jpg" alt="Desk por Guillermo Esteves" width="400" height="300" /></a><p class="wp-caption-text">Desk por Guillermo Esteves</p></div>
<h4>Pragmatic Podcasts</h4>
<p><span style="font-weight:normal;">por Pragmatic Bookshelf<br />
Inglês<br />
<a href="http://www.pragprog.com/podcasts"> http://www.pragprog.com/podcasts</a></span></p>
<ul>
<li><a href="http://www.pragprog.com/podcasts/show/26">Chad Fowler on the Passionate Programmer</a></li>
<li><a href="http://www.pragprog.com/podcasts/show/20">Fred Daoud on Stripes</a></li>
<li><a href="http://www.pragprog.com/podcasts/show/19">Chad Fowler Finding the Jagged Edges</a></li>
<li><a href="http://www.pragprog.com/podcasts/show/13">Andy Hunt on Pragmatic Wetware</a></li>
</ul>
<h4>Software Engineering Radio</h4>
<p><span style="font-weight:normal;">por Software Engineering Radio<br />
<a href="http://www.se-radio.net"> http://www.se-radio.net</a><br />
Inglês</span></p>
<ul>
<li><a href="http://www.se-radio.net/podcast/2009-11/episode-148-software-archaeology-dave-thomas">Software Archaelogy with Dame Thomas</a></li>
<li><a href="http://www.se-radio.net/podcast/2009-06/episode-139-fearless-change-linda-rising">Fearless Change with Linda Rising</a></li>
<li><a href="http://www.se-radio.net/podcast/2009-06/episode-138-learning-part-development-allan-kelly">Learning as a Part of Development with Allan Kelly</a></li>
<li><a href="http://www.se-radio.net/podcast/2009-06/episode-137-sql-jim-melton">SQL with Jim Melton</a></li>
<li><a href="http://www.se-radio.net/podcast/2009-04/episode-133-continuous-integration-chris-read">Continuous Integration with Chris Read</a></li>
<li><a href="http://www.se-radio.net/podcast/2009-04/episode-132-top-10-architecture-mistakes-eoin-woods">Top 10 Architecture Mistakes with Eoin Woods</a></li>
<li><a href="http://www.se-radio.net/podcast/2009-02/episode-127-usability-joachim-machate">Usability with Joachim Machate</a></li>
<li><a href="http://www.se-radio.net/podcast/2008-08/episode-106-introduction-aop">Introduction to AOP with Christa Schwanninger e Iris Groher</a></li>
<li><a href="http://www.se-radio.net/podcast/2008-07/episode-105-retrospectives-linda-rising">Retrospectives with Linda Rising</a></li>
<li><a href="http://www.se-radio.net/podcast/2008-07/episode-103-10-years-agile-experiences">10 years of Agile Experiences</a></li>
<li><a href="http://www.se-radio.net/podcast/2008-03/episode-89-joe-armstrong-erlang">Joe Armstrong on Erlang</a></li>
<li><a href="http://www.se-radio.net/podcast/2008-02/episode-86-interview-dave-thomas">Interview Dave Thomas</a></li>
<li><a href="http://www.se-radio.net/podcast/2008-01/episode-84-dick-gabriel-lisp">Dick Gabriel on Lisp</a></li>
<li><a href="http://www.se-radio.net/podcast/2008-01/episode-83-jeff-deluca-feature-driven-development">Jeff DeLuca on Feature Driven Development</a></li>
<li><a href="http://www.se-radio.net/podcast/2007-12/episode-81-interview-erich-gamma">Interview Erich Gamma</a></li>
<li><a href="http://www.se-radio.net/podcast/2007-10/episode-70-gerard-meszaros-xunit-test-patterns">Gerard Meszaros on XUnit Test Patterns</a></li>
<li><a href="http://www.se-radio.net/podcast/2007-06/episode-59-static-code-analysis">Static Code Analysis with Jonathan Aldrich</a></li>
<li><a href="http://www.se-radio.net/podcast/2007-02/episode-46-refactoring-pt-1">Refactoring Pt. 1</a></li>
<li><a href="http://www.se-radio.net/podcast/2007-05/episode-55-refactoring-pt-2">Refactoring Pt. 2</a></li>
<li><a href="http://www.se-radio.net/podcast/2006-11/episode-37-extreme-programming-pt-1">eXtreme Programming Pt.1</a></li>
<li><a href="http://www.se-radio.net/podcast/2007-01/episode-43-extreme-programming-pt2">eXtreme Programming Pt.2</a></li>
<li><a href="http://www.se-radio.net/podcast/2006-10/episode-31-agile-documentation">Agile Documentation</a></li>
<li><a href="http://www.se-radio.net/podcast/2006-08/episode-26-interview-jutta-eckstein">Interview Jutta Eckstein</a></li>
<li><a href="http://www.se-radio.net/podcast/2006-03/episode-8-interview-eric-evans">Interview Eric Evans</a></li>
<li><a href="http://www.se-radio.net/podcast/2006-01/episode-1-patterns">Patterns</a></li>
</ul>
<h4>Elegant Code</h4>
<p><span style="font-weight:normal;">por Elegant Code Community<br />
<a href="http://elegantcode.com"> http://elegantcode.com</a><br />
Inglês</span></p>
<ul>
<li><a href="http://elegantcode.com/2009/08/31/code-cast-31-agile-for-families">Agile for Families</a></li>
<li><a href="http://elegantcode.com/2009/07/23/code-cast-28-jim-wierich">Entrevista com Jim Wierich o Criador do Rake (Ruby)</a></li>
<li><a href="http://elegantcode.com/2008/12/12/code-cast-17-david-laribee-on-lean-kanban">David Laribee on Lean / Kanban</a></li>
<li><a href="http://elegantcode.com/2008/09/30/cast-cast-15-uncle-bob-martin/">Uncle Bob Martin on Clean Code</a></li>
<li><a href="http://elegantcode.com/2008/08/27/code-cast-12-alan-shalloway/">Alan Shalloway on Lean</a></li>
<li><a href="http://elegantcode.com/2008/05/13/elegant-code-cast-8-is-online/">Entrevista com Jarod Ferguson</a></li>
<li><a href="http://elegantcode.com/2008/03/30/elegant-code-cast-6-is-up/">Entrevista com Darrel Carver</a></li>
<li><a href="http://elegantcode.com/2008/03/02/elegant-code-cast-4-is-up/">Entrevista com Scott Nichols</a></li>
<li><a href="http://elegantcode.com/2008/01/13/elegant-code-cast-2-online/">Entrevista com Scott Schimanski</a></li>
</ul>
<h4>Google Developer Podcast</h4>
<p><span style="font-weight:normal;"><a href="http://code.google.com/p/google-developer-podcast/downloads/list">http://code.google.com/p/google-developer-podcast/downloads/list</a><br />
Inglês</span></p>
<h4>Hearding Code</h4>
<p><span style="font-weight:normal;"><a href="http://herdingcode.com">http://herdingcode.com</a><br />
Inglês</span></p>
<h2>Tecnologia</h2>
<h4>IT Conversations</h4>
<p><span style="font-weight:normal;"><a href="http://itc.conversationsnetwork.org">http://itc.conversationsnetwork.org</a><br />
Inglês</span></p>
<h4>net@Night</h4>
<p><span style="font-weight:normal;">por Amber MacArthur e Leo Laport<br />
<a href="http://www.twit.tv/natn"> http://www.twit.tv/natn</a></span></p>
<h4>Twit &#8211; This Week in Tech</h4>
<p><span style="font-weight:normal;">por  Leo Laporte, Jeff Jarvis, Baratunde Thurston, e John C. Dvorak<br />
<a href="http://www.twit.tv/twit"> http://www.twit.tv/twit</a></span></p>
<h4>MacBreak Weekly</h4>
<p><span style="font-weight:normal;">por Leo Laporte, Don McAllister, Paul Kent, and Andy Ihnatko<br />
<a href="http://www.twit.tv/mbw"> http://www.twit.tv/mbw</a></span></p>
<h4>This Week in Google</h4>
<p><span style="font-weight:normal;">por Leo Laporte, Gina Trapani, Jeff Jarvis e Mary Hodder<br />
<a href="http://www.twit.tv/twig"> http://www.twit.tv/twig</a></span></p>
<h4>SitePoint Podcast</h4>
<p><span style="font-weight:normal;">inglês<br />
<a href="http://www.sitepoint.com/podcast"> http://www.sitepoint.com/podcast </a></span></p>
<h2>Empreendedorismo e Negócios</h2>
<h4>37 Signals Podcast</h4>
<p><span style="font-weight:normal;">por 37 Signals<br />
Inglês<br />
<a href="http://37signals.com/podcast"> http://37signals.com/podcast</a></span></p>
<h4>Max Gehringer (CBN)</h4>
<p><span style="font-weight:normal;">por Max Gehringer<br />
Português<br />
<a href="http://cbn.globoradio.globo.com/servicos/podcast/NOME.htm"> http://cbn.globoradio.globo.com/servicos/podcast/NOME.htm</a></span></p>
<h4>Mundo Corporativo (CBN)</h4>
<p><span style="font-weight:normal;">por Heródoto Barbeiro<br />
Português em Áudio<br />
<a href="http://cbn.globoradio.globo.com/servicos/podcast/NOME.htm"> http://cbn.globoradio.globo.com/servicos/podcast/NOME.htm</a></span></p>
<h4>The Startup Success Podcast</h4>
<p><span style="font-weight:normal;"><a href="http://startuppodcast.wordpress.com">http://startuppodcast.wordpress.com</a><br />
Inglês</span></p>
<h4>TED Talks</h4>
<p><span style="font-weight:normal;">por TED Talks<br />
Inglês<br />
<a href="http://www.ted.com"> http://www.ted.com</a></span></p>
<p>Se você quiser incluir algum outro podcast nesta lista, deixe um comentário. Espero que seja Útil!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Loving Clojure]]></title>
<link>http://devender.wordpress.com/2009/11/18/loving-clojure/</link>
<pubDate>Thu, 19 Nov 2009 02:02:15 +0000</pubDate>
<dc:creator>devender</dc:creator>
<guid>http://devender.wordpress.com/2009/11/18/loving-clojure/</guid>
<description><![CDATA[I seem to be liking Clojure &#8230; Let me backup a bit, in the last couple of weeks I have been deb]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I seem to be liking Clojure &#8230;</p>
<p>Let me backup a bit, in the last couple of weeks I have been debating between picking up Scala or Clojure (don&#8217;t get me wrong Ruby is still my favorite).</p>
<p>I always wanted to pick up a functional programming language so I dabbled a bit with Erlang and Haskell, liked Haskell a lot but without much practice it kind of died (sad times)  and Scala seems too much like Java, yeah I know it seems to have a bigger crowd than Clojure and there are a lot of big names behind it.</p>
<p>Maybe that&#8217;s exactly why I choose Clojure (since its the underdog), or cause it is different enough from Java or simply cause it has a better syntax and seems more elegant (apparently Clojure has better integration with Java, don&#8217;t quote me on it), anyways I decided to learn Clojure.</p>
<p>Peepcode has a nice <a href="http://peepcode.com/products/functional-programming-with-clojure">screen-cast</a> to get you started off on Clojure. If you are on the Mac there is a nice <a href="http://github.com/nullstyle/clojure-tmbundle">bundle</a> for TextMate and anywhere else Netbeans with the <a href="http://enclojure.org/">enclojure</a> plugin seems to be the best.</p>
<p>On a side note it seems more and more that Netbeans has the latest and greatest plugins for everything, then comes IntelliJ and finally eclipse, what&#8217;s going on with eclipse ? has it reached its peak and now it will start dropping off ? but on the flip side there seems to be more and more apps built on top of the Eclipse RCP like Xmind, so is Eclipse no longer going to be the leader of the IDE and just become a platform for building RCPs. This of course depends  on what Oracle is going to do with NetBeans, I really hope they give the same amount of love to NetBeans as Sun did.</p>
<p>Ok getting back to Clojure, don&#8217;t get your panties in a bunch when you see all those parenthesis, it is just the layout that is shocking, indent it well and it is no more than what you are used to.</p>
<p>Here&#8217;s an example</p>
<blockquote><p>(defn fac<br />
&#8220;Returns the factorial of n, which must be a positive integer.&#8221;<br />
[n]<br />
(if (= n 1)<br />
1<br />
(* n (fac (- n 1)))<br />
)</p></blockquote>
<p>Is same as</p>
<blockquote><p>(defn fac [n] (if (= n 1) 1 (* n (fac (- n 1)))))</p></blockquote>
<p>But the first one is a lot more easier on the eyes (even brain?) than the second one. Most examples that you see look like the second one and it frightens people, don&#8217;t let that stop you take my word and go for it.</p>
<p>Clojure seems to be very easy to pick up, things seem very intuitive, like the other day I was wondering, how to return a default value from a map if the key is not found and there is was right there in the api.</p>
<blockquote><p>(map key default-value)</p></blockquote>
<p>So simple! I was easily able to extend the examples that came with the peepcode screencast. Anyways I have started on this path, let&#8217;s see where it goes.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Erlang Certification Survey]]></title>
<link>http://aloiroberto.wordpress.com/2009/11/09/erlang-certification-survey/</link>
<pubDate>Mon, 09 Nov 2009 10:13:48 +0000</pubDate>
<dc:creator>prof3ta</dc:creator>
<guid>http://aloiroberto.wordpress.com/2009/11/09/erlang-certification-survey/</guid>
<description><![CDATA[Erlang Training and Consulting Ltd in conjunction with the University of Kent intends to launch a pi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><a href="http://aloiroberto.wordpress.com/files/2009/11/erlang-logo.png"><img class="aligncenter size-full wp-image-145" title="Erlang" src="http://aloiroberto.wordpress.com/files/2009/11/erlang-logo.png" alt="Erlang Logo" width="156" height="135" /></a></p>
<p>Erlang Training and Consulting Ltd in conjunction with the University of Kent intends to launch a pilot version of an e-certification platform for Erlang in the near future.</p>
<p>To assist in this process, we have launched a survey on Erlang Certification. The objective of the study is to better understand the expectations of users, in order to ensure a well-focused product.</p>
<p>We would appreciate a few minutes of your time in completing this survey. To take the survey, please go to:</p>
<p><a href="http://surveys.erlang-consulting.com/index.php?sid=21265&#38;lang=en">http://surveys.erlang-consulting.com/index.php?sid=21265&#38;lang=en</a></p>
<p>The results of the survey will be shared with third parties, in publications and as part of research into Certification. When doing so, all results will be completely anonymised and any individual-identifying information removed.</p>
<p>Thank you for your time and cooperation.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[TDD, time wasting and Psuedo-Tests]]></title>
<link>http://mazenharake.wordpress.com/2009/11/04/tdd-time-wasting-and-psuedo-tests/</link>
<pubDate>Wed, 04 Nov 2009 21:46:30 +0000</pubDate>
<dc:creator>mazenharake</dc:creator>
<guid>http://mazenharake.wordpress.com/2009/11/04/tdd-time-wasting-and-psuedo-tests/</guid>
<description><![CDATA[I&#8217;m probably going to be shot, stabbed, burned drowned and buried because I&#8217;m writing th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;m probably going to be shot, stabbed, burned drowned and buried because I&#8217;m writing this but I hope that I reach out to enough people before I go out!</p>
<p>My friends, watch out! TDD <strong>can </strong>be a really <strong>huge</strong> timewaster.</p>
<p>When did you know exactly how you expected your application/component to behave? Probably you didn&#8217;t until you tried a few things out, then sketched on some paper then thought some more then tried some other stuff again and then got back to paper etc. After that you had a perhaps clearer idea of what it was that you want to create. This is prototyping and it should be the first stage in any new/enhanced application. Once this has been done and you know the properties of your system then you can commence TDD.</p>
<p>If you didn&#8217;t do prototyping and you naively started writing your unit-tests then you have just wasted your time. I really don&#8217;t understand how people can argue that they should write tests first before they implement anything. If you write a test and expect it to mysteriously define your application then you are better off just using water-fall. I don&#8217;t feel very &#8220;agile&#8221; when I&#8217;m sitting there writing unit tests for something I will develop just to realize that I need to re-write the tests every 10 minutes. ALL the tests that I write before I write code I need to constantly rewrite&#8230; This is a black hole for time.</p>
<p>Instead I propose psuedo-tests.</p>
<p>Before I continue some people are probably going to argue that I &#8220;didn&#8217;t do it right&#8221; or that &#8220;it works for me you must be doing something wrong&#8221; well I don&#8217;t really care because you probably wasted your time and you didn&#8217;t know about it. I tried the whole lot and it is such an annoying thing that I don&#8217;t understand how it has become so popular. TDD should have a big IF in front of it like this: &#8220;IF you are going to do TDD, then make sure that you KNOW what it is you are going to develop&#8221;.</p>
<p>So what are psuedo-tests?</p>
<p>A psuedo-test is a test that doesn&#8217;t test anything it is just used to conceptually affect the design of your code. It is like psuedo-code but instead describes how the tests will run (instead of how your algorithm or code will run). This has the following benefit on your development</p>
<ol>
<li>Psuedo-code is _very_ easy to change. You don&#8217;t have to care about the actual interfaces or compilation or running or changing details everytime your code change.</li>
<li>Your code takes testing into consideration. Things like get/set functions and various introspection function are taken into account, you seldom have to add these later. In Erlang e.g. it is usual to have a start/0 function instead of start_link/0 for testing purposes.</li>
<li>The tests become simpler and smaller and easier to understand. Why? Well because you don&#8217;t have to rewrite your tests 600 times, you rewrite less often. Many people forget that tests are code as well and re-writing something and building on top of things in a very fast pace creates bulky code.</li>
<li>If you write enough psuedo-tests then the step to property-based testing is not far (using tools like <a title="http://www.quviq.com/" href="http://www.quviq.com/">QuickCheck</a> etc).</li>
</ol>
<p>Example: We want to create a supervisor, then one test could be:</p>
<pre class="brush: plain;">
test_sup() -&#62;
  Start supervisor
  Start a child under the supervisor
  Check that the supervisor has 1 child
  Check that the child of that supervisor is alive
  Kill the child
  Check that the supervisor has 1 child
  Check that the child of that supervisor is alive
  Stop supervisor
</pre>
<p>Then during implementation you realize that it would be a good idea to kill the children if the supervisor was stopped so instead of implementing it in your test code immediately you simply update your psuedo-test first adding</p>
<pre class="brush: plain;">
test_sup() -&#62;
  ...
  Stop supervisor
  Check that the child is dead
</pre>
<p>This is much faster and you don&#8217;t have to care about implementation details&#8230; you can get on with your coding. The test is your specification and your guide without wasting your time and as you can see&#8230; this isn&#8217;t very far from a property if you define it well enough. Then just abstract this test to handle N children and you are good to go for a property test. When you have something substantial to test then implement your tests and run it!</p>
<p>NOTE however:<br />
I am<strong> NOT</strong> saying that you shouldn&#8217;t test! That is not at all what I&#8217;m saying&#8230; you should <strong>always</strong> properly test your code. I&#8217;m just saying don&#8217;t spend all your time writing silly tests just because you are doing &#8220;TDD&#8221; or whatever&#8230; have the tests make sense! Test something substantial that make sense!</p>
<p>Just a thought&#8230; Now I&#8217;m going to bed&#8230;</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Cleaning the code]]></title>
<link>http://pdincau.wordpress.com/2009/11/02/cleaning-the-code/</link>
<pubDate>Mon, 02 Nov 2009 12:04:56 +0000</pubDate>
<dc:creator>pdincau</dc:creator>
<guid>http://pdincau.wordpress.com/2009/11/02/cleaning-the-code/</guid>
<description><![CDATA[L&#8217;altro giorno mi sono messo a fare il cerca bachi per il backend del gioco della scopa&#8230;]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>L&#8217;altro giorno mi sono messo a fare il cerca bachi per il backend del gioco della scopa&#8230;prima di implementarci altre cose sopra vorrei avere un buon livello di qualità per quel codice&#8230;ne è uscita una cosa simile</p>
<div class="wp-caption aligncenter" style="width: 570px"><img title="Code clean picture" src="http://jaibeermalik.files.wordpress.com/2009/03/measurement-of-code-quality.jpg?w=560&#038;h=527" alt="Un'immagine tratta dal libro: &#34;Code clean&#34;" width="560" height="527" /><p class="wp-caption-text">Un&#39;immagine tratta dal libro: &#34;Code clean&#34;</p></div>
<p>Alla fine il lavoro non è stato di quelli estenuanti&#8230;però ci ho messo un pò a scovare tutti i bachi piu nascosti e insidiosi..o almeno un sacco di essi!</p>
<p>A presto posto qualche idea per il gestore dei players&#8230;&#8230;per avere il codice finale dovrete aspettare che sia tutto pronto! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Simple Erlang TCP server application (part 1) ]]></title>
<link>http://teomontekki.wordpress.com/2009/10/31/simple-erlang-tcp-server-application-part-1/</link>
<pubDate>Sat, 31 Oct 2009 10:44:05 +0000</pubDate>
<dc:creator>teomontekki</dc:creator>
<guid>http://teomontekki.wordpress.com/2009/10/31/simple-erlang-tcp-server-application-part-1/</guid>
<description><![CDATA[Java. Эта платформа до сих пор пользуется популярностью лишь из-за того, что огромное количество сер]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="alignleft size-full wp-image-57" title="erlang-logo" src="http://teomontekki.wordpress.com/files/2009/10/erlang-logo1.png" alt="erlang-logo" width="156" height="135" />Java. Эта платформа до сих пор пользуется популярностью лишь из-за того, что огромное количество серверных приложений создаются на JavaEE ++ Hibernate ++ Spring ++ whatever. Все не раз читали рекламные брошюры про быстроту и удобство создания таких приложений и про их надежность.</p>
<p>Но все равно большинство компаний, занимающихся &#8220;enterprise&#8221; разработками будут использовать подобные инструменты, просто потому, что this is the way it is. Почему огромное количество людей программирует на Java? Как правило, еще в учебном заведении люди знакомятся с C/C++. Знакомство это является скоротечным и очень болезненным, большинство людей так и не понимают, как уследить за памятью и за границами объектов на в сотне строк кода. Я уже не говорю про такие вещи, как умышленный выход за границы объектов, это в наше время вообще высший пилотаж программирования на C. Разумеется, познакомившись с Java, эти люди воспринимают ее как манну небесную, избавление от постоянных сегфолтов, утечек памяти и &#8220;очень странного&#8221; поведения написанного ими кода. Большое число этих людей даже не отдает себе отчета в том, какой кактус они едят, а среди тех, кто это понимает что-либо сказать против использования Java могут лишь единицы.</p>
<p>Данная ситуация достаточно точно описана <a href="http://www.joelonsoftware.com/items/2009/09/23.html">здесь</a></p>
<p>А что же можно предложить вместо Java для создания серверных приложений? Каким вообще должно быть серверное приложение?</p>
<p>Да много каким, но во-первых, серверное приложение должно быть многопоточным. Это приводит нас к выводу, что язык и набор библиотек, которые мы хотим использовать должны предоставлять средства для простого и надежного создания многопоточных приложений. Никакой императивный язык не позволит организовать несколько потоков, да еще и взаимодействующих друг с другом, без головной боли. Какими бы не были средства, которые будут для этого использованы, вы упретесь в проблему изменяемого состояния. А здесь семафоры, блокировки, синхронизация, все радости жизни.</p>
<p>В ерланге новый тред порождается функцией spawn(). That&#8217;s it. Если вы хотите послать сообщение процессу, вы используете конструкцию вида Pid ! Message, где &#8220;!&#8221; &#8212; оператор посылки сообщения процессу. Если в вашем процессе вы хотите обрабатывать получаемые сообщения вам достаточно использовать конструкцию вида</p>
<pre class="brush: plain;">
receive
         Message1 -&#62;
             ....
         MessageN -&#62;
             ....
end
</pre>
<p>И все! процесс будет обрабатывать входящие сообщения по мере их поступления. Erlang подталкивает программиста к идее &#8220;чем больше тредов &#8212; тем лучше&#8221;.</p>
<p><!--more--></p>
<p>В типичных серверных приложениях, как правило возникает несколько типовых задач: получение сообщений от клиентов, обработка этих сообщений, взаимодействие с базой данных, отправка сообщений клиентам.</p>
<p>В данной серии примеров описывается процесс создания TCP сервера, получающего информацию от клиентов в виде XML-докуметов. Сервер должен обработать входящие документы, где нужно &#8212; обратиться к БД и ответить клиенту.</p>
<p>Ok, let me put the code where my mouth is.</p>
<p>В первую очередь &#8212; информация о модуле, экспортируемых им функциях и макросы.</p>
<pre class="brush: plain;">
-module(server).
-export([start/1,listen/1]).

-define(TCP_OPTIONS,[binary,{packet,0},{active,false},{reuseaddr,true}]).
</pre>
<p>Теперь опишем функцию, стартующую наш сервер, слушающий определенный порт. Здесь мы используем модуль gen_tcp. Слушаем сокет, делаем accept.</p>
<pre class="brush: plain;">
start(X) -&#62;
        listen(X).
        %listen
listen(Port) -&#62;
        {ok,LSocket} = gen_tcp:listen(Port,?TCP_OPTIONS),
        accept(LSocket).
</pre>
<p>Accept соединение и сразу же создаем новый тред, работающий с данным соединенением. Рекурсивно вызываем себя же, чтобы слушать другие соединения на сокете.</p>
<pre class="brush: python;">
accept(LSocket) -&#62;
        {ok,Socket} = gen_tcp:accept(LSocket),
        spawn (fun() -&#62; loop(Socket) end),
        accept(LSocket).
</pre>
<p>Треды в языке Erlang &#8212; функции, выполняемые в отдельном потоке. В нашем случае это функция loop. Эта функция читает из сокета поток байт, превращает его в строку (в Erlang строка &#8212; это просто список чисел) и вызывает функцию обработки этой строки, определенную в модуле process_msg. Этот модуль в нашем сервере будет разбирать XML сообщения. Он будет описан в одном из следующих постов.</p>
<pre class="brush: plain;">
loop(Socket) -&#62;

        case gen_tcp:recv(Socket,0) of
                {ok,Data} -&#62;
                        io:format(&#34;~ts~n&#34;,[Data]),
                        String = binary_to_list(Data),
                        process_msg:process_msg(String),
                        loop(Socket);
                {error,closed} -&#62;
                        ok
        end.
</pre>
<p>Как мы видим, данный код занял менее тридцати строк, при этом являясь многопоточным сетевым приложением. А теперь напишите аналогичное приложение на Java. А теперь напишите аналогичное приложение на С.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Learning Erlang]]></title>
<link>http://matteoredaelli.wordpress.com/2009/10/31/learning-erlang/</link>
<pubDate>Sat, 31 Oct 2009 10:40:09 +0000</pubDate>
<dc:creator>Matteo</dc:creator>
<guid>http://matteoredaelli.wordpress.com/2009/10/31/learning-erlang/</guid>
<description><![CDATA[]]></description>
<content:encoded><![CDATA[]]></content:encoded>
</item>
<item>
<title><![CDATA[Apache CouchDB ~ Ubuntu]]></title>
<link>http://matteoredaelli.wordpress.com/2009/10/31/apache-couchdb-ubuntu/</link>
<pubDate>Sat, 31 Oct 2009 10:14:47 +0000</pubDate>
<dc:creator>Matteo</dc:creator>
<guid>http://matteoredaelli.wordpress.com/2009/10/31/apache-couchdb-ubuntu/</guid>
<description><![CDATA[&#8220;Ubuntu 9.10 Karmic Koala has just been released. This is big news as this version includes Ap]]></description>
<content:encoded><![CDATA[&#8220;Ubuntu 9.10 Karmic Koala has just been released. This is big news as this version includes Ap]]></content:encoded>
</item>
<item>
<title><![CDATA[Concurrency]]></title>
<link>http://programmagic.wordpress.com/2009/10/29/concurrency/</link>
<pubDate>Thu, 29 Oct 2009 04:00:58 +0000</pubDate>
<dc:creator>ddouthitt</dc:creator>
<guid>http://programmagic.wordpress.com/2009/10/29/concurrency/</guid>
<description><![CDATA[One of the most interesting things about some of these languages (such as Scala) is their innate sup]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>One of the most interesting things about some of these languages (such as Scala) is their innate support of <a href="http://en.wikipedia.org/wiki/Concurrency_(computer_science)">concurrency</a>.</p>
<p>Concurrency is a huge benefit for making systems work together or for making programming systems that can <a href="http://en.wikipedia.org/wiki/Scalability">scale</a> (that is, grow and adapt to heavier usage).</p>
<p>Ted Leung at his blog wrote an <a href="http://www.sauria.com/blog/2009/10/05/the-cambrian-period-of-concurrency/">article</a> about concurrency called <a href="http://www.sauria.com/blog/2009/10/05/the-cambrian-period-of-concurrency/">The Cambrian Period of Concurrency</a> (and a <a href="http://www.sauria.com/blog/2009/10/06/concurrency-parallelism/">follow-up</a>).  He also gave a talk at OSCON 2009 titled <a href="http://www.slideshare.net/twleung/a-survey-of-concurrency-constructs">A Survey of Concurrency Constructs</a> which was well received.</p>
<p>Tim Bray, also from Sun Microsystems, created a series of articles on the same topic entitled <a href="http://www.tbray.org/ongoing/When/200x/2009/09/27/Concur-dot-next">Concur.next</a>. He talks about <a href="http://en.wikipedia.org/wiki/Haskell_(programming_language)">Haskell</a>, <a href="http://en.wikipedia.org/wiki/Erlang_(programming_language)">Erlang</a>, and <a href="http://en.wikipedia.org/wiki/Clojure">Clojure</a>.  Erlang and Haskell are fascinating, but to me Clojure seems like it took Lisp and obfuscated it and made it harder to learn and use &#8211; and became slower besides.</p>
<p>After reading Tim&#8217;s article, one of the <a href="http://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler">Glaskow Haskell Compiler</a> (GHC) folks wrote an <a href="http://ghcmutterings.wordpress.com/2009/10/06/parallelism-concurrency/?ftw">article</a> comparing parallelism and concurrency. (By the way, not <em>everyone</em> thinks of Haskell when one talks of <a href="https://ghcscw.com/">GHC</a>&#8230;)</p>
<p>What intrigues me most about concurrent systems is the ability of multiple systems to work together &#8211; not as a cluster, nor in a failover configuration &#8211; but as a coherent set of multiple systems doing what each does best.  A compute-farm with dynamically responding discrete and unique systems would be one example.  Another example (which intrigues me to no end) is a network of servers that responds as a whole to a threat on any one of the servers individually.</p>
<p>Concurrent programming over the network, when used to its fullest, means that a server no longer needs to be the largest unit of response: it means that a network may respond, not just the server.  It means that information can be shared among a group of servers rather than just one.  Concurrency opens up a vast amount of fascinating ideas.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Shuffle a list (deck)]]></title>
<link>http://pdincau.wordpress.com/2009/10/27/161/</link>
<pubDate>Tue, 27 Oct 2009 16:13:37 +0000</pubDate>
<dc:creator>pdincau</dc:creator>
<guid>http://pdincau.wordpress.com/2009/10/27/161/</guid>
<description><![CDATA[Dopo che avete creato un mazzo di carte per un qualsiasi gioco voi stiate implementando, si pone il ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Dopo che avete creato un mazzo di carte per un qualsiasi gioco voi stiate implementando, si pone il problema di mescolare tale mazzo, in modo da ottenere una versione dello stesso in cui le carte non siano piu ordinate per valore e seme, ma seguano un ordine casuale.</p>
<p>Dopo essermi sbattuto un po su google, ho trovato un paio di risorse: un algoritmo da seguire in questi casi, il <a href="http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle">FISHER-YATES</a> (Knuth shuffle) e un po di codice gia implementato dai simpatici ragazzi di <a href="http://www.trapexit.org/RandomShuffle">TRAP-EXIT</a> e <a href="http://en.literateprograms.org/Fisher-Yates_shuffle_%28Erlang%29#chunk%20use:shuffle.erl">LITERATEPROGRAMS</a>.</p>
<p>Dopo aver letto entrambi gli articoli sono arrivato al seguente codice, ottenuto dal codice di TRAP-EXIT modificando alcuni nomi di variabile:</p>
<pre style="color:black;background-color:#f9f9f9;line-height:1.1em;border:1px dashed #2f6fab;padding:1em;">shuffle(Deck) -&#62;
   randomize(round(math:log(length(Deck)) + 0.5), Deck).

randomize(1, Deck) -&#62;
   randomize(Deck);

randomize(T, Deck) -&#62;
   lists:foldl(fun(_E, Acc) -&#62;
                  randomize(Acc)
               end, randomize(Deck), lists:seq(1, (T - 1))).

randomize(Deck) -&#62;
   D = lists:map(fun(A) -&#62;
                    {random:uniform(), A}
             end, Deck),
   {_, D1} = lists:unzip(lists:keysort(1, D)),
   D1.</pre>
<p>La complessita asintotica di tale codice viene quantificata come O(n log n).</p>
<p>A seguire il codice di LITERATE PROGRAMS, come potete vedere questa implementazione appare molto piu compatta&#8230;</p>
<pre style="color:black;background-color:#f9f9f9;line-height:1.1em;border:1px dashed #2f6fab;padding:1em;">shuffle(Deck) -&#62; shuffle(Deck, []).

shuffle([], Acc) -&#62; Acc;

shuffle(Deck, Acc) -&#62;
  {Leading, [H &#124; T]} = lists:split(random:uniform(length(Deck)) - 1, Deck),
  shuffle(Leading ++ T, [H &#124; Acc]).
</pre>
<p>In questo caso il risultato della complessita asintotica appare essere O(n)&#8230;.<br />
Ora sta a voi decidere quale implementazione usare&#8230;o se farvene una vostra&#8230;e ricordate di passare nei siti da cui ho tratto i codici listati sopra!<br />
<div class="wp-caption aligncenter" style="width: 331px"><img title="Shuffling a deck" src="http://i.ehow.com/images/GlobalPhoto/Articles/5062405/Shuffle-Deck_Full.jpg" alt="" width="321" height="213" /><p class="wp-caption-text">Shuffling a deck (http://i.ehow.com/images/GlobalPhoto/Articles/5062405/Shuffle-Deck_Full.jpg)</p></div></p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Why Haskell is great for multicore programming]]></title>
<link>http://softtalkblog.wordpress.com/2009/10/27/why-haskell-is-great-for-multicore-programming/</link>
<pubDate>Tue, 27 Oct 2009 12:28:58 +0000</pubDate>
<dc:creator>softtalkblog</dc:creator>
<guid>http://softtalkblog.wordpress.com/2009/10/27/why-haskell-is-great-for-multicore-programming/</guid>
<description><![CDATA[There’s been a lot of buzz about Haskell recently, with an experimental version of Intel Concurrency]]></description>
<content:encoded><![CDATA[There’s been a lot of buzz about Haskell recently, with an experimental version of Intel Concurrency]]></content:encoded>
</item>
<item>
<title><![CDATA[Quick example of hiberl]]></title>
<link>http://alrice.wordpress.com/2009/10/27/quick-example-of-hiberl/</link>
<pubDate>Tue, 27 Oct 2009 09:42:52 +0000</pubDate>
<dc:creator>alfrice</dc:creator>
<guid>http://alrice.wordpress.com/2009/10/27/quick-example-of-hiberl/</guid>
<description><![CDATA[One of my tiny projects reads jobs from different&#8217;s datasources and push them into a small dat]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>One of my tiny projects reads jobs from different&#8217;s datasources and push them into a small database which I is running on my computer.</p>
<p>I am sure this idea is quite crazy and useless in other countries but it perfectly make sense in Spain. First, we don&#8217;t have a good job website aggregator. Second, almost all the job offers are old although they update their date everyday and they are shown in &#8220;today&#8217;s job&#8221;. And finally, normally there is no way to control how many job offers you can see in a single page, so normally you have to see them in chunks of 30s which is quite annoying.</p>
<p>Anyway what I want to show here is how easy is to get all the job offers from today in a single website, with no ads and not old jobs using <a href="http://code.google.com/p/hiberl/">hiberl</a></p>
<pre>%% generate modules and header files
4&#62; hiberl:render(hiberl_drv_mysql, "jobs", "DSN=jobs;UID=username", ["job"]).
created file jobs.erl
created file job.erl, got 8 columns []
ok

%%get the fields of a job
5&#62; job:columns().
["id","position","url","city","company","date","created", "new",[]]

%% Start a session
6&#62; hiberl_session:start_register("DSN=jobs;UID=username").
{ok,}

%% get jobs from today
7&#62;Jobs = job:select("date like '27/10' ").
...

%% A function to create a link using the url and the description
8&#62;F = fun(Job) -&#62;
		Job#job{
                     position = ["&#60;A HREF=\"http:",Job#job.url,"\"&#62;",Job#job.position,"&#60;/A&#62;"],
                     url = ""}
	end.
...

%% generate html
9&#62; hiberl:render_html(lists:map(F,Jobs)).
ok

%% finish session
10&#62;hiberl_session:terminate().
ok</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[A strategy for testing for ejabberd modules]]></title>
<link>http://cestari.wordpress.com/2009/10/27/ejabberd_testing-automated-testing-for-ejabberd-modules/</link>
<pubDate>Mon, 26 Oct 2009 22:55:38 +0000</pubDate>
<dc:creator>cstar</dc:creator>
<guid>http://cestari.wordpress.com/2009/10/27/ejabberd_testing-automated-testing-for-ejabberd-modules/</guid>
<description><![CDATA[I&#8217;ve always been looking for an elegant way of testing custom ejabberd modules. Tried a couple]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve always been looking for an elegant way of testing custom <a href="http://github.com/processone/ejabberd/">ejabberd</a> modules.<br />
Tried a couple of ways before but was never convinced. Running tests against a running ejabberd node for example. But it&#8217;s not easy, many dependancies, and hard to set up. Mocking modules such as ejabberd_router. But either I hit weird issues, either it&#8217;s so cumbersome, I knew I&#8217;d never use it again.</p>
<p>But this time, I think I&#8217;ve got it.</p>
<p>Check out the cool combination of <a href="http://github.com/ngerakines/etap">etap</a> and <a href="http://github.com/charpi/erl_mock">erl_mock</a> !</p>
<p><a href="http://github.com/cstar/ejabberd_testing">It&#8217;s on github</a> with more blathering from yours truly.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Haskell jobs]]></title>
<link>http://mostlycode.wordpress.com/2009/10/26/haskell-jobs/</link>
<pubDate>Mon, 26 Oct 2009 09:59:53 +0000</pubDate>
<dc:creator>Tener</dc:creator>
<guid>http://mostlycode.wordpress.com/2009/10/26/haskell-jobs/</guid>
<description><![CDATA[Recently I&#8217;ve been looking for a job involving Haskell or functional programming in general. N]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Recently I&#8217;ve been looking for a job involving Haskell or functional programming in general. No luck. I know that there are is <a href="http://www.haskell.org/haskellwiki/Jobs">page</a> in Haskell wiki about that, but it&#8217;s almost empty, if I filter out those which doesn&#8217;t match my preferences.</p>
<p>First thing is: most companies are from US. Next came UK finance companies (like Barclays or Credit Suisse), which are way too far for me. There are also a couple of links to now-dead startups that meant to use Haskell as a silver bullet. No luck I suppose. The one interesting company listed there is <a href="http://www.starling-software.com">Starling Software</a>. Too bad they are from Japan. Another notable exception is <i><a href="http://erlang-consulting.com/">Erlang Training and Consulting Ltd</a></i>. Sadly, while they do have an office in <a href="http://maps.google.com/maps?f=q&#38;source=s_q&#38;hl=en&#38;geocode=&#38;q=krakow,+poland&#38;sll=37.0625,-95.677068&#38;sspn=47.483365,79.013672&#38;ie=UTF8&#38;hq=&#38;hnear=Cracow,+Krakow,+Lesser+Poland,+Poland&#38;z=11">Kraków</a>, they don&#8217;t seem to willing to expand their staff <a href="http://www.erlang-consulting.com/jobs/listing">there</a>.</p>
<p>I also tried several job search engines for a FP job in Poland, without luck.</p>
<p>My research seems to agree with a previous work you can read about <a href="http://mult.ifario.us/p/there-are-apparently-lots-of-haskell-jobs">here</a>.</p>
<p>It is sad that most companies that use FP seem to be either too far away or long dead.</p>
<p>I would really love to see one of those near <a href="http://maps.google.com/maps?f=q&#38;source=s_q&#38;hl=en&#38;geocode=&#38;q=wroc%C5%82aw,+poland&#38;sll=37.0625,-95.677068&#38;sspn=47.483365,79.013672&#38;ie=UTF8&#38;hq=&#38;hnear=Wroc%C5%82aw,+Wroclaw,+Lower+Silesia,+Poland&#38;t=h&#38;z=11">Wrocław</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[My Not-So-Secret Side Project – Part 2]]></title>
<link>http://chrisoneverything.wordpress.com/2009/10/25/my-not-so-secret-side-project-%e2%80%93-part-2/</link>
<pubDate>Sun, 25 Oct 2009 23:29:13 +0000</pubDate>
<dc:creator>Chris Hicks</dc:creator>
<guid>http://chrisoneverything.wordpress.com/2009/10/25/my-not-so-secret-side-project-%e2%80%93-part-2/</guid>
<description><![CDATA[Well I promised a Part 2, and here it is. Only slightly delayed by the madness of school and of prep]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Well I promised a Part 2, and here it is. Only slightly delayed by the madness of school and of prepping for a Midterm in math. I digress, where were we. Ah yes, Erlang.</p>
<p>I have a hunch the direction the world is going to be taking here in the next 5-10-20 years, at least when it comes to computer programming and assuming we don&#8217;t <a href="http://www.albinoblacksheep.com/flash/end" target="_blank">blow ourselves up</a> first of course. What it comes down to, really, is that we have nearly hit a limit with Moore&#8217;s law. As <a href="http://news.cnet.com/8301-10784_3-9780752-7.html" target="_blank">Stephen Hawking AND Moore have both said</a>, we have limits and in many ways we have already smashed against those concrete laws of the way the universe works. What this means is that we are quickly headed to a place where a single process on a single thread simply can not, and will not, be able to run any faster, short of making the language itself faster. Unfortunately we have been pretty good about optimizing program languages for speed, meaning that is not even a solution we can count on to save the current mindset when it comes to future problem domains. What this means is that we are being forced to scale horizontally&#8230;two and four cores have become the norm on most laptops being sold these days. Intel, if I recall correctly, has a 32 core proc they are putting out next year, assuming all goes well. What does this mean? For the programs of the future, single-thread programming is going to be woefully inadequate, and the supremacy of languages like C and C++ which thrive in single-core architecture is going to be over.</p>
<p>I can already hear the detractors out there ridiculing me. I am not the first person to have said things like this, I won&#8217;t be the last but most of all I am not even going to be the most articulate, but I will still try to explain my reasoning, so please bear with me. C++, for example, is not going to be going away anytime soon. Too much is written in it and it does have some very good uses as a &#8220;lower level&#8221; workhorse language in the future. However anyone who has done any sort of multi-thread programming in a language like C++ knows the horrors that await. The pain, the anguish, the multitude of hours spent trying to find elusive bugs&#8230;and that is just with programming for TWO threads. Imagine, if you will, trying to find a deadlock case when you are taking 4, or 8, or 32 threads all accessing/changing the same memory. Oh sure you can limit the number of threads that access the same amount of memory with your architecture but then from the outset you are severely limiting what the program can do, based on a language not built from the ground up for multi-core usage.</p>
<p>There are two possible solutions, really, first you could come up with a language built from the ground up to deal with multi-core programming that is able to do everything and has no need for another language to accomplish anything. Now that would be the ideal solution but I dare say one that I doubt will come true anytime soon. The more realistic solution would be to take a language, such as one like Erlang, which is built from the ground up to deal with multi-core architecture in such a way that the details are largely abstracted from the programmer and then use that language for the overall architecture/framework and leave speed critical sections to languages like C++, if the glue-language is not fast enough for you in certain cases. I just don&#8217;t see many other directions for the programming industry to go. Modern day programming languages will have their uses for many years to come, but the future is coming far too fast and the types of changes it is brining are far more than the current major programming languages can bear, and so it is time to look for the proper tool to do the job.</p>
<p>For me Erlang is a huge step in the right direction. To be sure it has its flaws, atoms(constant literals with a name) are not garbage collected and are limited to just over 1 million atoms in a table. This is certainly a lot of atoms but for a language which is supposed to be for long running, zero downtime programs it severely limits their usage, meaning you have to program around them by using lists or some other solution. Interfacing with other languages is not as easy as it should be. Could use a better security model that is not all-or-nothing. Those are some of the major points that Armstrong himself has acknowledged need to be spruced up, so at least we can know they are being worked on to some degree. Despite its flaws Erlang holds enough promise for me to want to really dig in and use it. It is a language with a pretty high level abstraction when it comes to multi-core programming, it has a framework designed to allow for faults and recover from them and it is built from the ground up to facilitate EASY hot swapping of code. As someone who wants create games as a career, specifically of the MMO variety, these sorts of &#8220;perks&#8221; have quite the appeal. So that, in a not-quite-so-small-nutshell, is why I decided to choose Erlang with which to write my experimental MUD with. Hopefully, with enough time stolen from my school studies I will be able to make some decent progress and make the language really work for me.</p>
<p>Now&#8230;back to the grind of schoolwork. Never a days rest for the wicked.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Why I Love Erlang]]></title>
<link>http://mazenharake.wordpress.com/2009/10/24/why-i-love-erlang/</link>
<pubDate>Sat, 24 Oct 2009 21:52:00 +0000</pubDate>
<dc:creator>mazenharake</dc:creator>
<guid>http://mazenharake.wordpress.com/2009/10/24/why-i-love-erlang/</guid>
<description><![CDATA[Haven&#8217;t written in a while&#8230; been busy at work and my hobby project. This weekend I reali]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Haven&#8217;t written in a while&#8230; been busy at work and my hobby project. This weekend I realized why I love Erlang&#8230; you don&#8217;t really understand the strength of Erlang until you have worked on heavy loaded live systems which need immediate attention.</p>
<p>I&#8217;m currently involved in a project which has a lot of subscribers. I can&#8217;t go into any details (NDA) but I can say this; We had a problem where one of our applications somewhere in the cluster would go down and not bounce back properly (very simple explanation of the problem <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>Anyway, we fixed a problem and got clearance to patch it and then went home. During the evening I wanted to check if the system was behaving, fortunately I could access the site from home. 4 logins later and a lot of SSH:ing and RSA keys and Personal codes I logged on to the shell&#8230; that&#8217;s when I realized that for me to check what I wanted to check on each node would be incredibly tedious since I would have to go through the connection procedure if I wanted to monitor everything at the same time OR I would have to disconnect and connect to another node OR I would have to RPC individually to each node I wanted to check.</p>
<p>Well anyway&#8230; after 3 seconds of thinking I just opened my text editor and wrote this:</p>
<pre class="brush: jscript;">
ChkApp = fun(App) -&#62;
  lists:map(fun(Node) -&#62;
    case rpc:call(Node, application, which_applications, []) of
      {bad_rpc, Reason} -&#62;
        {Node, Reason};
      Apps -&#62;
        {Node, lists:keymember(App, 1, Apps)}
    end
  end,
  Cluster) end.
</pre>
<p>Copy/Paste into the shell and then just run&#8230;</p>
<pre class="brush: jscript;">
x&#62; ChkApp(my_application).
[{'node1@192.168.1.10', true},
 {'node2@192.168.1.20', true},
 {'node3@192.168.1.30', true}].
</pre>
<p>After you are done&#8230; monitoring/working just f(ChkApp). Done.</p>
<p>This maybe doesn&#8217;t look like much, but think about it&#8230;</p>
<ol>
<li>You can in a <strong>very easy way</strong> run a command on another node <strong>and </strong>get it back in Erlang terms.</li>
<li>You can define Funs and run them how ever you want, you can even nest Funs and build up monitor/introspection tools on the fly</li>
<li>There is no XML or complicated/tedious setup you have to make to call other nodes&#8230; you just&#8230; well&#8230; rpc:call them <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>Now a note of caution; Doing these sort of things on a Live system is <em><strong>very</strong></em> sensitive&#8230; be careful but I do have a golden rule I have set for myself: <em>As long as you only read and don&#8217;t <strong>write</strong> data, then you are fine.</em></p>
<p>I was just sitting an imagining trying to do this in Java&#8230; and a big relief hit me&#8230;</p>
<p>It is these small things that make me love Erlang.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Riak Screencast with Ben Ahlan]]></title>
<link>http://blog.beerriot.com/2009/10/23/riak-screencast-with-ben-ahlan/</link>
<pubDate>Fri, 23 Oct 2009 13:45:59 +0000</pubDate>
<dc:creator>Bryan</dc:creator>
<guid>http://blog.beerriot.com/2009/10/23/riak-screencast-with-ben-ahlan/</guid>
<description><![CDATA[If you&#8217;ve been thinking of trying Riak, but hadn&#8217;t yet gotten around to downloading and ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you&#8217;ve been thinking of trying Riak, but hadn&#8217;t yet gotten around to downloading and experimenting, there&#8217;s one more resource available this morning that might tip you over the edge.  <a href="http://benahlan.com/">Ben Ahlan</a> and I recorded <a href="http://videocodechat.com/post/219711761/intro-to-riak-with-bryan-fink-video-code-chat">a screencast demonstrating basic setup and usage of Riak</a>.  If you can stand watching two guys mumble over a console for 40 minutes, you may find a tip or two to make your experimentation go smoothly. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I also hear that <a href="http://twitter.com/zeit_geist">Martin Scholl</a> gave an <em>awesome</em> talk at <a href="http://nosqlberlin.de/">NoSQL Berlin</a>.  I can&#8217;t wait to see the video.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Playing with Playdar]]></title>
<link>http://musicmachinery.com/2009/10/18/playing-with-playdar/</link>
<pubDate>Sun, 18 Oct 2009 14:12:27 +0000</pubDate>
<dc:creator>Paul</dc:creator>
<guid>http://musicmachinery.com/2009/10/18/playing-with-playdar/</guid>
<description><![CDATA[On Saturday morning I opened my web browser, built a playlist of a few songs and started to listen t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>On Saturday morning I opened my web browser, built a playlist of a few songs and started to listen to them while I went about my morning computer tasks.  Some of the songs in the playlist were on my laptop, while some were on the mac mini in the family room, and some  were on a laptop of a friend that was on the other side of the Atlantic ocean.   And if my friend in London had closed his laptop before I listened to &#8216;his&#8217; song on my playlist it could have been replaced by a copy of the song that was on the computer of a friend in Seattle. I had a seamless music listening experience despite the fact that the music was scattered across a handful of computers on two continents.    Such is the power of Playdar.<br />
<a href="http://www.playdar.org/"><img class="size-full wp-image-1334 alignleft" title="playdar_logo" src="http://musicmachinery.wordpress.com/files/2009/10/playdar_logo.gif" alt="playdar_logo" width="250" height="90" /></a><br />
Playdar is a music content resolver.  It is designed to solve one problem:  given the name of track, find me a way to listen to it right now.    You run Playdar on any computer that you own that has music and Playdar will make it easy to listen to all of that music as if it were on your local machine.  The Playdar content resolver can also talk to other Playdar resolvers too, so if  Playdar can&#8217;t find a track on my local network, it can ask my friend if it knows where the track is, extending my listening reach.</p>
<p>Playdar runs as a web service using standard web protocols for communicating with applications.  When Playdar receives a request to resolve a track it runs through a list of prioritized content resolvers looking for the track. First it checks your local machine, then your local network.  If it hasn&#8217;t found it there it could, if so configured, try your friends computers, or even a commercial song resolver (One could imagine for example, a music label offering up a portion of their catalog via a content resolver as a way to expose more listeners to their music).  Playdar will do its best to find a copy of a song that you can listen to now. Playdar enables a number of new listening modes:</p>
<ul>
<li><strong>Listen to my music anywhere &#8211; </strong>with Playdar, I don&#8217;t have to shoehorn my entire music collection onto every computer that I own just so I can listen to it no matter what computer I&#8217;m on.  I can distribute my music collection over all my computers &#8211; and no matter what computer I&#8217;m on I have all my music available.</li>
<li><strong>Save money for music streamers &#8211; </strong>Music streaming services like Last.fm, Spotify and Pandora spend  money for every song that is streamed.  Often times, the listener will already own the song that is being streamed.   Playdar-enabled music streaming services could save streaming costs by playing  a local copy of a song if one is available.</li>
<li><strong>Share playlists and mixtapes</strong> &#8211; with Playdar a friend could give me a playlist (perhaps in a XSPF format) and I could listen to the playlist even if I don&#8217;t own all of the songs.</li>
<li><strong>Pool the music &#8211; </strong>At the Echo Nest, everyone has lots of music in their personal collections.  When we are all in the same room it is fun to be able to sample music from each other.  iTunes lets you do this but  searching through 15 separate collections for music in iTunes is burdensome.  With Playdar, all the music on all of the computers running Playdar on your local lan can be available for you to search and play without any of the iTunes awkwardness.</li>
<li><strong>Add Play buttons to songs on web pages</strong> -  Since Playdar uses standard web protocols, it is possible to query and control Playdar from Javascript &#8211; meaning that Playdar functionality can be embedded in any web page.  I could blog about  a song and  sprinkle in a little Javascript to add a &#8216;play&#8217; button to the song that would use Playdar to find the best way to play the song.  If I write a review about the new Beatles reissue and want the reader to be able to listen to the tracks I&#8217;m writing about, I can do that without having to violate Beatles copyrights.  When the reader clicks the play button, Playdar will find the local copy that is already on the reader&#8217;s computer.</li>
</ul>
<p><strong>Playdar&#8217;s Marconi Moment</strong></p>
<p>Playdar is the brainchild of <a href="http://www.metabrew.com/">RJ</a>, the inventor of the audioscrobbler and one of the founders of Last.fm.  RJ started coding Playdar in March of this year &#8211; but a few weeks ago he threw away the 10,000 lines of C++ code and started to rewrite it from scratch in Erlang.  A few days later RJ <a href="http://twitter.com/metabrew">tweeted</a>: <em> I should be taken aside and shot for using C++ for Playdar originally. It&#8217;s criminal how much more concise Erlang is for this. </em>Less than 3 weeks after starting from a clean sheet of paper, the new Erlang-based Playdar had its first transatlantic track resolution and streaming. The moment occurred on Friday, October 16th.  Here&#8217;s the transcript from the IRC channel (<a href="http://twitter.com/toby">tobyp</a> is Toby Padilla, of MusicMobs and Last.fm fame) when London-based RJ first streamed a track from Toby&#8217;s Seattle computer:</p>
<p style="padding-left:30px;">[15:40:46] &#60;tobyp&#62; http://www.playdar.org/demos/search.html#artist=pantera&#38;album=&#38;track=burnnn<br />
[15:41:06] &#60;RJ2&#62; woo, transatlantic streaming<br />
[15:41:19] &#60;tobyp&#62; hot!<br />
[15:41:35] &#60;RJ2&#62; playdar&#8217;s marconi moment<br />
[15:41:42] &#60;tobyp&#62; hahah</p>
<p>An incredible amount of progress has been made in the last two weeks,  a testament to RJ&#8217;s skills as much as Erlang&#8217;s expressiveness.  Still, Playdar is not ready for the general public.  It requires a bit of work to install and get running &#8211; (yep, the erlang runtime is required), but developer <a href="http://www.methylblue.com/">Max Howell</a> has been working on making a user-friendly package to make it easy for anyone to install. Hopefully it won&#8217;t be too long before Playdar is ready for the masses.</p>
<p>Even though it is new, there&#8217;s already some compelling apps that use Playdar.  One is <a href="http://www.playlick.com/">Playlick</a>:</p>
<p><a rel="attachment wp-att-1338" href="http://musicmachinery.com/2009/10/18/playing-with-playdar/playlick/"><img class="aligncenter size-full wp-image-1338" title="Playlick" src="http://musicmachinery.wordpress.com/files/2009/10/playlick.png" alt="Playlick" width="450" height="337" /></a></p>
<p>Playlick is a web application, developed by <a href="http://james.wheare.org/">James Wheare </a> that lets you build playlists. It uses Playdar for all music resolution.  Type in the name of an album and Playlick /  Playdar will find the music for you and let you listen to it.  It&#8217;s a great way to see/hear the power of Playdar.</p>
<p><strong>Adding custom content resolvers</strong></p>
<p>One of the strengths of Playdar is that it is very easy to add new resolvers.  If you are a music service provider you can create a Playdar content resolver that will serve up your content.    I wrote a content resolver that uses <a href="http://developer.echonest.com">the Echo Nest </a>to resolve tracks using our index of audio that we&#8217;ve found on the web.  This resolver can be used as a backstop.  If you can&#8217;t find a track on your computer or your friend&#8217;s computers the Echo Nest resolver might be able to find a version out there on some music blog.  Of course, the quality and availability of such free-range music is highly variable, so this resolver is a last resort.</p>
<p>Adding a new resolver to Playdar was extremely easy. It took perhaps 30 minutes to write &#8211; the hardest part was figuring out git &#8211; (thanks to RJ for walking me through the forks, pushes and ssh key settings).    You can see the code here: <a href="http://github.com/RJ/playdar-core/blob/master/contrib/echonest/echonest-resolver.py">echonest-resolver.py</a>.  Less than 150 lines of code, half of which is boilerplate.  150 lines and 30 minutes to add a whole new collection of music to the Playdar universe.   Hopefully soon we&#8217;ll see resolvers for music streaming services like Napster, Rhapsody and Spotify.</p>
<p><strong>What&#8217;s Next for Playdar?</strong></p>
<p>Playdar is new &#8211; and the plumbing and wiring are still be worked on &#8211; but already it is doing something pretty magical &#8211; letting me listen to any track I want to right now.  I can see how Playdar could be extended into acting as my music agent.  Over time, my Playdar servers will get to know quite a bit about my music tastes.  They&#8217;ll know what music I like to listen to, and when I like to listen to it.   Perhaps someday, instead of asking Playdar to resolve a specific track by name, I&#8217;ll just be able to ask Playdar to give me a playlist of new music that I might like.  Playdar can then use an Echo Nest, Last.fm or an AMG playlister to build a playlist of interesting, relevant new music.  Playdar won&#8217;t just be a music resolver, Playdar will be my music agent helping me explore for and discover new music.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[more wxErlang bugs...]]></title>
<link>http://mazenharake.wordpress.com/2009/10/16/more-wxerlang-bugs/</link>
<pubDate>Fri, 16 Oct 2009 13:51:08 +0000</pubDate>
<dc:creator>mazenharake</dc:creator>
<guid>http://mazenharake.wordpress.com/2009/10/16/more-wxerlang-bugs/</guid>
<description><![CDATA[I&#8217;ve found two more bugs in wxErlang. The library is definitely not done yet but it has come r]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve found two more bugs in wxErlang. The library is definitely not done yet but it has come really far. I guess it&#8217;s just a matter of people using it and ironing out the bugs. It looks really promising and GUI programming with Erlang is going to be as easy as a snapp (well&#8230; ehm&#8230;. almost <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>The first bug occurs when net_kernel isn&#8217;t started before you create and object and then start net_kernel and the object is called (kindof). I had a temporary fix for that but Dan Gudmundsson is going to fix it in better way&#8230; my patch was simply a workaround.<br />
details here: <a title="http://www.nabble.com/wxe_server-bug--%28and-patch%29-td25890987.html" href="http://www.nabble.com/wxe_server-bug--%28and-patch%29-td25890987.html" target="_blank">http://www.nabble.com/wxe_server-bug&#8211;%28and-patch%29-td25890987.html</a></p>
<p>Second bug is a bit strange and I don&#8217;t have it confirmed yet that it is a bug. It happens when you try to destroy an object from an event callback. E.g. if you create a frame, then connect left_down event, handle the event in a callback and destroy the frame then you can not create a new frame until the process has returned from the callback function.<br />
details here: <a title="http://www.nabble.com/wx_object-locks-td25925583.html" href="http://www.nabble.com/wx_object-locks-td25925583.html" target="_blank">http://www.nabble.com/wx_object-locks-td25925583.html</a></p>
<p>Peace.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[A card game in Erlang]]></title>
<link>http://pdincau.wordpress.com/2009/10/16/a-card-game-in-erlang/</link>
<pubDate>Fri, 16 Oct 2009 13:38:23 +0000</pubDate>
<dc:creator>pdincau</dc:creator>
<guid>http://pdincau.wordpress.com/2009/10/16/a-card-game-in-erlang/</guid>
<description><![CDATA[Tornato dalla Finlandia ho iniziato a pensare ad un nuovo progetto da sviluppare in erlang. Visto ch]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Tornato dalla Finlandia ho iniziato a pensare ad un nuovo progetto da sviluppare in erlang.</p>
<p>Visto che i miei amici italiani sono diventati dei super fanatici del gioco della scopa, ho pensato che sarebbe stata una buona sfida creare un server che gestisse delle partite a 4 giocatori (in coppie di 2) e mi sono scervellato sulla struttura da implementare, partendo dall&#8217;idea di usare piu moduli basati sul gen_server behaviour.</p>
<p>La prima cosa che ho iniziato a sviluppare consiste in un gen_server che gestisce il mazzo e il tavolo di gioco, tale server deve creare un mazzo, gestire le richieste di 10 carte da parte di ogni giocatore e gestire le carte giocate e i tentativi di presa.</p>
<p style="text-align:center;"><img class="aligncenter" title="Carte da scopa" src="http://www.hotshotscanada.com/usrimage/scopa%20cards.jpg" alt="" width="312" height="455" /></p>
<p>Ho identificato alcuni records su cui iniziare l&#8217;implementazione..</p>
<pre style="color:black;background-color:#f9f9f9;line-height:1.1em;border:1px dashed #2f6fab;padding:1em;">-record(card, {value, seed}).
-record(deck, {cards=[card]}).
-record(state, {deck, table=[]}).
</pre>
<p>Tutto si basa sull&#8217;idea che ogni carta venga rappresentata come un record a due valori: una value che ne indica il numero (da 1 a 10) e un seed, ovvero un seme.<br />
Ho creato anche un record per il deck (ovvero il mazzo): tale record contiene ha solo un valore, che viene identificato come una lista di carte&#8230;.alla fine ho deciso che lo stato del mio gen_server per il mio momento sia dato da un record contenente un deck e un table (rappresentante le carte sul tavolo) che di default è una lista vuota&#8230;.ora, stavo effettivamente pensando che deck e table potrebbero essere basati su di un unico record (una lista di carte)&#8230;ma come ho detto tutto questo è ancora uno stub&#8230; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Nella funzione di init del mio gen_server devo creare un mazzo e mescolarlo&#8230;ecco la mia prima implementazione:</p>
<pre style="color:black;background-color:#f9f9f9;line-height:1.1em;border:1px dashed #2f6fab;padding:1em;">init([]) -&#62;
  Coppe = create_cards("Coppe"),
  Denari = create_cards("Denari"),
  Bastoni = create_cards("Bastoni"),
  Spade = create_cards("Spade"),
  ShuffledDeck = #deck{cards=shuffle(lists:append([Coppe, Denari, Bastoni, Spade]))},
  {ok, #state{deck=ShuffledDeck}}.

create_cards(Seed) -&#62;
  lists:foldl(fun(Number, Acc) -&#62;
                                 [#card{value=Number, seed=Seed} &#124; Acc]
              end, [], lists:seq(1, 10)).
</pre>
<p>La funzione create_cards(Seed) non fa altro che creare dieci carte (da 1 a 10) per un seme dato in ingresso, usando un accumulalore e il metodo lists:seq/2 che dati due numeri crea una lista di interi dal primo al secondo di passo 1.</p>
<p>Tuttavia a vederlo ora, il codice interno a init([]) non mi sembra molto elegante, quindi forse qualcosa del genere sarebbe meglio:</p>
<pre style="color:black;background-color:#f9f9f9;line-height:1.1em;border:1px dashed #2f6fab;padding:1em;">init([]) -&#62;
  Cards = lists:fold(fun(Seed, Acc) -&#62;
                                      [create_cards(Seed) &#124; Acc]
                     end, [], ["Coppe, "Denari", "Spade", "Bastoni"]),
  ShuffledDeck = #deck{cards=shuffle(lists:append(Cards))},
  {ok, #state{deck=ShuffledDeck}}.
</pre>
<p>L&#8217;ultimo codice tuttavia è solo un abbozzo scritto su due piedi qui sul computer della facolta&#8230;quindi potrebbe benissimo non compilare <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ma l&#8217;idea mi sembra migliore&#8230;se vi va provatelo e ditemi&#8230;.io intanto continuo nell&#8217;implementazione e nel prossimo post spero di potervi spiegare come mescolare il mazzo, ovvero come randomizzare una lista in erlang!</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
