Friday, August 29, 2008

Để được tự do

Nếu bạn hỏi tại sao lại startup? sao lại team nhỏ? sao ko đi làm cho công ty lớn?
Tôi sẽ trả lời “để được tự do !”.
* Tự do suy nghĩ
* Tự do sáng tạo
* Tự do hành động
* Tự do tài chính

Tự do suy nghĩ

Sáng tỉnh giấc không phải bận tâm xem sếp hôm nay vui hay buồn, dậy muốn tí cũng không sao, nằm khểnh vắt chân suy nghĩ, thả cho trí tưởng tượng bay bổng cho đến khi cái dạ dày sôi sùng sục.

Tự do sáng tạo

Không phải đọc bản nội quy dài về những điều nên và không nên. Công việc được giao là một tờ giấy trắng thả sức tô vẽ. Tự giao việc cho bản thân mình.

Tự do hành động

Làm việc với những người mình thích. Bắt đầu và kết thúc lúc nào là tùy năng lực bản thân.

Tự do tài chính

Nếu startup thành công, sẽ tạo được cỗ máy tự sản sinh ra của cải. Không phải đổi sức lao động lấy tiền.

Thursday, August 28, 2008

Web 2.0 ... The Machine is Us/ing Us



That why I love web apps and do web development :))

Native SLI Support for the Intel X58 Chipset

What a good news :)

It's mean that in Q4 of 2008, we can easily build a desktop computer with Intel Bloomfield CPU (45nm, 4 cores, integrated memory controller) and two Nvidia GT200b cards (55nm, 480 stream processors @ 1620MHz, 2G DDR5).

It's more than two Tera FLOPS (1166 x 2 GFLOPS from GPUs plus CPU power). We can make many things (impossible for current desktops) happen with that computing power.

Reference:
Hell Freezes Over: NVIDIA Announces Native SLI Support for the Intel X58 Chipset
Intel’s first Nehalem mobo is X58
Intel Bloomfield On X58 Board Benchmarked

Everything you are searching for can be found in yourself ;)

Look at those children. They can be happy very easily. They just need noises, papers, or simple toys.

Our adults forget about childhood too soon. That why some of us need alcohol, cigarette, or even drug to be pleasure.

Children remind us life is fun. Let smile and laugh like a child. You will be happy and make everybody happy. Remember, we don't need money, beautiful girls (boys), big houses, or nice cars in order to be happy. As one of my dear friends said "all you need is practicing".





Wednesday, August 27, 2008

Tuesday, August 26, 2008

Water the Good Seeds

A nice song to remind you that you are the continuation of your mother, farther and ancestors. They are you and you are them. Water the seeds of love, understanding, happiness ... for you, for them, for your family, your friends, your children, and for everybody.

Lyric: Zen Master Thích Nhất Hạnh
Music: Sư cô Thệ Nghiêm
Source: Lang Mai


Water the Good Seeds

My mother, my father, they are in me,
and when I look, I see myself in them.

The Buddha, the Patriarchs, they are in me,
and when I look, I see myself in them.

I am a continuation of my mother and my father.
I am a continuation of all my blood ancestors.

It is my aspiration to preserve and continue to nourish
Seeds of goodness, seeds of skill, seeds of happiness which I have inherited.

It's also my desire to recognize
the seeds of fear and suffering I have inherited,
and bit by bit, to transform them, transform them.

I am a continuation of the Buddha, and the Patriarchs.
I am a continuation of all my spiritual teachers.

It is my deep aspiration
to preserve, develop, and nourish seeds of understanding,
seeds of love, seeds of freedom which they have transmitted to me.

In my daily life, I also want to sow seeds of love and
compassion in my own consciousness and in the heart of other people.

I am determined not to water the seeds of craving, aversion, and violence in me.
I am determined not to water the seeds of craving, aversion, and violence in others.

With resolve and with compassion, I give rise to this aspiration:
May my practice be an offering of the heart.
May my practice be an offering of the heart.

Why JavaScript is important and you will love it :)

Do you know "what is the programming language of the Web?". Is it PHP or ASP
S or C/C++ or Java or Python or Ruby or may be Lisp? (Note: HTML and CSS are not programming languages)

My answer is no, no, no and no. Ladies and gentlemen, our champion is JavaScript:
  • All web browsers have it
  • All Web 2.0 apps use it
  • Adobe Flash & Flex have it
  • It's one of the only four programming languages are allowed to use at Google (others are C/C++, Java and Python)
  • Googlers love it so much that they created a JavaScript web app framework called Rhino on Rails :))
  • It can run on both client side and server side (SpiderMonkey, Rhino ... )
  • Web apps prefer JSON (JavaScript Object Notation) than XML
Now I think you agree with me that JavaScript is important. You should learn it. I'm sure that you will love it when you learn it in the right way.
  • It's a simple language
  • It's easy to learn
  • It's functional
  • It's object is very flexible
  • It supports lexical closure (you can do great thing when combine closure and funtional)
How to learn it in the right what? I suggest you start from here:
http://www.crockford.com/javascript/

More very good and free material can be found at:

Sunday, August 24, 2008

Nói với tuổi hai mươi

Một bài viết hay của thiền sư Thích Nhất Hạnh.


Interview with Google

I had an interview with Google R&D in Beijing, China on 08/08/2008. Nice day ha :)

Four week ago, I received an email from a professor in Vietnam said that Google need people to do Vietnamese Natural Language Processing in China. They need people who is good at programming, has experience in NLP and Vietnamese is a must. I applied at got an telephone interview invitation. They created a share document on Google Docs so I and the interviewer can share notes. I had a week to prepare.

I prepared by reading:
To improve important skills:
  • Algorithms
  • Problem Solving
  • Programming
At the interview day, the guy who interview me called late 30 minutes and was sorry because he had been busy. The telephone connection was not good. The guy could hear me clearly but I had difficult to hear him. I asked him to call again but still the same. We started the interview.

They didn't ask about programming skill and experience.
They didn't read my blog too :))
I was surprised while knowing that none people from China spent more than zero seconds on my blog. It means that my interview (in China) never read my blog although I put links to my blog on cover letter, emails and resume. I believe that any web company will ask "Do you have a blog?" to most of their interviewees. The assumption is that: If you love your work, you should write about it; and blog is the most effective way to let people know that. Don't know why Google China don't care about enthusiasm. The strongest force that make people great. All of web startups (include Google) was started with a small team with a lot of enthusiasm.

Come back to my interview. I was asked two questions. One about C programming language, one about algorithms.

Q1: Tell the different between following C codes?
char *a = "A";
char a = "A";
char *a = 'A';
char a = 'A';

Q2: Given a group of people. There is only one or none star in the group. Everybody know the star. The star don't know other people. Given a function know(a, b) that return true if a know b, return false if a don't know b. Design an algorithm to answer that is there a star in the group and who is the star.

I answered Q1 smoothly. It's not a tricky question. Anyone who know about C pointer and C string can answer Q1.

For Q2, I showed the interviewer a naive solution with two for loop that take O(n^2) time.
The interviewer asked me to improve the algorithm. He was emphasis that could I design an algo that take O(n) time only? I thought for a while and still don't have an answer. I remembered that in "Get a job at Google" post, Steve Yegge said that we should think graph first. I draw a graph and saw a solution there. I told the interview I got a solution when describe people and their relationship as a graph. The interviewer reminded me that we don't have a graph already, and it also take O(n^2) time to build that graph :)) Steve Yegge's advice did not work in my case. Ha ha. I ask for more time to think carefully. Finally I found a solution, it's an easy solution that I should came up with earlier. I was nervous. When we treat people as a set and try to eliminate non relevant elements from the set. We can solve Q2 in O(n).

The interviewer approved my answer and he asked me if I have any question for Google. I smiled because I had practiced with my friend before, Dinh Hai, he acted as the interviewer and asked me as much questions as possible. He told me that I should ask Google some fun questions, he suggested this question: "is it true that at Google, the food never be placed away from programmers more than 8 meters?". I asked the same question to my interviewer and he laughed. The trick worked, thanks Dinh Hai :)) I also told him that I have motivation to do Vietnamese Language Processing to help Vietnamese people understand English better and help Google search Vietnamese documents more accurately (It's a win-win situation) and asked about Google plan for Vietnamese. He said that he is not a member of language processing group and could not answer my question. It was my last question and we finished.

Two weeks later, I received a "thank you" letter from Google said that currently Google did not have any position relevant to my skill :) I guest Google need a person who really do Natural Language Processing and good at C/C++ or Java. My job is web development using Ruby and JavaScript. It is not a good match. Before the interview, I realized my weakness and betted on my enthusiasm and motivation in Vietnamese language processing. It did not work :)

What I learn from my interview?

First, big company care about computer science. They want people who master algorithms and have good problem solving skill. The better computer science you are, the bigger chance you have.

Second, interview over telephone is not a good idea. Bad telephone line can reduce the quality of the interview. I had to asked my interviewer to repeat the questions, and needed to confirm with him questions' content.

How about your interview experience?

Saturday, August 23, 2008

Finding the "Ruby on Rails" of Concurrency

James Reinders wrote:

"Today, OpenMP and TBB are the Rails for parallelism, but they are in their infancy compared to Rails.
.
.
.
Read My Lips: No New Languages
This is not my vote for new languages for parallelism.

The abstraction for parallelism can and must be added to every programming language. Every language needs to evolve to embrace abstractions for parallelism."


Read full article at:
http://www.devx.com/go-parallel/Article/36234

Friday, August 22, 2008

Big win for Firefox's SpiderMonkey JavaScript engine

Excellent news from Firefox development team.
JavaScript in Firefox 3.1 is 2 to 30 times faster than in Firefox 3.0. Details here.

It will be a big win any project that use SpiderMonkey engine like Firefox, CouchDB and Aptana Jaxer.

CouchDB use SpiderMonkey for JavaScript function used in views and follow MapReduce model. I had worried about the speed of CouchDB view functions because we all know that JavaScript is much slower than other dynamic programming langugage (Python, Perl ..) because it was treated as a toy language. Now my worry has gone. Thanks to Firefox team who care about JavaScript and performance.

John Resig said that "With this improvement it's leap-frogged any sort of traditional and has gone head-to-head with computationally-powerful languages like C. I fully expect to see more, massive, projects being written in JavaScript. Projects that expect the performance gains that we're starting to see. Applications that are number-heavy (like image manipulation) or object-heavy (like relational object structures). "

Hope it will be true, very soon :)

I'm a ... Beckham's fan :))

Speed is king (2)

"Latency matters. Amazon found every 100ms of latency cost them 1% in sales. Google found an extra .5 seconds in search page generation time dropped traffic by 20%. A broker could lose $4 million in revenues per millisecond if their electronic trading platform is 5 milliseconds behind the competition..."

Read more at:
http://highscalability.com/latency-everywhere-and-it-costs-you-sales-how-crush-it

Thursday, August 21, 2008

Sức mạnh “ban tham mưu”

Hôm nay rảnh rang, lại tìm đến cha giàu để nghe ông giảng giải về bí quyết của thành công. Hôm nay ông giảng về sức mạnh của ban tham mưa mà ông đã viết khá kỹ trong cuốn Think and grow rich:

“Ban tham mưu” có thể được định nghĩa là “sự kết hợp kiến thức và nỗ lực trong tinh thần HÒA THUẬN giữa hai hoặc nhiều người để đạt tới một mục đích xác định”. Một cá nhân muốn thành công phải biết tận dụng sức mạnh của ban tham mưu. Nếu các con có tính kiên trì và chọn được ban tham mưu phù hợp là các con đã đi được nửa đường rồi.

Ban tham mưu có hai đặc điểm: một là đặc điểm kinh tế, hai là đặc điểm huyền bí. Đặc điểm kinh tế là hiển nhiên, các thuận lợi kinh tế sẽ đến với bất kỳ ai được vây quanh bởi lời khuyên, cố vấn và sự cộng tác của một nhóm người muốn trợ giúp toàn tâm toàn ý trên tinh thần HÒA THUẬN. Hình thức liên minh cộng tác này là nền tảng để tạo ra hầu hết mọi số phận lớn. Sự hiểu biết của các con về chân lý này sẽ quyết định tình trạng tài chính sau này của các con.

Còn về đặc điểm huyền bí. Việc nhận biết thấu đáo nó khó khăn hơn rất nhiều vì nó ám chỉ sức mạnh TINH THẦN mà loài người nói chung không hiểu rõ được. Các con có nghe câu “Hai cái đầu khi kết hợp lại bao giờ cũng tạo ra một sức mạnh vô hình thứ ba không thể hiểu thấu được”. Vũ trụ được biết đến với hai yếu tố: năng lượng và vật chất. Vật chất có thể bị phá vỡ thành phân tử, nguyên tử và điện thử, tức là có thể bị cô lập, tách ra và phân tích. Các đơn vị năng lượng cũng giống thế. Trí tuệ con người là một dạng năng lượng, một phần của nó là TINH THẦN. Khi trí tuệ của hai người hợp tác với nhau trong tinh thần HÒA THUẬN, các đơn vị năng lượng của mỗi trí tuệ hình thành một mối LIÊN HỆ tạo nên phương diện huyền bí của ban tham mưu. Bao quanh Carnegie là một ban tham mưu xấp xỉ 50 người với mục đích sản xuất và bán thép ra thị trường. Carnegie cho rằng toàn bộ tài sản mà ông có được là do sức mạnh tích lũy được qua ban tham mưu. Không có một nguyên tắc khác nào có thể tích lũy được một sức mạnh vĩ đại đến như thế!

Năng lượng mà tập trung lại, qua một quá trình mà chỉ Tạo hóa mới hiểu nổi, có thể tạo nên vật chất. Năng lượng bao hàm cả sự suy nghĩ. Bộ não của con người có thể ví như bình ắc quy. Nó hấp thụ năng lượng từ thinh không, thấm vào từng nguyên tử vật chất. Một bình ắc quy riêng lẻ không thể cung cấp năng lượng nhiều như vài bình ắc quy cộng lại (đừng nó nối ngược chiều mà cháy máy đấy con ). Một nhóm bộ não phối hợp (hoặc liên kết với nhau) trong tinh thần HÒA THUẬN sẽ sản sinh ra nhiều NĂNG LƯỢNG hơn bất kỳ đầu óc riêng lẻ nào. Phép ẩn dụ nào cho thấy ban tham mưu nắm giữ một sức mạnh lớn hơn bất cá nhân nào có thể sản sinh, và sức mạnh đó có thể được dùng để chuyển hóa thành vật chất.

Tiếp theo đây là một lời khẳng định khác giúp hiểu thêm phương diện huyền bí của ban tham mưu: “khi một nhóm bộ não cá nhân được phối hợp và hoạt động trong sự HÒA THUẬN, năng lượng gia tăng được tạo ra qua sự liên minh đó sẽ có sẵn trong mỗi bộ não cá nhân trong nhóm. Sự thể rõ ràng là Henry Ford bắt đầu sự nghiệp kinh doanh dưới sự cản trở của nghèo khó, thất học và dốt nát. Nhưng trong thời gian 10 năm ngắn ngủi Ford đã khắc phục cả 3 trở ngại trên và sau 25 năm, ông đã biến mình thành một người giàu có nhất nước Mỹ. Hãy kết nối sự kiện về sự tiến bộ rất nhanh của Ford với việc ông trở thành bạn của Thomas A. Edison và các con sẽ hiểu ảnh hưởng của trí tuệ này lên trí tuệ khác có thể mang lại điều gì. Các con sẽ thấy sức mạnh có thể sản sinh ra thông qua sự liên minh thân thiện giữa các trí tuệ.

Henry Ford đánh bại nghèo khó, thất học và ngu dốt bằng cách tự liên kết với các trí tuệ lớn (Edison, rồi Harvey Firestone, John Burroughs, và Luther Burband - ai trong số họ cũng đều là con người xuất chúng). Các rung động tư tưởng của các trí tuệ lớn được ông hấp thụ và làm cho trí tuệ của ông ngày càng mạnh mẽ.

Hãy xem xét Mahatma Gandhi. Có lẽ đa phần chúng ta hình dung về ông là một người đàn ông bé nhỏ, lập dị, đi loanh quanh mà không mặc quần áo đàng hoàng, gây phiền nhiễu cho chính quyền Anh. Trên thực tế, Gandhi không lập dị mà là người đàn ông quyền lực nhất (theo đánh giá của những người đi theo ông). Sức mạnh của ông thụ động nhưng là có thật. Ông có được sức mạnh qua việc khiến cho hơn 200 triệu người cộng tác bằng cả tinh thần lẫn thể xác trong thuận hòa vì một mục đích rõ rệt. Tóm lại, Gandhi đã thực hiện một phép lạ khi 200 triệu người có thể cùng làm việc (không bằng vũ lực) trong tinh thần hòa thuận trong một khoảng thời gian vô hạn. Nếu các con nghi ngờ đây không phải là phép lại thì hãy thử khiến cho bất kỳ hai người nào hợp tác trong tinh thần hòa thuận trong một lượng thời gian nhất định xem. Ai đã từng quản lý công việc kinh doanh đều biết rằng phải khó khăn thế nào để làm cho những người làm công ăn lương làm việc trong tinh thần hòa thuận với nhau.

Hôm nay nói nhiều rồi, cha ... mỏi miệng. Các con về suy ngẫm, khi nào hiểu được rồi thì cha mới giảng bài tiếp theo.

A fun and inspiring presentation





http://rubyhoedown2008.confreaks.com/12-giles-bowkett-archaeopteryx-a-ruby-midi-generator.html

Tuesday, August 19, 2008

25 times faster than Deep Blue

I bought my first parallel computing device, a 2-week old XFX GeForce 8800GT, at $200 SGD last night. It worked fine with my ASUS PL5 1394 mainboard.



8800GT Specification

Released on 29 Oct 2007
Code name G92
65nm fabrication
600 MHz core clock
112 stream processors
1500 MHz clock
512 MB GDDR3
256 bit bus width
138 watts
754 million transistors
Theoretically 504 GFLOPS

Minus 512 MB memory and other external stuffs, I guest each stream processor cost $1 SDG :)
Let say on average, we can only utilize 60% of max computing power (inefficient algorithms, mem access delay, synchronization delay ...), so the power of my device is about 302 GFLOPS. Then performance /cost ratio = 2.2 GFLOPS per watt. I just bought a very good performance / cost ratio computing device. Compare to IBM's Deep Blue, the computer defeated Kasparov in 1997. My device is equal to 25 deep blues combined together. I think I will do weather forcast for Singapore (just kidding :)

Reference:

1997, IBM's Deep Blue defeated world chess champion Gary Kasparov. Its price has been estimated at 5 million dollars, and it produced 11.38 Gflops of measured performance, making its PPR more than $439,367/Gflop.
http://www.calvin.edu/~adams/research/microwulf/PPR/

Monday, August 18, 2008

"Speed is king" or "how to prepare for future?"

Google said "Speed is King". Who don't believe please try to build a better search engine than Google :) Why Google is so fast? What is the reason behind? I invite you to "a Google Behind-the-Scenes Tour". Let spend few minutes to go through slides before continue reading this post.
.
.
.
.
.
.
After the tour, you will discover that Goolge is fast because they do distributed computing with huge of commodity computing units that give best performance/cost ratio.
The key is that Google invented a simple programming model that applied to many large-scale computing problem called MapReduce (inspired by map and reduce functions in functional programming).

MapReduce hide a lot of complicated problems in distributed programming (like parallelization, load balancing, handling machine failures, robustness ..) from programmers so that their can buid efficient programs quickly and easily (Learn more about MapReduce here, and Google Architecture here. For an overview, the tour above is enough :)

MapReduce usage statistics (the tour, slide 29) show that for Sep, 2007 Google performed 2,200,000 jobs in average 6.5 minute completion time using average 400 worker machines.

The good news is that you can clone Google architecture using an open source software called Hadoop: "a free Java software framework that supports data intensive distributed applications running on large clusters of commodity computers.[1] It enables applications to work with thousands of nodes and petabytes of data. Hadoop was inspired by Google's MapReduce and Google File System (GFS) papers." (from Wikipedia). Hadoop has been deployed in many big Web companies like: Yahoo, Facebook, Amazon ...

The bad news is that if you are a student, surely you don't have enough money to buy hundred machines to deploy a MapReduce system (let say each machine cost about $500 USD, 400 machines will cost $200,000 USD - not including setup and maintenance fee :(

Here come a rescuer, GPU (Graphic Processing Unit) as massive parallel processors for scalable high-performance computing (HPC) at very cheap price. CUDA is one of the first and most comprehensive platform (an overview here, more details here). What I mean about cheap is that with about 200 USD (at Aug, 2008) you can by a Nvidia 8800 GTX Card with 128 Stream Processors, 512MB DDR3 to play with parallel programming yourself.

Actually there is a lot of different between MapReduce and CUDA programming models. But I don't see they compete each others. Instead, they complement each others. I think that Hadoop+Cuda combination will give a lot of powerful for individual to utilize the most computing power giving best performance / cost ratio that current hardware industry can offer. It's also a good practice to prepare for "the next milestone in computing in history". Welcome to the world of parallel computing.

As a programmer you may say "I don't care. I still coding-for-food with my sequential programming techniques. My programs run very fast on latest CPU. That's all my IT company need."

Well well well, here is the point. Now a day, the Moore law is not correct. Since 2002,processor performance has improved less than 20% per year [link]. Then multiple-core processors appeared. The hardware industry started switch from single CPU to multiple core processors. Now you can buy a quad-core Intel processor at around $1000 USD. Intel also plans 32-Core Processor by 2009/2010. And then ADM also have it's own a lot of core processor plan :). Now I can see that you starting feel nervous. Of course, if your program can run in one core only and other programmer (who learn about parallel programming techniques) can run a new program with the same logic but can run in 32 cores. It means that your program will be 30 times slower than the new program. If you are a user, which program you want to use? If you a CEO who run an IT company, which program you want to hire?

I believe that in 2010 the will be a huge demand for parallel programming jobs just to utilize new parallel processor architecture to improve existing and develop new programs as fast as possible. From now, you have 16 months to learn about parallel programming. You should be hurry :))

Now I tell you that I'm in the same situation with you. I know almost nothing about parallel programming. Because universities don't offer me parallel programming courses, and jobs don't demand me for parallel programming techniques. But I will prepare myself for a near future where every desktop computers will have 32 (64, 128 or even 256) cores, and GPUs with computing power of thousand's GFLOPS (imagine that a near future desktop will be as powerful as 400 worker machines in above Google MapReduce jobs examples). In that concurrency world, the ones who master parallel programming techniques can write fastest programs, again "speed is king" :)

And please remember that "The world is concurrency, the applications are concurrency, and hardware is concurrency also". Programming need to catch up.

Note:
Google bought PeakStream (a GPU and multi-core computing solution startup)in middle of 2007. I don't know what Google going to do with PeakStream. Guest that they will use it to solve biology problems or build the next generation server farm.

Sunday, August 17, 2008

Saturday, August 16, 2008

Câu chuyện hai cái cây

(sưu tầm)

Một bác nông dân ươm hai mầm cây cùng một lúc trong vườn. Cây thứ nhất gắng hết sức để hút chất dinh dưỡng dưới lòng đất, sau đó tích lũy lại, nuôi dưỡng cẩn thận từng cành cây, lặng lẽ suy nghĩ, tính toán làm thế nào để hoàn thiện bản thân và phát triển lên. Còn cây kia cũng gắng hết sức hút chất dinh dưỡng dưới lòng đất, tích lũy lại, và đã bắt đầu tính toán việc ra hoa kết trái.

Năm sau, khi mùa xuân đến, cây thứ nhất đã có những chiếc là non đầu tiên, dồn sức lực để trưởng thành. Còn cây kia khi mới có những chiếc lá non, đã nóng lòng vội vã nở ra những nụ hoa. Mục tiêu của cây thứ nhất rất nó ràng, tính kiên trì và sức chịu đựng đã làm cho nó mau chóng trở thành một cây to khỏe, cành lá xum xuê. Cây thứ hai năm nào cũng ra hoa kết trái, mới đầu nó làm bác nông dân vô cùng ngạc nhiên và thích thú. Nhưng vì chưa trưởng thành mà đã phải gánh vác trách nhiệm nặng nề đó, nên nó dần dần thấm mệt. Thân cây bị cong xuống, quả của nó cũng chua và khó ăn, ngoài ra đám trẻ con hay dùng gạch đá ném nó.

Thời gian trôi đi, và cuối cùng một ngày kia, cái cây tươi tốt lâu ngày chưa một lần ra hoa nay đã nở những nụ đầu tiên, do có đủ chất dinh dưỡng, cơ thể lại cường tráng nên quả của nó vừa to lại vừa ngọt. Lúc này cái cây vội vàng ra hoa kết trái đã khô héo, bác nông dân thở dài và chặt nó làm củi đun.

Lời bình:

Tục ngữ có câu “dục tốc bất đạt”, làm bất cứ việc gì chúng ta cũng không nên vội vàng, để mau chóng làm xong, mà nên bền bỉ làm tốt nó. Muốn chất lượng thì chất phải đi trước, rồi sau đó mới đến lượng.

Không nên đi trái lại quy luật sinh trưởng và phát triển. Để đi đến thành công, bạn cần có quá trình tích lũy, từ đó tạo nên một nền móng vững chãi cho thành công.

Friday, August 15, 2008

Rắn phải có đầu, team phải có leader

Tối qua ngủ mơ, tớ với mấy người bạn đến chơi nhà cha giàu (trong rich dad, poor dad). Thật quá bất ngờ, hóa ra cha giàu chính là người viết cuốn Think and grow rich. Cha giàu ở trong một ngôi biệt thự rất to nhưng đồ đạc trong nhà lại rất lèo tèo. Hỏi ra mới hay mụ vợ của cha giàu tự dưng dửng mỡ dở chứng ham mê cờ bạc đã mang hết đi cầm đồ rồi (các cụ dạy “trẻ ko chơi, già đổ đốn” cấm có sai). Thật là cảm thương cho cha giàu.

Cha giàu trong lúc cô đơn, buồn tủi thấy bọn tớ đến chơi trong lòng rất phấn khởi và cảm động, liền quyết định từ nay sẽ truyền bí quyết “thành công” cho.

Bí quyết đầu tiên là “rắn phải có đầu, team phải có leader”.

Cha giàu hỏi: “để ta thử xem trong bọn bay có đứa nào có khả năng lãnh đạo ko. Nghe ta hỏi đây rồi trả lời cho rõ ràng”.

cha giàu: để làm được lãnh đạo, bọn bay cần: thứ nhất, DŨNG KHÍ VỮNG VÀNG.

Cả bọn (đồng thanh): có ạ

cha giàu: thứ hai, TỰ CHỦ. Một người ko tự kiểm soát được mình sẽ không thể lãnh đạo được người khác.

Cả bọn: có …

cha giàu: thứ ba, Ý THỨC SÂU SẮC VỀ SỰ CÔNG BẰNG.

Cả bọn: có …

cha giàu: thứ tư, QUYẾT ĐOÁN. Người dao động trong quyết định chứng tỏ người đó chưa hiểu rõ bản thân mình và công việc.

Cả bọn: có …

cha giàu: thứ năm, CÓ KẾ HOẠCH RÕ RÀNG.

Cả bọn: có …

cha giàu: thứ sáu, THÓI QUEN LÀM NHIỀU HƠN TIỀN LƯƠNG ĐƯỢC TRẢ

Cả bọn: có …

cha giàu: thứ bảy, CÁ TÍNH DỄ CHỊU

Cả bọn: có …

cha giàu: thứ tám, THÔNG CẢM VÀ HIỂU BIẾT

Cả bọn: có …

cha giàu: thứ chín, NẮM VỮNG CHI TIẾT

Cả bọn: có …

cha giàu: thứ mười, TỰ NGUYỆN GÁNH VÁC HOÀN TOÀN TRÁCH NHIỆM

Cả bọn: có …

cha giàu: thứ mười một, HỢP TÁC.

Cả bọn: có …

cha giàu: bọn bay đứa nào cũng có khiếu làm lãnh đạo vậy đứa nào chịu làm lính đây?

thiếu ngủ (gãi đầu gãi tai): cha giàu có cao kiến gì ko, chỉ cho bọn con mới !

cha giàu: nghe ta dặn đây, bọn con thay phiên nhau làm lãnh đạo. Mỗi đứa làm lãnh đạo trong một tháng. Lãnh đạo đã ra lệnh thì các đứa khác cứ thế mà làm. Đứa nào ko phục thì âm thầm chịu đựng. Chờ tới phiên làm lãnh đạo mà sửa đổi. Không được cự nự gây mất hòa khí nghe chưa ..

cha giàu dạy chí phải, cả bọn về nhà làm theo …

Wednesday, August 13, 2008

Tuesday, August 12, 2008

I love books ...

English-Vietnamese Translation Service (2)

Khi dịch Anh-Việt tớ rất hay phải tra từ điển, có những từ tra đi tra lại đến vài lần vì quên. Có từ điển click & see thì còn đỡ, còn nếu phải gõ thì khá mất thời gian. Khi tra một từ điều đầu tiên tớ quan tâm là nghĩa của từ. Từ điển thông thường liệt kê rất nhiều thứ, từ ví dụ cho tới thành ngữ, mà ko tập trung vào nghĩa của từ. Có khi phải kéo vài trang màn hình để đọc hết các nghĩa của từ. Trong trường hợp đó, ví dụ và thành ngữ trở thành "nhiễu", làm cản trở việc tra nghĩa của từ. Rồi có những từ / cụm từ gặp lại nhiều lần trong bản gốc thường phải gõ lại y hệt nhiều lần...

Đó cũng là "nỗi khổ" của một người dùng thông thường.
Có cách nào để việc dịch Anh Việt trở nên dễ dàng hơn không?

Câu trả lời là: Có thể được. Bằng cách:
* Tận dụng
- Các tool NLP mạnh cho tiếng Anh
- Từ điển Anh-Việt, Việt-Anh đã có sẵn

* Để làm những cái chưa ai làm
- Chưa có chương trình quản lý văn bản song ngữ
- Chưa có ứng dụng giúp người dùng vừa dịch vừa tra từ điển nhanh (di chuột vào 1 từ Tiếng Anh là hiện nghĩa / gợi ý một cách "thông minh")
- Chưa có quản lý version và hỗ trợ nhiều người cùng dịch một văn bản

"Thông minh" có thể hiểu là máy tính đoán được từ này là danh từ chẳng hạn thì chỉ hiện nghĩa danh từ thôi (giảm nhiễu). Người dùng click vào nghĩa tiếng Việt thì tự paste nghĩa đó ra văn bản đang dịch (save time). Gặp từ đã dịch rồi thì gợi ý xem người dùng có muốn dùng lại phần đã dịch hay ko? Từ nào là địa danh / tên riêng thì bảo với người dùng đây là tên địa danh / tên riêng, chỉ cần cop & paste vào văn bản đang dịch là được.
Phần "thông minh" này là nơi để NLP dụng võ.

Chỉ khi chương trình của thực sự hữu ích cho người dùng trong công việc sát sườn của họ thì họ mới dùng và mình mới có thể thu thập dữ liệu tin cậy. Mong chờ cộng đồng đóng góp có thể sẽ rất lâu.

Monday, August 11, 2008

Saturday, August 9, 2008

Talent Force

Lời mở đầu cho cuốn “Talent Force” có đoạn

“Không ai có thể thành công một mình cả. Bất kể bạn đang nhắm tới mục đích nào, bất kể bạn muốn tạo ra thay đổi như thế nào, bạn cần có những người khác để tạo nên điều kỳ diệu. Vì vậy, xây dựng một “great team” là yêu cầu tối quan trọng.”

Làm thế nào để phát triển một great team?
Cái gì là yếu tố nền tảng để thành công?

Để bắt đầu, great team cần có những “cá nhân tài năng”, những người có những kỹ năng cụ thể và luôn biết cách hoàn thành công việc. Họ cần có đủ tài nguyên cần thiết: con người, thời gian, tiền bạc và sự hỗ trợ. Họ cần có một hệ thống “phản hồi” hiệu quả để có thể theo dõi kết quả trong thời gian thực và nhanh chóng sửa lỗi hoặc cải tiến. Cuối cùng, great teams cần được tự do và năng động để có thể tìm ra và thực thi những giải pháp tốt - và làm ngay lập tức!”

Câu hỏi tôi muốn đặt ra cho mọi người là:
“Bạn đã từng làm việc trong một great team bao giờ chưa???”
Hãy suy nghĩ kỹ trước khi trả lời.
Còn với tôi, câu trả lời là chưa vì:
- Tôi đã từng làm việc với great groups, nhưng group ko phải là team
- Tôi đã từng làm việc trong 1 team, nhưng đó là 1 team tồi

Tại sao team đó tồi? Câu trả lời là “tính ích kỷ”. Con người quan tâm tới bản thân mình và không nghĩ tới người khác. Ai cũng muốn được phần bánh to nhất với công sức bỏ ra ít nhất. Người ta gọi đó là “hợp thời”, là “thích nghi với hoàn cảnh”, là “khôn”, là “nhanh nhạy”. Còn tôi vẫn gọi nó là “ích kỷ”.

Có câu chuyện như thế này. Ở một làng nọ, mỗi nhà đều có một cây táo, bình thường mọi người chung sống rất hòa thuận và đến mùa nhà nào cũng có táo chín để ăn. Bỗng một hôm, cơn lốc “ích kỷ” cuốn qua làng. Con người trở nên không tin tưởng lẫn nhau. Khi cây táo bắt đầu ra trái, ai cũng sợ người khác sẽ chén mất trái táo của mình. Sợ tới mức mà họ đã ăn ngay trái táo khi nó còn xanh.

Một ví dụ nữa, ai cũng muốn làm giàu, giàu hơn người khác mà không phải bỏ nhiều công sức. Mua rẻ bán đắt là phương châm kiếm tiền hàng đầu. Giả sử tài nguyên là một giá trị N hữu hạn. Ai cũng muốn tranh giành N mà không ai chịu bỏ công làm N tăng lên, vậy sau một thời gian (do N bị tiêu hao để nuôi sống con người), N sẽ = 0. Lúc đó ai còn muốn N = 0 nữa ?????

Thay vì tranh giành và khôn lỏi, chúng ta hãy tạo ra giá trị, trao đổi giá trị cho nhau, để tất cả cùng “giàu”. Tôi biết làm bánh, tôi tạo nhiều bánh ngon. Bạn biết làm quần áo, bạn tạo ra nhiều quần áo đẹp. Tôi đổi bánh để lấy áo quần của bạn. Vậy là chúng ta vừa có bánh ngon để ăn, vừa có áo quần đẹp để mặc.

Hãy bắt đầu, ngay bây giờ. Hãy trở thành talent force, đừng trở thành “khôn lỏi” force.

Friday, August 8, 2008

My favorite song :)



Don't Worry, Be Happy

Here is a little song I wrote
You might want to sing it note for note
Don't worry be happy
In every life we have some trouble
When you worry you make it double
Don't worry, be happy......

Ain't got no place to lay your head
Somebody came and took your bed
Don't worry, be happy
The land lord say your rent is late
He may have to litigate
Don't worry, be happy
Lood at me I am happy
Don't worry, be happy
Here I give you my phone number
When you worry call me
I make you happy
Don't worry, be happy
Ain't got no cash, ain't got no style
Ain't got not girl to make you smile
But don't worry be happy
Cause when you worry
Your face will frown
And that will bring everybody down
So don't worry, be happy (now).....

There is this little song I wrote
I hope you learn it note for note
Like good little children
Don't worry, be happy
Listen to what I say
In your life expect some trouble
But when you worry
You make it double
Don't worry, be happy......
Don't worry don't do it, be happy
Put a smile on your face
Don't bring everybody down like this
Don't worry, it will soon past
Whatever it is
Don't worry, be happy

Thursday, August 7, 2008

My favorite quotes

"If you have an apple and I have an apple and we exchange apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas."

George Bernard Shaw (24)


"Success is the ability to go from one failure to another with no loss of enthusiasm."

Winston Churchill (20)


"Nothing is particularly hard if you divide it into small jobs."

Henry Ford (23)

Wednesday, August 6, 2008

The Last Lecture



More info here:
http://www.thelastlecture.com/

Handling Keyboard Shortcuts in JavaScript

I found this script very useful. Especially when I need to handle key combination (disable default events for "Crtl+P" and "Ctrl+S" for example)

The code work nicely but the source code is not in a good form. So I refactored it:

Check out it and feel free to make it better :)
http://refactormycode.com/codes/402-handling-keyboard-shortcuts-in-javascript#refactor_14545

Monday, August 4, 2008

How I became a web developer (2)

My cover letter to Spiragram

Nguyen Tien Dung

20070729

Before came to Singapore. I planned to be a PhD student, then a researcher. I had experience in Speech / Text / Language processing. My brother is a PhD, most of my roommates are PhD students too. You can say that I lived in an academic environment.

I will not change my mind if Web apps didn’t come into my life. I liked Gmail at the first glance. It’s so cool, simple and easy to use (mails are sorted in threads according to their titles...) I moved from Yahoo mail to Gmail immediately. Then came Writely, Meebo, Google Reader, … I didn’t need Yahoo Messenger, MS Word … anymore. My browser becomes an operating system, and there are a lot of cool apps out there in the WWW. I heard about Web 2.0. “Web 1.0 was about commercial, Web 2.0 is about PEOPLE” I liked this quote the most. Then Web 2.0 technologies and frameworks: AJAX, Ruby on Rails …

Is it hard to create a Web app? Spent time to study HTML, CSS, JavaScript and Rails and I known that it is not hard, technically. It was about the March 2007, my last semester at NUS, I was studying master of computing there. Why don’t create some web apps to master the techniques and create my own business (like many web 2.0 startups I’ve read) that server PEOPLE in a better way? I have an idea that utilizes my research experience. I will combine language technologies and web 2.0 technologies to create web apps for Vietnamese people. These apps will help people deal with Vietnamese language problems (like Chinese, Vietnamese has problems with input method, encoding, searching ... ), help them understanding English better... They will be the bridge between Vietnamese and English that is absolutely necessary for Vietnamese to join and survive in a “flat world”.

After finished the last examination, I and two friends created a TEAM to make our dream become true. We had a hard time to start because two other guys have day-time jobs and only free at weekends. Our first priority is TEAM building. We believe that when we can work together in harmony and master Web development techniques, we can do whatever we want. Since May 2007, we come to NUS lab every Saturday to work together, each of us become the team leader in a month. We’ve finish the release in July, it’s an English-Vietnamese Dictionary Web App with some cool features: auto suggestion, spelling checking, dynamic content (AJAX v.s static HTML). Dictionary is very first and important weapon to attack language problems.

Here is what I’ve done with Rails and JavaScript that you may be interested.

· Create a Rails toolbox for myself called “Minimal Win32 Rails Development Environment”. It’s a combination of Ruby, Rails, Mongrel, SQLite, GNUWin32 tools, SVN, e-TextEditor (TextMate for Windows) that can be compressed to less than 10MB so I can send it via email.

· Trained myself about JavaScript Programming by reading some best books and videos (of John Resig and Douglas Crockford). Used and like jQuery very much.

· Choonkeat sent an email that he needed a web developer for sharedcopy project. I hacked JavaScript code (the only part I can access) and proved that I can improve his code base.

· Joint sharedcopy project, did JavaScript programming for more than a month (refactor source code, improving highlighting function, replace Mootools by jQuery, rewrite draggable and resizable functions )

· Meanwhile, developing Dictionary Web App with two friends. Involved in database design, information architecture, server side coding (Rails), for client-side, I did get text under the mouse function and now I’m developing a new Vietnamese input method function because I want to add spelling checking in current open source ones but can’t understand their code (the code is not written for human, I guest :)

I planned to work for sharedcopy but not everything happens as you wish. Now I’m looking for a new job. Last Friday, I had an interview with Ingenico, a French company providing secure payment solutions, for a C++ developer position. I’ve used C++ for more than 3 years so I have no difficult with their tests and hand-on exercises (I had to write two small programs using Turbo C made in 1989 without an Internet connection, it was like the old days in school). After the interview, I know I’m a good candidate for this position. But immediately I had a sad feeling. I missed my Web development job at sharedcopy.

Now I know it’s great if I could continue doing Rails / JavaScript development. That’s the reason I would like to join Spiragram.

I do not have rich experiment in web development. But I have a strong background in computer science and programming. I can learn fast and always learn from best practices. I hope that my CS background, enthusiasm and fresh mind will be my strength as someone said “In times of rapid change, experience could be your worst enemy”.

Thank you very much for reading!

Tien Dung

Saturday, August 2, 2008

Simplest Hunspell Ruby binding

Hunspell is one of the most powerful open source spelling checker. Recently I need to use spelling checking our startup project. Hunspell is the first choice.

There are several Hunspell bindings for Ruby:
  • http://rubyforge.org/projects/hunspell/
  • http://rubyforge.org/projects/ruby-hunspell/
They are gems with long and traditional bingding code.

Initially, I use Hunspell gem but after digging in to source code, I found a memory lick problem: the author forgot to free suggestion list after call Hunspell_suggest(pHunspell, &slst, str) function.

I decided to write my own binding with less code using RubyInline. Here is the result:
A simplest Hunspell Ruby Binding within 60 line of codes :)

Check it out at:
http://github.com/tiendung/rhunspell/

Update: Now the binding become a Rubygem, you can install it easily with following command:
"sudo gem install rhunspell"

Đừng bao giờ ngừng cổ vũ

(dịch từ Never Stop Cheerleading)

Một lập trình viên tài năng nói rằng anh đã thích công ty mình đang làm việc nhưng từ khi anh ta gia nhập công ty từ vài năm trước, anh không cảm thấy công ty đang phát triển (mặc dù nó vẫn đang lớn mạnh).

Sự hứng khởi lúc đầu đã bị mất mát vì người sáng lập đã ngừng cổ vũ mọi người. Và người lập trình viên chuẩn bị ra đi.

Với vai trò là người sáng lập, việc bạn phải làm hằng ngày là cổ vũ và truyền cảm hứng để mọi người thấy hứng khởi về công việc mình đang làm và háo hức với những mục tiêu ở phía trước. Dừng cổ vũ đồng nghĩa với việc bạn sẽ mất đi những nhân viên tốt.

Mọi người ở lại với công ty không chỉ bởi cổ phiếu và mức lương hậu hĩnh. Họ ở lại với công ty là vì họ tin tưởng vào tương lai và các cơ hội ở phía trước. Cả hai điều đó cần được người sách lập nhìn nhận ra, tô điểm và sự dụng để khuyến khích mọi người.

Một điểm rất quan trọng là “người giỏi sẽ rời công ty khi họ không còn thấy hứng thú”.

Những người sáng lập thường quên mất điều này sau khoảng một năm đầu tiên. Sự mới mẻ ban đầu đã dần trở nên quen thuộc và công ty thậm chí đã chuyển từ “startup” thành “small business”. Mọi người hứng thú khi tham gia startup chứ ít khi hứng thú khi tham gia “small company”.

Tổng kết:

Sự duy trì tốt nhất mà người sáng lập có thể tạo được chính là sự hứng khởi, hăng hái. Khi mọi người được truyền cảm hứng và cảm thấy hứng khởi, họ sẽ nghĩ tới việc chinh phục thế giới thay vì sửa sang bản sơ yếu lí lịch (để đi xin việc chỗ khác :))

Nên ăn mừng mọi chiến thắng mà công ty đạt được: thêm một khách hàng mới, một chức năng mới của sản phẩm được hoàn thiện, một release mới …

Đừng coi sự cổ vũ là một nhiệm vụ có thể chỉ định. Nó bắt đầu từ bạn với tư cách là người sáng lập và không thể thay thế được bởi bất kỳ người cấp dưới nào.

Technorati Profile