Things that I find interesting, mostly about nature, science, mathematics, programming, and Thailand's fight against corruption.
Tuesday, December 28, 2010
Monday, December 27, 2010
ภาพต้นไม้และไลเคนจากเขาใหญ่ 27 ธันวาคม 2553

ผมพึ่งใส่ภาพต้นไม้และไลเคนไว้บน Facebook ครับ ลองเข้าไปดูนะครับ เผื่อจะชอบ
ไลเคนเป็นสิ่งมีชีวิตที่เกิดจากความร่วมมือของสาหร่ายและราครับ มีหลากหลายชนิด แต่ละชนิดก็จะมีลักษณะและสีต่างๆกันไป พบมากตามผิวต้นไม้และหินในบริเวณที่มีมลพิษน้อย รายละเอียดเพิ่มเติมอยู่ที่นี่ครับ
เขาใหญ่มีต้นไม้อุดมสมบูรณ์มาก ในแต่ละฤดูลักษณะของต้นไม้ก็แตกต่างกันไป ไลเคนก็ดูแตกต่างกันด้วยครับ ผมไม่แน่ใจว่าเป็นประเภทเดิมแต่เปลี่ยนสี หรือแต่ละฤดูเหมาะกับไลเคนต่างชนิดกัน หรือผมตาถั่วเอง ไปคราวนี้อากาศเย็นและแห้ง ไลเคนดูแห้งๆสีไม่เหมือนหน้าฝน
วันนี้ผมเห็นแต่คนรีบเดินทางไปถ่ายรูปวิวและน้ำตก เลยไม่ได้สนใจสิ่งมหัศจรรย์ตามทางเดิน ถ้ามีโอกาสไปดู ลองค่อยๆดู ไม่ต้องรีบเดินนะครับ ผมว่าสวยและแปลกดี
Wednesday, December 22, 2010
TestDisk & PhotoRec: Rescuing Deleted Files On Windows, Linux, Mac OS X, And Other OS's
TestDisk is a free (open source) software that let you recovered deleted partitions and files on most major operating systems easily. I've used it successfully on Windows, Linux, and Mac OS X on various occasions. So, if you unintentionally delete your files you might want to try it.
For deleted files on digital camera memory, TestDisk has a companion program called PhotoRec that recovers pictures and videos from the various media such hard disks, DVD, CD, memory cards, and thumb drives. Here's a step-by-step guide on how to use it.
Monday, December 20, 2010
Finding Links You Shared On Facebook
I've shared a lot of links on Facebook and occasionally people would ask me about an old link that I've already forgotten. I don't know of a way to easily find those links but last week someone introduced me to trunk.ly, a search engine for the links I shared on Facebook and Twitter. It has done a good job of listing and searching the links that I've recently shared. So, if you want to keep track of the links you share, you might find trunk.ly useful.
By the way, my list of links at trunk.ly is at http://trunk.ly/psaipetc/ and all the links I've shared on Facebook is at http://www.facebook.com/posted.php?id=552001173
Thursday, December 16, 2010
Tuesday, December 14, 2010
Tuesday, December 07, 2010
Tuesday, November 30, 2010
Thursday, November 25, 2010
iFixit.com Is Cool
I've found iFixit to be a useful and entertaining site. It has many repair manuals and disassembly instructions for computers and electronic gadgets.
When I was a kid, I liked to take things apart to look inside and to have a resource like this telling me how to take things apart without breaking them is a godsend.
I've consulted the site when I poked around and upgraded two Macbooks. Before looking at the instructions, I was afraid I might break them but the instructions were very helpful and I could follow them quite easily.
Tuesday, November 23, 2010
Tuesday, November 16, 2010
Monday, November 15, 2010
Doing Math Homework With Wolfram Alpha
I wonder how many kids will do their homework by hand if they find out that Wolfram Alpha can do most math homework for them.
For example, going to http://www.wolframalpha.com and type "solve x^2 + y^2 = 1 and x y = 1/2" will give you this page with graphs, symbolic and numerical solutions:

For some problems, Wolfram Alpha can provide step-by-step solution. For example, finding the derivative of 1/cos(x^2) gives the solution and related information. When we click on the "Show steps" link, we get to see this:

Integrals can be done easily. Typing "integrate 1/(1+ 2x + 5x^2)" and clicking "Show steps" gives you this:

Wolfram Alpha can provide step-by-step solutions for many of high school and college math problems I tried; standard math homework that asks the students to "show their work" would be easily done by Wolfram Alpha.
Sunday, November 14, 2010
ปีนี้เป็นปีพิเศษ
ปีนี้ (พ.ศ. 2553 หรือ ค.ศ. 2010) เป็นปีพิเศษเพราะว่าเป็นปีที่อายุของผม ของภรรยา และของลูกทั้งสาม เป็นจำนวนเฉพาะหมดเลย และเราจะไม่มีโอกาสอย่างนี้อีกแม้ว่าเราจะมีชีวิตเป็นล้านปี :-)
ปล. อายุผมมากกว่าภรรยา 4 ปี ผมและภรรยามีลูกชายหนึ่งคนและลูกสาวสองคน (ไม่มีลูกแฝดเลย) อายุลูกแต่ละคนห่างกัน 2 ปี ลูกคนโตเกิดในปีที่ภรรยามีอายุ 30 ปี
ผมใช้การคำนวณแบบนี้ใน Mathematica เพิื่อดูว่าจะมีปีอย่างนี้อีกไหมในอีกประมาณสองล้านปี ที่อายุของทุกคนเป็นจำนวนเฉพาะ:
Select[Table[{k - 34, k - 32, k - 30, k, k + 4,
PrimeQ[k - 34] && PrimeQ[k - 32] && PrimeQ[k - 30] && PrimeQ[k] &&
PrimeQ[k + 4]}, {k, 0, 2000000
}], #[[6]] &]
คำตอบมีเพียง อายุ 3, 5, 7, 37, 41 เท่านั้น
เนื่องจากพวกเราคงมีอายุไม่เกินล้านปี ปีนี้จะเป็นปีเดียวที่พวกเราจะมีอายุเป็นจำนวนเฉพาะทุกคน :-)
ป.ป.ล. สิ่งที่ยากคือการที่จะหาจำนวนเฉพาะสามตัวเรียงกันอย่าง 3, 5, 7
ป.ป.ป.ล. 3, 5, 7 เป็นเลขชุด k, k+2, k+4 ชุดเดียวเท่านั้นที่ทุกตัวเป็นจำนวนเฉพาะ พิสูจน์ใน comment ครับ
Thursday, November 11, 2010
Wednesday, November 03, 2010
Monday, October 18, 2010
Two Interesting TED Talks
The first talk is by Mechai Viravaidya (มีชัย วีระไวทยะ) or Mr. Condom in Thailand. I think he prevented a lot of problems from happening in Thailand. Thailand could be in a much worse shape right now with 100 million people or so instead of about 67 million people. The talk has an interactive transcript on the right side so you can read the transcript and jump to the video corresponding to any particular place of the talk. (If you don't see the video, go here to see it.)
The second talk is by the inimitable Hans Rosling on global population growth and how the world will change in the next few decades. (If you don't see the video, go here to see it.)
Wednesday, October 13, 2010
เครื่องมือช่วยออกเสียงภาษาต่างๆ
สำหรับเด็กๆที่ไม่มีคุณครูหรือผู้ใหญ่ที่พูดภาษาอังกฤษ (หรือภาษาอื่นๆ) อย่างคล่องแคล่วและชัดเจนครับ สามารถเข้าไปที่เว็บนี้ และ กดให้คอมพิวเตอร์พูดให้ฟัง พูดได้ชัดเจนใกล้เคียงคนจริงๆ ใช้ได้ (ดีกว่าเด็กๆอ่านมั่วเองแน่นอน)
มีภาษาไทยด้วยครับ
Kelvin Water Dropper
I was looking around for science demonstration that I can do for kids and found this video of Professor Walter Lewin showing an apparatus called the Kelvin water dropper.
It works by positive feedback of electrical charge separation. Once one bucket is slightly more positive than the other bucket, it will get more and more positive, building up voltage between the buckets. When the voltage is high enough, electrical charges can travel through air, making mini lightnings (sparks.)
Professor Lewin also has an interesting interview here.
Friday, October 08, 2010
ธีธัชแบ่งครึ่งมุมครั้งแรก
เมื่อคืนธีธัชไปเจอชุดวงเวียนที่ผมซื้อเก็บไว้ เลยเอามาเล่น เขาเคยเห็นพี่ๆและคุณครูใช้อุปกรณ์พวกนี้ เลยลองเล่นบ้าง ผมเลยแสดงวิธีการแบ่งครึ่งมุมด้วยวงเวียนและไม้บรรทัดให้ดู แล้วธีธัชก็ทำตาม
การแบ่งครึ่งมุมด้วยวงเวียนและไม้บรรทัดที่ไม่มีตัวเลขนั้นทำได้ง่ายมาก มนุษย์ค้นพบวิธีเมื่อหลายพันปีมาแล้ว แต่การแบ่งมุมใดๆเป็นสามส่วนเท่าๆกันด้วยวงเวียนและไม้บรรทัดที่ไม่มีตัวเลขนั้นทำไม่ได้ครับ ถ้าจะทำต้องใช้อุปกรณ์เพิ่ม หรือประมาณเอา
Monday, October 04, 2010
A Few Papers To Keep In Mind When Talking About p-Values
The first paper's title is very provoking: Why Most Published Research Findings Are False.
The second one (The Cult of Statistical Significance) is instructive for anyone who thinks about quoting p-values.
The third one is by the late E.T. Jaynes, one of the overlooked great men of science: Confidence Intervals VS Bayesian Intervals.
Of course, everyone in research should be aware of Peter Norvig's Warning Signs in Experimental Design and Interpretation
Thursday, September 30, 2010
An Interesting Book: The Big Questions, By Steven E. Landsburg
This is a marvelous book. Steven Landsburg attempted to answer some interesting questions* with ideas from mathematics, economics, and physics! If you have a chance, you should take a look at it--it should provide you with new perspectives on many things, even if you disagree with it.
-----------
*Questions like "Why is there something instead of nothing?", "Where does mathematical knowledge come from?", "How to tell Right from Wrong?", "How not to be a jerk?", etc.
Wednesday, September 29, 2010
md5 On Mac OS X ~ md5sum On Linux
{Summary: Mac OS X's md5 command is analogous to Linux's md5sum. openssl can calculate many types of digests for you.}
I had to transfer quite a big file from Mac OS X to a Linux server using sFTP. The session was interrupted a few times and I wanted to make sure that the file on the server was not corrupted. So I went ahead to calculate the message digest (MD5) of the file on the server and the original file on the Mac.
I typed md5sum filename on Linux and got the message digest with no problem. When I typed md5sum filename on Mac, the computer said the command was not found. So I googled for "md5sum mac os x" and the links on the first page seemed to say that md5sum should already be on my Mac.
So I typed "man md5sum" and the computer said there was no manual for the command md5sum. I then tried "man md5" and got the manual for the command md5 that would calculate the MD5 message digest just as I needed and I went ahead and used the md5 command.
After I verified that the uploaded file was not corrupted, I realized that I had done these steps before but have forgotten about it all. I looked at the files on the Linux servers and I saw a few big files that I calculated the MD5 message digests when I uploaded them. So, I must have forgotten all about the steps that led me to use md5 before and hence this note.
BTW, MD5 message digest is no longer considered secure enough for serious work and SHA1 or better digests should be used instead. To find SHA1 on Linux, use sha1sum filename. To find SHA1 on a Mac, use "openssl sha1 filename" or "openssl dgst -sha1 filename". To find SHA256 on a Mac, use "openssl dgst -sha256 filename".
If you want to calculate message digests on multiple files inside directories, you can use md5deep which calculate MD5, SHA1, SHA256, and other digests for you.
Monday, September 27, 2010
ข่าวน่่าชื่นใจ
คุณด่วน โสสาร คนขับแท็กซี่เก็บเงินคืนให้ผู้โดยสารครับ ข่าวเต็มอยู่ที่นี่
“ทุกวันนี้ ต้องขับรถข้ามวัน ข้ามคืน เพื่อหาเงินไปจ่ายค่าเทอมให้ลูกชาย เพราะทางโรงเรียนบอกว่า ถ้าไม่จ่ายค่าเทอมให้ครบ ลูกชายไม่มีสิทธิ์สอบกลางภาค สำหรับเงินที่ผู้โดยสารทำหล่นอยู่บนรถ ไม่อยากนำไปใช้ เพราะรู้สึกไม่ดี ไม่สบายใจ ตนอยากใช้เงินที่หามาด้วยน้ำพักน้ำแรงของตัวเอง แม้จะพิการมือขวา แต่ก็ภูมิใจที่เป็นแบบอย่างให้ลูกชาย เพื่อที่เขาโตมาจะอย่างที่ดี”
Sunday, September 26, 2010
Remote Control Your Computers, Hassle Free
If you leave your home computer on and would like to control it from another location, maybe trying to copy some documents or downloading something from the internet, you might find TeamViewer useful.
You just install the software on your home computer and write down the ID number assigned to it by TeamViewer and make a note of the password to connect. Next time you need to connect to it from another place, you can use the TeamViewer application on another computer or go to the TeamViewer web site and connect to your home computer easily. No need to worry about IP addresses, ports, firewalls, VPN settings, etc.
TeamViewer is free for personal use and is available for Windows, Mac OS X, and Linux. For business use, the price is also very reasonable. For more info about what you can do with TeamViewer, check this page out.
Friday, September 24, 2010
I Like DealExtreme
I ordered some small rare-earth magnets from DealExtreme last year since it's hard to find them in Thailand. The magnets are strong and cheap and I'm very happy with them and have used them in quite a few scientific demonstrations for young kids.
Recently, I was looking for adapters that will connect my laptop to external screens/projectors so I need a Mini DisplayPort to DVI and a Mini DisplayPort to VGA. In Thailand, Apple sells them for 1,000 baht (about $33) each. I think the price is quite steep so I went to DealExtreme and search for them. It turns out that the adapters are about 300 baht (about $10) and they work fine with all the monitors I connect them to. Since it's so cheap, I bought a few and leave them at the office and at home too so I will be able to connect to an external monitor wherever I work.
Now I have my eyes on some digital microscopes that sell for $30-40. I already have one that I got from ThinkGeek.com but I paid over $300 for it two years ago. With this cheap price, I should get one or two for my students so that they can explore the microscopic world around them a bit.
DealExtreme offer free shipping worldwide and I usually receive my orders in 2-3 weeks.
Wednesday, September 22, 2010
Wednesday, September 15, 2010
Tuesday, September 07, 2010
Friday, September 03, 2010
สิ่งประดิษฐ์น่าสนใจ: ที่ดักหอยเชอรี่
หนังสือแนะนำ (อีกแล้ว): i (ไอ)
หนังสือชื่อ "i" ครับ เป็นหนังสือเกี่ยวกับประโยคต่างๆในภาษาอังกฤษที่เริ่มต้นด้วยตัว "i" ครับ เขียนโดยคุณภูมิชาย บุญสินสุข
หน้าปกเขียนไว้ว่า "อยากพูดภาษาอังกฤษ เริ่มต้นตรงไหนดี ขอแนะนำให้เริ่มตรงนี้ ตัวไอ, ของไอ" ผมเห็นก็เลยหยิบขึ้นมาดู ปรากฎว่าเป็นหนังสือที่อ่านสนุกมาก
ยกตัวอย่างสักประโยค:
ตัวอย่างประโยคที่มีในเล่ม
ราคา 195 บาทเท่านั้นครับ
Tuesday, August 31, 2010
ความน่าจะเป็นที่เซ็นทรัล
ย้ายไป http://witpoko.com/?p=169 แล้วครับ
Labels:
Aor,
math,
Math Geek,
Probability,
science class,
Tanya,
Tatia,
ภาษาไทย,
สอนเด็กๆ
Wednesday, August 25, 2010
Tuesday, August 17, 2010
Sunday, August 08, 2010
Chronology of Computation of π
π, the ratio between the circumference and the diameter of every circle on a flat plane, has been calculated to 5 trillion digits using a big personal computer in 2010.


Since π is irrational, the number of digits is infinite and we will calculate even more digits in the future. Beyond a few tens of digits or so, the exercise is done mostly to improve our computational techniques and to test hardware reliablity (and of course, some bragging rights.) Engineering calculations only need at most 16 digits to cover all conceivable projects on earth. All intergalactic calculations in the future should not require more than 64 digits or so.
Wikipedia has a chronology of the π computation and I've plotted the number of digits vs. year below. Note the log scale of the vertical axis.

There seem to be three phases of techniques/technologies involved in the computations of π throughout the history. The first part is from a few thousands years ago until 1400 A.D. or so where calculations were done mostly with geometric figures. The second part is from 1400 to 1900 A.D. where calculations were done manually using infinite series. The third part is after 1946 where electronic computers and fast-converging series were used. The three parts correspond to the three different slopes of the plot above.
After 1946, with electronic computers, the number of digits seems to grow approximately exponentially. This might reflect the exponential advance in computer speed since a small number of infinite series families were used in the computations. Here's the plot after 1946:

For more interesting info, check out Wikipedia's page on the history of π calculations.
Friday, August 06, 2010
ข่าวน่่าชื่นใจ
เด็กอายุ 18 ช่วยเกลี้ยกล่อมไม่ให้คนฆ่าตัวตาย ข่าวตัวเต็มอยู่ที่นี่ครับ
"ตอนนั้นมีคนเดินผ่านไปผ่านมา แต่ไม่มีใครกล้าทำอะไรเลย ส่วนเจ้าหน้าที่จราจรที่ทำงานอยู่ข้างล่าง ผมก็พยายามส่งสัญญาณเรียกแล้ว แต่พี่ตำรวจก็ไม่ได้ยิน ซึ่งผมเองจะร้องเรียกเสียงดังก็เกรงว่าพี่สาวข้างหน้าจะตกใจ และคิดสั้นกระโดดสะพานลอยลงมา ผมจึงคิดตัดสินใจลองพูดเกลี้ยกล่อมด้วยตัวเอง"
และอีกข่าว หญิงท้องแก่ช่วยตำรวจจับคนร้ายชิงรถ ข่าวตัวเต็มอยู่ที่นี่ครับ
"น.ส.ธิติมา กล่าวว่า วานนี้ (4 ส.ค.) ตนได้ขับรถผ่านมาประสบเหตุพอดี จึงได้จอดสอบถามเหตุการณ์จาก น.อ.หญิง อังคณา จากนั้นก็รีบโทร.แจ้ง 191 ก่อนประสานไปยังสถานีวิทยุ จส.100 ทันที จากนั้นตนก็เลี้ยวรถออกมาตามถนนเพชรเกษม และพบรถยนต์ฟอร์จูนเนอร์ของ น.อ.หญิง อังคณา ที่ถูกโจรกรรมมาขับมุ่งหน้าเข้าไปในถนนพุทธมณฑลสาย 1 ตนจึงตัดสินใจจึงขับตามไปห่างๆ เนื่องจากเกรงว่าคนร้ายจะมีปืน ซึ่งระหว่างทางก็ได้ให้ข้อมูลทางโทรศัพท์กับตำรวจ 191 โดยตลอด กระทั่งมาคลาดกันภายในถนนภายในซอยหมู่บ้านเศรษฐกิจ เพราะเส้นทางซับซ้อน จนมาทราบว่าคนร้ายถูกเจ้าหน้าที่ตำรวจจับกุมได้ในที่สุด"
Wednesday, August 04, 2010
Monkeynomics! :-D
This is super interesting. The talk suggests that our irrational decisions are hardwired in the brain, since monkeys (whose most recent common ancestors we share lived about 35 million years ago), make the same kind of irrational decisions.
(If you have trouble listening to English, there's a transcript on the linked page too.)
Wednesday, July 28, 2010
Create Your Own Wolfram|Alpha Widget
Now you can use Wolfram|Alpha's extensive knowledge to do many useful or silly stuff. Here's my first widget.
Tuesday, July 27, 2010
ข่าวน่่าชื่นใจ
อ่านแล้วชอบครับ เลยมาบันทึกไว้ ข่าวเต็มอยู่ที่นี่ครับ
... “ไม่ใช่ของเรา เราก็ไม่เอา!” เด็กชายวัย 11 ขวบ พูดอย่างเด็ดเดี่ยว “เราไม่มีเงินรักษาอาการป่วยของพ่อ เราก็ทุกข์ใจแทบตาย คนที่ทำเงินหายก็ทุกข์ใจแทบตายเช่นกัน” ดังนั้น เด็กชายอี้ว์ จึงตัดสินใจนำเงินไปให้ตำรวจ เพื่อสืบหาและคืนแก่เจ้าของโดยเร็ว...
...ขณะที่อี้ว์ ซื่อจวิน พ่อที่ตาใกล้บอด ชื่นชมลูกชายว่า “ลูกทำถูกต้องแล้ว ไม่เสียแรงเปล่าที่ได้อบรมสั่งสอนมา”...
Tuesday, July 20, 2010
Monday, July 19, 2010
โฆษณา "ขอโทษประเทศไทย"
เขาทำได้ดีนะครับ เลยเอามาลิงค์ไว้ที่นี่ ไม่รู้ว่าจะแบนทำไม พวกนี้ชอบกลัวเรื่องประเทืองปัญญาและความจริงเหลือเกิน
Wednesday, July 14, 2010
Links I Shared on Facebook
Since I found a button to easily share interesting links on Facebook, I have used it so much. You can see those links at http://www.facebook.com/posted.php?id=552001173
Tuesday, July 13, 2010
Tuesday, July 06, 2010
Subscribe to:
Posts (Atom)