作为一个热爱分享的人,总是享受写作的乐趣至凌晨12点可不是什么值得骄傲的事情——因为健康比什么都重要。那么如何在快乐分享观点的同时,不要花太多时间在来回修改上呢?以下是几点经验:

1. 先确定中心。

写作要有清晰的目标,你要总结经验/抒发情感/报道事实/记录技巧/分享奇趣/etc,无论什么,都得先想清楚,如果写到一般掉头改变目标,你就会发现前面写的40%以上都是废物,需要删掉。所浪费的时间肯定不会少。

2. 理清脉络。

在15年前我们上中学的时候我们就已经被告知这条真理。但是正确的运用他却从未被认真对待。谋篇如摄影或绘画中的构图。如tactoth这类geeek所写的如这种《高速写作指南》,自然是最八股,最常见,最无技术含量的"总分总”格式。但是如果你想写点有风格的散文,肯定会有更好的组织结构 —— anyway,都应该先想清楚。

3. 不要咬文嚼字。

辞达而已。如果你字斟句酌,恐怕你会写一篇语句非常通顺,甚至很优美的文章。可是读者往往注重观点远多于行文——如果不研究机械工程,再好的作家也写不出发动机的制造原理。所以建立一种朴实大方,清晰流畅的写作风格,会让你高效的分享观点,以文会友。

PS: tactoth的这篇小文在10分钟内完成,完全遵守了本文本身所提倡的三条原则。
 
 
简单汉语将对谷歌翻译非常友好。
'Simple Chinese' here will be Google Translate friendly.

编 程和软件开发是我最热爱的话题,也是这个博客的志向所在。为了获得最广阔的读者,tactoth一直致力于用简单英语书写。可是由于tactoth语言能 力欠缺,导致汉语和英语为母语的访客都没有阅读本博客的兴趣(前者排斥自己不熟悉的语言,后者看不懂自己熟悉的语言@_@)。

Programming and software development are my favorite topic, and what this blog is for. To reach the biggest audience, this blog has been in simple English. Dues to my limited language skill, neither Chinese speakers nor English speakers are interested in reading this blog(The former leave when they see English; the latter leave because they see English they don't quite understand@_@).

因此tactoth决定用汉语写作本博客。这样母语为汉语的读者肯定会很高兴。 但是为了兼顾英语为母语的读者(比如某老外搜索某个Windows API进入本博客),本博客所用汉语为最简化版本。读者可以用右侧的谷歌翻译按钮直接翻译。为了对谷歌翻译友好,本博客会避免汉语中所有生僻字眼和复杂句 式。

That's why tactoth decided to make this blog be in Chinese, which Chinese readers definitely love. To make sure those who don't speak Chinese also can read this blog (Usually you are here because you searched for a Windowws API, C++ keyword, ...), the Chinese you see here is a 'simplified edition': rarely used words and complicated sentences has been carefully avoided so that it's directly translatable to English with Google Translate.

希望所有阅读本博客的人得到愉悦的阅读体验,技术和快乐!
I wish you find pleasant reading experience, tech & programming stuff you were looking for, and fun in this blog!
 
 
We are a new company. In our first weeks we had daily progress meeting, on which people share the work they've finished and their plan. As new employees kept joining our development team, the meeting took longer and longer, so long that people think they wasted time listenning to things that's totally irrelevant to their work. So we decided to make that meeting be in smaller teams. For example, we desktop-client team could have our daily meeting, while the web UI team have theirs.

However what happened later is: other teams stopped having any meetings! We became the only team that continued meeting on a daily basis. Sometimes you feel the pressure of being 'the only one', but when you skip that meeting even for one day, you find performance and communication suffers.

After arround one month, one of the other team began to have their daily meeting too. The expressed the same concern: "It's very hard to let the project goal drive project progress and communication, which could be improved dramatically by daily face-to-face status update".
 
 
图片
It's quite common that the company hired a group of new engineers to expand the team. Then how to train them so that they adapt themselves well in the company culture,  understand the business quickly, and produce quality codes. Here's some tips.

1. Inform everyone duties of each division and individual, and principles of time management. This can quickly make everyone be self organized and motivated.

2. The business logic. All company knows how to inform engineers this part. Usually it's done by ask the new engineers to use the product.

3. Coding style. Soon after an engineer is hired he'll begin to code. Then making sure everyone work in the same coding style can help greatly on creat code that fit well to the company's existing system.

3. Code refactoring, Object oriented design, and the use of basic frameworks. Because engineers are from different companies, with different backgroud, this train is crucial for creating reusable and consistent code.

 
 
Nearly all morden frameworks provide built-in thread pool implementation. However C++ does't. Here's a list of implementations of thread pool in C++.

Threadpool
http://threadpool.sourceforge.net
threadpool is a cross-platform C++ thread pool library based on Boost. The threadpool library provides a convenient way for dispatching asynchronous tasks. Pools can be customized, managed dynamically and easily integrated into your software. The library is used by several commercial server applicaions and an handle high work load without problems.

Sample code:

#include "threadpool.hpp"
using namespace boost::threadpool;

void normal_task();
void important_task();

void execute_prioritized()
{
  // Create prioritized thread pool container without any threads.
  scoped_pool<prio_pool, 0> tp;

  // Add some tasks to the pool.
  tp += prio_task_func(5,   &normal_task);
  tp += prio_task_func(100, &important_task);
  tp += prio_task_func(7,   &normal_task);

  // Add the some threads to the pool. This will start the execution of the tasks.
  tp->resize(2);

  // The tasks are processed according to their priority:
  // important_task(100), nonrelevant_task(7), nonrelevant_task(5).

  tp->wait();
  // Now all tasks are finished and the pool will be destroyed safely when tp goes out of scope.
}

ThreadPool
http://www.hlnum.org/english/projects/tools/threadpool/index.html
Quite simple implementation based on lib_pthread. You can base your code on it and it's very likely some further modification is required. As is introduced in its homepage, it's:

"An implementation of a thread-pool based on POSIX-threads. It builds a pool of p threads which are blocked until a job was given to the pool. Then an idle thread is chosen and the job is executed at this thread. If no idle thread is available, the pool blocks until one of the running jobs terminates."

ffead-cpp
http://code.google.com/p/ffead-cpp/
It's an ambitious project that aims to bring C++ to the world of web development. As is stated in it's introduction page:

"The framework is developed for rapid development of Enterprise application on the C++ platform. It is a c++ web framework, c++ application framework, c++ rest framework and c++ soap framework all bundled into one. It consists of the following and is currently implemented for LINUX/WINDOWS(Cygwin). It is the first and only C++ Application framework to provide non-intrusive Dependency Injection and Business Driven Component Logic and POCO based Development. Most of the features are controlled by configuration files."

poco c++ libraries
http://pocoproject.org/
Poco is a framework written in modern, standard ansi C++ using C++ standard library. The framework seems perfectly complete(compression, data access, ssl, crypto, xml, threading, ipc - Anything you could think of in application development, it incudes.) It uses Boost license, and seems has lots of users.

Windows API
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686766%28v=vs.85%29.aspx

Supprisingly, Windows provides API for thread-pool management.And they have two sets of them. There was one shipped with Windows XP, and then in Windows Vista they upgrade the API by providing the second set.

libcurl
http://curl.haxx.se/libcurl/c/curl_multi_perform.html

If you are planning to use a thread-pool along with curl. The answer is, you don't need a thread-pool! This function provides all what you need. With asynchronous socket you can handle many connections with one thread, and curl has perfect support for this. It's fast, robust and handy.

Now smile :)
 
 
昨晚上约了去首都博物馆。早上9点就出去了。同行这人说话相当直爽。聊天真是令人很有乐趣。博物馆也是相当的有看头,外墙贴的是数千年间地图变迁。内测则是各种古代器具,见识了古代有钱人的生活。有气象雄浑的书法,有工笔细描的国画花草,绘制繁复的玉石桌面,金丝搂制的皇帝的帽子,和精巧小钟组合的扇子,五彩斑斓的瓷器,薄如蝉翼的玉碗,表面浮雕精致无伦的首饰盒,莹润洁白的象牙文具盒,毛笔。。。果然百工之技,只是为了那么几户大人物家里精致的摆设。

看了古代各种器具装饰,古代的工匠技艺之出众,真是令人叹为观止。这么多能工巧匠,各路高人,或者为了发家致富,或者为了附庸风雅,或者为了讨好父亲/美女/上司,逐渐技艺精进,居然创造出这么神奇绚烂的世界,真是令人感叹。

不过古代这些东西,说实话都是首重装饰,略重舒适。一个椅子精雕细镂,坐着不咯得慌?还有一个枕头居然两头嵌了牛角,让人担心会不会捅瞎双眼?到了今天,大家用的东西不仅造型美观,且更加注重舒适和各种健康条件。在用的东西上只要是稍微经济宽裕的,应该可以超越古代的贵族了吧。但是古代的贵族有大批下人伺候,饮食起居都有人伺候,且有高明御医各种把脉,这个还是只有中南海的官员才能享用。所以虽然时代前进,到底还是贵贱有别。我们所引以为豪的最文明的今天,在漫漫历史长河中恐怕和前朝各代不会有太大区别。


照片见我的flickr~
 
 
Obviously I'm not the kind of people who can enjoy a long trip - I'm so poor at planning it. But I went there! The aim of the trip is actually for some life stuff which the readers won't be interested. Anyway, I went there and traveled in the city for 2 days. And most part of the journey was nice.

We launched on Dec. 31 at night, spent the night in train, and arrived the second morning. It was really cold outside (-20 C), soon after we left the train my face was almost frozen. The air wasn't nice. You can smell the dusts from vehicles - even when you are inside a cab, which takes us to the place where we lived for 2 days.
The hotel was beside Songhua River. On our way to the hotel, we met Zheng Lvcheng Memorial Hall.
Picture
photos of the man
Picture
Should be him ... oh my Music teacher :D
Songhua River is big. In it it's all ice. No water. There's even cars moving above it, and there doesn't seem to be any problem. Here's some photos taken there.
Picture
Building with ice, they are everywhere in Harbin
Picture
On the river
Picture
Seems to be a cake
In the afternoon we went to Sofia Church. The church was surrounded by shopping malls but it manage to keep it's regional style. There're many pidgins on the roof. For a visit in the church you need to buy a ticket with 30 RMB. We bought and we entered. In the church it's like a big lobby, there were many people inside. A group of singers were singing on the platform in the center. I believe they sing well, though it's definitely not for me.
On the walls there're pictures telling the history of Harbin, the city in the very North of China, but grows to one of the 'second-biggest' cities in the country. From the pictures you know that there used to be a district in the city for Russian. But now you see less and less Russian. Nobody knows where they went. However there's still a Russian dacnging show. The cab driver said it's fantastic. However I never saw. - OMG, what a unfortunate trip.
BTW I didn't see many beautiful Russian girls :(
We had dinner at a restaurant in Center Avenue. It was a Russian restaurant. The food was good, but the price is no less than what's in Beijing: 400 RMB for 5 persons, including 4 adults and one 3-year-old girl, all simple Russian foods. So I guess the best place to enjoy nice food all over the world is still Beijing.
Picture
The restaurant, love it because it spells like 'tactoth'
Picture
The soup
Picture
Western Cold Steak?
Picture
Violin on the wall
Picture
After the meal, we saw this
Then it came the next. The original plan was to visit Sun Island. Then when we arrived there, we were told that the price is 240RMB per person. Usually it's 30RMB. The reason why it's much expensive is that there's a 'Snow sculpture show'. Many people decided to leave and we are among them of cause - we are poor, stingy, and lacks a taste of arts.
So we turn to Pole Show (130 RMB for each person, kids doesn't need a ticket). It's really a fantastic place.
Picture
promise me that you recognized me~
Picture
the two fat boys
Picture
the artificial scene is nice too
Picture
“my land, go away!”
Picture
Please .. let me be there
Picture
swimming penguin
Picture
city penguins
Picture
flying fish
Picture
'you human is boring'
Picture
'seriously'
Picture
it's a real shark.. OMG, hope the glass is not made in china
For some reason my journey stopped after I visited the Pole Show. I also bought some nice stuff from Russian Shops, which is everywhere in the city.
Picture
things to give out~ it's not expensive but i'm a great friend, haha
 
 
When 8 years ago I was in college I never expected my self to be a programmer. When 4 years ago I started working for Autodesk as a software engineer I never expected it to be my life time career. So I'm quite surprised that I've being working as a software engineer for nearly 5 years and am determined to do it really well. 5 years, it's long, and thing happen in between teaches you something,  here I list some conclusions.
1. Always do projects that brings most cash.
I started doing projects on TopCoder when I was in my last Year in Tongji University. The payment was actually excellent. I got 20k per month, even now after tax I don't make as much. However I choose to go to a big Corp. (Autodesk) to be a 'decent' software engineer. Sucks! - I don't mean Autodesk is bad, it an excellent company. However it's not the best for me, but I went there!

The logic is simple, people are willing to pay more cash for some project, it's because the project is more valuable. You should simply work on valuable project because then the experience you got is for more valuable things.

2. Impress your co-workers.
I believe that excellent engineers should earn big cash. Because of their solid programming skills, that can quickly build systems that seldom has bugs, are maintainable, robust, and create great value to the world. As long as there's someone realize some needs from the market, gather smart engineers to build them become crucial.

Your coworkers, knowing themselves to be excellent people, are always seeking this kind of market needs, and when they find it, make sure they believes you to be highly professional and have great team spirit.

3. When you've finally impressed someone, cherish it.

An valuable impression costs time and hard work to build up, and easy to destroy. I've lost something really big, then I know it's so valuable.

To be trusted, you must have been watched on for a few years. So always cherish things that you build up with time.

4. Quit bad companies ASAP.
Yes they do can manage to make the business run, because the boss is already rich and important. But what about you? Are you rich enough to kill time in this way? Do you enjoy wasting your time with no joy?

Don't judge a company by corporate culture/..., just by money. If it's about future money, make sure you can get it.
 
 
Picture
i now live dozens of meters away from here -_-
I've recently moved to Sanlitun, not because I love night life, nor do I go there to save commute time - I send more time on the road actually (and unfortunately). I go there just because everywhere in Beijing has similarly high rent, and surprising enough, the rent different between Sanlitun and other places are minor.

So it reminds me that - as I know, most people want to live a family life. I'm like those home builders. I want to make a powerful, comfortable and beautiful home. To be such it needs to be BIG, so big that it can hold lots of things I buy and build. But the expensive house price makes the dream impossible. It upsets me.

Each time I feels this frustration, I hope I'm teleworking. In that way I can connect myself to the most developed economy, and yet enjoy a peaceful family life, do some gardening/cooking/etc(which is absolutely a luxury for salary slaves in the city). I'll buy a car and actually drive it (In Beijing of cause it's impossible, there are too many.), and fixing it of cause will become a big source of fun too.

This will be perfect! I believe in the future jobs that doesn't require employees to work in an office will provide such flexibility. More and more people will be working in front of a laptop in their garden, on the roof, in the kitchen(to smell the food his wife is cooking), or even in bath room?

Probably I should build some software to make teleworking easier, for the world :D
 
 
Picture
“我最近在这边遇到的稀奇古怪的事情太多了”。

“这边的台风实在是太奇怪了,说来就来,而且台风出现的时候最常看到的就是一边天气晴朗,离不了100米的地方却在下雨,台风出现的时候一天要下好几次雨。”

“有一天我们有公司组织的篮球赛,我们在大街上走的时候,突然出现了很多女的,穿着短裙,上面是学生的打扮,在发传单,哈哈哈哈,你不知道他们传单上面写的是什么。。。 专车接送。。。。服务一流。。。 哈哈哈哈,据说东莞的话要更加夸张一些!我以前在西安有听到过这种事情,但是这种成群结队在大街上发传单的还真是少见”

“这边的房子都建的很漂亮,房子的话大概4000+一平米。除此之外一切都让人很失望。只有很少的一部分像大城市如北京上海那样,最多的地方都和通渭县没什么两样,我现在住的地方前面就有一个鱼塘。”

“我做了几次面膜,脸上长了一个很大的痘痘。”

"这些南方人,说话根本就听不清楚,他们应该也是在讲普通话,但是和我习惯的实在是区别太大。而且你再问他们,他们就不说了。唉!这帮南方人!我现在只要遇到一个长江以北的,便开始认老乡。上次遇到两个河南的,我就说我河南话完全听懂,对那地方可熟悉了。那两个人也非常激动,于是一个劲的讲起了河南话,你知道我根本就听不懂河南话,所以我很尴尬。”

刘学虎的浪漫事件1:

“上次遇到一个女的,我还蛮喜欢的,我们培训的时候在一起。然后我俩聊得蛮投缘的:她一个劲的和我讲她对文学的大量观点,我正好也能说一点附和附和。我当时犯了一个很大的错误就是没有要电话。因为第二天我们就分部门培训了,所以就没有再看到她。不过我知道她工作的地方在中山”。

刘学良:“那你周末的时候应该去那边公司看看,说不定能再遇到,你要抓紧时间,别被人抢了先。”

刘学虎:“嗯,说的是,不过名字我知道,我可以想些办法”。

Finally:
刘学虎,祝你一切顺利!(你知道我说‘一切’的时候,都包含了什么 :D)