Thursday, October 3, 2013

Printer Sharing Between XP and Windows 7

Printer sharing between Windows XP and Windows 7 is not so easy as it used to be between Windows XP computers. After spending two hours trying all kinds of solutions, I found using Windows XP as printer server and connect Windows 7 to it using a local LAN port is the easiest.


It is funny that such a supposedly straightforward job got so messed up by Microsoft. Below are the facts I found:

When sharing a printer on Windows XP, adding the network printer on Windows 7 using Add Network Printer button will not get the driver installed, causing a 0x0000007e error, due to 32bit/64bit driver file location issue. There are various fixes for it, including a registry hack, a persistent net use hack and even a Microsoft Hotfix. But none of them are guaranteed to work.

If you choose to share printer on Windows 7 and had hard time finding the sharing tab, go into Printer Manager and look for Sharing in Menu. I hate Microsoft moving things around.

Saturday, September 7, 2013

“毁三观”

在网络论坛中,特别是天涯上,经常看到有人感慨一些帖子的内容“毁三观”。在做出同样的感慨的同时,我不禁要问,这“毁三观”到底因何而起?意义何在
“毁三观”的全称是“摧毁我的世界观、价值观和人生观”。当在网上看到,或者在自己的生活中遇到一些人和事,发现这些人和事与自己的世界观、价值观和人生观不仅格格不入,而且让我开始怀疑自己的“三观”。我们的“三观”是我们精神生活的基础,是我们规范和管理自己日常行为的准则,当“三观”受到冲击甚至摧毁,我们必然进入全方面的迷惑和无所适从中。我们应该怎么办?是仅仅感叹“毁三观”的人和事太离谱,并把它们当作茶余饭后的谈资,最后置之脑后,还是审视“毁三观”的人和事,审视我们的“三观”,从而获得对世界、价值和人生更准确和更深层次的理解,进而修正自己的“三观”?很多人选择前者,我选择后者。
当“三观”受到威胁时,我们应该反思我们受威胁的“三观”是什么,以及什么因素造就了我们的这些“三观”。
首先是“洗脑机器”,即统治阶级控制下的教育体制和新闻媒体。它们在我们幼年和青少年时期,把大量的世界观、价值观和人生观以说教、鼓励和榜样等多种方式强制性地植入了我们的脑海中。我们在还没有形成自己的判断能力时,或我们在日常生活中毫无提防的情况下,这些观念已经潜移默化地进入了我们心中。赫胥黎的《美丽新世界(Brave New World)》中,儿童们的枕头下面有录音机反复轻声播放要灌输的观念。我们在现实生活中,虽然没有这种枕头录音机,但在枕头之外,灌输无所不在。
其次是亲朋的影响。父母、亲戚和朋友从小就告诉我们要做好人,要助人为乐,要舍己为人,要努力学习。也许这些说教和影响有说理的成分,但亲情和友谊是让这些观念进入我们心中最好的钥匙,我们在潜意识中把这些观念和亲情和友谊的温暖联系起来,等同起来。由亲朋得来的“三观”也是“洗脑机器”产生的“三观”的继续。如果说某个“三观”的目的是让统治阶级方便地奴役我们,那么当这个“三观”通过亲朋进入到我们心里时,我们的亲朋其实是助纣为虐了。为什么亲朋可能助纣为虐,因为他们轻信,或者说没有用他们自己的判断力来鉴别“三观”的真伪好坏,或者通过他们一厢情愿的推断,自以为是地为别人做了嫁衣裳。
第三就是自己一厢情愿的推断。在“洗脑机器”和亲朋影响产生的“三观”基础上,我们自然而然地构建起自己完整的“三观”体系,以全方位地指导自己的日常行为。基础的问题再加上自己推断的问题,我们经常在错误的路上越走越远。比如在“己所不欲,勿施于人”的基础上,我们说话和做事,时时处处要考虑自己本性想做的事情是否会对别人产生不好的影响,其结果是在可能保护了别人利益的同时,确确实实地压抑了自己,产生了心理疾患。

了解了“三观”的由来,下一步就要审视“三观”的具体内容,以谨慎严谨和灵活开放的态度发现和剔除被强加的和不合理的,修正不准确的,增补缺失和不完善的。这是一个细致和艰苦的工作,需要我们勇于深入自己的内心,挑战自己的心理底线,拓展思想宽度,以清晰的头脑和平和的态度,逐条逐句检查自己。在我们的人生中期,当学校教育早已远离我们,当在亲朋的关系上我们已起主导作用,当我们已经积累了足够的见识、经验和理智时,我们应该开展这项工作。这是必须和必要的,因为这是我们人生成长继童年和少年之后的第三个重要阶段。

Wednesday, July 17, 2013

Useful DNS info on Amazon VPC

Recently spent two days on researching a weird DNS issue on Amazon AWS VPC. Learned a few things that I want to write down.

1. On Amazon VPC, Amazon DHCP server does not register/update DNS on user’s DNS server. DNS Client service on individual VPC instances register/update DNS entries on DNS server. Amazon DHCP lease renewal interval is between 30 to 60 minutes. If a DNS entry (A Record) is missing, the next renewal will recreate the entry.

2. Without enabling Scavenging, DNS entries will stay forever. So if an entry is missing, it must have been deleted somehow.

3. DNS Client service is able to delete it’s entry under following circumstances:

a. When updating AAAA (IPv6) record, it deletes its old AAAA and A record first. A record may end up missing in the end if you are using DHCP Option 81 and 6to4 on client NIC. http://support.microsoft.com/kb/2782438

b. When DHCP option for DNS server changes, DNS client will go to the old DNS server to delete their entries before moving on to new DNS server for new registration.

c. In a multi-DNS-Server environment, bad timing may cause entries to be deleted by another DNS server trying to replicate to your DNS server. There is a Microsoft knowledgebase article for it but I don’t remember.

d. Stop DHCP client service on a machine with static IP address.

4. DNS Client deletes an entry by updating with TTL set to 0.

5. Within same site, DNS servers refresh between each other every 15 minutes by default. The Expiration time on SOA tab is for validity for refreshing/syncing between DNS servers within same site.

6. TTL is the time that the entry will stay in OS’ local DNS cache.

7. Linux does not have local DNS cache.

8. Between sites, domain replication take care of DNS replication, so the replication interval is long.

9. Secure DNS updates initiated by DNS Client have TTL value of 20 minutes.