Sunday, October 24, 2010

Baby coming

Any day now. I'm not going to go to the John Stewart's rally, as it comes too close to the due date, and wife wants me close. Hmm, everyone here is going, Columbia U will have no students this weekend. A great counterpoint to the partisan-ness this country has been facing in the last 15 years, but I wonder how many of the attendees have actually *talked* to a republican about their concerns.

So I'll watch it on some big screen around here in NYC. Also I've swung back to liking my websites to reside in my living room. Please see my family blog, run from a small Dell Studio Hybrid (wonderful machine) running Linux in my custom-made mahogany cabinet, which I made last year. I snobbily call it our credenza.

Wednesday, July 28, 2010

Unconscious in professional life

Just a short post about how I realize my unconscious brain has input in my professional life, specifically when coding or doing complex operations. Just now I was doing a big upgrade of the scheduling system for our Anton supercomputers, and in step 20 of about 50 steps or so my conscious brain says to do something else that I had forgot, that was not done correctly the first time, something that might bite me if not fixed. A nagging unconscious voice says no, what you're doing is not needed. Be careful, look around. Like the room got darker, slightly, without any change to the light. The problem is the unconscious voice is non-verbal for me, so I only get a binary-like yes/no signal from it. And sure enough, when I looked around it had actually been done correctly (by me, but some time ago). The thing I was about to embark on would have been redundant, and could interfere with the old way, causing confusion.

It would have been clearer if the unconscious brain verbalized this, but I'm glad to have the binary signal anyways. I wonder if others have observed anything like this.

Friday, June 11, 2010

Democracy Kernel

(From a discussion with a Moroccan cab driver, from sing sing to home.) What makes a democracy? In this country we are beginning to discover it is not simple. Its not the name, not the style of election, i.e. you can have both, Iraq, but still not have what we would consider a stable, vital democracy. A democracy in spirit. Cab driver: You know Egypt? They have a president, but he never steps down! Yes that can happen, and often. The king-rule is stable, and dies hard. Morocco has a king by name.

So what is a democracy? As far as I can tell, it is based, like many stable things that are complex, on a contradiction. The government must be afraid of the people. By 'people' I mean interests represented by the people, be it corporations, organizations, interest groups, or the body politic. Specifically not the government itself. The government must feel fear of these entities, feel they can be exposed by them, and then overturned by them. Only then will the government perform as the people expect. Even in the US there is corruption, greed, injustice (God knows), and dishonesty. However not as much as could be imagined for such a rich country (for now). Why? Because politicians will be dishonest, will steal, but only to a threshold where they are unlikely to get caught. If they exceed it, the press will find out, and we love a scandal. Scandals are what we feed upon, and feel righteous by. Blagojevich has not chance. He was found, beyond the reasonable doubt of most, to take bribes and we will take no quarter. The Americans will have his blood, figuratively, and not feel bad about it. It doesn't take more than "blag" in my search bar to get the auto-complete on his name.

The stable democratic government fears the people. Where is the contradiction? Why wouldn't a government, in charge of so much, make itself powerful enough to not fear the people? This has happened countless times, in countless countries. My father seemingly reports it monthly in Africa, but it is almost everywhere. How do you instill something different, the fear? Is it Guns to the people, i.e. the second amendment, or is it something that has to be won after decades of enslavement and oppression? The fledgling US experienced the latter, and agreed to award the former. I now arrive to a grey area; the objective is clear but the mechanism is not.

Friday, May 7, 2010

One second rule - stock market

The slope of the large drop on the stock market yesterday afternoon is insanity. In my mind there is no question it was not caused by Greece, or the US worker's productivity, or any rational concern. It was pure automated trading, similar models operating in very tight loops, selling in unison. Several blue chip stock's value went to 0, trading at less than a penny.

If I were congress I would enact a simple rule: anyone who buys a stock must hold it for at least one second. This would reduce the systematic danger by making such a high slope impossible.

-- Update Feb16.
Ha, look where I work. I guess another answer is automated trading is so effective and cheap and beneficial in reducing spreads for consumers that it is here to stay. So like early automobiles that were dangerous at first, we work to make them safer. I have read a few analysis of the flash crash, and no longer think HF trading was the predominant cause, nor the one-second rule an effective fix. (Although I'll offer no proof or evidence here).

Saturday, May 1, 2010

Setting X resolution the new way

I am spending some time trying to tweak my XBMC setup on Fedora 12 linux on a cute little Dell Studio Hybrid computer. One problem is my HDMI output has to go through a Sony HT-CT500 video receiver, so we can press "DVD" on the remote and switch from the Cable DVR box to the linux computer screen. Purely convenience, but the details in life are important.

This leads to the problem that the Sony video receiver clips the HDMI signal, even in its passthrough mode. Not great, why did the engineers not test it better? 1024x768 resolution is impossible, the LCD TV just goes blank. Could it be the TV or the HDMI cable? No, when I plug in the Linux box directly using the HDMI cable, it displays that resolution fine. Linux dutifully searches for an appropriate resolution on KDE startup and chose 640x480, but I think I can do better. Perhaps a shortsighted goal, but I can be an explorer, and am in such a mood now.

Ok, so how to determine what the exact limits of the Sony video passthrough is? Use the nifty new xrandr tool on Linux's X server. There is no longer an xorg.conf it seems, and good riddance.

Here is a little script that allows me to do a parameter sweep quickly. It is influenced by others, namely http://compbrain.net/archives/tag/xrandr. So far I have got 736x500 to work.

[xbmc@shitzu bin]$ cat try-new-res
#!/bin/bash
#
# Try different screen resolutions
#
# FDS 2010


set -x 

if (( $# != 2 ))
then
        echo "Give me two ints: horizontal vertical resolution"
        exit 1
fi
c=$(cvt -r $1 $2 | tail -1 | sed -e 's/Modeline//')
if ! xrandr --newmode $c
then
        echo "Too bad"
        exit 2
fi
name=$(echo $c | awk '{print $1}')
xrandr --addmode HDMI1 $name
xrandr --output HDMI1 --mode $name

Thursday, April 15, 2010

File Sharing over the WAN : Cat and Mouse

I just read an interesting article on internet piracy in a TV-producer friend's professional magazine  (DGA Quarterly Fall09 "The Piracy Problem").

They mention the most effective solution is to identify users who are downloading pirated content and simply inform them their actions are illegal. Perhaps the next step is suspending their internet connection for a short period (60min) with the help of the ISP. That would be sufficiently disruptive to alter their behavior most likely.


However the question is how do you identify these users? Its a cat and mouse game. If the p2p clients (the mice) get smart, they can do fancy things to hide their tracks. I just spent 120 sec musing about what I would do (a mental exercise only), and at the limit I'd encrypt all traffic, and send it all to port 80 or 443 to make it look like web traffic, using a kernel module to redirect necessary packets to the correct application port based on a token in the payload or perhaps some useful header field.

The cat would probably do something like measure the rate and number of different connections to a node to identify the mouse, rather than the contents of the data stream itself. Then the mouse would attempt to make its traffic look indistinguishable from a busy user reading multiple webpages at once. The mouse just has to make identifying himself hard enough to cause the cat to make mistakes once in a while, to cause false positives. I.e. if the cat shut down the internet connection of a legitimate web browsing customer for 60min, just once per 10,000 users monitored, that would likely be enough to stop the cat altogether. The ISP does not want to jeopardize its customer relationships, give refunds, get the reputation for invading privacy, etc.

The ultimate cat would be a employ a method that affects only filesharing protocols, but not web-browsers, and legitimate users. I cannot think of one myself.

Trip, Travel Insurance : Access America

A bad experience. The travel insurance my wife bought stated it covered cancellations due to bad weather. Great. She had bad weather on her way from NYC to Albuquerque, and was forced to spend the night in Denver airport. The next flight to New Mexico was not for more than 24 hours. However her insurance claim (worth $500) was denied because her carrier had some other flight going to some other destination within 24 hours. Their policy small print required "complete cessation of service by the airline" defined as no flights leaving the airport for 24 hours. If there was complete cessation of service for 23 hours, then one flight on the airline left for Mexico City, her claim would be denied; making this insurance worth much less than she thought.  We will never buy from this company again.

Access America (AA) is offered by default by Orbitz, you just need to tick an option box. The Romans knew it, and this blog entry is a testament: Caveat Emptor, buyer beware.

Tuesday, April 13, 2010

nuclear power plant argument


Q: Should we build nuclear plants since it is impossible to build a
system that doesnt fail?
A: Yes.
Q: Why?
A.1. It is efficient and green.
A.2. there are designs for smaller power plants, that on failure, inherent to the design, will shut off the reactor. I.e. the default state of the system is off, similar to air brakes on a bus.

I.e. you can build a system that moves to a safe state on failure.

A weaker argument, also for (From ChrisH discussion):
Worse if chem plant blows up. We run those regularly.

Apollo GUI Goodness

I just talked to an old timer about the Legendary Apollo Workstations of the early 80s. Can we get back some of their goodness? They had a GUI environment called DM, before the X server, similar to windows/apple, that had a control window. This window could understand a special language with a power that even now we can only dream about.

Apparently they could do the equivalent of

for w in $(all windows in current desktop):
search w.contents() for text "foo"

and programmatically pop up a new window showing arbitrary text, etc. This would be extremely useful; has KDE thought of making full python bindings for its KWin? Better yet, give us an interpreter window widget like they had.

They also had a flag to provide a terminal with either a BSD or SYSV unix interface, down to the system calls seen by the user programs. Amazing.

SSH Hostbased Auth

Put this in the blog because its hard to find on the web, and if you
need to do it, it is quite critical to know it.

REPRODUCE
on cent4gardenhub
1. ssh-add -D
2. ssh -v cent5gardnenhub = asks for password. Gosh no. Not. Again.

DIAGNOSE
Q1: Is one of these false?
A. Is the result of $(hostname) the same as forward and reverse DNS
maps:
if test "$(hostname)." == "$(host $(hostname -i) | awk '{print $5}')";
then echo ok; fi
B. is $(hostname) listed in /etc/ssh/shosts.equiv on remote machine
C. is the remotehost on the ssh command line ($argv) listed in
/etc/ssh/ssh_known_hosts on the remote machine?
D. Does the public key from (C) match that listed in
ssh_host_rsa_key.pub on the local machine?
Q2: Are there any errors in /var/log/authpriv on the remote machine?

Second Academic Tenure

The Japanese reportedly have a tradition of encouraging academics to switch fields every 10 years. The reason is it is felt if they do not they get calcified in the field, and worse, squash good new ideas as they threaten their own. John likes this and suggests a second tenure meeting, 15 years away from the first one. It would be very unlikely that a person would be allowed tenure in the same field a second time. A quote from John from today "Dick Feynman, yes, go ahead and continue to work on physics, but John Salmon, well you might make some incremental advance to large astrophysics simulation technique, but you should probably apply that big brain to chemistry, biology, xxx".

A whacky idea.