<?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>Lupi on Software &#187; Python</title>
	<atom:link href="http://blog.lupi-software.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lupi-software.com</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 11:35:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.lupi-software.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Lupi on Software &#187; Python</title>
		<link>http://blog.lupi-software.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.lupi-software.com/osd.xml" title="Lupi on Software" />
	<atom:link rel='hub' href='http://blog.lupi-software.com/?pushpress=hub'/>
		<item>
		<title>GenroPy has no community</title>
		<link>http://blog.lupi-software.com/2011/04/03/genropy-has-no-community/</link>
		<comments>http://blog.lupi-software.com/2011/04/03/genropy-has-no-community/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 14:22:29 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">https://allupo.wordpress.com/?p=706</guid>
		<description><![CDATA[One of the key assets of every open source project is the community that supports it. The health of the community is the key factor contributing to growth and long-term viability of an open source project. If there are not enough gardeners, even the most beautiful and well-groomed park will eventually turn into an impenetrable [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=706&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">One of the key assets of every open source project is the community that supports it. The health of the community is the key factor contributing to growth and long-term viability of an open source project.</p>
<p>If there are not enough gardeners, even the most beautiful and well-groomed park will eventually turn into an impenetrable wilderness. <strong>The larger and more ambitious a project is, the messier it will become when there are not enough resources.</strong></p>
<p style="text-align:center;"><img class="aligncenter" style="border:0 initial initial;" title="GenroPy-vs-Django-LOCs.png" src="http://allupo.files.wordpress.com/2011/04/genropy-vs-django-locs.png?w=505&#038;h=229" border="0" alt="GenroPy vs. Django 1.3 (LOCs)" width="505" height="229" /></p>
<p style="text-align:center;">Lines of code: production / tests</p>
<p>GenroPy has a very large codebase, but it is in dire need of resources to support its growth.</p>
<p><span id="more-706"></span></p>
<p><strong>GenroPy is a huge project</strong>: more than 50,000 lines of Python code and nearly 20,000 lines of Javascript code. It is truly a monument to the productivity and the passion of its authors, considering that the mailing list count just 12 people. There are no separate user and development mailing lists.</p>
<p>Who are these developers?</p>
<ul>
<li><strong>Softwell</strong> (Italy) is the largest GenroPy shop. They are the original authors of GenroPy. It&#8217;s the company of Giovanni Porcari, the marvelous genius behind GenroPy. I say it without any malice, he is truly a great developer and a wonderful guy. There are also his sons, Francesco and Saverio, who are as bright as their father. Michele Bertoldi, another great developer, also works in Softwell when he&#8217;s not busy at the <em>E-Health Lab</em> at Politecnico di Milano. Paolo Camera and Filippo Astolfi complete the core GenroPy team at Softwell.</li>
<li><strong>GoodSoftware</strong> (Australia) is the second GenroPy shop worldwide. Jeff Edwards runs it. He&#8217;s a pretty nice guy too. The last time we spoke (a couple of weeks ago), he wasn&#8217;t yet successful in his quest to hire more programmers – so I assume he&#8217;s still the only GenroPy developer operating outside Italy.</li>
<li><strong>Med Media</strong> (Italy) is the last GenroPy shop. The programmers there are three students, who are graduating in <em>Biomedic Engineering</em> (MsC) and are about to start working on their thesis. These students started with both Python and GenroPy in november 2010.</li>
</ul>
<p>This is the whole GenroPy community, worldwide.</p>
<p><strong>For comparison, let&#8217;s look at Django 1.3</strong>: more than 66,000 lines of Python in production, but also more than 51,000 lines of test code. The developers mailing list has 6,342 subscribers, the users mailing list has three times as much.</p>
<p><img style="display:block;margin-left:auto;margin-right:auto;border:0 initial initial;" title="GenroPy-vs-Django-table.png" src="http://allupo.files.wordpress.com/2011/04/genropy-vs-django-table.png?w=479&#038;h=125" border="0" alt="GenroPy vs. Django 1.3" width="479" height="125" /></p>
<p>How many production lines does each developer supports? How many production lines are there for each test line?</p>
<p>I&#8217;ll leave calculating the <a href="http://en.wikipedia.org/wiki/Bus_factor">bus factor</a> of the two projects as an exercise to the reader.</p>
<br />Filed under: <a href='http://blog.lupi-software.com/category/featured-categories/programming/'>Programming</a> Tagged: <a href='http://blog.lupi-software.com/tag/community/'>community</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/706/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=706&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2011/04/03/genropy-has-no-community/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://allupo.files.wordpress.com/2011/04/genropy-vs-django-locs.png?w=150" />
		<media:content url="http://allupo.files.wordpress.com/2011/04/genropy-vs-django-locs.png?w=150" medium="image">
			<media:title type="html">GenroPy-vs-Django-LOCs.png</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>

		<media:content url="http://allupo.files.wordpress.com/2011/04/genropy-vs-django-locs.png" medium="image">
			<media:title type="html">GenroPy-vs-Django-LOCs.png</media:title>
		</media:content>

		<media:content url="http://allupo.files.wordpress.com/2011/04/genropy-vs-django-table.png" medium="image">
			<media:title type="html">GenroPy-vs-Django-table.png</media:title>
		</media:content>
	</item>
		<item>
		<title>GenroPy is not SOLID</title>
		<link>http://blog.lupi-software.com/2011/04/02/genropy-is-not-solid/</link>
		<comments>http://blog.lupi-software.com/2011/04/02/genropy-is-not-solid/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 21:24:49 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[solid]]></category>

		<guid isPermaLink="false">https://allupo.wordpress.com/?p=682</guid>
		<description><![CDATA[There are five basic principles of object-oriented design and programming, known collectively as SOLID, that are very important to build code that is easy to maintain and evolve over time. These principles are: Single responsibility – an object should have only a single responsibility. Open/closed – software entities should be open for extension, but closed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=682&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are five basic principles of object-oriented design and programming, known collectively as SOLID, that are very important to build code that is easy to maintain and evolve over time.</p>
<p>These principles are:</p>
<ul>
<li><strong>Single responsibility</strong> – an object should have only a single responsibility.</li>
<li><strong>Open/closed</strong> – software entities should be open for extension, but closed for modification.</li>
<li><strong>Liskov substitution</strong> – objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.</li>
<li><strong>Interface segregation</strong> – many client specific interfaces are better than one general purpose interface.</li>
<li><strong>Dependency inversion</strong> – depend upon abstractions, do not depend upon concretions.</li>
</ul>
<p>Unfortunately, GenroPy violates all of them in some important parts of its design or implementation. In the rest of this article, I&#8217;ll show examples where it happens.</p>
<p><span id="more-682"></span></p>
<h1>Single responsibility</h1>
<p>This principle states that &#8220;<em>every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility.</em>&#8220;</p>
<p><strong>What is a responsibility?</strong> Robert C. Martin, who introduced this principle, defines a responsibility as a <em>reason to change</em>: <strong>a class or module should have one, and only one, reason to change.</strong> As an example, consider a module that compiles and prints a report. Such a module can be changed for two reasons. First, the content of the report can change. Second, the format of the report can change. These two things change for very different causes; one substantive, and one cosmetic. The single responsibility principle says that these two aspects of the problem are really two separate responsibilities, and should therefore be in separate classes or modules.</p>
<p>GenroPy is plagued with many violations of the <em>single responsibility</em> principle. Most of its high-level classes are jacks of all trades.</p>
<p>For example, let&#8217;s look at the <code>GnrApp</code> class from the <a href="https://github.com/genropy/genropy/blob/master/gnrpy/gnr/app/gnrapp.py">gnr.app.gnrapp</a> module. It&#8217;s stated purpose is to open a GenroPy application instance and work as a façade to its high-level services (mostly for database access in batch processes). Why does it need to know how configuration files are organized on the various platforms (<code>load_gnr_config</code> method)? Why does it contain code to assemble the application menu (<code>init</code> method), an user-interface detail? Why does it contain code to load and save localization files (<code>buildLocalization</code>, <code>updateLocalization</code>)? Why does it know how to send emails (<code>sendmail</code>)? Finally, why does it implement methods to authenticate users using xml data, sql tables or python methods (<code>auth_py</code>, <code>auth_xml</code>, <code>auth_sql</code>)? All of these responsibilities should be in their own separate classes or, in the latter case, clusters of classes.</p>
<p><code>auth_py</code> is particularly interesting for being totally misleading and almost not useful at all. It doesn&#8217;t allow you to <strong>authenticate</strong> a user in your own code. Your code get only a single parameter, the username, and you can return a new username, a new user id or new tags (GenroPy&#8217;s tags are roughly equivalent to Zope roles or LDAP groups). Your code doesn&#8217;t get the password at all, so it has no way to really authenticate the user. Why is there such a method? It&#8217;s used to implement a single feature, that is only slightly related to authentication, <em>passepartout users</em>:  it lets you as a developer impersonate another user to help during debugging.</p>
<p>Let&#8217;s look at some other classes:</p>
<p><code>GnrDboPackage</code> from <a href="https://github.com/genropy/genropy/blob/master/gnrpy/gnr/app/gnrdbo.py">gnr.app.gnrdbo</a> is the base class for packages (GenroPy&#8217;s packages are roughly equivalent to Zope products). It acts as a façade to many services common to all packages, such as counters or user management. Why each and every package in an application needs its own counters and users table is beyond my comprehension. I never dared to ask.</p>
<p><code>SqlTable</code> from <a href="https://github.com/genropy/genropy/blob/master/gnrpy/gnr/sql/gnrsqltable.py">gnr.sql.gnrsqltable</a> is the class that lets you access database tables. It knows how to perform select, update, delete and lock operations on a single database table. It also creates record bags (these are the GenroPy&#8217;s equivalent of data transfer objects that are sent to the user interface) and how to write record clusters (set of related records, e.g. in master/detail schemas), it even decides what fields to display when a record appears in a combo box or list in the user interface. <code>SqlTable</code> implements a wide range of responsibilities from database access to <a href="http://martinfowler.com/eaaCatalog/unitOfWork.html">UnitOfWork</a> tasks, to details of the user interface.</p>
<p>There are many other examples, the worst offender is probably <code>GnrWsgiSite</code> from <a href="https://github.com/genropy/genropy/blob/master/gnrpy/gnr/web/gnrwsgisite.py">gnr.web.gnrwsgisite</a>.</p>
<h1>Open/closed</h1>
<p>This principle states that &#8220;<em>software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification</em>&#8220;; that is, such an entity can allow its behavior to be modified, but without altering its source code.</p>
<p>The standard way to query a database in GenroPy is this:</p>
<p><pre class="brush: python;">
def somePageMethod(self, param1):
        tbl = self.db.table('pkgname.tablename')
        qry = tbl.query(where='$param1 = :param1', param1=param1)
        sel = qry.selection()
        return sel.output('baglist')
</pre></p>
<p>Here <code>self</code> is the webpage, which allows you to access the database object using its <code>db</code> attribute. Using it, you get a reference to the <code>SqlTable</code> object. Once you have a database table, you can query it. Once you have built a query, you ask for its results and you get a <code>SqlSelection</code> object.</p>
<p>As usual, these selection object do many things: you can filter, change, re-order or even aggregate data. Once you&#8217;re done, you can transform them to many formats using the <code>output()</code> method. This method is implemented by looking up implementation methods in the <code>SqlSelection</code> class itself.</p>
<p>For example, the code above will eventually call the following <code>out_baglist</code> method:</p>
<p><pre class="brush: python;">
def out_baglist(self, outsource, recordResolver=False, caption=False):
&quot;&quot;&quot;add???

:param outsource: add???
:param recordResolver: boolean. add???. Default value is ``False``
:param caption: boolean. add???. Default value is ``False``
:returns: add???
&quot;&quot;&quot;
result = Bag()
for j, row in enumerate(outsource):
    row = dict(row)
    pkey = row.pop('pkey', None)
    spkey = 'r_%i' % j
    result.setItem(spkey, Bag(row), _pkey=pkey)
return result
</pre></p>
<p>(By the way, notice that (a) this method has two parameters that are not used at all, a leftover from a previous feeble refactoring without a test case safety net, and that (b) &#8220;<em>add???</em>&#8221; is a placeholder for documentation yet to be written. There are 2605 methods in the current GenroPy&#8217;s codebase that have placeholders instead of real documentation)</p>
<p><code>SqlSelection</code> has all sorts of output methods:</p>
<ul>
<li><code>out_bag</code></li>
<li><code>out_baglist</code></li>
<li><code>out_count</code></li>
<li><code>out_data</code></li>
<li><code>out_dictlist</code></li>
<li><code>out_distinct</code></li>
<li><code>out_distinctColumns</code></li>
<li><code>out_fullgrid</code></li>
<li><code>out_generator</code></li>
<li><code>out_grid</code></li>
<li><code>out_json</code></li>
<li><code>out_list</code></li>
<li><code>out_listItems</code></li>
<li><code>out_pkeylist</code></li>
<li><code>out_recordlist</code></li>
<li><code>out_records</code></li>
<li><code>out_selection</code></li>
<li><code>out_tabtext</code></li>
<li><code>out_xls</code></li>
<li><code>out_xmlgrid</code></li>
</ul>
<p>These methods range from transforming selections into other internal data structures, like bags and lists of dictionaries, up to to exporting to full-blown external formats like JSON or even Excel files.</p>
<p>(There are also obviously violations of the <em>single responsibility</em> and the <em>dependency inversion</em> principles, but we&#8217;re concerned with the <em>open/closed</em> one here)</p>
<p>How are you supposed to add a new output methods? You add it either to the source code of the class or you &#8220;monkeypatch&#8221; it at runtime. That&#8217;s a serious design flaw, in my opinion.</p>
<h1>Liskov substitution</h1>
<p>This principle has been succinctly formulated in a 1994 paper as follows:</p>
<blockquote><p><em>Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects of type S where S is a subtype of T.</em></p></blockquote>
<p><em>Liskov substitution</em> is a particular definition of a (semantic) subtyping relation, sometimes called <strong>strong behavioral subtyping</strong>, introduced by Barbara Liskov in 1987.</p>
<p>In order to satisfy the Liskov substitution principle, some strict requirements on signatures of methods must be verified:</p>
<ul>
<li><strong>Contravariance of method arguments</strong> in the subtype.</li>
<li><strong>Covariance of return types</strong> in the subtype.</li>
<li><strong>No new exceptions</strong> should be thrown by methods of the subtype, except where those exceptions are themselves subtypes of exceptions thrown by the methods of the supertype.</li>
</ul>
<p>Static programming languages can enforce these constraints at compile time. In Python, you have to enforce them manually when you design code.</p>
<p>There are additional, behavioral conditions that a subtype must meet to satisfy the <em>Liskov substitution</em> principle:</p>
<ul>
<li><strong>Preconditions cannot be strengthened</strong> in a subtype.</li>
<li><strong>Postconditions cannot be weakened</strong> in a subtype.</li>
<li><strong>Invariants of the supertype must be preserved</strong> in a subtype.</li>
<li><strong>History constraint</strong> (the &#8220;history rule&#8221;). Objects are regarded as being modifiable only through their methods (encapsulation). Since subtypes may introduce methods that are not present in the supertype, the introduction of these methods may allow state changes in the subtype that are not permissible in the supertype. The history constraint prohibits this.</li>
</ul>
<p>GenroPy&#8217;s database adapters violate the <em>Liskov substitution</em> principle: they raise database-specific exceptions, leaking their implementation details through an abstraction that should abstract them.</p>
<p>In addition, the way GenroPy implements triggers, in particular  <code>trigger_onUpdating(self, record_data, old_record)</code>, makes it very hard not to violate the <em>Liskov substitution</em> principle in your own code.</p>
<h1>Interface segregation</h1>
<p>Once an interface has become too fat, it needs to be split into smaller and more specific interfaces so that any client of that interface will only know about the methods that pertain to them. No client should be forced to depend on methods it does not use.</p>
<p>GenroPy is full of fat classes, the worst offender is the &#8220;Bag&#8220; class itself, the basic building block of most GenroPy&#8217;s technologies: database access, database schema definition, user interface, data transfer between the server and the browser – all are based on GenroPy&#8217;s bags.</p>
<p>Bags need a serious redesign, their public interface is huge – 78 methods – for a class whose only responsibility should be to manage ordered lists of keys/values pairs and associated attributes.</p>
<p>Bags are so fundamental to GenroPy that a complete discussion of their problems, and a possible redesign, will require an article on its own.</p>
<h1>Dependency inversion</h1>
<p>The principle basically states that:</p>
<ul>
<li>High-level modules should not depend on low-level modules. Both should depend on abstractions.</li>
<li>Abstractions should not depend upon details. Details should depend upon abstractions.</li>
</ul>
<p>GenroPy doesn&#8217;t respect these rules at all. The antipattern used to implement <code>SqlSelection</code>&#8216;s <code>output()</code> method obviously violates <em>dependency inversion</em> rules. GenroPy employs this bad solution in other places, notably in the central <code>Bag</code> class.</p>
<p>Another obvious violation is in many methods of the core classes – <code>GnrWsgiSite</code>, <code>GnrApp</code> or <code>GnrDbPackage</code> – that act as façade for methods and features defined in packages. Since packages are by definition optional (you need to explicitly list the packages you want to load in the application configuration file), GenroPy core classes (high-level modules) are very fragile: they directly depend on the low-level details of potentially optional modules.</p>
<h1>Conclusions</h1>
<p>This article is not an attack to GenroPy. My aim is not to kill the project, but to help it grow. I had plans to attack these issues, introduce a comprehensive test suite and refactor code smells. I cannot contribute to the project anymore, so someone else – most probably GenroPy&#8217;s core developers – will need to address these issues.</p>
<p>GenroPy codebase has some serious flaws. Many of them are a result of its origins and the non-conventional background of its authors. These are also its strengths: for the tasks it&#8217;s been designed for (business applications), GenroPy can be insanely productive.</p>
<p>Some level of defects and design flaws are normal in a project that hasn&#8217;t reached version 1.0. These issues, however, are important and need to be fixed in order for the project to gain users and supporters outside its current, very small community.</p>
<br />Filed under: <a href='http://blog.lupi-software.com/category/featured-categories/programming/'>Programming</a> Tagged: <a href='http://blog.lupi-software.com/tag/oop/'>OOP</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a>, <a href='http://blog.lupi-software.com/tag/solid/'>solid</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/682/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/682/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/682/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/682/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/682/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/682/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/682/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=682&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2011/04/02/genropy-is-not-solid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>No longer involved in GenroPy</title>
		<link>http://blog.lupi-software.com/2011/04/01/no-longer-involved-in-genropy/</link>
		<comments>http://blog.lupi-software.com/2011/04/01/no-longer-involved-in-genropy/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 08:27:24 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">https://allupo.wordpress.com/?p=654</guid>
		<description><![CDATA[I am no longer affiliated with the GenroPy project. I have no conflicts with the project itself or its authors, but I won&#8217;t be able to contribute to it in the future. In the last year and half, I have been the largest GenroPy user outside Softwell, the company that created the framework. There is a lot [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=654&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am no longer affiliated with the <a href="http://blog.genropy.org/">GenroPy</a> project. I have no conflicts with the project itself or its authors, but I won&#8217;t be able to contribute to it in the future.</p>
<p>In the last year and half, I have been the largest GenroPy user outside Softwell, the company that created the framework. There is a lot I learned about it and its community. There were many areas that I wished to improve with my contributions.</p>
<p>Some of these problem areas are critically important for the viability of the project and need to be fixed soon. Since I cannot directly help anymore, I will summarize them on this blog in a series of articles for several reasons:</p>
<ul>
<li><strong>I do not wish to see my name associated with a project and a codebase that I consider suboptimal</strong> and that I cannot fix.</li>
<li><strong>I wish to help people who are evaluating GenroPy for their projects</strong>, since some of these issues took time to discover and were not obvious from the start.</li>
<li><strong>I hope someone will pick up from where I left and fix these things.</strong> I still see a lot of potential in this project, once these issues are solved.</li>
</ul>
<p><strong>Note: </strong><em>Critical reviews are always problematic, so I will <em>only </em>accept comments that discuss the technical aspects of my articles about GenroPy.</em></p>
<br />Filed under: <a href='http://blog.lupi-software.com/category/featured-categories/programming/'>Programming</a> Tagged: <a href='http://blog.lupi-software.com/tag/python/'>Python</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/654/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=654&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2011/04/01/no-longer-involved-in-genropy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>I link della settimana</title>
		<link>http://blog.lupi-software.com/2011/03/07/i-link-della-settimana-2/</link>
		<comments>http://blog.lupi-software.com/2011/03/07/i-link-della-settimana-2/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 15:09:38 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[analisi dei dati]]></category>
		<category><![CDATA[giochi]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">https://allupo.wordpress.com/?p=588</guid>
		<description><![CDATA[Python Carl Friedrich Bolz (Microsoft Research) parla di PyPy e dei tracing JIT compilers. Ancora sul supporto a Python 3 in PyPI. Javascript Essential Javascript Design Patterns (libro scaricabile) – pattern di design in Javascript (Creational, Constructor, Singleton, Module, Revealing Module, Observer, Prototype, Command, DRY, Facade, Factory, Mixin,Decorator) e jQuery (Lazy Initialization, Composite, Wrapper, Facade, Observer, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=588&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Python</strong></p>
<ul>
<li>Carl Friedrich Bolz (Microsoft Research) parla <a href="http://research.microsoft.com/apps/video/dl.aspx?id=144687">di PyPy e dei tracing JIT compilers</a>.</li>
<li>Ancora sul supporto a <a href="http://sayspy.blogspot.com/2011/03/secret-site-goes-live-python-3-support.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+CoderWhoSaysPy+%28Coder+Who+Says+Py%29">Python 3 in PyPI</a>.</li>
</ul>
<p><strong>Javascript</strong></p>
<ul>
<li><a href="http://addyosmani.com/blog/essentialjsdesignpatternsupdate1/">Essential Javascript Design Patterns</a> (libro scaricabile) – pattern di design in Javascript (Creational, Constructor, Singleton, Module, Revealing Module, Observer, Prototype, Command, DRY, Facade, Factory, Mixin,Decorator) e jQuery (Lazy Initialization, Composite, Wrapper, Facade, Observer, Iterator, Strategy, Proxy, Builder, Prototype, Flyweight).</li>
<li><a href="http://easywebsocket.org/">Easy WebSocket</a>.</li>
<li>AppCelerant introduce <a href="http://www.appcelerant.com/introducing-titaniumplus-the-cloud-starts-here.html">Titanium+Plus</a>.</li>
<li>IDE/Code Editors nel browser: <a href="http://ace.ajax.org/">ACE</a>, <a href="http://cloud9ide.com/">Cloud9</a>, <a href="http://wiki.eclipse.org/Orion">Eclipse Orion</a>, <a href="https://chrome.google.com/webstore/detail/iieeldjdihkpoapgipfkeoddjckopgjg">SourceKit</a>, <a href="http://endofline.wordpress.com/2011/01/25/3-browser-based-editors-to-watch/">CodeMirror</a>.</li>
<li><a href="https://github.com/kig/JSARToolKit">Javascript Augmented Reality Toolkit</a>.</li>
</ul>
<p><strong>Analisi dei dati</strong></p>
<ul>
<li><a href="http://www.indiana.edu/~kruschke/AnOpenLetter.htm">Analisi dei dati bayesiana</a> contro il test dell&#8217;ipotesi nulla nel metodo scientifico moderno.</li>
<li><a href="http://via.pulsene.ws/13YlK">Video sorveglianza intelligente</a> – un trend in crescita, la riduzione dei costi dell&#8217;hardware attraverso il ricorso a software più intelligente.</li>
</ul>
<p><strong>Giochi e mondi virtuali</strong></p>
<ul>
<li><a href="http://www.raphkoster.com/wp-content/uploads/2011/02/Koster_Social_Social-mechanics_GDC2011.pdf">Social Mechanics</a> in Games (vedi anche <a href="http://www.wonderlandblog.com/wonderland/2011/03/raphs-40-social-mechanics-for-social-games.html">questo</a>).</li>
<li><a href="http://www.neptune3d.net/screenshots.html">Neptune 3D</a> – rendering foto-realistico, in real-time, di scene naturali complesse con milioni di fili d&#8217;erba e alberi illuminati realisticamente. (Interessanti anche le altre pubblicazioni di <a href="http://www.kevinboulanger.net/research.html">Kévin Boulanger</a>).</li>
</ul>
<p><strong>Miscellanea</strong></p>
<ul>
<li><a href="http://convergenceculture.org/research/c3-piracy_future_television-full.pdf">Piracy is the Future of Television</a> – lo dice il MIT.</li>
<li><a href="http://informatico-migratore.blogspot.com/2011/02/un-anno-londra-le-mie-impressioni.html">Un anno da informatico a Londra</a> – quasi rimpiango di non esserci andato nel 2008 come avevo in programma di fare.</li>
<li><a href="http://www.johndcook.com/blog/2011/03/02/psychological-encapsulation/">Psicologia ed incapsulamento</a> nel design del software.</li>
<li><a href="http://omniti.com/seeds/from-making-software-to-running-saas">On the Engineering of SaaS</a> – come cambiano le pratiche dell&#8217;ingegneria con il cloud computing. Molto interessante.</li>
<li><a href="http://www.macworld.com/article/158234/2011/03/ssdfirmware.html#lsrc.rss_news">SSD e analisi forense</a>.</li>
<li><a href="http://en.wikipedia.org/wiki/List_of_open_source_healthcare_software">Software open source per la sanità</a>.</li>
</ul>
<br />Filed under: <a href='http://blog.lupi-software.com/category/everything-else/'>Everything else</a> Tagged: <a href='http://blog.lupi-software.com/tag/analisi-dei-dati/'>analisi dei dati</a>, <a href='http://blog.lupi-software.com/tag/giochi/'>giochi</a>, <a href='http://blog.lupi-software.com/tag/javascript-2/'>javascript</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/588/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/588/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/588/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=588&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2011/03/07/i-link-della-settimana-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>I link della settimana</title>
		<link>http://blog.lupi-software.com/2011/03/02/i-links-della-settimana-3/</link>
		<comments>http://blog.lupi-software.com/2011/03/02/i-links-della-settimana-3/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 12:29:36 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[algoritmi]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[open-data]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[simulazione]]></category>

		<guid isPermaLink="false">https://allupo.wordpress.com/?p=579</guid>
		<description><![CDATA[Best Quote Il mondo è un posto pericoloso, non a causa di chi compie azioni malvagie ma per quelli che osservano senza dire nulla. Albert Einstein Privacy BlackHat Europe 2010 - Changing Threats To Privacy From TIA to Google. L&#8217;insistenza di Facebook che gli utenti usino il loro nome e cognome è problematica per gli attivisti [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=579&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Best Quote</strong></p>
<blockquote><p>Il mondo è un posto pericoloso, non a causa di chi compie azioni malvagie ma per quelli che osservano senza dire nulla.</p>
<p style="text-align:right;"><em>Albert Einstein</em></p>
</blockquote>
<p><strong>Privacy</strong></p>
<ul>
<li>BlackHat Europe 2010 - <a href="http://vimeo.com/11303353">Changing Threats To Privacy From TIA to Google</a>.</li>
<li><strong></strong><a href="http://blog.witness.org/2011/02/human-rights-video-privacy-and-visual-anonymity-in-the-facebook-age/">L&#8217;insistenza di Facebook che gli utenti usino il loro nome e cognome</a> è problematica per gli attivisti dei diritti umani che hanno bisogno di lavorare anonimamente, per sfuggire alle ritorsioni dei regimi oppressivi.</li>
<li><a href="http://www.lineaedp.it/articolo.php?aId=0000088858&amp;cId=29&amp;cpId=8&amp;n=Il+cloud+computing%3F+Illecito">Privacy e Cloud Computing</a> in Italia.</li>
</ul>
<p><strong>Python</strong></p>
<ul>
<li><a href="http://www.smewt.com/about.html">smewt</a> – un media manager semantico, scritto in Python e QT4.</li>
<li>EuroPython 2011 – <a href="http://ep2011.europython.eu/call-for-papers">Call for papers</a>.</li>
<li><a href="http://www.clips.ua.ac.be/pages/pattern">Pattern</a> – un package per catturare dati testuali (Google, Twitter, Wikipedia, Web spider &amp; parser), analizzarli (shallow parser, wordnet, n-gram search, similarità, latent semantic analysis) e visualizzazione di grafi.</li>
<li><a href="http://pypi.python.org/pypi/gpustats">Funzioni statistiche basate sulla GPU</a>.</li>
<li>Come <a href="http://www-cs-students.stanford.edu/~silver/gae.html">migrare via da Google App Engine</a>.</li>
<li><a href="http://farmdev.com/talks/unicode/">Unicode in Python</a>.</li>
</ul>
<p><strong>Sicurezza</strong></p>
<ul>
<li><a href="http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet">XSS Prevention Cheat Sheet</a>.</li>
<li><a href="http://www.pythonsecurity.org/">Python Security</a>.</li>
</ul>
<p><strong>Ruby</strong></p>
<ul>
<li><a href="http://merbist.com/2011/02/22/concurrency-in-ruby-explained/">Concorrenza in Ruby</a>.</li>
<li><a href="http://www.macruby.org/blog/2011/02/24/macruby09.html">MacRuby 0.9</a> è arrivato.</li>
</ul>
<p><strong>Web</strong></p>
<ul>
<li><a href="http://developers.whatwg.org/">Specifiche HTML5, Web Developer Edition</a> – senza tutte le informazioni che interessano solo chi scrive browsers.</li>
<li><a href="http://www.bryceboe.com/2011/02/21/using-stackoverflows-api-to-find-the-top-web-frameworks/">Top Web Frameworks</a>, usando l&#8217;API di StackOverflow.</li>
<li>Uno <a href="http://oreillynet.com/pub/e/1853">screencast sulla costruzione di applicazioni multi-device</a>, usando SproutCore 1.5.</li>
<li><a href="http://neyric.github.com/wireit/">WireIt</a> – una libreria per costruire editor di grafi in Javascript.</li>
</ul>
<p><strong>Varie</strong></p>
<ul>
<li><a href="http://fateoftheworld.net/">Fate of The World</a> – un gioco che simula l&#8217;impatto sociale e ambientale del cambiamento climatico nei prossimi 200 anni. Da un lato, è interessante l&#8217;uso del gioco come mezzo di comunicazione politica, dall&#8217;altro sono convinto che la simulazione prenderà sempre più campo per l&#8217;analisi ed anche la divulgazione di sistemi complessi.</li>
<li><a href="http://italianvalley.wired.it/blog/startup_cloud/torino-open-data-contest-sviluppare-idee-e-applicazioni-a-partire-dai-dataset-del-comune-di-torino.html">OpenData a Torino</a>.</li>
<li><a href="http://developer.amd.com/documentation/articles/pages/OpenCLOptimizationCaseStudySupportVectorMachineTraining.aspx">Ottimizzare codice OpenCL</a>, un caso di studio.</li>
<li><a href="https://github.com/karthick18/inception">Inception in C</a>.</li>
<li><a href="http://fosslc.org/drupal/content/everything-you-need-know-about-cryptography-1-hour">Tutto quello che dovresti sapere sulla crittografia</a>, in 1 ora.</li>
</ul>
<p><strong>Agile</strong></p>
<ul>
<li>Il movimento agile in Europa è ancora subalterno culturalmente rispetto a quello americano, sebbene per molti aspetti sia più avanti ed innovativo. E&#8217; ora di <a href="http://www.noop.nl/2011/02/agile-lean-europe-energize-the-network.html">organizzarsi meglio per avere un ruolo culturale più forte</a>.</li>
<li><a href="http://www.whattofix.com/blog/archives/2011/02/programmer-as-m.php">Una prospettiva interessante su TDD e BDD nelle startup</a>. Un&#8217;azienda non ancora affermata e strutturata, una startup, deve esplorare il mercato alla ricerca di una nicchia che può garantirti il successo e, quindi, massimizzare il profitto. In questo momento nell&#8217;evoluzione dell&#8217;azienda, le risorse sono limitate e la qualità del prodotto non è così importante quando il muoversi rapidamente nello spazio di prodotti/soluzioni per trovare il proprio posto. Il TDD/BDD potrebbe in questi casi essere deleterio, più che di aiuto.</li>
<li>Come <a href="http://loosecouplings.blogspot.com/2011/01/how-to-write-testable-code-overview.html">scrivere codice testabile</a> usando la <em>Dependency Injection</em>.</li>
<li><a href="http://programmers.stackexchange.com/questions/32618/solid-principles-vs-yagni#32626">SOLID vs. YAGNI</a>.</li>
<li><a href="http://www.dimecasts.net/Casts/ByTag/SOLID%20Principle">Screencasts su SOLID</a>.</li>
<li>Scrivere <a href="http://www.infoq.com/news/2011/02/writing-agile-contracts">contratti agili</a>.</li>
</ul>
<p><strong>Algoritmi</strong></p>
<ul>
<li>Come visualizzare il comportamento e quindi <a href="http://blog.ezyang.com/2010/11/dp-zoo-tour/">la complessità degli algoritmi di programmazione dinamica</a>.</li>
<li><a href="http://qwiki.stanford.edu/index.php/Complexity_Zoo">Complexity Zoo</a>.</li>
<li>Misurare l&#8217;<a href="http://www.johndcook.com/blog/2008/03/11/how-loud-is-the-evidence/">evidenza statistica in decibels</a>.</li>
<li><a href="http://harry.me/2011/02/17/neat-algorithms---flocking">Flocking</a>.</li>
</ul>
<p><strong>Libri</strong></p>
<ul>
<li><a href="http://szeliski.org/Book/">Computer Vision: Algorithms and Applications</a>.</li>
<li><a href="http://www.hackerbooks.com/">HackerBooks</a> – i libri citati da Stack Overflow ed Hacker News.</li>
<li>Scrivere <a href="http://the-reviews.appspot.com/article/on-writing-books-for-programmers">libri per programmatori</a>.</li>
</ul>
<br />Filed under: <a href='http://blog.lupi-software.com/category/everything-else/'>Everything else</a> Tagged: <a href='http://blog.lupi-software.com/tag/agile-2/'>agile</a>, <a href='http://blog.lupi-software.com/tag/algoritmi/'>algoritmi</a>, <a href='http://blog.lupi-software.com/tag/ebooks/'>ebooks</a>, <a href='http://blog.lupi-software.com/tag/open-data/'>open-data</a>, <a href='http://blog.lupi-software.com/tag/privacy/'>privacy</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a>, <a href='http://blog.lupi-software.com/tag/ruby/'>ruby</a>, <a href='http://blog.lupi-software.com/tag/security/'>security</a>, <a href='http://blog.lupi-software.com/tag/simulazione/'>simulazione</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/579/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/579/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/579/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=579&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2011/03/02/i-links-della-settimana-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>I link della settimana</title>
		<link>http://blog.lupi-software.com/2011/02/20/i-links-della-settimana-2/</link>
		<comments>http://blog.lupi-software.com/2011/02/20/i-links-della-settimana-2/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 14:37:44 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[big-data]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[papers]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">https://allupo.wordpress.com/?p=577</guid>
		<description><![CDATA[Best Quote &#8220;We need tools that can help people have their idea faster&#8221; – Aditi Muralidharan Python profilestats è un decoratore per la profilazione a livello di singola funzione, supporta kcachegrind (tool di visualizzazione). pystatsd – un client per Graphite, un server di cattura e graficazione delle statistiche. In Febbraio, Python è salito al 4° posto [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=577&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Best Quote</strong></p>
<ul>
<li>&#8220;<a href="http://radar.oreilly.com/2011/02/aditi-muralidharan-wordseer.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+oreilly%2Fradar%2Fatom+%28O%27Reilly+Radar%29">We need tools that can help people have their idea faster</a>&#8221; – Aditi Muralidharan</li>
</ul>
<p><strong>Python</strong></p>
<ul>
<li><a href="http://pypi.python.org/pypi/profilestats">profilestats</a> è un decoratore per la profilazione a livello di singola funzione, supporta <a href="http://kcachegrind.sourceforge.net/html/Home.html">kcachegrind</a> (tool di visualizzazione).</li>
<li><a href="http://pypi.python.org/pypi/pystatsd">pystatsd</a> – un client per Graphite, un server di cattura e graficazione delle statistiche.</li>
<li>In Febbraio, Python è salito al <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">4° posto nel TIOBE</a>, l&#8217;indice di popolarità dei linguaggi di programmazione. Prima ci sono solo Java, C e C++. Sarà ora di <a href="http://martin.kleppmann.com/2009/09/18/the-python-paradox-is-now-the-scala-paradox.html">buttarsi su Scala</a>?</li>
<li><a href="http://pypi.python.org/pypi/pytools">pytools</a> raccoglie cose che mancano nella Python standard library, ma (secondo gli autori) dovrebbero esserci.</li>
<li><a href="http://pypi.python.org/pypi/Cirrus">Cirrus</a> costruisce un&#8217;infrastruttura AWS da un file di configurazione yaml.</li>
<li>Portare il codice <a href="http://docs.python.org/dev/howto/pyporting.html">da Python 2 a Python 3</a>.</li>
<li><a href="http://pypi.python.org/pypi/csc-utils">csc-utils</a> – utilities dal progetto <a href="http://csc.media.mit.edu/divisi">Commonsense Computing</a> del MIT. Molto interessanti.</li>
<li><a href="http://pypi.python.org/pypi/fusil">Fusil</a> – una libreria per il fuzzing.</li>
<li><a href="http://pypi.python.org/pypi/picalo">picalo</a> – analisi dei dati e data mining.</li>
</ul>
<p><strong>Javascript</strong></p>
<ul>
<li><a href="http://www.sitepen.com/blog/2011/02/14/asynchronous-modules-come-to-dojo-1-6/">Dojo 1.6</a> supporterà il caricamento asincrono dei moduli, usando lo standard AMD (vedi <a href="http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition">CommonJS AMD API</a>) comune a <a href="http://requirejs.org/">RequireJS</a>, <a href="http://www.sitepen.com/blog/2010/09/15/nodules-better-modulepackage-handling-for-node-js/">Nodules</a> (i.e. <a href="http://www.sitepen.com/blog/2010/09/15/nodules-better-modulepackage-handling-for-node-js/">Node.JS</a>) e <a href="http://bdframework.org/docs/loader/loader.html">Backdraft</a>. La nuova versione di Dojo supporterà il vecchio sistema di caricamento dei moduli per compatibilità all&#8217;indietro, ma il futuro richiederà l&#8217;adozione del nuovo standard.ù</li>
<li><a href="http://mtrpcic.net/2011/02/fragment-uris-theyre-not-as-bad-as-you-think-really/">Rivalutare il ruolo degli hash negli URL</a>.</li>
<li>Bookmarklet ed infrastruttura per <a href="http://www.stevesouders.com/blog/2011/02/16/jdrop-json-in-the-cloud/">la profilazione delle pagine nei browser mobili</a>.</li>
</ul>
<p><strong>Data</strong></p>
<ul>
<li>Keynotes e talks dalla <a href="http://flowingdata.com/2011/02/09/data-talks-and-keynotes-from-oreilly-strata-conference/">O&#8217;Reilly Strata Conference</a> (<a href="http://www.youtube.com/user/OreillyMedia">YouTube</a>).</li>
<li><a href="http://mygengo.com/talk/blog/why-your-startup-needs-a-visual-dashboard/">Why Your Startup Needs a Visual Dashboard</a> – Una retrospettiva interessante sui metodi di misura e di management</li>
<li>Una barca di papers interessanti presentati da <a href="http://googleresearch.blogspot.com/2011/01/google-at-nips-2010.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+blogspot%2FgJZg+%28Official+Google+Research+Blog%29">Google al NIPS 2010</a>. (<a href="http://googleresearch.blogspot.com/2011/01/more-google-contributions-to-broader.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+blogspot%2FgJZg+%28Official+Google+Research+Blog%29">Altri papers di Google</a>, giusto per gradire)</li>
</ul>
<p><strong>Algoritmi</strong></p>
<ul>
<li><a href="http://www.toao.com/posts/finding-similar-items-key-store-minhashing.html">minhasing</a> – un metodo per cercare cose simili in un database o, più in generale, una metrica per calcolare la distanza fra insiemi di attributi. A prima vista, mi sembra che si potrebbero usare tecniche analoghe ai bloom filters per impiegarla in database distribuiti.</li>
</ul>
<p><strong>Miscellanea</strong></p>
<ul>
<li><a href="http://nerdfort.com/">Nerd Fort</a> – coworking nella San Fernando Valley, Southern California. Non abbiamo sufficiente concentrazione di lavoratori tecnologici qui in Italia? Sarebbe bello avere posti del genere. Si potrebbe anche sposare bene con il turismo. (In ogni caso, mi piace il loro modo di fare comunicazione.)</li>
<li><a href="http://blog.yobongo.com/post/3294786878/designing-the-yobongo-icon">Design di un&#8217;icona</a>.</li>
<li><a href="http://blog.martinfjordvald.com/2010/09/12000-requests-per-second-with-nginx-php-and-memcached/">12000 richieste/secondo</a> con Nginix, PHP e Memcached.</li>
<li>Una <a href="http://jonathanischwartz.wordpress.com/2010/03/09/good-artists-copy-great-artists-steal/">istruttiva storia di brevetti</a>.</li>
<li>Lo <a href="http://blog.vivekhaldar.com/post/3339907908">stile cognitivo di Unix</a>. Interessante, mi ha fatto venir voglia di scrivere un tool per l&#8217;interrogazione di man in linguaggio naturale: un po&#8217; come la nuova versione di Mathematica.</li>
<li>La <a href="http://www.schneier.com/blog/archives/2011/02/romanian_hacker.html">città del cybercrimine</a> in Romania.</li>
</ul>
<p><strong>Ebooks</strong></p>
<ul>
<li><strong>Marsilio editore</strong> vende i propri <a href="http://www.bookrepublic.it/narratives/marsilio/">libri elettronici a 4,99 euro</a>. Peccato usi Adobe DRM. (via <a href="http://www.mantellini.it/?p=11551&amp;utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+mantellini%2Ffeed+%28manteblog%29">manteblog</a>)</li>
<li>Una raccolta di <a href="http://www.teleread.com/paul-biba/weekly-links-on-mobile-ebooks-self-publishing-by-piotr-kowalczyk/?utm_source=twitterfeed&amp;utm_medium=twitter">links sugli ebooks ed il self-publishing</a> (via <a href="https://twitter.com/TomBolini">@TomBolini</a>)</li>
</ul>
<br />Filed under: <a href='http://blog.lupi-software.com/category/everything-else/'>Everything else</a> Tagged: <a href='http://blog.lupi-software.com/tag/big-data/'>big-data</a>, <a href='http://blog.lupi-software.com/tag/ebooks/'>ebooks</a>, <a href='http://blog.lupi-software.com/tag/javascript-2/'>javascript</a>, <a href='http://blog.lupi-software.com/tag/papers/'>papers</a>, <a href='http://blog.lupi-software.com/tag/profiling/'>profiling</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/577/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=577&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2011/02/20/i-links-della-settimana-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>I link della settimana</title>
		<link>http://blog.lupi-software.com/2011/02/13/i-links-della-settimana/</link>
		<comments>http://blog.lupi-software.com/2011/02/13/i-links-della-settimana/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 17:02:01 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[codemotion2011]]></category>
		<category><![CDATA[educazione]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">https://allupo.wordpress.com/?p=535</guid>
		<description><![CDATA[Best Quote @caludio: &#8220;Undocumented and overengineered code have the same evil root &#8220; Python Read the docs – un servizio che raccoglie documentazione in reStructuredText (un formato popolare nel mondo Python), rendendola facilmente cercabile. Si integra con Mercurial, Git, Subversion e Bazaar per aggiornare la documentazione al commit. dana – Distributed (Asynchronous) Numerical Adaptive computing framework. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=535&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Best Quote</strong></p>
<ul>
<li><a href="https://twitter.com/caludio">@caludio</a>: &#8220;Undocumented and overengineered code have the same evil root <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> &#8220;</li>
</ul>
<p><strong>Python</strong></p>
<ul>
<li><a href="http://readthedocs.org/">Read the docs</a> – un servizio che raccoglie documentazione in reStructuredText (un formato popolare nel mondo Python), rendendola facilmente cercabile. Si integra con Mercurial, Git, Subversion e Bazaar per aggiornare la documentazione al commit.</li>
<li><a href="http://pypi.python.org/pypi/dana/0.3.3">dana</a> – <em>Distributed (Asynchronous) Numerical Adaptive computing framework</em>. Un framework, basato su numpy e scipy, per costruire simulazioni numeriche distribuite. Le applicazioni princinpali sono nel campo delle neuroscienze computazionali e nelle reti neurali artificiali.</li>
<li><a href="http://pypi.python.org/pypi/ladon/0.2.1">ladon</a> – uno framework per rendere metodi python accessibili in vari protocolli, più che altro orientati al web. Può essere utile per implementare web services multiprotocollo.</li>
<li><a href="http://python3wos.appspot.com/">Python 3 Wall of Shame</a> – lista di progetti da PyPy che supportano o meno la nuova versione del linguaggio. I creatori di Python hanno una roadmap che prevede l&#8217;adozione della nuova versione in cinque anni, ora siamo a metà. Non siamo messi male come appare da questa pagina. Molti progetti, come ad esempio Django, supporteranno Python 3 già dai prossimi rilasci previsti quest&#8217;anno.</li>
<li><a href="http://pypi.python.org/pypi/flake8/0.5">flake8</a> – Pyflakes + pep8 insieme. Un <em>code checker</em> per python.</li>
<li><a href="http://pypi.python.org/pypi/zfec/1.4.19">zfec</a> – <em>erasure codec</em> in Python, Haskell e C. Può servire in tutti i casi in cui si vuole costruire un sistema ridondante, come il RAID-5, che sia in grado di resistere alla perdita di parte dei dati.</li>
</ul>
<p><strong>Agile</strong></p>
<ul>
<li>Riflessioni su <a href="http://blog.mountaingoatsoftware.com/reflections-on-the-10-years-since-the-agile-manifesto">10 anni di agile</a>. Si spera che si supereranno le etichette ed i particolarismi, inglobando l&#8217;agile nella disciplina informatica fino a smetterne di parlarne un po&#8217; come è successo con la programmazione ad oggetti. Non più come una cosa esotica, ma come humus su cui far crescere qualcosa di nuovo.</li>
</ul>
<p><strong>Javascript</strong></p>
<ul>
<li><a href="http://www.sencha.com/blog/ext-js-4-anatomy-of-a-model/">Anatomia dei Modelli</a> in Ext JS 4.</li>
</ul>
<p><strong>Conferenze e Talks</strong></p>
<ul>
<li>Voglio assistere a <a href="http://nerdiario.it/rest-in-peace-al-codemotion-2011">REST in peace</a> al <a href="http://www.codemotion.it/programma-talks">Codemotion 2011</a>. La <a href="http://www.codemotion.it/programma-talks">conferenza si annuncia enorme</a>, con sei tracks contemporanee. Sarebbe stato meglio spezzarla in più giorni.</li>
<li>(auto-promozione) Il 16 febbraio, farò una breve introduzione a GIT, alle 19:00 in MedMedia, via Salvemini 4, Jesi (AN). E&#8217; un evento dell&#8217;XPUG marche, ma l&#8217;ingresso è libero.</li>
</ul>
<p><strong>NoSQL</strong></p>
<ul>
<li><a href="http://www.readwriteweb.com/cloud/2011/02/nosql-consolidation-couchone-a.php?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+readwriteweb+%28ReadWriteWeb%29">CouchOne e Membase si fondono</a>. Sono rispettivamente lo sponsor di <a href="http://couchdb.apache.org/">CouchDB</a> e quello di <a href="http://www.memcached.org/">Memcached</a>. Non sapevo che esistesse Mobile Couchbase per iOS, ne potrei far proprio buon uso.</li>
<li><a href="http://www.readwriteweb.com/cloud/2011/02/how-3-companies-are-using-nosq.php?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+readwriteweb+%28ReadWriteWeb%29">Tre modi diversi</a> di usare <a href="http://www.basho.com/products_riak_overview.php">Riak</a>, un database NoSQL.</li>
<li>Google rilascia un paper su <a href="http://perspectives.mvdirona.com/2011/01/09/GoogleMegastoreTheDataEngineBehindGAE.aspx">Megastore</a>, il database di AppEngine. Analisi interessanti <a href="http://perspectives.mvdirona.com/2011/01/09/GoogleMegastoreTheDataEngineBehindGAE.aspx">qui</a> e <a href="http://highscalability.com/blog/2011/1/11/google-megastore-3-billion-writes-and-20-billion-read-transa.html">qui</a>. Interessante l&#8217;uso di un algoritmo basato su <a href="http://en.wikipedia.org/wiki/Paxos_algorithm">Paxos</a> per il raggiungimento del consenso ed il fatto che possa essere configurato in modo più o meno affidabile, un po&#8217; come si può fare anche con <a href="http://en.wikipedia.org/wiki/Apache_Cassandra#Tunable_consistency">Cassandra</a>.</li>
<li>Quando usare NoSQL? Qualcuno sta compilando una <a href="http://www.readwriteweb.com/hack/2011/02/the-big-list-of-nosql-use-case.php?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+readwriteweb+%28ReadWriteWeb%29">lista di casi d&#8217;uso</a>.</li>
</ul>
<p><strong>Altro</strong></p>
<ul>
<li><a href="http://www.silicon.com/technology/software/2011/02/08/augmented-reality-machine-learning-and-the-cleric-39746937/">Augmented Reality + Machine Learning</a>. Applicazione interessante.</li>
<li>La Cina sta costruendo una <a href="http://www.computerworld.com/s/article/9208398/China_building_a_city_for_cloud_computing">città per il cloud computing</a>. Ad una conferenza sui mondi virtuali nel 2007 a cui ho partecipato, un rappresentante del governo cinese aveva annunciato la creazione di una città per i mondi virtuali. Non so che fine ha fatto&#8230; forse le riciclano in base alla moda del momento.
<p>Queste iniziative un effetto della bolla speculativa nel settore immobiliare in atto da anni in Cina – sul mattone si concentrano la mentalità da piano quinquennale del partito unico, la sua propensione per la grandiosità e tanti palazzinari con ottimi contatti con le gerarchie di partito.</li>
<li><a href="http://madebyloren.com/posts/13">4-Hour Profitable Project: Viral Marketing Explained</a>.</li>
<li>Un <a href="http://www.readwriteweb.com/hack/2011/02/generate-a-resume-your-github.php?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+readwriteweb+%28ReadWriteWeb%29">generatore di curriculum vitae da github</a>.</li>
<li><a href="http://blog.makezine.com/archive/2011/02/why-the-arduino-won-and-why-its-here-to-stay.html">Perché Arduino ha vinto</a>? Un bel progetto nato in Italia.</li>
</ul>
<p><strong>Educazione</strong></p>
<ul>
<li>Una società prevede <a href="http://ht.ly/3T1Zj">l&#8217;esplosione dei corsi online</a> per il 2015: &#8220;<em>The number of college students taking online college courses will equal the number of students who attend classes in a traditional classroom by 2015</em>&#8220;. Altri dicono che non sarà così e si raggiungerà un plateau.</li>
<li><a href="http://www.educause.edu/Resources/2011HorizonReport/223122">Trends che influenzeranno i prossimi anni</a> (<a href="http://net.educause.edu/ir/library/pdf/HR2011.pdf">report PDF</a>): ebooks e mobile (entro un anno), augmented reality e game-based learning (2-3 anni), gesture-based computing, learning analytics (4-5 anni). Vale per la situazione USA, speriamo non dover aspettare troppo qui da noi.</li>
<li>Come <a href="http://www.bitesizeirishgaelic.com/blog/self-learning-non-widespread-languages/">imparare una nuova lingua rapidamente</a>.</li>
<li>Un indice di <a href="http://lecturefox.com/computerscience/">lezioni universitarie d&#8217;informatica</a> disponibili online.</li>
</ul>
<br />Filed under: <a href='http://blog.lupi-software.com/category/everything-else/'>Everything else</a> Tagged: <a href='http://blog.lupi-software.com/tag/agile-2/'>agile</a>, <a href='http://blog.lupi-software.com/tag/codemotion2011/'>codemotion2011</a>, <a href='http://blog.lupi-software.com/tag/educazione/'>educazione</a>, <a href='http://blog.lupi-software.com/tag/links/'>links</a>, <a href='http://blog.lupi-software.com/tag/nosql/'>nosql</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/535/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=535&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2011/02/13/i-links-della-settimana/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>Monadi e Python</title>
		<link>http://blog.lupi-software.com/2010/07/18/monadi-e-python/</link>
		<comments>http://blog.lupi-software.com/2010/07/18/monadi-e-python/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 07:50:50 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[code generation]]></category>
		<category><![CDATA[monads]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.lupi-software.com/?p=424</guid>
		<description><![CDATA[Sul sito di GenroPy, stiamo discutendo della programmazione ad eventi e della programmazione asincrona. Non abbiamo ancora identificato la tecnica migliore per scrivere il codice. Con un po&#8217; di fantasia, potremmo scrivere così: Per chiarezza, togliamo un po&#8217; di magia dal parametro action: Può sembrare che stia piegando la sintassi di Python per i miei [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=424&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sul sito di GenroPy, <a href="http://blog.genropy.org/2010/07/16/a-design-flaw-in-genropy-and-how-to-correct-it/">stiamo</a> <a href="http://blog.genropy.org/2010/07/17/thats-the-power-of-form-2/">discutendo</a> della programmazione ad eventi e della programmazione asincrona. Non abbiamo ancora identificato la tecnica migliore per scrivere il codice.</p>
<p>Con un po&#8217; di fantasia, potremmo scrivere così:</p>
<p><pre class="brush: python;">
def tbDetail(self, parent, **kwargs):
    tb = parent.toolbar(**kwargs)
    tb.button('New Detail', action=fire('master.save')|fire('detail.record.pkey'))
</pre></p>
<p>Per chiarezza, togliamo un po&#8217; di magia dal parametro <em>action</em>:</p>
<p><pre class="brush: python;">
def tbDetail(self, parent, **kwargs):
    tb = parent.toolbar(**kwargs)
    tb.button('New Detail', action=self.onNewDetail)

def onNewDetail(self, do):
    do | fire('master.save') | fire('detail.record.pkey')
</pre></p>
<p>Può sembrare che stia piegando la sintassi di Python per i miei torbidi scopi, in realtà sto facendo ricorso ad un ben noto strumento della programmazione funzionale. In particolare, la struttura dati che viene passata a onNewDetail è una <a href="http://en.wikipedia.org/wiki/Monad_(functional_programming)">monade</a>.</p>
<p>Si possono scrivere funzioni di ordine superiore, per combinare insieme computazioni e fornire strutture di controllo:</p>
<p><pre class="brush: python;">
def onNewDetail(self, do):
    do | unless(get('master.saved'), fire('master.save')) | fire('detail.record.pkey')
</pre></p>
<p>L&#8217;operatore <code>|</code> (bind) modifica la monade (inizialmente vuota, passata nel parametro <code>do</code>), applicando la funzione che lo segue.</p>
<p>Qui uso le monadi a due livelli:</p>
<ul>
<li>nel codice Python, per costruire una semplice AST e generare codice Javascript.</li>
<li>nel codice Javascript che verrà generato, per implementare la programmazione asincrona sotto forma di <a href="http://en.wikipedia.org/wiki/Monad_(functional_programming)#Continuation_monad">continuation monad</a> basata sulle <a href="http://www.sitepen.com/blog/2010/05/03/robust-promises-with-dojo-deferred-1-5/">Promise</a> di Dojo 1.5.</li>
</ul>
<br />Filed under: <a href='http://blog.lupi-software.com/category/featured-categories/programming/'>Programming</a> Tagged: <a href='http://blog.lupi-software.com/tag/async/'>async</a>, <a href='http://blog.lupi-software.com/tag/code-generation/'>code generation</a>, <a href='http://blog.lupi-software.com/tag/monads/'>monads</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/424/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=424&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2010/07/18/monadi-e-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>Perle di Python: operatore ternario</title>
		<link>http://blog.lupi-software.com/2010/07/15/perle-di-python-operatore-ternario/</link>
		<comments>http://blog.lupi-software.com/2010/07/15/perle-di-python-operatore-ternario/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 03:52:40 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.lupi-software.com/?p=421</guid>
		<description><![CDATA[Un tempo, si usava simulare in Python l&#8217;operatore ternario ?:&#160;del C o del Javascript in questo modo: Usavo molto spesso quest&#8217;idioma al tempo di Zope 2.7 e Python 2.3, che ho ancora in produzione in un paio di clienti. Dal Python 2.5, non è più necessario, il linguaggio ha un suo operatore ternario: Filed under: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=421&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Un tempo, si usava simulare in Python l&#8217;operatore ternario <code>?:</code>&nbsp;del C o del Javascript in questo modo:</p>
<p><pre class="brush: python;">
result = test and TrueValue or FalseValue
</pre></p>
<p>Usavo molto spesso quest&#8217;idioma al tempo di Zope 2.7 e Python 2.3, che ho ancora in produzione in un paio di clienti. Dal Python 2.5, non è più necessario, il linguaggio ha un suo operatore ternario:</p>
<p><pre class="brush: python;">
result = TrueValue if test else FalseValue
</pre></p>
<br />Filed under: <a href='http://blog.lupi-software.com/category/featured-categories/programming/'>Programming</a> Tagged: <a href='http://blog.lupi-software.com/tag/python/'>Python</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=421&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2010/07/15/perle-di-python-operatore-ternario/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
		<item>
		<title>Layers</title>
		<link>http://blog.lupi-software.com/2010/07/13/layers/</link>
		<comments>http://blog.lupi-software.com/2010/07/13/layers/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 05:32:04 +0000</pubDate>
		<dc:creator>Roberto Lupi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[layers]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[vfs]]></category>

		<guid isPermaLink="false">http://blog.lupi-software.com/?p=417</guid>
		<description><![CDATA[Ho scritto una libreria python per sovrapporre più directory in un filesystem virtuale, si chiama Layers e lo trovate su http://github.com/robertolupi/layers. Le regole (ricette) con cui le varie versioni di un file (ingredienti) vengono mescolate insieme sono personalizzabili. Un esempio: costruiamo un VFS partendo da quattro directory, di cui le prime due montate alla radice [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=417&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ho scritto una libreria python per sovrapporre più directory in un filesystem virtuale, si chiama <strong>Layers</strong> e lo trovate su <a href="http://github.com/robertolupi/layers">http://github.com/robertolupi/layers</a>. Le regole (ricette) con cui le varie versioni di un file (ingredienti) vengono mescolate insieme sono personalizzabili.</p>
<p><strong>Un esempio</strong>: costruiamo un VFS partendo da quattro directory, di cui le prime due montate alla radice del VFS mentre le ultime due montate in due distinte sottodirectory. Specifichiamo poi la ricetta per mescolare i files <code>.txt</code>:</p>
<p><pre class="brush: python;">
from layers import VirtualFileSystem, concatenate_files

vfs = VirtualFileSystem()
vfs.add_layer('layer1')
vfs.add_layer('layer2')
vfs.add_layer('layer3_sub','sub')
vfs.add_layer('layer4_urka','urka')
vfs.set_recipe('.txt', concatenate_files)

fd = vfs.open_file('foo.txt','r')
</pre></p>
<p>Nel&#8217;esempio ho usato una ricetta predefinita, ma costruirne di proprie è facilissimo. Ecco l&#8217;implementazione di <code>concatenate_files</code>:</p>
<p><pre class="brush: python;">
def concatenate_files(alternatives, mode=None, *args, **kwargs):
    &quot;&quot;&quot;Concatenate files from the lowest to the higher layer in order.
    &quot;&quot;&quot;
    return fileinput.input(alternatives, mode=mode, *args, **kwargs)
</pre></p>
<p>La parte più interessante però non è il filesystem virtuale, ma <strong>la possibilità di montare un VFS come package Python</strong>. Layers si occupa di mixare opportunamente funzioni, classi e metodi.</p>
<p>Se <code>layer1/foo.py</code> contiene questo codice:</p>
<p><pre class="brush: python;">
class Foo(object):
    def method1(self):
        return 'layer1'
    def method2(self):
        return 'layer1'
</pre></p>
<p>Mentre <code>layer2/foo.py</code> contiene quest&#8217;altro codice:</p>
<p><pre class="brush: python;">
class Foo(object):
    def method1(self):
        return 'layer2'
</pre></p>
<p>Allora posso posso scrivere questo:</p>
<p><pre class="brush: python;">
from layers import LayeredPackage
lp = LayeredPackage('testpkg')
lp.add_layer('layer1')
lp.add_layer('layer2')
lp.install()

from testpkg import foo
f = foo.Foo()
print f.method1() # scrive layer2
print f.method2() # scrive layer1
</pre></p>
<p>In pratica, la classe <code>Foo</code> in <code>foo.py</code> del package virtuale <code>testpkg</code> si comporta come se fosse scritta così:</p>
<p><pre class="brush: python;">
class Foo(object):
    def method1(self):
        return 'layer2'
    def method2(self):
        return 'layer1'
</pre></p>
<p>L&#8217;implementazione usa l&#8217;ereditarietà multipla, costruendo a run-time una nuova classe. L&#8217;implementazione reale di <code>Foo</code> è più o meno questa:</p>
<p><pre class="brush: python;">
class Layer1Foo(object):
    def method1(self):
        return 'layer1'
    def method2(self):
        return 'layer1'

class Layer2Foo(object):
    def method1(self):
        return 'layer2'

class FinalFoo(Layer2Foo,Layer1Foo):
    pass
</pre></p>
<p>Quindi in <code>layer2/foo.py</code> posso anche usare <code>super(Foo, self).method1()</code> per chiamare l&#8217;implementazione di <code>method1()</code> del layer precedente.</p>
<p>A cosa serve Layers? Per ora a poco, il codice non è maturo (manca il supporto ai packages, può mixare solo i moduli). È nato come esperimento per replicare la semantica dei mixin di GenroPy, semplificandone l&#8217;implementazione.</p>
<p>In potenza, Layers (o i mixin di GenroPy) possono essere usati laddove i linguaggi statici usano IoC containers: quindi ovunque ci sia necessità di specializzare il codice per un particolare ambiente (es. per la personalizzazione durante l&#8217;installazione presso un dato cliente, durante i test per iniettare metodi e classi di Mockup, etc.).</p>
<p>Per ora, lo userò per imparare setuptools/Distribute e magari per dare un&#8217;occhiata a FUSE.</p>
<br />Filed under: <a href='http://blog.lupi-software.com/category/featured-categories/programming/'>Programming</a> Tagged: <a href='http://blog.lupi-software.com/tag/ioc/'>ioc</a>, <a href='http://blog.lupi-software.com/tag/layers/'>layers</a>, <a href='http://blog.lupi-software.com/tag/python/'>Python</a>, <a href='http://blog.lupi-software.com/tag/vfs/'>vfs</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allupo.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allupo.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allupo.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allupo.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/allupo.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/allupo.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/allupo.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/allupo.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allupo.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allupo.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allupo.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allupo.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allupo.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allupo.wordpress.com/417/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.lupi-software.com&amp;blog=5339219&amp;post=417&amp;subd=allupo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.lupi-software.com/2010/07/13/layers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/78e13892b6611a140af58dbff95eeaea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kitten Lulu</media:title>
		</media:content>
	</item>
	</channel>
</rss>
