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 !
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.
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.
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.
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.
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 ?
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.
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.
I will be there as a coach !
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.
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.
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).
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.
Best ruby book if you're already familiar with dynamic languages.
Great and enlightening book, will probably give you wings.
Some links on this website are affiliated.