<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tripu &#187; Work</title>
	<atom:link href="http://blog.tripu.info/item/category/work/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.tripu.info</link>
	<description>1.0rc2</description>
	<lastBuildDate>Mon, 31 Jan 2011 22:06:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>No nos representen más, gracias</title>
		<link>http://blog.tripu.info/item/conetic</link>
		<comments>http://blog.tripu.info/item/conetic#comments</comments>
		<pubDate>Sat, 28 Aug 2010 10:55:47 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Spain]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[abierto]]></category>
		<category><![CDATA[artículo]]></category>
		<category><![CDATA[CONETIC]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[Expansión]]></category>
		<category><![CDATA[Expansión.com]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[mensaje]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Spanish]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/?p=886</guid>
		<description><![CDATA[Para: CONETIC &#60;info@conetic.info&#62; Asunto: declaraciones del presidente en artículo de Expansión Fecha: 25/08/2010 21:09 Saludos. Hoy he leído un artículo en Expansión.com con el titular Microsoft contra el software libre. En él, se recogen unas opiniones de don Vicente Alciturri en su calidad de presidente de la Confederación Española de Empresas de Tecnologías de la [...]]]></description>
			<content:encoded><![CDATA[<div style="margin-left: 4em; margin-right: 4em;">
<p class="no-indent"><strong>Para:</strong> <a href="http://www.conetic.info/" title="Su sitio web"><abbr title="Confederación Española de Empresas de Tecnologías de la Información, Comunicaciones y Electrónica">CONETIC</abbr></a> <a href="mailto:info@conetic.info" title="Enviarles a ellos un mensaje"><code>&lt;info@conetic.info&gt;</code></a><br />
<strong>Asunto:</strong> declaraciones del presidente en artículo de Expansión<br />
<strong>Fecha:</strong> 25/08/2010 21:09</p>
<p>Saludos.</p>
<p>Hoy he leído un artículo en <em>Expansión.com</em> con el titular <a href="http://www.expansion.com/2010/08/24/empresas/tmt/1282683717.html" title="El artículo en cuestión"><em>Microsoft contra el software libre</em></a>. En él, se recogen unas opiniones de don Vicente Alciturri en su calidad de presidente de la Confederación Española de Empresas de Tecnologías de la Información, Comunicaciones y Electrónica.</p>
<p>El artículo es pobre y poco riguroso, y confunde términos o los usa sin definirlos antes adecuadamente para que el lector sin conocimientos técnicos pueda comprenderlos bien: se usa «software propietario» por «software privativo», se equipara «código abierto» y «software libre», se define como «software propietario aquél basado en patentes y licencias», etc. Se intercalan dos líneas mencionando las estadísticas de software copiado ilegalmente en España sin aclarar en absoluto qué tiene esto que ver con el tema del artículo.</p>
<p>Como viene siendo ya habitual en los medios, se usa «hacker» donde debería usarse «cracker» o simplemente «delincuente» (y este es un error que comete no sólo el periodista, sino también el señor Alciturri).</p>
<p>Pero a todo esto estamos ya tristemente acostumbrados.</p>
<p>Les escribo porque me han sorprendido las declaraciones de su presidente. Especialmente, este fragmento:</p>
<p style="margin-left: 2em; margin-right: 2em;"><strong><em>«El software open source, por naturaleza, es propiedad de toda la sociedad. Es decir, si Sanidad pone en marcha un sistema, deberá estudiar el modo de que el código de sus programas no se haga público. De lo contrario, se pone en riesgo la privacidad de los pacientes y se permite que cualquier hacker descubra fácilmente cómo entrar en el sistema. Una historia clínica en software libre no es más que un cebo para un hacker.»</em></strong></p>
<p>Me preocupan las muchas inexactitudes que contienen estas pocas frases. El software «open source» no es «por naturaleza» «propiedad de toda la sociedad» (eso dependerá de los términos de licencia concretos que gobiernen su uso; en rigor ningún software pertenece a «toda la sociedad» a menos que esté enteramente en el dominio público; y no tiene por qué ser el caso). Si Sanidad adjudica un desarrollo de software libre, en absoluto necesita ocultar el código de ese software; más bien hará todo lo contrario para el beneficio de los ciudadanos, para defender la transparencia de su gestión y para que otras administraciones puedan a su vez reutilizarlo (como pasa, por ejemplo, cuando la Junta de Andalucía adjudica el desarrollo de una distribución propia de GNU/Linux).</p>
<p>El error más grave, sin embargo, es que Vicente Alciturri confunde (y confunde así a todos los que lean el artículo) el hecho de que un software sea libre, o de código abierto, con que los datos que pasan por ese software tengan que ser accesibles o públicos. No tiene absolutamente nada que ver, y se pueden encontrar innumerables ejemplos de uso legal y legítimo de software libre que sin embargo no impide proteger los datos valiosos que ese software maneja: si un ministerio usa para su intranet un servidor web Apache y un gestor de bases de datos libre sobre un sistema operativo Unix libre, nada le impide (ni desde el punto de vista tecnológico ni desde el punto de vista legal) proteger convenientemente sus datos restringiendo el acceso a usuarios, cifrando los datos en el sistema, a través de la red, etc.</p>
<p>En otras palabras, se sugiere que el cáracter libre y abierto de un gestor de bases de datos o de un servidor web necesariamente va a «contagiar» a los datos que pasen por esos sistemas.</p>
<p>Es alarmante que el presidente de CONETIC, a quien se presume cierto conocimiento sobre el funcionamiento de la tecnología y de la industria, caiga en un error tan básico que además, desorienta el debate público entre software libre y privativo, y daña la imagen de las empresas que se dedican a producir software libre, o a dar servicios sobre este.</p>
<p>Como ingeniero en informática y profesional del software en España, pido a su organización y especialmente a su presidente que corrija estas declaraciones públicamente, y que se cuide en el futuro de contaminar el debate público —bien por ignorancia, bien por intereses espurios— con mentiras como estas.</p>
<p>Gracias de antemano.</p>
</div>
<hr />
<p>No he recibido respuesta, claro (tampoco lo esperaba). Han editado un poco el artículo en <em>Expansión.com</em> y el párrafo que cito en mi mensaje ahora está maquillado.</p>
<p>Por cierto, no dejen de visitar <del><em>Geocities</em></del> <a href="http://www.conetic.info/" title="Sin palabras">el sitio web de CONETIC</a>; da para una tarde de disfrute y regocijo.</p>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/computers" title="View all posts in Computers" rel="category tag">Computers</a>, <a href="http://blog.tripu.info/item/category/linux" title="View all posts in Linux" rel="category tag">Linux</a>, <a href="http://blog.tripu.info/item/category/spain" title="View all posts in Spain" rel="category tag">Spain</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> <a href="http://blog.tripu.info/item/tag/abierto" rel="tag">abierto</a>, <a href="http://blog.tripu.info/item/tag/articulo" rel="tag">artículo</a>, <a href="http://blog.tripu.info/item/tag/conetic" rel="tag">CONETIC</a>, <a href="http://blog.tripu.info/item/tag/e-mail" rel="tag">e-mail</a>, <a href="http://blog.tripu.info/item/tag/expansion" rel="tag">Expansión</a>, <a href="http://blog.tripu.info/item/tag/expansion-com" rel="tag">Expansión.com</a>, <a href="http://blog.tripu.info/item/tag/free-software" rel="tag">free software</a>, <a href="http://blog.tripu.info/item/tag/mensaje" rel="tag">mensaje</a>, <a href="http://blog.tripu.info/item/tag/message" rel="tag">message</a>, <a href="http://blog.tripu.info/item/tag/open" rel="tag">open</a>, <a href="http://blog.tripu.info/item/tag/open-source" rel="tag">open source</a>, <a href="http://blog.tripu.info/item/tag/spain" rel="tag">Spain</a>, <a href="http://blog.tripu.info/item/tag/spanish" rel="tag">Spanish</a></small></p>
<p><a href="http://blog.tripu.info/item/conetic#comments">One comment so far</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/conetic/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Uno de esos días en la oficina</title>
		<link>http://blog.tripu.info/item/dia</link>
		<comments>http://blog.tripu.info/item/dia#comments</comments>
		<pubDate>Thu, 21 Jan 2010 00:36:59 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[día]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[mañana]]></category>
		<category><![CDATA[metepatas]]></category>
		<category><![CDATA[oficina]]></category>
		<category><![CDATA[trabajo]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/?p=810</guid>
		<description><![CDATA[Esta mañana en la oficina he hecho un svn revert -R . en el directorio equivocado, lo que ha volatilizado una hora o dos de trabajo del día anterior. Poco después he abierto una ventana de MI y he estado dándole la brasa durante más de una página a Luis sobre detalles del proyecto. Me [...]]]></description>
			<content:encoded><![CDATA[<p><span class="capitals">Esta mañana en la</span> oficina he hecho un <code>svn revert -R .</code> en el directorio equivocado, lo que ha volatilizado una hora o dos de trabajo del día anterior.</p>
<p>Poco después he abierto una ventana de <abbr title="Mensajería Instantánea">MI</abbr> y he estado dándole la brasa durante más de una página a Luis sobre detalles del proyecto. Me respondía unas cosas rarísimas y no parecía entender nada de lo que yo le decía, hasta que me ha recordado quién era, y entonces me he dado cuenta de que no era el Luis que yo pensaba, sino otro.</p>
<p>Y aún antes de comer me ha dado tiempo de dejarme el foco del sistema de ventanas en la aplicación equivocada y de escribir (y enviar) enterita y por error una de mis contraseñas más preciadas a otro colega con el que estaba charlando.</p>
<p>A pesar de todo eso, el día ha continuado medio normal. Incluso he ido esta noche a la sala <em>Galileo Galilei</em> a ver a <em>Faemino y Cansado</em> en directo. Muy divertidos. Y no me he roto una pierna ni nada.</p>
<p>Ahora a dormir.</p>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/computers" title="View all posts in Computers" rel="category tag">Computers</a>, <a href="http://blog.tripu.info/item/category/life" title="View all posts in Life" rel="category tag">Life</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> <a href="http://blog.tripu.info/item/tag/dia" rel="tag">día</a>, <a href="http://blog.tripu.info/item/tag/error" rel="tag">error</a>, <a href="http://blog.tripu.info/item/tag/manana" rel="tag">mañana</a>, <a href="http://blog.tripu.info/item/tag/metepatas" rel="tag">metepatas</a>, <a href="http://blog.tripu.info/item/tag/oficina" rel="tag">oficina</a>, <a href="http://blog.tripu.info/item/tag/trabajo" rel="tag">trabajo</a></small></p>
<p><a href="http://blog.tripu.info/item/dia#comments">8 comments so far</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/dia/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Definitive howto: Flex Builder 3 in Ubuntu Linux 9.04</title>
		<link>http://blog.tripu.info/item/flex-linux</link>
		<comments>http://blog.tripu.info/item/flex-linux#comments</comments>
		<pubDate>Thu, 20 Aug 2009 15:44:54 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[FB3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[recipe]]></category>
		<category><![CDATA[set up]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/?p=559</guid>
		<description><![CDATA[Two weeks ago I had to reinstall Ubuntu. Yesterday I spent some time setting up Flex Builder in my new Linux installation. This time I faced even more difficulties than the last time, months ago. Definitely, Adobe is not paying much attention to its Linux developers&#160;&#8212;&#160;looking through Adobe.com and Adobe Labs, stuff regarding Flex development [...]]]></description>
			<content:encoded><![CDATA[<p><span class="capitals"><span class="huge">T</span>wo weeks ago I had</span> to reinstall <a href="http://ubuntu.com" title="Official web site">Ubuntu</a>. Yesterday I spent some time setting up <a href="http://adobe.com/products/flex" title="Adobe Flex 3 web page">Flex Builder</a> in my new <a href="http://en.wikipedia.org/wiki/Linux" title="In Wikipedia">Linux</a> installation. This time I faced even more difficulties than the last time, months ago. <strong>Definitely, <a href="http://adobe.com" title="Official web site">Adobe</a> is not paying much attention to its Linux developers</strong>&nbsp;&mdash;&nbsp;looking through <a href="http://adobe.com" title="http://adobe.com">Adobe.com</a> and <a href="http://labs.adobe.com" title="http://labs.adobe.com">Adobe Labs</a>, stuff regarding Flex development in Linux stays pretty much as (bad as) it was one year ago or so.</p>
<p>I finally managed to get the Flex 3 <abbr title="Integrated Development Environment">IDE</abbr> and version 3.0.0 of the <a href="http://adobe.com/products/air" title="Adobe AIR web page"><abbr title="Adobe Integrated Runtime">AIR</abbr></a> <abbr title="Software Development Kit">SDK</abbr> to run with <a href="http://eclipse.org" title="Official web site">Eclipse</a> 3.3.2, and to launch both the AIR runtime and the <a href="http://adobe.com/flashplatform" title="Adobe Flash Platform web page">Flash</a> plug-in for <a href="http://mozilla.org/firefox" title="Official web page">Firefox</a> from within Eclipse as needed (<em>run</em> and <em>debug</em> modes).</p>
<p>The process is no <code>apt-get install</code>, and is not well documented. At the end I combined <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/releasenotes.html#install" title="&ldquo;Installation and Uninstallation&rdquo;">instructions</a> and <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/releasenotes.html#air" title="&ldquo;Updating the Version of Adobe AIR for Linux Used by Flex Builder Linux&rdquo;">tips</a> from Adobe Labs, <a href="http://ubuntuforums.org/showthread.php?t=1084615" title="&ldquo;Flex Builder Linux not workgin with latest AIr update&rdquo;">one</a> or <a href="http://forums.adobe.com/thread/210332" title="&ldquo;Flex Builder Linux not working after AIR update&rdquo;">two</a> comments from forums and the workaround for <a href="http://bugs.adobe.com/jira/browse/FBE-323" title="&ldquo;After updating to AIR SDK 1.5.1 all Flex AIR apps give &quot;abc bytecode decoding&quot; error&rdquo;">a bug filed in Jira</a>. <strong>This recipe summarises the process in detail and, following it step by step, in a few minutes you will be running Flex Builder 3 in Ubuntu 9.04 <em>Jaunty Jackalope</em>.</strong> This recipe might be applicable to other versions of Ubuntu, and even to other <a href="http://debian.org" title="&ldquo;The Universal Operating System&rdquo;">Debian</a>-based distros.</p>
<p>There are six main steps:</p>
<ol>
<li>Install a <abbr title="Java Runtime Environment">JRE</abbr></li>
<li>Install the Eclipse SDK</li>
<li>Install the <abbr title="Flex Builder 3">FB3</abbr> plug-in for Eclipse</li>
<li>Back up one <abbr title="ShockWave Control">SWC</abbr> library</li>
<li>Upgrade the AIR SDK</li>
<li>Repair the offending SWC library from the backup</li>
</ol>
<p>A few notes before going into details. First of all, bear in mind that <strong>the Linux version of FB3 is an unsupported alpha, and that <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/releasenotes.html#features" title="&ldquo;Unsupported Flex Builder Features&rdquo;">some key features are (still) missing in it</a></strong>. The most important one is <a href="http://blog.tripu.info/item/fb3" title="Something I wrote about FB3's design view">the <em>design view</em></a>, but also the <em>states view</em>, the <em>profiler</em> and four other features. If these are important limitations for you, you might need to consider virtualisation instead (or a different base <abbr title="Operating System">OS</abbr> altogether).</p>
<p>Second, <strong>there is no stand-alone FB3 for Linux</strong>. Flex developers running Windows or Mac OS are used to installing either the FB3 plug-in on top of an existing Eclipse installation <em>or</em> the FB3 stand-alone bundle provided by Adobe. In Linux, on the other hand, there is no option but to install the Eclipse SDK first, and then the FB3 plug-in on top of it.</p>
<p>Third, Java is a dependency: the FB3 plug-in needs Eclipse, and Eclipse needs a JRE.</p>
<p>Fourth, if you plan to build AIR applications for the desktop (as opposed to Flash applications for the web) you might need to install the <a href="http://get.adobe.com/air" title="Get it from Adobe.com">AIR runtime</a> separately, in addition to the steps listed here.</p>
<p>Finally, here I use <a href="http://gnu.org/software/bash" title="The &ldquo;Bourne-again shell&rdquo;">Bash</a> commands to illustrate these steps in detail and without ambiguity; but most of these steps, if not all of them, you can accomplish using your file manager and visual tools of choice instead.</p>
<ol>
<li><strong>Install a JRE</strong>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> sun-java6-jre</pre></div></div>

</div>
<p class="no-indent">This will also install <code>sun-java6-bin</code>.<br />
You can now check that Java has been installed successfully, the usual way:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ java <span style="color: #660033;">-version</span></pre></div></div>

</div>
</li>
<li><strong>Install the Eclipse SDK</strong><br />
From all the bundles that <a href="http://eclipse.org" title="http://eclipse.org">Eclipse.org</a> provides, pick and download a minimal Eclipse SDK (you won&#8217;t need all those fancy plug-ins, and they can be added after the installation anyway).<br />
Whatever the bundle, <strong>it needs to be version 3.3.x, codename <em>Europa</em></strong>.<br />
The <a href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/europawinter" title="&ldquo;Eclipse IDE for Java Developers&rdquo;">IDE &ldquo;for Java developers&rdquo; [Europa]</a> is the best option:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #ff0000;">&quot;http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/europa/winter/eclipse-java-europa-winter-linux-gtk.tar.gz&quot;</span></pre></div></div>

</div>
<p class="no-indent">Extract the files from the archive and then move the base <code>eclipse/</code> directory to, for example, <code>/usr/local/</code>:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> eclipse-java-europa-winter-linux-gtk.tar.gz
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> eclipse <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</div>
<p class="no-indent">Create a permanent workspace for Eclipse:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>eclipse-workspace<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</div>
<p class="no-indent">Launch Eclipse:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>eclipse<span style="color: #000000; font-weight: bold;">/</span>eclipse <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

</div>
</li>
<p class="no-indent">During the first initialisation it will prompt for a workspace. Browse to the directory that you just created (<code>~/eclipse-workspace/</code>).<br />
Check that Eclipse works (you can write and run a <em>helloworld</em> in Java).<br />
Close Eclipse.</p>
<li><strong>Install the FB3 plug-in for Eclipse</strong><br />
Download <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/" title="Get it from Adobe Labs">Flex Builder for Linux</a> and give yourself permission to run the file:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #ff0000;">&quot;http://download.macromedia.com/pub/labs/flex/flexbuilder_linux/flexbuilder_linux_install_a4_081408.bin&quot;</span>
$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> u+x flexbuilder_linux_install_a4_081408.bin</pre></div></div>

</div>
<p class="no-indent">Create a new directory for FB3 and make it your own:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #007800;">$USER</span>:<span style="color: #007800;">$USER</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</div>
<p class="no-indent">Run the installer:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>flexbuilder_linux_install_a4_081408.bin</pre></div></div>

</div>
<p class="no-indent">Accept the license.<br />
When asked where to install Flex Builder, browse to the directory you just created (<code>/usr/local/flex-builder/</code>).<br />
When asked where Eclipse is currently installed, browse to the directory where you copied Eclipse (<code>/usr/local/eclipse/</code>).<br />
If you plan to develop for the <a href="http://get.adobe.com/flashplayer" title="Get it from Adobe.com">Flash Player</a>, tick the option to install the debug version of Flash Player 9 for Firefox (but you might be able to download it separately anyway).<br />
The &ldquo;pre-installation summary&rdquo; should look similar to this:</p>
<p class="no-indent centred"><a href="http://flickr.com/photos/tripu/3839380421" title="Go to Flickr to see this image"><img src="http://farm4.static.flickr.com/3493/3839380421_2822a02ae0_d.jpg" title="Go to Flickr to see this image" /></a></p>
<p class="no-indent">Once the installation finishes you can launch FB3:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>Adobe_Flex_builder.sh <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

</div>
<p class="no-indent">Flash projects will run fine &hellip;but most likely AIR projects won&#8217;t work. When you try to build and launch an AIR app, you will see this error message in Eclipse:</p>
<p class="no-indent centred"><a href="http://flickr.com/photos/tripu/3840169552" title="Go to Flickr to see this image"><img src="http://farm4.static.flickr.com/3443/3840169552_ff18209970_o_d.png" title="Go to Flickr to see this image" /></a></p>
</li>
<li><strong>Back up one SWC library</strong>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>sdks<span style="color: #000000; font-weight: bold;">/</span>3.0.0<span style="color: #000000; font-weight: bold;">/</span>frameworks<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>air<span style="color: #000000; font-weight: bold;">/</span>airglobal.swc ~</pre></div></div>

</div>
</li>
<li><strong>Upgrade the AIR SDK</strong><br />
Download the <a href="http://adobe.com/products/air/tools/sdk" title="Get it from Adobe.com">AIR SDK for Linux</a> to a temporary directory and uncompress it:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp-air<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp-air<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #ff0000;">&quot;http://airdownload.adobe.com/air/lin/download/latest/air_1.5_sdk.tbz2&quot;</span>
$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xjf</span> air_1.5_sdk.tbz2
$ <span style="color: #c20cb9; font-weight: bold;">rm</span> air_1.5_sdk.tbz2</pre></div></div>

</div>
<p class="no-indent">Delete the current SDK 3.0.0 <code>runtime/</code> directory from the FB3 installation directory:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>sdks<span style="color: #000000; font-weight: bold;">/</span>3.0.0<span style="color: #000000; font-weight: bold;">/</span>runtimes<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</div>
<p class="no-indent">Overwrite the SDK 3.0.0 with the version you downloaded (it will overwrite some files&nbsp;&mdash;&nbsp;that&#8217;s fine):</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-a</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp-air<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>sdks<span style="color: #000000; font-weight: bold;">/</span>3.0.0<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</div>
<p class="no-indent">Replace these two files:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>sdks<span style="color: #000000; font-weight: bold;">/</span>3.0.0<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">rm</span> adl_lin adt_lin
$ <span style="color: #c20cb9; font-weight: bold;">mv</span> adl adl_lin
$ <span style="color: #c20cb9; font-weight: bold;">mv</span> adt adt_lin</pre></div></div>

</div>
<p class="no-indent">Create this new symbolic link:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>sdks<span style="color: #000000; font-weight: bold;">/</span>3.0.0<span style="color: #000000; font-weight: bold;">/</span>runtimes<span style="color: #000000; font-weight: bold;">/</span>air<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> linux<span style="color: #000000; font-weight: bold;">/</span> Linux</pre></div></div>

</div>
<p class="no-indent">Now it will <em>almost</em> work. When you run FB3 and try to run an AIR app, you will get this error:</p>
<p class="no-indent centred"><a href="http://flickr.com/photos/tripu/3839379717" title="Go to Flickr to see this image"><img src="http://farm3.static.flickr.com/2479/3839379717_2f25654446_o_d.png" title="Go to Flickr to see this image" /></a></p>
</li>
<li><strong>Repair the offending SWC library from the backup</strong>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cp</span> ~<span style="color: #000000; font-weight: bold;">/</span>airglobal.swc <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>flex-builder<span style="color: #000000; font-weight: bold;">/</span>sdks<span style="color: #000000; font-weight: bold;">/</span>3.0.0<span style="color: #000000; font-weight: bold;">/</span>frameworks<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>air<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</div>
<p class="no-indent">This will fix the previous error. Try to build Flash and AIR apps again in FB3; everything should work fine.</p>
</li>
</ol>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/flex" title="View all posts in Adobe Flex" rel="category tag">Adobe Flex</a>, <a href="http://blog.tripu.info/item/category/computers" title="View all posts in Computers" rel="category tag">Computers</a>, <a href="http://blog.tripu.info/item/category/images" title="View all posts in Images" rel="category tag">Images</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> <a href="http://blog.tripu.info/item/tag/adobe" rel="tag">Adobe</a>, <a href="http://blog.tripu.info/item/tag/flex" rel="tag">Adobe Flex</a>, <a href="http://blog.tripu.info/item/tag/air" rel="tag">Air</a>, <a href="http://blog.tripu.info/item/tag/bug" rel="tag">bug</a>, <a href="http://blog.tripu.info/item/tag/debian" rel="tag">Debian</a>, <a href="http://blog.tripu.info/item/tag/development" rel="tag">development</a>, <a href="http://blog.tripu.info/item/tag/error" rel="tag">error</a>, <a href="http://blog.tripu.info/item/tag/fb3" rel="tag">FB3</a>, <a href="http://blog.tripu.info/item/tag/flash" rel="tag">Flash</a>, <a href="http://blog.tripu.info/item/tag/flex-builder" rel="tag">Flex Builder</a>, <a href="http://blog.tripu.info/item/tag/how-to" rel="tag">how to</a>, <a href="http://blog.tripu.info/item/tag/howto" rel="tag">howto</a>, <a href="http://blog.tripu.info/item/tag/install" rel="tag">install</a>, <a href="http://blog.tripu.info/item/tag/installation" rel="tag">installation</a>, <a href="http://blog.tripu.info/item/tag/linux" rel="tag">Linux</a>, <a href="http://blog.tripu.info/item/tag/recipe" rel="tag">recipe</a>, <a href="http://blog.tripu.info/item/tag/set-up" rel="tag">set up</a>, <a href="http://blog.tripu.info/item/tag/setup" rel="tag">setup</a>, <a href="http://blog.tripu.info/item/tag/software-development" rel="tag">software development</a>, <a href="http://blog.tripu.info/item/tag/tip" rel="tag">tip</a>, <a href="http://blog.tripu.info/item/tag/ubuntu" rel="tag">Ubuntu</a></small></p>
<p><a href="http://blog.tripu.info/item/flex-linux#comments">17 comments so far</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/flex-linux/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Getting FB3&#8242;s design view to work with your MXML components</title>
		<link>http://blog.tripu.info/item/fb3</link>
		<comments>http://blog.tripu.info/item/fb3#comments</comments>
		<pubDate>Thu, 12 Feb 2009 23:19:24 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[design view]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[FB3]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Flex Builder 3]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[transcode]]></category>
		<category><![CDATA[transcoding]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/?p=246</guid>
		<description><![CDATA[For the past ten months I have been working on the same Flex/Air application. It is part of a larger, multi-tiered, multi-language project, of which the Flex subproject is but the front-end. (Actually, I have been involved in one of the other tiers, too, messing with a different programming language; not all my time has [...]]]></description>
			<content:encoded><![CDATA[<p><span class="capitals"><span class="huge">F</span>or the past ten</span> months I have been working on the same <a href="http://en.wikipedia.org/wiki/Adobe_Flex" title="@WP">Flex</a>/<a href="http://en.wikipedia.org/wiki/Adobe_Air" title="@WP"><acronym title="Adobe Integrated Runtime">Air</acronym></a> application. It is part of a larger, multi-tiered, multi-language project, of which the Flex subproject is but the front-end. (Actually, I have been involved in one of the other tiers, too, messing with a different programming language; not all my time has been devoted to Flex development during this year.)</p>
<p>Our Flex codebase is a nice instance of a complex, heterogeneous Air application to which probably more than twenty developers have contributed to date. A not-so-well-known Flex <acronym title="Model-view-controller">MVC</acronym> framework is at the core of the architecture, and we leverage quite a good number of Flex components and <a href="http://en.wikipedia.org/wiki/Adobe_Flash" title="@WP">Flash</a> libraries from third parties. We do unit testing, code coverage and continuous integration.</p>
<p>Ever since I joined the team (when the guys had just upgraded from the beta 3 of Air to Air 1.0) there has been an odd issue with the Air project in <a href="http://en.wikipedia.org/wiki/Flex_Builder" title="@WP">Flex Builder 3</a>: <strong>we could not use <acronym title="Flex Builder 3">FB3</acronym>&#8216;s “design view” to preview the layout of the application or to edit our custom <a href="http://en.wikipedia.org/wiki/MXML" title="@WP"><acronym title="MX XML">MXML</acronym></a> components</strong>.</p>
<p>The problems were two. First, <strong>the design view displayed what looked like a blank canvas&nbsp;&mdash;&nbsp;sometimes with whimsical wireframe edges that seemed to represent containers and other children</strong>. But only a few of those children appeared (if any at all). Rarely their sizes and positions were right, or their actual contents visible (see the screenshot below). Only when previewing simple components that inherited directly from Flex standard components (and <em>not</em> from our own components) the result seemed correct.</p>
<p class="no-indent centred"><a href="http://flickr.com/photos/tripu/3274607053" title="FB3, design view"><img src="http://farm4.static.flickr.com/3356/3274607053_7b92d9d0d7_d.jpg" title="FB3, design view" /></a></p>
<p>The second problem was that <strong>when switching from code view to design view a pair of errors suddenly appeared for every custom font that the project uses</strong> (even if the project builds just fine in code view):</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">unable to resolve '/project/assets/fonts/customFont.ttf' for transcoding | project | line 195
Unable to transcode /project/assets/fonts/customFont.ttf.                | project | line 195</pre></div></div>

</div>
<p>We gave it a go at trying to solve these issues at the time (ten months ago), with no luck. It never was much of a problem, though. Not for me at least, since I usually prefer to work on code view, even for building layouts and style-tweaking (in design view FB3 is slow rendering your changes, and I&#8217;m too fussy with my code to accept the auto-generated MXML). But boy, was it annoying.</p>
<p>A few days ago I investigated these problems again for a while&hellip; and this time I cracked it. Let me share what I learnt, because I think it is not that obvious.</p>
<p>The main problem has to do with the limitations of the design view in FB3. As you probably know (because you bothered to read this far), MXML is just a more readable way to describe <em>visual</em> Flash objects. MXML is more intuitive than <a href="http://en.wikipedia.org/wiki/ActionScript" title="@WP">ActionScript</a> to define the layout of your Flex <acronym title="Graphical User Interface">GUI</acronym> precisely because the nesting of <acronym title="eXtensible Markup Language">XML</acronym> nodes in MXML matches the nesting of visual components that those XML nodes represent. Actually, the Flex <acronym title="Software Development Kit">SDK</acronym> compiles all MXML classes to intermediate <acronym title="ActionScript">AS</acronym>. If you know that, you would presume that Flex Builder treats both AS classes and MXML classes in pretty much the same way. Well, it doesn&#8217;t.</p>
<p>It turns out that <strong>the “design view” can render any MXML class, provided that all its ancestor classes (up to the first standard Flash component) are defined in MXML too, i.e. not in AS</strong>.</p>
<p>In our project we had the situation represented in the diagram below. Most of the “screens” or “pages” in our application are based (directly or indirectly) on a common class. That common class, in turn, inherits from some other class that is defined within the MVC framework. The problem was, that common class was written in ActionScript, thus cutting off the hierarchy of MXML classes that the design view in FB3 “understands”.</p>
<p class="no-indent centred"><a href="http://flickr.com/photos/tripu/3275430202" title="Flex Class diagram"><img src="http://farm4.static.flickr.com/3420/3275430202_3fd4096102_o_d.png" title="Flex Class diagram" /></a></p>
<p>All I had to do was rewrite that class in MXML and keep the name of the file, changing its extension from <code>as</code> to <code>mxml</code>. It was a quick change: the class was short and I could maintain parts of the original ActionScript embedded within a <a href="http://livedocs.adobe.com/flex/3/html/usingas_2.html#216750" title="Adobe Flex 3 Help"><code>Script</code></a> component anyway. Note that no other changes were necessary, because the subclasses don&#8217;t care whether their superclass is originally written in AS or in MXML.</p>
<p>As for the other issue (the problem with the custom font families), it seems that <strong>the design view can&#8217;t load custom fonts unless they are defined as embedded resources in AS, i.e. not in separate <acronym title="Cascading Style Sheets">CSS</acronym> files</strong>.</p>
<p>Originally we had something like this:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:WindowedApplication</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Style</span> source=<span style="color: #ff0000;">&quot;../styles/fonts.css&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- … --&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:WindowedApplication</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

</div>
<p>Where <code>styles/fonts.css</code> contained:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@font-face {</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;_DefaultFont&quot;</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
    src<span style="color: #00AA00;">:</span>         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../assets/fonts/verdana.ttf&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #a1a100;">@font-face {</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;_DefaultFontBold&quot;</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
    src<span style="color: #00AA00;">:</span>         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../assets/fonts/verdanab.ttf&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p>I removed the CSS file and embeded the two font families directly into the MXML component (which is less elegant, of course):</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>WindowedApplication xmlns<span style="color: #000066; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">&lt;</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
&nbsp;
        <span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>=<span style="color: #990000;">'../assets/fonts/verdana.ttf'</span><span style="color: #000066; font-weight: bold;">,</span> fontWeight=<span style="color: #990000;">'normal'</span><span style="color: #000066; font-weight: bold;">,</span>
            <span style="color: #004993;">fontName</span>=<span style="color: #990000;">'_DefaultFont'</span><span style="color: #000066; font-weight: bold;">,</span> mimeType=<span style="color: #990000;">'application/x-font'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> thisObjectIsNeverUsedButItHasToExist_1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Class</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span>=<span style="color: #990000;">'../assets/fonts/verdanab.ttf'</span><span style="color: #000066; font-weight: bold;">,</span> fontWeight=<span style="color: #990000;">'bold'</span><span style="color: #000066; font-weight: bold;">,</span>
            <span style="color: #004993;">fontName</span>=<span style="color: #990000;">'_DefaultFontBold'</span><span style="color: #000066; font-weight: bold;">,</span> mimeType=<span style="color: #990000;">'application/x-font'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> thisObjectIsNeverUsedButItHasToExist_2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Class</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">&lt;!--</span> … <span style="color: #000066; font-weight: bold;">--&gt;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">:</span>WindowedApplication<span style="color: #000066; font-weight: bold;">&gt;</span></pre></div></div>

</div>
<p>I guess the moral of the story is: <em><a href="http://www.adobe.com" title="Adobe Systems Inc.">Adobe</a>, we need a better <acronym title="Integrated Development Environment">IDE</acronym>!</em></p>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/flex" title="View all posts in Adobe Flex" rel="category tag">Adobe Flex</a>, <a href="http://blog.tripu.info/item/category/computers" title="View all posts in Computers" rel="category tag">Computers</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> <a href="http://blog.tripu.info/item/tag/adobe" rel="tag">Adobe</a>, <a href="http://blog.tripu.info/item/tag/flex" rel="tag">Adobe Flex</a>, <a href="http://blog.tripu.info/item/tag/air" rel="tag">Air</a>, <a href="http://blog.tripu.info/item/tag/class" rel="tag">class</a>, <a href="http://blog.tripu.info/item/tag/css" rel="tag">CSS</a>, <a href="http://blog.tripu.info/item/tag/design-view" rel="tag">design view</a>, <a href="http://blog.tripu.info/item/tag/eclipse" rel="tag">Eclipse</a>, <a href="http://blog.tripu.info/item/tag/embed" rel="tag">embed</a>, <a href="http://blog.tripu.info/item/tag/error" rel="tag">error</a>, <a href="http://blog.tripu.info/item/tag/fb3" rel="tag">FB3</a>, <a href="http://blog.tripu.info/item/tag/flex-3" rel="tag">Flex 3</a>, <a href="http://blog.tripu.info/item/tag/flex-builder" rel="tag">Flex Builder</a>, <a href="http://blog.tripu.info/item/tag/flex-builder-3" rel="tag">Flex Builder 3</a>, <a href="http://blog.tripu.info/item/tag/font" rel="tag">font</a>, <a href="http://blog.tripu.info/item/tag/issue" rel="tag">issue</a>, <a href="http://blog.tripu.info/item/tag/resource" rel="tag">resource</a>, <a href="http://blog.tripu.info/item/tag/transcode" rel="tag">transcode</a>, <a href="http://blog.tripu.info/item/tag/transcoding" rel="tag">transcoding</a>, <a href="http://blog.tripu.info/item/tag/trick" rel="tag">trick</a></small></p>
<p><a href="http://blog.tripu.info/item/fb3#comments">7 comments so far</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/fb3/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>«Mind you»</title>
		<link>http://blog.tripu.info/item/mindyou</link>
		<comments>http://blog.tripu.info/item/mindyou#comments</comments>
		<pubDate>Tue, 03 Jun 2008 23:12:42 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Images]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/?p=116</guid>
		<description><![CDATA[Una de tantas iniciativas geniales que tienen en mi nueva empresa es la que llaman «Mind you». Cada mes, unos catorce empleados crean una especie de presentación sobre sí mismos. Cada uno diseña una hoja, o pantalla. (¿Cómo demonios se dice «slide» en español? Y no me digáis «diapositiva»&#8230;). Se trata de reflejar tu personalidad, [...]]]></description>
			<content:encoded><![CDATA[<p><span class="capitals">Una de tantas</span> iniciativas geniales que tienen en <a href="http://www.loyalty.co.uk" title="Loyalty Management Group">mi nueva empresa</a> es la que llaman <em>«Mind you»</em>.</p>
<p>Cada mes, unos catorce empleados crean una especie de presentación sobre sí mismos. Cada uno diseña una hoja, o pantalla. (¿Cómo demonios se dice <em>«slide»</em> en español? Y no me digáis «diapositiva»&hellip;). Se trata de reflejar tu personalidad, tus <del>parafilias</del> preocupaciones, intereses e inquietudes, con proporción 4:3, de forma libre y creativa. Cada hoja se imprime entonces en formato A2 y todas se cuelgan en la pared de un pasillo (casualmente, el que está junto a <a href="http://flickr.com/search/?w=90151774%40N00&#038;q=%22war+room%22&#038;m=tags" title="Aquí curro yo">mi sala de trabajo</a>). Además, se junta todo en una presentación que se comparte en la <em>intranet</em> hasta el mes siguiente.</p>
<p>Como soy de los más nuevos en la empresa, hace unos días la gente de <abbr title="Recursos Humanos">RRHH</abbr> me pidió que participase en la próxima tanda de carteles.</p>
<p>Así que me puse a pensar en ideas para hacer un buen cartel que hablase de mí mismo y de mi mecanismo. Los carteles que he visto colgados en la pared durante estas semanas son muy variados. Abundan los <em>collages</em> de fotos con familia y amigos. Otros hacen un popurrí de imágenes relacionadas con sus aficiones, de fotografías de su último viaje o cosas así. También hay alguna ristra de citas. Unos pocos son realmente originales y están muy bien compuestos. Yo quería hacer algo medio original.</p>
<p>Por supuesto, la primera idea me vino inmediatamente; después de todo, es facilísimo resumir lo que hay en mi cabeza <a href="http://flickr.com/photos/istanbul2/1433423193/sizes/o" title="¡Ñam!">con una sola imagen [<abbr title="Not Safe For Work">NSFW</abbr>]</a>. O <a href="http://flickr.com/photos/istanbul2/2270140047/sizes/o" title="¡Re-ñam!">con dos imágenes [<abbr title="Not Safe For Work">NSFW</abbr>]</a>, a lo más. Sin embargo, por algún motivo descarté la idea. Pensé que quizá no era apropiado que mis doscientos compañeros de trabajo me asociasen a esa imagen. Je.</p>
<p>Así que reprimí mi verdadera naturaleza, aparqué las pulsiones primarias e intenté centrarme en «lo demás». Que algo hay.</p>
<p>Hace tiempo que pienso que las nubes de etiquetas que uno va construyendo en sitios sociales y agregadores son una magnífica descripción de uno mismo. Una descripción distorsionada por el propio medio, es cierto. Pero si usas las etiquetas correctamente, después de cierto tiempo es difícil que quede algún aspecto principal de ti mismo sin reflejar en forma de etiqueta.</p>
<p>Quería llenar el cartel con alguna fotografía de <a href="http://flickr.com/photos/tripu/favorites/show" title="Mis favoritos en Flickr">las que amo</a>. Elegí una de las obsesiones de esta etapa de mi vida, Tokyo, y busqué entre mis fotos de Japón. Ninguna era lo suficientemente buena; mucho menos para imprimir en grande. Tras mucho buscar opté por una foto ajena de Shibuya. Ya tenía un fondo con mucho contraste; oscuro y lleno de neón. Pero a la vez quería inundar el cartel con etiquetas. Empecé a acariciar la idea de saturar todo el espacio con información.</p>
<p>Con la colaboración de <a href="http://images.google.com/imghp?hl=en&#038;tab=wi" title="«The most comprehensive image search on the web», dicen ellos"><em>Google Images</em></a> junté unas cuantas cosas que me son queridas. Pero si las pegaba todas, unas junto a otras, terminaba con un <em>collage</em> ortopédico, y no quería eso. Decidí que <a href="http://del.icio.us/tripu" title="Tela de enlaces">mis etiquetas en del.icio.us</a> eran más descriptivas que <a href="http://flickr.com/photos/tripu/tags" title="Palabros a cascoporro">las de Flickr</a>.</p>
<p>Tenía curiosidad por ver cuántas capas de información (texto e imágenes) se pueden superponer sin perder la legibilidad de ninguna capa. Si mi experimento sirve para algo, la respuesta es «dos» :¬) Solo me permití añadir una referencia a <em>«Blade Runner»</em> fundiéndose por la izquierda, y superpuse 日本語 («japonés», escrito en ídem) en la parte derecha. Después jugué un poco con las máscaras de transparencia, los niveles de cada capa y algunos efectos, hasta que me gustó el conjunto.</p>
<p>Todo esto, por supuesto, <a href="http://www.gimp.org/" title="The GNU Image Manipulation Program">Gimp</a> mediante. Alabado sea mil veces.</p>
<p class="no-indent centred"><a href="http://flickr.com/photos/tripu/2548768215/sizes/l" title="«Mind you»"><img src="http://farm4.static.flickr.com/3134/2548768215_42ed86ef88_d.jpg" title="«Mind you»" /></a></p>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/images" title="View all posts in Images" rel="category tag">Images</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> </small></p>
<p><a href="http://blog.tripu.info/item/mindyou#comments">6 comments so far</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/mindyou/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Adobe Flex in 10 minutes</title>
		<link>http://blog.tripu.info/item/flex</link>
		<comments>http://blog.tripu.info/item/flex#comments</comments>
		<pubDate>Thu, 20 Mar 2008 10:57:25 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/item/flex</guid>
		<description><![CDATA[If you are a software developer, a web designer or some other sort of techie it&#8217;s very likely that you have been hearing and/or reading about Adobe Flex lately. Well, if you aren&#8217;t using it yourself but feel curious about it, or if you just want to have a notion, this extremely quick introduction is [...]]]></description>
			<content:encoded><![CDATA[<p><span class="capitals"><span class="huge">I</span>f you are</span> a software developer, a web designer or some other sort of techie it&#8217;s very likely that you have been hearing and/or reading about <a href="http://www.adobe.com/products/flex/" title="Adobe's official web page for Flex">Adobe Flex</a> lately. Well, if you aren&#8217;t using it yourself but feel curious about it, or if you just want to have a notion, this extremely quick introduction is for you. Skimming through this post will not turn you into a Flex developer, but it will allow you to nod confidently and even drop some canny words the next time that Flex pops up in a conversation around the watercooler.</p>
<p>First things first &mdash; <strong>what Adobe Flex is <em>not</em></strong>:</p>
<ul>
<li>It is certainly <em>not</em> <a href="http://www.gnu.org/software/flex/manual/" title="Fast Lexical Analyzer Generator">a tool for generating lexical analysers</a> ;¬)</li>
<li>It&#8217;s <em>not</em> “the new version of <a href="http://www.adobe.com/products/flash/" title="Adobe's official web page for Flash">Flash</a>” (<abbr title="Formerly Known As">FKA</abbr> “Macromedia Flash”). Development of Flash is on-going and the two products coexist. Flex hasn&#8217;t replaced (and won&#8217;t replace) Flash anytime soon, the reason for that being that&hellip;</li>
<li>&hellip;Flex is <em>not</em> “an alternative to Flash”. Sorry to disappoint you, but Flex is <em>not</em> a way to get rid of the dependence on the <a href="http://www.adobe.com/products/flashplayer/" title="Adobe's official web page for Flash Player">Flash Player</a>. Actually Flex is built on top of Flash and needs Flash Player to run.</li>
<li>It&#8217;s <em>not</em> a technology to build large, native apps that need to work close to the underlying platform or which performance needs to be optimised (read below to see why I believe this).</li>
</ul>
<p><strong>Flex in a nutshell (a rather small nutshell):</strong></p>
<p>Flex is an attempt by <a href="http://www.adobe.com/" title="Adobe's web site">Adobe</a> to make Flash attractive to, and suitable for, many software developers who were disregarding Flash as something not serious enough to use for developing “proper software”. Adobe has done a praiseworthy effort in that sense and has brought Flash to the realm of <abbr title="object-oriented">OO</abbr> programming. Adobe used <a href="http://www.eclipse.org/" title="The Eclipse development platform">Eclipse</a> to develop <a href="http://www.adobe.com/products/flex/features/flex_builder/" title="Adobe's official web page for Flex Builder">Flex Builder</a>. Flex Builder alone does a lot to make old-skool software developers feel at home &mdash; it&#8217;s a proper <abbr title="Integrated Development Environment">IDE</abbr> with all the features you would expect, plus the extensibility (and the slowness, I&#8217;m afraid) of Eclipse.</p>
<p>Flex developers use the Flex <abbr title="Software Development Kit">SDK</abbr> (command line compilers and component class library; free as in “freedom”) and the Flex Builder (the IDE) to build their applications. Flex apps are written mainly in two languages:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/ActionScript" title="In WP">Actionscript</a>, an ECMAScript-based language that exists since the first Flash Player.</li>
<li><a href="http://en.wikipedia.org/wiki/MXML" title="In WP">MXML</a>, a loose, proprietary implementation of <abbr title="Extensible Markup Language">XML</abbr> used to define <abbr title="Graphical User Interface">GUI</abbr> elements.</li>
</ul>
<p>The output of a Flex project is one or more Flash files (<code>.swf</code>). In terms of the approach to the development process, the single most important change from Flash to Flex is probably <strong>removing the “movie” way of thinking</strong>. Flash animators are used to the “movie paradigm” in which the time is an essential concept. In their animations they have been working with key concepts like “timeline”, “frame” and “loop”. Flex abandons that approach.</p>
<p>I have found that, in general, software developers without any experience with Flash get used to Flex even faster than Flash designers who don&#8217;t know much about programming.</p>
<p><strong>What Flex is good at:</strong></p>
<ul>
<li><strong>Rendering cool interfaces.</strong> Animations, transitions, effects, gradients, reflections, customised skins, embedded movies, nice charts, changes in opacity, layouts that are resized well when their container is resized, etc. For a demo, check the <a href="http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html" title="Flex 2 Component Explorer">Flex 2 Component Explorer</a>.</li>
<li><strong>Working on all major desktops and web browsers and many mobile devices.</strong> <abbr title="Operating System">OS</abbr>&#8216;s: Windows, Mac OS, Linux and Solaris. Browsers: <abbr title="Internet Explorer">IE</abbr>, Gecko-based browsers, Safari, Opera. Mobile devices: many, and <a href="http://ilounge.com/index.php/news/comments/adobe-ceo-announces-flash-for-iphone/" title="Flash for the iPhone">more to come</a>.</li>
<li><strong>Keeping the same “look &#038; feel” everywhere.</strong> You can see the default Flex 2 “look &#038; feel” in the <a href="http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html" title="Flex 2 Style Explorer">Flex 2 Style Explorer</a>.</li>
<li><strong>Integrating and communicating with other Adobe formats.</strong> Flash movies, Acrobat documents, ColdFusion, Dreamweaver, etc.</li>
</ul>
<p><strong>What Flex is <em>not</em> good at:</strong></p>
<ul>
<li><strong>Computationally expensive software.</strong> As we saw before, Flex stresses GUI aesthetics, intuitive design, portability, compatibility with existing Flash files and other Adobe tools, easy deployment, etc. And it was aimed at the web (in spite of <a href="http://www.adobe.com/products/air/" title="Adobe's official web page for Air">Air</a>). So don&#8217;t expect it to be any good at doing system calls, invoking hardware drivers, messing with the network at low-level, fine-tuning loops to save cycles of <abbr title="Central Processing Unit">CPU</abbr>, dealing with gigabytes of data, delivering real-time, etc. Because Flex apps are deployed as Flash files, every Flex app “lives” inside the Flash security sandbox, which prevents it from accessing many of the resources of the computer. Also, Flash is a proprietary format that doesn&#8217;t run natively but is interpreted by the Flash Player. That extra layer of translation decreases the performance.</li>
<li><strong>Classic Flash stuff.</strong> Don&#8217;t bother to learn Flex if all you need to do is Flash banners and simple animations. For that you will need a timeline, drawing tools and accuracy at pixel-level. Flex is not designed for that.</li>
<li><strong>Being extrovert with its neighbours.</strong> I hear that even Air makes it quite difficult to launch an external executable from a Flex application.</li>
</ul>
<p>Now, the “hello world” is mandatory, so here it goes.</p>
<p>This application simply displays a customised greeting (it&#8217;s a “hello world” on steroids). We&#8217;ll make the GUI <em>inherit</em> from the layer that processes the information, in a “code-behind” manner.</p>
<p>First, the Actionscript class contained in the file <code>info/tripu/blog/flex/SimpleApp.as</code>. This class extends the standard <code>Application</code> class and defines what to do with data:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #004993;">info</span><span style="color: #000066; font-weight: bold;">.</span>tripu<span style="color: #000066; font-weight: bold;">.</span>blog<span style="color: #000066; font-weight: bold;">.</span>flex <span style="color: #000000;">&#123;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.</span>Alert<span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>Application<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> SimpleApp <span style="color: #0033ff; font-weight: bold;">extends</span> Application <span style="color: #000000;">&#123;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> greet <span style="color: #000000;">&#40;</span>who<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            Alert<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">show</span> <span style="color: #000000;">&#40;</span><span style="color: #990000;">'Hello, '</span> <span style="color: #000066; font-weight: bold;">+</span> who <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #990000;">'!'</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

</div>
<p>Second, the MXML application <code>HelloWorld.mxml</code>. It defines the GUI by using an instance of the class <code>SimpleApp</code> and adding a couple of visual controls to it. Notice how the <abbr title="Actionscript">AS</abbr> class that we created before is now used straight as an XML element:</p>
<div class="code-block">

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;tripu:SimpleApp</span> xmlns:tripu=<span style="color: #ff0000;">&quot;info.tripu.blog.flex.*&quot;</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</span> id=<span style="color: #ff0000;">&quot;user&quot;</span> text=<span style="color: #ff0000;">&quot;world&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> label=<span style="color: #ff0000;">&quot;Greet&quot;</span> click=<span style="color: #ff0000;">&quot;{greet (user.text)}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/tripu:SimpleApp</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

</div>
<p>The result of compiling those two files in a Flex project is this Flash file, <code>HelloWorld.swf</code> (you&#8217;ll need Flash Player version 8 or above to see the embedded Flash object):</p>
<p><embed src="http://blog.tripu.info/wp-content/uploads/2008/03/helloworld.swf" quality="high" bgcolor="#869ca7" width="50%" height="100%" name="HelloWorld" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"><br />
</embed></p>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/flex" title="View all posts in Adobe Flex" rel="category tag">Adobe Flex</a>, <a href="http://blog.tripu.info/item/category/computers" title="View all posts in Computers" rel="category tag">Computers</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> </small></p>
<p><a href="http://blog.tripu.info/item/flex#comments">4 comments so far</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/flex/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Synchronizing with a Polar HRM</title>
		<link>http://blog.tripu.info/item/hrm</link>
		<comments>http://blog.tripu.info/item/hrm#comments</comments>
		<pubDate>Sun, 17 Dec 2006 19:48:09 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/item/hrm</guid>
		<description><![CDATA[One of my tasks during the development of Smart Zones Beta 2 is the HRM communication module, that allows users to import data about their training sessions to the application. Those cyclist or joggers who use HRM&#8217;s know what it means. For the rest, let me briefly explain it. “HRM” stands for “Heart Rate Monitor”. [...]]]></description>
			<content:encoded><![CDATA[<p>One of my tasks during the development of <a href="http://www.trainsmart.com:7001/pg/registration/rc_Apply1.jsp" title="You can use it for free :¬)">Smart Zones Beta 2</a> is the <abbr title="Heart Rate Monitor">HRM</abbr> communication module, that allows users to import data about their training sessions to the application. Those cyclist or joggers who use HRM&#8217;s know what it means. For the rest, let me briefly explain it.</p>
<p>“HRM” stands for “<a href="http://en.wikipedia.org/wiki/Heart_rate_monitor" title="Wikipedia can tell you more">Heart Rate Monitor</a>”. HRM&#8217;s are small portable devices that measure and keep a log of your heart rate, i.e. the pace of your heart beats. Typically, you attach a strap to your chest and it detects the small electrical voltages that your heart produces when it&#8217;s working. The other component is a radio receiver that usually has the appearance of a wrist watch. This device computes your current <abbr title="Heart Rate">HR</abbr>, shows that value on its small display, and records the whole sequence of values during your training session. It often polls the strap at intervals of five seconds. The information gathered may be shown in a <a href="http://www.pccoach.com/images/intervals.jpg" title="A sample image by Polar">heart rate graph</a>.</p>
<p>Nowadays you don&#8217;t need to be a pro to have one of these gadgets — they are sold with prices around £100 (~&nbsp;€150) or even less. They are useful to keep your workouts at a high level without overtraining. Also, when you run or cycle, the <i>messages</i> that your body <i>sends</i> to you (about how tired you are, or how intense is the pain in your limbs) are pretty subjective, and highly influenced by psychological factors (e.g. you tolerance and perceptions are not quite the same if you train when you feel like shit). HRM&#8217;s, on the other hand, always give you steel-cold measures that you can trust (damn) and let you know in which of your <a href="http://en.wikipedia.org/wiki/Heart_zones" title="Now that you are reading this, I bet you are in your first HRZ">heart rate zones</a> you are putting your heart.</p>
<p><span id="more-41"></span></p>
<p>An application like Smart Zones must integrate with HRM&#8217;s to let users feed <a href="http://trainsmart.com" title="Trainsmart web site">Trainsmart</a>&#8216;s database with accurate data about their training. The more accurate that feedback is, the better their suggested training programme will be.</p>
<p><a href="http://flickr.com/photos/tripu/316434301" title="Go to Flickr to see this image"><img class="inserted" src="http://static.flickr.com/109/316434301_ba24ce0ec5_o_d.png" alt="Go to Flickr to see this image" title="Go to Flickr to see this image" /></a><a href="http://www.polar.fi/polar/entry.html" title="Polar's web site front page">Polar</a>, a Finnish company, virtually <i>invented</i> HRM&#8217;s. At this stage of Smart Zones, I have been working with their <abbr title="Infrared Data Association">IrDA</abbr> <abbr title="Application Programming Interface">API</abbr> to make some of their HRM&#8217;s <i>talk</i> to Smart Zones via an infrared port (or an USB-to-IrDA device). I started working with the version 1.40 of their <abbr title="Dynamic Link Library">DLL</abbr> and later upgraded to version 1.60. Everything worked fine, except that the progress bar that usually was shown during the whole synchronization process (see the image beside) was missing in the latest version. The sequence of commands that I was using was this one:</p>
<p class="code">
<pre><code>fnHRMCom_ResetIRCommunication (0)
    fnHRMCom_StartIRCommunication (HRMCOM_PARAM_IRDA, &quot;IR&quot;)
    fnHRMCom_ReadMonitorInfo (&amp;psg, &amp;psmi)
    fnHRMCom_ReadExercisesData (hWnd, FALSE)

    for (int i = 0; i &lt; psmi.iTotalFiles; i ++) {
        fnHRMCom_GetExeFileInfo (i, &amp;pef)
        fnHRMCom_AnalyzeFile (i, 0)
        fnHRMCom_SaveExerciseHRM (hDlg, szOutputFile, 0)
    }</code></pre>
</p>
<p>I knew that not having that progress bar would be a pain for users since infrared communication is infamous because of its low bandwidth. If a user tries to send data about all his 100 or 200 training sessions in the last year, it may take a few minutes to complete. So some feedback is vital to let them know that the synchronization is in progress. After spending far too long trying to find out why that dialog box was missing in the new version of the DLL, I did what software engineers sometimes do in such circumstances: undo the last changes and try to find out at what exact point things changed so badly. In that case, that meant reverting Polar&#8217;s DLL to its previous version (1.40).</p>
<p>It worked, exactly as it should. There it was that nice dialog box with its progress bar.</p>
<p>Eventually I discovered that the parent window handle that I was passing to the function <code>fnHRMCom_ReadExercisesData</code> was <code>NULL</code>, and this function is supposed to receive a valid parent window. But even bearing that in mind, I don&#8217;t understand why it needs another window handle if it works the same without it!</p>
<p>Never mind. Smart Zones is now accepting heart rate data from a wide range of Polar IrDA watches. And more Polar interfaces and other HRM brands are to come in the next weeks — we are pushing upgrades more or less once a week.</p>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/computers" title="View all posts in Computers" rel="category tag">Computers</a>, <a href="http://blog.tripu.info/item/category/images" title="View all posts in Images" rel="category tag">Images</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> </small></p>
<p><a href="http://blog.tripu.info/item/hrm#comments">No comments yet</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/hrm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Relatividad</title>
		<link>http://blog.tripu.info/item/relatividad</link>
		<comments>http://blog.tripu.info/item/relatividad#comments</comments>
		<pubDate>Thu, 19 Oct 2006 19:36:18 +0000</pubDate>
		<dc:creator>tripu</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.tripu.info/item/relatividad</guid>
		<description><![CDATA[«Nacen miles de estrellaspor el choque de dos galaxias» En la portada de ElPais.es, ayer. Con cosas tan importantes sucediendo a mi alrededor, yo no debería estar preocupado por mi presentación de la próxima semana, ¿verdad? Categories: Life, Work; Tags: 4 comments so far        © 2006-2010 tripu        ]]></description>
			<content:encoded><![CDATA[<p class="headline">«Nacen miles de estrellas<br />por el choque de dos galaxias»</p>
<p>En la portada de <a href="http://www.elpais.es" title="El país de toda la vida, pero en el internete">ElPais.es</a>, ayer.</p>
<p>Con cosas tan importantes sucediendo a mi alrededor, yo no debería estar preocupado por mi presentación de la próxima semana, ¿verdad?</p>
<hr />
<p><small><strong>Categories:</strong> <a href="http://blog.tripu.info/item/category/life" title="View all posts in Life" rel="category tag">Life</a>, <a href="http://blog.tripu.info/item/category/work" title="View all posts in Work" rel="category tag">Work</a>; <strong>Tags:</strong> </small></p>
<p><a href="http://blog.tripu.info/item/relatividad#comments">4 comments so far</a>        © 2006-2010 <a href="http://tripu.info">tripu</a>        <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><img alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-sa/2.0/uk/80x15.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tripu.info/item/relatividad/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

