wd and cc

— Happy every day

Who am I

酷不

My name is Dong Wang, and I am a software engineer for about twenty years, write python, javascript, java now. I have used perl, lua, ruby and lots of other programing languages for what can make my work done. Programing languages is just tools, I’m not being fascinated by anyone of it.

I’m also a database administrator for PostgreSQL, which I think is the best database application now. So you maybe found some articles of PostgreSQL or databases.

About this site

This is my personal blog, to collect and record some things I thought and learned. I’m trying to learn English now, I wrote done these things in English, wish this can be to make some help to improve my English.

WD is my name’s initials, it’s also West Digital’s abbrevation. This is very annoying, since lots of people find me to solve hard disk problems on twitter. SAD…

CC is my wife’s nickname, which pronounce is cici, like her given name. I have suggested her to change CC to Cici, since there is no vowel letters in the name, people can’t sounds it, but she didn’t agree… oh, okay… I found my nickname is at the same situations, I think I will not change it too … :)

Recent posts

Dec 4, 2019
ST_Buffer in Postgis Postgis 一直没仔细用过,总是临到用时看看文档,这不又遇到问题了,折腾半天。 我们最近有一个需求是,需要把一些…
Nov 7, 2019
Upgrade RN From 0.57 to 0.61 好久没升级 app 使用的 RN 了,前几天看见已经是 0.61 了,我们用的还是 0.57,已经差了好几个版本了,有必要跟进…
Oct 29, 2019
Doing Code Reviews 集中看了一波 code review 的帖子,记录一些笔记 How Do Code Reviews Work at Microsoft? 微软这个倒是没什么亮点,不过最后有一堆别等链接值得…
Oct 17, 2019
Some Interview Questions Notes for some interview questions. OSI 7 layers Physical layer. Data link layer. Switches are working on this layer, so when we talk about mac address, node to node connection, it's all happened here. Network layer. IP/ICMP protocol are for this layer.…
Oct 17, 2019
Learning Python Coroutine 看了一个视频 OSB 2015 - How Do Python Coroutines Work?,从头开始讲 coroutine 是怎么抽象出来的,感觉好厉害。自己写了一点程序学习…
Oct 15, 2019
ASGI Django 3.0 要支持 ASGI 了,全称 Asynchronous Server Gateway Interface,使用了 coroutines 异步。WSGI 是目前普遍使用的,把进来的请求标…
Oct 14, 2019
New Way to Go Across the GFW 家里路由器用了一段时间的国内定制的梅林系统,还给这个系统做过一个插件使用 v2ray。后面试过换个软路…
Oct 8, 2019
Drive in the US 十一前去美国自驾了一圈,其实算是第二次美国自驾了。第一次是五年前。第一次去的时候有一个当地生活了比较…
Sep 5, 2019
Notes for CPython Internals 视频地址这里。 Python 源码 Include/opcode.h 里面定义了所有 opcode。 Modules 里面是一些 c 实现的模块, Lib 里面是用 python 实现的模块。…
Aug 28, 2019
Book Review of Soft Skills 改变自己对自己的看法 你所能犯的最大错误就是相信自己是在为别人工作。这样一来你对工作的安全感已然尽失。…
Aug 27, 2019
Python Coroutine 协程 coroutine 不知道是从什么时候开始的,感觉我第一次看到是 lua 里面支持 yield 。后面看到就是 javascript 里面的 Promise,…
Aug 26, 2019
Book Review of Effective Python: 59 Specific Ways to Write Better Python 书名是《Effective Python:编写高质量 Python 代码的 59 个方法》这本书买了大概 2 年,一直没看完,…
Aug 20, 2019
Get Wool From Dogs 不知道羊毛出在狗身上怎么翻译的好,暂时先说成 get wool from dogs 了。今天的内容可能会有点文不对题。 也不知道是什么…
Aug 13, 2019
Emacs as Python IDE Again 上一篇里面说了使用 emacs 编辑 python 文件的方式,已经过去 2 年了,时代变了。更新一下。 随着 vscode 横空出世,带来了 LS…
Aug 13, 2019
Run Command Through Python 通过 python 执行命令有很多方法。 最简单的 os.system(command) , command 是要执行的命令,一个包括命令和参数的字符串。产生的输出会直接…
Aug 7, 2019
An Interesting Python Function 这里看到的,感觉挺有意思的,记录一下。题目来自这里。 如何让下面这个函数返回 True ? def check(x): if x+1 is 1+x: return False if x+2 is…
Aug 7, 2019
How to Open an Company in China 我记录一下国内开公司需要做的事情吧,有一些事情我没有参与,说的不一定准确,供参考。 公司结构,类型和名…
Jul 26, 2019
React Native Versions RN 里面有很多个个版本号 package.json 里面定义的 version 。 android/app/build.gradle 里面定义的 versionName 和 versionCode 。 ios/YOURAPP/Info.plist 里面定义的 CFBundleShortVersionString 和 CFBundleVersion 。 如果你使用 code-push 的话,还有…
Jul 26, 2019
Tools to Manage Your React Native Projects RN 项目大部分人都知道是基于 Javascript 的,懂 js 就可以写了。但实际上并没那么简单。大概总结下这里面的问题,主要从…
Jul 17, 2019
Best Pratice for Celery Celery beat and worker Celery works with two separate parts, the beat and the worker. The beat is the control center which determine when and where to send the tasks, there should be only one beat in each celery network. The worker is the one who runs the tasks and send the results back to the beat, there could be lots of works in each network.…
Jul 17, 2019
Use Anki to Leaning English Anki 很早以前就听说了,是一款帮助你记忆东西的软件。 教小孩子的时候,一般不是会有一些卡片么,正面是一个字…
Jul 8, 2019
English Learning Notes From Culips Here is the podcast, I take some notes from it, it's really helpful if you try to leaning English. I recommand you that listen the podcast yourself multiple times. What the Mass Immersion Approach is learning 3 to 6 hours a day, and listen in background when cooking, cleaning. Compare…
Jul 5, 2019
Logging in Celery and Django Get celery work with django Celery can work with django, it's very simple. from __future__ import absolute_import import os from celery import Celery from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'your_app.settings') app = Celery('you_app') # Using a string here means the worker will not have to # pickle the object when using Windows.…
Jul 3, 2019
Fullstack Engineers 199x 年左右我初中,那会普遍流行的还是 dos 系统,公众对计算机的理解也就是一个打字设备,代替以前用油墨的方式…
Jun 27, 2019
How Does Https Actually Work 翻译自 How does https actually work 。 HTTPS is simply your standard HTTP protocol slathered with a generous layer of delicious SSL/TLS encryption goodness. Unless something goes horribly wrong (and it can), it prevents people like the infamous Eve from viewing or modifying the requests that make up…
Jun 19, 2019
Django Testing Django 自己的 unittest 支持的挺好,一般只需要在 app 下面加一个 tests.py 在里面写 case 就可以了。case 对应的类继承 django.test.TestCase 就好。 这个…
Jun 19, 2019
Add Disk for Aws AWS 的 ec2 支持不停机扩展磁盘,体验还不错,记录一下操作。 先看看磁盘是不是支持,例如下面的 GPT 的是支持的 $ sudo…
Apr 29, 2019
Debuging Django 起初 hackernews 看到一个文章 PySnooper: Never use print for debugging again,觉得挺有意思的,结果把 hackernews 的讨论看了一下发现有意思东西更多一…
Apr 26, 2019
How to Create an Index in Django Without Downtime django 自己带了一个 ORM 实现,基本可以通过 ORM 管理数据库,这样用户可以在不会 SQL 的情况下使用数据库。在对 model 的属性…
Apr 19, 2019
Readings 1984 ([英] 乔治·奥威尔) 这书看完我觉得这根本就是一本恐怖小说,当里面的内容正在和将要发生的时…