Notes of wgundamj44

last update:

About flycheck

Recently I replaced my emacs on-the-fly syntax checker from flymake to flycheck. Flycheck is more well designed so that additional checker can be used without introducing into the other plugins.

Summary of GvG event

A kind of Guild VS Guild event.

Last period 2014-10-09 ~ 2014-10-16. 12:00:00 ~ 12:59:59, 22:00:00 ~ 22:59:59 twice everyday.

Average access user is about 4000. Access is concentrated in one hour, so the load was heavy.

There’re 4 web servers to handle the access, DB is one master, one slave.

There’s a serious bug in the initial versions so the load average is crazily high. In about 10-12, we fixed the bugs so the performace after 10-12 is more reiable.

General idea of WSGI As specified by pep-0333, the WSGI aims to make application written in python run on any web server as long as they follow the WSGI. It includes two parts: The Application/Framework Side The application object should be callable(a function, a class with call ..), and accepts two arguments. Like: def simple_app(environ, start_response): """Simplest possible application object""" status = '200 OK' response_headers = [('Content-type', 'text/plain')] start_response(status, response_headers) return ['Hello world!\n'] The Server/Gateway Side The server will invoke the app for each request.

NULL or NOT NULL

In mysql table definiations, how NULL and NOT NULL effects behavior? AFTER MySQL 5.0.2. If there’s no NOT NULL in the column defination, MySQL add a DEFAULT NULL to defination. If there’s NOT NULL in the defination, in strict mode, an insertion that lacks the column will raise an error, while implict default value will be inserted in non-strict mode. So for portability, always add DEFAULT for NOT NULL column. Detail can be found here.

Unicode in python3

Long time since I touched python last time. Today I tried to write a line of code like this:

message = "光臨"
print(message)