เรียกว่าถอยหลังลงคลองได้ไหม

2501 ~ เผด็จการพ่อขุนอุปถัมภ์
2527 ~ เผด็จการเด็กอมมือ

วิธีการแก้ปัญหาของทั้งสองคนเป็นวิธีการที่ไม่ได้แก้สาเหตุของปัญหาเลย
แต่ถึงอย่างไร การแก้ปัญหาของจอมพลสฤษดิ์ ก็เป็นอะไรที่ ใครรู้ใครทราบก็ยังเป็นที่ชื่นชอบลึกๆในจิตใจได้บ้าง ถึงแม้ว่ามันจะไม่ได้ช่วยอะไรมากก็เหอะ

ส่วน ของปัจจุบัน บอกว่าช่วยไม่ได้ ยังเจ็บน้อยกว่า (วิธีการพูดอย่างอื่นก็มีเยอะนะ ทำไมไม่เลือกพูดอย่างอื่น)

แต่ถ้าสมัยนั้นมีสิ่งที่เรียกว่าอินเตอร์เน็ท มีการติดต่อสื่อสารที่รวดเร็วเหมือนสมัยนี้ ก็อาจจะมีภาพอย่างนี้ให้เห็น (แต่ผมก็ยังเชื่อว่า “ไม่” เพราะลักษณะนิสัยนั้นแตกต่างกันอย่างสิ้นเชิง)

PHP Code Standard

PSR-1 (Basic Coding Standard)

  • PHP Tags — must use <?php ?>
  • Character Encoding — only UTF-8 without BOM
  • Side Effects — php should do one thing declaration or work
  • Namespace and Class Names — follow PSR-0, PSR-4
  • Class Constants, Properties, and Methods
    • Constants — upper case with underscore separators
    • Properties — recommended lower case with underscore separators
    • Methods — camel case with lower case in first character

PSR-2 (Coding Style Guide)

  • Overview
    • must follow PSR-1
    • use indent with 4 spaces not tabs
    • line length should be 80 – 120 characters
    • should be one blank line after namespace declaration
    • should be one blank line after use declaration
    • use declearation must go after namespace declearation
    • opening/closing braces for classes, must go on next line
    • opening/closing braces for method, must go on next line
    • visibilities (public, private, protected) must declear on every properties and methods
    • abstract and final must declared before the visibilities
    • static must decleared after visibilities
    • control structures (if, else, while, for, foreach, …) must have one space after them
    • opening braces for control structures must go on the same line
    • opening parentheses for control structures must not have a space after them
    • closing parentheses for control structures must not have a space before them
  • General
    • Iines
      • must not be trailing whitespace at the end of non-blank lines
      • blank line may be added to improve readability
      • there must not be more than one statement per line
    • Indenting — must use 4 spaces
    • Keywords and True/False/Null — lower case
    • Classes, Properties, and Methods
      • Extends and Implements
        • extends and implements must be decleared on the same line
        • if we have to implements so many imterfaces, should declared in multiple lines with one interface per line
      • Properties
        • not use var for declared properties
        • one property declared per line
        • propertied should not be prefix with a single underscore
      • Methods
        • method should not be prefix with a single underscore
      • Method Arguments
        • must not be a space before each comma
        • must be one space after comma
        • argument with default value must go at the end of the argument list
        • if we there alot of argument list, it can split across the line with one argument per line, the closing parenthesis and opening brag should be placed together on their own line

Upgrade VIM on CentOS

Install development tools required for compiling from source

yum groupinstall 'Development tools'
yum install ncurses ncurses-devel

Next, get the latest version of vim, unpack it and move to new directory

cd /usr/local/src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -xjf vim-7.4.tar.bz2
cd vim74

Config and build!

./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp --enable-luainterp
make & make install

Check version

vim --veserion

SOLID

S = Single Responsibility
A class should have one responsibility.

O = Open/Closed
A class should be open for extension but closed for modification.

L = Liskov Substitution
Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.

I = Interface Segregation
Many client-specific interfaces are better than on general-purpose interface.

D = Dependency Inversion
One should depend upon abstractions rather than concrete classes.

10 Things You Need To Drop To Stay Motivated

ที่มา: http://www.lifehack.org/articles/communication/10-things-you-need-drop-stay-motivated.html

1. You will need to drop the sense of entitlement
ในที่นี้หมายถึง อย่ารีรอให้ใครมาช่วยเหลือ ถ้าเรามีเป้าหมาย เราก็ต้องเริ่มด้วยตัวเรา ทำด้วยตัวเรา เราถึงจะสามารถบรรลุเป้าหมายนั้นได้

2. You will need to drop stress
อย่าไปเครียด อย่าหมกมุ่นอยู่กับงานมากเกินไป ชิวิตต้องพักบ้างไรบ้าง คอมพิวเตอร์ยังพังเลยถ้าทำงานหนักๆ แล้วร่างกายคนเราล่ะ ถ้าทำงานไม่พักจะไหวเหรอ ออกไปพบปะผู้คน ออกกำลังกาย เลี้ยงสัตว์ ฯลฯ

3. You will need to drop negativity
พยายามมองโลกในแง่ดี การมองโลกในแง่ร้ายจะทำให้คุณยิ่งอยู่ห่างจากสังคม นั่นหมายถึงอยู่ห่างความช่วยเหลือด้วย ความสำคัญคือเราต้องพยายามอยู่กับสังคมและผู้คนที่อยากช่วยเหลือเรา แต่เราต้องพยายามอยู่ห่างคนที่ไม่ได้ใส่ใจกับความฝันของเรา

4. You will need to drop comparisons
เลิกเปรียบเทียบตยเองกับผู้อื่น(หรือผู้อื่นกับผู้อื่น) ได้แล้ว การเปรียบเทียบในลักษณะนี้จะทำให้คุณมีนิสัยขี้อิจฉาริษยา

5. You will need to drop time management issues

“Don’t watch the clock; do what it does. Keep going.” – Sam Levenson

บางครั้งก็ลืมเรื่องเวลาไปบ้าง ทำทุกอย่างที่สามารถทำได้

6. You will need to drop impatience
จะรีบร้อนไปใย คนที่เร่งรีบ โดยปกติคือคนที่ไม่สามารถทำงานได้ตรงตามเป้าหมายที่เขาวางไว้(นั่นเป็นเหตุที่เขาต้องเร่งรีบ) จงใช้พลังอย่างคุ้มค่า อย่าเร่งรีบจนเกินไป

7. You will need to drop the lazy attitude

“The secret of getting ahead is getting started.” – Mark Twain

อย่าขี้เกียจ

8. You will need to drop the ungrateful mindset

9. You will need to drop the serious mentality
อย่าจริงจังกับชีวิตมากเกินไป หยุดพักบ้าง อยู่กับครอบครัวบ้าง เป้าหมายที่ยิ่งใหญ่จะสำเร็จได้ถ้าเราทำเป้าหมายให้เล็กๆ หลายๆเป้าหมายและทำให้มันสำเร็จไปทีละอย่าง

10. You will need to drop the excuses
เลิกโยนความผิดให้คนอื่น เลิกหาเหตุผลมากล่าวอ้าง

Vocab:
entitlement: the fact of having a right to something
impatient: having or showing a tendency to be quickly irritated or provoked
ungrateful: not feeling or showing gratitude
excuses: seek to lessen the blame attaching to (a fault or offence); try to justify