Thursday, June 23, 2005

Thanks Bush!

Thanks Bush! Thank you for making authoritarian China seem better than the United States. Maybe that was just your way of dealing with the "Immigration Problem", make China seem better than the United States so that the boat people from Haiti and Cuba goto China instead of here. You're so smart!

Monday, June 20, 2005

gnuserv

I just figured out to keep a running emacs session on my server and connect to it remotely whenever I want without shutting it down. That means that I can keep it running all the time, work on my powerbook, disconnect and go home, come back to work the next day, reconnect and continue on from where I left off. It's really cool and it's going to allow be to be much more productive when I work from my powerbook.

Download gnuserv for gnu emacs, build and install it, copy the .el files to your emacs directory, and load gnuserv-compat.el. Then just type gnuserv-start on your server.

On another computer ssh over to your server and type gnuclient. There you are, it's the same session, try opening a couple of files, shutting down gnuclient, and reconnecting. They will still be there. But make sure not to go through the normal emacs shutdown C-x C-c because it will shutdown your server too. Think of gnuclient as just another frame.

Sunday, June 19, 2005

Capitalization-Weighted Indexes

Jamie Sidey writes about Capitalization-weighted indexes and how they will always underperform equal weighted indexes. The gist of the article that he links to is that almost all stocks will either be overvalued or undervalued at any point in time and a traditional index fund will grow with those overvalued companies so it will have more of its money invested in the overvalued companies. That makes complete sense, but where the hell do I find these special funds? Despite their poor performance compared to a hypothetical better fund I would still prefer to put my money in a traditional index fund than a actively managed fund since 85% of actively managed funds don't beat the stock market.

One thing I've been thinking about for a while is that so many people have their retirement money invested in an S&P 500 index fund (Vanguard's alone has over 100 billion in assets) that all of the stocks in the S&P 500 might be overvalued. What's going to happen when the baby boomers start retiring, is the S&P 500 going to crash?

Saturday, June 18, 2005

Personal Wiki

I've been using a wiki at work for documentation since at least 2001. In 2003 when I started looking for a house I setup a wiki at home. I decided to use UseModWiki since it looked like the easiest to install at the time. It was a great tool for a house search because it allowed Laurel and I to add links to houses we liked and make comments. We could both do this independently from our respective workplaces and share information during the day. Over the last two years I've really come to rely on wiki for my notes, thoughts, and anything else I don't want to forget. I use it for recipes, travel research, wedding research, home improvements I want to make, and much more.

It's become so useful that I've finally decided to spend the time to update to a better wiki. UseModWiki is ugly, very ugly. It doesn't allow you to upload files, it doesn't show images very well, it doesn't do a lot of things a modern wiki does. I looked at a few wikis: Erfurt Wiki, Tiddly Wiki, and then I came to Media Wiki which is the wiki software used by wikipedia. Media Wiki is very beautiful and it allows for a very rich page to be displayed. At first I dismissed it because I assumed that it would be difficult to install and maintain, but today I gave up and took a quick look at the installation page. It was way simpler than I had expected. So I downloaded it, installed it, and I had a running wiki in about ten minutes. I've been very surprised how easy installion of open source software has been in the last few months. I guess the developers have finally realized that easy installation is important.


If you already have UseModWiki running and you want to convert the database to MediaWiki then follow this. This wasn't in any documentation so I had to figure it out myself. It works. Just remember that your homepage will have a different name so you'll need to find it under Special Pages / All Pages.

% cd maintenance

Now edit importUseModWiki.php and change the location of your UseModWiki database.

% php importUseModWiki.php > /tmp/usemod.txt

Now edit /tmp/usemod.txt and remove the HTTP lines at the top.

% cat /tmp/usemod.txt | mysql -u root -p<password> <database name>

Private Insurance

I just remembered something else about Naked Economics. He talked about how when you get insurance through work your employer has taken out a policy that spreads the risk over all of the employees. It's mandatory so both high risk and low risk people are included. But with private insurance people choose to buy it and you usually choose to buy it based on how likely you think you'll get sick. So high risk people buy the insurance and low risk people don't which raises the premiums since a higher percentage of people will need medical care. As the costs go up fewer and fewer low risk people join so the cost go up even higher. I never thought about that. He says that this is one of the places that government can help by forcing everyone into a mandatory national health care system.

Ruby on Rails

I've been looking for a language and framework to do some webapps that I've been thinking about lately. But I only know how to do very simple webapps with straight HTTP in C++ or perl (and a few other languages that I've been playing around with) or full enterprise level Amazon.com software that I worked on myself. I had nothing in between. Nothing I could use to throw together a small site in a couple days. Until now. I've been hearing about Ruby on Rails a lot lately and everyone who uses it says that it's amazing. I'm sure some of it is just hype, but I decided to give it a try.

I first watched the 10 minute demo movie where some dude goes from a fresh Ruby on Rails install to a fully functional blog web app in 10 minutes. It is pretty fricking cool. It's really cool that when he adds columns to the database they are automatically reflected in the ruby object and thus the interface.

So I tried it. Here's what I did:

  1. Download RubyGems

  2. % cd rubygems

  3. % sudo ruby setup.rb

  4. % sudo gem install rails

  5. % mkdir /Users/guido/my-new-rails-app

  6. % rails /Users/guido/my-new-rails-app

  7. Install MySQL

  8. Install CocoaMySQL if you have OS X


There are a few problems with the way the new versions of OS X 10.4, Ruby, mysql, and CocoaMySQL interact right now. So you may need to follow these instructions to get everything working.

Then go through this tutorial and you'll have a Rails app running in like half an hour.

Friday, June 17, 2005

Everything Under Version Control

I've been wanting to put all of my files under version control for a long time and I've finally done it. I tried way back using cvs and I never really liked it. I really hated the CVS directories that were laying around everywhere. So I never used it. In fact, I never even set it up to allow remote repository access, which kinda defeats the whole purpose.

I'm finally trying to get my computing world in order. I've mostly finished reducing my .emacs files into one canonical file that works on all system types. I've gotten rid of Windows and I'm living in a all-unix world now. And now my life is finally in version control. Ahhhh, that makes me so happy. I feel safe when I have stuff in version control. I feel like I can play around and do somewhat stupid things because I can always roll back. Don't you wish real life was like that?

I've always been one of those people who checks in constantly. I don't feel safe until my code is checked in. So it's strange that I didn't move my entire life into version control until just now. What really sparked my desire to do this was an article in Linux Journal.

I chose Subversion because I didn't need to maintain backwards compatability with cvs, it was free and open source, and I've heard a lot of good things about it. Getting it up and running was surprisingly simple. My Fedora Core 3 linux installation was already running the daemon so I just needed to type in the following commands:

Creation

% sudo mkdir /subversion-repository
% sudo chmod a+w /subversion-repository
% svnadmin create /subversion-repository
% svn import /tmp/subversion-tmp file:///subversion-repository -m 'Initial import'

Local Checkout

% svn checkout file:///subversion-repository/trunk/home/guido/ .

Remote Checkout

% svn checkout svn+ssh://guidoism.com/subversion-repository/trunk/home/guido .


I just use "svn add" and "svn commit" just like cvs. Easy as pie.

Sunday, June 12, 2005

Startups

Paul Graham recently wrote an interesting essay about startups.

Naked Economics

I just finished reading a really good book called Naked Economics. It's by far the best book on economics written for the lay person that I've read. Most books of these kind are written by crazy libertarians. They usually argue about how you shouldn't vote because your one vote doesn't matter and how parks should be privately owned. Not this one. But it's also not a crazy communist book. The author argues that the benefits of capitalism far outway the negative impacts. Here are some of the more interesting things he writes about.

The author says that one of the reasons why capitalism can cause problems is that externalities (the gap between the private cost and the social cost of some behavior) are not included in the prices people pay. When somebody chooses to buy an SUV he gets a certain value from owning it but it has effects on other people who weren't included in his decision. For example, the SUV is bigger so it causes other people to buy bigger cars to feel safer, the SUV causes more polution, the SUV is heavier so the roads don't last as long, and the SUV uses more gas which is artificially cheap. The author says that it's a government's job to reduce the negative externalities. One way to fix the SUV problem is to make sure that SUV owners are paying for the full cost of their vehicle. For instance, they should pay taxes based on the weight of the vehicle and they should pay the full price of gas. That would of course include the $200 billion for the war in Iraq and other payments for middle east stability.

He says something that I wouldn't expect out of an economist's mouth: "Anyone who tells you that markets left to their own devices will always lead to socially beneficial outcomes is talking utter nonsense."

Later on he writes about the "helping hand" versus the "grabbing hand". Governments allow business to happen by creating a stable environment and keeping people from cheating but they can also get in the way for no real reason. He says that registering and licensing a business in Canada requires two procedures compared to twenty in Bolivia. The cost of jumping through these hoops is 260% of Bolivia's per capita GDP. Obviously, people in Bolivia aren't going to bother which means they are going to work and trade outside of the safety net of the legitimate economy.

He talks about supply side economics and how at a certain level of taxation the Laffer Curve is true. If the tax rate was 95% then no one is going to do a whole lot of work beyond what is necessary to subsist. But does this make sense in the US where we pay a maximum of about 40%? He says no. Reagan tried it and it failed. It caused a decade and a half of budget deficits.

He says this which I'll quote in full

Government has the potential to enhance the productive capacity of the economy and make us much better off as a result. Government creates and sustains the legal framework that makes markets possible; it raises our utility by providing public goods that we are unable to purchase for ourselves; it fixes the rough edges of capitalism by correcting externalities, particularly in the environmental realm. Thus, the notion that smaller government is always better government is simply wrong.


He talks about global trade, which I'd like to go into futher in another essay. He says that Saudi Arabia can produce oil cheaper than the US and the US can produce corn cheaper than Saudi Arabia so the corn-for-oil trade is an example of absolute advantage.

He makes an excellent point about global trade. America punishes rogue nations such as Iraq by imposing economic sanctions. We cut off international trade as a punishment. So why is it that anti-globalisation people want to impose sanctions on the rest of the developing world? Are they doing it because they think that they are helping the people in those countries or because they really hate the people in those countries and want them to suffer? Think about this: The sanctions in Iraq were responsible for the deaths of half a million children. Are you sure you want to kill that many people in other countries?

He talks about how geography impacts the economy. Only two of the thirty countries classified by the World Bank as rich lie between the Tropic of Cancer and the Tropic of Capricorn. Those countries are Hong Kong and Singapore.

He ends the book pondering some questions about how life will be like in 50 years. One of the interesting questions that I ask myself all of the time is whether we Americans are going to stop working so hard. He discusses the "backward-bending labor supply curve" which is that when wages go up we work hard up until a certain point. At a certain point the extra money doesn't matter as much as your time. I've always thought that it had something to do with the length of time your country has spent at the top of the food chain. Europe is old, they've been at the top for a long time and so they no longer feel like they need to prove themselves by working so hard. The US is younger and it was understandable that we think we need to work hard to prove ourselves. The interesting thing is that it's part of our character as Americans to think of ourselves as the underdogs. It ends up causing some good and some bad. The reason why I think that China is going to take over the world as the only superpower is that they are just beginning to become powerful and they are going to continue to work very hard until they've felt like they've proven themselves, which can't be anything less than world domination. The US on the otherhand is well off, we don't need to work as hard and I think we'll eventually wake up one morning and realize that we are working way to hard.

Well, those were some of the things the author discussed. I'd like to write more about some of the topics but I need people to disagree with me. Please write comments about things you disagree with. And make sure you supply good logic. I hate bad logic.

Saturday, June 11, 2005

Situation in Bolivia (part 2)

Everyone is Bolivia has calmed down in the last day and a half. They have a new president, a Harvard guy just like every other president of Bolivia. According to El Deber from Santa Cruz, Evo Morales has removed the roadblocks in his sector. American Airlines stopped flights to La Paz and is expected to start them back up on Monday. I wonder if that means they continued to fly to Santa Cruz? The two thousand miners from Potosí are considered heros in Sucre where they helped topple the government. Bloodless coup?

It brings chills to be to think of what happened there. Not just because they brought down a government but because Chuquisaca is a strange place. It's very surreal there. The road from Sucre to Potosí is amazing.
On that road you feel like you are as far away from civilization as possible. And it feels like you are travelled back in time. I realize that it's a cliché to say that you feel like you've travelled back in time, but I promise you, that is the only way to describe it. The road is narrow, winding, and you go from 2844 to 4070 meters above sea level. On the way you pass an old bridge with a castle on one side. This is the point in the trip when you feel like you've really travelled back in time. You start to think about how the Spanish travelled on horseback between Sucre and Potosí. It's desert. It's hard to breath there because of the altitude. Just image what the first Spaniards thought of it. Think about that for a momment. Then you think about the peasants who travelled back and forth on foot, who still travel back and forth on foot!

On the return trip to Sucre we travelled at night. It was freezing outside, definitely below freezing. It was pitch black outside except for the stars (which by the way were amazing. The southern hemisphere has a big milky expanse of the milkyway and seeing that from the a desert at 4000 meters as far away from civilization as you can imagine is amazing). I noticed small fires all over the mountains. I asked my friend Jose María about them: "They're keeping the peasents from freezing to death of course". Wow. It was at that point that I realized that I was as far away from my normal life as I had ever been. Desert peasents in the "uninhabited" mountains of Bolivia trying to keep from freezing to death don't seem like they live in the same planet as me when I'm back in Seattle working at Amazon and worrying about the increase of heap fragmentation. The nature of reality is very different among different people.

As I bring myself back to my reality I better understand the reasons behind the peasent's protests. I've always been aware that Bolivia has basically been raped by outsiders. Especially with respect to their natural resources. These foreigners have raped her over and over again. First it was the silver in the Cerro Rico in Potosí (the richest silver mine in the history of the world), then it was nitrate in Atacama (when Bolivia lost its access to the sea), then it was the rubber trees (when Bolivia lost about half of its Amazonian land to Brazil), then it was oil in the Chaco (when Standard Oil (taking Bolivia's side) started a proxy war with Royal Dutch Shell (taking Paraguay's side) and Bolivia lost more land). Now it's natural gas. I can very much understand how she would be suspicious of slimy guys trying to woo her again.

But I also understand where the businessmen in Santa Cruz are coming from. As my family has been saying to be all my life: The Cambas (people from Santa Cruz) are better than the Kollas (people from the mountains). The country can be thought of as two very different countries. The people in the mountains have relied on mineral wealth, even if the peasents didn't see any of it. They have controlled the government, even if the peasents didn't ever get much power. And they've controlled the image of Bolivia, everyone in the US thinks Bolivia is an entirely mountainous country. The people of Santa Cruz didn't have any of that so they built an economy from scratch. It's very much like Fareed Zakaria's distiction between a country like the Netherlands with almost no natural wealth and a country like Saudi Arabia with lots of natural wealth. He states that countries with a lot of natural wealth never build a self sustaining economy because everything has always been given to them, so when the wealth goes away the country falls apart. I'm ignorant of a lot of things in Bolivia, but I do definitely see a difference between lowlands and the mountains. There are a lot more businessmen in Santa Cruz and I think a larger middle class. I wonder if you can compare Santa Cruz to the Netherlands and La Paz to Saudi Arabia? Now Santa Cruz has some natural wealth that they can exploit, but the people in La Paz want it for themselves. I don't think any of the mineral wealth from the mountains ever made it to Santa Cruz, so why should Santa Cruz give La Paz its current wealth. It's understandable why the people in Santa Cruz want autonomy.

But I'm really too ignorant to make any educated decisions on what is right.

Thursday, June 09, 2005

Situation in Bolivia



It's fucked up in Bolivia right now. Up until about 7pm PST everyone thought that there was going to be a coup tonight. The Blog From Bolivia has been giving me more frequent updates than the normal news or my family:

There are reports of troop movements in Santa Cruz and a strong belief among reliable sources here that a coup of some kind is possible tonight.

Fortunately a couple of hours ago Vaca Diez said that he would not assume the presidency. This seems to have calmed the people down for tonight. The next in line also refused the presidency so it looks like the president of the supreme court will become interim president.

Tuesday, June 07, 2005

Mouse Bungee

The mouse bungee is really cool. I spent a day using a friend's and it really works well. No more problems with my mouse cord.

Wednesday, June 01, 2005

The Death Star

There are lots of new people at work who haven't heard about Gus and his toys. When I bring up the fact that Gus has the Death Star in his living room people don't believe me. Well, there it is. ToysRGus has a lot of amazing stuff. You also need to check out his house: Bobacabana.

Gerrymandering

I have a question. How can this



be legal. Explain this to me. Why the fuck can people in one party break up or add up people from a bunch of different places to change the outcome of elections? I can sort of understand the reasoning behind putting an underrepresented minority together to get them more seats but there have to be better ways than this. And what about breaking up underrepresented minorities so they don't have a majority in a certain district like the republicans have been doing? That's just fucked up. How can this not be illegal? How is it that the Texas republicans can get rid of latino and black votes by doing this without enraging the public? Why do we let them get away with that?

Gerrymandering needs to be made illegal now! To bad I'm too lazy to do it myself.