You are currently browsing cdfox’s articles.


I noticed a front page headline in the Seattle P-I about Washington State Attourney General Rob McKenna’s participation in an agreement with Craigslist aimed at urbing at curbing the sex trade on the popular site. The authorities appear to be emphasizing the exploitation of minors and women from other countries as motivation for this action, but McKenna is hoping Craigslist’s new policies will deter “illegal activity,” including the business of uncoerced adult prostitutes. In my opinion, the government should not regulate sex between consentign adults. Hence my disappointment when I saw this headline. (Many of the comments to the P-I article reflected my feeling.)

I think there ought to be laws against sex with minors, due to their inability to consent. Although one has to admit that there is a degree of arbitrariness to the age of consent — why not 19 or 17 rather than 18? But I suppose the line has to be drawn somewhere. I hesitate to be fully candid in discussing this issue due to public nature of this blog.

Sex trafficking involving adult women (or men, I guess — can’t men be prostitutes, too?) should be illegal for different reasons. The most easily defended one I can think of is that such trafficking necessarily involves illegal immigration. Although I believe that we should have far, far more liberal immigration policies, a nation should have control of its borders. So traffickers are weakening the US’s control of its borders. Of course, for most commentators, illegal immigration is not the outstanding feature of sex trafficking. Instead, the focus is on the unfortunate situation of the women whom traffickers bring here. Either because the women do not want to be deported or do not have the skills to survive without their captors (language, culture, etc.), their captors have the leverage to force them to work as prostitutes. I don’t really know a whole lot about sex trafficking, so maybe I will hold off on coming to a conclusion, but I would just point out that an unfortunate situation is not necessarily one in which the government should intervene. For example, investors in mortgage-backed securities are in an unfortunate situation but should only be bailed out if their losses pose system risks to the economy (an externality).

Advertisements

A new version of Mines Ahoy is up! It turns out that my earlier post titled “Finished!” was a little premature. Not only were there problems that needed fixing, but there were a couple features present in the desktop minesweeper game that were not in Mines Ahoy. In particular, a timer and a list of best times were absent. So, over the last week or so I have completed a major overhaul of the game. The interface is spiffier, there is a timer, and you can see the top 10 scores for each setting (easy, medium, hard, and any custom settings that have been used). Read the rest of this entry »


Ahead of a cs class titled “Artificial Intelligence” that I will take in Winter, I’m learning Python. So, I thought, why not write Mines Ahoy in Python? It would require creating a GUI (I’m using the wxPython module for that) and using many of the language’s core features.  I’m going to give it a try. I can see that it will be substantially more complicated that writing Mines Ahoy as a javascript web application, mostly because I won’t be able to leverage the browser to draw the game and listen for events. Hopefully, wxPython will make that part not too much trouble. Perhaps I can implement some additional features as well, like a timer and high scores.

Updates after the break. Read the rest of this entry »


Depending on how experienced you are with minesweeper, this situation may not seem very difficult. It gave me a little pause, though. In the process of making this game, I have played it many times, but it’s interesting moments like this one that keep the game from being monotonous. Sudoku is ultimately a better pure logic game, in that it can provide a consistent level of difficulty. The random setup of a minesweeper-type game, by contrast, means that more interesting situations arise haphazardly (indeed, solvability is not assured), though adjusting the number of mines is a crude lever for changing the difficulty. The answer to whether or not there is a solution in this situation is after the break. Read the rest of this entry »


Mines Ahoy is now playable and pretty much done. It was a fun journey. Ironically, a month and a half ago, I chose this project because I thought it would be quick and easy. I was cloning an existing, relatively simple game, Minesweeper. Of course, I haven’t been working nonstop on this. More like three or so concentrated chunks of time. Some interesting problems came up, and there was plenty of the usual debugging frustration. Yet, somehow I am just completely sure that it was worth it. Which is sort of a different experience for me. Very enjoyable.

Updates related to ironing out bugs and other topics appear after the break. Read the rest of this entry »


I was reading xkcd last night (John has made me a fan). Then I found a youtube video of author of the comic, Randall Munroe, talking at Google (here). Donald Knuth was in the audience and asked a question. I had heard of Knuth before and knew he’s a big figure in computer science, so I went searching for a little more information about him. I noticed on his Wikipedia entry that he had a written a book related to surreal numbers, which I had never heard of. Intrigued, I discovered an introduction to the subject by a Danish IT consultant, Claus Tondering (here). Though he is not a mathematician, the document looks well written. There is also the wiki entry (here), of course, and this podcast featuring the inventor/discoverer of surreal numbers John Conway (here). In 1996, then high school student Jacob Lurie won an award for doing research on the subject (here).

I’ve only started reading Tondering’s introduction. The surreal numbers are an entirely different system from the reals we all know and love, built up from set theory. Their definition is very strange. A surreal number number consists of a pair of sets, a left set and a right set. These sets contain other surreal numbers. For a pair of sets to be well-formed and thus a surreal number, none of the surreal numbers in the right set can be less then or equal to any member of the left set. So what does “less than or equal to” mean for surreal numbers? To quote Tondering:  “A surreal number x is less than or equal to a surreal number y if and only if y is less than or equal to no member of x’s left set and no member of y’s right set is less than or equal to x.” So less or equal to is defined in terms of itself. How do we get anywhere with this? We need one surreal number to start off with, the surreal number with no elements in either its left or right set. After showing that the number is well-formed, call this zero and go from there.


Yikes, war has begun a mere two weeks before I was due on Georgian soil! Russia bombed military targets next to the airport I would have flown into outside of Tblisi. (Just search for “georgia” on Google News to find out more.) I was going there for a short study abroad program offered by UW (some info here and here). This is very unfortunate. I was looking forward to enjoying a supra (feast), meeting my host family, and seeing Georgia’s diverse landscapes and historical sites. Info on Georgian cuisine at Wikipedia and this ugly but informative site.


MR links to a Slate review of a cookbook on Chinese cooking of the non-Han variety, Beyond the Great Wall. On a related note, when I went to China two years ago for a study-abroad, I liked the Uighur food we had on several occasions more than the mainstream Chinese food. (It’s pronounced “wee-gur” as far as I know.) I remember dishes involving lamb, spices, yogurt, not drowning in oil… yum. Similar to Afghan food I’ve had here. Perhaps I didn’t have the best mainstream Chinese food (we spent most of our time in Beijing). I wonder where I could find Uighur food here in the US?

For a little context, here are the news results that came up for “Uighur” on google.


My year-old iphone has suddenly become more diverting than ever. I found a free app called Midomi that allows you to search for a song by singing into the phone or holding it up to a speaker. The accuracy is so-so, but the new app kept a few of us entertained last night for quite a while. My poor DS has never seen much use and now surely never will. On the other hand, at the moment I am experiencing a lagginess in the response of the phone’s UI that I probably wouldn’t get with the simpler DS platform. Hopefully things will improve with the next iPhone software update.


I took a web programming class last quarter, where I gained a little familiarity with javascript. I’ve been working on a minesweeper clone (link).