<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[andres marrugo]]></title>
  <link href="http://agmarrugo.github.com/atom.xml" rel="self"/>
  <link href="http://agmarrugo.github.com/"/>
  <updated>2021-06-20T00:10:58-05:00</updated>
  <id>http://agmarrugo.github.com/</id>
  <author>
    <name><![CDATA[Andres Marrugo]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Nothing Besides Remains]]></title>
    <link href="http://agmarrugo.github.com/blog/2020/03/02/nothing-besides-remains/"/>
    <updated>2020-03-02T23:12:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2020/03/02/nothing-besides-remains</id>
    <content type="html"><![CDATA[<p>As I was scrolling through twitter, I happened to come across this beautiful thread that spoke of the lessons learned by a researcher while contemplating his research in the grand scheme of things. Though he was passionate about his research and the questions he was trying to answer, there would come a time when future researchers - with the advantage of hindsight - would contemplate his work as obsolete and irrelevant. But the truth is that we all have to come to terms with this situation. </p>

<p>It starts with this tweet:</p>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">1. One of formative experience of grad school for me was when our lab moved across the hallway to a bigger space &amp; I realised my research didn’t really matter in the grand scheme of science &amp; that this actually made me love science even more. So here is a thread about that.</p>&mdash; Tanentzapf Lab (@TanentzapfLab) <a href="https://twitter.com/TanentzapfLab/status/1232732701687287808?ref_src=twsrc%5Etfw">February 26, 2020</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>He came to this realization when he had the opportunity to sit down and listen to someone older than him who had gone through the same excitement for science as he was at that moment. He was young and arrogant. To him, the work of those old guys seemed quaint and had long been solved by other means. But the message that got to him was when that person told him, “we thought what we were doing was the best science.” Also, they had trained many successful scientists in their lab. </p>

<p>So it all boils down to the mere revelation that we should be humble, but still strive to do our best. While in the future, our work may be irrelevant, it is only in hindsight that this judgment should be made, but even if it does become irrelevant for the future, in the present, it is still worthwhile doing. Just the mere fact of training future researchers is an enterprise worth investing in. Because they become the ones that invent the <em>new</em> and more <em>exciting</em> ways of conducting research. </p>

<p>To this thread, someone replied with a quote from the famous poem Ozymandias by Percy Shelley.</p>

<blockquote>
  <p>Ozymandias</p>

  <p>I met a traveller from an antique land
Who said: Two vast and trunkless legs of stone
Stand in the desert. Near them, on the sand,
Half sunk, a shattered visage lies, whose frown,
And wrinkled lip, and sneer of cold command,
Tell that its sculptor well those passions read
Which yet survive, stamped on these lifeless things,
The hand that mocked them and the heart that fed.
And on the pedestal these words appear:
“My name is Ozymandias, king of kings:
Look on my works, ye Mighty, and despair!”
Nothing beside remains. Round the decay
Of that colossal wreck, boundless and bare
The lone and level sands stretch far away</p>
</blockquote>

<p>He might have been mighty in his day. But all that remains from his empire is sand. So, let’s look at things in context. We know nothing will last forever. Let’s enjoy it while it lasts. If you are passionate about your craft. Keep doing it because you love it, not because you think someone in the future is going to find it useful. </p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Attending LAOP]]></title>
    <link href="http://agmarrugo.github.com/blog/2018/11/20/attending-laop/"/>
    <updated>2018-11-20T23:31:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2018/11/20/attending-laop</id>
    <content type="html"><![CDATA[<p>Last week I attended the OSA Latin America Optics and Photonics Conference in Lima, Peru. I had a great time, but above all, this was my first conference, since I started my <a href="http://opilab.utb.edu.co/" title="OPI∙Lab — Laboratorio de Óptica y Procesamiento de Imágenes.">lab</a>, in which I didn’t feel so out of place. Let me elaborate. I knew several people that were attending the conference, I knew the work of some of them, and I was also comfortable talking to old and new acquaintances. What I felt was more reassuring, was presenting some of the work we’ve been doing in our lab for the past two years. I was proud to be presenting the work of my students, what we have accomplished with the available resources. </p>

<p>After starting from scratch about three years ago, we are now at a position to start contributing to the greater conversation in science and technology. During the conference, I took the time to finish a revision on a paper we had submitted to <a href="https://www.osapublishing.org/ao/home.cfm" title="OSA | Applied Optics">Applied Optics</a> from the first results of my Ph.D. student. It is his first journal paper, and it is my first paper as a Ph.D. advisor. Exciting times! The day before traveling back to Colombia we found out it was <a href="https://www.osapublishing.org/ao/upcoming_pdf.cfm?id=346098" title="OSA | Early Posting access">accepted</a>. An accepted paper is always something nice to celebrate, but each acceptance has a unique story, which only the authors know. We know. </p>

<p>At the conference, I met many colleagues working in different fields of optics, but I had the pleasure of meeting Dr. Arti Agrawal from the University of Technology Sidney. She is a theoretical physicist working on modeling and simulation in photonics. Amazing stuff. However, we met at a lunch organized by the conference for early career professionals and Ph.D. students about preparing presentations. I was amazed by the involvement of the OSA embassadors which were basically young professionals as well. Dr. Arti was overseeing the session and made insightful comments from time to time. I remembered when I was preparing for my Ph.D. defense several years ago. It seemed quite a challenge back then. I read many books about presentations and was quite mesmerized by the many ways one could go about producing a rich and entertaining presentation. But it takes time and practice. Actually, this is something I’ve written <a href="http://andresmarrugo.net/blog/2017/02/12/how-i-do-presentations/" title="How I do Presentations - andres marrugo">about before here</a>.</p>

<p>I later had the opportunity to talk again with Dr. Arti. This time about a work I was presenting. She was inquiring about the type of optimization approach we had used, and why did we think it was the right one. As it often is the case, we had not explored other optimization approaches, and we used this one because we knew it and we thought it could give us the results we wanted. It mostly did, but we are now looking into doing something more general that avoids optimization loops. Let’s see how it goes. </p>

<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/2018-11-20-laop.jpg" alt="Notes" width="" height="" border="0" /><br />
</div>

<p>Overall I had a great time in Lima. The food was fantastic and the organization of the event went quite well. Mostly, I enjoyed the networking possibilities that these events offer, as well as presenting our work and getting feedback from the community. My second presentation was the last day of the conference in the last session. In the photo, the final presenters in the session for 3D imaging. </p>

<p>I came back to Cartagena and talked with my students about the fascinating new topics being presented at LAOP, like <a href="https://www.osa.org/en-us/meetings/topical_meetings/osa_latin_america_optics_photonics_conference/program/plenary_speakers/" title="Plenary Speakers | Meetings &amp; Exhibits | The Optical Society">Deep Learning in Optics</a>, and also about several people working in optical metrology in the region. Exciting times for Latin America. </p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[How I do Presentations]]></title>
    <link href="http://agmarrugo.github.com/blog/2017/02/12/how-i-do-presentations/"/>
    <updated>2017-02-12T22:23:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2017/02/12/how-i-do-presentations</id>
    <content type="html"><![CDATA[<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/2017-02-12-notes.jpeg" alt="Notes" width="" height="" border="0" /><br />
</div>

<p>I like to do presentations. I really do. It’s not my favorite thing, but I sure love inspiring others from the work I do. </p>

<p>Ever since I learned of many creative ways to prepare a presentation, I’ve liked to undertake the task with a sense of commitment and a great dose of creativity. </p>

<p>I read the <a href="https://www.amazon.com/Presentation-Zen-Simple-Design-Delivery/dp/0321811984" title="Presentation Zen: Simple Ideas on Presentation Design and Delivery (2nd Edition) (Voices That Matter): Garr Reynolds: 8601419413515: Amazon.com: Books">Presentation Zen</a> book. The <a href="https://www.amazon.com/Non-Designers-Design-Book-Non-Designers-ebook/dp/B00PWDFWEE/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1486955341&amp;sr=1-1&amp;keywords=design+book+robin" title="The Non-Designer's Design Book (Non Designer's Design Book) - Kindle edition by Robin Williams. Arts &amp; Photography Kindle eBooks @ Amazon.com.">The Non-Designer’s Design Book</a>. I learned about <a href="https://www.amazon.com/Sketchnote-Handbook-illustrated-visual-taking/dp/0321857895/ref=sr_1_sc_1?s=books&amp;ie=UTF8&amp;qid=1486955391&amp;sr=1-1-spell&amp;keywords=sketchnots" title="The Sketchnote Handbook: the illustrated guide to visual note taking: Mike Rohde: 8601300203768: Amazon.com: Books">Sketchnotes</a>, I also read about <a href="https://people.eecs.berkeley.edu/~jrs/speaking.html" title="Giving an Academic Talk">academic presentations</a> and <a href="http://5by5.tv/mpu/82" title="5by5 | Mac Power Users #82: Cooking Ideas">cooking ideas</a>, and many other things. Not in a single stretch, but as a constant search for getting better at something I value. So I’ve come to realize a couple of things. A presentation is <em>definitely</em> not prepared in the computer or presentation software. A computer <em>per se</em> is not good for the creative endeavor, but paper and pen <em>are</em>. </p>

<p>One plans a narrative because people like to hear stories; even about how you deconvolved an image using total variation regularization. If you tell it right, they’ll listen.</p>

<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/2017-02-12-three-things.jpeg" alt="Three things" width="" height="" border="0" /><br /></div>

<p>However, I like to include my own things. Give it a personal touch. When I prepare the presentation, I doodle and draw to get an idea of the picture or image I’d like to include in my slide. But I’ve often found that my doodle is even better at getting the message through than a picture I can download from the internet. So I draw it on my phone using <a href="https://www.fiftythree.com/" title="Paper &amp; Pencil by FiftyThree">paper</a>, and I import it to Keynote. They’re just doodles, but (I think) because it’s different from what everyone does, people pay attention. And they get the idea.</p>

<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/2017-02-12-different-people.jpeg" alt="" width="" height="" border="0" /><br />
</div>

<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/2017-02-12-psfs.jpeg" alt="" width="" height="" border="0" /><br />
</div>

<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/2017-02-12-thank_you.jpeg" alt="" width="" height="" border="0" /><br />
</div>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Group Images by Person]]></title>
    <link href="http://agmarrugo.github.com/blog/2016/06/09/group-images-by-person/"/>
    <updated>2016-06-09T23:49:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2016/06/09/group-images-by-person</id>
    <content type="html"><![CDATA[<p>These are basically notes for my future self, but it may <em>sort of</em> work out for someone else, so here it is. I’m currently working on a project in which we obtain a large number of images all stored within a single folder. However, it would be ideal to store them on separate folders. The file names are like this <code>export0_Lastname_FirstName_1.jpg</code>, and there are several files per person.</p>

<p>What I basically wanted, was to organize the mess of files into something like the following:</p>

<pre><code>├── 01-lastname_firstname
│   ├── export0_lastname_firstname.jpg
│   ├── export0_lastname_firstname_1.jpg
│   ├── export0_lastname_firstname_2.jpg
├── 02-lastname_firstname
...
</code></pre>

<p>So I made a Python script to deal with it.</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>group_by_person.py </span><a href="https://github.com/agmarrugo/PythonScripts/blob/master/group_by_person.py">Link</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
<span class="line-number">17</span>
<span class="line-number">18</span>
<span class="line-number">19</span>
<span class="line-number">20</span>
<span class="line-number">21</span>
<span class="line-number">22</span>
<span class="line-number">23</span>
<span class="line-number">24</span>
<span class="line-number">25</span>
<span class="line-number">26</span>
<span class="line-number">27</span>
<span class="line-number">28</span>
<span class="line-number">29</span>
<span class="line-number">30</span>
<span class="line-number">31</span>
<span class="line-number">32</span>
<span class="line-number">33</span>
</pre></td><td class="code"><pre><code class="python"><span class="line"><span class="c">#!/usr/bin/env python3</span>
</span><span class="line"><span class="c"># -*- coding: utf-8 -*-</span>
</span><span class="line">
</span><span class="line"><span class="c"># Import the necessary packages</span>
</span><span class="line"><span class="kn">import</span> <span class="nn">os</span>
</span><span class="line"><span class="kn">import</span> <span class="nn">re</span>
</span><span class="line"><span class="kn">import</span> <span class="nn">shutil</span>
</span><span class="line">
</span><span class="line"><span class="c"># Getting the list of people</span>
</span><span class="line"><span class="n">personList</span> <span class="o">=</span> <span class="p">[</span><span class="n">f</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">)</span> <span class="k">if</span> <span class="n">re</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="s">r&#39;e.*\D\.jpg&#39;</span><span class="p">,</span> <span class="n">f</span><span class="p">)]</span>
</span><span class="line"><span class="n">personNames</span> <span class="o">=</span> <span class="p">[</span><span class="n">f</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&quot;_&quot;</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">personList</span><span class="p">]</span>
</span><span class="line">
</span><span class="line"><span class="c"># Getting the list of all jpg images</span>
</span><span class="line"><span class="n">files</span> <span class="o">=</span> <span class="p">[</span><span class="n">f</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">)</span> <span class="k">if</span> <span class="n">re</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="s">r&#39;e.*\.jpg&#39;</span><span class="p">,</span> <span class="n">f</span><span class="p">)]</span>
</span><span class="line">
</span><span class="line"><span class="c"># Getting existing subdirectories</span>
</span><span class="line"><span class="c"># they start with ./01/</span>
</span><span class="line"><span class="n">existing_dirs</span> <span class="o">=</span> <span class="nb">next</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">walk</span><span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">))[</span><span class="mi">1</span><span class="p">]</span>
</span><span class="line"><span class="n">N</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">existing_dirs</span><span class="p">)</span>
</span><span class="line">
</span><span class="line"><span class="c"># Iterate over all images to sort them per person</span>
</span><span class="line"><span class="c"># and create a new folder if it does not already exist</span>
</span><span class="line"><span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">personNames</span><span class="p">:</span>
</span><span class="line">    <span class="n">N</span><span class="o">+=</span><span class="mi">1</span>
</span><span class="line">    <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">files</span><span class="p">:</span>
</span><span class="line">        <span class="k">if</span> <span class="n">r</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">in</span> <span class="n">f</span><span class="p">:</span>
</span><span class="line">            <span class="n">NewDir</span> <span class="o">=</span> <span class="s">&quot;{:2d}-{}/&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">N</span><span class="p">,</span><span class="n">r</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">replace</span> <span class="p">(</span><span class="s">&quot; &quot;</span><span class="p">,</span> <span class="s">&quot;_&quot;</span><span class="p">))</span>
</span><span class="line">            <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">NewDir</span><span class="p">):</span>
</span><span class="line">                <span class="n">os</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">NewDir</span><span class="p">,</span> <span class="mi">0</span><span class="n">o777</span><span class="p">)</span>
</span><span class="line">            <span class="k">try</span><span class="p">:</span>
</span><span class="line">                <span class="n">shutil</span><span class="o">.</span><span class="n">move</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">NewDir</span><span class="o">+</span><span class="n">f</span><span class="p">)</span>
</span><span class="line">            <span class="k">except</span><span class="p">:</span>
</span><span class="line">                <span class="k">print</span><span class="p">(</span><span class="s">&quot;The file does not exist.&quot;</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>The <code>personList</code> line is done in such a way to get the unique number of people. This is done with the regex. Because there is a file that doesn’t end with a number, matching all files that begin with <code>e</code>, that don’t end with a number and <code>.jpg</code>, it serves as a list of the people for all the images in the directory. In the next line we build a list of the names of each person. This is later used to match and sort each file to its corresponding folder.</p>

<p>Because I had already created some directories, I could have the new directories start at <code>01</code>. So I use <code>os.walk</code> to get the list and <code>len(N)</code> the number of existing directories. The directories to be created should start at <code>N+1</code>.</p>

<p>The outer-most loop iterates over every single person name, and then matches it the existing image files in the folder. When a match is found it creates a directory, if it does not exist. Then it moves file to the newly created folder. If the file doesn’t exist it prints the error, but it continues. And voilà that’s it. Just a quick tip. Make a copy of your files before starting to manipulate them (you could end with corrupt or no data at all). And also, before moving/renaming files, try printing the variables first to see if that’s what you intend to do.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Get Fridays]]></title>
    <link href="http://agmarrugo.github.com/blog/2016/01/30/get-fridays/"/>
    <updated>2016-01-30T00:58:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2016/01/30/get-fridays</id>
    <content type="html"><![CDATA[<p>So, I was preparing my clases for the upcoming semester and I wanted to produce an outline of the lectures with the corresponding date and topic. For instance I have a class that’s once a week every Friday. I could look up the calendar and write every date, which is what I initially did. But then I though, I could write a script for this. And that’s when I entered the rabbit hole.<sup id="fnref:fn1"><a href="#fn:fn1" rel="footnote">1</a></sup></p>

<p>The script I’m showing here went through several iterations. I had several difficulties until I got it to work. I wasn’t pleased with it, so I fiddled a bit more. Later when I saw Dr Drang’s post about <a href="http://leancrew.com/all-this/2016/01/formatting-multimarkdown-tables-with-numpy-and-tabulate/" title="Formatting MultiMarkdown tables with NumPy and tabulate - All this">formatting multimarkdown tables with tabulate</a>, I knew I had to use that. So I did. Here’s the script.</p>

<!-- more -->

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>get_fridays.py </span><a href="https://github.com/agmarrugo/PythonScripts/blob/master/get_fridays.py">Link</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
<span class="line-number">17</span>
<span class="line-number">18</span>
<span class="line-number">19</span>
<span class="line-number">20</span>
<span class="line-number">21</span>
<span class="line-number">22</span>
</pre></td><td class="code"><pre><code class="python"><span class="line"><span class="kn">import</span> <span class="nn">calendar</span>
</span><span class="line"><span class="kn">from</span> <span class="nn">tabulate</span> <span class="kn">import</span> <span class="n">tabulate</span>
</span><span class="line">
</span><span class="line"><span class="n">c</span> <span class="o">=</span> <span class="n">calendar</span><span class="o">.</span><span class="n">Calendar</span><span class="p">(</span><span class="n">firstweekday</span><span class="o">=</span><span class="n">calendar</span><span class="o">.</span><span class="n">MONDAY</span><span class="p">)</span>
</span><span class="line">
</span><span class="line"><span class="n">year</span> <span class="o">=</span> <span class="mi">2016</span>
</span><span class="line"><span class="n">months</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">]</span>
</span><span class="line"><span class="n">monthName</span> <span class="o">=</span> <span class="p">{</span><span class="n">k</span><span class="p">:</span> <span class="n">v</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span><span class="n">v</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">calendar</span><span class="o">.</span><span class="n">month_abbr</span><span class="p">)}</span>
</span><span class="line">
</span><span class="line"><span class="n">listFridays</span> <span class="o">=</span> <span class="p">[]</span>
</span><span class="line"><span class="k">for</span> <span class="n">month</span> <span class="ow">in</span> <span class="n">months</span><span class="p">:</span>
</span><span class="line">
</span><span class="line">    <span class="n">monthcal</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">monthdatescalendar</span><span class="p">(</span><span class="n">year</span><span class="p">,</span><span class="n">month</span><span class="p">)</span>
</span><span class="line">
</span><span class="line">    <span class="k">for</span> <span class="n">week</span> <span class="ow">in</span> <span class="n">monthcal</span><span class="p">:</span>
</span><span class="line">        <span class="k">for</span> <span class="n">day</span> <span class="ow">in</span> <span class="n">week</span><span class="p">:</span>
</span><span class="line">            <span class="k">if</span> <span class="n">day</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span> <span class="o">==</span> <span class="n">calendar</span><span class="o">.</span><span class="n">FRIDAY</span> <span class="ow">and</span> <span class="n">day</span><span class="o">.</span><span class="n">month</span> <span class="o">==</span> <span class="n">month</span><span class="p">:</span>
</span><span class="line">                <span class="n">listFridays</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">monthName</span><span class="p">[</span><span class="n">day</span><span class="o">.</span><span class="n">month</span><span class="p">]</span><span class="o">+</span><span class="s">&quot; &quot;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">day</span><span class="o">.</span><span class="n">day</span><span class="p">),</span><span class="s">&quot; &quot;</span><span class="p">,</span><span class="s">&quot; &quot;</span><span class="p">])</span>
</span><span class="line">
</span><span class="line"><span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="s">&quot;Date&quot;</span><span class="p">,</span><span class="s">&quot;Lecture&quot;</span><span class="p">,</span><span class="s">&quot;Lecture Topics&quot;</span><span class="p">]</span>
</span><span class="line">
</span><span class="line"><span class="k">print</span> <span class="n">tabulate</span><span class="p">(</span><span class="n">listFridays</span><span class="p">,</span><span class="n">headers</span><span class="p">,</span><span class="n">tablefmt</span><span class="o">=</span><span class="s">&#39;pipe&#39;</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>As you can see, the script is quite simple. I give it the year and the months. The loops go over the months, and then the weeks and it looks up the friday of that week. On line 18, I have to append the white spaces <code>" "</code> and convert day to <code>str</code> in order to get three columns per day, so that tabulate gives me back a nifty formatted table. Another cool thing is that tabulate can also output in LaTeX format.</p>

<p>The script will produce this:</p>

<pre><code>| Date   | Lecture   | Lecture Topics   |
|:-------|:----------|:-----------------|
| Feb 5  |           |                  |
| Feb 12 |           |                  |
| Feb 19 |           |                  |
| Feb 26 |           |                  |
| Mar 4  |           |                  |
| Mar 11 |           |                  |
| Mar 18 |           |                  |
| Mar 25 |           |                  |
| Apr 1  |           |                  |
| Apr 8  |           |                  |
| Apr 15 |           |                  |
| Apr 22 |           |                  |
| Apr 29 |           |                  |
| May 6  |           |                  |
| May 13 |           |                  |
| May 20 |           |                  |
| May 27 |           |                  |
</code></pre>

<p>As you can see it works. However, by now you’re wondering, but what about holidays. The script should be smart enough to exclude holidays. I am implementing this, but I’ll leave it for a future post. When rendered looks something like this:</p>

<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/Screen%20Shot%202016-01-30%20at%2000.43.36.png" alt="" width="" height="" border="0" /><br /></div>

<div class="footnotes">
  <ol>
    <li id="fn:fn1">
      <p>Don’t we all?<a href="#fnref:fn1" rel="reference">&#8617;</a></p>
    </li>
  </ol>
</div>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Grading lab reports workflow]]></title>
    <link href="http://agmarrugo.github.com/blog/2015/10/19/grading-lab-reports-workflow/"/>
    <updated>2015-10-19T22:31:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2015/10/19/grading-lab-reports-workflow</id>
    <content type="html"><![CDATA[<div class="aic" style="width:320px"><a href="https://www.flickr.com/photos/50652826@N03/22134710389"><img src="https://farm6.staticflickr.com/5721/22134710389_db6f90e967.jpg" alt="Grades 2 CSV with Python." width="320px" height="" border="0" /></a></div>

<p>Despite all the tools and applications at my disposal, I like to write my comments, feedback and grade the lab reports I get from my students using plain text files. To be precise, <a href="https://daringfireball.net/projects/markdown/" title="Daring Fireball: Markdown">markdown</a> formatted plain text files md.</p>

<!-- more -->

<p>I typically write in a plain text file using <a href="http://brettterpstra.com/projects/nvalt/" title="nvALT - BrettTerpstra.com">nvalt</a> or <a href="https://macromates.com/" title="TextMate — The Missing Editor for Mac OS X">textmate</a> as my text editor. With the help of a <a href="https://smilesoftware.com/TextExpander/index.html" title="TextExpander: Mac Typing Shortcut Utility Saves You Time TextExpander: Mac Typing Shortcut Utility Saves You Time">TextExpander</a> snippet I print out the class list and the other fields I must fill out, typically a general comment/feedback and the grade. The snippet produces something like this:<sup id="fnref:fn1"><a href="#fn:fn1" rel="footnote">1</a></sup></p>

<pre><code>tags:#vision,#lab

- Pérez Ramos, Miguel A.
	- Comentario: 
	- Nota:

- Beleño Hernández, Liliana P.
	- Comentario: 
	- Nota: 

... Other parts look the same ...
</code></pre>

<p>After filling it out I get something like the following:</p>

<pre><code>tags:#vision,#lab

- Pérez Ramos, Miguel A.
	- Comentario: El informe está completo y bien argumentado. Se demuestra que se realizó la práctica a cabalidad. Concluye adecuadamente y cita las referencias consultadas.
	- Nota: 5.0

- Beleño Hernández, Liliana P.
	- Comentario: El informe comienza bien, pero termina abruptamente. No se mencionan los aspectos relacionados con la lectura y tampoco se evidencia adecuadamente los resultados de la práctica. No hay bibliografía.
	- Nota: 3.5

- Carrascal Mendez, Martín S.
	- Comentario: El informe es adecuado y cumple con el objetivo de la práctica.
	- Nota: 5.0	
</code></pre>

<p>This is easy to fill out, looks nice and is well formated. I can preview it - if I want – in <a href="http://marked2app.com/" title="Marked 2 - Smarter tools for smarter writers">Marked</a> or in any other markdown previewer. But the truth is, I’m fine viewing it just like that in plain text. The tedious part comes when I need to copy the grades from this file to a spreadsheet.</p>

<p>This is where <a href="https://automatetheboringstuff.com/" title="Automate the Boring Stuff with Python - Practical Programming for Total Beginners">automating the boring stuff</a> in python makes this a fun and interesting problem to spend an evening solving with a script. The following script takes an input text file formatted like the one previously shown.</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>grades2csv.py </span><a href="https://gist.github.com/agmarrugo/5781fbf3d42f26cd2114">Link</a></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
<span class="line-number">17</span>
<span class="line-number">18</span>
<span class="line-number">19</span>
<span class="line-number">20</span>
<span class="line-number">21</span>
<span class="line-number">22</span>
<span class="line-number">23</span>
<span class="line-number">24</span>
<span class="line-number">25</span>
<span class="line-number">26</span>
<span class="line-number">27</span>
<span class="line-number">28</span>
<span class="line-number">29</span>
<span class="line-number">30</span>
<span class="line-number">31</span>
<span class="line-number">32</span>
<span class="line-number">33</span>
<span class="line-number">34</span>
<span class="line-number">35</span>
<span class="line-number">36</span>
<span class="line-number">37</span>
<span class="line-number">38</span>
<span class="line-number">39</span>
<span class="line-number">40</span>
<span class="line-number">41</span>
<span class="line-number">42</span>
<span class="line-number">43</span>
<span class="line-number">44</span>
<span class="line-number">45</span>
<span class="line-number">46</span>
<span class="line-number">47</span>
<span class="line-number">48</span>
<span class="line-number">49</span>
<span class="line-number">50</span>
<span class="line-number">51</span>
<span class="line-number">52</span>
<span class="line-number">53</span>
<span class="line-number">54</span>
<span class="line-number">55</span>
<span class="line-number">56</span>
<span class="line-number">57</span>
<span class="line-number">58</span>
<span class="line-number">59</span>
<span class="line-number">60</span>
<span class="line-number">61</span>
<span class="line-number">62</span>
<span class="line-number">63</span>
<span class="line-number">64</span>
<span class="line-number">65</span>
<span class="line-number">66</span>
<span class="line-number">67</span>
</pre></td><td class="code"><pre><code class="python"><span class="line"><span class="c">#! /usr/local/bin/python</span>
</span><span class="line"><span class="c"># -*- coding: utf-8 -*-</span>
</span><span class="line"><span class="kn">import</span> <span class="nn">re</span>
</span><span class="line"><span class="kn">import</span> <span class="nn">csv</span>
</span><span class="line"><span class="kn">import</span> <span class="nn">argparse</span>
</span><span class="line">
</span><span class="line"><span class="k">class</span> <span class="nc">REMatcher</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
</span><span class="line">    <span class="sd">&quot;&quot;&quot; A little class that returns the boolean result of calling match,</span>
</span><span class="line"><span class="sd">    and retains the matched groups for subsequent retrieval.</span>
</span><span class="line">
</span><span class="line"><span class="sd">    Attributes</span>
</span><span class="line"><span class="sd">    ----------</span>
</span><span class="line"><span class="sd">    matchstring : The string to match</span>
</span><span class="line"><span class="sd">    match : Matching the regular expression, returns True/False</span>
</span><span class="line"><span class="sd">    group : Returns the matched groups with index i</span>
</span><span class="line">
</span><span class="line"><span class="sd">    Modified from Paul McGuire, </span>
</span><span class="line"><span class="sd">    http://stackoverflow.com/questions/2554185/match-groups-in-python</span>
</span><span class="line"><span class="sd">    &quot;&quot;&quot;</span>
</span><span class="line">    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">matchstring</span><span class="p">):</span>
</span><span class="line">        <span class="bp">self</span><span class="o">.</span><span class="n">matchstring</span> <span class="o">=</span> <span class="n">matchstring</span>
</span><span class="line">
</span><span class="line">    <span class="k">def</span> <span class="nf">match</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">regexp</span><span class="p">):</span>
</span><span class="line">        <span class="bp">self</span><span class="o">.</span><span class="n">rematch</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">regexp</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">matchstring</span><span class="p">)</span>
</span><span class="line">        <span class="k">return</span> <span class="nb">bool</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">rematch</span><span class="p">)</span>
</span><span class="line">
</span><span class="line">    <span class="k">def</span> <span class="nf">group</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">i</span><span class="p">):</span>
</span><span class="line">        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">rematch</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
</span><span class="line">
</span><span class="line"><span class="c"># construct the argument parse and parse the arguments</span>
</span><span class="line"><span class="n">ap</span> <span class="o">=</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">()</span>
</span><span class="line"><span class="n">ap</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&quot;input&quot;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&quot;path to the input text file&quot;</span><span class="p">)</span>
</span><span class="line"><span class="c"># optional output csv file path</span>
</span><span class="line"><span class="n">ap</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s">&quot;-o&quot;</span><span class="p">,</span> <span class="s">&quot;--output&quot;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&quot;path to the output csv file&quot;</span><span class="p">)</span>
</span><span class="line"><span class="n">args</span> <span class="o">=</span> <span class="nb">vars</span><span class="p">(</span><span class="n">ap</span><span class="o">.</span><span class="n">parse_args</span><span class="p">())</span>
</span><span class="line">
</span><span class="line"><span class="c"># Path to text file</span>
</span><span class="line"><span class="n">filePath</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="s">&#39;input&#39;</span><span class="p">]</span>
</span><span class="line">
</span><span class="line"><span class="c"># Path to output file</span>
</span><span class="line"><span class="k">if</span> <span class="n">args</span><span class="p">[</span><span class="s">&#39;output&#39;</span><span class="p">]:</span>
</span><span class="line">    <span class="n">fileCSVPath</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="s">&#39;output&#39;</span><span class="p">]</span>
</span><span class="line"><span class="k">else</span><span class="p">:</span>
</span><span class="line">    <span class="c"># If output file path is not provided</span>
</span><span class="line">    <span class="n">fileCSVPath</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="s">&#39;input&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="s">&quot;.csv&quot;</span>
</span><span class="line">
</span><span class="line">
</span><span class="line"><span class="n">fileCSV</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">fileCSVPath</span><span class="p">,</span><span class="s">&#39;w&#39;</span><span class="p">)</span>
</span><span class="line"><span class="n">wr</span> <span class="o">=</span> <span class="n">csv</span><span class="o">.</span><span class="n">writer</span><span class="p">(</span><span class="n">fileCSV</span><span class="p">,</span><span class="n">quoting</span><span class="o">=</span><span class="n">csv</span><span class="o">.</span><span class="n">QUOTE_ALL</span><span class="p">)</span>
</span><span class="line">
</span><span class="line"><span class="c"># Write titles in csv file</span>
</span><span class="line"><span class="n">wr</span><span class="o">.</span><span class="n">writerow</span><span class="p">([</span><span class="s">&quot;Nombre&quot;</span><span class="p">,</span><span class="s">&quot;Nota&quot;</span><span class="p">,</span><span class="s">&quot;Comentario&quot;</span><span class="p">])</span>
</span><span class="line">
</span><span class="line"><span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filePath</span><span class="p">,</span><span class="s">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
</span><span class="line">
</span><span class="line"><span class="c">#   Iterate through all lines in f</span>
</span><span class="line">    <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">f</span><span class="p">:</span>
</span><span class="line">        <span class="n">m</span> <span class="o">=</span> <span class="n">REMatcher</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
</span><span class="line">
</span><span class="line">        <span class="k">if</span> <span class="n">m</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="s">r&quot;^-(.*$)&quot;</span><span class="p">):</span>
</span><span class="line">            <span class="n">Name</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</span><span class="line">        <span class="k">if</span> <span class="n">m</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="s">r&quot;^\t.*-.*Comentario:(.*$)&quot;</span><span class="p">):</span>
</span><span class="line">            <span class="n">Comment</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</span><span class="line">        <span class="k">if</span> <span class="n">m</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="s">r&quot;^\t.*-.*Nota:\s*(\d.*$)&quot;</span><span class="p">):</span>
</span><span class="line">            <span class="n">Grade</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</span><span class="line">            <span class="n">List</span> <span class="o">=</span> <span class="p">[</span><span class="n">Name</span><span class="p">,</span><span class="n">Grade</span><span class="p">,</span><span class="n">Comment</span><span class="p">]</span>
</span><span class="line">            <span class="n">wr</span><span class="o">.</span><span class="n">writerow</span><span class="p">(</span><span class="n">List</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>The usage is very simply, you just call the script <code>grades2csv.py</code> with the file you want to process. If you don’t specify where the output should go (<code>-o option</code>) it defaults to the same path as the input text file.</p>

<p>I didn’t bother on avoiding overwriting an existing csv file with the same name. I never name two text files with grades the same way.</p>

<p>About a year ago, I found out about this awesome trick of setting up a <code>REMatcher class</code> so that I can have an object that saves the matched string and returns <code>True</code> when it matches the regex. I’ve never gone back to implementing other regex paraphernalia in python. This works and I stick with it.</p>

<p>The script looks for three different matches in every line of the input file. One for a line that starts with a dash (<code>^-(.*$)</code>), capturing the name of the student (<code>m.group(1)</code>). The second, that matches the word <code>Comentario</code>(<code>"^\t.*-.*Comentario:(.*$)"</code>) and captures the comment, and the third that captures the grade (<code>"^\t.*-.*Nota:\s*(\d.*$)"</code>). If the grade is not captured, then not a single item is written to the csv file (<code>wr.writerow(List)</code>).</p>

<p>If everything is well formated in the input file. The output is a nicely formatted csv file:</p>

<pre><code>"Nombre","Nota","Comentario"
" Pérez Ramos, Miguel A.","5.0"," El informe está completo y bien argumentado. Se demuestra que se realizó la práctica a cabalidad. Concluye adecuadamente y cita las referencias consultadas."
" Beleño Hernández, Liliana P.","3.5"," El informe comienza bien, pero termina abruptamente. No se mencionan los aspectos relacionados con la lectura y tampoco se evidencia adecuadamente los resultados de la práctica. No hay bibliografía."
" Carrascal Mendez, Martín S.","5.0"," El informe es adecuado y cumple con el objetivo de la práctica."
" Piñeres De La Rosa, Néstor N.","4.7"," El marco teórico apunta a lo necesario, pero con las citas correspondientes. Muy bien por utilizar otras imágenes. Los comentarios son oportunos. Una discusión un poco más extensa sobre los distintos tipos de filtros que se implementaron en la última parte es deseable, ""prewitt"", ""sobel"", etc."
" Daza Beltran, Juan A.","3.5"," El informe se ajusta a lo mínimo. Debería tener una discusión de resultados más extensa u observaciones del proceso de filtrado con diferentes filtros. Termina abruptamente. No hay bibliografía."
</code></pre>

<p>Which looks like this when viewed as a spreadsheet:</p>

<div class="aic" style="width:600px"><img src="https://dl.dropboxusercontent.com/u/5279729/blog-pics/Screen%20Shot%202015-10-14%20at%2000.31.02.png" alt="" width="" height="" border="0" /><br /></div>

<p>You might be wondering, but why go through all this trouble. Because I can, but mostly because I find spreadsheets useful, but I don’t like typing data into them. I find it more productive to write continuously in a plain text file. I can use Textexpander and other tools more easily. And finally, why not let the computer do the work it’s supposed to do - I’m no monkey.</p>

<div class="footnotes">
  <ol>
    <li id="fn:fn1">
      <p>These are not the real names of my students.<a href="#fnref:fn1" rel="reference">&#8617;</a></p>
    </li>
  </ol>
</div>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Life immutable]]></title>
    <link href="http://agmarrugo.github.com/blog/2015/10/10/life-inmutable/"/>
    <updated>2015-10-10T22:34:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2015/10/10/life-inmutable</id>
    <content type="html"><![CDATA[<p><a data-flickr-embed="true" href="https://www.flickr.com/photos/copiancestral/22093344571/in/datetaken/" title="Life immutable."><img src="https://farm1.staticflickr.com/724/22093344571_5a128fb7da.jpg" width="500" height="379" alt="Life immutable." /></a><script async="" src="http://agmarrugo.github.com//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script></p>

<p>We often live worrying about the future and longing for a less troublesome past; like when we were kids. I know that not everyone had a <em>perfect</em> childhood. I certainly did not, but I still had my moments in which my joy was true and worry free. Those moments are precious to me. </p>

<p>Adulthood has many upsides when viewed from a teenager’s perspective; the opposite is also true. If only they could talk to each other. </p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[In Praise of Slow]]></title>
    <link href="http://agmarrugo.github.com/blog/2015/08/07/in-praise-of-slow/"/>
    <updated>2015-08-07T23:53:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2015/08/07/in-praise-of-slow</id>
    <content type="html"><![CDATA[<p>I have a recurrent discussion with my wife. </p>

<p>She likes to do most things as <em>fast</em> as possible. </p>

<p>I like to pause and think about things, and do them often <em>slowly</em>. At my pace. </p>

<p>I think that if you do things too quickly you might not be fully aware of what you’re doing. </p>

<p>You might feel that you are not really in charge of your life. </p>

<p>You might feel that you can’t  really remember things truly. </p>

<p>Like nothing becomes a memorable experience. </p>

<p>You have no time for metacognition and self-awareness. </p>

<p>I wrote these lines before finding out about this book <a href="http://www.carlhonore.com/books/in-praise-of-slowness/" title="In Praise of Slow | Carl Honoré">In Praise of Slow by Carl Honoré.</a> It seems this has inspired the slow-movement which tries to raise awareness of how we need to take it easy and enjoy life. Like the saying goes, <a href="http://mobile.brainyquote.com/quotes/quotes/m/maewest163658.html" title="Anything worth doing is worth doing slowly. - Mae West at BrainyQuote Mobile">anything worth doing is worth doing slowly.</a></p>

<p>It seems I have a new book to read. </p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[On (re)learning things]]></title>
    <link href="http://agmarrugo.github.com/blog/2015/01/29/on-relearning-things/"/>
    <updated>2015-01-29T22:47:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2015/01/29/on-relearning-things</id>
    <content type="html"><![CDATA[<blockquote>
  <p>My favorite topic in an introductory differential equations course is mechanical and electrical vibrations. I enjoyed learning about it as a student and I enjoyed teaching it later. (Or more accurately, I enjoyed being exposed to it as a student and really learning it later when I had to teach it.)</p>

  <p>John D. Cook on <a href="http://www.johndcook.com/blog/2013/02/19/mechanical-vibrations/">Mechanical vibrations</a></p>
</blockquote>

<p>I’ve always thought that education is about learning, as much as parenting is about maturing and growing up. On the parenting side, you can’t really teach your kids how to live – <a href="http://www.radiolab.org/story/288746-future-cant-control/" title="A Future You Can't Control - Radiolab">you can’t even imagine the kind of world they will have to live from the time they’re born</a> – but you <em>can</em> expose them to the best things you know. In doing so, they can at least have the chance to form an opinion on the many matters of life, they’ll surely make mistakes, but I bet they won’t regret much. </p>

<p>Education is a difficult topic. Everyone has something to say about it, yet no one seems to have true answers. I do think that education is much more about being exposed to something, rather than being taught that something. There’s an incredible difference between the two things.  </p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Date Commands]]></title>
    <link href="http://agmarrugo.github.com/blog/2014/12/07/date-commands/"/>
    <updated>2014-12-07T22:49:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2014/12/07/date-commands</id>
    <content type="html"><![CDATA[<p><a href="http://www.leancrew.com/all-this/2014/12/two-little-date-commands/">Dr. Drang recently shared</a> two date commands he uses for: i) calculating how many days have passed since a given date, and ii) another that returns the day of the year of the current date. </p>

<p>I was mainly interested in the first one because I often have to do that calculation.<sup id="fnref:fn1"><a href="#fn:fn1" rel="footnote">1</a></sup> Because the script can also compute the days remaining until a future date, you can imagine how handy it can be. For instance, if I’d like to know how many days until the day I start my vacations, I just run the script with a future date and it’ll return a negative result in days. Or if I’d like to know how old I am in days.</p>

<!-- more -->

<div class="aic" style="width:460px"><img src="http://andresmarrugo.net/images/Screenshot-date-commands-2014-12-07.jpg" alt="" width="" height="" border="0" /><br />
This is how old I am in days.</div>

<p>I thought it would be something useful to have on my iPhone so I turned it into a <a href="http://omz-software.com/pythonista/" title="Pythonista">Pythonista</a> script that I run from <a href="http://agiletortoise.com/drafts/" title="Drafts - Agile Tortoise">Drafts</a>. If you want to know exactly what the script does go to <a href="http://www.leancrew.com/all-this/2014/12/two-little-date-commands/">Dr. Drang’s post</a>, I just modified it a bit so that it runs from Drafts when you enter a date in the following format <code>DD MM YY</code> where <code>YY</code> is optional, it assumes current year. </p>

<p>You can download the <code>ago.py</code> script from <a href="https://gist.github.com/agmarrugo/e74853dd3914513af1d2">this gist.</a> The Drafts action is available <a href="http://drafts4-actions.agiletortoise.com/a/1PP">here.</a></p>

<div class="footnotes">
  <ol>
    <li id="fn:fn1">
      <p>My solution is typically to google for a date calculator. Then I have to go through the links, and find the one I need. A bit cumbersome, but since I don’t do this everyday I don’t complain much. It just seems simpler to have it as a Drafts action.<a href="#fnref:fn1" rel="reference">&#8617;</a></p>
    </li>
  </ol>
</div>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A CV for my Thesis]]></title>
    <link href="http://agmarrugo.github.com/blog/2014/06/19/a-cv-for-my-thesis/"/>
    <updated>2014-06-19T21:11:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2014/06/19/a-cv-for-my-thesis</id>
    <content type="html"><![CDATA[<div class="aic" style="width:460px"><br />
<img src="http://andresmarrugo.net/images/2014-06-19-IMG_0775.jpg" alt="" width="460" height="" border="0" /></div>

<p>A Ph.D. thesis is one of those things that has a life of its own. Last January, I had the opportunity to write a two-page abstract of my thesis for publication in <em>Electronic Letters on Computer Vision and Image Analysis</em>. It has been published and is now <a href="http://elcvia.cvc.uab.es/article/view/597" title="Retinal Image Analysis Oriented to the Clinical Task - Marrugo - Electronic Letters on Computer Vision and Image Analysis">available on the web along with the PhD thesis.</a></p>

<p>The paper is only a glimpse of all the hard work that went into the making of the thesis, but anyone who reads it may get a decent idea of what it is about, and where to find the results I’ve published in different journals. I don’t think anyone wants to go through the process of writing a thesis twice, but most will agree that it is a life changing experience. Many of the best moments of my life so far, happened while working towards the PhD, especially the birth of my two boys. </p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Not Collapsing the Wave Function]]></title>
    <link href="http://agmarrugo.github.com/blog/2014/01/31/not-collapsing-the-wave-function/"/>
    <updated>2014-01-31T09:32:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2014/01/31/not-collapsing-the-wave-function</id>
    <content type="html"><![CDATA[<p>Today in <a href="http://www.thisamericanlife.org/radio-archives/episode/399/contents-unknown" title="Contents Unknown | This American Life">“This American Life”</a> I was listening to an episode about hidden truths. It was really interesting to find out about a secret letter that the prime minister of Britain writes to every commander of a nuclear submarine. It supposedly contains instructions on what to do if the nation has been wiped out and if the commander should retaliate or not. It poses a mystery on what the contents are, even more so because every time there’s a new prime minister in office the letters are destroyed unread.</p>

<p>There are many questions that come about in knowing what the contents of the letter are. But to my understanding it is a way of reassuring your people that both possibilities exist. To retaliate or not. It is like delaying the final call on a difficult decision. Something akin to a <a href="http://en.wikipedia.org/wiki/Schrodinger_cat" title="Schrödinger's cat - Wikipedia, the free encyclopedia">Schrödinger cat situation</a>.  </p>

<p>I’ve thought of this for while and I’ve come to understand that many people actually <em>like</em> to live their lives this way. Not wanting to know certain things, or more precisely clinging to the hope that a certain aspect in one’s life does not turn out to be what we fear so much. Keeping both options open (<a href="http://en.wikipedia.org/wiki/Wave_function" title="Wave function - Wikipedia, the free encyclopedia"><em>not collapsing the wave function</em></a>) is probably a reassuring situation, relieving anxiety and allowing one to continue living unmoved by the cold hard reality. </p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ The Perils of Talking Too Much]]></title>
    <link href="http://agmarrugo.github.com/blog/2013/06/10/the-perils-of-talking-too-much/"/>
    <updated>2013-06-10T22:07:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2013/06/10/the-perils-of-talking-too-much</id>
    <content type="html"><![CDATA[<div class="aic" style="width:500px"><img src="https://dl.dropboxusercontent.com/u/5279729/blog-pics/medium_5731336614.jpg" alt="" /><br />
photo credit: <a href="http://www.flickr.com/photos/mkorsakov/5731336614/">mkorsakov</a> via <a href="http://photopin.com">photopin</a> <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">cc</a></div>

<p>All too often I see people who simply talk too much.<sup id="fnref:fn1"><a href="#fn:fn1" rel="footnote">1</a></sup> Wether what they speak is nonsense or <em>even</em> meaningful things, there’s a limit to how much one can tolerate. </p>

<p>By talking too much –  and too often – we miss out on many things. We don’t let others speak (which to my understanding is common courtesy), and worse of all we lose our capacity to empathize with others. We can’t <em>read faces</em> well while uttering words out of our mouths continuously. Loosing that feedback is what prompts us to speak without pause and with no care for what the people around us may feel. It’s what turns you into a prick. We’re just <em>too</em> focused on ourselves to care about others. </p>

<!-- more -->

<p>Having no feedback at all is dangerous, it really is. You tend to get the feeling that you’re always right. Usually, people are too polite to interrupt you and <a href="http://contentmarketingsuite.com/actionbar/15826/Are-You-A-Power-Poisoned-Boss" title="Are You A Power-Poisoned Boss?">bring you down a notch</a> and say, <em>it takes two to converse! This is no lecture</em>. A conversation is about sharing <a href="http://www.martynemko.com/articles/do-you-talk-too-much_id1371" title="Do You Talk Too Much?">and paying attention to your conversation partner’s needs.</a></p>

<p>It is no surprise that by talking too much we may alienate our loved ones and friends from our lives. They’ll avoid us and our utterances at all times. It is this kind of behavior that we have to be  careful about.</p>

<div class="footnotes">
  <ol>
    <li id="fn:fn1">
      <p>I used to be one of those, I know better now. <a href="#fnref:fn1" rel="reference">&#8617;</a></p>
    </li>
  </ol>
</div>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New Secularism]]></title>
    <link href="http://agmarrugo.github.com/blog/2013/04/10/new-secularism/"/>
    <updated>2013-04-10T11:48:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2013/04/10/new-secularism</id>
    <content type="html"><![CDATA[<div class="aic" style="width:500px"><img src="https://dl.dropboxusercontent.com/u/5279729/blog-pics/medium_2911020311.jpg" alt="" /><br />
photo credit: <a href="http://www.flickr.com/photos/pablomoroe/2911020311/">Pablo Moroe</a> via <a href="http://photopin.com">photopin</a> <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">cc</a>.</div>

<p>Before Darwin it certainly was <a href="http://choiceindying.com/2011/03/02/could-you-be-an-intellectually-fulfilled-atheist-before-darwin/" title="Could you be an intellectually fulfilled atheist before Darwin? | Choice in Dying">very difficult to be an atheist</a> or a nonbeliever – that is, an intellectually fulfilled one.<sup id="fnref:fn1"><a href="#fn:fn1" rel="footnote">1</a></sup> At least that’s how <a href="http://www.talkorigins.org/indexcc/CA/CA602_1.html" title="CA602.1: An intellectually fulfilled atheist">Richard Dawkins</a> usually puts it and I quite agree with him. It was not that the scientific method<sup id="fnref:fn2"><a href="#fn:fn2" rel="footnote">2</a></sup> didn’t exist at the time, it was that the mystery of life was too big a mystery to even consider tackling through the ways of science. Yet that was what Darwin did. </p>

<p>The topic of this post does not have to do with Darwin, at least in a direct sense. The other day I was listening to <a href="http://www.pointofinquiry.org/" title="Point of Inquiry">Point of Inquiry</a>, a podcast from the center of inquiry.<sup id="fnref:fn5"><a href="#fn:fn5" rel="footnote">3</a></sup> They had <a href="http://en.wikipedia.org/wiki/Frans_de_Waal" title="Frans de Waal - Wikipedia, the free encyclopedia">Frans de Waal</a> on and he talked about his latest book <a href="http://www.amazon.com/The-Bonobo-Atheist-Humanism-ebook/dp/B007Q6XKEY"><em>The Bonobo and the Atheist</em></a>. There was a moment during the interview that the host, Chris Mooney, referred to him as being an atheist to which he replied saying </p>

<!-- more -->

<blockquote>
  <p>I am not necessarily an [atheist], because atheism has now come to stand for being very strongly opposed to religion which is really not what I am, I prefer to call my self either a <em>nonbeliever</em> or an <em>apathetic</em> meaning that, the agnostic doesn’t know if god exists, the atheist denies the existence of god, and <em>I basically don’t care</em>. I don’t think it is an important or interesting problem to discuss god. And as a scientist, I don’t know what to do with the god question. It will never be resolved, certainly not by science. </p>

  <p><strong>– Frans de Waal</strong>, On <a href="http://www.pointofinquiry.org/frans_de_waal_the_bonobo_and_the_atheist/">Point of Inquiry: Frans de Waal - The Bonobo and the Atheist</a></p>
</blockquote>

<p>I can truly relate to his words. As much as I identify with people like Richard Dawkins or Sam Harris, being an atheist does not have to mean being opposed to religion. I can do that without being one. As a matter of fact religion and the institutions that promote it have done so much wrong to mankind that the logic behind them falls apart rather quickly. </p>

<p>What I can’t seem to get around my head is that despite that, religion is still a creation of humans and if I want to take the scientist’s approach I should accept it for what it is. That doesn’t mean, like de Wall suggests, that it cannot be replaced with something else. In his book, he argues that morality is something that is older than our species. Research suggests that many primates, and other animals, have a sense of morality. Meaning that they have impulses and self control mechanisms to resolve conflicts, to determine rules, etc. </p>

<p>In fact <a href="http://en.wikipedia.org/wiki/Massimo_Pigliucci" title="Massimo Pigliucci - Wikipedia, the free encyclopedia">Massimo Pigliucci’s</a> book <a href="http://www.amazon.com/Answers-Aristotle-Science-Philosophy-Meaningful/dp/0465021387"><em>Answers for Aristotle</em></a> attempts to solve that problem by saying that we should lead a life that is both philosophically and scientifically pertinent. Going back to the whole being opposed to religion issue, I say, denying god gets us nowhere. The existentialist questions still remain and it says nothing about what’s the best way to lead a life. Our society is too big and complex to pretend that we shouldn’t pursue such questions. However, we should use the best tools we’ve got for the job, and in the twenty-first century these are not religion or theology. </p>

<p>To conclude I would like to say that we shouldn’t really attack religion for what it is or for being wrong, we should instead try to show the way with the best tools we have. Resolving conflict without invoking god. Discussing real life issues with the best evidence we can find. Addressing our questions knowing wholeheartedly our limits. </p>

<div class="footnotes">
  <ol>
    <li id="fn:fn1">
      <p>Yes, before Darwin we had <a href="http://en.wikipedia.org/wiki/David_Hume">David Hume</a>, but his reasoning was solely based on the fact that <a href="http://choiceindying.com/2011/03/02/could-you-be-an-intellectually-fulfilled-atheist-before-darwin/" title="Could you be an intellectually fulfilled atheist before Darwin? | Choice in Dying">God isn’t a good explanation</a> for biological design. It was Darwin who came up with one.<a href="#fnref:fn1" rel="reference">&#8617;</a></p>
    </li>
    <li id="fn:fn2">
      <p><a href="http://en.wikipedia.org/wiki/History_of_scientific_method#Galileo_Galilei" title="History of scientific method - Wikipedia, the free encyclopedia">Galileo Galilei</a> is often referred to as the father of the scientific method. <a href="#fnref:fn2" rel="reference">&#8617;</a></p>
    </li>
    <li id="fn:fn5">
      <p>“A think tank promoting science, reason, and secular values in public policy and at the grass roots”.<a href="#fnref:fn5" rel="reference">&#8617;</a></p>
    </li>
  </ol>
</div>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A Book for my Son]]></title>
    <link href="http://agmarrugo.github.com/blog/2013/03/27/a-book-for-my-son/"/>
    <updated>2013-03-27T21:21:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2013/03/27/a-book-for-my-son</id>
    <content type="html"><![CDATA[<p>In the latest <a href="http://www.70decibels.com/generational/2013/3/24/027-aaron-hillegass-and-teaching-experts.html" title="70Decibels - Generational - 027 - Aaron Hillegass and Teaching Experts">Generational podcast</a> episode <a href="http://www.bignerdranch.com/instructors/hillegass.shtml">Aaron Hillegass</a> told <a href="http://www.macdrifter.com/" title="Macdrifter">Gabe</a> that he wrote his <a href="http://www.bignerdranch.com/book/objective-c_programming_the_big_nerd_ranch_guide">Objective-C</a> book with his ten-year-old in mind. </p>

<p>I found this to be quite interesting and truly inspiring. By writing the book “for his son,” he made sure anyone could actually read and understand it, but also he was deeply motivated to get it right. I wouldn’t want my son to read a crappy book. </p>

<p>If I ever had to write a guide about how to be (stay) motivated on a project this would definitely be there.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A Brave New World: The joy of discovery]]></title>
    <link href="http://agmarrugo.github.com/blog/2013/03/10/a-brave-new-world/"/>
    <updated>2013-03-10T21:44:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2013/03/10/a-brave-new-world</id>
    <content type="html"><![CDATA[<p><em>This post is in fact a <a href="http://dayoneapp.com/">Day One</a> entry. I treat my Day One journal as a sort of personal blog. A blog with a readership of one – at least in the present. What I mean to say is that, for the most part, I write about my life and for my kids, which are too young to read. I hope they read this in some distant future. I think that the things I might forget are probably the things they’ll want to know about. That is why I write.</em></p>

<!--more-->

<p><em>Occasionally I like to share and entry with my wife, which now Day One makes it so easy by offering the export to PDF option (<a href="https://dl.dropboxusercontent.com/u/5279729/blog-pics/Screenshot%202013-03-10%20at%2008.49.51.png">click here</a> to see what the pdf looks like). Day One is an awesome app which inevitably has made me write more, reflect upon my thoughts and experiences both personal and with the people close to me. It has enabled something which I had lost, having conversations with myself, past and present, which I believe is part of being and feeling alive.</em></p>

<hr />

<p>I’ve been trying to teach Alejandro how to go down the stairs for several months now. For the most part it’s been an unfruitful endeavor, and not because he doesn’t want to go down the stairs; quite the contrary. He loves going down (or trying to go down) but walking right up on his two feet, like he sees everyone else doing it. </p>

<p>Just about every time I tried to show him how to slide his little butt, step by step, to go down safely, he would hurry down the stairs unafraid of falling. After a couple of months of no progress whatsoever I gave up, he can crawl up the stairs, but to go down I have to grab him while he pretends to go down like a grown-up. </p>

<p>Today that was different. I took him out to a nearby park so he could play outside in the sun. After riding his tricycle for about ten minutes he started to wander about in the park. Most of the times he wanders erratically, like going with the flow; chasing whatever is in his sight: a pigeon, a rock, a ball or another kid. </p>

<p>After a while he began to play going up and – with my help – down some stairs in the park. For him it was quite fun, for me a bit stressing because he can’t quite sense the danger in playing around stairs. </p>

<p>After several tries he – out of pure accident – stumbled upon a solution to go down the stairs in a fairly safe way. Sliding on his buttocks. He doesn’t speak yet, however I could sense in his eyes the satisfaction for having made a significant discovery, another way of doing things not known to him before. </p>

<p>I’m not making an argument for implying that he has a deep thought process like an adult, I know he doesn’t. Yet that feeling of true discovery was as vivid in his eyes as I see it in adults. I would say it is even more powerful, because he doesn’t  feel shame in expressing his feelings. He has no reason whatsoever to hide his ignorance. His discovery is genuine, as are his feelings. </p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Links of Interest for January 31, 2013]]></title>
    <link href="http://agmarrugo.github.com/blog/2013/01/31/links-of-interest/"/>
    <updated>2013-01-31T00:00:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2013/01/31/links-of-interest</id>
    <content type="html"><![CDATA[<p>The <a href="http://andresmarrugo.net/blog/categories/bookmarks/">“Links of Interest”</a> is a type of post I’ll start to do on a regular basis here. Every now and then I come across something interesting in the web that I’d like to share with my readers, but that doesn’t necessarily merit a blog post or I really don’t have the time to write one. This type of blog post is inspired by <a href="http://brettterpstra.com/2013/01/15/a-web-excursions-system-for-static-blogs/" title="A &quot;Web Excursions&quot; system for static blogs - Brett Terpstra">Brett Terpstra’s “Web Excursions”</a> system. As he explains, he prefers a single post with multiple links rather than a ton of individual “link list” posts. I do too.</p>

<p>To find out more about the details and the ruby script for automatically generating the post <a href="http://brettterpstra.com/2013/01/15/a-web-excursions-system-for-static-blogs/" title="A &quot;Web Excursions&quot; system for static blogs - Brett Terpstra">go to his website</a>. The links posted here, I’ve gathered in the past couple of weeks using <a href="http://pinboard.in/">pinboard</a> an incredibly useful bookmarking service. Enjoy.</p>

<!-- more -->

<h2 id="the-links">The links</h2>

<dl>
  <dt><a href="http://www.wikiwebapp.com/">Wikiweb - A Delightful Wikipedia Reader</a></dt>
  <dd>The power of wiki backlinks. Visualizing connections between articles.   </dd>
  <dt><a href="http://cvip.computing.dundee.ac.uk/papers/TruccoIOVS2013inpress.pdf">Validating Retinal Fundus Image Analysis Algorithms: Issues And A Proposal</a></dt>
  <dd>Interesting article in which the “big players” in the field of retinal image analysis make recommendations on the possible avenues for research. The purpose is that the research may have a greater impact on the clinical practice.    </dd>
  <dt><a href="http://dictionary2.classic.reference.com/writing/styleguide/footnotes.html">Footnotes, Endnotes and Textnotes</a></dt>
  <dd>A brief style-guide on the use of footnotes, and the like. I came to this page by looking up the recommended style for placing superscript of footnotes next to punctuation marks. BTW it should always go after the punctuation mark, unless the mark is a dash.   </dd>
  <dt><a href="http://www.seankorzdorfer.com/open_notebook/voodoopad%20workflow%20and%20notes.html#section-why">VoodooPad Workflow and Notes</a></dt>
  <dd>Sean Korzdorfer’s workflow on note-taking and using a personal wiki. Really cool.</dd>
  <dt><a href="http://blog.xkoder.com/2008/08/13/git-tutorial-starting-with-git-using-just-10-commands/">xk0der » Git Tutorial : Starting with git using just 10 commands</a></dt>
  <dd>A basic tutorial on git version control.</dd>
  <dt><a href="http://talmai-oliveira.blogspot.com.es/2011/06/how-to-cite-matlab-bibtex-latex.html">Things I Shouldn’t Forget: How to cite MATLAB (bibtex / latex)</a></dt>
  <dd>Truly important. How to cite the all powerful MATLAB.</dd>
  <dt><a href="http://mattgemmell.com/2013/01/15/writing-tools/">Writing Tools - Matt Gemmell</a></dt>
  <dd>Matt Gemmell gives a nice overview of the tools he uses to write plus some general advice on avoiding writer’s block and getting stuff done.</dd>
  <dt><a href="http://www.chocomoko.com/brisk">Brisk</a></dt>
  <dd>An interesting alternative to LaTeXiT on the mac. Doesn’t need a latex installation. </dd>
  <dt><a href="https://medium.com/the-writers-room/8d6e7df7ae58">The Spark File — The Writer’s Room — Medium</a></dt>
  <dd>A “spark” file for writing down anything that goes through your mind. Later revisiting it to find  reminders of useful ideas.  </dd>
  <dt><a href="http://www.cs.berkeley.edu/~jrs/speaking.html">Giving an Academic Talk</a></dt>
  <dd>A nice article on general guidelines and tips for giving a “decent” academic presentation.</dd>
  <dt><a href="http://www.idryman.org/blog/2012/03/10/writing-math-equations-on-octopress/">Writing math equations on Octopress</a></dt>
  <dd>A nice little tutorial on posting LaTeX equations on Octopress.</dd>
  <dt><a href="http://bigthink.com/rewire/a-tech-geek-on-why-we-need-the-humanities">A Tech Geek on Why We Need the Humanities | Input/Output | Big Think</a></dt>
  <dd>A nice piece on the importance of arts alongside technology. Because “the only jobs left to humans in the not-so-distant future will be those that computers can’t do – the kind that demand intuition and creative thinking.”</dd>
  <dt><a href="http://www.elezea.com/2012/12/do-what-you-love/">How to do what you love, the right way</a></dt>
  <dd>A call to forget about titles and do “what you love.”</dd>
  <dt><a href="https://medium.com/i-m-h-o/52a20d7a17de">Why I love Twitter and barely tolerate Facebook — I.M.H.O. — Medium</a></dt>
  <dd>MATT HAUGHEY explains his reasons for liking so much twitter and barely tolerating Facebook. In his words, twitter is the now, is the present. You follow people more for what they have to say, rather than for how they relate to you (high school friend, attended the same university, etc).  Facebook is all about the past.  </dd>
</dl>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Writing my thoughts down]]></title>
    <link href="http://agmarrugo.github.com/blog/2013/01/02/writing-my-thoughts-down/"/>
    <updated>2013-01-02T22:52:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2013/01/02/writing-my-thoughts-down</id>
    <content type="html"><![CDATA[<div class="aic" style="width:500px"><img src="https://dl.dropboxusercontent.com/u/5279729/blog-pics/medium_3989921751.jpg" alt="iPod touch" /><br />
photo credit: <a href="http://www.flickr.com/photos/chiarashine/3989921751/">chiarashine</a> via <a href="http://photopin.com">photopin</a> <a href="http://creativecommons.org/licenses/by-nc/2.0/">cc</a></div>

<p>As is often the case, ideas come about in the most unexpected moments. Lately, I’ve found myself taking notes while walking to work, while waiting for a coffee in front of a bending machine, or like now while getting dressed for work. </p>

<p>It’s become a habit of mine to write what I think, when I think it. My iPod touch has enabled that. I could well have pen and paper with me at all times, but I’m not used to that and nothing beats the digital format. </p>

<!--more-->

<p>I journal much more now than ever before, and that’s thanks to apps like <a href="http://dayoneapp.com/" title="Day One | A simple Journal for iPhone, iPad and Mac App Store">Day One</a> or <a href="http://agiletortoise.com/drafts" title="Drafts - Agile Tortoise">Drafts</a>. Writing  my thoughts down has never been easier. And, to tell you the truth, it’s <em>liberating</em>. It’s like <a href="http://5by5.tv/b2w/96" title="5by5 | Back to Work #96: Compensatory Muscles">Merlin Mann</a> says, “your brain has permission to think at all times.” And, as Melissa Donovan says in her book <a href="http://amzn.com/0615547850">101 Creative Writing Exercises</a>, “Journaling…promotes observation, self-awareness, and reflection, all skills that great writers must possess”, (by way of <a href="http://writeitsideways.com/learning-to-see-the-good-in-bad-writing/" title="Learning to See the Good in Bad Writing">Christi Craig</a>). My journaling has come a long way since I started using <a href="http://dayoneapp.com/" title="Day One | A simple Journal for iPhone, iPad and Mac App Store">Day One</a> last year. Some blog posts start there, or even certain personal emails too. Journaling helps me to reflect upon my thoughts and to make important decisions. </p>

<p>I’ve always been fond of writing, yet I’ve never had such an intimate relationship with my thoughts and my inner self. I believe that writing brings about the best in me. Through writing I can look at my human face and recognize my afflictions and ghosts. </p>

<p>Even as I sit here on my bed, tying my shoelaces, I feel an urge to get my thoughts out. I had never experienced this strong desire before. I, however, am totally aware that the more I write, the more I feel this urge. It’s quite fascinating and at times I just can’t help myself. </p>

<p>Happy new year to all my readers. Hope you had a nice time during the holidays and that you soon start your 2013 projects motivated and committed to getting things done – at least that’s my main purpose for this year.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Careless email writing]]></title>
    <link href="http://agmarrugo.github.com/blog/2012/12/26/careless-email-writing/"/>
    <updated>2012-12-26T10:16:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2012/12/26/careless-email-writing</id>
    <content type="html"><![CDATA[<div class="aic" style="width:500px"><img src="https://dl.dropboxusercontent.com/u/5279729/blog-pics/medium_2756494307.jpg" alt="Text editing." /><br />
photo credit: <a href="http://www.flickr.com/photos/nicmcphee/2756494307/">Unhindered by Talent</a> via <a href="http://photopin.com">photopin</a> <a href="http://creativecommons.org/licenses/by-sa/2.0/">cc</a></div>

<p>I read the other day an email that desperately needed some editing. Writing without editing is pretty much the same as speaking with little attention to what we are saying. The great advantage of the <em>written form</em> over the spoken one is that you <em>can</em> go back an edit. Not editing what you write is both a poor use of the written form and a sign that you don’t care much for the person that will read your message. </p>

<!--more-->

<p>It’s not that a typo is not allowed, no one is perfect. But to write something without punctuation is just insane. All too often I hear people say that, because they are not writers or journalists they are somehow excused of writing poorly. I think it is just plain laziness. It’s a laziness that reads as our lack of interest for a craft so important to us by which we express what we feel and think.</p>

<p>How is it, that common sense doesn’t rouse in these situations? Why is it so difficult to realize that a 500+ word email written in a single paragraph without punctuation is just <em>illegible</em>. It costs so much to get the ideas out of that mess. The laziness to which I refer does service to no one, and buries even the meaning of your well-intended message.</p>

<p>So do yourself a favor and go back and edit the message a bit before hitting the send button.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA['Cooking' Ideas]]></title>
    <link href="http://agmarrugo.github.com/blog/2012/12/07/cooking-ideas/"/>
    <updated>2012-12-07T21:02:00-05:00</updated>
    <id>http://agmarrugo.github.com/blog/2012/12/07/cooking-ideas</id>
    <content type="html"><![CDATA[<p>I love to cook – or one of the reasons I enjoy it so much is – because it’s a manual activity that, quite often, lets my mind wonder about. While cooking I can think about my problems,<sup id="fnref:fn1"><a href="#fn:fn1" rel="footnote">1</a></sup> about the future, about a world different from this one. I can hear my thoughts in a undisturbed way. It is like a moment of pristine inspiration. Me and myself. Nobody else.</p>

<!--more-->

<p>I seldom write those thoughts down, because – well, it’s quite obvious – I’m cooking at the moment and if I did that, dinner would take forever to be ready. </p>

<p>So, as beautiful and inspiring the whole while-cooking thought process may be, it is <em>ephemeral</em>. As soon as dinner is ready I get back to the current issue and most of what was in my mind, just moments ago, vanishes – or so it seems. I think that on a subconscious level those thoughts do stick around. </p>

<p>What I certainly don’t like about cooking is the planning itself. If I want to cook chicken in the evening, and it’s in the fridge I have to remind myself to take it out in the morning – which quite often means I have to plan it the day before. And let’s be honest, having to think about getting chicken out of the fridge is not exactly the most intellectual thing one could be doing – yet, it’s got to happen and someone’s got to do it. </p>

<p>Except for that, cooking (to me) is quite a satisfactory experience which enables me to  enjoy myself and have an encounter with my thoughts and imagination. It’s (almost) like  day dreaming, but it’s not. It’s much more. </p>

<div class="footnotes">
  <ol>
    <li id="fn:fn1">
      <p>It’s something of a coincidence, but there’s a great <a href="http://macpowerusers.com/" title="Mac Power Users">mac power users</a> episode called <a href="http://macpowerusers.com/2012/04/mpu-082-cooking-ideas/" title="MPU 082: Cooking Ideas « Mac Power Users">“cooking ideas”</a>, where David and Katie cover strategies for using mindmapping and outlining tools. I highly recommend it.<a href="#fnref:fn1" rel="reference">&#8617;</a></p>
    </li>
  </ol>
</div>
]]></content>
  </entry>
  
</feed>
