Setting Github Pages

There are only two steps to setup your personal blog with your own domain.

  • Create a CNAME file under the root of your repos(e.g. https://github.com/sicongtang/sicongtang.github.io/blob/master/CNAME), in hexo or octopress blog system, just create a CNAME file under source folder. This will automatically deploy CNAME file to your repository's root directory.

  • Then you need to configure a custom subdomain with your DNS provider. Creating two A records helps you to use custom apex domains. In addition, if you configure both an apex domain (e.g. sicongtang.me) and a matching www subdomain (e.g. www.sicongtang.me), GitHub's servers will automatically create redirects between the two.

Read More

Uml in Practice

Today I received a new task that they wanted me to be familiar with the whole business logic chain, so I started to use UML usecase diagram to represent the relationship. Actually I used to draw class/sequence diagrams via Jude, at this time I investigated couples of UML tools that can easily work both on Mac and Windows, e.g. astah, ArgoUML, LucidChart, Visual Paradigm. Considering the free licence, I choosed StarUML that is free and also works well on MacBook Retina.

Read More

Goal Setting and Accomplishment in 2015

Listed few things that I am going to investigate in the next year. The detailed chores will be fullfilled when I have a good idea.

  • algorithm, MIT
  • programming paradigms, concepts, e.g. scala, python, at least one programming paradigm
  • big data process, e.g. hadoop, spark, storm
  • distributed system architecture, e.g. optimization
  • large-scale application experience, like gc tuning, server cluster, DB read-write separation
  • lisp, emacslisp, SICP
  • computer science, like machine learning
  • MOOC, e.g. coursera
  • github contribution and search great started projects
  • TCP/IP, Http Protocol

Install Golang and Emacs Plugins

env setup

  • create dir GOPATH=~/Projects/goprojects
  • edit .bash_profile
1
2
3
4
5
6
7
GOPATH=~/Projects/goprojects
GOROOT=/usr/local/go
GOOS=darwin
GOARCH=amd64
PATH=$PATH:$GOROOT/bin:$GOPATH/bin
export PATH
export GOPATH GOOS GOARCH

emac plugins tips

  • copy /usr/local/go/misc/emacs/go-mode-load.el into emacs lisp dir, and make minor modification on your own personal setting
  • install mercurial, otherwise you cannot run hg command
  • go get code.google.com/p/rog-go/exp/cmd/godef, then we can use godef function
  • follow steps with nsf/gocode

Plugins list

  1. https://github.com/dominikh/go-mode.el
  2. https://github.com/nsf/gocode

References

  1. http://dominik.honnef.co/posts/2013/03/writing_go_in_emacs/
  2. http://tleyden.github.io/blog/2014/05/22/configure-emacs-as-a-go-editor-from-scratch/
  3. https://golang.org/doc/install#download
  4. http://go-lang.cat-v.org/text-editors/

Getting Started With Full Stack Javascript

Since I was enlighted by Minix and started to learn nodejs at the beginning of the June, I have realized that full-stack javascript might be dominating the web framework instead of rails or J2EE. I started to investigate any alternative framework in this new tech concept.

In my initial project with full-stack javascript, requirejs/backbonejs/express/mongodb were selected. Backbone is lightweight frontend js mvc framework which has fewer learning curve and unopinionated, comparing with angularjs. Additionly, Express is the most common mvc server-side framework in nodejs. Moreover, mongodb is relatively friendly to nodejs json format in server-side code as well as command-line shell. Thus, the whole brand new tech stack has been determined.

Before we commerced to scanffold our project using yeoman-generator, we took a glimpse on tutorial i.e. Developing Backbone.js Applications by Addy Osmani, Web Development with Node and Express, in order to be familiar with mvc conecpt, restful api, and middileware in express. Besides, I also scan tricks in requirejs/bower/node package management in order to build a highly-maintainable project with a mainifest dependency.

Read More

Mongo Db Crud Summary

This post aims to list the basic operation of mongo database in the mongodb shell prompt.

1
2
w, {Number/String, > -1 || ‘majority’ || tag name} the write concern for the operation where < 1 is no acknowlegement of write and w >= 1, w = ‘majority’ or tag acknowledges the write
j, (Boolean, default:false) write waits for journal sync before returning

system admin

1
2
3
4
5
mongod --fork --logpath /root/mongodb/log/mongodb.log
mongod —shutdown
mongo hostname:port/dbschema -u username -p password
db.serverStatus()
db.serverStatus().connections

Read More

Getting Started With Emacs

Why emacs?

Previously I was developing with dynamic language, like js, ruby, python, via using vim. Vim is a great editing tools with different internal mode(command/visial/insert mode). But the original reason why I intended to migrate from vim to emacs is the powerful REPL environment as well as other embedded function.

Trouble from vim to emacs

I was starting to read the documentation of emacs, and acquainted with new key-binding. Then I realized editing in emacs is less effective than in vim. Thus I came up to evil, an extensible vi layer for Emacs. Combing emacs with evil will maximize the productivies, therefore it is not necessary for you to remember all the key-binding under emacs environment.

Read More

Frontend Java Script Framework Alternatives

MV* framework

  1. BackBonejs
  2. Angularjs
  3. Emberjs
  4. KnockoutJS
  5. Dojo
  6. Spinejs

MVC extension framework

  1. MarionetteJS
  2. Thorax

template

  1. Handlebars
  2. Mustache
  3. JST
  4. ECO

build automation

  1. Grunt

module loader

  1. Requirejs
  2. Browserify

package manager

  1. Bower

workflow automation

  1. Yeoman
  2. Brunch
  3. Catero

code analysis

  1. JSLint
  2. JSHint

unit testing

  1. Jasmine
  2. QUnit
  3. Mocha

Reference:

  1. http://todomvc.com/