Blog

@fredwu 14 years ago | 1 min read | no comments
I have just pushed a commit that added Rails 2.x compatibility to Inherited Resources Views. Please give it a spin! :-) P.S. I’ve only tested it on Rails 2.3.8.
@fredwu 14 years ago | 1 min read | no comments
It isn’t the first time realtime website traffic analysis has been introduced. Reinvigorate is one of the services that provides realtime traffic tracking and analysis. The thing I like it most though, is in fact the heatmap. :-) [] Heatmap is a great tool to help identify convoluted interface and improve the user experience.
@fredwu 14 years ago | 1 min read | no comments
I have just added a Github ribbon to my blog (look at the top left corner!). Please feel free to poke me! :D References: - Redoing the GitHub Ribbon in CSS - GitHub Ribbon Using CSS Transforms
@fredwu 14 years ago | 1 min read | no comments
Using Inherited Resources is an excellent way to reduce the amount of repetition in your controllers. But what about views? A lot of times resources share the same views, so why not DRY ‘em up using Inherited Resources Views! Go check out the code! :-)
@fredwu 14 years ago | 1 min read | no comments
[] Released my first ruby gem. :-)
@fredwu 14 years ago | 1 min read | no comments
[] Looks like it’s time for a reboot…
@fredwu 14 years ago | 1 min read | no comments
In a web app, it is very common to have actions that destroy (delete/remove) data. These actions, if you don’t already know, should always map to POST methods. On top of that, because these actions are destructive, the UI should always ask the user for confirmation. But how do we actually implement the confirmation dialogue though? The vanilla JavaScript confirm box would be the easiest but at the same time the ugliest - this thing stalls most web browsers until the user acts on it. An inline p...
@fredwu 14 years ago | 1 min read | no comments
I am extremely happy that my patch was accepted, so I am now one of the 1600 odd people who have contributed to the Rails project! :D
@fredwu 14 years ago | 1 min read | no comments
Similarly to Action Throttler for Rails, KThrottler is an easy to use Kohana module to quickly throttle application actions based on configurable duration and limit. Go check out the code now! :)
@fredwu 14 years ago | 2 min read | no comments
Dating girls is like calling a callback function without knowing the accepted arguments. Random exceptions would throw right in your face. Dating girls is like running prerelease ruby gems. Things might not be compatible, there might be memory leaks and other weirdnesses. Dating girls is like reading a tutorial in a foreign language. You think you got it, but you don’t. Dating girls is like using a ruby class with lots of mixins. You’re looking right at a class method, but you don’t know where...