Actualizaciones recientes RSS Ocultar hilos (threads) | Atajos de teclado

  • How to spec a rails plugin? 

    emmanueloga 11:50 pm on June 25, 2009 Permalink | Responder

    Basically, the same way you spec a rails application.
    The cool trick is you take advantage of the spec_helper.rb of by loading it in the spec_helper of your plugin.

    
    # ../vendor/plugin/YOUR_PLUGIN/spec/spec_helper.rb
    begin
      # load your main app spec_helper
      require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
    rescue LoadError
      puts "You need to install rspec in your base app"
      exit
    end
    

    I took this idea from Pat Maddox’s rspec-plugin-generator. You can use that generator to generate the basic plugin boiler plate for you.

    The caveats are, you need to have rspec installed on your main app and you need to actually have the plugin installed in a rails application to test it. In any case, this works for my current needs.

    For more info see this post.

     
  • Conferencia Locos X Rails tomorrow,  

    emmanueloga 1:53 pm on April 2, 2009 Permalink | Responder
    Etiquetas: , ,

    Tomorrow starts Locos X Rails conference in Buenos Aires, Argentina. I’m very exited about it! Yesterday I met Desi McAdam, of DevChix fame, and also the keynote speaker Obie Fernandez, founder of HashRocket. I’m eager to hear their talks, and hope to see you in the conf. too!

    Desi and Obie at the press meeting for the LocosXRails conf.

    Desi and Obie at the press meeting for the LocosXRails conf.

     
    • virginiablanc 1:59 pm on Abril 2, 2009 Permalink | Responder

      Seguro que va a salir todo muy bien!
      Felicitaciones por toda esta movida para tener una Rails Conf Internacional en Argentina: todo un logro!!

    • Franco 6:25 pm on Abril 2, 2009 Permalink | Responder

      Éxitos con toda la organización del evento, como dijo mi amigo Marley “everything gonna be alright” ;)

  • ImageMagick vs GraphicsMagick, quick showdown 

    emmanueloga 11:43 pm on March 13, 2009 Permalink | Responder

    ImageMagick vs GraphicsMagick, no strings attached.

    [emmanuel@going_merry ~/Desktop/test]
    $ gm -version
    GraphicsMagick 1.3.5 2009-01-26 Q8 http://www.GraphicsMagick.org/
    Copyright (C) 2002-2009 GraphicsMagick Group.
    Additional copyrights and licenses apply to this software.
    See http://www.GraphicsMagick.org/www/Copyright.html for details.

    [emmanuel@going_merry ~/Desktop/test]
    $ convert –version
    Version: ImageMagick 6.4.9-2 2009-02-08 Q16 OpenMP http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

    [emmanuel@going_merry ~/Desktop/test]
    $ du src -h

    62M src

    [emmanuel@going_merry ~/Desktop/test]
    $ time find src -type f | xargs -I {} gm convert -sample 25%x25% {} ./dst/{
    }

    real 0m24.593s
    user 0m22.172s
    sys 0m1.383s

    [emmanuel@going_merry ~/Desktop/test]
    $ time find src -type f | xargs -I {} convert -sample 25%x25% {} ./dst/{
    }

    real 0m29.137s
    user 0m24.888s
    sys 0m2.953s

    Conclusion: GraphicsMagick 1.2X faster than ImageMagick

    EOF

     
    • martin 6:47 pm on Marzo 26, 2009 Permalink | Responder

      y 1.2x es mucho o poco? y comparado con tooooooooodas las otras cosas que hace imagemagick, GM las hace?

      yo se que a uds rubyeros les encanta tirar todo por la borda y empezar de nuevo, pero hay software que anda taaaaaaaaan bien, que no se si hace falta cambiarlo por 20% mas de “velocidad”

  • Conferencia LocosXRails: falta poco! 

    emmanueloga 1:48 pm on March 10, 2009 Permalink | Responder
    Etiquetas: conference, ,

    Estamos a poco mas de 20 días para el inicio de la primer conferencia de ruby y rails en Argentina. Todavía no te anotaste? Podes hacerlo mediante la web: http://www.locosxrails.com/registration

    Si ya te anotaste, “spread the word” mediante alguno de los siguientes badges:

    Saludos!

     
  • Locos X Rails Conference: Registration Opened! 

    emmanueloga 12:47 pm on March 4, 2009 Permalink | Responder
    Etiquetas: , ,

    Locos X Rails

    Ya se pueden anotar en la conf. El valor de la entrada es de 300 Argentinos. Claro, antes de anotarse van a querer saber quien va a dar las charlas:

    http://eventioz.com/events/locos-x-rails-conference/speakers

    Nos vemos ahi!

     
  • Locos por Rails Conference in Buenos Aires, Argentina 

    emmanueloga 2:45 pm on January 23, 2009 Permalink | Responder
    Etiquetas: people, ,

    Badge Locos X Rails Conference

    Por fin!, una conferencia de ruby y rails en Argentina! La misma se realizará el 3 y 4 de Abril en la Universidad de Palermo, C.A.B.A. Estan cordialmente invitados. La inscripción no ha empezado todavía, pero si pueden mandar sus propuestas para disertar en la misma.

    Locos Por Rails Conference 2009 will be held on April 3rd and 4th in Buenos Aires, Argentina. Registration is not open yet, but the call for papers is already open. Send yours!

     
  • Have you ever been told.... 

    emmanueloga 4:27 pm on December 28, 2008 Permalink | Responder
    Etiquetas: development, team

    …that your code sucks, that one of your ideas is horrible, totally unusable or even (alas) that you or other developers are dumb because they choose to do things in certain way? I have, once or twice…. :-) .

    Leaving aside the fact that the person proffering those kind of comments has probably not reached maturity yet and/or has not good people skills, there are some good tips to take into consideration when that happens.

    I’ve stumbled upon this excellent article:  http://mumak.net/stuff/your-code-sucks.html. I will simply copy-paste cites from it in blue. It talks specifically about code reviews, but we can adapt its tips if we think of a comment like mocking/stubbing is a horrible idea and it can hurt the development process” as if it were a code review… (By the way, David show us in his article the proper way to handle these kind of statements. Excellent post!)

    First, don’t take it personally. Very often programmers tend to confuse personal preference with objective worth. I tend to take the “let’s do it your way” path -in cases where there is no harm in doing so- to avoid never ending discussions.

    In the positive side of things, consider:

    …someone has just tried to improve your product. They’ve put thought, effort and creativity into helping you, and now they have put their work up for critique: thank them.

    Divmod have a policy of always saying one good thing in each code review. There is always something nice to say, even if it’s just I’m glad someone is looking at this part of the code

    Code reviews provide an amazing opportunity to grow as a programmer and to improve the software we make. Off course! Just because the comment does not come wrapped in a polite sentence does not mean that it is wrong.

    At the other side of the coin, If we are the ones reviewing other people work, then:

    Ad hominem

    This ought to go without saying: review the code and not the coder. Comments about a person will only make it harder for that person to apply critiques about their code.

    When making negative comments, refer to the patch or the branch rather than you. For example, You’ve introduced a bug in get_message becomes this patch introduces a bug in get_message.

    Unclear Outcomes

    If all you say is, this patch introduces a bug in get_message, then you have failed as a reviewer. The goal is to improve the code, not to provide a series of puzzles for the author.

    The author should be able to look at a review and be able to tell how to address each point and also when they have addressed all points. Reviews with unclear outcomes turn into open-ended discussions about the patch, which sometimes become focused on making the reviewer happy, rather than improving the code.

    Confusing personal preference with objective worth

    This is a problem in all spheres of review. Film critics, literary editors and acadamic reviewers all do it. What I like is not necessarily the same as what’s good, although part of becoming a better programmer is having your preferences align better with reality. What I dislike is perhaps even less likely to be the same as what’s bad.

    When reviewing a perfectly acceptable patch that solves a problem using imperative-style programming, do not criticize it simply because it isn’t in a more functional style. Doing otherwise makes reviews a game of guess what the reviewer likes rather than write good code.

    Reviewers can avoid this trap by phrasing review comments as questions, Did you consider using a more functional style?, Why aren’t you using regular expressions to solve this problem? etc.

    I encourage you to read Jonathan Lange’s post, there are a lot of excellent tips on it!

     
    • ViR 4:03 pm on Enero 14, 2009 Permalink | Responder

      Excelente post! Es necesario ser un buen comunicador para ser buen coequiper.

      Beso!.-

  • facebooker gem outdated on rubyforge 

    emmanueloga 3:24 pm on December 8, 2008 Permalink | Responder
    Etiquetas: facebook

    If you are building a facebook applicaction using facebooker gem, beware the version of the gem in rubyforge is outdated. The easier way to deal with this is to clone the github repo of facebooker and install the gem from there.

    1. git clone git://github.com/mmangino/facebooker.git
    2. cd facebooker

    Then:

    1. rake gem
    2. cd pkg
    3. sudo gem install facebooker-[insert-version-here]

    UPDATE

    But this won’t work… the updated method is:

    1. rake gemspec
    2. gem build facebooker.gemspec
    3. sudo gem install facebooker-[insert-version-here]

    At this point, the lastest version on github is 0.9.9 1.0.8!!! (0.9.5 in rubyforge), and this is a version you are going to need because of this commit.

    UPDATE:

    Although the procedure above still works, you may find it easier to install the gem directly from github, now that its gemspec has been made github-compatible:

    1. gem sources
    2. sudo gem sources –add http://gems.github.com (if it is not already listed when you run step 1)
    3. sudo gem install mmangino-facebooker

    …although because of github gemspec security policy, the gem there is _not always_ the lastest…

     
  • Reunion Ruby Argentina del sábado pasado 

    emmanueloga 11:17 pm on December 6, 2008 Permalink | Responder
    Etiquetas: meeting, ruby-ar

    Con tan solo una semana de demora :) , una pequeña descripción de la reunir del sábado pasado con los muchachos de #ruby-ar.

    Ricardo Markiewicz consiguió el aula en la facultad de ingeniería, donde estuvimos muy cómodos a pesar del calor, y  fue el “maestro de ceremonias”.

    Matías Pablo Brutti nos habló muy brevemente acerca de uno de los proyectos en los que trabaja, sicherheit. Ojalá Matías pueda dar una charla más prolongada acerca de seguridad en aplicaciones web en alguna próxima reunión :) .

    Luís Lavena nos mostró rake-compiler, una gema que contiene tareas de rake que ayudan a cross-compilar código. Con rake-compiler es muy sencillo compilar extensions de ruby que funcionen tanto para un sistema operativo basado en unix como para Windows, ahora que el one click installer utiliza mingw como compilador. Luís utilizó cucumber para planear y testear la funcionalidad de su gema. Además, mostró algunas deficiencias que a veces cometemos por “vagancia”, como hardcodear paths a herramientas del sistema en los scripts de instalación. Además, Luís se incluyo el modulo acts_as_photographer y sacó las fotos que pueden ver más abajo.

    Pedro Visintin invitó a Pelle Braendgaard, desarrollador de la gema  http://oauth.rubyforge.org/, quien nos habló un poco de porque querríamos utilizar OAuth para compartir información sensible de los usuarios de nuestras aplicaciones.

    Además, Pedro dió su propia charla: “Como ser freelancer y no morir en el intento”. Nos habló de los riesgos que corremos como freelancers y como prepararnos para los mismos. Nos animó a no tomar nuestra profesión como un trabajo, sino mas bién disfrutar de lo que hacemos, y nos recomendó este libro. También, he aqui los slides de su charla.

    Rafaél Bidegain, representando a CaFeLUG,  trajo algunos libros que se sortearon al final de la reunión, junto con una remera que trajo Pedro. Obviamente yo no me gane nada jajaja.

    Como resumen todo muy bueno, ¡que se repita!

     
    • Diego Algorta 10:21 am on Diciembre 8, 2008 Permalink | Responder

      ¡Muy bueno el resumen!

      Los 3 uruguayos que cruzamos el charco para ir a la reunión quedamos muy contentos. Ojalá pudiéramos ir más seguido.

      • emmanueloga 12:53 pm on Diciembre 8, 2008 Permalink | Responder

        Gracias por venir, un gusto conocerlos!

    • Pelle 9:01 pm on Diciembre 10, 2008 Permalink | Responder

      Fue excelente a conocer a ustedes. Proxima vez que vengo espero que puedo quedarme para todo.

      • emmanueloga 10:14 pm on Diciembre 10, 2008 Permalink | Responder

        Claro! no olvides avisar cuando vuelvas a Buenos Aires :)

  • require or not article on Space Vatican blog 

    emmanueloga 12:05 pm on November 14, 2008 Permalink | Responder
    Etiquetas: require ruby rails

    This article is so cool I want to recommend it, and also keep it linked here (hmmmm, I really need to resurrect my delicious account… :p)

    http://www.spacevatican.org/2008/9/28/required-or-not

     
c
Crea una nueva entrada
j
Siguiente entrada / Siguiente comentario
k
anterior entrada/anterior comentario
r
respuesta
e
editar
o
mostrar/ocultar comentarios
t
ir al encabezado
esc
cancelar