Setting up rubygems without root access

Recently we had to install our rails app on a box, but we didn't have root access. The machine had ruby 1.8.6 and rubygems 0.9.6 (ouch). We can live with Ruby 1.8.6; but to run modern rails, we needed modern rubygems.

The rubygems install page has a helpful section on how to install locally without root access. Note: be sure to add export GEM_HOME=~/rubygems/gems to your .bashrc or your .bash_profile or else the next time you log in, your system gets confused again.

$ mkdir rubygems
$ cd rubygems-a.b.c
$ export GEM_HOME=~/rubygems/gems
$ ruby setup.rb --prefix=~/rubygems

Unfortunately, this didn't go as smoothly as I hoped. The result:

" `gem_original_require': no such file to load -- rubygems/exceptions"

and many other similar error messages.

The issue was that since the server installation already had an old version of rubygems installed, my local gem script was calling up the old rubygems files, but using my new GEM_HOME. A big mess.

What needs to happen is that your new gem executable needs to load your new rubygems files, and work with your new GEM_HOME. There may be a better way to do this, but I have found a workable solution for my case. It involves messing with the executable files that rubygems installs.

If you take a look at your gem executable, you'll see it is just a text file, a ruby program that executes itself.

$ cat  ~/rubygems/bin/gem

#!/usr/local/bin/ruby
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'

...

If you are familiar with shell scripts, you'll know that the first line (the shebang) specifies the binary to use to process the file. In this case, its #!/usr/local/bin/ruby. In general this is great. Ruby loads up the file and runs the script and magic happens. But what if the require 'rubygems' line is loading up the wrong rubygems?

We need to tell ruby where to find our custom rubygems libraries. Luckily, ruby has an option for this, -I path/to/lib. So, all we need to do is open up our gem executable and modify the shebang line to include this option.

$ vim  ~/rubygems/bin/gem

#!/usr/local/bin/ruby -I ~/rubygems/lib
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'

This tells the ruby interpreter to start the process with our custom path in the include path. If we have a newer version of the rubygems library there, they get required instead of the old versions. I can now install gems locally into my GEM_HOME without needing root access like so:

$ gem install mongrel

But that's not all. mongrel also installs its own executable, and when you try to run it, it will require rubygems. And yes, you guessed it, it will find the old version of rubygems and get completely confused. So again, we need to go into the executable file ~/rubygems/gems/bin/mongrel_rails and modify the shebang line.

As far as I can tell, you would need to do this for each and every gem that installs its own executable.

Update: after further consideration, using the $LOAD_PATH environment variable would probably be more robust, but my app is already installed. Perhaps you will let me know how it goes with $LOAD_PATH

Posted by Adeh Tue, 20 Jul 2010 03:52:00 GMT


Web Wednesday GZ is back in June!

    Web Wednesday GZ is back in June!

    Phillip Wu, CEO of inforThinker, will bring us a speech about the hottest consumer electronics product: iPad!

    iPad defines a new type of mobile computing devices, which has differentiate itself from smartphones, netbooks and Tablet PCs. Apple also set a very high standard in UI design for the whole industry. What kind of efforts Apple has been made to bring the computers much closer to our daily lives? The speaker has prepared the slides based on what he has learned from WWDC 2010 Session 103, and will tell the UI design principles behind the brilliance of iPad.

    For more information, please visit http://www.kudelabs.com/wwgz/wwgz1006.html

    And for more, we will donate 5 promo codes of a Beauty Clock iPhone app: MMClock! We draw a lottery after the speech. Remember to join us on 30th, June!



亲爱的WWGZ会员们,

    Web Wednesday GZ 在六月份又再卷土重来了!

    吴晓丹,广州顺科软件服务有限公司首席执行官,会 为我们做一个时下最火热的电子产品:iPad的演讲!

    苹果公司的iPad为平板电脑人机交互设计树立标杆,继而开创了 一种区别于智能手机、上网本和Tablet PC的新型便携式计算设备。苹果到底做了哪些努力,使计算设备更融入我们的生活?本次演 讲以2010年苹果全球开发者大会第103节研讨会的讲稿为蓝本,为大家介绍iPad的闪亮之处,以及苹果带来的人机交互设计思想。

    欢迎光临以下网址获取活动更详细的信息:http://www.kudelabs.com/wwgz/wwgz1006.html

    演讲之后,我们更加会捐出iPhone的美女时钟软件:MMClock的5个优惠码。演讲之后,我们会抽出5位幸运儿!记得6月 30日来参加我们的活动啦!

Posted by Billy Thu, 24 Jun 2010 04:10:00 GMT


Automated testing tools:Selenium & Watir

When should use automation?

What is advantageous for automated testing? When should one decide to automate test cases?

For the short term project,manual testing may be more effective. If an application has a very tight deadline, there is currently no test automation available,then manual testing is the best solution.

However, automation has specific advantages for improving the long-term efficiency of a software team’s testing processes.As we can save the time special for the regression test.What is more,it is trivial for the tester if repeat the same test case.

Selenium

  • Start from Selenium IDE:
  • Selenium IDE is a plug-in for FireFox,and isn't available for other browser.

    It provides an easy-to-use interface for developing and running individual test cases or entire test suites.

    Selenium-IDE has a recording feature,then can export the code in several kinds of language.

    Right now,give a example for how to use it.

    Suppose we want to login Gmail:

    Open the FireFox browser,click the "Tools" tab,then you can see the "Selenium IDE" is in the list,click it and will pop up a window as following:

    Selenium IDE 1.0.7

    Then back to the FireFox browser,open google home page and click the "Gmail" link,then fill info and press "Sign in" button.

    Turn to the Selenium IDE again,all the actions are recorded,see the following screenshot:

    Record_login_gmail

    Click the red round button in the upper right corner to stop the record.The browser will execute the action what you did just now when hit the green triangle button.

  • Selenium RC:
  • Selenium IDE can only run the test in FireFox.Obviously,this is not enough.So we must mention Selenium RC.

    We can export the code and apply the test in others browser through Selenium RC.

    It is simple to export the code in Selenium IDE,view the picture:

    export_code

    Usually,the exported code isn't perfect.Luckily,Selenium-RC allows the test automation developer to use a programming language for maximum flexibility and extensibility in developing test logic.

    It provides an API and library for each of its supported languages: HTML, Java, C#, Perl, PHP, Python, and Ruby. This ability to use Selenium-RC with a high-level programming language to develop test cases also allows the automated testing to be integrated with a project’s automated build environment.

  • Selenium Commands:
  • Contain three parts:Command,Target and Value

    Just give the simple explanation here

    Command:What you want to do for the browser.Such as,"click" a link,"fill" the textarea and so on.

    Target:Tell the browser which element you want to execute the command.

    Value:The value that you want to fill or expect.Sometimes it is blank.It depends what kind of command is used.

    Watir:

  • Introdution
  • Watir is an open-source library for automating web browsers.

    It is a family of Ruby libraries but it supports your app no matter what technology it is developed in.

    It drives browsers the same way people do. Watir also checks results, such as whether expected text appears on the page.

    Watir supports multiple browsers on different platforms.

    Windows 2000/2003/XP/Vista/7 : IE6,IE7,IE8 and FireFox

    Mac:FireFox and Safari

    Ubuntu:FireFox

  • Install Watir
  • Install watir on different system is not the same.I just describe how to install it on Mac for Safari.

    You have to install Ruby first,we recommend using Ruby 1.8.6 on all platforms.

    The type the following commands in Terminal:

    $ sudo gem update --system
    
    $ sudo gem install rb-appscript
    
    $ sudo gem install safariwatir
    

    A moment later,the following info appears and indicates the Safariwatir is installed successfully.

    $ sudo gem install safariwatir
    Successfully installed safariwatir-0.3.7
    1 gem installed
    Installing ri documentation for safariwatir-0.3.7...
    Installing RDoc documentation for safariwatir-0.3.7...
    
  • Use Safariwatir step by step:
  • We also choose the Login Gmail as example so that it is easy to compare what is different between Watir and Selenium.

    Open your Terminal and start irb.

    $ irb
    

    Before going to the Google,you have to let Ruby know you want to use SafariWatir,so please type:

    irb(main):001:0> require "rubygems"
    => true
    irb(main):002:0> require "safariwatir"
    => true
    

    Then start the browser

    irb(main):003:0> safari=Watir::Sfari.new
    => #, @app=app("/Applications/Safari.app"), @document=app("/Applications/Safari.app").documents[1]>>
    

    Go to Google:

    irb(main):004:0> safari.goto "http://www.google.com"
    => nil
    

    Click the "Gmail" link in the upper left corner:

    irb(main):005:0> safari.link(:text,"Gmail").click
    => nil
    

    After flowing to the login page,you can fill personal info and hit "Sign in" button to login.

    To do this, we have to find out some attribute of text field, like id or name, so Safariwatir can find it on the page. We will use Firebug for the first time.

    irb(main):006:0> safari.text_field(:id,"Email").set("ruby@gmail.com")
    => :missing_value
    irb(main):007:0> safari.text_field(:id,"Passwd").set("ruby")
    => :missing_value
    irb(main):008:0> safari.button(:value,"Sign in").click
    => nil
    

    If the username and password are correct,you should login successfully.

    Compare

  • Convenience
  • Selenium IED can record the acitons and export the code,so can save lots of time for the script developer.Watir doesn't have this tools,all the codes have to be typed by hand.

  • On different system
  • Mac OS X:

    Developers still need to strive for Safariwatir and Firewatir,as lots of commands that works fine in Windows cannot apply in Mac.What is more,performance isn’t stable.

    However,Selenium can resolve all the issue that watir is unable to deal with.

    So watir is not good as Selenium on Mac.

    Windows:

    Use selenium to test IE is not the same as FireFox in Mac.Especially for the locator,running the script will be very slow if the locator isn't suitable.

    Originally developed watir is to apply on IE.Until now,it is perfect.

    Posted by 钟宇平 Thu, 10 Jun 2010 09:29:00 GMT


    Start a new project and push to remote git repo

    Like many folks out there, we have been making the switch to git from svn. Although we struggled with git early on, after using both for some time I have come to appreciate the benefits of git. So here is our way of starting new projects with git.

    Using gitosis on our server, we create an empty remote repo first. Then, one guy gets the project going and pushes the code into the empty repo. Here are the commands to get that going.

    $ cd path/to/new/project
    $ git init
    $ git add .
    $ git commit -m 'initial commit'
    $ git remote add origin git@devserver.com:newproject.git
    $ git push origin master
    

    Posted by Adeh Tue, 25 May 2010 08:09:00 GMT


    Office Assistant Wanted

    Kudelabs is hiring!

    We are currently accepting applications for an entry level position in our Admin department. If you are looking for an exciting job in a fun environment, apply now! Send us your resume; we will contact your for an interview if we want to meet you. Please do refer to our submission guidelines. Good Luck!

     Task scope:  

    - Supporting HR, Accounting and office administration

    - Assisting with Government Compliance

    - Translating English-Chinese for alien employees/visitors

    - Assisting with travel arrangements

    - Maintaining dormitory, organizing accommodation for visitors

    - Procuring office supplies and special items

    - Offering support to company events

    - Editing documents

     

     Education and skills:

     

    - Major in English, Business Administration, HR related disciplines with one year working experience

    - Good command of English in speaking and writing

    - Proficiency with Office Software such as Google Docs or MS Office

    - Smart, independent and flexible/adaptable

    - Self-motivated, competent with communicating via email

     

    Terms:

     

    -Full time

    -Salary will depend on experience and ability; we can pay well for great work

    -Company lunch provided

    -Flexible working hour system

     

    Established in 2008, Kude Labs is a Wholly Foreign Owned Enterprise focused on providing software development services to US/European clients. Our office is located in the Dong Shan Kou area, Guangzhou (广州市东山口)

     

    To apply please send your ENGLISH cover letter and resume before 25 May to recruitment2010@kudelabs.com

     

    Posted by Adeh Wed, 12 May 2010 06:43:00 GMT


    Web Wednesday March: Making your splash in the iPhone App Store

    Web Wednesday March: Making your splash in the iPhone App Store
    Web Wednesday三月:在iPhone程序商店中寻找惊喜


    iPhone has changed the way we think about cell phones, and with the App Store, a whole new industry has developed within the past 2 years. Apps, especially the game apps make people crazy about them.


    iPhone彻底颠覆了我们对手机的看法,过去的两年里应用程序商店作为一种全新的产业进入了 人们的视野。应用程序,特别是游戏应用程序已经让人们为之疯狂。

    As more and more Chinese have iPhone, iPhone games have become more and more popular in China. This month’s Web Wednesday, Peter Tam, CTO of iNFOiSLive and Gameislive,  gave us a great speech about the current situation of iPhone App Store in China-market.


    由于越来越多的中国人拥有iPhone,iPhone游戏在中国越来越受欢迎。本月的Web Wednesday,我们请来了拉阔资讯有限公司(iNFOiSLive 和Gameislive)的技术总监谭止诚来给我们谈谈中国iPhone应用程序商店的市场现状。
     

    Before start


    Peter founded his company with a friend after he got his doctorate in US. His company is an international developing IT outsourcing services provider based on Apple system. They develop software, games and ring tone for mobile phones, especially for iPhone.


    Peter在美国博士毕业以后就和朋友创办了自己的公司。这家公司 是一家快速发展的国际化信息技术服务外包公司。他们以苹果系统作为服务平台,为手机,特别是iPhone,设计软件、游戏和铃声。

    Peter is talking


    Here are some interesting things mentioned by Peter:


    以下是Peter谈到的一些有趣事情:

    iPhone games will be translated into English most of the time, but not into other languages. Games always have English version or its local language + English version. Games with only local language version are very rare. Are all the developers good at English? The fact is most of the users are English users. Of course, even the registration of iPhone developer is in English.


    大部分时候,iPhone游戏会被翻译成英文,而不是翻译成其他的语言。大部分游戏都只有英文 版本或者本地语言+英文版本。只有本地语言版本的游戏是非常罕见的。开发者的英文都那么棒吗?其实是因为大部分使用者都是英文使用者。当然了,连 iPhone开发者登记都是使用英文的。

     

    Audience01



    Online mobile RPG is more popular in China than other countries. And RPG games are hard to translate into English.


    手机线上RPG在中国比在其他的国家更受欢迎一些。RPG游戏也非常难翻译成英文。

    Some iPhone App development company have a wired strategy. Most of the App’s names starts from character “A”, Awful Hand, Alien Crisis...This is a traditional A naming strategy in these companies. Unfortunately, most iPhone players will search for App by Top10, not by the name sorted.


    有些iPhone应用程序开发公司有一个非常古怪的策略。大部分的应用程序的英文名字第一个字母都是A,Awful Hand,Alien Crisis……这是这类公司传统的“A命名策略”。但很不幸的是,大部分的iPhone玩家都是通过搜索应用程序排行榜上前十位来选择游戏的,而不是根据名字。

     

    Peter and audience



    Low price and low quality games are on sell in China. The result is losing money and ruining the market.
    很多低价低质量游戏在中国出售。结果就是赔了夫人又折兵,赔钱还毁了市场。

    People like jailbreak game in China.
    中国人喜欢玩翻版游戏。

     

    Audience



    Q&A
    问答环节


    Q: Once you put the game on App Store, there will be some SHANZHAI appears. Even when you sell weapons, it will be the same. How can you deal with it?


    问:当你把游戏防盗应用程序商店里面,你不怕有山寨版出现吗?就算你是卖装备,也是会这样啊。你怎么 解决这个问题呢?

    A: We have a certain account to receive the money. If people choose the SHANZHAI version or pay through the SHANZHAI store, they still can not use it. Because our system doesn’t receive the money, so it would not give you anything.


    答:我们有固定的账户来收钱的。如果人们玩山寨版,通过山寨商店买装 备,他们仍然不能玩。因为我们的系统没有收到钱,就不会发出指令让你得到任何装备。

    Philip is talking



    Writer’s Note


    作者手记

    Wind of iPhone blew into China a few months ago. More than half audiences of Web Wednesday March have iPhone. Now, you can find more and more guys playing games with iPhone in the metro in the morning. You can find the boys playing Doodle Jump at the lunch time in Kudelabs. That’s why we put this topic on top.


    iPhone的热潮几个月前就已经吹到了中国。三月Web Wednesday的活动上,过半数的观众都有iPhone。现在,你会发现越来越多的人在地铁上用iPhone玩游戏。你也会发现Kudelabs的男 孩们在吃午饭的时候都在玩Doodle Jump。这就是我们要讲这个话题的原因。

    After a sufficient promotion online, this Web Wednesday was full of audiences. Most of the audiences are developers. And one is the author of Fun Input Toy, a famous free input method of Mac OS, Feng Huajun came and shared with us. We don’t know what would attract them most, technology, iPhone or games. But, no matter what, we are happy to see the family of Web Wednesday grows bigger and bigger.


    经过了网络上充分的宣传,这次的Web Wednesday坐满了观众。大部分的人都是开发者。甚至Mac OS著名的免费输入法:F.I.T.(Fun Input Toy)的作者华君也到了现场和我们分享。我们不知道是什么吸引他们来的,是技术,iPhone还是游戏?不过,无论如何,我们都非常高兴看到Web Wednesday大家庭越来越兴旺。

    Posted by Billy Thu, 08 Apr 2010 07:38:00 GMT


    Software Engineering Intern - 2010

    Kude Labs (酷德实验室) is a growing software development firm focused on building high quality web applications. Our office is located in a re-decorated villa in the Guangzhou Dong Shan Kou area (广州市东山口). Two of us are from Silicon Valley, California, with extensive technical startup experience; the rest of the team is from various parts of China. Our focus is the development, testing, and management of web based software. We work with an international group of designers, consultants, and corporations on projects around the world. Most of the work we have completed for clients is not publicly available, but we also do public web projects on our own.
     
    We pride ourselves in building a strong team environment where we work together to solve difficult problems. Our philosophy is to allow developers the freedom to get the job done while continuing to learn about new technologies and techniques. We happily use Linux and MacOS, as well as Windows and enjoy the best equipment we can get our hands on. We live in the world of open source, both using and contributing to projects like Eclipse, Rails and Prototype.
    We are happy to offer internship positions for students looking to improve their skills and gain some practical experience working on real-world projects. Intern positions are part time and can transition into a full time position after graduation. The majority of our full-time employees joined our team first as interns.

    1. Software Development Intern- Web Applications, Ruby on Rails

    We are looking for smart software engineers with experience and interest in Web applications. We develop in Ruby on Rails with a distributed team partly in China, partly in the US.

    Ideal candidates would have:

    • Outstanding analytical thinking and software design skills
    • Computer Science background, or other Engineering degree and significant programming experience
    • Experience with Ruby on Rails, or possibly other Web App framework and ability to learn quickly
    • Experience using Linux or some other flavor of Unix
    • Deep understanding of HTML and CSS
    • Experience with modern Javascript and AJAX techniques
    • Good written and oral communications skills
    • Open-minded and willing to share ideas with others
    • Self-motivated, cheerful, friendly, upbeat outlook
    2. Software Testing Intern - Web applications
     
    We are also looking for smart QA engineers for testing the Web Applications we develop.
     
    Ideal candidates would have:
    • Outstanding analytical thinking abilities
    • Patient and precise work style
    • Engineering background
    • Experience with open source tools
    • Some experience using Linux or some other flavor of Unix
    • Excellent written and oral communications skills
    • Self motivated and able to work independently
    • Nonjudgemental, welcoming attitude

    To Apply:


    Please send an ENGLISH letter of interest, references and resume to: intern2010@kudelabs.com.

    We look forward to working with you and welcoming you as a part of the Kudelabs family.

     

    Posted by Mysen Wed, 31 Mar 2010 03:26:00 GMT


    Web Wednesday January: Is Google going to quit China?

    On Jan 13, according to a blog post from David Drummond, Google's senior vice president of corporate development and its Chief Legal Officer, the company will no longer censor its search results.

    1月13日,谷歌的合作发展高级副总裁及高级法律顾问David Drummond在他的博客上发文说,谷歌将不在过滤他们的搜索结果。

    We recognize that this may well mean having to shut down Google.cn, and potentially our offices in China.

    我们确认,Google.cn很有可能需要关闭,并可能波及到我们中国的办公室。

    But few days later, Google CEO Eric Schmidt said “We love China and the Chinese people”.

    然而,几天以后,谷歌的总裁Eric Schmidt却大喊:“我们爱中国,我们爱中国人民”

    It is a big news for the internet of China. But if it really comes true, Google.cn quit China, it would impact a lot of Chinese users, specially the foreigners who are in China. And it also means Google would walk away from a huge potential market with more than 300 millions internet users.

    对于中国互联网来说,这是一桩大新闻。不过,如果Google.cn真的离开中国,这将会对中国的千万用户影响很大,特别是身在中国的外国人。这样意味着将会退出一个拥有超过3亿互联网用户的庞大潜在市场。

    Of course we all know the result, but it is one of the hottest topics for the recent days. So Web Wednesday held a special debate which you've never seen before, on "Is Google going to quit China". We had Adeh, John Courtney, Swearl Li as our main debaters. Billy Huang took a place as emcee. All the audiences could share their mind at anytime.

    当然,最后的结果谁都知道,但这是时下最热门的话题的之一。为此,Web Wednesday特地举办了一次关于“谷歌真的要离开中国吗”的讨论,这是你从来没有见过的。我们由Adeh Desandies,John Courtney和Swearl Li来充当我们的辩论者,Billy Huang担任主持。所有的观众都可以随时发言。

    DSC_7866

     

    Here is the review
    精彩回顾

    A: Adeh 阿德

    DSC_7934

    Grew up in Silicon Valley and worked for various startup companies. Now he is an Engineering Manager for a web development company.
    阿德在硅谷长大并在几家新兴公司工作过。现在他是一家网页开发公司的技术主管。

    J: John Courtney

    DSC_7864

    IT consultant for a factory owned by a Taiwan based manufacturer. He is working on a web-based application platform start-up that will be launching in a few months.
    一家台湾制造商在国内工厂的IT顾问。他正开始建设一个几个月后面世的基于网页的应用平台。

    S: Swearl Li 黎志华

    DSC_7931

    Technical Director of Guangzhou Integrated Image Co., Ltd.(fotoe.com), focusing on PHP+MYSQL development for over 5 years. He's also a Bemani geek, operator of Guangzhou Bemani Club wiki.
    广州集成图像有限公司(fotoe.com)技术部主管,专注PHP+MYSQL开发5年以上。音乐游戏的疯狂爱好者,广州音乐游戏联盟wiki运营者。

    B: Billy Huang

    B: What do you think about Google will quit China?
    你觉得谷歌会离开中国嘛?

    J: It is a really big market here in China. I can't see any good on business if Google quit. Google's market share is growing in a speed of 3% every year. They would not give up this market.

    J: 中国是如此一个偌大的市场,我看不出如果谷歌退出了在商业利益上有什么好处。Google的市场份额每年都在以3%的速度增长,他们不可能放弃这个市场的。

    S: Google is a big company, she wouldn't quit that easy.

    S: 谷歌是一家大公司,不会这么容易离开的。

    A: It is totally not wise that Google wants to quit China. They claimed that the law against their business. But they are doing business in China, so they should play with the rule. It happens even you are doing business in the other country.

    A: 谷歌想退出中国,这确实不太理智。他们声称中国的法律与他们的生意相悖,不过他们要在中国做生意就应该遵守这里的规矩。其实在其他的国家,你也必须这样。

    DSC_7901

     

    E: What will happen on you if Google really quit China?
    如果谷歌离开了,你会受到怎样的影响?

    J: There is a lot of searching engine people can choose, like Baidu, Yahoo... Finally, we can figure out so many ways to deal with it. Also, Google.cn disappeared doesn't mean Google.com doesn't exist.

    J: 其实还有很多的搜索引擎人们可以使用的,例如百度,雅虎等等。我们最后还是能够找出很多不同的办法来应付。而且,Google.cn 消失了并不意味着 Google.com 不存在了。

    E: There are a lot of anti-firewall softwares. You can reach Google.com eventually.

    E: 现在有很多翻墙软件的,始终,你都可以访问Google.com。

    S: For me it is almost no difference. I use Google, but I can get rid of it. Using software to cross the firewall means I need to take one more step to reach Google.com. The only thing I miss would be Google Reader. If I use anti-firewall software, it should be for Google Reader.

    S: 对我来讲,就没有多大的区别了。我用谷歌,不过我可以用它。如果要用软件来翻墙,那么我就要多做一步才能开启到Google.com。谷歌的服务我只会怀念Google Reader。如果我要翻墙的话,那么也只会在用Google Reader的时候。

    Audience: I think if Google quit, I would use Baidu. Even now, I use Baidu, ecause all Baidu's search results can be opened. Unfortunately, in Google’s results, there are too many blocked website like YouTube.

    观众:我想如果谷歌退出了,我会用百度。即使现在,我也会用百度。因为所有的百度搜索结果都能够打开。不行的是,在谷歌的搜索结果里面,太多的被阻挡网页了,就如YouTube。

    DSC_7881

    A: It is a bad news for me if all the Google services are gone. I need to use VPN to open my Google Docs, check Google Maps etc. We need a global platform to share with the rest of the world easily.

    A: 如果谷歌的服务业退出了,对我来讲是一个坏消息。我要用VPN才能开我的Google Docs,查看Google Maps等等。我们需要一个全球化的平台,让我们更容易地和世界其他角落的人们分享。

    S: You can use WPS! A lot of people in the north of China use it. It has been on the market for so many years. Just one problem, it is in Chinese. Would you use it if there is an English vision?

    S: 你可以用WPS啊。在北方有很多人用。 它在市场上已经很多年了。不过就有一个问题,那是中文的。如果有英文版本你会用嘛?

    A: Yes, I would use when it is in English and work after Google Docs's gone.

    A: 会啊。Google Docs没有了以后,而且他有英文和真的好用的话,我会用它。

    DSC_7925

     

    E: What will happen on China Internet if Google really quit China?
    如果谷歌真的退出,中国互联网会遭到什么影响?

    J: Here I am a bit curious. Why the Chinese people miss Google so much? I mean there are a lot of replacements in China. I don’t see any difference. I want to ask a question to the audiences. Do you guy use Baidu just for searching MP3?

    J: 我有一些好奇。为什么中国这么多人舍不得谷歌?我的意思是,国内市面上有这么多的替代品。我个人没有感觉到有什么不一样。我想问观众一个问题,你们使用百度都只是用来搜索MP3嘛?

    (Some of the Audience said YES!)

    (观众们纷纷表示同意。)

    A: Even now, I can not visit Facebook or something like that easily to connect with my family abroad.

    A: 就算是现在,我也不能用Facebook或者类似的东西和我国外的家人取得联系。

    S: For Chinese, we use QQ and other Chinese software more. They are all unblocked.

    S: 对于中国人来说,我们用QQ或者其他国内的软件更多一些。他们并没有被阻挡。

    DSC_7900

     

    E: Is this whole thing about “don’t be evil” or just a business operation?
    这是真的“不想作恶”还是纯粹的商业炒作?

    A: Seems the Chinese people like Google a lot. Is there someone thinking that “Yes, we finally kick Google out of China. Yes!”? Why?

    A: 似乎中国的朋友们都非常喜欢谷歌。会有人认为“我们终于把谷歌赶出中国了,太棒了”,有人这样觉得嘛?为什么?

    Audience: Yes. I saw some posts on forums. These people don't want Google to bother them by criticizing Chinese internet. They already know Chinese internet is not as free as what the foreigners expect, but they think the people who build this wall have their reasons. Every government has her own right to protect her people and these people believe so. They think they don't need Google or anyone else to tell them about this.

    观众: 当然有。我看到有些论坛上有这样的帖子。这些人不想谷歌来对中国的互联网指手画脚影响他们。他们自己也知道中国的互联网没有外国人所希望的那样自由,不过他们觉得建立这样的防护网的人终究有他们的理由。每个政府都有她的权利去保护自己的人民,而且这些人也相信这点。在他们看来,他们不需要谷歌或者其他的人来告诉他们这件事。

    J: Google claim that they want to leave because there were some hackers want to steal user's information from their system. Like some audiences said, they think Google are safer than others now. In my opinion, every website in every country would have a chance to be attacked by hackers. Not only in China. It is ridiculous for Google to say this. I consider this as a business operation. At least it attracts some Chinese, who never use Google before, to click on their website.

    J: 谷歌声称他们想要离开时因为有些黑客进入他们的系统来盗窃用户资料。就像有些观众所说,他们现在觉得谷歌比别的网站更为安全了。在我看来,各个国家不同的网站都会有机会受到黑客袭击。不仅仅在中国。谷歌这样说非常的奇怪。我会把这当作商业炒作。至少它吸引了一些从来没有用过谷歌的用户点击他们的网站。

    DSC_7894

     

    Writer's Note
    编者手记

    Different people have different opinion. Here, we have a foreigner, who is hard to get rid of Google, even he has been in China for 7 years. We have other foreigners, who are new here, willing to seek for replacement after Google left. We have a local IT guy, who gets used to domestic products and doesn't like using software to cross firewall. We also have Google's big fans, who update their software every day to cross the firewall.

    不同的人有不同的想法。在这里,我们有已经在中国七年了还是戒不掉谷歌的外国人。我们也有刚来中国不久,但也愿意尝试谷歌替代品的外国人。我们有习惯了用国内产品而且不太喜欢用翻墙软件本地IT人。我们也有每天在更新翻墙软件的谷歌超级粉丝。

    This is what we want to bring to the audiences. This is Web Wednesday.

    这就是我们想要给观众带来的东西。这就是Web Wednesday。

    DSC_7883

    Posted by Billy Tue, 02 Feb 2010 08:08:00 GMT


    Web Wednesday December: The Emergence of Game as a Service

    On 12.23, surrounding by the warmth air of Christmas, we had Web Wednesday December's fans gathered round to in Paddy Field. We also had a guest speaker Leslie Lee to give us a talk about the Game as a Service.

    12月23日,在浓厚的圣诞气氛当中,Web Wednesday的粉丝相聚在田野西餐厅。我们也请来了本期的演讲嘉宾Leslie Lee,就游戏服务谈谈他自己的看法。

    WWGZ December - Leslie Lee: The Emergence of Games as a Service

    Leslie Lee, Project Manager of Gameislive, got himself in the field of mobile value-added service since 2004. He is an expert in value-added industry, has operated a lot of well-known games, including Changjiang VII Mobile, Xuanyuan Sword Mobile. For now, he is the Operating Director of Mobile MMORPG: Empire OL.

    Leslie Lee(李永坚),拉阔游戏(Gameislive)项目经理,从04年起涉足手机增值业务领域,对增值业务市场极其熟悉,曾成功运营《长江七号手机版》、《轩辕剑手机版》等多个著名品牌游戏,现为大型手机网游《帝国OL》运营总监。

    DSC_7468

    From digital revolution to online game, from mobile gaming to Free-To-Play, Pay-For-Items Model, Leslie showed us how and why the game as a service can work well and talked about the market potential of the mobile gaming.

    从数码革命到在线游戏,从手机游戏到“免费游戏,付费装备”模式,Leslie向我们展示了游戏服务如何运作和为何能够取得成绩,他还讲述了手机游戏的市场潜在价值。

    DSC_7470

    After the profound speech, it seems like most of the people are interested in game, last night we got the most active Q&A section that we never had for this 6 month.

    似乎大家都对游戏兴趣很大,在深入的演讲过后,昨晚我们迎来了这6个月以来最活跃的提问环节。

    DSC_7460

    Q&A excerpts:
    问答摘录:

    Q: What are you doing in your company? I mean what exactly is your job?
    你在你公司里面是做什么的?我的意思是,你的主要工作是什么?

    A: It seems I really doing everything. Designing, proposal, character setting, testing... And also... hum...cleaning.
    似乎我真的什么都要做。设计,策划,人物设定,测试等等。还有,呃....清洁...

    WWGZ December - Leslie Lee: The Emergence of Games as a Service

    Q: You said you are working on mobile game, can you show it to us? Can I pick up my phone and try? Dose your game fit every model of the mobile phone?
    你说你是做手机游戏的,你可以让我们看一下你们的产品吗?我可以拿我的手机来试试吗?你的游戏能够在所有的手机上面运行不?

    A: I already have a video of the game. I can show you now. If you want to play, you can download from WAP. I can not guarantee that our game can work on every mobile. But we will try our best. For now, I can tell most of the mobile can play our game. And also, we are working on iPhone version. You can play our game on your iPhone in 3 months.
    我已经准备了游戏的视频,现在就能让你看一下。如果你想玩的话,你可以在手机网站上下载。我不能保证我们的游戏能在所有的手机上都能运行,但我们会尽我们所能去做。不过现在来说,大部分的手机都能玩我们的游戏。而且,我们正在开发iPhone的版本。3个月以后你就能用你的iPhone来玩我们的游戏了。

    Q: How long your company spend on the game? How many people you use? For a developer like me, I barely spend time on game. How can you convince me to play your game?
    你们公司在这个游戏上花了多长时间?你们动用了多少的人力?对于像我这样的开发者,我很少会去玩游戏。你如何说服我去玩你们的游戏?

    A: It is hard to tell how long. But from the idea to product's coming out, we spent almost a year. Our game is a MMORPG (Massive Multiplayer Online role-playing-games). As I said before, our target is the people who like games. Convincing a people who didn't play games is really difficult. Here is a little advice from you, if you want to play our game. First of all, you can try some casual games. Then you can play on-line game. Finally, you find yourself really like games then you can try to play our game.
    很难界定我们用了多长时间。不过从构思到出品,我们用了几乎一年的时间。如我之前所说,我们的目标客户是喜欢玩游戏的人。说服不玩游戏的人来玩是非常困难的事情。如果你想玩的话我有个小小的建议给你。首先你可以试一下玩休闲游戏,然后你可以玩在线游戏。到最后已觉得你真的很喜欢游戏的话,你就可以尝试玩我们的游戏了。

    WWGZ December - Leslie Lee: The Emergence of Games as a Service

    Q: Can you tell me how many players play your game?
    你能告诉我有多少人玩你的游戏吗?

    A: It is a secret, but I want to share with you. It is about 10,000. Maybe it is a small number like 1% when you compare to the PC game. But for the mobile game, this is a considerable number.
    其实这是一个秘密,不过我也可以告诉你。大概有一万吧。这可能对于电脑游戏来说是一个非常小的数字,大概只有百分之一。不过对于手机游戏来说,这是一个非常可观的数字。

    WWGZ December - Leslie Lee: The Emergence of Games as a Service

    Writer's Note
    编者手记

    According to the scene I met Leslie last night, he is a really shy young man who likes to keep low profile. He came into the restaurant, sat down quietly, set up his laptop and then prepared himself. I didn't notice our speaker was sitting there. Even when he was in the interview, you still can feel the shyness through the camera. How can you imagine he is in charge of the things which can make people have fun?

    Under the cover of shyness, there should be some enthusiasm and conscientiousness. They make him succeed.

    Christmas Eve!Hope you can have a good day. Merry X'mas!

    从我昨晚见到的情景就可以判断Leslie是一个非常腼腆,喜欢低调的年轻人。当时他走进餐厅以后就静静地坐下,然后拿着手提电脑在自己准备。我完全没有意识到我们的演讲者就坐在那里。即使当他在接受访问的时候,你也能从镜头中感觉到他的害羞。你能够想象得到他在经营着让大家能够享乐的事业嘛?

    在腼腆下掩盖着的是他的热情和他认真的态度。这是让他成功的重要因素。

    今天是平安夜,愿您安好!圣诞节快乐!

    DSC_7464

    Posted by Billy Mon, 11 Jan 2010 09:06:00 GMT


    Rowspan Supported Table Sorting with Prototype

    When I was working with tablesort, I realized that it doesn't support sorting cells with rowspan. And really, fewer table sorting javascript lib support this feature. It's known that table with rowspan attribute is a really messed up structure. It drove my crazy at the first time when I am writing a script to generate this kind of table.

    But it would be very cool to support js sorting on rowspan cells! So I patched tablesort to support it. The idea is simple:

    1) get rows that either with rowspan cell(s) or wihout rowspan cell at all and not after row with rowspan cell(s);

    2) attached SUB-ROWS to row with rowspan cell(s);

    3) sort rows get from step 1);

    4) append rows get from step 1) to the table; and for each one, append the SUB-ROWS attached to it after.

    One small issue left is that since we only sort rows get from step 1), we lose the sorting ability on SUB-ROWS. But I think that would be too difficult to support, and from my project, we happened not want to sort those SUB-ROWS, so I leave it for future. :)

    Check the project out on my github. There is also a full demo available.

    Posted by Shaokun Thu, 03 Dec 2009 06:37:00 GMT