the inevitable minecraftness

So I worked through Minecraft over Thanksgiving weekend. It doesn't have an ending as such, but I got to the bottom of my cave, found some diamonds and redstone, mined some obsidian, built a portal, and saw the Nether. I built the things I was interested in building. I didn't get into the whole trap business or the multiplayer. It's a really compelling little piece of art, and I'm boggled with joy at the amount of money it's made for its creator.

The whole experience got me thinking about the power of open land, and the effect that the concept has on us. American history in particular is full of the idea that land is there for the taking: just move in and set up shop. Even setting aside moral/ethical questions, that idea hasn't really been operable for over a hundred years, but I think we find it compelling anyway, because land is so inherently desirable to us. Almost like gold, or jewels.

It gets me thinking about how and where people like to live. People love water, and love to live next to water. People love to live near their food. People love to live next to other people. People love to have their own land. People love to have ownership over their space. From an evolutionary point of view, it makes a lot of sense. Games like Minecraft and Dwarf Fortress hit a lot of these notes, and add just enough game to keep us hooked.

progress

The diet is going pretty well. I'm fitting back into my old pants, and I'm still on a pretty good downward slope. It's still stressful though; I've had to recommit lately, and it's been painful. But the results keep me moving forward. So far I've lost 40 pounds, and I think I have about 20 more to go.

In other news, the job is going well. I'm starting to understand how this place works, and I've been able to solve some hard problems, which is always gratifying. But the double stress of job + diet has been wearing me down, and my home life has been suffering. I've basically been a zombie at home, which is kinda bad. I miss working on stuff and I've been feeling a bit hollow. Probably because I basically just play LoL all the time. Breaking the funk is hard. Maybe I should throw a party and make tacos for everyone. :-P

a new job

Hay guys, I got a new job.

It's at Riot Games, they make League of Legends. LoL, as they call it, is a free-to-play team PvP DotA-style game.

Um look idunno. But they're in Culver City, which is way way closer than my old job. I've been playing the game like crazy for the past few weeks, Annie can attest, and I'm really excited about working there. Riot owns their own IP, they are their own publisher, they're profitable, and they're growing very fast. That is exciting.

I feel like there's a lot to say about changing jobs, but when it comes right down to it, I'm not sure I need to say it. It's stressful, and I'll miss the old people, and I'm nervous and excited about the new thing. So there you have it, in a nutshell. I am definitely looking forward to having an hour of my day back. More to come.

holy wars: are we in one?

from: Who Is Us? | Talking Points Memo

The only way this makes sense is if you imagine we're actually involved in a sort of global half-racial holy war against Islam. From this perspective, it's sort of like some 'good' Germans trying to set up a Beer Garden in Tel Aviv in 1950 or perhaps 1944. To which folks might say, 'Look, we know you guys didn't do the Holocaust yourselves. And maybe you mean well. But it's just not right. Go somewhere else.' And most of us would probably see the logic of that sentiment.

Now, I get it. Quite a few people think this is precisely the point. (Not a lot of TPM readers. But a lot of people. Let's not kid ourselves.) We are engaged in a half-racial holy war against Islam. It's not us versus a series of interconnected terrorist networks which are relatively small but episodically quite lethal. It's us, the white Christians and our Jewish junior partner sidekicks versus the brown Muslim people. (If you're keeping score at home, let's call it the Judeo-Christians -white jerseys- vs. the Muslims -brown jerseys.) So isn't it a bit soon for these Muslims, even if these are some of the good ones, to come over here from wherever they're from in the Middle East and set up shop on Judeo-Christian territory? Particularly where the first battle of the Holy War was fought? Soon? ... heck, the Holy War is still on. As Eric Cantor said a couple days ago, C'mon!

Sometimes I wish that it were possible to have an open and honest discussion about worldviews. I think there's a lot of stuff like this that could use a few gallons of sunlight dumped all over it.

For the record, I do not believe that we should consider ourselves to be in a holy war. I find the controversy over the Mosque to be embarrassing. But considering this point of view is illuminating. It's a good reminder that other people see the world differently.

achievement unlocked:

fit back into old pants. 10 pts.

progress reports

I have succeeded in reducing my portion sizes at meal times. In fact, I've almost been too successful, in that I can eat almost nothing for breakfast and lunch, and really be pretty much ok with that. Which means I can eat basically whatever I want for dinner without blowing my diet. So that's cool. But of course, it's pretty much against the advice of "eat more, smaller meals, and don't starve yourself." For now I'm going with it though; I can worry about maintenance after I lose another 40 pounds. Until then, I basically want to lose the weight as quickly and painlessly as possible.

Regarding my new phone. It does feel like the future. It's not perfect yet, I wish the reader and picasa integration were a bit better. I wish there was a netflix app (I hear there will be someday). But so-far it is strikingly easy to use, and astonishingly capable. I like reading my rss and listening to audiobooks at the gym. The battery life seems sufficient, which was one of my big concerns. They've spent a lot of time and attention sanding down the rough corners of the interface. I can see how this thing wants to integrate itself into my identity. It's offering me a kind of cyborg symbiosis that I find strangely alluring.

<_<

game goals

We playtested the zombie boardgame on Sunday. I think it was a lot of fun, even though we didn't get past the first room and at no time did it really feel "balanced." I learned some specific things and some general things.

Specific things:
-threat needs to scale with players.
-blundering is no fun, or at least it was happening too often.
-balancing the stats was very difficult, nerve seems mad OP, melee weapons were not compelling.
-gear is not yet well understood.
-controlling spawning via line-of-sight can be grossly unfair and forces the humans to do weird counter-intuitive things to maintain sight lines. Which also kinda breaks the story a bit. Perhaps all spawning should be "when an area is revealed" or via "exterior points" (i.e. windows, etc.)

But with all that, the core mechanic seemed fun.

General things:
The game needs a thesis. Or, it needs a story. When you sit down to play it there should be a shared expectation of where the game will go. With this game specifically, I wrote it to be a game about the heroes getting inexorably worn down by zombies. So they start strong, but by the end of the map they just barely escape with their lives. But I think the playtesters expected to start weak, and get stronger while facing increasing danger over the course of the map. So, either I need to adjust my perception, or I need to find a way to adjust the perception of the player. It might be possible to do this by calling on various genre tropes in the way the game is described. Or, perhaps my perception is simply out of step.

The game doesn't handle player death very well. We have a cool mechanic where when a stat drops to 0, you're "bitten," you get a +3 bonus on all rolls, but you can't win, and the next hit kills you. But after that there's no way for dead players to participate. If death is permanent, then the maps need to be really short. If death is temporary... then that needs to be designed in somehow. Descent has a concept of "Conquest" that deals with this problem rather neatly, but I don't know if there's a corresponding horror genre trope.

So I know what I need to focus on for the next iteration.

contractors are funny people

No offense.

We got a few windows quotes. We picked one. Now I'm trying to give this guy money and he won't show up at our house. Well, no-doubt he will eventually. But I think it's funny how the relationship suddenly changed when we said we were ready to start, and the change is that suddenly he's way too busy.
:-)

coin jar dinner: cafe pierre

Yesterday we took the coin jar in for cash. The coin jar is a nalgene bottle, so that's about $80. We had a really nice dinner at Cafe Pierre at Manhattan Beach. The coin jar *almost* covered it.

It's nice to have a fancy meal once in a while.

what do I want to think?

I wonder if I could use a tool like cognitive behavioral therapy to intentionally change my attitude about failure and public risk-taking? It's usually used for more clinical purposes, such as treating PTSD, anxiety disorder, etc.. But the focus on the connection between thoughts and emotions, and our ability to change how we think, is appealing to me.

It's interesting to try to figure out, if I could change how I think, what would I change?

Programmer, program thyself.

boiling it down

A few days ago we made pasta sauce from scratch in our slow-cooker. Fresh tomatoes from the garden, tons of delicious ingredients. It came out pretty tasty. But it could have been better. It was too watery, and when you took just the chunky parts, they lacked some of that intense flavor that we had been expecting. Usually when we make it on the stove that's not a problem, because the excess water boils off and the flavor sticks in the sauce, but the slow cooker has such a good seal that you don't get the same effect. Interesting, and it will be remembered.

After reading slacktivist for a while, I think I've boiled down his essential thesis to this: "self-delusion makes you stupid; intelligence means examining yourself and your beliefs. Anyone can be smarter or stupider by following the corresponding path." Which I think is an incredibly strange and powerful formulation of a thing that people have been saying for a long time, "the unexamined life is not worth living." See also: the scientific method. I'm trying to figure out if I believe it literally, or just allegorically, but he makes some interesting arguments, especially regarding empathy and bearing false witness.

It's really difficult sometimes, for me to keep an open mind in the face of my visceral emotional response. This comes up at work, and when reading the internet, playing a game, etc.. Really anytime. But I value the struggle. Regardless of (or in addition to) simply wanting to think that I'm "being smart" by considering a point of view, I'd also like to (smugly) think that when people, generally, consider other points view, the world is a little bit of a better place for all of us. In other words, when you consider another point of view, you make the world a better place.

It's like planting a (literal) tree. Most of the trees you plant may not grow above 2 inches tall, but if you plant enough, you will have facilitated many grand trees by the time you're old. And that's a pleasant thought, no?*


*damn I need to start planting some trees I guess.


file under: unrelenting smugness.

challenges and choices

I recently got a silent promotion* to Senior Engineer here, which I thought was funny, until they put me in charge of the Pets strike force, and I now understand how deadly serious it is. I'm heading up the engineering effort to add pets to our MMO platform, and now all of a sudden I have to do things like "code reviews" and "assigning tasks," which is always a challenge for me, because I often have very specific ideas about how everything should be done, but delegating means letting go to some extent.

Actually the best practice I ever had in delegating was my time as work frosh for Interhovse, back in the day. I found that people really need a clear task, that suits their interests and capabilities, and in some cases a lot of support in terms of tools and advice, but given that they will take ownership and really shine. It was such a great experience, being a part of that process, that I chased it all throughout college. The dolphins, the HME, all that good stuff.

Well anyway it's tricky, making a shift now from being a programmer to being a team leader. I'll still be doing a lot of coding, but more and more of my time is probably going to be spent on other people's code, which frankly I am not thrilled about. But on the other hand it means I can tackle bigger problems, which is fantastic. I know that a lot of programmers have trouble making this transition, and I can see why. So I hope I can beat that curve.

And also I might have to buy some nicer shirts. :-/


*I know right? But in a small office, almost nobody ever uses anyone's actual job title. So to announce it would be rather conspicuous and frankly probably not that great for the morale of people who haven't been promoted so, I can see the point. Of course, it's possible that everyone else was already a senior engineer, and I just didn't know it. :-p

getting serious about it

So the whole weight-loss thing. Sam keeps mentioning this Hacker's Diet thing, and on Friday I finally looked it up. It's a free online book and a set of free tools to go along with it. I found it, as promised*, extremely compelling.

The approach the book takes is that weight is a problem to be solved, just like any other problem, and it examines the problem from an engineering and management perspective. The thesis is that people who have chronic weight problems (e.g. the author, e.g. this author) have a broken appetite. Some people have bad eyesight, some have faulty appetite signals. No big deal. Except that you can't just go to the CVS and buy corrective appetite-glasses.

So the thing to do is to build a set of external tools that can do what the appetite should be doing. In building the set of tools, he brings up a few key points:

1. Your weight varies day-to-day by much more than the amount of fat you gained or lost, because of water. But, it is mathematically simple to calculate a trend line from your weight data that will give you real, solid data that you can rely on week after week. In other words, we can accurately measure the results of our actions.

2. People (or at least, people who need to lose weight) are assumed to be terrible at estimating calories. Look it up, plan it out, know what you eat. You can also control the input.

3. If you have bad eyesight, you will need glasses for the rest of your life (or until you get laser surgery.) If you have a faulty appetite, you have to apply external tools for the rest of your life**. If you do, you can keep the weight off.

And the rest is details, such as knowing that the first 48-72 hours of a diet are the most painful, such as forming a habit to weigh in, such as knowing how to counts calories, and all that other common sense (!) stuff.

I've been on a diet for about three weeks now, but over the past two days I read the book and I'm ready now to get really serious. I've been unhappy with my weight basically, forever. But I've always tried to manage it intuitively, and I've always denied, at some level that my appetite was broken. Admitting that it's broken is actually really liberating. Seeing a path to correct it is really empowering***. 

I don't know if this book would work as well for non-engineers as it seems to have worked for me, but hey it's free and it's online.


*Nothing was actually promised.
**But you DO NOT have to be hungry for the rest of your life. Getting past the worst first few days has made a new man of me.
***Yes, I will have to weigh myself every morning, for the rest of my life. That now seems a small price to pay, which is interesting because I've balked at the same idea many times before. But knowing that the only thing I care about is the trend line, not the number itself, is really comforting to me. Removing the noise from the signal and shortening the feedback loop is an extremely good optimization for any control system. Weight is a control system. My natural weight control system is broken, but I can fix it with tools.

bmi

Today, Wii Fit told me that I am no-longer obese. I feel simultaneously proud and insulted.

BMI. Pretty annoying.

Also, thanks to everyone who encouraged me. The hunger pain has indeed gone down somewhat, and the results feel good.

marking the moment

I now think of myself as an adult. And I think I'm ok with that, really. It doesn't mean I stop having fun or anything, but there are simply a lot of subtle cues all around my life, that tell me that when it comes to classifying myself, adult is what I am.

A little rough around the edges? sure. Eccentric? hopefully. But fundamentally, no-longer a "young person."

smartphone research, and seeking advice

my phone research let me show you it.

So... I want a smartphone. And thanks to a recent windfall, I can now almost justify getting one. But, I have serious, serious reservations about jumping in to the deep end of the pool in terms of monthly contracts. For reference, with my pay-as-you-go plan from Virgin Mobile, right now I spend $20-30 a month. (I make few calls, I send few text messages, and I don't do twitter.) So if I buy a smartphone that will be a pretty big cost difference.

Anyway I've been researching and waiting. I've come to the conclusion that what I really want -- a pay-as-you-go smartphone -- does not exist, and isn't going to anytime soon. So then, what are my options, and how do they stack up?




HTC IncredibleHTC EVOiPhone 4Google Nexus One unlockedGoogle Nexus One
Carrier:VerizonSprintAT&TT-MobileT-Mobile
Up Front:200200200530180
Monthly*:7570706080
Total cost 1 year:11001040104012501139
Total cost 2 years:20001880188019702099
Total cost 3 years:29002720272026903059
WANT: 
1-10
87787
what?very well reviewedno battery life, too much like a monster trucktoo Apple, but.. probably a really good phone.no contract, but also less support = ??too much $.


As you can tell I'm deciding between an Android phone and an iPhone, and my preference is leaning slightly towards the Android, but only slightly. 

It turns out they all cost about the same. Especially since, if I'm going to be honest with myself, I can be pretty hard on my devices, and a phone I buy might not last 3, or even 2 years. So there's the replacement/repair cost to be considered as well, and that makes an unlocked phone relatively less attractive.

It's striking to compare the cost of a phone with the cost of, for example, a TV. A television lasts maybe 5-10 years. If it lasts just 5 years, and I spend $700 on it, then my cell phone is more than 6 times as expensive as my TV. (Of course, that doesn't count netflix or cable subscriptions... but it also doesn't count phone overage or apps.)

No decision has been reached. Does anyone have any words of wisdom?


*Raw research:
android phones
http://www.wired.com/gadgetlab/2010/06/the-android-army/


Verizon - HTC Incredible
$200 + $75/mo
($39.99 plan + $29.99 data + $5 text (200 messages))


Sprint HTC EVO
$200 + $70/mo
http://shop.sprint.com/NASApp/onlinestore/en/Action/DisplayPlans


AT&T - iPhone 4
$200 + $70/mo (down to $60/mo with 200MB data limit... interesting but annoying...)
http://www.wireless.att.com/cell-phone-service/packages/packages-details.jsp?q_package=sku4710254


T-Mobile - Nexus One
Unlocked
https://www.google.com/phone/choose?hl=en&gl=US&s7e=
$530 + $60/mo
http://www.t-mobile.com/shop/plans/cell-phone-plans-detail.aspx?tp=tb1&rateplan=Even-More-Plus-500-Talk-Text-Web
Nexus One Contract
$179 + $80/mo
http://www.t-mobile.com/shop/plans/cell-phone-plans-detail.aspx?tp=tb1&rateplan=Even-More-500-Talk-Text-Web&dpid=RCI500TTW

database design for revision history

So, I was working on a personal project yesterday, and I came across a bullet point in my notes that looked like this:
  • implement item revisions
And it stopped me cold in the middle of a pretty productive session.

I originally designed my database to represent the "current" state of the system. So my central table, Item, doesn't yet have a concept of "history" or "latest revision." And I don't mind changing it, it's still a young system and very much work in progress, but the question is, what's the right way to represent an item that's been through an arbitrary number of revisions?

The constraints are:
  • The solution should be clean (normalized or nearly normalized)
  • The solution should be simple to code against
  • The solution should be high performance and very scalable
  • The solution should be applicable to other tables if/as needed
So after reading around and thinking, a couple of options pop up.

1. Rebuild it on the fly:

Never update anything, just add a new "RevisionItem" that points to the original item. When you fetch an item, also fetch its latest RevisionItem, and in most cases render that instead of the original. This will cost you performance, but it does make the revision history absolutely clear, and it means not modifying the Item table. As a side note, this method fits well into the design pattern of this particular project, where items generally have other items (comments, tasks, sponsorships) associated with them.


2. Log the old versions:

You can keep a "ItemRevisionLog" table, which stores old versions of the items, while the Item table always stores the most up-to-date. The advantage is that you don't have to change the Item table at all, and you keep it from bloating. The disadvantage is that you have two tables with the same columns-- not great design, and if you change one you have to change the other.

3. Add an isLatest flag to your data:

You can just keep every version of the Item in the Item table, and use a flag to find the current version. This runs into problems because every Item query now has to do a lot of extra work, and also you need to think very carefully about your primary key. (i.e. when other tables link to an item, they are now linking to many item revisions, not a single row.) Still, it's not unworkable. Just a little ugly.

4. Treat revisions as first-class data, and normalize them:

Make a table called ItemRevision, and put into it everything about an item that you want to be able to revise, and add a couple of columns for date, editor, and item_id. Then take those columns out of Item, and instead give it an ItemRevision reference called "latestRevision." Each revision is now available when needed, and that data is only written once. Retrieval is also a simple join by id. The downside is you have to be very explicit about what is revisable, and you have to change your data design every time you change your mind about what can be revised (e.g. right now).

***

So I'm going to cut to the chase. Number 4 is really the right answer, it seems. Anyway that's what wikipedia does, and their capacity for revision management is [unquestioned? unassailable? practically idiomatic?]. Also I found this great chart of the wikipedia schema, which, if you're into that kind of thing, is pretty cool. It's pretty clean, for all the work it does. Color me impressed.

You can see how they handle page revisions right in the middle of the graph. The Page table points to a Latest Revision, while each Revision table points to Page. A separate Text table stores the actual page text, for reasons that are not immediately clear to me, but that I will assume don't really apply to my much smaller and simpler system. In any case the chart, working in combination with a good night's sleep, has convinced me.

This has been a fun puzzle for me, and once I stop grumbling about rewriting my Item data access to go through a "revision" object, it will make me a better person.

programmable keypad update

(see here)

It's the best!

I filled up all 24 keys. Only 3 with single-keystroke keys (tab, enter, delete), the rest with all kinds of wacky keyboard shortcuts.

I'm pretty happy with it. I might buy another one for home if I start uh... using my computer more.

funny thing about biology

So I'm trying to eat less and exercise more and all that good stuff, but one of the funny side effects of eating smaller portions, is that it turns "the story of Nate working on some stuff" into "the story of Nate trying not to eat stuff." It's amazing how distracting hunger in particular can be for me. Part of the problem is that when I'm working hard, I'll often pacify my body with a large meal. Really not a very good habit when "working hard" means "sitting perfectly still at my desk with a pained expression on my face." But changing the habit is proving difficult and disruptive.

Sigh. :-p