<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Guaita &#187; Didàctica</title>
	<atom:link href="http://guaita.wordpress.com/category/didactica/feed/" rel="self" type="application/rss+xml" />
	<link>http://guaita.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 05 Mar 2009 08:48:20 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>ca</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='guaita.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a795b8acfeec2650923f9ad830d74817?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Guaita &#187; Didàctica</title>
		<link>http://guaita.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://guaita.wordpress.com/osd.xml" title="Guaita" />
		<item>
		<title>Programació concurrent + OOP ~ Actors Model: molt fàcil en Groovy</title>
		<link>http://guaita.wordpress.com/2009/03/05/gparallelizer/</link>
		<comments>http://guaita.wordpress.com/2009/03/05/gparallelizer/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 00:25:02 +0000</pubDate>
		<dc:creator>jordicamposmiralles</dc:creator>
				<category><![CDATA[Didàctica]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://guaita.wordpress.com/?p=106</guid>
		<description><![CDATA[Fa temps que vaig descobrir Groovy (un llenguatge d&#8217;scripting sobre la JVM ideal per als que saben Java), i ara he trobat el complement ideal per a fer &#8220;pseudo-codi&#8221; (que es pot executar!) per a fer més fàcil l&#8217;estudi dels problemes de concurrència: GParallelizer. De fet, la cosa va més enllà, i es tracta d&#8217;una [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=106&subd=guaita&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://groovy.codehaus.org"><img class="alignleft" style="border:0 none;" title="Groovy" src="http://media.xircles.codehaus.org/_projects/groovy/_logos/medium.png" alt="" width="203" height="100" /></a>Fa temps que vaig descobrir <a href="http://groovy.codehaus.org">Groovy</a> (un llenguatge d&#8217;scripting sobre la JVM ideal per als que saben Java), i ara he trobat el complement ideal per a fer &#8220;pseudo-codi&#8221; (que es pot executar!) per a fer més fàcil l&#8217;estudi dels problemes de concurrència: <a href="http://code.google.com/p/gparallelizer/wiki/Actors">GParallelizer</a>. De fet, la cosa va més enllà, i es tracta d&#8217;una llibreria que facilita moltíssim la programació &#8220;en paral·lel&#8221; per aprofitar els nous multi-core&#8230;</p>
<p>Aquí va un petit exemple&#8230;</p>
<pre>import org.gparallelizer.actors.pooledActors.AbstractPooledActor

class GameMaster extends AbstractPooledActor {
  int secretNum

  void afterStart() {
    secretNum = new Random().nextInt(10)
  }

  void act() {
    loop {
      react { int num -&gt;
        if      ( num &gt; secretNum )
          reply 'too large'
        else if ( num &lt; secretNum )
          reply 'too small'
        else {
          reply 'you win'
          stop()
        }
      }
    }
  }
}
<span id="more-106"></span>
class Player extends AbstractPooledActor {
  String              name
  AbstractPooledActor server
  int                 myNum

  void act() {
    loop {
      myNum = new Random().nextInt(10)

      server.send myNum

      react {
        switch( it )
        {
          case 'too large':
            println "$name: $myNum was too large"; break
          case 'too small':
            println "$name: $myNum was too small"; break
          case 'you win':
            println "$name: I won $myNum"; stop(); break
        }
      }
    }
  }
}

final def master = new GameMaster()
final def player = new Player( name: 'Player', server: master )

master.start()
player.start()</pre>
<p>Bé, sembla que aquest paradigma (que existeix des dels 70) va guanyant adeptes ara que estan de moda els multi-core: més en Groovy (<a href="http://groovy.codehaus.org/Concurrency+with+Groovy">1</a>, <a href="http://www.slideshare.net/paulk_asert/groovy-concurrency-paul-king-code-camp-nov2008-presentation">2</a>) , <a href="http://tech.puredanger.com/java7#jsr166">Java</a>, <a href="http://www.scala-lang.org/node/242">Scala</a>, <a href="http://dramatis.mischance.net/wiki/dramatis">Python-Ruby</a> (exemple <a href="http://dramatis.mischance.net/repositories/entry/dramatis/examples/im">chat</a>), <a href="http://www.slideshare.net/vishnu/concurrency-oriented-programming-in-erlang?src=related_normal&amp;rel=474822">Erlang</a>, <a href="http://garuma.wordpress.com/2009/03/02/exploring-other-concurrency-models/">.NET</a></p>
<p>L&#8217;exemple és petitó. La idea seria usar-lo per a les classes de concurrència. Els passos següents podrien ser:</p>
<p>- fer el jugador més &#8220;intel·ligent&#8221;: però no aporta res a les classes de Concurrència<br />
- afegir més jugadors: servidor ha d&#8217;avisar a jugadors perdedors que la  partida s&#8217;ha acabat<br />
- servidor multi-actor: que el servidor estigui composat per més d&#8217;un  actor, per tant afloren problemes d&#8217;accés concurrent al número secret&#8230;<br />
- altres exemples en que hi hagi abraçada mortal donat el tipus de  protocol&#8230;</p>
<p>vaja, que crec que permet &#8220;anar directament al gra&#8221; als problemes nous  de Concurrència, deixant a una banda la dificultat habitual per a implementar-ho  amb Java &#8220;pur&#8221;&#8230; com una mena de pseudo-codi (que es pot executar!). Un  cop entesos i treballats els problemes, una darrera pràctica ja podria  ser en Java &#8220;pur&#8221;.</p>
<p>He creat un fitxer comprimir  <a class="moz-txt-link-freetext" href="http://namaste.maia.ub.es/actors2009-03-04.tar.gz">http://namaste.maia.ub.es/actors2009-03-04.tar.gz</a>, amb tot (groovy,  llibreria actors i codi d&#8217;exemple), només cal descomprimir i executar&#8230;</p>
<p>; )</p>
Posted in Didàctica, Groovy  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/guaita.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/guaita.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/guaita.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/guaita.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/guaita.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/guaita.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/guaita.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/guaita.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/guaita.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/guaita.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=106&subd=guaita&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://guaita.wordpress.com/2009/03/05/gparallelizer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b46ee2e9563fc61735a9d9b486da1002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jordicamposmiralles</media:title>
		</media:content>

		<media:content url="http://media.xircles.codehaus.org/_projects/groovy/_logos/medium.png" medium="image">
			<media:title type="html">Groovy</media:title>
		</media:content>
	</item>
		<item>
		<title>Tarifes telefòniques. Quina tarifa és millor?</title>
		<link>http://guaita.wordpress.com/2009/02/28/activitat-cap/</link>
		<comments>http://guaita.wordpress.com/2009/02/28/activitat-cap/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 11:38:19 +0000</pubDate>
		<dc:creator>jordicamposmiralles</dc:creator>
				<category><![CDATA[Didàctica]]></category>

		<guid isPermaLink="false">http://guaita.wordpress.com/?p=97</guid>
		<description><![CDATA[Una companyia de telefonia mòbil us ofereix dues tarifes:

Tarifa A:  Té un import fix de sis euros mensuals  i cada minut de trucada té un preu de 15 cèntims d&#8217;euro.
Tarifa B: El minut es cobra a 9 cèntims d&#8217;euro i el manteniment mensual de la línia té un cost de 9 euros mensuals.


Utilitzeu el full [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=97&subd=guaita&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft" style="border:0 none;" src="http://www.designmuseum.org/designersimg/142_5Lg.jpg" alt="" width="220" height="330" />Una companyia de telefonia mòbil us ofereix dues tarifes:</p>
<ul>
<li><strong>Tarifa A</strong>:  Té un import fix de sis euros mensuals  i cada minut de trucada té un preu de 15 cèntims d&#8217;euro.</li>
<li><strong>Tarifa B</strong>: El minut es cobra a 9 cèntims d&#8217;euro i el manteniment mensual de la línia té un cost de 9 euros mensuals.</li>
</ul>
<ol>
<li>Utilitzeu el <a href="http://documents.google.com">full de càlcul en línia</a> per fer una taula de valors en el que es mostri  el cost de  parlar fins a dues hores en intervals d&#8217;un quart d&#8217;hora per a cada tarifa.</li>
<li>Quina tarifa és millor? Per què?</li>
<li>Fes un gràfic amb el full de càlcul que il·lustri l&#8217;evolució de l&#8217;import segons les dues tarifes. Quin tipus de gràfic has triat? Per què?</li>
<li>Podries trobar una expressió que representi el cost de laTarifa A en funció dels minuts? i el de la Tarifa B?</li>
<li>En quin minut (exacte) es paga el mateix amb les dues tarifes (feu servir un sistema d&#8217;equaciones)?</li>
<li>Entra en el <a href="http://www.geogebra.org">Geogebra</a> i introdueix aquestes dues equacions. Com podem trobar el mateix resultat que heu obtingut amb el sistema d&#8217;equacions?</li>
</ol>
<hr /><em>Activitat creada per al CAP de Matemàtiques per Eloi Puertas Prats, Jordi Campos i Manuel Cagigas.</em></p>
<p><em>Dirigida a estudiants de 4rt ESO, a realitzar per parelles.</em></p>
Posted in Didàctica  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/guaita.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/guaita.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/guaita.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/guaita.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/guaita.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/guaita.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/guaita.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/guaita.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/guaita.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/guaita.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=97&subd=guaita&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://guaita.wordpress.com/2009/02/28/activitat-cap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b46ee2e9563fc61735a9d9b486da1002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jordicamposmiralles</media:title>
		</media:content>

		<media:content url="http://www.designmuseum.org/designersimg/142_5Lg.jpg" medium="image" />
	</item>
		<item>
		<title>Manual de Gimp amb molts exemples&#8230;</title>
		<link>http://guaita.wordpress.com/2009/02/25/manual-gimp/</link>
		<comments>http://guaita.wordpress.com/2009/02/25/manual-gimp/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 19:44:48 +0000</pubDate>
		<dc:creator>jordicamposmiralles</dc:creator>
				<category><![CDATA[Didàctica]]></category>
		<category><![CDATA[Llibres]]></category>
		<category><![CDATA[Programari Lliure]]></category>

		<guid isPermaLink="false">http://guaita.wordpress.com/?p=86</guid>
		<description><![CDATA[Un Manual de Gimp que ofereix molts exemples d&#8217;ús i en castellà&#8230;
Posted in Didàctica, Llibres, Programari Lliure       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=86&subd=guaita&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.gimp.org"><img class="alignleft" style="border:0 none;margin:4px;" src="http://www.gimp.org/images/title.png" alt="" width="100" height="40" /></a>Un <a href="http://www.imh.es/dokumentazio-irekia/manuales/curso-de-tratamiento-de-imagenes-con-gimp?language_sync=1">Manual de Gimp</a> que ofereix molts exemples d&#8217;ús i en castellà&#8230;</p>
Posted in Didàctica, Llibres, Programari Lliure  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/guaita.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/guaita.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/guaita.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/guaita.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/guaita.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/guaita.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/guaita.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/guaita.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/guaita.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/guaita.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=86&subd=guaita&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://guaita.wordpress.com/2009/02/25/manual-gimp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b46ee2e9563fc61735a9d9b486da1002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jordicamposmiralles</media:title>
		</media:content>

		<media:content url="http://www.gimp.org/images/title.png" medium="image" />
	</item>
		<item>
		<title>B/Velles novetats&#8230; toca pensar&#8230;</title>
		<link>http://guaita.wordpress.com/2008/04/30/videos_noves_tecnologies/</link>
		<comments>http://guaita.wordpress.com/2008/04/30/videos_noves_tecnologies/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 07:36:44 +0000</pubDate>
		<dc:creator>jordicamposmiralles</dc:creator>
				<category><![CDATA[Afers]]></category>
		<category><![CDATA[Didàctica]]></category>

		<guid isPermaLink="false">http://guaita.wordpress.com/?p=46</guid>
		<description><![CDATA[Avui he vist uns vídeos que em van enviar:
A Vision of Students Today
Information R/evolution
The Machine is Us/ing US
i m&#8217;han agradat! a part dels missatges, el que més m&#8217;ha agradat és la forma de presentar-los&#8230;
que traduït a l&#8217;era digital, l&#8217;XML ja el tenia vist, però el CSS n&#8217;ha fet una bona posada en escena&#8230;
o en llenguatge [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=46&subd=guaita&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://guaita.files.wordpress.com/2008/04/pensar.png"><img class="alignleft" style="border:0 none;float:left;margin:5px;" src="http://guaita.files.wordpress.com/2008/04/pensar.png?w=103&#038;h=110" border="0" alt="" width="103" height="110" align="left" /></a>Avui he vist uns <strong>vídeos</strong> que em van enviar:</p>
<p><a href="http://es.youtube.com/watch?v=dGCJ46vyR9o&amp;feature=related">A Vision of Students Today</a></p>
<p><a href="http://es.youtube.com/watch?v=-4CV05HyAbM&amp;feature=user">Information R/evolution</a></p>
<p><a href="http://es.youtube.com/watch?v=NLlGopyXT_g&amp;feature=user">The Machine is Us/ing US</a></p>
<p>i m&#8217;han agradat! a part dels <strong>missatges</strong>, el que més m&#8217;ha agradat és la <strong>forma</strong> de presentar-los&#8230;</p>
<p>que traduït a l&#8217;era digital, l&#8217;<strong>XML</strong> ja el tenia vist, però el <strong>CSS</strong> n&#8217;ha fet una bona posada en escena&#8230;</p>
<p>o en llenguatge musical, la <strong>partitura</strong> era bona i l&#8217;<strong>interpret</strong> excel·lent&#8230;.</p>
<p>sovint penso que <em><strong>&#8220;tot canvia per a que tot resti&#8221;</strong></em> &#8211;sembla que ho va dir un tal Heràclides&#8211;, al veure el vídeo dels joves &#8220;desafiant amb les seves  veritats quotidianes&#8221; i els comentaris &#8220;reaccionaris&#8221; que sovint fan els &#8220;més madurs&#8221;&#8230; he recordat que Aristòtil ja deia <em><strong>&#8220;Què en farem d&#8217;aquest jovent?&#8221;</strong></em>&#8230;</p>
<p>així que crec, que només ens queda <strong>REpensar</strong>&#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/guaita.wordpress.com/46/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/guaita.wordpress.com/46/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/guaita.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/guaita.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/guaita.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/guaita.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/guaita.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/guaita.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/guaita.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/guaita.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/guaita.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/guaita.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guaita.wordpress.com&blog=3006084&post=46&subd=guaita&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://guaita.wordpress.com/2008/04/30/videos_noves_tecnologies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b46ee2e9563fc61735a9d9b486da1002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jordicamposmiralles</media:title>
		</media:content>

		<media:content url="http://guaita.files.wordpress.com/2008/04/pensar.png" medium="image" />
	</item>
	</channel>
</rss>