Thursday, May 14, 2009

The perfect friendfeed in my mind

I just got to know Paul buchheit and his Friendfeed. I'm very impressed by Friendfeed.
Paul believes that "it's better, initially, to make a small number of users really love you than a large number kind of like you". Following this philosophy, he asked Friendfeed's users to describe the perfect friendfeed in their vision.

I just played friendfeed for a day. I have not got the big picture yet. Currently I only have a small feature request.

  • Let the user choose what to subscribe. Currently when I subscribe a person in friendfeed, I got everything the person shared plus what he/she liked. That's too much information. I hope that friendfeed can let me to choose which service to subscribe from the person. For example, I may only follow his blog and flickr, not follow his twitter and facebook. Even better, I can put differenct service into different lists. For example, I can put persons A and B's blogs in a blogList and persons A and C's flickr in a pictureList. This way I can follow information I would like to get more conveniently.

Thursday, April 16, 2009

A sample .vimrc file

I use vim to write C/C++ and python programs. It is a very powerful editor for programmers. However before starting to use it, you need to have a customized .vimrc configure file to make vim work the way you like. The following is the .vimrc I'm currently using. It alone can meet my needs of editing C/C++ programs. I will talk about python later.

set nocompatible " use vim defaults
set ls=2 " allways show status line
set tabstop=4 " numbers of spaces of tab character
set shiftwidth=4 " numbers of spaces to (auto)indent
set smarttab
set expandtab
set softtabstop=4
set scrolloff=3 " keep 3 lines when scrolling
set showcmd " display incomplete commands
set hlsearch " highlight searches
set incsearch " do incremental searching
set ruler " show the cursor position all the time
set visualbell t_vb= " turn off error beep/flash
set novisualbell " turn off visual bell
set nobackup " do not keep a backup file
set number " show line numbers
"set ignorecase " ignore case when searching
set noignorecase " don't ignore case
set title " show title in console title bar
set ttyfast " smoother changes
"set ttyscroll=0 " turn off scrolling, didn't work well with PuTTY
set modeline " last lines in document sets vim mode
set modelines=3 " number lines checked for modelines
set shortmess=atI " Abbreviate messages
set nostartofline " don't jump to first character when paging
set whichwrap=b,s,h,l,<,>,[,] " move freely between files
"set viminfo='20,<50,s10,h guifont="Monospace\" lines="50" height =" 50" columns="100" width =" 100" background="light" selectmode="mouse,key,cmd" keymodel=" else" background="dark"> 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif " Filetypes (au = autocmd) au FileType helpfile set nonumber " no line numbers when viewing help au FileType helpfile nnoremap " Enter selects subject
au FileType helpfile nnoremap " Backspace to go back

" When using mutt, text width=72
au FileType mail,tex set textwidth=72
au FileType cpp,c,java,sh,pl,php,asp,py set autoindent
au FileType cpp,c,java,sh,pl,php,asp,py set smartindent
au FileType cpp,c,java,sh,pl,php,asp,py set cindent
"au BufRead mutt*[0-9] set tw=72

" Automatically chmod +x Shell and Perl scripts
"au BufWritePost *.sh !chmod +x %
"au BufWritePost *.pl !chmod +x %

" File formats
au BufNewFile,BufRead *.pls set syntax=dosini
au BufNewFile,BufRead modprobe.conf set syntax=modconf
endif

set autoindent " always set autoindenting on
set smartindent " smart indent

filetype plugin indent on
:fixdel

Monday, March 23, 2009

Ten Rules to Live a Happy Married Life: (Pearls from Dale Carnegie's Books I)

I'm reading Dale Carnegie's books now. There are many good advices. Here are ten rules for a husband in order to live a happy married life.
1. Unless there are some special reasons, meet your wife's needs;
2. Fulfill your obligation;
3. Don't look down your wife, respect her instead;
4. Don't scold your wife;
5. Don't complain your wife;
6. Encourage your wife to be soft;
7. Share your wife's pressure and burden;
8. Forgive your wife's shortcomings;
9. Love your wife forever, and protect her;
10. Bless your wife.

Friday, January 30, 2009

Getting Maxtor One touch External Hard Drive Working in Fedora

Instructions Here.
Now I only need to do
[]$ mount /mnt/external/
[]$ umount /mnt/external/

Monday, January 19, 2009

Tips in Using Vim (I)

Question: Occasionally vim freezes after I type a few combination of keys very quickly.
Answer: Most likely it is because you mistakenly type ctrl-s combination. When you press the CTRL-S key, many terminal drivers will stop sending the output data. As a result of this, it will look like Vim is hung. If you press the CTRL-Q key, then everything will be back to normal.

More from Vim FAQs.

Saturday, January 17, 2009

Notes on "Intelligent Investing" Jan. 26, 2008

Almost finished the classic book on investing, The Intelligient Investor by Benjamin Graham. This is not a "teach you how to get rich fast" book. Instead, this is a serious book teaching you how to invest intelligently. I like his strict, research-style writing. In this book, Benjamin first made a similar statement, "it is very hard to beat the market", as "Random Walk". So the investor should start on preserving capital first, instead of chasing hot issues. He classifies the investors into defensive investor and enterprising investor. Here I will focus on suggestions on the defensive investor.

Portofolio Management:
He suggests the defensive investor divide his funds between high-grade bonds and high-grade common stocks. The defensive investor should never have less than 25% or more than 75% of his funds in common stocks. The standard division is 50-50. If the investor feels that the market is over-valued, he moves to lower stock/bond ratio. Vice versa. (In today's market, I think I rather choose money market and cash than bond.)

Rules for the Common-Stock selection of Defensive Investor:
1. Enough diversification: between 10 and 30 stocks;
2. Each company should be large, prominent and conservatively financed;
3. long record of continuous divident payments;
4. Price should be smaller than 25 times of average earnings over past seven years, and not more than 20 times those of the last twelve-month period.

Conservatively financed: The common stock ( at book value ) represents at least half of the total capitalization.

Metrics
He states that if you only use one metric, e.g. low P/E ratio, to select stocks, you won't get a good return. Instead you should use a combination of multiple metrics to select stocks. These metrics include low P/E ratio, strong financial position, Dividend Record, Current Dividend rate, projected earning growth ...

P/E ratio <= 25; Price/book value <= 4? Divident yield 2-4%? Net Income/Interest >= 4?
Book value of common stock/total capitalization >= 50%
10-year Continuous dividend


Per-Share Earnings
1. Don't take a single year's earnings seriously;
2. Look out for booby traps in the per-share figures;
3. The growth rate be calculated by comparing the average of the last three years with corresponding figures ten years earlier

Quote:
1. The investor's primary interest lies in acquiring and holding suitable securities at suitable prices.

2009's Goals

“Having goals is a pain in the neck,” Seth Godin says, but “the people who get things done, who lead, who grow and who make an impact... those people have goals.” So here comes my 2009's
simple goals.

1. Improve the QoS of my company's streaming solution significantly
2. Read the following three books,
* BGP4 Inter-Domain Routing in the Internet (BGP) by John W. Stewart
* Unix Networking Programming (UNP) by Richard Stevens
* Distributed Algorithms (DA) by Nancy A. Lynch

3. Excercise at least once a week
4. Write at least one blog (Tech, Book/paper review, finance) one month (Here I am.)