Startup ideas aren’t easy to work out. Those simple, creative ideas may have some patterns, especially for social networks. We are going to briefly analyze the Big three social networks in terms of Facebook, Twitter and Foursquare. Forum Pattern (Genetic Mutation: Inversion) The first pattern I call it “Forum Pattern” as those startups, social networks [...]

Localisation Challenge: Lego NTX
After having been hard working on this Lego robot for the past 2 months, we finally get to this last challenge. Again, this is based on Monte Carlo Localisation and Place Recognition. The implementation is based on RobotC. There are several challenges: The robot will be placed randomly by the examiner in one of the [...]
Install SML Compiler on Ubuntu
Here is a short tip if someone would like to install SML Compiler on Ubuntu. Standard ML of New Jersey interactive compiler SML/NJ is an implementation of the Standard ML programming language. Standard ML has many features, including type safety, polymorphism, algebraic data types with pattern matching, higher-order functions, and a sophisticated module system. It [...]
Pass JavaScript variables to Rails controller 1
Google query doesn’t give much useful result on this topic. What we discuss here is if there is a value/function getParameters() in JavaScript returns “message = hello_world” (a URL query). How do you pass the JS variable into controller? link_to_remote Most common way is using link_to_remote which constructs an Ajax call, but the drawback is [...]
Passing Rails restful_authentication in rspec
Plugins in Rails are useful shortcuts, they produce better implementations for some areas. I recently come across an issue of passing model controller authentication, but the before_filter :login_required stops me testing my code in Rspec. By using mock and stub technique can pass the authentication test. All you have to do is inserting these code [...]
Offline Rails Documentation
Although you can run gem server to have a rails rdoc running on localhost, the rdoc rails document could be troublesome to find a specific method you would like to know about. Fortunately, you may want to try out an ajax improved rails documentation: RailsBrain provides a free downloadable (free) offline documentation for rails. It [...]
“Fork Ruby” Summary (RubyConf 2008)
I like screencast and keynote, they are great ways of learning practically. But some people don’t have much time to watch or listen to all these. Or maybe you forgot some ideas were presented, but it’s difficult to select the part you want to find in the video – you end up with watching the [...]
IE6方程式: 提高开发效率
Jeremy Keith在他的博客中写到关于如何选择对IE6支持的问题。对于不同的网站,他们有不同的用户群,如果很少部分的人用IE6,还要考虑对老版本的支持么?又如果在IE6中发现很小的错误,是否要修正,应该用多少工作时间? Jeremy分析了不同层面极端的几个方案: 将所有的 IE6 访问者踢出你的站点 完全遵循标准开发,并且没有任何针对 IE6 的测试 只使用 Dean Edwards 的脚本让 IE6 支持额外的 CSS 编写针对 IE6 的样式解决大部分问题(比如布局等) 让站点在 IE6 以及其他浏览器上看起来一摸一样 并和Cennydd Bowle一起推算出一个数学公式(使用 t 表示总的开发时间、t6 表示花在 IE6 上的时间;所有的访问者数目表示为 a、 a6 则表示正在使用 IE6 的访问者): p = 50 [ log ( at6 / ta6 ) + 1 ] 运算出来的p概率可以判断是应该应用 Dean Edwards 的 IE 脚本: 当然在某些极端的情况下,比如公司的政策内部一定要运用IE6,作为内部网络软件开发人员,应当要保证IE6的100%正常运作。在浏览器支持的问题上,Yahoo YUI发布过一篇很好的文章”Graded [...]
Computer Science Research Conference at Cambridge
Have been waiting this day for several weeks now since I received invitation to Computer Sicence 2008 conference hold at Cambridge Homerton college. To get UK research fund for international student become rather difficult. Unfortunatly, I’m in this hassle right now together with this economic down time. So finally I’m off there for three days. [...]
Configure Rails migration version type
Rails use a UTC time stamp as migration version by default. Although most examples in books have simple number based system for managing migration versions, there isn’t much information about version type configuration. By default, a migration file(>=Rail 2.0) name look similar to: We can turn this off and use numeric prefixes by adding this [...]
