Making Rails asset pipeline faster

We all know that for a rather large Rails app where the front-end is quite stuffed, the asset pre-compilation and more importantly - development mode changes are far from instantaneous.

The front-end we're referring to is the kind that makes heavy use of sass, sass libraries (Compass, Bourbon, etc.) and transpiled Ja ...

read more

How to Web conference, random thoughts, mostly live - five years later

Almost five years since the last post about How to Web [0] - wow that's some large slice of space-time continuum. I recall I almost started this blog for stuff like this, good memories [1].

Half a decade later, what's changed one might ask? Well, the scale looks bigger and so far the talks have been interesting at ...

read more

Shedding some light into UUID version 4 in Ruby and Rails

Ruby's standard library and Rails's PostgreSQL adapter use by default version 4 UUIDs. This can be changed in Rails migrations via:

default: 'uuid_generate_v1()'

param whereas Ruby's stdlib only supports version 4.

Another interesting difference is in the implementations:

In the Ruby's s ...
read more

The half-life of a programmer

>Half-life (t1/2) is the amount of time required for the amount of something to fall to half its initial value. The term is very commonly used in nuclear physics to describe how quickly unstable atoms undergo radioactive decay, but it is also used more generally for discussing any type of exponential decay.

I had thi ...

read more

Improve Rails performance by adding a few gems

Working with Rails for some time you start nitpicking on how to improve it. This is a first in the series of articles regarding on how to improve (even marginally) Rails's performance.

I'll focus on a bunch of gems that speed up, in some cases considerably, small parts of Rails, like the html escaping, the String#bla ...

read more

Is Rubinius 2.2.3 production ready ?

Ruby 2.1 was released this Christmas, great news everyone! It sports a better GC (RGenGC - gerational GC), hierarchical method caching, some small syntax changes and non-experimental rafinements. All in all one can expect 5% to 15% performance increase which is quite awesome.

As I was reading the comments in the hack ...

read more

How to reduce the size of your VMs

As the host OS I use Windows 8 (just upgraded to 8.1), well why ? one might ask.Is rather simple: Steam and after some dreadful searching and configuring tools I managed to install the basics for writing and deploying code: Vim, Git, PuTTy and a decent console replacement like Console2 [0].

Of course those aren't eno ...

read more

Chunked transfer encoding in Rails (streaming)

Anyone that has written a little PHP knows what the flush() family of functions do. The ideal usage scenario for using chunked transfer[0] is when we have something costly to render e.g. the first three most recent articles on a blog. Why ? one might ask.

Is rather simple: in a normal request where the server respo ...

read more

On Ruby modules and concerns

Modules are useful for highly specialized code that can be injected into other classes for fun and profit or for creating Namespaces. An interesting approach is to use modules as an alternative to classical inheritance (without its the usual trade-offs) : the core idea is to share an abstracted role that can be inclu ...

read more

On semantic Ruby block constructs

I was cruising around my Github notifications and I found an interesting open issue created by Jim Weirich : “The Semantic Rule for { } VS do/end” in the Ruby style guide repository .

>The semantic rule says use { } for blocks where the primary purpose of the block is t ...

read more

On Ruby 2.0 memory usage, Unicorn and Heroku

On UNIX-like operating systems (e.g. Linux) there's the concept of process forking via the fork() system call. When one calls fork from a parent-process it will spawn a new child-process - that is a copy of its parent, then both processes return from fork. The child-process has an exact copy of the parent's memory in ...

read more

On font rendering consistency across browsers

Back in the day (i.e. when Firefox's version was a single digit) font rendering was at its best on Mozilla's browser. I remember comparing Firefox's anti-aliasing to the new-kid-on-the-block Chrome : the difference was huge.

Time went by and we all know what happened : most web developers found themselves using Chro ...

read more

On unnamed abstracts, entities and happiness

When I look upon my day to day behavior the pattern that pops out is that of abstracted sets of ideas interchanging one another or making connection to other entities, bringing them in the foreground, into my field of subjectivity.

We try to to make perception ours thus abstracting it away in nicely grouped entities ...

read more

On writing artisanal code

Every artisan at a certain point in time just stops and starts thinking about the inner-workings of his craft. He ponders on the whole process from an Outside while trying to make connections between apparently dissimilar entities that his craft is made of.

One might argue that this is a purely subjective endeavor: w ...

read more

Buzzwords and manifestos

Do we really need them ? I mean sometimes I ask myself what’s the point of all the so-called ways to get things done or tons of guides for getting you to be a “better” you, like NLP, the secret of life and all that stuff.

To quote Nassim N. Taleb:

> “I went to a happiness conference: researchers looked very unhapp ...

read more

Using Firebug as a scalpel, yet not for web development

Needless to say, I’m an avid user of Firebug , let’s face it: without it, web development would suck big time, yes we do have other variants but firebug remains the status quo, for me at least. Yet this is not an article about how to develop web apps with Firebug, no, is an article ab ...

read more

Programatica 2010 after thoughts

Yes, I’ve attended one more conference Programatica 2010 , this one was axed on programming. It started with some interesting to not so interesting presentations of the partners. What I’ve loved about them, was that they contrasted each-other prett ...

read more

The frontend backend debacle

I’m really starting to get fed up with this useless separation. (Warning: strong personal opinions, based on arguments fallowing).

Ok, it’s not useless, I get the idea in a big team, separation of concerns, better productivity and all that. That’s good and I’m all for that, makes things faster (in the big picture ...

read more

How to Web Conference, random thoughts, mostly live

Sadly, today I’ve arrived a bit late, where "a bit" means a lot; I’vevolatile and utopic place most of the time.

In very few domains you can take an idea and with small or no resources (money) and bring it alive and running. I mean, actually thinking about it, how can’t that be exciting ?! Having an idea and turnin ...

read more

How I speeded up my browsing experience by a really nice margin

From time to time I like to optimize a bit my Windows machine, yet mostly all I do is fine tunning, nothing really spectacular. This time while I was browsing the net and thinking about one of my old nags (browser performance loading several tabs, to more exact: Firefox loading up 20+ tabs) I realized something really s ...

read more

Building a small blog cms in rails

Yes, building a blog cms in rails is apparently very simple, well to be true it’s simple if you want something really limited like a post model, a couple of static pages, controllers and one for the contact form and you’re settled. Actually for something like this one can use [Sinatra](http://www.sinatrarb.com/ "Sinatra ...

read more
No more pages!