Recently I am working with GraphQL on a day-to-day basis. The more I work with it, the more I like the GraphQL API compared to the traditional Restful API. And it is an interesting project, this article is going to do a
Why?Recently I have a chance to work on mass among of rake tasks in the code base. During the work I found Rake is somewhat confusing but also an interesting framework. I would like to talk about some of the good and bad
This is a talk that I presented in Case Common learning lunch:
Concurrent programming in Ruby is hard. Before we start implement things with ‘Thread.new’, we should know the difference between Thread and Process, how to write thread safe code and what framework to use.
Maintaining large application is always a pain for rails developer. Because the MVC scructure encourage developer to write business logics in controller and model. Therefore when application become bigger, usually it will result in Fat controller or All mighty model that have lots of business logics crumble all over the places. Extract those logic to another place is one of the solution, but how do we extract and where to extract is another problem.
Recently, I encountered a circular dependency problem that happened in rails, When the parent model is dependent on child model, it returns Runtime Error for Circular dependency. However, there is 2 child model that have circular dependency on parent model, but only one will fail on loading:
Rails errors is handling by ActiveModel::Errors, which generate error messages with attribute name and error type. Recently I am working on some feature related to rails error messages, so it is a good time to go over how the rails errors works.
It’s just a hash
ActiveModel::Errors actually is a wrapper for error messages hash, which include the attribute names and error messages for attributes.
Recently I am mainly working on devops things, including system admin and chef. We are refactoring our old chef recipes into a more modulize shape with tests, So I think it’s a good time to share some experience in this refactor!
Resource and Provider in Chef
In chef, we use resource to describe the state of our system. And cookbook is a series of resources that describe the server state.
Recently I am working on Devops things, including server, network,deployment and chef scripts. In the Devops team, we are working hard on refactoringour old chef recipes into more clean and modularize cookbooks.So I thin
In 2012, I am planning to start contribute and participate more on opensource projects. The target of this series is to read through the source of open source projects that I am interested with, and explain the structure and interesting pieces that I found in the source.
Sinatra is a rack-base , lightweight web framework implemented in ruby. Written and desinged by Blake Mizerany. Famous for it’s dsl syntax and simpliness.