More articles tagged 'programming'

2008-03-27
Writing a compiler in Ruby bottom up - step 1/??

I've just posted the second part of this series. See part 2

I've been sitting on this for a long time - the oldest entries in the series I'm about to start posting is stuff I started writing back in early 2005 before I even started version 1 of ...

2008-03-26
Model-View-Controller - the beginning

I stumbled over the homepage of Trygve Reenskaug, the inventor of MVC yesterday. His page on Model-View-Controller is well worth a visit, particularly for the original documents from Xerox Parc outlining the pattern.

...

2008-03-25
URLs do not belong in the Views

It's bothered me for some time to hardcode URLs in my views. It means that if I want to revise the linking structure, I may need to modify the views in a huge number of places. At the same time I don't like the thought of putting it in the model ...

2008-03-23
Enforcing Strict Model-View Separation in Template Engines

This is a great article on the importance of a clean separation of models and views (see Model-View-Controller).

More people are getting exposed to MVC with web applications programming, but not everyone are making it a clean separation. Much of the benefit of MVC comes from making sure ...

2008-03-23
Why Rails is total overkill and why I love Rack

Rails is total overkill. It tries to do "everything" in a massive framework where major components are tightly intervowen. Smaller frameworks like Merb and Camping have already shown you don't NEED this. I argue you don't need a framework at all - you need highly cohesive, loosely coupled components. That is ...

2008-03-22
Rack middleware: Adding cache headers

I'm playing with a small web based RSS reader, and one of the things it does is cache a lot of data to reduce the impact on the sites I follow feeds from. However I realized this a couple of days ago I'd completely forgotten to set cache headers, and I ...

2008-03-22
Rewriting content types with Rack

UPDATE: I have just added another Rack entry: Rack Middleware: Adding cache headers

Rack is a common API between webservers and frameworks for Ruby. It allows all kinds of nice stuff, like chaining filters that each do one small and self-contained part of the processing and are easy ...

2008-03-21
Web2.0 style logo reflection with Ruby and Cairo

I keep trying to learn more about Cairo, and cheesy logo effects seems to be as good a way as any. This evening I was playing around with clip paths, and decided to use it to create some reflections. Here are the results:

2008-03-21
Simple drawing in Ruby with Cairo

UPDATE: I've just added another howto for Cairo about how to draw a logo with gradients

I've been playing around with Cairo for some time, and have recently been starting to rely on it more and more to avoid having to deal with drawing programs. I'm a command ...