Archive for the 'Uncategorized' Category

airline ticket name change

A self-styled consumer advocate claims here that “the non-transferrability rule for tickets is bogus … it has absolutely nothing to do with security and everything to do with money.” He says this on account of somebody who was able to get a name changed on a ticket after paying $800 in fees. The best you can do? No, because in this amazing comment below:

Krys
$800?? Wow. Here is what I did and it only cost me about $60.
I had similar problem. The ticket was in my name and i bought it in June 08 for the trip to Poland in December. In July, my grandmother died. Since we did not have a lot of money I decided to give my ticket to my dad. I ran into the same problems trying to change name on the ticket. After whole week of trying I gave up. I looked into changing my dad’s legal name. And there it was. A process that took about 1 week, $60 in cash, 15 minutes in front of judge and we had my dad’s first name changed to mine. I was honest with the judge as to why he wanted to change his first name (my dad doesnt speak english). Once we got the approval, we went to secretary of state to get him new license, once we got that we got him new green card (took 2 months) and there he went. He now changed his name back for another $60.

connection sharing on linux

To turn a linux box with two network interfaces into a NAT router with the most basic functions, four separate changes are required. This is more complicated than it needs to be. For future reference:

1. Enable packet forwarding in the “registry”:
Edit /etc/sysctl.conf to add
net/ipv4/ip_forward=1 then
> sysctl -p /etc/sysctl.conf

2. Set address sharing for outbound traffic and poke holes in the firewall:
Assume eth0 is the WAN-facing interface and eth1 is the LAN-facing interface, then
> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> iptables -t filter -A FORWARD -i eth1 -o eth0 -j ACCEPT
> iptables -t filter -A FORWARD -i eth0 -o eth1 -m state –state ESTABLISHED,RELATED -j ACCEPT
> /etc/init.d/iptables save active
> /etc/init.d/iptables restart
Turn on the iptables service in sysvconfig

3. Enable automatic serving of dynamic LAN IP’s:
Assume 10.0.0.x is the LAN-side subnet and 192.168.0.1 is the WAN-side DNS server or gateway, then
Edit /etc/dhcp3/dhcpd.conf to add, e.g.
subnet 10.0.0.0 netmask 255.255.255.0 {
     range 10.0.0.2 10.0.0.10;
     option routers 10.0.0.1;
     option domain-name-servers 192.168.0.1
}

> /etc/init.d/dhcp3-server restart

4. Set the LAN-facing interface to be on the LAN-side subnet:
Assume 10.0.0.1 is the LAN-side address of connection sharing machine, then
Edit /etc/network/interfaces to add
auto eth1
iface eth1 inet static
     address 10.0.0.1
     netmask 255.255.255.0
     gateway 192.168.0.1

> /etc/init.d/networking restart

The Analects, Section I

There doesn’t seem to be any literal translation of the Analects out there that tracks the original grammar, which is annoying. So here I did it, in-text commentary in parentheses. Not a big fan of this text.

《學而》第一

Note: The princely scholars, sometimes translated as gentleman-scholars, are more or less the intellectual elite who assign themselves the task of defining morality and leading by example. Here, they have a rambling discussion about the desirable traits of a princely scholar (and therefore the ideal benevolent man), and how such a person participates in managing the masses, who need not understand anything but merely follow along.

1. 子曰:「學而時習之,不亦說乎?有朋自遠方來,不亦樂乎?人不知而不慍,不亦君子乎?」
Master said: “Learning and fittingly applying it, isn’t that also persuasion? Having comrades from afar be drawn, isn’t that also concordance? Others not understanding yet one not harboring resentment, isn’t that also being a princely scholar [junzi]?”

(To learn and teach through example and action, and to get resonance among peers is the mark of an elite intellectual; whether others get it is not important. Confucius is talking about his own reasons for teaching rather than going on the lobbying circuit, where he was frequently rebuffed.)
(Read the article)

user input should take absolute precedence

These and other silly “100% CPU” problems should not happen, first of all:

1. Mac OS X doesn’t know how to stop looping the CrashReporter process on repeated crashing apps.
2. 64-bit Linux kernel doesn’t know how to deal with full swap situation.

But more importantly, given that “100% CPU” situations will arise, why are OS’s designed in such a way that basic user inputs like mouse and keyboard aren’t given precedence at all times? Even just to catch some escape key combo to give the user a chance to correct the offending situation? I don’t believe for a moment that a small amount of computing time cannot be devoted solely to process user input at all times. If your computing resources cannot handle that, then cut out the other crap that’s going on. If the user wants to do something, listen to the user! Simple concept.

tensors

This has been a confusing topic, with half a dozen Wikipedia pages on the subject. Here I took some notes.

Tensors are sums of “products” of vectors. There are different kinds of vector products. The one used to build tensors is, naturally, the tensor product. In the Cartesian product of vector spaces \(V\times W\), the set elements are tuples like \((v,w)\) where \(v\in V, w\in W\). A tensor product \(v\otimes w\) is obtained by tupling the component bases rather than the component elements. If \(V\) has basis \(\{e_i\}_{i\in\{1,…,M\}}\) and \(W\) has basis \(\{f_j\}_{j\in\{1,…,N\}}\), then take \(\{(e_i,f_j)\}_{i\in\{1,…,M\},j\in\{1,…,N\}}\) as the basis of the tensor product space \(V\otimes W\). Then define the tensor product \(v\otimes w\) as

(1) \(\sum_{i,j} v_i w_j (e_i,f_j) \in V\otimes W\),

if \(v=\sum_i v_i e_i\) and \(w=\sum_j w_j f_j\). The entire tensor product space \(V\otimes W\) is defined as sums of these tensor products

(2) \(\{\sum_k v_k\otimes w_k | v_k\in V, w_k\in W\}\).

So tensors in a given basis can be represented as multidimensional arrays.

\(V\otimes W\) is also a vector space, with \(MN\) basis dimensions (c.f. \(V\times W\) with \(M+N\) basis dimensions). But additionally, it has internal multilinear structure due to the fact that it is made of component vector spaces, namely:

\((v_1+v_2)\otimes w = v_1\otimes w + v_2\otimes w\)
\(v\otimes (w_1+w_2) = v\otimes w_1 + v\otimes w_2\)
\(\alpha (v\otimes w) = (\alpha v)\otimes w = v\otimes (\alpha w)\)
(Read the article)

moon halo

http://apod.nasa.gov/apod/image/0812/moonhalo_casado_big.jpg Today I looked up at the night sky and there was this wonderfully full moon, but it was sitting in the middle of a huge perfectly round disk opening into the heavens amidst the clouds. I wondered what the heck it was, thinking it might be the result of Earth-shadow.

It turns out this was a moon halo. The page says that the phenomenon is “familiar,” but I’ve never seen it in my life, and had I not looked up for no reason, I would have missed this one, too! By my hand measurement, it spanned 45° in diameter, which is a pretty big portion of the sky. Jupiter was also visible within the ring of the halo. Quite amazing.

on deepness

Cleverbot is a corpus based chatbot capable of producing some natural conversations by using responses from humans.

As you can see it carries on just fine and can fool a casual observer. But the longer you carry on a conversation with it the more apparent that Cleverbot is frustrating to talk to, not so much that it isn’t human — after all, all of the responses are taken from human sources. If it weren’t so good at emulating a human from which you expected more, you wouldn’t be frustrated.

Cleverbot is frustrating in two ways:

  • it isn’t interesting
  • it doesn’t make sense

In other words, it lacks deepness, like a shallow human. Why?
(Read the article)

phone vs. tablet vs. laptop vs. desktop vs. server

It seems that Microsoft’s all-in-one strategy on support for different devices is still progressing. Windows 8 will have interfaces for both the desktop and touchscreen devices. This is akin to how Windows Media Center works. This model must have an unusual level of attraction to Microsoft due to the large base of existing applications, but it makes assumption that you’d want to use all the applications on all the devices, if only you could — that may turn out not to be right.

Microsoft has for years tried to get into mobile devices. Here you see Bill Gates really uncomfortable with the notion that Apple has succeeded more than Microsoft in this space. He is not wrong, since for a time Windows phones and tablets were the only ones out there, while Apple’s Newton was forgotten memory. Those devices either used a slightly modified Windows OS or one that copied all of its metaphors. The latest Windows phones are an exception, but with Windows 8, it will no longer be. It cannot be disputed that there are important applications that do not exist on mobile devices (currently), and therefore mobile devices are not complete (currently). So people argue that mobile devices will be full-fledged computers or desktops will not die. The idea of a dual interface seems to be aimed in this direction. However, a third possibility exists. Applications, after all, merely solve real life problems. They are not themselves holy. If there were a different way of accomplishing the same things, the applications could be replaced. One could argue that data is the rather more holy object. Back to this later.
(Read the article)

lessons from the PC era

It’s interesting to consider the history of the PC and learn some lessons. The landscape of computing that we have now resulted from a sandwiching effect of cheaper and cheaper scientific workstations and more and more powerful consumer hobby kits (some say toys). By the mid 1980s, this trend was recognized and efforts were begun from both sides to capture the computing market. Today we know that the hobby kit lineage won, and as a result, most workstation companies eventually folded in the 2000s, though they survived for a while by clinging to the enterprise. (Incidently, IBM and HP did not, because they were large and diversified enough to do something about it.)

But this is not the whole story.
(Read the article)

art history

I’ve been rather ignorant of this discipline, and only saw categorization of historical style progressions as a taxonomic exercise. Over the years as I listened to classical music, I’ve gained at least one understanding of why there is a progression — something rooted in human expectation and its motivic innovation, I suppose (some fascinating papers on the subject of aesthetics here and here). But why this particular progression was never clear. Perhaps there was no rhyme or reason, I thought, just a coincidence.

So lately I’ve been considering whether there is some organization to better understand some milestones of (Western) art history, which get period labels like:

premodern, classicist, medieval, renaissance, baroque, rationalist, romantic, modern, and postmodern.
(Read the article)

« Previous PageNext Page »