Hoang Tran's Blog

August 6, 2009

Dạy con (1)

Filed under: Thoughts — Hoang Tran @ 4:17 pm

Con mình thích thành cái gì thì mình dạy nó cái đó thôi; thích đi nuôi bò lấy sữa thì cho đi chăn bò; thích thành thợ mộc thì làm thợ mộc; thích thành phi công thì thành phi công; thích làm hoạ sỹ thì cho làm hoạ sỹ, tốt nhất là đừng để nó làm kỹ điện như anh. Chỉ cần dậy nó môn nào nó cần, còn lại dạy nó hưởng thụ rồi văn học nghệ thuật cho nó sướng. Đến mùa hè, anh sẽ đưa chúng nó sang hẳn Vancouver leo núi, câu cá, chèo xuồng vượt thác. Mùa đông thì đi trượt tuyết, đi xem người Eskimo, đi xem vùng Yukon… Nếu chúng nó máu thì đi hẳn tàu phá băng vào Bắc cực xem gấu trắng với cá voi. Lớn lên một tí, cho theo bố mẹ đi du lịch châu Phi, Trung Đông. Thế có phải là hay không? Sống thế mới là sống chứ. Con mình nhất định phải hơn mình… Chúng nó phải…

Đoạn trên trích từ một truyện ngắn trong tập truyện ngắn “Nước Mỹ” của Phan Việt đọc nghe rất sướng. Nhưng đến câu cuối mình lại cảm thấy cái chất Việt vẫn quanh quẩn????

August 3, 2009

.astylerc

Filed under: Resources & Tools — Hoang Tran @ 2:52 pm

Astyle là một tool rất tốt để format source code. Mỗi khi có source của cái gì đó là mình cứ format source trước đã rồi đọc gì thì đọc. Có thể dùng astyle làm hook pre-commit cho các source version control. Đây là .astylerc đặt ở home directory ;-)

# Author     : Hoang Tran <tran.hoang@gmail.com>
# Version    : 1.1
# Last Change: Aug 03, 2009

# Predefined style option -A3
–style=k&r

# Indent using 4 spaces per indent. Don’t use tab -s4
–indent=spaces=4

# Break brackets from namespace, class and function definitions,
# but attach brackets to statements within a function -l
–brackets=linux

# Indent ’switch’ blocks so that the ‘case X:’ statement are
# indented in the switch block. -S
–indent-switches

# Indent multi-line preprocessor definitions ending with a backslash -w
–indent-preprocessor

# Pad empty lines around header blocks (eg. ‘if’, ‘while’ …) -f
–break-blocks

# Delete empty lines within a function or method. -x
–delete-empty-lines

# Insert space padding around operators. -p
–pad-oper

# Remove extra space padding around parenthesis on the inside and outside -U
–unpad-paren

# Converts tabs into spaces in the non-indentation part of the line -c
–convert-tabs

# Do not retain a backup of the origional file
–suffix=none

Blog at WordPress.com.