<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.ventanazul.com/webzine"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Ventanazul</title>
 <link>http://www.ventanazul.com/webzine</link>
 <description>Ventanazul es un webzine para desarrolladores web publicado por Alexis Bellido.

Puedes contactarme aquí y encontrarme en Facebook Twitter y LinkedIn.</description>
 <language>es</language>
<item>
 <title>The Django gunicorn fabfile project</title>
 <link>http://www.ventanazul.com/webzine/node/177</link>
 <description>&lt;p&gt;Since I read about Green Unicorn, better known as &lt;a href=&quot;http://gunicorn.org/&quot;&gt;gunicorn&lt;/a&gt;, a Python WSGI HTTP server that goes along very well with Django, I knew I had to try it, and trying it I did. And I liked it. There were many steps to make a server work but overall it was cleaner than other approaches, including the &lt;a href=&quot;http://www.ventanazul.com/webzine/tutorials/django-deployment-guide-ubuntu&quot;&gt;Django deployment using Nginx, Apache and mod_wsgi&lt;/a&gt; that I described long time ago. And many reports indicate that a Django setup with gunicorn performs better than one using Apache.&lt;/p&gt;
&lt;p&gt;But when you have to setup many servers with the same configuration, the process gets boring and repetitive, and when you&#039;re bored you make mistakes. This is the perfect scenario for automating with Python and a &lt;a href=&quot;http://fabfile.org/&quot;&gt;Fabric&lt;/a&gt; script.&lt;/p&gt;
&lt;p&gt;I wanted the initial version of my fabfile to do the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start with a clean install of Ubuntu 11.10, just with an openssh-server running.&lt;/li&gt;
&lt;li&gt;Install all the Ubuntu packages needed for running a basic Django site, these include Nginx, virtualenv, some Python development tools, and PostgreSQL.&lt;/li&gt;
&lt;li&gt;Create virtual environments and manage them with virtualenvwrapper.&lt;/li&gt;
&lt;li&gt;Install a few Python packages in the virtual environments: Django, gunicorn, iptyhon, psycopg2, to name a few.&lt;/li&gt;
&lt;li&gt;Create the configuration files to manage both staging and production sites with upstart.&lt;/li&gt;
&lt;li&gt;Grab the code for a Django project from a git repository.&lt;/li&gt;
&lt;li&gt;Keep the project&#039;s specific settings.py outside of version control.&lt;/li&gt;
&lt;li&gt;Make everything work with just one or two commands from the shell.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And that&#039;s what the first version of this fabfile is doing. I don&#039;t have the time to explain all the details of the setup, Senko does a good job with his &lt;a href=&quot;http://senko.net/en/django-nginx-gunicorn/&quot;&gt;Django setup using Nginx and gunicorn&lt;/a&gt; and I was inspired by him (thanks dude), but I can give you the code I wrote and commited to GitHub.&lt;/p&gt;
&lt;p&gt;I&#039;ve called this the &lt;a href=&quot;https://github.com/alexisbellido/The-Django-gunicorn-fabfile-project&quot;&gt;Django gunicorn fabfile project&lt;/a&gt;, so go get it and play with it.&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/177#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/16">Articles</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/144">django</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/189">gunicorn</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/145">python</category>
 <pubDate>Wed, 04 Jan 2012 22:21:00 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">177 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Drupal queries and the IN SQL operator</title>
 <link>http://www.ventanazul.com/webzine/node/176</link>
 <description>&lt;p&gt;One of the most used functions in Drupal&#039;s database abstraction layer is &lt;a href=&quot;http://api.drupal.org/api/function/db_query/6&quot;&gt;db_query&lt;/a&gt;, which allows passing an SQL string and corresponding arguments to send a query to the database. I&#039;ll give you a quick overview of how &lt;strong&gt;db_query&lt;/strong&gt; works before showing you how to &lt;em&gt;drupalize&lt;/em&gt; a query such as:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
SELECT field1, field2 FROM table_name WHERE field1 IN (value1,value2,...)
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;lt;!--break--&gt;&lt;/p&gt;
&lt;h2&gt;Drupal database abstraction layer and db_query&lt;/h2&gt;
&lt;p&gt;As many other content management systems and web development frameworks, Drupal implements a database abstraction layer that you, the developer, can use for writing code that works with different database servers. For this to work you need to follow certain rules and this starts with the way you pass queries and arguments to the &lt;strong&gt;db_query&lt;/strong&gt; function.&lt;/p&gt;
&lt;p&gt;Arguments in a &lt;strong&gt;db_query&lt;/strong&gt; call need to use &lt;a href=&quot;http://php.net/manual/en/function.sprintf.php&quot;&gt;sprintf&lt;/a&gt; style specifications, placeholders such as &lt;em&gt;%d&lt;/em&gt; for integers and &lt;em&gt;%s&lt;/em&gt; for strings. This allows Drupal to avoid SQL injection attacks and perform other security checks.&lt;/p&gt;
&lt;p&gt;Let&#039;s review a simple example:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
$sql = &quot;SELECT v.vid FROM {vocabulary} v WHERE v.name = &#039;%s&#039;&quot;;&lt;br /&gt;
$vid = db_result(db_query($sql, $vocabulary_name));
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This code will get a vocabulary&#039;s id searching by its name, which is passed as a string. Notice the curly braces around the table&#039;s name, they need to be there if you want Drupal to provide table prefixing, this is important so get used to always do it this way.&lt;/p&gt;
&lt;p&gt;Many Drupal beginners may opt for what they consider a &lt;em&gt;simpler approach&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
$sql = &quot;SELECT v.vid FROM vocabulary v WHERE v.name = &#039;&quot; . $vocabulary_name . &quot;&#039;&quot;;&lt;br /&gt;
$vid = db_result(db_query($sql));
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Even if it may look simpler now you&#039;re bypassing Drupal&#039;s security checks and your query will start &lt;em&gt;breaking up&lt;/em&gt; as a series of concatenated strings which is not good for code readability, and this gets more confusing with more complex queries.&lt;/p&gt;
&lt;h2&gt;Passing arguments to db_query as an array&lt;/h2&gt;
&lt;p&gt;Arguments can be passed one by one or contained in an array. Let&#039;s slightly modify our example query:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
$sql = &quot;SELECT v.vid FROM {vocabulary} v WHERE v.name = &#039;%s&#039; AND v.vid = &#039;%d&#039;&quot;;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Now we&#039;re being more specific, looking for this vocabulary using &lt;em&gt;v.name&lt;/em&gt; and &lt;em&gt;v.vid&lt;/em&gt;, pay attention to the placeholders, and we could get our result passing each argument to &lt;strong&gt;db_query&lt;/strong&gt; like this:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
$vid = db_result(db_query($sql, $vocabulary_name, $vid));
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;or we could build an array with both arguments like this:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
$args = array($vocabulary_name, $vid);&lt;br /&gt;
$vid = db_result(db_query($sql, $args));
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I prefer the array approach for queries where I have to pass more than a few arguments and that&#039;s often the case when we use the SQL IN operator.&lt;/p&gt;
&lt;h2&gt;The SQL IN operator and Drupal&lt;/h2&gt;
&lt;p&gt;Every good Drupal developer has to be highly skilled in writing SQL and that means there will be times when you need the SQL IN operator, which compares a field to a list of values. Let&#039;s say you want to get all nodes of types &lt;em&gt;page&lt;/em&gt; and &lt;em&gt;blog&lt;/em&gt;, you&#039;re looking for a query like this:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
$sql = &quot;SELECT n.nid, n.title FROM {node} n WHERE n.type IN (&#039;page&#039;, &#039;blog&#039;) AND n.status = 1&quot;;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If you&#039;ve tried this before you may have experienced &lt;em&gt;escape quotes hell&lt;/em&gt; and opted for the non Drupal way of concatenating arguments in the query, at least I did it until I read about &amp;lt;a href=&quot;http://api.drupal.org/api/function/db_placeholders/6db_placeholders.&lt;/p&gt;
&lt;p&gt;This is how I build my Drupal queries with the SQL IN operator now:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
$types = array(&#039;blog&#039;, &#039;embedded_video&#039;, &#039;list&#039;, &#039;node_gallery_gallery&#039;);&lt;br /&gt;
$args = array();&lt;br /&gt;
$args[] = $tid;&lt;br /&gt;
$args = array_merge($args, $types);&lt;br /&gt;
$args[] = $status;&lt;br /&gt;
$args[] = $limit;&lt;br /&gt;
$sql = &quot;SELECT n.nid, n.title, n.type, c.comment_count FROM {node} n INNER JOIN {term_node} tn&lt;br /&gt;
ON n.nid = tn.nid INNER JOIN {term_data} td ON tn.tid = td.tid LEFT JOIN&lt;br /&gt;
{node_comment_statistics} c ON n.nid = c.nid WHERE td.tid = %d AND&lt;br /&gt;
n.type IN (&quot; . db_placeholders($types, &#039;varchar&#039;) . &quot;)&lt;br /&gt;
AND n.status = %d ORDER BY n.created DESC LIMIT %d&quot;;&lt;br /&gt;
$result = db_query($sql, $args);
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is a bigger query with more arguments and I&#039;m not only looking for nodes of certain types (listed in the &lt;em&gt;$types&lt;/em&gt; array) but also a specific term in the taxonomy (&lt;em&gt;$tid&lt;/em&gt;) and a published status (&lt;em&gt;$status&lt;/em&gt;). I&#039;m also adding a LIMIT clause at the end (&lt;em&gt;$limit&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;db_placeholders&lt;/strong&gt; takes care of adding the correct number and type of placeholders based on the contents of the array &lt;em&gt;$types&lt;/em&gt;. In this case it will add four &lt;em&gt;%s&lt;/em&gt; because I passed &lt;em&gt;varchar&lt;/em&gt; as the second argument and there are four elements in the array.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;$args&lt;/em&gt; array is built based on the order in which the arguments appear in the query, notice how I add &lt;em&gt;$tid&lt;/em&gt; first and then use &lt;em&gt;array_merge&lt;/em&gt; to add &lt;em&gt;$types&lt;/em&gt;, then I add &lt;em&gt;$status&lt;/em&gt; and &lt;em&gt;$limit&lt;/em&gt; at the end.&lt;/p&gt;
&lt;p&gt;So Drupalish, isn&#039;t it?&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/176#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/16">Articles</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/92">databases</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/29">Drupal</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/26">Programming</category>
 <pubDate>Wed, 30 Jun 2010 14:44:06 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">176 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Keep your database in sync with MySQL and PostgreSQL</title>
 <link>http://www.ventanazul.com/webzine/node/175</link>
 <description>&lt;p&gt;If you write web applications you may already be using a version control system to keep code in sync between your servers, but what about your MySQL or PostgreSQL database?&lt;/p&gt;
&lt;p&gt;Sure, there is replication, one master database server with one or more slaves is a possible case, but that may be overkill for most simple projects. You just want to make sure the database is the same in your development, staging and production servers at a certain time, like after some major changes in code or before a new release.&lt;/p&gt;
&lt;p&gt;Worry not my friend as you just need a few quick commands to keep your valuable data in sync. Yes, it&#039;s command line time again.&lt;br /&gt;
&amp;lt;!--break--&gt;&lt;/p&gt;
&lt;h2&gt;The dump, drop and create cycle&lt;/h2&gt;
&lt;p&gt;As most developers I create my web applications on a development server and enter content and settings to be stored in the database. Then, when I commit my code to a version control system on a staging server, &lt;a href=&quot;http://bazaar-vcs.org/&quot;&gt;Bazaar&lt;/a&gt; is my tool of choice these days, I have three options for moving my data:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enter all the data again, which is too much work and prone to error.&lt;/li&gt;
&lt;li&gt;Duplicate the entire database, the option we&#039;ll use, and&lt;/li&gt;
&lt;li&gt;Duplicate just the tables you know have changed, a slight variation of the second approach.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I&#039;ll focus on duplication of the entire database for now as adapting for specific tables is just as easy.&lt;/p&gt;
&lt;p&gt;For this method to work you need to use the same database name and user credentials in all your servers. Let&#039;s imagine we want to update the database on the staging server with the latest version from the development server. Once you have all your data ready in the development server these are the steps to follow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a dump file of the database in the development server.&lt;/li&gt;
&lt;li&gt;Move your dump file from the development to the staging server, I usually use scp but version control should be fine too.&lt;/li&gt;
&lt;li&gt;Drop the database in the staging server, optionally creating a backup dump.&lt;/li&gt;
&lt;li&gt;Recreate the database in the staging server and feed it with the dump from the development server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can write a script to automate the process if you want. Now, I&#039;ll take a look at what we need to run on the command line, let&#039;s start with PostgreSQL.&lt;/p&gt;
&lt;h2&gt;Sync your database with PostgreSQL&lt;/h2&gt;
&lt;p&gt;The administrative user for PostgreSQL is usually named &lt;em&gt;postgres&lt;/em&gt;. If you haven&#039;t already done so let&#039;s use this user via sudo to create the owner of your database in all your servers, in my case the owner will be &lt;em&gt;alexis&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo -u postgres createuser -P alexis
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And now create a database owned by that user, I&#039;ll call mine &lt;em&gt;cataybea&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo -u postgres createdb cataybea -O alexis
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Once you have some data in the database of the development server get a dump file by running:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
pg_dump -f cataybea.sql cataybea
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The &lt;em&gt;cataybea.sql&lt;/em&gt; file contains all the SQL needed to recreate your database. Now transfer it to the staging server, backup the database you already have there and drop it:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
dropdb cataybea
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Now recreate the database with the same name, the permissions are already set, and feed it with the dump you got from the development server:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo -u postgres createdb cataybea -O alexis&lt;br /&gt;
psql -U alexis -d cataybea -f cataybea.sql
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Finally, confirm you&#039;ve got the data correctly by running a few queries:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
psql -d cataybea
&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2&gt;Sync your database with MySQL&lt;/h2&gt;
&lt;p&gt;The administrative user for MySQL is usually named &lt;em&gt;root&lt;/em&gt;. If you haven&#039;t already done so let&#039;s create the database in all your servers, in my case its named &lt;em&gt;cataybea&lt;/em&gt; and the owner will be &lt;em&gt;alexis&lt;/em&gt;:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
mysqladmin -u root -p create cataybea&lt;br /&gt;
mysql -u root -p&lt;br /&gt;
mysql&gt; GRANT ALL PRIVILEGES ON cataybea.* TO &#039;alexis&#039;@&#039;%&#039; IDENTIFIED BY &#039;secret&#039;;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Once you have some data in the database of the development server can get a dump file by running:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
mysqldump -u alexis -p cataybea &gt; cataybea.sql
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The &lt;em&gt;cataybea.sql&lt;/em&gt; file contains all the SQL needed to recreate your database. Now transfer it to the staging server, backup the database you already have there and drop it:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
mysqladmin -u root -p drop cataybea
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Now recreate the database with the same name, the permissions are already set, and feed it with the dump you got the development server:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
mysqladmin -u root -p create cataybea&lt;br /&gt;
mysql -u alexis -p cataybea &amp;lt; cataybea.sql
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Finally, confirm you&#039;ve got the data correctly by running a few queries:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
mysql -u alexis -p cataybea
&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2&gt;Help on its way&lt;/h2&gt;
&lt;p&gt;You can sync all your databases in PostgreSQL and MySQL just by following the steps above and replacing your database name and user credentials; however, if you need some context, you can get all the details for any of the commands mentioned using the &lt;em&gt;--help&lt;/em&gt; option, for example:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
psql --help&lt;br /&gt;
mysql --help&lt;br /&gt;
createdb --help&lt;br /&gt;
mysqladmin --help
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And that&#039;s it. Happy database syncing!&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/175#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/16">Articles</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/92">databases</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/188">gnu/linux</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/187">mysql</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/186">postgresql</category>
 <pubDate>Mon, 11 May 2009 03:28:13 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">175 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Markdown and url filter enabled</title>
 <link>http://www.ventanazul.com/webzine/node/174</link>
 <description>&lt;p&gt;I had noticed that many of your comments included urls but no link and I understand that not everybody is used to thinking and writing on HTML all the time, that&#039;s why I just enabled &lt;a href=&quot;http://daringfireball.net/projects/markdown/basics&quot;&gt;Markdown&lt;/a&gt; and a url filter to the comments textarea.&lt;/p&gt;
&lt;p&gt;Enjoy.&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/174#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/160">Announcements at Ventanazul</category>
 <pubDate>Fri, 08 May 2009 16:57:49 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">174 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Is social media taking the comments away?</title>
 <link>http://www.ventanazul.com/webzine/node/173</link>
 <description>&lt;p&gt;It seems to me that everyday there are more discussions going on in Twitter and FriendFeed than in regular websites or blogs. I don&#039;t have numbers at hand or any other way to support this idea, and maybe I&#039;m wrong, but I&#039;d like to know what you think.&lt;/p&gt;
&lt;p&gt;Have you noticed less comments on your sites lately? Are Twitter and FriendFeed taking all the comments away?&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/173#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/170">Social networking and online communities</category>
 <pubDate>Tue, 05 May 2009 15:48:58 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">173 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Video editing with free software: Kdenlive 0.7.3</title>
 <link>http://www.ventanazul.com/webzine/node/171</link>
 <description>&lt;p&gt;&lt;img class=&quot;floating-right&quot; src=&quot;http://farm4.static.flickr.com/3572/3494605968_ea26f2dc7b_m.jpg&quot; alt=&quot;Kdenlive with Ubuntu&quot; /&gt;Long time GNU/Linux users may know there are two types of applications where we are &lt;em&gt;not there yet&lt;/em&gt; compared to other operating systems: games and video editing. Well, the video editing part has started to change with the recent release of &lt;a href=&quot;http://www.kdenlive.org&quot;&gt;Kdenlive 0.7.3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Kdenlive is a free software video editor that works with both GNU/Linux and FreeBSD, running either KDE or Gnome. It can edit footage from DV, HDV and AVCHD sources and uses other projects, like FFmpeg and the MLT video framework, to get its job done.&lt;/p&gt;
&lt;p&gt;Kdenlive has a very simple and easy to understand user interface that will take you from capturing footage to editing and rendering in just a few steps. I&#039;ve used Kdenlive to produce some &lt;a href=&quot;http://www.youtube.com/user/alexisbellido&quot;&gt;short and silly clips&lt;/a&gt; and a few one hour long episodes of &lt;a href=&quot;http://www.ventanazul.com/webzine/in-silico&quot;&gt;my videocast In Silico&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I know my video editing needs are basic, they couldn&#039;t be considered &lt;em&gt;professional&lt;/em&gt; at all, but I&#039;m sure there are many of you with similar needs out there. I usually capture some video from my &lt;a href=&quot;https://www.amazon.com/dp/B000M4F9GO?tag=ventanazul-20&amp;amp;camp=0&amp;amp;creative=0&amp;amp;linkCode=as4&amp;amp;creativeASIN=B000M4F9GO&amp;amp;adid=01HS1EVB22F2M6HNHD67&amp;amp;&quot;&gt;Panasonic PV-GS80 MiniDV camcorder&lt;/a&gt;, add some music, a few titles and render to a format that can be uploaded to one of the many video services online.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3622/3493787699_faba05582e_o.png&quot; alt=&quot;Kdenlive with Ubuntu&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Let&#039;s see how to install Kdenlive.&lt;br /&gt;
&amp;lt;!--break--&gt;&lt;/p&gt;
&lt;h2&gt;How to install Kdenlive on Ubuntu&lt;/h2&gt;
&lt;p&gt;I&#039;m using Ubuntu 9.04 with Kdenlive 0.7.3 and my camcorder connects via Firewire so the first thing to do was to make sure I had the needed modules running. Edit &lt;em&gt;/etc/modules&lt;/em&gt; and add the following lines:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
raw1394&lt;br /&gt;
video1394&lt;br /&gt;
ohci1394&lt;br /&gt;
dv1394
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Then load the modules with:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo modprobe dv1394&lt;br /&gt;
sudo modprobe video1394&lt;br /&gt;
sudo modprobe raw1394&lt;br /&gt;
sudo modprobe ohci1394
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And allow read and write access to your device:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo chmod a+rw /dev/*1394
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I have to run this command everytime I need to enable my camcorder, for some reasons my permissions are resetting, but once done it works for the whole session. If anybody knows how to fix this problem let me know.&lt;/p&gt;
&lt;p&gt;Now let&#039;s install Kdenlive:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo apt-get install kdenlive
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You will find Kdenlive under the &lt;em&gt;Applications &gt; Sound &amp;amp; Video&lt;/em&gt; menu.&lt;/p&gt;
&lt;p&gt;The first time you run Kdenlive you will see a configuration wizard and a few codecs will be enabled. If you&#039;re running Ubuntu 9.04 you may be lacking a few important ones, such as mpeg-2, mpeg-4 and h264. This problem is related to an outdated version of the MLT video framework (the &lt;a href=&quot;http://kdenlive.org/forum/can-only-render-dv-did-install-libmlt-dev-and-redid-config&quot;&gt;relevant discussion here&lt;/a&gt;) and other libraries.&lt;/p&gt;
&lt;p&gt;You have two options to install a newer MLT on Ubuntu 9.04, adding repositories to your apt setup or getting a &lt;em&gt;.deb file&lt;/em&gt;. Let&#039;s see the first one:&lt;/p&gt;
&lt;p&gt;Edit your apt &lt;em&gt;/etc/apt/sources.list&lt;/em&gt; file and add these two entries:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
# for kdenlive&lt;br /&gt;
deb http://ppa.launchpad.net/sunab/ppa/ubuntu jaunty main&lt;br /&gt;
deb-src http://ppa.launchpad.net/sunab/ppa/ubuntu jaunty main
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Then update and install:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install libmlt++1 libmlt++-dev
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The second option is easier, just grab and install the &lt;a href=&quot;https://launchpad.net/ubuntu/jaunty/i386/libmlt++1/0.3.8-0ubuntu1&quot;&gt;.deb with the updated MLT&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;That&#039;s all with MLT, now for the extra codecs install &lt;em&gt;libavcodec-unstripped-52&lt;/em&gt; and its dependencies:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo apt-get install libavcodec-unstripped-52
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Now start Kdenlive and run the configuration again to enable your new codecs: &lt;em&gt;Settings &gt; Run Config Wizard&lt;/em&gt;. That&#039;s it! You&#039;re ready to start editing and having fun, don&#039;t forget to consult the &lt;a href=&quot;http://www.kdenlive.org/user-manual&quot;&gt;documentation for Kdenlive&lt;/a&gt; to know what&#039;s possible.&lt;/p&gt;
&lt;h2&gt;Mplayer: a nice video player&lt;/h2&gt;
&lt;p&gt;I&#039;ll talk about publishing to online video services in a future article, for now I suggest you to get a nice video player to watch your creations. I like Mplayer, to install just use:&lt;/p&gt;
&lt;blockquote class=&quot;code&quot;&gt;&lt;p&gt;
sudo apt-get install mplayer
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3602/3494605278_8b81b9d27d.jpg&quot; alt=&quot;Kdenlive with Ubuntu&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Show us your clips&lt;/h2&gt;
&lt;p&gt;And there you are. Go get your camera rolling and start playing with Kdenlive. Oh, and don&#039;t forget to share the links to the clips you&#039;ve created with it in the comments.&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/171#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/78">free software</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/184">kdenlive</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/18">Tutorials</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/185">video</category>
 <pubDate>Sun, 03 May 2009 20:17:07 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">171 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>System76 Starling: a new Ubuntu friendly netbook</title>
 <link>http://www.ventanazul.com/webzine/node/170</link>
 <description>&lt;p&gt;&lt;img src=&quot;http://www.ventanazul.com/webzine/files/starling-screen.jpg&quot; alt=&quot;System 76 Starling&quot; /&gt;&lt;/p&gt;
&lt;p&gt;System76, the company that focuses on Ubuntu based computers, has just launched its first netbook model, the &lt;a href=&quot;http://system76.com/product_info.php?cPath=28&amp;amp;products_id=92&quot;&gt;Starling&lt;/a&gt;.&lt;br /&gt;
&amp;lt;!--break--&gt;&lt;br /&gt;
At first glance this netbook offers the &lt;em&gt;default&lt;/em&gt; features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;10.1&quot; widescreen glossy screen with a 1024 x 576 resolution.&lt;/li&gt;
&lt;li&gt;Intel Atom N270 CPU.&lt;/li&gt;
&lt;li&gt;1 Gb DDR2 RAM.&lt;/li&gt;
&lt;li&gt;160 Gb SATA II hard disk.&lt;/li&gt;
&lt;li&gt;802.11 b/g WiFi.&lt;/li&gt;
&lt;li&gt;VGA and 3 USB 2.0 ports, headphone and microphone jack, SD cards reader.&lt;/li&gt;
&lt;li&gt;6 cell lithium ion battery.&lt;/li&gt;
&lt;li&gt;Intel audio and 0.3 mp webcam.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Priced at US$ 359 the little gizmo comes with Ubuntu Netbook Remix 9.04 pre-installed and System76 has written drivers to make sure all the hardware works correctly out of the box. I have no doubt the Starling seems like a good deal. I&#039;m the happy owner of one of Systems76&#039;s laptop models, the Pangolin, and have had a great experience with the hardware and the company; hence, as soon as I knew about the Starling I wanted to know more and asked Carl Richell, System76&#039;s President, a few questions:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alexis Bellido&lt;/strong&gt;: How does the Starling compare to other netbooks in the market? Not including Windows is a great point. Many GNU/Linux users, like me, don&#039;t want to waste time removing it. What else does the Starling bring to the netbook arena?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Carl Richell&lt;/strong&gt;: Above all, the Starling features Ubuntu Netbook Remix whereas many netbooks are pre-loaded with the 7 year old Windows XP operating system. Ubuntu Netbook Remix represents the latest technologies, is optimized for Intel&#039;s Atom platform, and features a user interface geared toward netbook devices.&lt;/p&gt;
&lt;p&gt;System76 also supports its customers through email, &lt;a href=&quot;http://ubuntuforums.org/forumdisplay.php?f=341&quot;&gt;forums&lt;/a&gt;, and over the phone. Buying an Acer or Asus product usually means the end of your interaction with those companies. Buying a System76 computer is the start. Quality support is fundamental to the successful introduction and the lasting usage of Ubuntu in the broader market.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.ventanazul.com/webzine/files/starling-keyboard.jpg&quot; alt=&quot;System 76 Starling&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AB&lt;/strong&gt;: We, netbook users, are constantly on the move and battery life is a great issue. Asus promises 9 hours of baterry life for its Eee PC 1000HE. What does the Starling offer? Do you sell extra batteries and if so how much do they cost?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CR&lt;/strong&gt;: The Starling runs about 6 hours on its 6 cell battery. This may be longer. Our 3 cell test models run about 4 hours. We will offer extra batteries once they&#039;re in stock. We don&#039;t have pricing available yet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AB&lt;/strong&gt;: How does you keyboard compare to those of other netbooks in the market? 92% of the standard size seems to be the norm these days.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CR&lt;/strong&gt;: The keyboard is nearly full-size and very easy to type on. You can easily switch between your laptop and Starling netbook keyboards.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AB&lt;/strong&gt;: Is the Starling upgrade friendly? How easy is to change the hard disk or upgrade to 2 Gb of RAM? I didn&#039;t notice an option for extra RAM in the order page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CR&lt;/strong&gt;: Not particularly. The netbook isn&#039;t designed to be opened up and memory is integrated onto the motherboard.&lt;/p&gt;
&lt;p&gt;Thanks Carl, congratulations for the launch, I&#039;m pretty sure the Starling will find its way to many Ubuntu users.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.ventanazul.com/webzine/files/starling-top.jpg&quot; alt=&quot;System 76 Starling&quot; /&gt;&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/170#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/100">gizmos</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/39">Laptops</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/176">netbooks</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/17">News</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/76">system76</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/75">ubuntu</category>
 <pubDate>Tue, 28 Apr 2009 03:02:18 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">170 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Why you should follow me on Twitter?</title>
 <link>http://www.ventanazul.com/webzine/node/169</link>
 <description>&lt;p&gt;&lt;strong&gt;Your time is valuable&lt;/strong&gt; and you need valuable content in your Twitter timeline. Here some reasons why you should follow me on Twitter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I just share knowledge and ideas that I think may be helpful for my followers.&lt;/li&gt;
&lt;li&gt;I spend a lot of time teleworking, programming, designing and consulting on Internet projects. Many useful thoughts from all that turn into tweets.&lt;/li&gt;
&lt;li&gt;I like to watch good movies, listen to great music and enjoy the best books I can find. Even if your tastes are different than mine you may find something worthy.&lt;/li&gt;
&lt;li&gt;I follow a very small group of very interesting people. You may find some very smart guys and gals thru me.&lt;/li&gt;
&lt;li&gt;Once in a while I may have a few questions that you could answer. I may retweet your answer and we both can help a lot of people.&lt;/li&gt;
&lt;li&gt;If I find your tweets valuable I may follow you. Many of my followers could do so as well.&lt;/li&gt;
&lt;li&gt;We can become good friends and possibly collaborate on a project later.&lt;/li&gt;
&lt;li&gt;I keep personal messages in private and won&#039;t clutter your timeline.&lt;/li&gt;
&lt;li&gt;I tweet in both English and Spanish. If you&#039;re learning either of those languages this is a good way of doing it.&lt;/li&gt;
&lt;li&gt;I try to keep updated on the latest news all over the world. You may hear it from me before you watch it on TV or read it on news sites.&lt;/li&gt;
&lt;li&gt;Finally, I have a good sense of humor so you can mock me and I won&#039;t send my goons to your house, or nearest ISP.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Wanna try? &lt;a href=&quot;http://twitter.com/alexisbellido&quot;&gt;Follow me on Twitter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Versión en español: &lt;a href=&quot;http://www.ventanazul.com/articulos/porque-debes-seguirme-en-twitter&quot;&gt;¿Porqué debes seguirme en Twitter?&lt;/a&gt;&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/169#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/16">Articles</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/87">social networking</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/181">twitter</category>
 <pubDate>Mon, 27 Apr 2009 18:47:25 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">169 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Best settings to export video from Adobe Premiere to Dailymotion and Vimeo?</title>
 <link>http://www.ventanazul.com/webzine/node/168</link>
 <description>&lt;p&gt;I&#039;m looking for the best settings to export my videos to services like Dailymotion and Vimeo.&lt;/p&gt;
&lt;p&gt;I&#039;m using Adobe Premiere CS3 and a basic miniDV Panasonic PV-GS80 camcorder but I think I&#039;m not exporting correctly as &lt;a href=&quot;http://www.dailymotion.com/videos/alexisbellido/1&quot;&gt;my videos&lt;/a&gt; don&#039;t look as good as others. Compare for example to &lt;a href=&quot;http://www.dailymotion.com/video/x8wm2m_dsi-launch-universal-citywalk-los-a_videogames&quot;&gt;this one&lt;/a&gt;, the SD version of course, not the HD version.&lt;/p&gt;
&lt;p&gt;Am I at the limit of SD and should think about buying an HD camcorder? Don&#039;t think so as the source video looks pretty good in Premiere and I know I&#039;m losing quality in the encoding process.&lt;/p&gt;
&lt;p&gt;I think there are some settings that work best for certain video sites, correct?&lt;/p&gt;
&lt;p&gt;I&#039;m not a video expert, not yet, but would like to get the best video I can to continue producing new episodes of &lt;a href=&quot;http://www.ventanazul.com/webzine/podcasts/in-silico-1-social-networking-no-longer-a-phenomena&quot;&gt;In Silico&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
</description>
 <comments>http://www.ventanazul.com/webzine/node/168#comments</comments>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/169">Creating content</category>
 <pubDate>Thu, 23 Apr 2009 07:51:16 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">168 at http://www.ventanazul.com/webzine</guid>
</item>
<item>
 <title>Social networking no longer a phenomena</title>
 <link>http://www.ventanazul.com/webzine/node/167</link>
 <description>&lt;p&gt;True, we can no longer consider social networking, or should I say &lt;em&gt;social media&lt;/em&gt;?, as something restricted to a group of geeks without a life. Social networking has reached Joe and Jane; mom and pop and your kids. It&#039;s already changing lives and helping causes all over the world.&lt;/p&gt;
&lt;p&gt;In this first episode of In Silico in English I offer a quick look at the evolution of social networks.&lt;/p&gt;
&lt;p&gt;&lt;object width=&quot;480&quot; height=&quot;341&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.dailymotion.com/swf/x91x1w_in-silico-1-social-networks-no-long_webcam&amp;related=1&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;&lt;embed src=&quot;http://www.dailymotion.com/swf/x91x1w_in-silico-1-social-networks-no-long_webcam&amp;related=1&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;480&quot; height=&quot;341&quot; allowFullScreen=&quot;true&quot; allowScriptAccess=&quot;always&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;!--break--&gt;&lt;/p&gt;
</description>
 <category domain="http://www.ventanazul.com/webzine/in-silico">In Silico</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/19">Podcasts</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/87">social networking</category>
 <category domain="http://www.ventanazul.com/webzine/taxonomy/term/181">twitter</category>
 <pubDate>Tue, 21 Apr 2009 20:11:14 +0000</pubDate>
 <dc:creator>alexis</dc:creator>
 <guid isPermaLink="false">167 at http://www.ventanazul.com/webzine</guid>
</item>
</channel>
</rss>
