Blog | Admin | Archives

Two Goals

I am going to try some goals again, in a format that is less ambitious and perhaps more realistic. I will put forth two – an ongoing goal for the next 30 days and a short term, one-time goal to accomplish in the next 30 days. This has several improvements over my last attempt:

  • Smaller scale – more manageable and reasonable to achieve
  • Definitive time scale – in 30 days, I wil know percentage of completion on the ongoing task, and whether the short-term goal has been achieved.

Both of these improvements will, I hope, help me be more accountable to myself.

And now, for the goals.

  1. Over the next 30 days, I will be awake by 6:00 am every day.
  2. Within 30 days, I will have moved into a residence West of Lake Washington.

Comparative Advantage

Inspired by Bobby’s recent post.

Two countries, A and B.

Citizens of A can produce 10 bottles of milk a day or 10 loaves of bread.
Citizens of B can produce 5 bottles of milk a day or 2 loaves of bread.
These differences are due to superior technology or circumstances in country A. Country A has what is called a absolute advantage in both bread and milk, so why would country A care about what county B could do?

Comparative advantage is why.

Say that both countries have 10 people, and people like to eat as much bread and milk as possible. In addition, people prefer to have one bottle of milk with each loaf of bread, if possible. Now lets say there are 70 people in each country.

In country A alone, 35 people make milk, and 35 people make bread. 350 bottles and loaves are created each day, and each person gets to consume 5 bottles of milk and 5 loaves on bread. Everyone is fairly happy.

In country B alone, 50 people make bread, and 20 people make milk, producing 100 loaves of bread and 100 bottles of milk a day. People get to consume 10/7 of a loaf and 10/7 of a bottle each day. People in country B look to country A with envy.

Now lets consider the possibility that these two countries trade. Why would they do this? Remember, everyone wants to consume as much as possible. Why would country A trade, then? Wouldn’t they lose out? No, says comparative advantage. Take a look:

While A has an absolute advantage in all goods, B has a “comparative advantage” in milk. This is because to produce five more bottles of milk, B only gives up two loaves of bread. For A to produce five more bottles of milk, A must give up five loaves of bread, an unhappy proposition. (If this doesn’t make sense, recall that a Citizen of A can produce 10 bottle OR 10 loaves, and a citizen of B can produce 5 bottles OR 2 loaves, but each citizen can’t produce both at the same time.)

Now, since B has a comparative advantage in milk, lets have all 70 B people produce milk – for a total of 350 bottles of milk. Then lets take 35 A people and have them produce bread – for 350 loaves of bread. We’ll then take the rest of the A people and split them between milk and bread – for another 175 loaves of bread, and another 175 bottles of milk. If you are keeping track, you may have noticed that the total world production just went up – without increasing anybody’s ability to produce. Before, we had 450 loaves of bread and 450 bottles of milk (350 from A + 100 from B of each). And now we have 175 + 350 = 525 bottles and 525 loaves of bread. 75 extra bottles and loaves are floating around the world.

But, you say, B has only milk, and A has way too much bread. So, the two countries trade at a rate they both find acceptable. Because of the comparative advantages of each nation, this rate will naturally fall somewhere between a milk to bread ratio from 1:1 to 5:2. Lets say it settles in at 2 bottles of milk for a loaf of bread. So B trades 234 bottles of milk to A for 117 loaves of bread. They now have 116 milks and 117 loaves, and each person gets to consume more milk and bread in B (before, they only had 100 of each).

Over in A, they now have 234 bottles + 175 bottles = 409 bottles and 525 – 117 = 408 loaves of bread. Once again, each person gets more (before, they only had 350 of each). All of this comes about, remember, without any increases in productive capability – just specialization and trade.

Referer Spam Countermeasures

Like all spam, referer spam takes what could be useful – in this case, information where people come from to a site – and make it mostly useless – just more links for google to index. However, one of the unique aspects of referer spam also makes it easier to counter than many other types of spam. Generally, referer spam must surpass a threshold – usually, the top ten referrers, to be listed at all on a site. This means that instead of spreading out the referrers, referrer spam generally all points to one place. Which makes it easy to implement a simple anti-referer-spam script like the one I came up with to help fight referer spam on Theo’s blog:

// Ryan's anti-spam hack starts here
$spam_words = file('spam_words');
if(isset($_SERVER['HTTP_REFERER']))
{
foreach($spam_words as $spam_word)
{
if(stristr($_SERVER['HTTP_REFERER'],rtrim($spam_word)) !== false)
{
die("You look like you're trying to refer spam this site with this word: $spam_word".
'If not, sorry for the inconvenience and please '.
'<a href="'.$_SERVER['PHP_SELF'].'">click here to continue</a>');
}
}
}
// End Ryan's anti-spam hack

Then, as a companion, a post-facto script that can be called from the command line or from the web:

<?php
require('./conf/_config.php');
mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
mysql_select_db(DB_NAME);
$spam_words = file('spam_words');
foreach($spam_words as $spam_word)
{
// echo $spam_word;
$spam_word = rtrim($spam_word);
$sql = "DELETE FROM `evo_hitlog` WHERE `referingURL` LIKE '%$spam_word%'";
echo $sql . "n";
mysql_query($sql);
}
?>

Then, the admin can simply periodically check their top referer output, and if they see a bad guy creeping up, add an appropriate word to their spam_words file and run the killoldspam.php script. The bad stuff goes away and can never come back. Best of all, its not very intrusive to the average visitor, even when they are accidently flagged. Javascript or a meta or http redirect could make it less annoying still.

Downgrading

Not long ago, I “upgraded” to Trillian 3.0 Basic, since Trillian 2.0 Pro was crashing when I started it up. However, Trillian 3 is awful:

  1. It isn’t skinnable. While its default skin in not bad, it wasn’t as good or nearly as compact as my skin of choice, Beacon Pro. Of course, the “Pro” version allows skins, but more on that later.
  2. It takes forever to load. Ok, not quite forever, but it does take at least 5 times as long, and perhaps 10 times as long to load. Since Trillian 2.o Pro did everything I wanted it to, the extra time waiting for it to start – disk reading and processor fully utilized the entire time – did not make me happy.
  3. It doesn’t take plug-ins. This is probably something that their “Pro” version allows, but all I wanted was HTML profiles – nothing else remotely interested me. I’m not going to shell out another $25 just so I can get one plugin and one skin.
  4. Which brings me to the last topic, the one year deal-io. I paid $25. Most places that I do that are nice and give lifetime upgrades. Not Ceurelian Studios. This fact – which to their credit they do not try to hide in any way – almost made me balk at buying the Pro version, but it ended up being a good decision when I did. However, if they want people to buy 3.0 Pro, their shareware offering in 3.0 Basic really doesn’t do the selling job very well.

So last night, I downgraded to Trillian 2.0 – and in the process, upgraded my IM experience. It isn’t crashing anymore, loads quickly, has my favorite skin, and I can view HTML profiles as they were meant to be viewed. Good stuff.

Double-O-Seven (0:07)

Ok, I just noticed something really wierd. All my posts on the main page say they were make 7 minutes after the top of the hour. Then every post made in June says it was 6 minutes after the hour… and May is five minutes… so, um, yeah. When did that happen?

UPDATE

With some timely help from the great and humble Theo, I was able to quickly track down the problem in my options. Somehow, I ended up with months for minutes and didn’t realize it. I haven’t changed those options, that I remember, for quite some time, so I must have really missed something or recently screwed it up without realizing it.

But now the mystery is solved. Thanks for tuning in.

For a while there, I guess everyone just believed that I was a crazy-consistent blogger of some sort. Ha.

Sunday the 31st

A good day overall – I woke up earlier than I had all week, went to a productive TRC leadership meeting from about 9:50-11:50 (it started at 9:30 and was supposed to end at 11:30, so I don’t feel bad about being late), hit up the Libertarian Barbecue at Magnolia Park in West Seattle (I got to eat good food, talk to good people (Jeff Jared is an amazing man!), and saw Scott and Travis (LPKC Chair and Vice-Chair) again. After this, I went to church, where I made it in time for the 5th-Sunday-of-the-Month joint Priesthood & Relief Society meeting, where the estimable Scott Bowen talked about morality, drawing heavily on what seems to have become the general conference talk most frequently used among all lessons of recent times – Jefferey R. Holland’s Of Souls, Symbols, and Sacraments. After this, I returned home where my mother had cooked a delightful meal of teriyaki chicken and rice. Since my brother was in town, we took some family pictures – and then headed to the airport to drop him off – he was here far too short, it seems. Once back, I chatted it up, and then, as I am now, headed to bed. A good day indeed!

Six Times a Week

The last two weeks, I have had the chance to play Ultimate six times a week: Monday, Wednesday, and Friday with a group near my work during lunch, Tuesday and Saturday with the Robinswood Park crew, and Thursdays with a UW intramural team. This has not come without a toll. Six days ago, Monday last week, I tweaked out a muscle and ended up hobbling around during Frisbee Tuesday evening. I skipped Wednesday at work, and then was feeling better after some well-advised streching that Jeana suggested. However, on Thursday at the UW, I felt the tweak coming back, but kept moving and faught it off successfully. Unfortunately, it wasn’t enough and we lost by a point. Friday, I came down hard from attempting to catch a disc and landed on my right heel, bruising it. I was able to finish out the game, but it was sore and it got worse later in the day. Saturday, it was feeling better – I couldn’t run full tilt, but I hobbled around very well, considering. It is now feeling quite better, and I look forward to another game Monday at noon.