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.}

This entry is a note to myself so that I won't repeat the same mistake again since I have done so at least twice already.

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.

Friday, September 03, 2010

สิ่งประดิษฐ์น่าสนใจ: ที่ดักหอยเชอรี่

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

หนังสือแนะนำ (อีกแล้ว): i (ไอ)

หนังสือชื่อ "i" ครับ เป็นหนังสือเกี่ยวกับประโยคต่างๆในภาษาอังกฤษที่เริ่มต้นด้วยตัว "i" ครับ เขียนโดยคุณภูมิชาย บุญสินสุข


หน้าปกเขียนไว้ว่า "อยากพูดภาษาอังกฤษ เริ่มต้นตรงไหนดี ขอแนะนำให้เริ่มตรงนี้ ตัวไอ, ของไอ" ผมเห็นก็เลยหยิบขึ้นมาดู ปรากฎว่าเป็นหนังสือที่อ่านสนุกมาก

ยกตัวอย่างสักประโยค:


ตัวอย่างประโยคที่มีในเล่ม

ราคา 195 บาทเท่านั้นครับ