Millet Porridge

English version of https://corvo.myseu.cn

0%

I encountered many Python2 programs at work, where str, unicode and bytes caused me a lot of trouble. After figuring these problems out, I'll briefly share my understanding. This article introduces how to handle Chinese strings more elegantly in Python2 programs, and how to cope with the Python2-to-Python3 conversion. Please point out anything incorrect.

Read more »

No Python web framework has pretty logs, only Tornado. Maybe switching to Tornado directly in production is not appropriate, but in development, switching to Tornado can bring great convenience to development and debugging.

Read more »

My flatmate was going back to Shantou for the weekend to celebrate his grandfather's birthday. I didn't want to stay home alone in Guangzhou either, so I pulled another Tencent colleague along to Shantou for fun.

Read more »

Tornado was the framework I used when learning Python — groundbreaking for using epoll back when the big all-inclusive Django reigned (gevent existed too, of course). Sadly my understanding of async and epoll was insufficient then, and I had no clue about coroutines. I hadn't used a framework for a long time since. Recently I happened to be writing a simple UDP server, so I gave Tornado a try.

Read more »

Recently while using puppet I felt the need to broaden my horizons, and then I saw ansible — also a widely used ops tool. Here I briefly describe my recent usage and compare it with the puppet features I know, hoping to give you some inspiration. I'm a very junior ops person, so please point out any poor phrasing or errors.

Read more »

In jQuery, a div's data attributes are cached; wrong usage leads to wrong values. This post also briefly analyzes the related jQuery source code, hoping to help you understand more deeply.

Read more »