Sublime Text 3 plugins – Lots of plugins won’t make you a superman

Recently, the newly Sublime Text 3 is just around the corner. It has been years I have digged into its creativity world.

The rich API of ST cultivated so many wonderful plugins, but intall lots of plugins won’t make you a superman, we should learn to reduce the noise of this buzzing world. Therefore, my recommendation will focus on the most pure and down-to-earth plugins that just work.

Continue reading

Collective Phenomena

Inspired by this post, I wrote a CoffeeScript implementation. This is a very interesting phenomena that revealed the beautiful philosophy behinds the nature, a slight push to the collection of simplicity can make miracles : D

As you can see, each particle is just moving around on a circle orbit with the same velocity, only the initial position is different. However, when they are made a whole, things begin to be interesting.

Continue reading

Some tips of Goagent on Unix-like system you may need to know


There are plenty of tutorials about how to setup a minimum Goagent server and client. I won’t reinvent the wheel here. Who may want to read this post.

  1. You have already setup the Goagent server and client, and it seems working ok.
  2. You still can’t visit Google+, Twitter, Facebook, or so on.
  3. You want to wipe out all the warning information, and make your Goagent work perfectly.

Continue reading

My terminal theme

This theme is build on the top of zsh and the famous OH MY ZSHELL. Besides, it has been included in the official OH MY ZSH repo : D

To a compatible theme, I think it’s better not to use special characters like ╭  ➜  ✗ . If you want your theme works fine on both Unix and Windows, a clean format and a simple color scheme are necessary. Therefore, I use only ANSI Character Set and ANSI Colors. The main goal of this theme is to make the  *nix servers’ admins happy. This theme is even more robust than the default theme robbyrussell.

I separate each command group with an empty line in front of the “#” prompt. The indicator words are all in a dim color. The most eye-catching color yellow is assigned to the current directory. For other colors’ setting, the same color will be assigned to different location with a long distance. And the more important it is, the more warmer color it is assigned to.

For the purpose of making the beginner to learn the command line easier, I set the dollar symbol “$” as the main command prompt. The %” or “# indicates the current state of the terminal. The “L” indicates current shell level, it can be useful when you are in nested shells. The last “N” indicates the current command number, with the time stamp you it may help you calculate how long a command takes.

The basic theme format:

Continue reading





Some thoughts on the software’s auto-update design pattern

There are so many ways to get the program to have the ability of auto-update. But as I’ve known, there is no way can absolutely make sure the program will update itself as expected. For example, you have defined some data type, in your program and store the data locally. And you have happily distributed your product to thousands users. Then months pass, you add some details to the basic data type. You migrate all the user data properly, and everything gone fine. Not a single complain heard from you users. Things turned complicate when the third time you update your data type. Now you have 3 types of data. Some of your users may be still the oldest version. Fortunately, you have left a tag in the data type to mark the version of the data type. So you take your time to check the version, and implement 2 method to migrate the data.

How about if this pattern continues for around 10 times? How many migration methods you should implement? Nine, of course. But if for some reason some of your users have reversed the version to an old one? From the basic principles of combination, we need 10×9 which means 90 methods to meet the requirement. That sounds crazy.

The main problem is because you can’t be sure whether all the users have always updated to the newest version. In other words, you need to find a solution to sync all the users program version and don’t hurt their data. On one can predict the future, we never know how the data finally like.

To be continued…