<?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>Yo me sueño... &#187; doctor urbano</title>
	<atom:link href="http://www.marioberges.com/blog/category/doctor-urbano/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marioberges.com/blog</link>
	<description>Un blog sobre la vida de un estudiante de doctorado en Pittsburgh, PA.</description>
	<lastBuildDate>Fri, 03 Sep 2010 14:00:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Profesor Asistente</title>
		<link>http://www.marioberges.com/blog/2010/05/profesor-asistente/</link>
		<comments>http://www.marioberges.com/blog/2010/05/profesor-asistente/#comments</comments>
		<pubDate>Sun, 23 May 2010 03:52:56 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[anécdotas]]></category>
		<category><![CDATA[futuro]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1766</guid>
		<description><![CDATA[Assistant Professor Carnegie Mellon University (CMU) Profesor Asistente. Ese será mi nuevo título, como ya habrán leído en una entrada anterior. Me quedo en Pittsburgh por unos años más, quién sabe cuántos. No había escrito nada al respecto porque para hacerlo tenía que estar completamente en paz conmigo mismo, haber asumido por completo la decisión [...]]]></description>
			<content:encoded><![CDATA[<p><em>Assistant Professor</em><br />
Carnegie Mellon University (CMU)</p>
<p>Profesor Asistente. Ese será mi nuevo título, como ya habrán leído en una entrada <a href="http://www.marioberges.com/blog/2010/05/twitter-doctorurbano-resumen-para-semana-de-2010-05-15/">anterior</a>. Me quedo en Pittsburgh por unos años más, quién sabe cuántos. No había escrito nada al respecto porque para hacerlo tenía que estar completamente en paz conmigo mismo, haber asumido por completo la decisión y volver nuevamente a la rutina. Ahora que estoy listo, quiero escribir sobre dos cosas: lo que significa ser un Assitant Professor, y cómo llegué a la decisión.</p>
<p><span id="more-1766"></span>Las últimas tres o cuatro semanas han sido brutalmente agotadoras. Tomar decisiones de este tipo es, por lo menos para mí, un trabajo a tiempo completo. Insomnio, ansiedad, depresión, euforia; pasé por cada uno de esos estados a veces en un mismo día. En la mañana me despertaba seguro de que una de las opciones era la mejor, y pronto al caer la tarde ya había cambiado de opinión y odiaba mi decisión de por la mañana. Supongo que muchos de ustedes también habrán pasado por situaciones similares. Cuando todas las opciones son buenas, la decisión se torna difícil y a veces uno preferiría no tener tantas buenas opciones.</p>
<p>Empecemos por definir lo que implica ser Profesor Asistente, la opción que elegí al final. La razón principal por la que quiero describir el puesto es que, como es tan distinto a ser profesor en países latinoamericanos (o al menos República Dominicana), muchas de las personas a quienes les he dado la noticia la reciben en el contexto de la educación allá y entonces preguntan &#8220;¡Ah, qué bien! Elijes unas dos o tres sesiones por la mañana para dar clases y después tienes las tardes libres&#8221;, o también &#8220;¿y qué vas a hacer además de eso?&#8221;.</p>
<p>La primera gran diferencia es que impartir clases no es la prioridad para un profesor en una universidad como Carnegie Mellon (ó cualquier otra <a href="http://en.wikipedia.org/wiki/Research_I_university">Research I University</a>). Lo más importante son las publicaciones, el impacto que uno tenga en su área de investigación. Aun así tengo que dar clases, pero la carga es mínima en comparación. Por ejemplo, este primer año sólo tengo que dar una materia por 6 semanas. El resto del tiempo tengo que invertirlo en escribir propuestas, publicar artículos y asesorar alumnos (en fin, hacer investigación).</p>
<p>La segunda diferencia está en la profesión académica en sí y las posibilidades, específicamente con relación al sistema de &#8220;<a href="http://en.wikipedia.org/wiki/Tenure">tenure</a>&#8220;. El tenure es un término que se usa para referirse a la calidad de vitalicio: un cargo que dura la vida de quien lo tome. Después de tener tenure, pocas cosas pueden hacerte perder el trabajo. Para conseguir tenure en una universidad aquí hay que demostrar un buen historial de publicaciones, enseñanza y servicio. El proceso, que en CMU toma unos nueve años, está diseñado para garantizar el derecho de la libertad académica: para proteger a los investigadores cuando se alejan de la opinión de la mayoría, cuando están abiertamente en desacuerdo con las autoridades o cuando quieren investigar temas no comunes.</p>
<p>Hay muchas otras diferencias, pero estas son las principales. Hay, también, otras cosas que se mantienen iguales como, por ejemplo, la flexibilidad que ofrece la profesión y la vocación de servicio que la caracteriza.</p>
<p>Las otras dos opciones que tenía, entrando ahora al segundo tema, no eran para carreras académicas. Una de ellas era la posición como Research Staff Member en el Watson Research Lab de IBM, en Nueva York. Y la otra era como ingeniero encargado de una división para una compañía &#8220;start-up&#8221; en California.  De estas dos la que más me atraía era la de IBM, ya que cuando visité las instalaciones y tuve mis entrevistas me atrajo bastante el ambiente, sobretodo intelectualmente. Pero, y aquí viene el por qué de la decisión, era en Nueva York, y Laura está aquí en Pittsburgh por otros dos años, y quedándome como profesor aquí todavía puedo tener proyectos con IBM y con la otra compañía, y desde esta posición tengo más flexibilidad y mucho más independencia (no tengo jefes directos, ni una agenda corporativa detrás de las investigaciones, etc.).</p>
<p>Y así concluyo esta larga entrada. Ahora tengo que ponerme a escribir mi tesis para ver si puedo defenderla en Agosto justo antes de empezar el nuevo trabajo. Espero poder escribir más a menudo, y mantenerlos al día.</p>
<p>Por cierto, si saben de alguien que quiera hacer un doctorado en el área en la que trabajo, por favor pónganlo en contacto conmigo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/05/profesor-asistente/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>CMU Magazine Article about our project</title>
		<link>http://www.marioberges.com/blog/2010/02/cmu-magazine-article-about-our-project/</link>
		<comments>http://www.marioberges.com/blog/2010/02/cmu-magazine-article-about-our-project/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 04:33:40 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[publications]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1603</guid>
		<description><![CDATA[There is an article about our electricity monitoring project on the latest issue of the Carnegie Mellon Engineering Magazine. The direct link to the PDF that contains the article is here: &#8220;New research will help consumers track home energy consumption&#8221;, pages 14-15. Two minor things to note: They quoted me saying &#8220;desegregation&#8220;, when I actually [...]]]></description>
			<content:encoded><![CDATA[<p>There is an article about our electricity monitoring project on the latest issue of the <a href="http://www.cit.cmu.edu/alumni/magazine/index.html">Carnegie Mellon Engineering Magazine</a>. The direct link to the PDF that contains the article is here:</p>
<p><a href="http://www.cit.cmu.edu/files/magazines/winter_2009_2010/tech_today_winter_09_10.pdf"><img src="http://www.marioberges.com/blog/wp-content/uploads/2010/02/magazine-150x150.png" alt="" title="CMU Engineering Magazine article on our NILM project." width="150" height="150" class="aligncenter size-thumbnail wp-image-1605" /></a>
<div style="text-align:center;"><a href="http://www.cit.cmu.edu/files/magazines/winter_2009_2010/tech_today_winter_09_10.pdf">&#8220;New research will help consumers track home energy consumption&#8221;</a>, pages 14-15.</div>
<p>Two minor things to note:
<ul>
<li>They quoted me saying &#8220;<a href="http://en.wikipedia.org/wiki/Desegregation">desegregation</a>&#8220;, when I actually said &#8220;<a href="http://en.wikipedia.org/wiki/Desegregation">disaggregation</a>&#8220;. After looking up the definition of the former, it&#8217;s not awfully far.</li>
<li>The article, in the third paragraph, somewhat overestimates the time we&#8217;ve spent working on this (e.g., I haven&#8217;t been here 4 years yet).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/02/cmu-magazine-article-about-our-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-Intrusive Load Monitoring</title>
		<link>http://www.marioberges.com/blog/2010/02/non-intrusive-load-monitoring/</link>
		<comments>http://www.marioberges.com/blog/2010/02/non-intrusive-load-monitoring/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 03:45:06 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[nilm]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1565</guid>
		<description><![CDATA[After exactly one year of making a video about our Non-Intrusive Load Monitoring (NILM) project , I finally got approval from our funding source to release it. Obviously, the current prototype is different from what is shown in the video, but nevertheless, it provides a quick overview of the main idea behind the project. The [...]]]></description>
			<content:encoded><![CDATA[<p>After exactly one year of making a video about our Non-Intrusive Load Monitoring (NILM) project , I finally got approval from our funding source to release it. Obviously, the current prototype is different from what is shown in the video, but nevertheless, it provides a quick overview of the main idea behind the project.</p>
<p><object width="480" height="385" class="aligncenter"><param name="movie" value="http://www.youtube-nocookie.com/v/4HBwEgq7DXI&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/4HBwEgq7DXI&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>The goal of this project is to develop simple and inexpensive solutions for obtaining appliance-specific electricity consumption information from easy-to-obtain data sources like the overall power of the building. It&#8217;s the idea for which we recently received $1.5M from the National Science Foundation.</p>
<p>We attempt to detect and correctly identify state-transitions for individual appliances in a building (e.g., a light-bulb going from state &#8220;off&#8221; to state &#8220;on&#8221;), by carefully analyzing the overall voltage and current signals for the building&#8217;s electrical distribution system. We also explore how different statistical and machine learning tools can be applied to solve the problem.</p>
<p>NILM has been around for more than two decades, but mainly as a research topic. What we really want to do is to take it a step further and find out what are the obstacles that we need to overcome to bring it to homes.</p>
<p>I will be posting more about it now that I finally found a quick way to introduce it to all of you (i.e., the video). There are also some interesting links to the other project I am working on: <a href="http://vimeo.com/9079961">Sensor Andrew</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/02/non-intrusive-load-monitoring/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Configuring Digi Real Port 1.9-20 on RHEL WS 5</title>
		<link>http://www.marioberges.com/blog/2010/02/configuring-digi-real-port-1-9-20-on-rhel-ws-5/</link>
		<comments>http://www.marioberges.com/blog/2010/02/configuring-digi-real-port-1-9-20-on-rhel-ws-5/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 13:00:54 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[RS-232]]></category>
		<category><![CDATA[serial]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1529</guid>
		<description><![CDATA[When trying to configure the Digi Real Port daemon (a virtual serial port, or RS-232 over IP) on a Red Hat machine (RHEL Server release 5.4), I found that installing form the RPM did not work properly. Some kernel module was not loaded. After doing a little research and tweaking, I solved it by compiling [...]]]></description>
			<content:encoded><![CDATA[<p>When trying to configure the <a href="http://ftp1.digi.com/support/driver/93000359_p.txt">Digi Real Port</a> daemon (a virtual serial port, or RS-232 over IP) on a Red Hat machine (RHEL Server release 5.4), I found that installing form the RPM did not work properly. Some kernel module was not loaded.</p>
<p>After doing a little research and tweaking, I solved it by compiling it from <a href="http://ftp1.digi.com/support/driver/40002086_P.tgz">source</a>, and following the steps below:</p>
<ul>
<li>1) Modify your configure.in file, by adding:<br />
<code>KERNEL_HEADERS=/usr/src/kernels/your_current_kernel</code><br />
And substituting &#8220;your_current_kernel&#8221; with yours (e.g. 2.6.18-164.11.1.el5xen-x86_64).</li>
<li>2) Place that line of code, at around line 405, right before:<br />
<code>if test -z "$KERNEL_HEADERS";</code></li>
<li>3) From the shell, run the following to complete the installation:<br />
<code>autoconf<br />
./configure<br />
make<br />
sudo make install</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/02/configuring-digi-real-port-1-9-20-on-rhel-ws-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presentación de Sensor Andrew en IBM</title>
		<link>http://www.marioberges.com/blog/2010/02/presentacion-de-sensor-andrew-en-ibm/</link>
		<comments>http://www.marioberges.com/blog/2010/02/presentacion-de-sensor-andrew-en-ibm/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 05:07:02 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[investigación]]></category>
		<category><![CDATA[presentaciones]]></category>
		<category><![CDATA[Sensor Andrew]]></category>
		<category><![CDATA[vídeos]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1519</guid>
		<description><![CDATA[Después de algunas súplicas y averiguaciones sobre los derechos de autor, conseguí que me hicieran llegar el vídeo de la charla que di en IBM hace dos meses. Aquí está una parte: Algunas notas: 1) ¡Qué largo! Ya entiendo por qué estaba tan sediento al terminar la charla. 2) Me impresiona lo mucho que siento [...]]]></description>
			<content:encoded><![CDATA[<p>Después de algunas súplicas y averiguaciones sobre los derechos de autor, conseguí que me hicieran llegar el vídeo de la charla que di en IBM <a href="http://www.marioberges.com/blog/2009/12/visita-a-ibm/">hace dos meses</a>. Aquí está una parte:</p>
<p><center><object width="500" height="331"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9079961&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9079961&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="331"></embed></object></center></p>
<p>Algunas notas:<br />
1) ¡Qué largo! Ya entiendo por qué estaba tan sediento al terminar la charla.<br />
2) Me impresiona lo mucho que siento que he mejorado el inglés después de tres años aquí.<br />
3) Hay muchas cosas que quiero mejorar la próxima vez que tenga que hacer esta presentación. Por ejemplo, muchos de los &#8220;slides&#8221; van en contra de mi política actual que limita el número de palabras en cada uno a aproximadamente 15 ó 20.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/02/presentacion-de-sensor-andrew-en-ibm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Nano-second timestamps in MySQL</title>
		<link>http://www.marioberges.com/blog/2010/01/nano-second-timestamps-in-mysql/</link>
		<comments>http://www.marioberges.com/blog/2010/01/nano-second-timestamps-in-mysql/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 11:00:25 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1465</guid>
		<description><![CDATA[One of the databases I&#8217;m using for my thesis project is storing a series of data-streams that need micro-second or even finer grained precision for the timestamps. Since I&#8217;m using a MySQL database, it seems that there is no native support for these type of timestamps (if this is not the case anymore, please comment!), [...]]]></description>
			<content:encoded><![CDATA[<p>One of the databases I&#8217;m using for my thesis project is storing a series of data-streams that need micro-second or even finer grained precision for the timestamps. Since I&#8217;m using a MySQL database, it seems that there is no native support for these type of timestamps (if this is not the case anymore, please comment!), and the person who designed the schema decided to use two fields to describe the timestamps:<br />
</p>
<ul>
<li><strong>dataTimeStamp</strong>, as a DATETIME type.</li>
<li><strong>fractionalTimeStamp</strong>, as a DECIMAL(6,6) type.</li>
</ul>
<p>The first attribute would store the timeStamp with a precision of up to a second, and then the other attribute would store the fractional values. This clearly works, but is far from being optimal. Specially when you have a huge dataset (days or weeks of continuous data) and want to extract a specific region in time.</p>
<p>As a quick solution, I decided to consolidate those two fields into a single BIGINT type column (I&#8217;m using field, column and attribute interchangeably here). The new column would contain a 64-bit integer with the first 32-bits used for a traditional UNIX timestamp (number of seconds since 00:00:00 1/1/1970, also known as <em>the epoch</em>), and the other 32-bits would be used for the fractional part of the timestamp, only this time in nano-seconds (10^-9).</p>
<p>To do this conversion, I&#8217;m thinking about using something like:</p>
<p><code>UPDATE power_data<br />
SET timeStamp =<br />
(CAST(UNIX_TIMESTAMP(dataTimeStamp) as UNSIGNED) << 32 | CAST(fractionalTimeStamp * pow(10,9) AS UNSIGNED));</code></p>
<p>I'm still not sure if this is such a  great idea. On the positive side, this new column should sort the table well (instead of having to sort by the two previous columns). On the negative side, I would still have to convert those numbers back into meaningful dates whenever I want to use them.</p>
<p>Another option would be to use the full 64 bits to encode the number of nano-seconds since the epoch. This would be OK for the next 500+ years, since 2^64 is approximately 1.85 x 10^19, and the number of nano-seconds since the epoch on the year 2510 is approximately 1.57 x 10^19. This approach would also sort well, and would need a less complicated parsing process in the end.</p>
<p>What do you think? I think I'm going to go with the second option.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/01/nano-second-timestamps-in-mysql/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dead Sensors and Sensor Andrew</title>
		<link>http://www.marioberges.com/blog/2010/01/dead-sensors-and-sensor-andrew/</link>
		<comments>http://www.marioberges.com/blog/2010/01/dead-sensors-and-sensor-andrew/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 11:00:13 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Sensor Andrew]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1436</guid>
		<description><![CDATA[This is the first post in English in this blog. Let&#8217;s see if it works out. Sensor Andrew, one of the projects I&#8217;ve been working on for the past two years, is an experiment on the interoperability and semantic capabilities of cyber-physical systems. In essence, it&#8217;s a collection of hardware and software elements that together [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is the first post in English in this blog. Let&#8217;s see if it works out.</em></p>
<p><a href="http://sensor.andrew.cmu.edu"><img src="http://www.marioberges.com/blog/wp-content/uploads/2010/01/sensor_andrew_jpg_logo-150x150.jpg" alt="" title="Sensor Andrew" width="" height="64" class="alignleft size-thumbnail wp-image-1482" /></a>Sensor Andrew, one of the projects I&#8217;ve been working on for the past two years, is an experiment on the interoperability and semantic capabilities of cyber-physical systems. In essence, it&#8217;s a collection of hardware and software elements that together form a virtual instrument for large-scale sensing and actuation. But I don&#8217;t want to spend time explaining it. The interested reader can refer to our <a href="http://sensor.andrew.cmu.edu/about/">webpage</a> or the <a href="http://www.andrew.cmu.edu/~agr/pubpg/sa-tr-08.pdf">techincal report</a>.</p>
<p>What I do want to talk about is the relative ease with which new applications, that make use of the available sensor data, can be created. </p>
<p><span id="more-1436"></span>Today, for example, I decided to write a simple program that would notify me via e-mail if a sensor has stopped reporting for longer than it should. This is a farily common problem as you may expect. There were two ways I could think of easily implementing this. But before I describe them, let me first provide you with a little bit of context. </p>
<p><a href="http://www.marioberges.com/blog/wp-content/uploads/2010/01/ted1.jpg"><img src="http://www.marioberges.com/blog/wp-content/uploads/2010/01/ted1-150x150.jpg" alt="The Energy Detective (TED)" title="The Energy Detective (TED)" width="150" height="117" class="alignright size-thumbnail wp-image-1480" /></a>Sensor Andrew allows any sensor or actuator that can be connected to an Internet-enabled computing device, to be discovered, shared and re-used. That is the basic principle. The best way to explain it, however, is by using an example. Let&#8217;s say you just purchased a new home energy meter like &#8220;<a href="http://www.theenergydetective.com">The Energy Detective</a>&#8221; (TED). You notice that the display has a USB port on the side, and you wonder if you can use it to access the data and play with it. You go to the Sensor Andrew website, look for the available software adapters (code that is created for this purpose, using our libraries) trying to find if someone has created one for the TED. You find an adapter that fits your operating system and hardware, and proceed to set it up. After registering your sensor with Sensor Andrew (which involves creating an account, describing the sensor&#8217;s make and model, the update rate, its location, what it is measuring, etc.) you are given a unique identifier which you will use when publishing data, and an &#8220;Event-Node&#8221; to which the sensor will be publishing. The event node will be something like &#8220;myTED@sensor.andrew.cmu.edu&#8221;.</p>
<p>To make the long story short, you can now configure the adapter you downloaded with the information you were given (account, Event-Node, etc.), connect the TED to your computer using a USB cable, and run it. The data from your TED will be periodically published, using a standard XML format, to an internet-addressable resource (the event-node myTED@sensor.andrew.cmu.edu). Behind the scenes, Sensor Andrew is leveraging the eXtensible Messaging and Presence Protocol (<a href="http://en.wikipedia.org/wiki/XMPP">XMPP</a>), which you have most probably used even without realizing it. XMPP is the backbone of Google Talk, for example. More especifically, we created a Sensor Over XMPP (SOX) library, that uses the XMPP PubSub (publish and subscribe) protocol extension for this purpose.</p>
<p>I think that this may be enough context. Let me return to the main point of this post. So, now imagine that for some reason your sensor data stops being published. What do you do? How can you tell? Given that any user with appropriate permissions can subscribe to myTED@sensor.andrew.cmu.edu, we can create a simple software agent that subscribes to this event-node, and notifies the user if there has been no message published in the last x minutes. The SOX library, in this case the C library, will help us do this by using only a few functions, namely:</p>
<p>1) Creating the connection:</p>
<pre><code>xmpp_connection = start_xmpp_client (username,
                  password,
                  xmpp_server,
                  xmpp_server_port,
                  xmpp_ssl_fingerprint, pubsub_server, NULL);</code></pre>
<p>2) Subscribing to the event-node:</p>
<pre><code>subscribe_to_node(xmpp_connection, event_node);</code></pre>
<p>3) Then parsing the incoming XML in some way (using expat here), to catch a significant change in timestamps that may indicate a fault, and then trigger an alarm:</p>
<pre><code>static void XMLCALL startElement(void *data,
                  const char *element_name,
                  const char **attr) {

...

   if(strcmp(element_name,"TransducerValue")==0) {
    for(i=0;attr[i];i+=2) {
      const char* attr_name = attr[i];
      if(strcmp(attr_name,"timestamp")==0)
        sensor_timestamp = attr[i+1];
    }

    timestamp_sec_new = convert_to_seconds(sensor_timestamp); 

    if(timestamp_sec_old) {
      if(timestamp_sec_new - timestamp_sec_old > typical_interval)
         alarm(event_node, email);
    }

    timestamp_sec_old = timestamp_sec_new;

    ...

}</code></pre>
<p>Obviously I am ommitting some of the details, and the code is not at all commented, but I guess you can get the point. The alarm function will basically send out an e-mail informing me that my event-node has stopped publishing for longer than the typical_interval.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/01/dead-sensors-and-sensor-andrew/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Libros</title>
		<link>http://www.marioberges.com/blog/2010/01/libros/</link>
		<comments>http://www.marioberges.com/blog/2010/01/libros/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 20:00:16 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[investigación]]></category>
		<category><![CDATA[libros]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1355</guid>
		<description><![CDATA[Mis asesores me han sugerido intentar graduarme en Mayo de este año, en vez de Agosto como tenía planeado. Para por lo menos intentarlo, decidí no tomar clases este semestre y concentrarme sólo en la tesis. Pero parece que una parte de mí no está contenta con la decisión de no aprovechar al máximo las [...]]]></description>
			<content:encoded><![CDATA[<p>Mis asesores me han sugerido intentar graduarme en Mayo de este año, en vez de Agosto como tenía planeado. Para por lo menos intentarlo, decidí no tomar clases este semestre y concentrarme sólo en la tesis. Pero parece que una parte de mí no está contenta con la decisión de no aprovechar al máximo las ofertas que había para este semestre, y he decidido comprar una serie de libros que, aunque sé que no leeré por completo, sirven de solaz.</p>
<p>Tenía US$400 que la universidad me había dado para estos fines, así que decidí gastarlos todos de un solo tiro. Aquí está el carrito de compras:<br />
</p>
<ul>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/0262181746/ref=ord_cart_shr?_encoding=UTF8&#038;m=A3OB53TQ0M3BTI&#038;v=glance">Spikes: Exploring the Neural Code (Computational Neuroscience)</a> &#8211; Fred Rieke; Hardcover</li>
<li><a href="http://www.amazon.com/Handbook-Statistical-Analysis-Mining-Applications/dp/0123747651">Handbook of Statistical Analysis and Data Mining Applications</a> &#8211; Robert Nisbet; Hardcover</li>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/0387848576/ref=ord_cart_shr?_encoding=UTF8&#038;m=A1C79WJQJ5SBBJ&#038;v=glance">The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Second Edition (Springer Series in Statistics)</a> &#8211; Trevor Hastie; Hardcover</li>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/0387402721/ref=ord_cart_shr?_encoding=UTF8&#038;m=ATVPDKIKX0DER&#038;v=glance">All of Statistics: A Concise Course in Statistical Inference (Springer Texts in Statistics)</a> &#8211; Larry Wasserman; Hardcover</li>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/0980232716/ref=ord_cart_shr?_encoding=UTF8&#038;m=ATVPDKIKX0DER&#038;v=glance">Introduction to Linear Algebra, Fourth Edition</a> &#8211; Gilbert Strang; Hardcover</li>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/0387251456/ref=ord_cart_shr?_encoding=UTF8&#038;m=ATVPDKIKX0DER&#038;v=glance">All of Nonparametric Statistics (Springer Texts in Statistics)</a> &#8211; Larry Wasserman; Hardcover</li>
<p>El mismo Wasserman está dando la clase de &#8220;Statistical Machine Learning&#8221; aquí.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2010/01/libros/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Próximos pasos</title>
		<link>http://www.marioberges.com/blog/2009/12/proximos-pasos/</link>
		<comments>http://www.marioberges.com/blog/2009/12/proximos-pasos/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 04:13:07 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[CMU]]></category>
		<category><![CDATA[futuro]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=1231</guid>
		<description><![CDATA[Parece mentira pero ya el año que viene, si todo sale como espero, estaré defendiendo la tesis doctoral. El &#8220;Dr. Mario Bergés&#8221;. Bueno&#8230; El caso es que ahora toca pensar en cuál será el próximo paso. De hecho, como los americanos son muy buenos en eso de hacer planes a largo plazo, hace tiempo que [...]]]></description>
			<content:encoded><![CDATA[<p>Parece mentira pero ya el año que viene, si todo sale como espero, estaré defendiendo la tesis doctoral.</p>
<p>El &#8220;Dr. Mario Bergés&#8221;. Bueno&#8230;</p>
<p>El caso es que ahora toca pensar en cuál será el próximo paso. De hecho, como los americanos son muy buenos en eso de hacer planes a largo plazo, hace tiempo que debí estar pensando en cuál será el próximo paso. Las solicitudes de empleo para una posición de profesor de universidad se hacen con 8-12 meses de anticipación. O sea, que si quiero solicitar para el semestre de otoño 2010, ya estoy un poco tarde. Pero ese no es el único camino.<br />
<span id="more-1231"></span><br />
En el plano más simple, tengo tres opciones:</p>
<ul>
<li>El camino universitario (Academia)</li>
<li>El camino comercial (Industry)</li>
<li>El camino independiente (Start-up)</li>
</ul>
<p>De esas tres actualmente la primera me llama más la atención, pero las otras dos pueden ser igual de buenas. Por otro lado, quisiera que mi próximo paso no me lleve lejos de Pittsburgh ya que a Laura le quedan 2.5 años más de residencia médica. Por suerte hay una cuarta opción que es quedarme trabajando en el mismo proyecto en el que estoy trabajando ahora, [either] como Post-doc, o como estudiante de doctorado si decido no defender la tesis este año.  Esa cuarta opción es el comodín, y es la que mantiene mi calma.</p>
<p>Entonces, ¿qué pienso hacer?</p>
<p>Aunque se nos han acercado algunos inversionistas interesados en crear una compañía en torno al tema que estoy desarrollando para mi tesis, los vínculos con Bosch (la compañía que estuvo financiando el proyecto) no han ayudado a que eso se materialice. De modo que pongamos a un lado la opción de un Start-Up.</p>
<p>El camino comercial tendría que ser aquí en Pittsburgh, así que tal vez solicite en Google, la misma Bosch, y algún otro sitio. Pero no es mi opción favorita.</p>
<p>Aún estando tarde para solicitar en las universidades, pienso hacerlo. Como mínimo, voy a enviar mi solicitud a CMU porque tienen una posición abierta en mi departamento. Las solicitudes para <a href="http://www.ce.cmu.edu/employment/carnegiemellon-energyinfrastructuresystems-final-10-31-09.pdf">esa posición</a> van a empezar a ser revisadas el 1ro de Enero, 2010. Es decir, este próximo viernes.</p>
<p>Entonces, ¿qué estoy haciendo?<br />
Trabajando como un loco para ver si consigo completar los documentos necesarios.<br />
Entre ayer y hoy estuve trabajando en mi Curriculum Vitae. Tengo un <a href='http://www.marioberges.com/blog/wp-content/uploads/2009/12/mberges-CV.pdf'>primer borrador</a>. Son bienvenidos los comentarios.<br />
Todavía me falta escribir un &#8220;Research Statement&#8221; (1 página), un &#8220;Teaching Statement&#8221; (1 página), y un &#8220;Cover Letter&#8221; (1 página más).</p>
<p>El 2010 se acerca, y yo sigo trabajando.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2009/12/proximos-pasos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visita a IBM</title>
		<link>http://www.marioberges.com/blog/2009/12/visita-a-ibm/</link>
		<comments>http://www.marioberges.com/blog/2009/12/visita-a-ibm/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 00:00:12 +0000</pubDate>
		<dc:creator>Mario Berges</dc:creator>
				<category><![CDATA[doctor urbano]]></category>
		<category><![CDATA[investigación]]></category>
		<category><![CDATA[viajes]]></category>

		<guid isPermaLink="false">http://www.marioberges.com/blog/?p=939</guid>
		<description><![CDATA[El lunes, un día después de llegar de vacaciones en Rep. Dominicana, salí para el laboratorio de investigación T.J. Watson de IBM. Acompañaba al jefe del departamento de Ing. Civil en la universidad a dar una charla sobre Sensor Andrew, uno de los proyectos en los que he estado trabajando aquí. El complejo está repartido [...]]]></description>
			<content:encoded><![CDATA[<p>El lunes, un día después de llegar de vacaciones en Rep. Dominicana, salí para el laboratorio de investigación T.J. Watson de IBM. Acompañaba al jefe del departamento de Ing. Civil en la universidad a dar una charla sobre <a href="http://sensor.andrew.cmu.edu/about">Sensor Andrew</a>, uno de los proyectos en los que he estado trabajando aquí.</p>
<p>El complejo está repartido en varias zonas al norte de la isla de Manhattan, en NY. La edificación en la que nos tocó dar la charla y pasarnos el día, queda en Yorktown Heights, y aunque fue construida en los 60s, la arquitectura sigue siendo moderna e imponente:</p>
<p><img src="http://www.marioberges.com/blog/wp-content/uploads/2009/12/watson-300x211.jpg" alt="watson" title="watson" width="300" height="211" class="aligncenter size-medium wp-image-940" /></p>
<p><span id="more-939"></span>Los temas de investigación son muy variados: desde cosmología hasta almacenamiento de energía; y aún así el ambiente de trabajo en el edificio deja una extraña sensación de demasiada estabilidad, orden, poco caos. No me imagino un centro así exisitiendo en Rep. Dominicana, por ejemplo.</p>
<p>A la charla asistieron, físicamente, unas quince personas, y un número desconocido adicional por videoconferencia y teléfono. La charla nos quedó bien, pero dada las condiciones de estabilidad y orden que exhume el entorno, no creo que haya podido quedar mal. Todo durante el día transcurrió sin fallas, las cosas se sucedían como si hubiesen sido ensayadas ya. Cada reunión que tuvimos fue seguida por la próxima en la agenda, salvo ligeras modificaciones. Los investigadores son bien remunerados allí. La civilización (la ciudad de Nueva York, por ejemplo) está por lo menos a 20 millas y separándolos está el bosque. La comida está lista, las ventanas limpias, las luces todas encendidas, los baños uno en cada piso, no hay goteras, la gente sonríe&#8230;</p>
<p>En fin, me quedó siempre detrás la pregunta: ¿podría yo vivir así, tan lejos del caos?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marioberges.com/blog/2009/12/visita-a-ibm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->