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.
I encountered some very strange erb behaviors when the you comments in the templates. For example:
<% if true %> Hi from Rails! <% end # hi from rails %>
These days I am working on a large change in our corporate website. It includes a lot of functional changes as well as a lot of little text tweaks here and there. Our process for making these changes is that the marketing people go through the whole site and generate a large document, which includes all the modifications that should be made. After that the developers go through the large doc and start making the changes. The problem is that this process is very inefficient. This is because of the following reasons: