Drum Practicing Reflection

I Collect a lot of questions and visit a pro today, and here are what I have asked and feedbacks:

Q: what’s the correct sitting position when playing?

A: Balanced, neutral, and centered — no hunching over, no slouching, no jumping up out of your seat to reach a cymbal. If you are towering over the drums and pedals, you’re sitting too high. Move your seat into position behind your drum set, and rest your feet on your pedals. Both legs should have approximately the same angle at the knees and be spread evenly apart.

Read More


Understanding Fstab

Today I encounter a very strange problem that all recent deployed applications in a specific host fail to start, with a simple error message “Permission Denied. xxxx.sh could not be executed”.

Nonsense! They’ve run for a very long time with a Jenkins driven deployment, started by a deploy script. And a binary “could not be executed” might be controlled by user & file access flag. Both checked, using root user & 755 access flag.

Suddenly I remember that the hard-disk on this host have been re-mounted by Ops a few days ago, this operation might corrupt some filesystem runtime context. So I wrote a simple test script a.sh, place it into different mounting point /tmp and /data and try to execute them via ./a.sh (not bash ./a.sh because in this case we are using r way instead of x to access the script). And script could be executed under /tmp but not /data.

Seems we are close to the root cause, but what stop us from executing a binary in different mounting point? The answer is the fstab.

Read More


Nice Chord Study Notes (1-50)

Ep 13. Walking Bass

Given a chord, how could we make it less dumb when playing bass line?

  1. use arpeggio
  2. change sequence of the arpeggio (keep the first note rooted)
  3. add some transition note (for example in a C-chord, add D between C and E)
  4. add some half note before root note at the first beat (for exmaple in a C F G C progression, add a Gb before F, add a F# before G
  5. add eighth-note or triplet into the rhythm

Let’s see a combination of the above skills:

Read More


2017 Resolution

I drafted this new year resolution on the plane. Looking forwards to a fruitful year!

Read More


The Data Migration Problem

Migrate the Hotel!
Today I am trying to solve a very interesting problem, I would like to call it the “data migration problem”.

Read More


Soft Skills Programmers Need

Soft Skills



  • 持续学习意愿
  • 口头表达和写作能力
  • 建立合理预期的能力
  • 管理事务复杂度的能力
  • 个人品牌建设的能力
  • 财务管理能力


Read More


Getting Started With Grafana



When I first saw Grafana, I was astonished by its beauty immediately and I believe it should be the very tools for most dashboard / monitor use cases. This 10,000+ stared project provide a complete solution for metrics and analytics.

Check this live demo and you should feel the same pleasure as I do.

How does Grafana work

In short, Grafana is a metric solution which include UI Render / Query / Data Source features.
UI Render is amazing; Different types of Queries are supported and it provide a wide range of Data source (mostly time series DB) support.

So, to setup a Grafana for our own use, what should we do?

  • First we need to setup the data source.
  • Second, we setup Grafana server and connect it with the data source.
  • Thrid, we feed data into the data source

That’s it!

Setting up

The following article will cover how to set all the stuff up under Mac OSX. Although we have homebrew and pip, but it take more effort than it seems to be.

Graphite as Data Source

First of all, we are going to choose the data source first. Grafana provide a lot of DB support including: Graphite, Elasticsearch, CloudWatch, InfluxDB, OpenTSDB, KairosDB, Prometheus,

I will take Graphite as our primary data source, with the following reasons:

  • powerful data APIs
  • friendly render APIs with image accessing
  • using whisper file to store data, operation friendly
  • overall the design of Graphite is very clean, every layer of the design is scalable.

Read More



Project management


工程质量 & 复杂度控制

  • 预计变化的影响:需求会变化,系统扩展性需要加强,人员在流动。架构师的职责是管理变化,更确切的说,确保变化的影响是受控的。所以以下的技巧是必须的:
    • 只进行小型、增量的改动
    • 写可重复运行的测试用例,经常执行
    • 让编写和运行测试用例变得容易
    • 追踪依赖事项的变化
    • 自动化重复事项
  • 舍弃自作聪明的设计。这样的设计让系统变得脆弱和难以维护。越老实的系统越容易扩展。
  • 关注性能。假如不从一开始就严格控制性能,「暂时不用关注性能」的想法就会在团队中蔓延。很快就变成「不得不马上解决线上的性能问题」。尽早在团队里面传授性能测试工具的用法是很有效的方法,真没那个时间的话,对依赖SQL的团队,普及一下explain的使用和结果解析都会有很大的提高。
  • 要评估系统的扩展性,那就尝试向多个方向增长业务规模,看看哪个方面会先支撑不住,那个就是你下个要关注的方向。
  • 重视界面设计。对于产品的用户来说,用户交互界面才是系统本身。系统的响应速度提高50%当然是好事,但废老大力气的优化很容易就被糟糕的交互带来的坏心情影响。

    Read More