avatar

Derek Zeng

Loneliness is the gift of life

LEGOs, Play-Doh, and Programming

by Jamis on November 09, 2008 @ 04:46 AM, link: http://weblog.jamisbuck.org/2008/11/9/legos-play-doh-and-programming This article is based on a talk I gave at the 2008 RubyConf in Orlando, Florida...

Read more


Web & javascript

自从离开SSI之后一直都很忙,忙的连搞个博客的时间都没有。其实很想用ror架一个,但只是起了个头host在amazon上,很久都没有后续。后来想算了,现在这种忙状态也不知道会持续到什么时候,有时候又特别想写点东西,干脆就拣个现成的,用octopress架了个,希望这次的可以写久一点。 我一直以来给自己定的发展方向是网络应用,这方面的东西发展前途非常广。小到网站论坛,大到企业型应用都有涉及。网...

Read more


Boot Script

发现用sh脚本写一些简单的东西很真是很麻烦,比如找到当前所在的路径就需要这样写, DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 看到这行代码我被吓傻了。可能现在的程序员太娇气了,但以前这种shell脚本的确非常非常流行。可能现在也有很多人用,比如这段程序的出处,stackoverflow上就有387人问这个路径...

Read more


rails: csrf prevent post from thrid-party site

今天帮同事解决了一个rails的问题。 这是一个会员的网站。每个准会员要先填写资料,然后交会员费才能成为正式会员。我们用session来存储他填写的资料,然后redirect到第三方的网站(我们用的是eNets)付款。成功付款后,eNets会redirect用户到我们事先给他们的一个付款成功的链接页面完成交易。前面的步骤都很好,就是当eNets转到我们的页面的时候,用户储存的session都...

Read more


SSH access the Gitolite Account

The common practice is to create a repo user account (git) to host all the repository. So in principle, users or admin should not have the need to access it through SSH. But I did set it up for mys...

Read more


Wrapper Object in Javascript

In JavaScript, primitive types behave like objects. They use dot expression to access certain methods. For example var str = "abcd"; console.log(str.length); //4 But for object, every ...

Read more


Javascript Closure

因为新工作的缘故这两天开始学习JavaScript。 一直在看David Flanagan的JavaScript: The Definitive Guide 6th Edition,收获颇丰。 以前在云风的博客上第一次看到closure这个词的时候就很好奇,但那篇介绍是以C作为例子,讲的也不是很清楚,所以一直都没搞懂closure这个东西。 现在读JavaScript,对这个closure算...

Read more


Code Complete 2nd ed

Computer science has some of the most colorful language of any field. In what other field can you walk into a sterile room, carefully controlled at 68°F, and find viruses, Trojan horses, worms, bu...

Read more


God and Stackoverflow

Everybody should have a god in his heart. This god is not necessary to be Jesus or Buddha. Generally accepted idolism gave us an abstract interface, it’s up to us to implement our own God. Jesus an...

Read more


你真的需要重构软件吗?

Joel on Software Things You Should Never Do, Part I by Joel Spolsky Thursday, April 06, 2000 Netscape 6.0 is finally going into its first public beta. There never was a version 5.0. The last majo...

Read more


1 2 3 4 5 6