来自asciicasts.com文本形式的Rails动态短片
这对于我们早期贴出的Rails动态短片是一个很好的更新。

来自英国的Rails程序员Eifion Bedford正在收集Ryan Bates系列的文本形式的免费动态短片。这意味着他是精心抄写Ryan的著作,整理截图,您可以学习这些代码示例并复制和粘贴它们。这是一个很好的学习这些材料的途径,尤其对于非英语母语的人来说。他所称的ASCII Casts,是一个巨大的免费学习Ruby and Rails的额外材料。我推荐安全系列和性能提示。感谢Eifon努力为我们描绘生动的网页开发世界。
Railscasts in text form - ASCIIcasts.com
This is an update to my earlier post about Rails Screencasts .

British Rails developer Eifion Bedford is putting together a collection of Ryan Bates’ free Railscasts series in a text form. This means he is painstakingly transcribing Ryan’s words, putting together screenshots that you can learn from, and code examples that you can copy and paste. This is a great way to consume the material, especially if English is not your first language. The ASCII Casts, as he is calling them, are a great addition to the growing volume of free learning material for Ruby and Rails. I recommend the security series and the performance tips. Thanks to Eifon and his efforts to illuminate the wild world of web development!
ruby-on-rails-with-mysql-on-ubuntu-8-10
Hi guys, I’m writing this to share with you the joy of using ROR with Mysql on Ubuntu 8.10 Desktop Edition.
First, we can get a latest free version of Ubuntu from here.
Please choose a desktop edition, because Server Edition is not containing a GUI for us which specializing in host side.
Well, after we have installed the newest Ubuntu, let’s try our ROR with Mysql development enviroment ASAP.
The official installing ROR site goes here, or you may need only type several commands as following:
1. Installing RUBY: <pre> sudo apt-get install ruby-full </pre> #‘ruby-full’ package will make sure you have all the packages that add up to a full Ruby installation.
2. Installing RUBYGEMS:<pre>wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
</pre>
3. Installing RAILS and Mongrel:<pre> sudo gem install rails mongrel </pre> # yeah, ROR has been done here!
4. Installing MYSQL: <pre> sudo apt-get install mysql-server mysql-client </pre>
It seemingly worked and I could start my rails projects, but when I tried to rake task, the system was just crashed and came out a result:"
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted!"
Oops, let’s try to listen to it:
<pre>sudo gem install mysql </pre>
it failed:<pre>"Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install mysql
- extconf.rb failed *
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options."
It made me feel quite irritating after I tried many times without efforts, but finally, the problem was solved by installing a package named libmysql-ruby1.8. This package is an API module that allows to access MySQL database from programs in Ruby programming language.
So let’s correct our step 4 to: <pre> sudo apt-get install mysql-server mysql-client libmysql-ruby1.8</pre>
Cheers, we can really start our RAILS application now.
Last but not least, to make our default gnome-editor more useful as a programming IDE, we can try to install some plugins into gedit to make it like Textmate On Mac. e.g. there is an excellent project named gmate which included many plugins that we need indeed.
Please let me know when you still have any installing problems with ROR & MYSQL on Ubuntu.
Kudelabs Vs the Roller Coaster
We took a company trip to Chime Long Amusement park earlier in the week. Some of my co-workers decided to hop on this little ride 3 times in a row. I bowed out after the first, thank you very much.
Old Photos of Guangzhou (formerly known as Canton)
Google recently announced that they would be hosting a collection of photos from Life Magazine. Dan at the excellent China Law Blog pointed out that you can search through the pictures to find interesting stuff. A search for “Guangzhou” strangely doesn’t return any entries; but of course, when many of these pictures were published, this city was known as “Canton”. There are only about 200 results for Canton, but some of them are great pictures of the City. This is the search phrase that should give you the right results:
Shamain Island is clearly recognizable, and many of the street scenes must have been taken in the Renmin Nan Lu area. Some of my favorites:
- Streeside Baozi
- Aerial view, you can see the cathedral on Yide Lu in the center of the shot
- Guangzhou’s answer to the Flatiron Building. Its still there on Yanjiang Lu. Flatiron Building
- Do you recognize Haizhu Square?
- This GZ is slowly disappearing, I love the art deco architecture
- This is how our neighboorhood still looks
- I bet we can find this street, somewhere near Yide Lu and Renmin Lu.
- Kids playing in the park on Shamian Island
Rails 2.2 has been released
The much anticipated Rails 2.2 release is finalized with a host of new features. One of the features we are most excited about are the new multi-threaded capabilities for Rails. This will improve application response time in general, and allow us to get more use out of each server. I think memoization can be useful as well, it will be interesting to see how much it helps. As usual, Peter Cooper at Ruby Inside has put together an all-encompassing post with all the info you might need. And as a side note, this release also includes a little patch submitted by our team.
Thanks and congratulations to the core team for another solid release.
Text field with size of one in IE
In Firefox, it’s very easy to set the attribute of size to 1 for a text field. But in IE, even the size is 1, it still takes a lot of space in the page. One simple solution but not perfect is to set the style of width, e.g. style=“width: 10px”. You will need to tweak it a little bit in order to find a good width for your web pages. :(
Below are the code:
<pre>
<input type="text" size="1" maxlength="1" value="1"></input> <!-- This works well in Firefox, but not IE -->
<input type="text" size="1" maxlength="1" value="1" style="width: 10px"></input> <!-- This works well in Firefox and IE -->
</pre>
JavaScript通用层次式下拉列表框
下拉列表框在各种软件界面,包括网页环境中都是十分常用的组件,或称元素。这种元素提供了对同类对象进行选择的一种方式。然而,我们在项目实践中发现,有些数据记录之间具有层次关系。把这类数据集载入到下拉列表框中供用户选择时,我们就有必要使列表框中的选项反映出数据记录的层次关系。因此,我们尝试实现了基于Prototype JavaScript框架的层次式下拉列表框。
我们的层次式下拉列表框具有如下特点。每个下拉列表框中的选项包含数据集中的一个层次。当某个选项被选中时,若其有子选项,则在紧随当前列表框元素的位置,会弹出新的下拉列表框,包含相应子选项供用户选择。由此可以看出,所谓层次式下拉列表框本质上是一个具有层次关系的下拉列表框序列。我们把这种元素表达为类。你只要在需要的地方创建该类的一个对象,便可获得这样一个层次式下拉列表框。如果你对我们的层次式下拉列表框感兴趣,或你正需要这样一种元素来丰富你的页面,那么请到Kudelabs的代码库去获取这个组件。同时,在下面的例子页面中,我们详细地示范了如何创建和使用我们的层次式下拉列表框,并显示出其效果。
请点击例子,体验一下我们的层次式下拉列表框。
Javascript Universal Hierarchical Select
This is our first attempt at implementing hierarchical select based on the Prototype JavaScript framework. Efforts have been made to enable the component to satisfy a range of possible needs, so that it can be widely used with different conditions.
Hierarchical select refers to situations where the select options represent a hierarchical structure of objects. In such cases, we assume that the option list of each select element contains a certain level in the object hierarchy. When an option is chosen, a new select element will appear next to the current one, containing options of children of the selected item, unless it reaches a leaf. We represent such a kind of select as a class, which can be instantiated where a hierarchical select is needed.
If you feel interested in this work, please find it at Kudelabs’ code repository, as well as CONCRETE EXAMPLES which demonstrate how to use our hierarchical select in a webpage environment.
[jobs] Software Developers - we are looking for you
We are currently interviewing candidates for a position on our team. If you are intersted, be sure to send us your resume and cover letter. I previously posted some tips about how to submit a resume, please do read that as well.
Software Engineer – Web Applications, Ruby on Rails
Key Objective:
We are looking for outstanding software engineers with experience and interest in Web applications.
Responsibilities:
You will be part of a team responsible for developing and deploying software for our clients. Your responsibilities will include working with overseas partners on product specifications, collaborating with your team on software design ideas, and of course writing excellent code.
Requirements:
- Outstanding analytical thinking and software design skills
- Bachelor’s Degree in Computer Science, or other Engineering degree and significant programming experience, Master’s Degree is more welcome
- Excellent English communication skills
- 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
- Experience with open source tools
- Able to fight seven adult tigers while feeding a baby panda with your toes.
- Open-minded and willing to share ideas with others
- Self-motivated, good at finding help online
- Deep understanding of HTML and CSS
- Experience with modern Javascript and AJAX techniques
To apply send your ENGLISH cover letter and resume to recruitment2009@kudelabs.com
