Recently I got into a situation at work, where there was a Rails app, which was exposing some data through an API which uses active_record_serializers and EmberJS as front-end of the data. The problem was there needed to be a new Rails app, which also consumes data from the same Rails API endpoints and visualize the data. Unfortunatelly ActiveResource and Her are not supporting the ember-data kind of data format, which requires to have separate serializers for EmberJS and for regular Rails API calls. So the ember_data_active_model_parser was born, which is a middleware for Her, which makes it understand the ember-data JSON format.
I decided to make a self made home automation system in my apartment. The reason is that I figured out that turning on and off my heating when I am not around reduces my electricity bill by 50%. My current schedule is to turn off the heating when I leave the house and turn it on 1 hour before I come back home. I do the same thing with the heating in my bedroom. The heating there is turned on about an hour before I go to sleep and I turn it off during the day. However there are exceptions from these rules especailly around holidays, so an automation system should also be very configurable.
If you have tried to develop some rails application on Rails + Ruby 1.9.1 and MySQL database and you are storing non-English characters in your database probably you had a lot of pain with errors about incompatible charsets. This is a known problem and there is even a bug in Rails’ lighthouse for it. There is even a hack which is going around the issue. The solution is not perfect, but it works in most of the cases.
My journey into the ruby 1.9 land continues with some nice observations, tricks and tips.
Probably you remember that some time ago I decided to switch my blog from blogger to a custom made blogging engine written my me. It was a simple sinatra app, which was parsing a bunch of markdown files, which were the posts and rendering the blog.
I decided to use ruby 1.9.1 for my next project. One of the reasons I decided so is because ruby 1.9 is definitely faster than 1.8 and also it has a superior encoding support for the strings. Not to mention that living on the edge is a thrill :-)
I know that some people could start a flame war about what I will discussing right now, so let me first introduce you into the context of the problem.
This is a task that was given to a group of children for admission in kindergarten for gifted children in Nagoya, Japan. 74% of the children solved it. A hint: they were able to count up to 10.