enjoy coding

we may not make events,but when we try,we learn.

StackContext in Tornado

| Comments

背景

最近一直在读tornado的代码,大概是看懂了骨架。关于结构的部分,google一下应该会有比较多的分析,我主要想讲下在tornado/stack_context.py文件里面的StackContext类的作用。

StackContext是什么

StackContext从字面意义来说,翻译过来,就是“堆栈上下文”。拆开来看,就是用“堆栈”这种数据结构,保存“上下文”。

A Dht Crawler in Python

| Comments

I recently write a dht crawler in python.

What a dht?well,you can think of it as a protocol as we treated the bt. And i am not gona tell you that i can’t understand it before i read the source code in python that implement it. LOL…It is the truth, the paper sometimes is just hard to read.

I call it the “bt-share”, meaning that it provide the seeds search service for people.

The Big Django

| Comments

我总是有种冲动要把一个框架给撸一遍才happy,但我发现这样把自己累得半死,还吸收不良…… 特别是当我遇到了神奇的Django,她的完备,资料齐全,开发方便,社区活跃,让我很high得撸了好几个月…..好吧,其实是项目需要…..

但就像有些人说的一样,当一个框架的文档完备到让人发紫的时候,是不是也意味着他很难改变? 额,有点,Django给我的感觉是,开发的程序猿是来写配置文件的,已经脱离了传统意义上的开发。那种感觉, 就像你去写rails一样,一切都安排好了,按着套路去填就好了。

吐槽完了,其实我是来记笔记的……

网文

The Little Scheme

| Comments

Introdcution

scheme, a dialect of lisp.

Notes

  • The law of Car The primitive car is defined only for non-empty lists.The cdr of any nonempty list is always another list.

  • The law of Cons The primitive cons takes two arguments.The second arugument to cons must be a list.The result is a list.

  • The law of Null? The primitive null? is defined only for lists.

My First Udacity Cource

| Comments

so it’s my second article written in english~greate!!!

i recently take an online course on udacity,use python to write a search engine~

not just awesome,but it tell me that how such monster like google being built.and i love pytho!

it showes that code course could be tought in this way,and the online edu interaction could play like this…

so ,here is the link~~and i wonder how many guys would do the final homework.would find a time to place the little search code on GAE,and make a gui for it~~~

if you come from china,why not go to the v2ex to share your learing experince with geeks….

find the course on udacity, keep learing .

Why and How in Lisp

| Comments

心血来潮,看起了lisp。起因是我太寂寞了,想找些函数式语言,来打发有强迫症的自己。

当然了,原因不只这么简单,更重要的是,我想去了解函数式语言的起源,或者,写一个自己的编译器玩玩也不错.

还有,就是找到函数式语言本质的东西,而不是游走在猛蛇、砖石的门外,不得深入,再深入。

每个周六日,都是我的外遇日,因为我终于有两个完整的日子,去陪我这两个小情人了。

人说程序员是多情的,这倒是真的。只是我还算专一,至今仍泡在函数式编程的圈子里。

Being a Codesinger

| Comments

想了很久,好像有那么一刻,我终于明白自己逃离产品经理这个职位的原因了。

整个晚上,我都在看chengyichao的blog,谢谢这个人,我的世界又拓宽了开去。

be a codesigner

codesigner这个词是不存在的,只是那次大学那次工作室的分享会,听到小健师兄说起这个自创的词语, 简单点说,就是,不想做设计师的程序员不是一个好的经济学者。

这句话好有趣,因为你终于有机会,不用站在自己固有的圈子里面,而是,尝试去触碰边界,就像Breat Victor那样。