The Psychology of Tackling Hard Problems

“The thing about hard problems is that there are many difficulties and few solutions. Sounds obvious, but what’s often overlooked is the psychological component to this asymmetry. There’s a simple reason why tackling a hard problem can lead to depressive symptoms: you’re necessarily wrong 99% of the time…”

zerorpc – a flexible RPC implementation based on zeromq and messagepack

“zerorpc is a flexible RPC implementation based on zeromq and messagepack. Service APIs exposed with zerorpc are called “zeroservices”.

zerorpc can be used programmatically or from the command-line. It comes with a convenient script, “zerorpc”, allowing to:

  • expose Python modules without modifying a single line of code,
  • call those modules remotely through the command line…”


Logic and Artificial Intelligence

“Artificial Intelligence (which I’ll refer to hereafter by its nickname, “AI”) is the subfield of Computer Science devoted to developing programs that enable computers to display behavior that can (broadly) be characterized as intelligent.[

1] Most research in AI is devoted to fairly narrow applications, such as planning or speech-to-speech translation in limited, well defined task domains. But substantial interest remains in the long-range goal of building generally intelligent, autonomous agents.[2]

Throughout its relatively short history, AI has been heavily influenced by logical ideas. AI has drawn on many research methodologies; the value and relative importance of logical formalisms is questioned by some leading practitioners, and has been debated in the literature from time to time.[3] But most members of the AI community would agree that logic has an important role to play in at least some central areas of AI research, and an influential minority considers logic to be the most important factor in developing strategic, fundamental advances…”

Redis persistence demystified

“Part of my work on Redis is reading blog posts, forum messages, and the twitter time line for the “Redis” search. It is very important for a developer to have a feeling about what the community of users, and the community of non users, think about the product he is developing. And my feeling is that there is no Redis feature that is as misunderstood as its persistence. 

In this blog post I’ll do an effort to be truly impartial: no advertising of Redis, no attempt to skip the details that may put Redis in a bad light. All I want is simply to provide a clear, understandable picture of how Redis persistence works, how much reliable is, and how it compares to other database systems…”

Execute and control OS processes from Erlang Virtual Machine

“This project implements a C++ port program and Erlang application that gives light-weight Erlang processes fine-grain control over execution of OS processes.

It makes possible for an Erlang process to start, stop an OS process, send POSIX signals, know process IDs of the started OS process, set up a monitor and/or link to it. This application provides better control over OS processes than built-in erlang:open_port/2 command with a {spawn, Command} option, and performs proper OS child process cleanup when the emulator exits…”

Nginx Tutorials

“I’ve been doing a lot of work in the Nginx world over the last few years and I’ve also been thinking about writing series of tutorial-like articles to explain to more people what I’ve done and what I’ve learned in this area. Now I have finally decided to post serial tutorials to the Sina Blog in Chinese. Every article will have one rough topic and will be in a rather casual style. They’re not parts of a book after all. But I do have plans to re-orginaize these stuffs to form a real book.

Now the tutorials being written is devided into “series”. For example, the first series is “Nginx Variables”. Each series can be roughly mapped to a chapter in the Nginx book that I may publish in the future (of course, I will also reorganize the contents to form “sections”). The tutorials are intended for Nginx users at various levels, including those Apache and Lighttpd users who have never used Nginx before.

The samples in my tutorials are at least compatible with Nginx 0.8.54; do not try the samples with older versions of Nginx. The latest stable version as of this writing is 1. 0.10 after all.

All of the Nginx modules mentioned in these tutorials are production-ready. I will not even mention those standard Nginx modules that are either experimental or buggy.

I’m going to make extensive use of Nginx 3rd-party modules here. If you’ re too lazy to download and install those modules one by one, then you are recommended to download and install the ngx_openrestysoftware bundle that is maintained by me…”

Cache them if you can

“I always smile when I hear a web performance speaker say this. I forget who said it first, but I’ve heard it numerous times at conferences and meetups over the past few years. It’s true! Caching is critical for making web pages faster. I’ve written extensively about caching:

Java Tuning in a Nutshell

“While delivering a training recently, I got a request to put together a JVM tuning cheat sheet. Given the 50+ parameters available on the Sun hotspot, this request is understandable. The diagram below is what I came up with. I’ve tried to narrow down the most important flags that will solve 80% of JVM performance needs with 20% of the tuning effort. This article assumes basic JVM tuning knowledge – the different generations used in the Sun hotspot JVM, different garbage collection algorithms available, etc…”