Articles tagged 'opinions'

  • Writing your blog posts in Markdown with Postmarkdown

    February 3, 2012

    This post was originally published in the Rambling Labs Blog on February 3, 2012.

    Another thing we added to our new site, uploaded back at the end of December, was the ability to write our blog posts in Markdown, which is a text-to-html tool that allows you to write formatted text without actually having to write all the corresponding HTML. Markdown is used for the project wiki pages on GitHub, and can also be used for the project’s readme file.

    Most of the time, I don’t like that HTML gets autogenerated for me, since I usually don’t get the results I want. We used to have the site (which was really the blog only) in WordPress, and I never used the autogenerated HTML. In fact, it was quite the opposite: I wrote every blog post in plain…

    Continue Reading →

  • CoffeeScript: The '=>' operator

    December 16, 2011

    This post was originally published in the Rambling Labs Blog on December 16, 2011.

    As you may know, I’ve been playing around with CoffeeScript for a couple of months now.

    One of CoffeeScript’s jewels that I haven’t talked about yet and that I’ve been using lately on the jQuery Rambling Slider codebase, is the => operator. It is basically a custom function definition, which binds that function to the current context. That is, it ties the this value of the outer scope to the this value of the function being defined.

    How many times, writing JavaScript, have you done something like this:

    var outerFunctionWithCallback = function(options, callback) {
      /* Do something with options */
    var theFunction = function(){
      var self

    Continue Reading →

  • The joy of writing CoffeeScript

    November 11, 2011

    This post was originally published in the Rambling Labs Blog on November 11, 2011.

    I have been a fan of JavaScript for a while now, and I have dived into the CoffeeScript world for the last month or so.

    Guess what? I love it! It’s been a great experience so far.

    Definitely the one thing that I’m loving the most right now about CoffeeScript is the syntactic sugar. It’s basically a lot of simple shorthands for certain things (the -> is so handy). Take this example (and ignore what the excluded methods are doing):

    I had this:

    class BuildUtils
      combine_source_files: (callback) ->
        self = @
        fs.readdir './src', (err, files) ->
          self.error_handler err
          content = new Array()
          files = files.sort()
          for file, index

    Continue Reading →

  • Rails 3.1 - Translating routes

    October 26, 2011

    This post was originally published in the Rambling Labs Blog on October 26, 2011.

    Today, I was wondering if there would be a way to add translated routes automatically in Ruby on Rails. This is for a project I’m currently working on, whose users speak mostly spanish, so I want to make them happy with urls like “/contacto”, “/quienes-somos” and “/trabajos/1” instead of “/contact”, “/about-us”, and “jobs/1”.

    So, I googled and there it was: the i18n_routing gem.

    This reminded me one more time how awesome is the Ruby community, which is definitely one of the main reasons why I’m loving Ruby and Rails so much.

    So back on topic, the gem is easy to install, and only depends on the i18n gem. Run gem install i18n_routing and you should be good…

    Continue Reading →

  • RubyMine vs. Vim: my point of view

    September 18, 2011

    This post was originally published in the Rambling Labs Blog on September 18, 2011.

    So, I tweeted a question earlier today about what editor is preferred by the rubyists and, although I didn’t get many answers, it, combined with a recent discussion I had about RubyMine vs. Vim later, helped me clear my reasoning a bit.

    By my reading of Agile Web Development With Rails and some people I follow on twitter, it seems that all the cool geeks use Vim (or TextMate or Emacs) for Ruby and Ruby on Rails programming instead of any IDE.

    I once googled to find out that vim was way complicated to set up. That same time, I found akitaonrails vimfiles on github. Fairly easy to set up if you just follow the instructions. But today I realized that there…

    Continue Reading →