B: Metaprogramming Ruby
Metaprogramming is writing code that writes codes.
Get all mixed modules for an object:
在runtime下,取得obj的class,查找所有modules
Learn: linux command tips
B: Design Patterns in Ruby
Design Patterns in Ruby
GoF(Gang of Four) book: Design Patterns: Elements of Reusable Object-Oriented Software.
prefer composition to inheritancy. Internal Domain-Specific Language(DSL), metaprogramming, convention not configuration
Practical Obect Oriented Design in Ruby
Practical Object-Oriented Design in Ruby
Responsibilities, dependencies, interfaces, ducks, inheritance, behavior sharing, composition, and testing
Persist. Practice. Experiment. Imagine. Do your best work, and all else will follow.
a endless journey to learn vim
This description to the VIM journey is to descript my learning process of VIM:
#开始通过看thoughtbot的vim教学视频学习怎么配置好vim的工作环境,玩vim adventure。第一部基本学会的内容:
- motion在一个文件中
- vim中的letter,word,sentence,paragraph的概念
- 配置vim config文件选择template,颜色
- 掌握常用的:command
- 三种mode熟练切换
Rspec for Test in Ruby
Excel for summary of ruby test
- make sure install the rspec gem
- Use “rspec file_name.rb” to run the rspec test
Ruby C Python C++ world Tips
Create the Ruby extension in C
里面清晰地讲明了怎么给Ruby写C的extension。
require mkmf, create makefile, create the extension
Rails development ridiculous problem sets
Rails development related problem track blog.
linux command learn tips
awk强大的文件操作,从Alfred Aho,Peter Weinberger and Brain Kernighan
找出非系统产生的账号:
awk中仅有string和numeric,可以互相转换。
文件中每一行check每一种pattern(Regex,Boolean,Special),In Boolean Search,进行fuzzy matching,” 23”==23