<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Mindfood es el blog técnico de OSOCO. Un espacio en el que tratamos diversos temas relacionados con nuestras áreas de actividad e intereses.</description><title>Mindfood</title><generator>Tumblr (3.0; @mindfood)</generator><link>http://mindfood.osoco.es/</link><item><title>Polyglot Programming</title><description>&lt;div class="im"&gt;
&lt;h2&gt;Polyglot Programming&lt;/h2&gt;
&lt;p&gt;How many programming languages do you know?&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Most programmers know several languages. We, as web developers, work on a daily basis with Groovy, SQL, Bash Scripting, HTML, CSS, JavaScript…&lt;/p&gt;
&lt;p&gt;Learning different languages allows us to solve problems with the most appropriate language and to explore new paths of thinking about computational problems.&lt;/p&gt;
&lt;div class="im"&gt;
&lt;p&gt;&lt;a href="http://www.nealford.com/" target="_blank"&gt;Neal Ford&lt;/a&gt; coined the term &lt;strong&gt;&lt;a href="http://memeagora.blogspot.com.es/2006/12/polyglot-programming.html" target="_blank"&gt;polyglot programming&lt;/a&gt;&lt;/strong&gt;, to refer about this topic.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I think it’s important in this day and age of polyglot programming to understand a variety of different languages, as they are the design tools we use to craft software. Just like regular engineers must understand the physical properties of different materials, we should understand the capabilities, strengths, and weaknesses of different languages. And when to apply them.&lt;/p&gt;
&lt;p&gt;Neal Ford&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class="im"&gt;
&lt;h2&gt;Polyglot JVM and Polyglot Grails&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Java&lt;/em&gt; has long been known simply as a programming language. Today, when thinking in &lt;em&gt;Java&lt;/em&gt; we refer also a robust and mature development platform. Currently, the &lt;a href="http://en.wikipedia.org/wiki/List_of_JVM_languages" target="_blank"&gt;Java Virtual Machine (JVM) supports over 200 different programming languages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These days we have been exploring different languages on the JVM: Java, Groovy, Scala, Clojure, JRuby&amp;#8230; and how to incorporate them into a Grails project. We shared our experiences with others developers at &lt;a href="http://www.springio.net/" target="_blank"&gt;Spring I/O 2012&lt;/a&gt; and &lt;a href="http://codemotion.es/" target="_blank"&gt;Codemotion 2012&lt;/a&gt;.&lt;/p&gt;
&lt;div class="im"&gt;
&lt;p&gt;Hope you enjoy the slides.&lt;/p&gt;
&lt;/div&gt;
&lt;div id="__ss_11664272"&gt;&lt;iframe frameborder="0" height="395" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/11664272" width="475"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div id="__ss_12150303"&gt;&lt;iframe frameborder="0" height="395" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/12150303" width="475"&gt;&lt;/iframe&gt;&lt;/div&gt;</description><link>http://mindfood.osoco.es/post/20001663834</link><guid>http://mindfood.osoco.es/post/20001663834</guid><pubDate>Tue, 27 Mar 2012 10:10:00 +0200</pubDate><category>programming</category><category>jvm</category><category>groovy</category><category>scala</category><category>clojure</category><category>jruby</category><category>grails</category><dc:creator>arturoherrero</dc:creator></item><item><title>Create your own Groovy type conversion</title><description>&lt;h2&gt;Type conversion the standard way&lt;/h2&gt;
&lt;p&gt;Type conversion or casting is a programming language method for changing an object&amp;#8217;s data type into another.&lt;/p&gt;
&lt;p&gt;I’m sure you are familiar with this code that converts a String to an Integer.&lt;/p&gt;
&lt;pre&gt;def number = (Integer)'1'
def number = '1'.toInteger()
def number = '1' as Integer&lt;/pre&gt;
&lt;p&gt;If I want to convert the type of my own objects, I need to create a method to achieve this goal. I copy object properties to another object in a generic way; if a property exists on target object, I copy it from the source object.&lt;/p&gt;
&lt;pre&gt;class User {
    String name
    String city
    Integer age

    def toAdminUser() {
        def adminUser = new AdminUser()
        copyProperties(this, adminUser)
        return adminUser
    }

    def copyProperties(source, target) {
        source.properties.each { key, value -&amp;gt;
            if (target.hasProperty(key) &amp;amp;&amp;amp; !(key in ['class', 'metaClass'])) {
                target[key] = value
            }
        }
    }
}

class AdminUser {
    String name
    String city
    Integer age
}&lt;/pre&gt;
&lt;p&gt;Now I can do something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;adminUser = user.toAdminUser() &lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Type conversion the fancy way&lt;/h2&gt;
&lt;p&gt;Great, but I want to use this fancy way to coerce one type to another:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;adminUser = user as AdminUser &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Simple, &lt;a href="http://groovy.codehaus.org/Operator+Overloading"&gt;Groovy supports operator overloading&lt;/a&gt; and creating your own type conversion is really easy: we can &lt;strong&gt;override the &lt;a href="http://groovy.codehaus.org/groovy-jdk/java/lang/Object.html#asType%28java.lang.Class%29"&gt;asType()&lt;/a&gt; method&lt;/strong&gt;.&lt;/p&gt;
&lt;pre&gt;class User {
    String name
    String city
    Integer age

    Object asType(Class clazz) {
        if (clazz == AdminUser) {
            def adminUser = new AdminUser()
            copyProperties(this, adminUser)
            return adminUser
        }
        else {
            super.asType(clazz)
        }
    }

    def copyProperties(source, target) {
        source.properties.each { key, value -&amp;gt;
            if (target.hasProperty(key) &amp;amp;&amp;amp; !(key in ['class', 'metaClass'])) {
                target[key] = value
            }
        }
    }
}
&lt;/pre&gt;</description><link>http://mindfood.osoco.es/post/17147476017</link><guid>http://mindfood.osoco.es/post/17147476017</guid><pubDate>Mon, 06 Feb 2012 10:00:00 +0100</pubDate><category>groovy</category><category>programming</category><dc:creator>arturoherrero</dc:creator></item><item><title>Asynchronous tests with GPars (Osoco test gallery, part 4)</title><description>&lt;p&gt;If you wrote multithreaded code in Groovy/Grails, I&amp;#8217;m sure you stumbled upon the GPars library. It simplifies parallel processing - sometimes it&amp;#8217;s as easy as wrapping a code fragment with a GPars closure, changing the iteration method (in our example from &lt;code&gt;each&lt;/code&gt; to &lt;code&gt;eachParallel&lt;/code&gt;) and passing the closure to a GPars pool. The library implementation handles the executor pool creation and adds new methods to collections.&lt;/p&gt;
&lt;p&gt;Whenever I deliberately add multithreading, I always separate responsibilities (processing logic and concurrency handling). I wrap the single-threaded class with a new one, handing the parallel execution (creating a pool, managing threads, handling cancellation, etc.):&lt;/p&gt;
&lt;pre&gt;class MultithreadedProcessorService {
    ProcessorService processorService
    def threadPoolSize = ConfigurationHolder.config.threadPool.size

    void processMultithreaded(batches) {
        GParsPool.withPool(threadPoolSize) {
            batches.eachParallel { batch -&amp;gt;
                processorService.process(batch)
            }
        }
    }
}

class ProcessorService {
    void process(batch) {
        // some processing
    }
}
&lt;/pre&gt;
&lt;p&gt;To test the multithreaded class you can you use Spock interactions. As opposed to Groovy and Grails mocks, they are thread-safe and you won&amp;#8217;t get any weird and unstable results:&lt;/p&gt;
&lt;pre&gt;class MultithreadedProcessorServiceSpec extends UnitSpec {
    private MultithreadedProcessorService multithreadedProcessorService
    // Using Spock mocks because they are thread-safe
    private ProcessorService processorService = Mock(ProcessorService)

    def setup() {
        mockConfig('threadPool.size=2')
        multithreadedProcessorService = new MultithreadedProcessorService(
            processorService: processorService
        )
    }

    def 'processes batches using multiple threads'() {
        given:
        def batches = [[0, 1], [2, 3, 4], [5]]
        def processedBatches = markedAsNotProcessed(batches)

        when:
        multithreadedProcessorService.processMultithreaded(batches)

        then:
        batches.size() * processorService.process({ batch -&amp;gt;
            processedBatches[batch] = true
            batch in batches
        })
        assertAllProcessed(processedBatches)

    }

    private markedAsNotProcessed(batches) {
        batches.inject([:]) { processed, batch -&amp;gt;
            processed[batch] = false
            processed
        }
    }

    private void assertAllProcessed(batches) {
        assert batches*.value == [true] * batches.size()
    }
}
&lt;/pre&gt;
&lt;hr&gt;&lt;p&gt;This post series present the best of Osoco tests - tests that were tricky or we are just proud of. You can find a runnable source code for this test and more in the &lt;a href="https://github.com/osoco/grails-test-gallery" target="_blank"&gt;Grails Test Gallery project&lt;/a&gt; shared on GitHub.&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/15965833712</link><guid>http://mindfood.osoco.es/post/15965833712</guid><pubDate>Mon, 16 Jan 2012 22:00:06 +0100</pubDate><category>groovy</category><category>grails</category><category>testing</category><dc:creator>mgryszko</dc:creator></item><item><title>Grails base persistence specification (Osoco test gallery, part 3)</title><description>&lt;p&gt;In our projects we include at least one integration test per domain class. We want to assure us that the GORM mapping is correct and the class is persistable in the target database.  The test plan is simple:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;create a valid persistable sample of the domain object&lt;/li&gt;
&lt;li&gt;save it&lt;/li&gt;
&lt;li&gt;clear Hibernate first level cache (i.e. flush and clear current session)&lt;/li&gt;
&lt;li&gt;retrieve the object once again and compare it with the previously saved object. They must be equal as by &lt;code&gt;equals()&lt;/code&gt; but be different object references&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;We put the steps above in a base abstract specification. In concrete specifications we implement merely the factory method spawning a persistable object instance.&lt;/p&gt;
&lt;pre&gt;abstract class PersistenceSpec extends IntegrationSpec {
    SessionFactory sessionFactory

    protected abstract createPersistableDomainObject()

    def 'persistable domain object should be able to be saved and retrieved'() {
        given:
        def persistableDomainObject = createPersistableDomainObject()

        when:
        def savedDomainObject = persistableDomainObject.save()

        then:
        savedDomainObject.id != null

        when:
        clearFirstLevelCache()

        def retrievedDomainObject = persistableDomainObject.class.get(savedDomainObject.id)

        then:
        savedDomainObject == retrievedDomainObject
        !savedDomainObject.is(retrievedDomainObject)
    }

    private clearFirstLevelCache() {
        sessionFactory.currentSession.flush()
        sessionFactory.currentSession.clear()
    }
}
&lt;/pre&gt;
&lt;hr&gt;&lt;p&gt;This post series present the best of Osoco tests - tests that were tricky or we are just proud of. You can find a runnable source code for this test and more in the &lt;a href="https://github.com/osoco/grails-test-gallery" target="_blank"&gt;Grails Test Gallery project&lt;/a&gt; shared on GitHub.&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/15684824031</link><guid>http://mindfood.osoco.es/post/15684824031</guid><pubDate>Wed, 11 Jan 2012 22:15:06 +0100</pubDate><category>grails</category><category>groovy</category><category>testing</category><dc:creator>mgryszko</dc:creator></item><item><title>GNU Screen. Uso avanzado</title><description>&lt;p&gt;Hace unos meses, mi compañero &lt;a href="http://twitter.com/deigote/"&gt;Diego Toharia&lt;/a&gt; escribió sobre el uso de la herramienta &lt;a href="http://mindfood.osoco.es/post/5386038292/usando-screen-en-maquinas-remotas"&gt;Screen en máquinas remotas&lt;/a&gt;. Vamos a repasar algunos conceptos básicos y aprender algunas opciones más avanzadas para poder automatizar nuestro trabajo.&lt;/p&gt;
&lt;h2&gt;Uso básico&lt;/h2&gt;
&lt;p&gt;Crear una nueva sesión de screen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ screen -S sessionname
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reanudar una sesión detached:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ screen -r sessionname
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Listar todas las sesiones de screen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ screen -ls
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Eliminar una sesión:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ screen -S sessionname -X quit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Eliminar todas las sesiones de screen:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ killall screen
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Atajos de teclado útiles:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;d&lt;/code&gt; Detach screen del terminal&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt; Crear una nueva ventana&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;space&lt;/code&gt; Cambiar a la ventana siguiente&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;backspace&lt;/code&gt; Cambiar a la ventana anterior&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt; Renombrar la ventana actual&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;"&lt;/code&gt; Listar todas ventanas para seleccionar una&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;k&lt;/code&gt; Eliminar la ventana actual&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;?&lt;/code&gt; Mostrar los atajos de teclado&lt;/p&gt;
&lt;p&gt;Múltiples shells abiertas en la misma terminal:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;|&lt;/code&gt; Dividir verticalmente&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;S&lt;/code&gt; Dividir horizontalmente&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;tab&lt;/code&gt; Cambiar el foco a la siguiente región&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt; Eliminar la región actual&lt;br/&gt;&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;Q&lt;/code&gt; Eliminar todas la regiones menos la actual&lt;/p&gt;
&lt;h2&gt;Una sesión tranquila&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;$ ssh me@server.com
$ screen -S sessionname
$ start something really important
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Desconexión del servidor (pánico en otros tiempos sin utilizar screen).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ssh me@server.com
$ screen -r sessionname
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Todo correcto, continuamos trabajando.&lt;/p&gt;
&lt;h2&gt;Automatizar el trabajo&lt;/h2&gt;
&lt;p&gt;Después de una desconexión, podemos volver a autenticarnos en nuestra maquina remota y recuperar la sesión en un simple paso:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ssh me@server.com -t "screen -r sessionname"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;¿Cómo podemos mejorar esto? &lt;a href="http://www.harding.motd.ca/autossh/"&gt;autossh&lt;/a&gt; es la respuesta.&lt;/p&gt;
&lt;p&gt;autossh, automáticamente reconecta una sesión SSH y recupera una sesión de forma transparente:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ssh me@server.com
$ screen -S sessionname
$ Ctrl + a, d
$ exit
$ autossh me@server.com -t "screen -r sessionname"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;De hecho, autossh incluye un script llamado &lt;em&gt;rscreen&lt;/em&gt; para sesiones perpetuas.&lt;/p&gt;
&lt;p&gt;OK, funciona. Pero no parece especialmente divertido porque primero necesitamos conectarnos al servidor, crear una nueva sesión de screen, hacer detached de la misma, desconectarnos del servidor y finalmente conectarnos de nuevo con autossh.&lt;/p&gt;
&lt;p&gt;¿Qué podemos hacer? Si usamos &lt;code&gt;screen -R&lt;/code&gt; recuperamos la sesión o incluso la creamos primero si no existe, finalmente hemos solucionado todos los problemas.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ autossh me@server.com -t "screen -R sessionname"
&lt;/code&gt;&lt;/pre&gt;</description><link>http://mindfood.osoco.es/post/15612760791</link><guid>http://mindfood.osoco.es/post/15612760791</guid><pubDate>Tue, 10 Jan 2012 09:24:10 +0100</pubDate><category>screen</category><category>sysadmin</category><category>login</category><category>ssh</category><category>remote</category><category>shell</category><dc:creator>arturoherrero</dc:creator></item><item><title>Grails equals and hashCode testing (Osoco test gallery, part 2)</title><description>&lt;p&gt;If you work with GORM and your objects are held in collections, you should implement equals and hashCode methods. As everything, they should be thouroughly tested if they obey equals-hashCode contract. At Osoco we created a &lt;a href="https://github.com/osoco/grails-equals-hashcode"&gt;equals-hashcode-test&lt;/a&gt; Grails plugin that provides a base Spock specification for that.  In your equals and hashCode tests you simply have to extend the EqualsHashCodeSpec and provide at least two methods:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;a factory method &lt;code&gt;createDomainObjectToCompare&lt;/code&gt; that will create a fresh object for the comparison&lt;/li&gt;
&lt;li&gt;a map of modified properties included in equals and hashCode&lt;/li&gt;
&lt;li&gt;optionally a map of modified properties ignored in both methods&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Additionally in case of inheritance, we check whether the equals method complies with the symmetry rule. We do it in an extra feature method added to the spec:&lt;/p&gt;
&lt;pre&gt;def 'equals relation must be symmetric with inheritance'() {
    given:
    def content = new Content()

    and:
    def book = new Book()

    expect:
    (content == book) == (book == content)
}
&lt;/pre&gt;
&lt;p&gt;You may say, in Grails 2.0 and Groovy 1.8 there are &lt;code&gt;@Equals&lt;/code&gt; and &lt;code&gt;@HashCode&lt;/code&gt; AST transformations and you don&amp;#8217;t need to write tests of them. I agree to some point. I think you can trust Groovy developers and you don&amp;#8217;t have to test the methods for reflexivity, symmetry, transivity, consistency, and &amp;#8216;non-nullity&amp;#8217;. Anyway, you have to test the annotation configuration if it includes the properties that actually account for the logical equality between objects.&lt;/p&gt;
&lt;p&gt;In the future releases of the plugin we will surely simplify the base specification and remove some checks but we will surely continue testing both methods (with our plugin it&amp;#8217;s dirt-cheap!)&lt;/p&gt;
&lt;hr&gt;&lt;p&gt;This post series present the best of Osoco tests - tests that were tricky or we are just proud of. You can find a runnable source code for this test and more in the &lt;a href="https://github.com/osoco/grails-test-gallery" target="_blank"&gt;Grails Test Gallery project&lt;/a&gt; shared on GitHub.&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/15310117143</link><guid>http://mindfood.osoco.es/post/15310117143</guid><pubDate>Wed, 04 Jan 2012 22:57:38 +0100</pubDate><category>groovy</category><category>grails</category><category>testing</category><dc:creator>mgryszko</dc:creator></item><item><title>Magic in Software Development</title><description>&lt;p&gt;&lt;span id="result_box"&gt;&lt;span class="hps"&gt;My opinion&lt;/span&gt; &lt;span class="hps"&gt;about &lt;em&gt;magic&lt;/em&gt;&lt;/span&gt; &lt;span class="hps"&gt;in&lt;/span&gt; &lt;span class="hps"&gt;software development&lt;/span&gt; &lt;span class="hps"&gt;&lt;/span&gt;&lt;span class="hps"&gt;coincides with these great posts&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://gilesbowkett.blogspot.com/2009/07/do-you-believe-in-magic.html"&gt;Do You Believe In Magic?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://skilldrick.co.uk/2011/04/magic-in-software-development/"&gt;Magic in software development&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="result_box"&gt;&lt;span class="hps"&gt;&lt;strong&gt;I extract&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt; &lt;span class="hps"&gt;some fragments of &lt;/span&gt;&lt;span class="hps"&gt;them&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; that I&lt;/span&gt; &lt;span class="hps"&gt;would like to highlight.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Bad word: &lt;em&gt;Magic&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;I often find that people talk about &lt;em&gt;magic&lt;/em&gt; when referring to programming languages and frameworks.&lt;/p&gt;
&lt;p&gt;The concept that some particular language features are more &lt;em&gt;magical&lt;/em&gt; than others is insane. None of it involves fairy dust or anything particularly complicated; it’s all just programming.&lt;/p&gt;
&lt;p&gt;There is absolutely no logic in calling language features &lt;em&gt;magical&lt;/em&gt;.  It implies that certain programming techniques are inherently fantastic  and strange. That’s only the case if you don’t understand the language.&lt;/p&gt;
&lt;p&gt;The correct response is not calling arbitrary features &lt;em&gt;magic&lt;/em&gt;. The correct response is to keep learning how to write code and overcome your ignorance.&lt;/p&gt;
&lt;h2&gt;&lt;em&gt;Magic&lt;/em&gt; rocks!!&lt;/h2&gt;
&lt;p&gt;Ultimately, you can continue using &lt;em&gt;magic&lt;/em&gt;, but what’s &lt;em&gt;magic&lt;/em&gt;? I’d define it as anything below your current level of abstraction that you don’t understand.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Any sufficiently advanced technology is indistinguishable from magic.&lt;/p&gt;
&lt;p&gt;Arthur C. Clarke&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Magic&lt;/em&gt; is a good idea, we don’t understand exactly how quantum physics works but we accept that it does and make good use of it.&lt;/p&gt;
&lt;p&gt;Now, if you don’t understand some feature of your favorite framework  or how it works behind the scenes, don’t worry. Do not be intimidated,  just learn and enjoy without worrying about every detail.&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/14464628036</link><guid>http://mindfood.osoco.es/post/14464628036</guid><pubDate>Mon, 19 Dec 2011 19:36:00 +0100</pubDate><category>software</category><dc:creator>arturoherrero</dc:creator></item><item><title>Functional Programming with Groovy</title><description>&lt;p&gt;The diversity of languages and programming paradigms allow us to  solve existing problems by thinking solutions from very different  approaches.&lt;/p&gt;
&lt;p&gt;But why a Groovy developer should learn functional programming?&lt;/p&gt;
&lt;p&gt;As I learned about &lt;strong&gt;functional programming&lt;/strong&gt;, I found good &lt;strong&gt;ideas&lt;/strong&gt; but I also found that it brought new &lt;strong&gt;clarity&lt;/strong&gt; to my thinking about the design of class and methods. It also allowed me to write more &lt;strong&gt;concise&lt;/strong&gt; code and how to make it better for reuse.&lt;/p&gt;
&lt;p&gt;A few weeks ago, &lt;strong&gt;I spoke about functional programming with Groovy&lt;/strong&gt; at &lt;a href="http://greach.es/"&gt;Greach 2011&lt;/a&gt;.  I presented basic concepts of functional programming paradigm and then  focus on how to apply them to improve the code that we write with  Groovy.&lt;/p&gt;
&lt;pre&gt;&lt;br/&gt;&lt;/pre&gt;
&lt;div id="__ss_10041168"&gt;&lt;iframe frameborder="0" height="395" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/10041168" width="475"&gt;&lt;/iframe&gt;&lt;/div&gt;</description><link>http://mindfood.osoco.es/post/13447285591</link><guid>http://mindfood.osoco.es/post/13447285591</guid><pubDate>Mon, 28 Nov 2011 09:36:39 +0100</pubDate><category>functional programming</category><category>Groovy</category><category>Greach</category><dc:creator>arturoherrero</dc:creator></item><item><title>JMS queue listener integration tests with Grails (Osoco test gallery, part 1)</title><description>&lt;p&gt;In our application we have to consume JMS messages. We install &lt;a target="_blank" href="http://grails.org/plugin/jms"&gt;Grails JMS plugin&lt;/a&gt; and write a listener for this task. To not violate &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Single_responsibility_principle"&gt;SRP&lt;/a&gt;, our consumer receives a message and routes it to a &lt;code&gt;MessageProcessorService&lt;/code&gt; for further processing.&lt;/p&gt;
&lt;p&gt;Curious? Continue reading on &lt;a target="_blank" href="http://grysz.com/2011/11/10/jms-queue-listener-integration-tests-with-grails-osoco-test-gallery-part-1/"&gt;Marcin&amp;#8217;s weblog&lt;/a&gt;&amp;#8230;&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/12612940054</link><guid>http://mindfood.osoco.es/post/12612940054</guid><pubDate>Thu, 10 Nov 2011 23:13:23 +0100</pubDate><category>groovy</category><category>grails</category><dc:creator>mgryszko</dc:creator></item><item><title>Grails as daemon in Jenkins</title><description>&lt;p&gt;Sometimes you need to run Grails embedded Tomcat container in background as a part of your build in Jenkins/Hudson. Launching a &lt;code&gt;grails run-app &amp;amp;&lt;/code&gt; as &lt;em&gt;Execute shell&lt;/em&gt; build step will result in a warning from Jenkins: &lt;em&gt;Process leaked file descriptors.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The problem is described in the &lt;a target="_blank" href="https://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build"&gt;Jenkins wiki&lt;/a&gt; with some possible solutions. I chose the &lt;a target="_blank" href="http://software.clapper.org/daemonize/"&gt;daemonize&lt;/a&gt; tool. As far as I know it is not available in any Debian repository, so I had to build it myself. It takes less than 3 minutes; just follow the instructions from the daemonize website.&lt;/p&gt;
&lt;p&gt;I wrapped the &lt;code&gt;grails run-app&lt;/code&gt; with daemonize in a handy script: &lt;code&gt;run-app-as-daemon.sh&lt;/code&gt; that you can download from the &lt;a target="_blank" href="https://github.com/osoco/scripts/blob/master/grails-inside-jenkins/run-app-as-daemon.sh"&gt;Osoco&amp;#8217;s GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The script starts the embedded Grails server with HTTP or HTTPS connector and then checks if the server is up and running by polling a configured URL. After e.g. some functional tests, it kills the server process by its PID.&lt;/p&gt;
&lt;p&gt;If you want to apply the script in your build, you have to customize some variables, listed (and documented) in the script header. Usage is very simple:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;run-app-as-daemon.sh start|start-https|stop|force-stop&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Sample Jenkins build configuration:&lt;/p&gt;
&lt;p&gt;Build steps:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;your-app-dir/run-app-as-daemon.sh force-stop&lt;/code&gt;&lt;br/&gt;&lt;code&gt;your-app-dir/run-app-as-daemon.sh start&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Post build tasks:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;your-app-dir/run-app-as-daemon.sh stop&lt;/code&gt;&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/12565474171</link><guid>http://mindfood.osoco.es/post/12565474171</guid><pubDate>Wed, 09 Nov 2011 21:18:10 +0100</pubDate><category>grails</category><category>groovy</category><category>continuous integration</category><dc:creator>mgryszko</dc:creator></item><item><title>Grails build event notifications with libnotify and Growl</title><description>&lt;p&gt;If you download the &lt;code&gt;_Events.groovy&lt;/code&gt; script from the &lt;a target="_blank" href="https://github.com/osoco/scripts/blob/master/grails-notifications/_Events.groovy"&gt;Osoco&amp;#8217;s GitHub repository&lt;/a&gt; and put in in the &lt;code&gt;scripts&lt;/code&gt; directory of your Grails project, you&amp;#8217;ll get a nice bubble notifications on your Linux or Mac desktop.&lt;/p&gt;
&lt;p&gt;This script requires libnotify (Linux) or Growl with growlnotify (Mac) installed. It assumes that &lt;code&gt;GRAILS_HOME&lt;/code&gt; environment variable is correctly pointing to a Grails distribution (in order to display the Grails goblet icon in the notification bubble).&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/12462125150</link><guid>http://mindfood.osoco.es/post/12462125150</guid><pubDate>Mon, 07 Nov 2011 09:01:00 +0100</pubDate><dc:creator>mgryszko</dc:creator></item><item><title>Conferencia Agile Spain 2011</title><description>&lt;p&gt;Los días 20 y 21 de octubre de 2011 se celebró la &lt;a href="http://conferencia2011.agile-spain.org/"&gt;Conferencia Agile Spain 2011&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;He necesitado reflexionar durante algunos días para poder valorar la  conferencia tal y como se merece. Después de resumir la experiencia al resto de compañeros, me he dado cuenta de que realmente he aprendido y me he llevado muchas más cosas de las que en un principio imaginaba.&lt;/p&gt;
&lt;p&gt;La conferencia del año pasado fue mi primer contacto con las  metodologías ágiles y este año he tenido el privilegio de presentar una  sesión junto con &lt;a href="http://grysz.com/"&gt;Marcin Gryszko&lt;/a&gt;, en la que hemos explicado cómo es la evolución de uno de nuestros proyectos, que al igual que el resto, está gestionado con metodologías ágiles. El proyecto es &lt;strong&gt;&lt;a href="https://www.bkool.com/"&gt;BKOOL&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="BKOOL at CAS 2011" src="https://lh5.googleusercontent.com/-qGZYSZQiWmM/TqkItZZ2eQI/AAAAAAAAACY/H-qY6bHdtHE/s512/BKOOL%252520at%252520CAS%2525202011.jpg" align="bottom" height="512" width="342"/&gt;&lt;/p&gt;
&lt;h2&gt;Mi experiencia personal&lt;/h2&gt;
&lt;p&gt;De entre todas las sesiones a las que asistí, me gustaría destacar las siguientes:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
&lt;p&gt;El último momento responsable. Xavier Quesada&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://www.slideshare.net/carlossg/from-dev-to-devops-conferencia-agile-spain-2011"&gt;From Dev to DevOps&lt;/a&gt;. Carlos Sánchez&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://www.slideshare.net/davidbonillafuertes/gamification-cas2011-9840894"&gt;Gamification&lt;/a&gt;. David Bonilla&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="http://www.slideshare.net/jacegu/por-qu-cervantes-programaba-mejor-que-t"&gt;Por qué Cervantes programaba mejor que tú&lt;/a&gt;. Javier Acero&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Lo que superó todas mis expectativas:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
&lt;p&gt;He conocido a muchísima gente con grandes ideas y proyectos, &lt;strong&gt;personas&lt;/strong&gt; con mucha ilusión y ganas de continuar mejorando.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;He aprendido la forma en la que trabajan otros &lt;strong&gt;equipos&lt;/strong&gt;, sus problemas, sus retos, sus soluciones.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Me han sorprendido los diferentes &lt;strong&gt;modelos de negocio&lt;/strong&gt; de algunos proyectos, reflexionando desde un punto de vista económico.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;He comprendido que ser &lt;strong&gt;ponente&lt;/strong&gt; es algo realmente difícil, pero al mismo tiempo muy &lt;strong&gt;positivo y enriquecedor&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;He recordado que una persona es capaz de llegar &lt;strong&gt;tan lejos como se proponga&lt;/strong&gt; (aunque quizás nunca he llegado a olvidarlo).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description><link>http://mindfood.osoco.es/post/11984705373</link><guid>http://mindfood.osoco.es/post/11984705373</guid><pubDate>Thu, 27 Oct 2011 09:55:00 +0200</pubDate><category>agile</category><category>events</category><dc:creator>arturoherrero</dc:creator></item><item><title>Groovy Metakoans</title><description>&lt;p&gt;You may have done Groovy Koans. But it’s not the end of the long way to enlightment. &lt;strong&gt;Groovy Metakoans&lt;/strong&gt; will teach you how Meta Object Protocol works and how to change object behavior at runtime.&lt;/p&gt;
&lt;h3&gt;What is metaprogramming?&lt;/h3&gt;
&lt;p&gt;According to Wikipedia is&lt;/p&gt;
&lt;blockquote&gt;the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime&lt;/blockquote&gt;
&lt;p&gt;You will learn:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;how dynamic method dispatch works with Groovy&lt;/li&gt;
&lt;li&gt;how to obtain information about an object at runtime using MetaObjectProtocol interface&lt;/li&gt;
&lt;li&gt;how to do AOP with Groovy&lt;/li&gt;
&lt;li&gt;how to add new methods with categories and mixins&lt;/li&gt;
&lt;li&gt;how to inject new methods and properties using MetaClass&lt;/li&gt;
&lt;li&gt;how to synthetize behavior upon invocation (like Grails/GORM dynamic finders)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The Koans assume that you have some basic practical experience with Groovy. If not, I recommend you personally &lt;a href="http://pragprog.com/book/vslg/programming-groovy"&gt;Programming Groovy&lt;/a&gt; by Venkat Subramaniam. Although it covers Groovy 1.5.4, you find on 300 pages everything about Groovy from first steps with the language to advanced metaprogramming.&lt;/p&gt;
&lt;h3&gt;Grab&amp;#8217;em while they are hot!&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;As tar: &lt;a target="_blank" href="http://github.com/osoco/groovy-metakoans/tarball/master"&gt;&lt;a href="http://github.com/osoco/groovy-metakoans/tarball/master"&gt;http://github.com/osoco/groovy-metakoans/tarball/master&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;As zip: &lt;a target="_blank" href="http://github.com/osoco/groovy-metakoans/zipball/master"&gt;&lt;a href="http://github.com/osoco/groovy-metakoans/zipball/master"&gt;http://github.com/osoco/groovy-metakoans/zipball/master&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Browse the source code at GitHub: &lt;a target="_blank" href="https://github.com/osoco/groovy-metakoans"&gt;&lt;a href="https://github.com/osoco/groovy-metakoans"&gt;https://github.com/osoco/groovy-metakoans&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Clone the repository with Git: &lt;code&gt;git clone git://github.com/osoco/groovy-metakoans&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Read the documentation at: &lt;a target="_blank" href="http://osoco.github.com/groovy-metakoans/"&gt;&lt;a href="http://osoco.github.com/groovy-metakoans/"&gt;http://osoco.github.com/groovy-metakoans/&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://mindfood.osoco.es/post/9928915463</link><guid>http://mindfood.osoco.es/post/9928915463</guid><pubDate>Wed, 07 Sep 2011 22:45:48 +0200</pubDate><dc:creator>mgryszko</dc:creator></item><item><title>Spock Grails extension - execute or ignore specification depending on the environment</title><description>&lt;p&gt;&lt;span&gt;
&lt;p&gt;Our newest &lt;strong&gt;&lt;a href="http://www.grails.org/plugin/spock-grails-env-extensions"&gt;Spock Grails environment extensions plugin&lt;/a&gt;&lt;/strong&gt; adds two annotations to Spock:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;code&gt;@ExecuteForEnvironment&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@IgnoreForEnvironment&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;You specify environment(s) as the annotation parameter, e.g. &lt;code&gt;@ExecuteForEnvironment(['test_integration', 'test_performance'])&lt;/code&gt; or &lt;code&gt;@IgnoreForEnvironment('test')&lt;/code&gt;. More examples can be found in the official &lt;a target="_blank" href="http://osoco.github.com/grails-spock-env-extensions/"&gt;user guide&lt;/a&gt;.&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/7876874137</link><guid>http://mindfood.osoco.es/post/7876874137</guid><pubDate>Thu, 21 Jul 2011 08:24:07 +0200</pubDate><category>spock</category><category>testing</category><category>grails</category><dc:creator>mgryszko</dc:creator></item><item><title>Grails Fixtures Plugin – Object Templates</title><description>&lt;p&gt;&lt;a target="_blank" href="http://www.grails.org/plugin/fixtures"&gt;Grails Fixtures plugin&lt;/a&gt; gives you a Grails domain object factory (or &lt;a target="_blank" href="http://martinfowler.com/bliki/ObjectMother.html"&gt;object mother&lt;/a&gt; if you like fancy names :)) thats lets you define your test fixture using a DSL.&lt;/p&gt;
&lt;p&gt;Now, starting from the current snapshot (1.0.8-SNAPSHOT version) you can define domain object templates. A template defines an object with some common properties that will be replicated in all object instances based on that template.&lt;/p&gt;
Interested? &lt;a target="_blank" href="http://mgryszko.wordpress.com/2011/06/28/grails-fixtures-plugin-object-templates/"&gt;Then continue reading Marcin&amp;#8217;s blog&amp;#8230;&lt;/a&gt;</description><link>http://mindfood.osoco.es/post/7236697063</link><guid>http://mindfood.osoco.es/post/7236697063</guid><pubDate>Mon, 04 Jul 2011 21:35:32 +0200</pubDate><category>grails</category><category>testing</category><dc:creator>mgryszko</dc:creator></item><item><title>Trabajando con diferentes versiones de Grails</title><description>&lt;p&gt;En OSOCO hace tiempo que apostamos por Grails como framework para desarrollar aplicaciones web, y es la herramienta que elegimos &lt;em&gt;por defecto&lt;/em&gt; en todos los proyectos nuevos de esta índole.&lt;/p&gt;
&lt;p&gt;Con el tiempo, esto ha ocasionado que tengamos que trabajar con diferentes versiones de Grails a la vez, lo que por defecto puede ser algo engorroso.&lt;/p&gt;
&lt;p&gt;Hace poco subí a mi GitHub un script que se encarga de lidiar con este problema. Sé que había cosas ya hechas para esto, pero me gusta cocinarme estas pequeñeces yo mismo :-), así que he subido el script al GitHub de OSOCO para quien lo encuentre útil:&lt;/p&gt;
&lt;p&gt;&lt;a title="Grails Multiple Versions at OSOCO GitHub" href="https://github.com/osoco/scripts/tree/master/grails-multiple-versions"&gt;Grails Multiple Versions&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;No tiene ningún misterio, pero ahorra tiempo :-D. Para hacerlo funcionar, basta con ponerlo en el path con mayor prioridad que la instalación de Grails (yo suelo tener estas cosas en $HOME/bin o $HOME/bin/scripts, que está al principio de mi path).&lt;/p&gt;
&lt;p&gt;Se pueden configurar un par de variables (el nombre de la instalación por defecto y en qué directorios se buscarán tanto esa instalación como cualquier otra), pero con los valores por defecto debería funcionarle a la mayoría de la gente :-).&lt;/p&gt;
&lt;p&gt;En cualquier caso, podéis ver una descripción de uso más detallada en el README.&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/6767265075</link><guid>http://mindfood.osoco.es/post/6767265075</guid><pubDate>Tue, 21 Jun 2011 23:15:00 +0200</pubDate><category>grails</category><category>script</category><category>versions</category><dc:creator>deigote</dc:creator></item><item><title>Agile Inception</title><description>&lt;p&gt;Muchos proyectos mueren sin ver la luz principalmente por dos razones:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
&lt;p&gt;No son capaces de hacer las &lt;strong&gt;preguntas correctas&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No tienen el valor de hacer las &lt;strong&gt;preguntas difíciles&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Cuando comienza un proyecto, cada miembro del equipo se forma una  idea del mismo y de cómo llevarlo a cabo con éxito. Sin embargo esta  visión puede ser completamente diferente para el resto.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://lh3.googleusercontent.com/-nPUt4tXxrA0/TeXnfmmDKLI/AAAAAAAAABw/U8OjLvu3H5Q/Agile%252520Inception.%252520Ideas%252520diferentes.png" alt="Ideas diferentes"/&gt;&lt;/p&gt;
&lt;p&gt;En el libro The Agile Samurai de Jonathan Rasmusson, se describe la herramienta &lt;strong&gt;&lt;a href="http://agilewarrior.wordpress.com/2010/11/06/the-agile-inception-deck/"&gt;Agile Project Inception&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Básicamente lo que se propone es que nos planteemos una serie de  preguntas antes de comenzar cualquier proyecto. El espíritu que hay  detrás de esto es llevar el proyecto a su verdadera esencia, definiendo y  comunicando esa visión entre todo el equipo.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://lh3.googleusercontent.com/-Ul3jssXpqpQ/TeXnkBV1fFI/AAAAAAAAAB0/Wrw_qttFApU/Agile%252520Inception.%252520Ideas%252520iguales.png" alt="Ideas iguales"/&gt;&lt;/p&gt;
&lt;h4&gt;10 Preguntas&lt;/h4&gt;
&lt;ul&gt;&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;¿Por qué estamos aquí?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Esta es la primera pregunta y la más obvia. Es un recordatorio de  por qué estamos aquí, quienes son nuestros clientes, y por qué decidimos  hacer este proyecto.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Elevator Pitch&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Si tuviéramos treinta segundos y dos frases para describir nuestros proyecto, ¿qué diríamos?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Diseña tu caja&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Si hojeamos una revista y vemos un anuncio de nuestro producto o servicio, ¿qué diría? y lo más importante, ¿lo compraríamos?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Crea una NOT List&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Esta claro lo que queremos hacer en este proyecto. Vamos a ser aún más claros y mostrar lo que no vamos a hacer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Conoce a tu comunidad&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;La comunidad de nuestro proyecto siempre es mayor de lo que pensamos.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Visualiza la solución&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Vamos a pensar en alto nivel la arquitectura y las tecnologías que  vamos a utilizar para asegurarnos de que todos estamos pensando en lo  mismo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;¿Qué te quita el sueño?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Algunas cosas que pueden ocurrir durante el proyecto nos pueden  asustar. Pero hablando de ello, y pensando qué podemos hacer para  evitarlas, puede que den menos miedo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Calcula el tamaño&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;¿El proyecto es cosa de tres, seis o nueve meses de duración?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;¿Cuáles son tus prioridades?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;En los proyectos se pueden definir prioridades en cuanto a tiempo,  alcance, presupuesto y calidad. ¿Qué es lo más y lo menos importante  para este proyecto en este momento?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;¿Cuánto me va a costar?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;¿Cuánto cuesta? ¿Con qué equipo vamos a sacar esto adelante?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description><link>http://mindfood.osoco.es/post/6066333999</link><guid>http://mindfood.osoco.es/post/6066333999</guid><pubDate>Wed, 01 Jun 2011 10:07:56 +0200</pubDate><category>agile</category><dc:creator>arturoherrero</dc:creator></item><item><title>Seis meses en OSOCO</title><description>&lt;p&gt;La semana pasada cumplí 6 meses trabajando en OSOCO.&lt;/p&gt;
&lt;p&gt;No suelo recordar fechas importantes o aniversarios, pero de alguna  forma he tenido muy presente el día en el que comencé a trabajar aquí.&lt;/p&gt;
&lt;p&gt;Durante este periodo de tiempo mi vida ha cambiado en muchos  aspectos, tanto personal como profesionalmente. 6 meses puede parecer  poco tiempo para sacar grandes conclusiones pero a mí me parece  suficiente para reflexionar y poder valorar el pasado y el futuro.&lt;/p&gt;
&lt;h4&gt;Trabajo&lt;/h4&gt;
&lt;p&gt;Cuando &lt;a href="http://arturoherrero.com/2011/01/13/catch-22/"&gt;comencé a buscar trabajo&lt;/a&gt;, tenía muy claro el tipo de empresa en la quería estar y desde el primer momento sentí que había llegado al lugar correcto.&lt;/p&gt;
&lt;p&gt;Hay muchos conocimientos y tecnologías que tengo que dominar en mi  trabajo diario, quizás los más destacables son el lenguaje de  programación Groovy y el framework de desarrollo web Grails así como  Scrum, pruebas, refactoring, patrones de diseño, HTML/CSS, etc…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://apprenticeship-patterns.labs.oreilly.com/ch04.html#be_the_worst"&gt;Ser el peor&lt;/a&gt; me está permitiendo mejorar muy rápido. Cada cosa que aprendo la  intento compartir con el resto de mis compañeros y alguna de mis ideas  ya se ha puesto en marcha, como los &lt;a href="http://mindfood.osoco.es/post/2957472322/nueva-iniciativa-breakfast-speech"&gt;breakfast speech&lt;/a&gt;. Estoy muy orgulloso de sentirme parte activa de este equipo.&lt;/p&gt;
&lt;h4&gt;Gracias&lt;/h4&gt;
&lt;p&gt;Si tuviera que resumir este periodo de tiempo en una palabra, esta sería &lt;strong&gt;gracias&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Lo primero que tengo que agradecer es que un lugar como OSOCO exista.  Puede parecer extraño agradecer algo así pero para alguien tan  idealista como yo, encontrar empresas donde se hacen las cosas bien y se  intenta mejorar constantemente es esencial.&lt;/p&gt;
&lt;p&gt;Lograr que todo funcione sólo es posible gracias al esfuerzo y trabajo de las &lt;strong&gt;personas&lt;/strong&gt; que hay detrás, un gran equipo que me ha dado toda su confianza y  libertad, ayudándome a mejorar constantemente. Gracias chicos!&lt;/p&gt;
&lt;p&gt;Creo que cada época en la vida nos aporta algo en mayor o menor medida, para mí estos 6 meses han sumando muchísimo.&lt;/p&gt;
&lt;p&gt;Todo lo que me ha ocurrido es demasiado evidente para llamarlo casualidad y lo suficientemente real para llamarlo destino.&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/5573569992</link><guid>http://mindfood.osoco.es/post/5573569992</guid><pubDate>Tue, 17 May 2011 13:15:42 +0200</pubDate><dc:creator>arturoherrero</dc:creator></item><item><title>Usando Screen en máquinas remotas</title><description>&lt;p&gt;Cuando nos conectamos por SSH a servidores remotos, es habitual que la conexión muera (porque se cae la conexión a Internet, cerramos la terminal por error, etc).&lt;/p&gt;
&lt;p&gt;Normalmente no tiene consecuencias graves, pero si estamos en mitad de una operación larga (hacer un dump de mysql o instalar un paquete usando emerge) o peor aun, de una operación delicada (una importación contra mysql, por ejemplo), puede ser un incordio, en el mejor de los casos, o tener graves consecuencias, en el peor.&lt;/p&gt;
&lt;p&gt;&lt;a title="Gnu Screen" href="http://www.gnu.org/software/screen/"&gt;Screen&lt;/a&gt; es una aplicación en modo texto muy útil para evitar este problema. Screen permite ejecutar sesiones de shell virtuales que no están ligadas al proceso que las arranca (ya sea éste el servidor de ssh, &lt;a href="http://es.wikipedia.org/wiki/Gnome-terminal"&gt;gnome-terminal&lt;/a&gt; o &lt;a href="http://en.wikipedia.org/wiki/Apple_Terminal"&gt;Terminal.app&lt;/a&gt;). Esto permite que aunque cualquiera de estos procesos muera, la sesión virtual de Screen no lo haga. Ideal cuando queremos hacer operaciones largas y/o delicadas.&lt;/p&gt;
&lt;p&gt;Un ejemplo de uso (el más básico posible, ya que Screen cuenta con muchísimas más posibilidades) sería el siguiente:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ screen -S misesion # creamos una nueva sesión&lt;br/&gt; $ do-some-long-and-delicate-operation&lt;br/&gt; ... Doing the operation&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;En este momento podemos pulsar la combinación de teclas &lt;em&gt;ctrl+a ctrl-d&lt;/em&gt; (d, de detach) para dejar la sesión en segundo plano, volviendo a la &lt;em&gt;shell&lt;/em&gt; original:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[detached]&lt;br/&gt; $ screen -d # lista las sesiones que existen&lt;br/&gt; There is a screen on: 	13790.misesion.my-fancy-server-hostname (Detached)&lt;br/&gt; $ screen -r 13790 # recupermos la sesión 13790 (r, de reattach)&lt;br/&gt; $ do-some-long-and-delicate-operation&lt;br/&gt; ... Doing the operation &lt;br/&gt; ... The operation is done &lt;br/&gt; $ &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Una alternativa al algo más precario nohup, y un &lt;em&gt;must-know&lt;/em&gt; (oh yeah :-) para cualquiera que tenga que administrar un sistema remoto.&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/5386038292</link><guid>http://mindfood.osoco.es/post/5386038292</guid><pubDate>Wed, 11 May 2011 09:40:00 +0200</pubDate><category>screen</category><category>sysadmin</category><category>remote</category><category>login</category><category>shell</category><category>ssh</category><dc:creator>deigote</dc:creator></item><item><title>OSOCO Breakfast Speech about LiquiBase Grails Plugin</title><description>&lt;span id="video_player_3292102424"&gt;[&lt;a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"&gt;Flash 10&lt;/a&gt; is required to watch video.]&lt;/span&gt;&lt;script type="text/javascript"&gt;renderVideo("video_player_3292102424",'http://mindfood.osoco.es/video_file/3292102424/tumblr_lgm4ct3o8v1qbuycj',400,225,'poster=http%3A%2F%2Fmedia.tumblr.com%2Ftumblr_lgm4ct3o8v1qbuycj_r1_frame1.jpg,http%3A%2F%2Fmedia.tumblr.com%2Ftumblr_lgm4ct3o8v1qbuycj_r1_frame2.jpg,http%3A%2F%2Fmedia.tumblr.com%2Ftumblr_lgm4ct3o8v1qbuycj_r1_frame3.jpg,http%3A%2F%2Fmedia.tumblr.com%2Ftumblr_lgm4ct3o8v1qbuycj_r1_frame4.jpg,http%3A%2F%2Fmedia.tumblr.com%2Ftumblr_lgm4ct3o8v1qbuycj_r1_frame5.jpg')&lt;/script&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;OSOCO Breakfast Speech about LiquiBase Grails Plugin&lt;/p&gt;</description><link>http://mindfood.osoco.es/post/3292102424</link><guid>http://mindfood.osoco.es/post/3292102424</guid><pubDate>Mon, 14 Feb 2011 16:03:39 +0100</pubDate><dc:creator>rzamo</dc:creator></item></channel></rss>

