JHChabran

Thoughts on Ruby, CoffeeScript and Vim from a passionate developer.


Introducing Photograph

Posted on January 10, 2013 in Ruby

Photograph is a really simple gem that provides to take screenshots of webpages as they are rendered in webkit. Give Photograph the url you want and that's all.

The interesting part is how easy this was to code !

Read more...


Guest post about CoffeeScript on DevQuotes

Posted on December 21, 2012 in CoffeeScript

CoffeeScript is now four years old and had been introduced into Rails 3 default stack in april 2011. Yet CoffeeScript isn't well known among the gigantic community of web developers!

So as friends of mine are running a generalist blog about development and security, I took the opportunity of introducing CoffeeScript there to their heterogeneous audience.

I wrote a guest post there, introducing CoffeeScript with a quick overview, stressing as it should be the fact that CoffeeScript is a drop in replacement for Javascript, not a costful technology change.

CoffeeScript is a rare bird, web developers from any language and framework can benefit from it, I wonder how its usage will grow in 2013.


Mixed links of the week (2)

Posted on December 14, 2012 in Links

It's been eleven days since my last mixed links of the week.

So far I managed to build up enough motivation to write at least one article per week, thanks to this great book, I still have trouble posting these mixed links on a fixed day :).

Anyway, this week includes Ruby, Haskell, R, an interview, communications and a surprising initiative!

French readers, don't miss Dimelo Ruby Christmas Contest, win a Nexus 7 by submitting pull requests to open source projects.

Read more...


Fun with to_proc and compositions

Posted on December 09, 2012 in Ruby

What about being able to shorten users.collect { |user| user.order.city } or its unefficient form users.collect(&:order).collect(&:city) into

users.collect(&[:order, :city])

It can be achieved by composing functions, in Ruby's case by composing Procs. This is an amusing exercise that demonstrates Ruby's functional abilites.

Read more...


Mixed links of the week (1)

Posted on December 03, 2012 in Links


Testing a Chrome Extension with Mocha and CoffeeScript

Posted on November 28, 2012 in Chrome

So we've previously seen how to bootstrap a chrome extension with CoffeeScript. The next step is about adding testing support. Even if it's a simple extension, the whole process of reloading the extension in the browser to manually test a feature is incredibly boring and error prone.

Read more...


TabSwitcher got updated

Posted on November 25, 2012 in Chrome

TabSwitcher had been started one year ago, to showcase (see previous post) how a Chrome Extension using CoffeeScript can be built. I recently spend some time polishing it to bring it to the level of a decently featured extension.

Before describing the changes, what problem does it aims to solve ?

Read more...


Vim isn't about speed

Posted on September 27, 2012 in Vim

Vim users, myself included, often advocate about gaining speed, carving text like a ninja and banning that awful device named a mouse.

The follow-up to this is people saying, "Vim seems to be awesome but I don't need to be that fast anyway."

Each time I heard that, I tried to advocate about the fact that as a coder you're staying around seven hours per day typing, so why not try something really efficient ?

It hardly convinced anyone.

Read more...


10 Rails Quality Examples

Posted on June 12, 2012 in Rails

Learning Rails by example is a great way to progress. This blog post list ten awesome real world projects on which you should definitively read if you want to improve.


Rails Girls Paris on 15-16th June

Posted on May 27, 2012 in Rails

I will be there as a coach !


Build a chrome extension with Coffee Script

Posted on December 17, 2011 in CoffeeScript

Ever had an idea for a great Chrome Extension ? Did you know that a chrome extension is just javascript ? And where there's Javascript, we can write some CoffeeScript !

This post aims to give you an overview of building a chrome extension wrote in CoffeeScript. While being familiar with the latest is mandatory to understand what's going on there, no previous experience with Google Chrome is needed.

Read more...


Writing readable specs

Posted on September 11, 2011 in Ruby

Writing Rails specs with RSpec and FactoryGirl is easy to do when you got a basic understanding of testing principles but you may have noticed how these specs tends to get cluttered over time. Even to the point you don't get what's going on at all and call your co-worker who wrote them and ask him to handle your task!

The following points are basic principles to keep in mind while writing specs to avoid being stuck with an unreadable spec.

Read more...


Notes on migrating to OSX Lion

Posted on July 30, 2011 in OSX

I bought Lion yesterday ! People have already tested it against tools I use for work : Homebrew, RVM, MacVim so installing it on a friday night shouldn't be too painful. Plus I got backups everywhere (local server + dropbox + github + tarsnap).

Read more...


Textmate or How to Lock Yourself

Posted on March 11, 2010 in Rant

I tried every code editor out there, every IDE I could find. Six or seven years ago, I came to the conclusion that I do prefer simple editors to them, mostly because I prefer a sharp tool than a clumsy thing that tries to solve every problem. Oh sure, stuff like NetBeans or Eclipse perform really well on Java, but I don't code with this language, so let's skip directly to code editors.

Read more...


Categories

CoffeeScript (2)
Rails (2)
Ruby (3)
OSX (1)
Links (2)
Rant (1)
Vim (1)
Chrome (2)

Tags

Chrome CoffeScript CoffeeScript FP Javascript Links OSX Productivity Project RSpec Rails Rants Ruby Talk Testing Vim

Archives

January 2013 (1)
December 2012 (4)
November 2012 (2)
September 2012 (1)
June 2012 (1)
May 2012 (1)
December 2011 (1)
September 2011 (1)
July 2011 (1)
March 2010 (1)

Recommended books

Links


Disclaimer

Some links on this website are affiliated.