2011/04/30

6÷ 2 (1+2)=?

Suy nghĩ như một người đi học/dạy toán lớp 3,quy tắc được dạy ở VN:

1. "Nhân chia trước, cộng trừ sau".
2. Nếu trong một biểu thức có cả dấu nhân và chia thì dấu bên trái được ưu tiên thực hiện trước.
# Không rõ quy tắc 2 này có được ghi trong sách

Nghĩa là quy tắc này giống với các quy tắc chuẩn:

3. Nhân chia trước, cộng trừ sau:
http://en.wikipedia.org/wiki/Operand#Order_of_operations

4. Ngoặc > lũy thừa, căn > nhân, chia > cộng trừ
http://en.wikipedia.org/wiki/Order_of_operations#The_standard_order_of_operations

5. Mở rộng của quy tắc 1. và quy tắc 2. được sử dụng trong tính toán vũ trụ
http://idlastro.gsfc.nasa.gov/idl_html_help/Operator_Precedence.html#wp1033942

; Operators of equal priority are evaluated from left to right.
; Only one array operation is required.
B = 16./MAX(A) * A

6. Với lập trình viên:
A useful rule of thumb is, "when in doubt, parenthesize"

cf. http://vietnamnet.vn/vn/giao-duc/18629/cau-toan-lop-3-gay-tranh-cai-tren-facebook.html

2011/04/29

Lessig: Copyright is immoral

Lessig, one of the leaders on the open source movement, claims that
whereas copyright focuses on protecting artists on making money, and that
scientists don’t use similar incentives[1].

Nguyen Vu Hung,

[1] http://motherboard.tv/2011/4/25/lessig-copyright-isn-t-just-hurting-creativity-it-s-killing-science-video--2

2011/04/27

Thi truong PC security software o Vietnam

Về thị trường PC security ở Việt Nam, ngoài BKIS còn có CMC Security (mới lên VTV2 tối qua)
rồi BitDefender, Kaspersky...

ClamAV sẽ có thị phần rất nhanh nếu marketing theo hướng FOSS đúng đắn.
Em hoàn toàn tự tin và lạc quan như vậy.

2011/04/22

Linux Power Saving

Hello all,

Is any any tools out there that help Linux saves the powers.

Consider the "Run mode": It will save energy if we can control
the Linux system so that it use only the amount of resource (CPU, RAM,
disk IO, network IO)
that it needs to.

Usually, Linux doesn't need to run on its 100% horse power.
It is true for both servers and PCs.

Ideas: Power Management in Linux-Based Systems
http://www.linuxjournal.com/article/6699

BR,

Nguyen Vu Hung


----
From: Huan Truong

Things that can be put into consideration:

- Spin down the hard drives after, say, 10 minutes idling. hdparm can do this.

- Undervolt your CPU, have a look at www.linux-phc.org, it isn't
terribly hard. Your CPU will run cooler.

- Undervolt your RAM and such (in your BIOS/uEFI setting)

- Plug your USB powered devices (USB mice and flash drives and dongles
and such) to your monitor's USB hub. When you turn off the monitor,
you turn them all off -- however this largely depends on how your
monitor manufacturer implements the USB hub on the monitor. Mine (Dell
2209WA) the hub turns off when the monitor goes to standby, which is
set to 10 minutes after I leave my desk.

- AC97 chips has a low-power mode, but normally isn't turned on by
default, try compiling a kernel with AC97 powersave mode timeout = 2
secs for example.

- Of course powertop will have some very good advices. Put them in rc.local.

- Buy CPUs with high power efficiency because not all CPUs are made
equal. Buy ones with low TDPs. For example, the SU line of Intel
mobile processors consumes only 10W and the T line of the intel I*2
desktop processor consumes only half what a non-T one consumes... I'm
having this one for my desktop
http://ark.intel.com/Product.aspx?id=53423 -- it consumes 35W under
load -- notice that a normal i3 CPU consumes 65W under load.

- If you don't gaem, use Intel graphics, don't use a fancy NVidia
card. Less headache too.

- I don't believe that using XFCE or xmonad or (insert your favorite
DE here) will save power, unless someone can prove me the otherwise.

- Turn on wake-on-LAN and let your computer sleep when idle, only wake
it up when needed.

- I've heard that USB HID devices uses pooling and PS2 uses
interrupts. If that's true, logically it isn't a terribly good idea to
plug your mouse and/or kb into USB ports as when you use USB the CPU
has to wake up a hundreds of times sampling the mouse and keyboard
input even when your devices are idle. I'm unsure about this, take it
with a grain of salt.

- Lastly if you're desperate to see how little power can you get, use
ARM http://www.pandaboard.org/ -- the whole thing consumes somewhere
like 8W under load. If you're *really* desperate, then, investigate
and invest your money into microcontrollers:
http://kennethfinnegan.blogspot.com/2010/09/msp430-low-power-experiment.html
-- If you dive into it, this micro runs at 16Mhz for something like
two miliamps and trust me there are plenty of room for improvements...
What can you do with it is another problem, but definitely your mad
skillz in C are not gonna be wasted. Heck, my watch has been running
for months: http://hackaday.com/2011/02/27/google-two-factor-authentication-in-a-wristwatch/

Good luck..................

http://lists.hanoilug.org/pipermail/hanoilug/2011-April/008344.html
http://lists.hanoilug.org/pipermail/hanoilug/2011-April/008340.html
http://lists.hanoilug.org/pipermail/hanoilug/2011-April/008343.html

2011/04/19

#CodingDojo Ha Noi #2

the first edition of the CodingDojo in Ha Noi was a great success.
More than 10 attendees.
We didn't success to solve completely our first problem: TennisKata,
but i guess most of the people really enjoy the venue.

A second edition of the CodingDojo will take place at the same place
(CNF) next Saturday from 2pm to 4pm (April 23th). As the first session
is already done, we will start by a retrospective
of the previous session and will choose another kata. If you want to
prepare something for the next session, you are welcome (any language
can be used) !
We will discuss at the beginning of the session and choose one kata.
If you prepare something and we select something else to do, this is
not lost, we will do it in a future sessions.
There some ideas of exercices suitable for a Kata here: http://codingdojo.org/

I put the pictures of Coding Dojo here:
http://www.flickr.com/photos/sergestinckwich/sets/72157626521205638/
The Python code of the first randori session is available on github:
https://github.com/HaNoiCodingDojo/kata1 with an MIT licence.

2011/04/16

Hackfest in Hanoi (brainstorming)

Take a look at:
http://pockey.dao2.com/2011/03/bangalore-hackfest-day-1/
This a a hackfest (hacking festival) closed to gnome 3, by hackers and for hackers.

A workshop on FOSS development and related issuses on FOSS should be better
in Vietnam because FOSS community in Vietnam is too small.

In short, anything innovation and "new" fits the hackfest.

Do you have anything new to share?

Some topics I am think of

- Coding Dojo (Duong and Serge)
- a11y hacking (Duong and arky)
- (howto and hack) gnome shell hacking (xml and css) (someone at asianux)
- SugarCRM, Zimbra hacking (Truong Anh Tuan)
- (How to) Creating a module for an ERP software (someone at VIAMI. Note: the ERP can be closed source)
- you?
- Leadership and management for FOSS communities in Vietnam (myself)
- Ruby on rails MVC model (hack and howto)
- Ruby

Depends on the number of the topics, we can have more than one sessions.

Date: June or July
Location: Hanoi (and Saigon?)

2011/04/14

#CodingDojo Ha Noi

Dear all,

this is the announcement for the first #CodingDojo in Ha Noi !

#CodingDojo session was first invented in Paris in 2004 by the XP
(eXtreme Programming) community. The aim of these sessions is to
enhance the coding skills of attendees by doing some very small
exercices in a funny atmosphere. This is like when you want to
practice a sport like Judo, you need to practice some basic exercices
with some judo masters before doing serious business like
competitions. There is usually two styles of exercices : 1) Kata
prepared by someone before the session and executed in front of the
public or Randori, a more exploraty form of a Kata where the whole
group participates.

More information are available here: http://www.codingdojo.org/

Ha Noi #CodingDojo Organizers: Dương "Yang" Hà Nguyễn + Serge Stinckwich
Location: CNF Hanoi, ngõ 42 Tạ Quang Bửu, quận Hai Bà Trưng, Hà nội
Schedule: Saturday, April 16th 2011 2pm => 4pm

Program of the first session (we will follow the same format than the
#CodingDojo from Paris):

* 5 min: Select the frequency and the date of the next #CodingDojo
* 20-30 min: Presentation of what is a #CodingDojo (Serge) - For the
next session, this time slot will be used to do a retrospective of the
previous session (what went well, what was interesting, what was frustrating).
* 10 min: Decide on a topic for this session
* 40 min: code (Kata or Randori)
* 5-10 min: Mid-session break to discuss how things are going
* 40 min: code (Kata or Randori)

The sessions will be completely language agnostic. The programming
languages chosen at each session will depend of the attendees.
At the moment, the organizers know about (in no particular order) : 1)
Python 2) Ruby 3) Smalltalk 4) Common/Lisp 5) Clojure 6) Java

More exotic programming languages like Haskell, Brainfuck, Scala, Lua,
... are welcome. This is not really a big deal if not all the people
don't know the programming language of the session, but you may notice
that a #CodingDojo is not a good place to learn a new language. The
goal is to learn how to better program not to do some proselytism
(mine language is better than yours). We need people who knows about
these languages in order to conduct sessions. What is also particulary
important if you want to organize a Kata or Randori, is to know how to
write unit tests with these languages.

More information about the philosophy behind a #CodingDojo are available here:
http://www.slideshare.net/ntoll/organise-a-code-dojo
and here:
http://www.slideshare.net/caikesouza/coding-dojo-2879242

Regards,

PS : As this is the first session and we lacking some experiences
about this kind of event, we want to know before saturday the people
who want to come. There is no prerequisite regarding programming
languages or knowledge, but you need to sufficiently proficient in
programming and knows a little bit about object-oriented programming.
We expected than more elaborate sessions will be organized in the
future and we will discuss about the frequency of the #CodingDojo
during the first session.

--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/

2011/04/09

Gnome 3 Launching Party tai Hanoi da to chuc thanh cong




Ngày 04/06/2011 buổi ra mắt Gnome 3 đã được tổ chức thành công và ấm cúng với sự tham gia của hơn 30 thành viên trong cộng đồng FOSS (Free Open Source Software – Phần mềm mã nguồn mở).


Gnome 3 Launching Party cũng là buổi gặp mặt đông đủ nhất của các thành viên trong cộng đồng FOSS kể từ đầu năm tới giờ. Tại đây, các thành viên tham gia cùng trải nghiệm Gnome 3 trên Fedora, trên Ubuntu, trên Asianux. Buổi gặp mặt cũng là dịp để các thành viên HanoiLUG nói riêng và cồng đồng IT tại Hà Nội nói chung trao đổi quan điểm về Gnome về Unity, trình bày quan điểm cá nhân, cảm nhận về Gnome 3. Bên cạnh đó, Ban tổ chức cũng giới thiệu về dự án A11Y - một dự án giúp người khiếm thị sử dụng máy tính. Buổi giới thiệu đã diễn ra vui vẻ và sôi nổi nhất là phần đấu giá áo T-shirt của Gnome3 để hỗ trợ một phần chi phí cho Ban tổ chức.

Phát biểu sau gặp mặt, ông Trương Anh Tuấn-Giám đốc IWay đã nói ¨Những buổi gặp mặt, ra mắt cập nhật phiên bản mới các phần mềm, ứng dụng như thế này rất hữu ích. Thông qua đây các thành viên FOSS có thể trao đổi, bày tỏ quan điểm và chia sẻ kinh nghiệm, thắt chặt quan hệ...Cá nhân tôi cho rằn cộng đồng FOSS Hà nội cũng như Việt Nam thực sự rất cần những buổi trao đổi như thế này nhiều hơn nữa trong tương lai.¨


Để xem ảnh vui lòng xem tại đây: https://picasaweb.google.com/100601921172123900723/Gnome3LaunchingParty110406#

http://www.flickr.com/photos/vuhung/sets/72157626336334033/

2011/04/08

Gnome: Histroy and changes

GNOME (GNU Network Object Model Environment), là một tập hợp các công cụ và môi trường màn hình nền có thể chạy trên hầu hết các hệ điều hành phổ biến hiện nay như Linux, BSD, Mac OS X, Solaris cũng như Windows.

Đây là một dự án phần mềm mã mở, có liên hệ mật thiết và chia sẻ chung triết lý về phần mềm mã mở với dự án GNU (GNU is Not Unix), nó là một bộ phận cấu thành không thể thiếu của hệ điều hành mở GNU/Linux từ những ngày đầu phát triển.

Phiên bản GNOME 1.0 ra đời năm 1999, được phát triển bởi Miguel de Icaza và Federico Mena với những thành phần cơ bản như: trình quản lý tệp, trình quản lý cửa sổ được xây dựng tự bộ thư viện GTK+ có giấy phép LGPL đảm bảo tính tự do của nó như là một đối trọng với Qt và KDE ở thời điểm năm 1999.

GNOME 2.0 tập trung vào tính dễ sử dụng của môi trường desktop. Ngôn ngữ lập trình đơn giản, thân thiện giúp cộng đồng phát triển dễ dàng xây dựng các ứng dụng của mình trên nền GTK+.

Thay đổi lớn nhất trong GNOME 3 là “Vỏ GNOME”. Đây là giao diện người dùng cốt lõi của GNOME 3, là kết quả của ba năm hun đúc ý tưởng về việc cải tạo giao diện trong 2008 User Experience Hackfest và thời gian thực thi các phát triển đó bởi William Jon McCann (Redhat).

Nói ngắn gọn, GNOME 3 sang trọng hơn so với các phiên bản trước và đẹp xứng tầm, sáng ngang với Mac OS X Leopard hay Windows 7 ngay cả khi chưa sử dụng compiz (một trình quản lý cửa sổ phức hợp).

Vào thời điểm ý tưởng “cải cách” GNOME 2 được hình thành, giao diện của GNOME còn khá sơ khai và khá giống Windows 98 trong khi Microsoft đã cho ra đời Windows Vista và Apple đã trình làng Mac OS X Leopard. Thay thế, đuổi kịp giao diện “bắt mắt” của hai hệ điều này chỉ là một trong những mục tiêu của GNOME 3. Một trong những triết lý của GNOME 3 là KISS (Keep it simple, stupid. Tạm dịch: Càng đơn giản càng tốt). Đây cũng là triết lý chung của các hệ điều hành họ Unix giúp cho nó luôn “sạch”, nhỏ ngọn, ổn định cùng thời sử dụng và không bị phình to (bloated) như một số hệ điều hành mã đóng khác.

Với GNOME 3 Shell, hệ thống sẽ có giao diện thoáng hơn,đơn giản hơn, giúp người dùng tập trung vào công việc của mình với nhiều phiên làm việc dễ dàng tương tác với nhau.

Các phiên bản của Windows cho phép nhóm các chương trình đang đang chạy cùng loại vào một khung trong thanh tác vụ. Việc di chuyển giữa các chương trình này mất khá nhiều thao tác chuột (hay bàn phím) làm giảm hiệu năng làm việc. Gnome 3 giải quyết vấn đề này bằng việc cho phép tạo nhiều phiên làm việc như “công việc”, “lướt web”, “giải trí”. Người dùng sẽ đặt các chương trình như bảng tính, soạn thảo văn bản vào phiên làm việc “công việc” và trình nghe nhạc, xem phim, youtube vào phiên làm việc “giải trí”. Không chỉ dừng lại ở đó, Gnome 3 còn cho phép di chuyển các chương trình từ phiên làm việc này sang phiên làm việc khác chỉ bằng một thao tác chuột đơn giản.

Trong GNOME 3, “Activities” (họat động) và “System status erea” (khu vực trạng thái của hệ thống) giúp người dùng theo dõi họat động của hệ thống dễ dàng hơn; “Dash” chứa danh sách những phần mềm đang chạy; khả năng kéo thả các cửa sổ giữa các phiên làm việc; Tổ hợp phím
Alt-Tab quản lý các chương trình đang chạy dễ hơn; Biểu tượng cũng như các phần tử của giao diện đồ họa đều được thiết kế lại so với GNOME 2, thích hợp hơn với các thiết bị máy tính bảng và điện thoại di động.

Thông tin về GNOME 3 có thể tham khảo tại: http://www.GNOME3.org/
Nhóm Việt hóa GNOME họat động tại: http://du-an-most.hanoilug.org/MostWiki

Thông tin về GNOME
Trang chủ: http://www.GNOME3.org/
Thử nghiệm: http://www.GNOME3.org/tryit.html
Đôi điều về thiết kế: http://live.GNOME.org/ThreePointZero/DesignHistory

Nguyễn Vũ Hưng
Mobile: 0167-252-5834
Email: vuhung16plus@gmail.com

Gnome 3 Launch Party in Hanoi

Chào các bác,

Hanoi (và cả Saigon) sẽ chào mừng sự ra đời của Gnome 3 vào ngày 6/4/2011 tới.
cf. https://docs.google.com/document/pub?id=1boxho2kNecJ14elzO8VKarcPapxqDmFQnWj9SU5O5io

Cụ thể xin xem ở dưới:

Chương trình chào mừng Gnome 3 ra đời

Địa điểm: Lollybooks Café, Số 18, ngõ 131, Thái Hà, Hà Nội

Thời gian: 18h30 mùng 6 tháng 4 năm 2011

Bản đồ: http://www.lollybooks.com/wp-content/uploads/2010/12/mapthaiha.png

Chương trình

18:30 – 18:35 Chào mừng Gnome 3
18:35 – 18:40 Giới thiệu Gnome 3 trên Fedora
18:40 – 18:45 Giới thiệu Gnome 3 trên Asianux
18:50 – 18:55 Giới thiệu Gnome 3 trên Ubuntu
18:55 – 22:00 Trao đổi tự do

Tham khảo: http://live.gnome.org/ThreePointZero/LaunchParty

Liên hệ:

Nguyễn Vũ Hưng: vuhung16plus (at) gmail (dot) com / Mobile: 0167 2525 834
Đặng Thanh Thủy: dangthuy438x (at) gmail (dot) com / Mobile: 090 6655 624