Joined July 2012
·

Javier Toledo

CTO @ TheAgileMonkeys, Product Architect of Meets.io at The Agile Monkeys
·
Las Palmas de Gran Canaria, Spain
·
·
·

Thanks man, you saved our lives with the Don't forget to add the "file://" tip ;-)

@errinlarsen thanks for the fix! I'll update the post and mention your contribution.

The listed code worked when it was posted, but since then both state_machine gem and Rails have evolved a lot. Actually, if I had to do this again I'd rather use Rails Concerns instead of a bare module http://api.rubyonrails.org/classes/ActiveSupport/Concern.html

@perettxintxola may be you need to include bootstrap with gliphicons in your page. Try adding this line to the <header> section in your HTML code:

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
Posted to Forgiving ruby over 1 year ago

I don't see this like a good idea for production code, but it looks super fun! It remembers me the autocorrection for commands in zsh and I think this could be useful for debugging:

What if you combine this idea with a call to ruby debugger, write a warning in the log or sending a report to your favourite exception notificator? If you have spent a while getting ready some kind of test that is time consuming, may be a largue test suite or trying some commands in the console, you'll be super-angry if something fails because you mistyped a 'nil?' call and you have to start over. I think it could be useful to be aware of the mistake but don't stopping the execution of your test because of this. What do you think? You can always deactivate it for production environment ;-)

Posted to Avoid "gut feeling" in programming over 1 year ago

I think that for experienced developers that "gut feeling" is sometimes just the voice of their experience, so when everyone in a team has this feeling pointing to the same place, it usually is a shortcut to the right answer. BUT if you can't explain why you take this decision and why is better than any other alternative to a less experienced developer or a client, there are many chances that you are just following latest tech fashion and buzzwords instead of experience.

@gastonius that's a nice approach, but I think I'd prefer to use half star icons from fontawesome:

http://fontawesome.io/icon/star-half-o/
http://fontawesome.io/icon/star-half/

What I'm thinking to do is detecting with JS when the mouse is on the first or second half of the star and replace the icon by the half or full star in each case. This is one of the main requests on github, so I promise this will be one of the first things I'll do when I have time ;-)

@antorome I think these approaches wont work because gliphicons are not images, but a typeface. What about just using Fontawesome on entire project and get rid of Gliphicons? There are equivalents for every gliphicon and you win the half stars :-)

@sagive thanks, I'm glad it to be useful :-)

@antorome "half stars" cannot be done yet with this widget, but its planned for some future version. You can leave your comments on this issue if you'd like to share any ideas: https://github.com/javiertoledo/bootstrap-rating-input/issues/8

Extending the plugin to render readonly representations of ratings is also planned here: https://github.com/javiertoledo/bootstrap-rating-input/issues/7

Meanwhile, to generate static half stars you can use Font Awesome with one of these icon classes:

Thanks for your comments! :-)

@bendayhoe You are welcome :-)

JS Dates are awesome! XD

Some time ago I discovered the library date.js that seems good to avoid this kind of "unexpected behaviors": http://www.datejs.com

Yes, I'm with you both on this to be an issue, I had no time yet to figure out a fix, but I'll do it eventually and then update this post accordingly ;-)

Hi @avetisk, thanks for your comment, the website is a work in progress and this issue and many others will be addressed in a near future. Anyway I wouldn't call it a "very bad idea", it's just an idea that could be useful in some use cases :-)

you're welcome :-)

Posted to Top 3 Coding Fonts over 1 year ago

I love Bitstream Vera Sans Mono :-)

Wow! Very useful and well-documented post!

Posted to Coffeescript, is worth to learn it! over 1 year ago

@khasinski JS is not a language designed specifically for OO, but it can actually behave as any OO language in a very easy way (https://coderwall.com/p/z6-u_q?i=6), so at least is a Object-Oriented-Capable programming language XD

Posted to Coffeescript, is worth to learn it! over 1 year ago

@jisaacks May be you want to define the template function as an empty function in your base class so the descendants can extend it and work as expected, on other languages it could be named an abstract method :-)

I'm still convinced that CoffeeScript is an OO language, your argument about that it's just JS and therefore not OO capable is very weird taking into account that you can actually write a cross compiler from C++ (via LLVM) or Ruby into JS without loosing their OO capabilities:

https://github.com/kripken/emscripten/wiki

http://opalrb.org

And even CoffeeScript can actually be directly interpreted on your shell via the coffee command over node and even be interpreted by Ruby without an intermediate JS conversion thanks to poetics gem (https://github.com/brixen/poetics)

Compilers and Interpreters are a weird field of investigation and fun, but remember that at the end of every language there is a simple processor that runs a very simple set of instructions without any kind of object related abstraction.

Posted to Coffeescript, is worth to learn it! over 1 year ago

@jisaacks if I have understood well your example, if B extends A adding the property b, then A cannot have a method a which uses b as b is only present in B, so if B overrides a with its own version of a which uses b, it will work as follows: A will have a method a which doesn't use b and B will have a method a, that overrides the a from A, which uses the property b as expected on any OO language :-)

I'd say that CoffeeScript is more than JavaScript just in the same way that C is more than assembler or Ruby is more than C, it's a matter of abstraction, and OO is an abstraction. It doesn't really matters if CS is on shoulders of JS or a Turing machine if it works as a great abstraction that let coders work faster and better.

Thanks for your comment!

@laysreyleap this solution helps to maintain sessions within an iframe, maintaining the same session inside and outside the iframe simultaneously could be tricky in Safari. May be this link helps you with that: http://www.reizbombardement.de/archives/safari-5-1-4-enforces-cookie-policy

@laysreyleap It works for me flawlessly on Safari, but rack-iframe could perfectly have some undetected bug that needs to be solved. On which versions of OS, Safari and Rails are you experiencing problems?

@bobdutch nice! I'm glad to know that it has been useful for someone else :-)

Woah, that saved my life, thanks! (Also works to install ruby-1.8.7)

Posted to Infographic on Node.js over 1 year ago

@hnordt I think the objectives of Rails and NodeJs are not exactly the same. For me Node is more for APIs than for web apps, although you can develop web apps with node and APIs with Rails...

Posted to coderwall logo made with HTML & CSS over 1 year ago

I think the font is ITC Avant Garde Gothic Bold: http://www.fonts.com/font/itc/itc-avant-garde-gothic/bold

Achievements
1,430 Karma
126,394 Total ProTip Views