24
Apr 13

bash helper stuff

I get fixated a little on how to be more “efficient.” Part of that includes setting up my environment so it works well. When I’m using bash (a UNIX shell), here are a couple of things that’ve helped save time:

  • bash-completion: Totally Awesome. Use this or else. (Note that ssh ser<TAB> will complete the server name, for example.)
  • Bash Emacs Editing Mode cheat sheet. (Note I grew up in vi but have been dedicating a LOT of time to learning Emacs, so I use set -o emacs.)
  • bashmarks: gives you simple aliases you can use to move directories, e.g. “g alias” goes to the directory associated with “alias”.
  • git-flow-bash-completion
  • venv_cd: If you use virtualenvs, this will auto-“workon” them for you. Make sure you source this *before* bashmarks. I don’t know why, but my experience is that this needs to get sourced first so that “g alias” will also check for virtualenvs.
  • Learn your basic bash shortcuts, e.g. the power of squiggles “mv x{,-old}”, variable manipulation (e.g. “${x%.html}” removes “.html” from the end) and re-use of previous arguments e.g. “ls -l !$”

24
Apr 13

Stuff You Should Do when building a wordpress site

Update 4/25: added a section about menus.

I am not a WordPress expert. That said, I have learned a little bit about WordPress, and Lauren encouraged me to write it down.

Users

I use two users: “admin” and “john”. If you’re going to mess with your blog and it’s brand new, consider creating an account for yourself and giving it WordPress administrator access. Then everything will at least be recorded as you. Then “admin” user becomes your “user of last resort.”

General Settings

Reading

  1. Create two “pages”–“Home” and “Blog”. Home will be your home page. The content of “Blog” will be totally ignored; just create the page.
  2. Go to Settings > Reading.
  3. Change “Front page displays” to “A static page” and set Front page to “Home” and Posts page to “Blog” (the two pages you created in step #1).

Permalinks

  1. Go to Settings > Permalinks
  2. Select “Custom Structure”
  3. Type in “/blog/%year%/%monthnum%/%postname%/”. This will make your blog posts start with “/blog/” and your URLs look like “/blog/2013/04/stuff-you-should-do-when-building-a-wordpress-site/”

Plugins

Install and set up these plugins:

  • Akismet: pay for it if you need to (I did). Very important.
  • Disqus comment system: set up an account and do this. Move the comments infrastructure (including managing identities) from being your problem to being their problem. If you already have a blog and switch to Disqus, you can have WordPress import your comments. I did this last week but it took like 5 days before the import completed.
  • Google Analytics for WordPress: get an ID and do this.
    • Once installed, go to the settings. Click the “show advanced settings” checkbox. Set “Ignore Users” to “Subscriber (ignore all logged in users)”. Now when you’re logged in you won’t be added to the analytics.
  • Google XML Sitemaps: install.
  • If needed, Open in New Window Plugin. This adds JavaScript that will convert all off-site links to open in a new window. I used to think this was horrible practice, but many people seem to be doing this nowadays and now I kind of expect it.
  • Redirection, so you can manage your HTTP redirects within WordPress.
  • Slick Social Share Buttons. This can put a bunch of different services’ share buttons on your page. You can configure the heck out of how they’re displayed
  • W3 Total Cache, if you are concerned about potential spikes in traffic. This plug-in can be super complicated but it can also help you use really advanced capacity management services like CloudFlare.
  • Widget Context. This allows you to say widgets only show on certain pages–for example, the blog categories list should only show up on blog pages.

Themes

If you are the kind of person who will make ANY changes to your theme, you need to create a “child theme” for it. Basically you create a new theme directory and create a file called “style.css” in it that has a special comment header in it. Part of that header (“Template”) tells WordPress it’s a child theme. After you’ve set this up, you can select your child theme from the Themes list and it will inherit everything from the parent theme.

You put your mods into the child theme (e.g. additions to functions.php, other PHP files, styles). When you update the parent theme, these mods “stick” and you don’t have to re-do them.

Stuff you could potentially do with your theme:

  • Make an “author-<<username>>.php” page to have a fancier blog author page.
  • Change how blog lists show up and are summarized
  • editor-style.css: Change the stylesheets use in the editor to better mirror what visitors see.
  • Change your footer.php
  • Add JavaScript on top of your pages e.g. I made a “hide”/”show” thing for my work email sign-up widget.

Widgets

If you installed Widget Context, you can change where your widgets show up. I find this helpful especially to limit the blog-specific stuff from showing up on posts (i.e. non blog pages).

Menus

By default, WordPress will build a top-level menu for your site that includes all your pages that don’t have a parent. To change this,

  1. Go to Appearance > Menus
  2. Create a Menu (maybe called “Home menu”? The name is not important)
  3. Add whatever you want to it
  4. Save it
  5. Under “Theme Locations” (upper left), hopefully you have an option for “Primary Menu”. Set this to the menu you created (“Home menu”).
  6. Now only what you add manually to this Home menu will show up as your top-level menu.

24
Apr 13

Biannual blog update

Every couple of years I seem to update my blog. So, here goes.

I just moved my web hosting to webfaction. The shortest version of the story is, I started a company and have been doing some Django programming and webfaction is really good for Python-based hosting and I realized some of what I’ve been missing out on. In fact, I’d used them many years ago to host a Plone site for the UU Fellowship of Winston-Salem. (Anyone who advertises that they host Plone sites is pretty hardcore.)

Looking under the hood, I feel better about webfaction because…

  • They let you run multiple “applications,” which you can tie to one or more “domains.” For example, ‘johnborwick.com’ (no ‘www’) is running a bare bones application that just forwards people to ‘www.johnborwick.com’.
  • They have their own WordPress installer, which makes me feel better than the Fantastico/whatever the replacement for Fantastico is called. For my old host, if you wanted to keep your site up-to-date with the package manager you’d wait for a few weeks before they got the upgrade script. (I have also started to feel more comfortable giving WordPress the permissions needed to update itself.)
  • If I want to start building simple services for people, I can easily set them up as new applications on my account. (Before, I’d used Google App Engine to build a few test apps, but you have to subtly change your apps to run in that environment and I’d read some FUD about the ability to scale/lack of control you have with GAE.)
  • I feel like I have a lot of control, but the framework makes good sense.
  • They are highly regarded.

23
Sep 12

FreeBSD on a Lenovo H430 desktop

I used to use FreeBSD a lot.  (FreeBSD is an alternative operating system, kind of like Linux.  It is the basis for OS X and many other things.)  However, ever since I stopped being a systems administrator I haven’t had a FreeBSD machine.  Well, last week our Apple Time Capsule (wireless base station + backup device) died, and I wanted to try to “roll my own” server that could be our wireless access point plus backup system and more.

The thing about FreeBSD is, you have to really learn a lot to use it.  To my knowledge, there aren’t many simple configuration tools beyond the “sysinstall” installation tool, and if you run into any problems you are on your own (to try and Google your issues and fix the problem).  In case it’s helpful for others, here is what I’ve learned about installing FreeBSD on a Lenovo H430 desktop computer.

Things I’ve learned

  • FreeBSD 9.0-RELEASE does NOT recognize the built-in wired or wireless network devices.  You have no network connectivity.
  • Use the amd64 version so you can use all 8 GB RAM.
  • FreeBSD 8.3-RELEASE recognizes the built-in wired network device (yay!) but doesn’t recognize the wireless network card (boo).
  • I scrapped the wireless network card and bought a TP-LINK TL-WN881ND wireless card.  HOWEVER, I then found this card doesn’t work with 8.3-RELEASE.  This FreeBSD forum thread recommends you  recompile your kernel to remove the 8.3-RELEASE drivers, pull the FreeBSD subversion HEAD or STABLE/9 versions, and load those modules.  This worked for STABLE/9 at the point this thread was written (April 2012) but doesn’t work today (September 2012).  John B’s solution?  Use ‘svn -r {2012-04-21}’ to pull STABLE/9 from April 21, 2012!
  • Audio does not work automatically but it is simple: the snd_hda driver
  • For my monitor, Xorg’s autoconfigure gave me a max resolution of 800×600 (yay!)  I once again had to find the horizonal sync and vertical refresh rates for my monitor.  Do you know how many times in my life I have had to search through technical specifications to find the hsync and vrefresh?  Hint: it’s a lot, and finding it is usually pretty hard because my monitor doesn’t work properly.

Current setup

For the TL-WN881ND card, I had to do a bunch:

Here’s how I built the if_ath and if_ath_pci drivers:

PREFIX=stable/9
svn co -r {2012-04-21} {http://svn.freebsd.org/base/,}$PREFIX/sys/dev/ath
svn co -r {2012-04-21} {http://svn.freebsd.org/base/,}$PREFIX/sys/modules/ath
svn co -r {2012-04-21} {http://svn.freebsd.org/base/,}$PREFIX/sys/modules/ath_pci
( cd $PREFIX/sys/modules/ath && env CFLAGS=-I../../ make )
( cd $PREFIX/sys/modules/ath_pci && env CFLAGS=-I../../ make )

Built a custom kernel; here’s my unified diff from the GENERIC kernconf:

--- GENERIC 2012-03-03 01:15:13.000000000 -0500
+++ JOHNB-NOATH 2012-09-23 03:38:18.000000000 -0400
@@ -258,10 +258,10 @@
 device wlan_tkip # 802.11 TKIP support
 device wlan_amrr # AMRR transmit rate control algorithm
 device an # Aironet 4500/4800 802.11 wireless NICs.
-device ath # Atheros pci/cardbus NIC's
-device ath_hal # pci/cardbus chip support
+#device ath # Atheros pci/cardbus NIC's
+#device ath_hal # pci/cardbus chip support
 options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors
-device ath_rate_sample # SampleRate tx rate control for ath
+#device ath_rate_sample # SampleRate tx rate control for ath
 device ral # Ralink Technology RT2500 wireless NICs.
 device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
/boot/loader.conf:
if_ath_load="YES"
if_ath_pci_load="YES"
snd_hda_load="YES"

I’ve done several other things to the computer since, such as setting it up as a gateway (dnsmasq is awesome!!) and AFP server, but I think these were the main showstoppers.

 


15
Jan 12

Two selves: experiencing and remembering

Please watch this TED talk by Daniel Kahneman, a Nobel Laureate.  In economics and other fields, people have been trying to measure happiness–how happy are various groups, how happy countries are compared to one another.  I’ve seen Economist articles about quantifying happiness, like The Joyless or the Jobless (Nov 2010).

Kahneman deconstructs this quantification by saying the issue’s more complicated: do you care about happiness in the moment or do you care about happiness remembered?

His presentation addresses people’s fundamental assumptions about who they are.  We have two sides: an experiencing self, who lives only in the moment; and a remembering self, who feasts on what we (remember we) have done in the past.  The remembering self, for almost everyone, is the dominant one–it makes the decisions about what we should do next.


09
Jan 12

“Video Games” by Lana Del Rey

Our local public radio station, WFDD, has several HD radio stations, including one that plays a lot of “xPonential Radio.”  When we lived in Raleigh I got spoiled listening to WKNC, NC State’s student-run radio station that would play lesser-known modern music; WFDD’s HD radio station #3 is the closest I get to WKNC over the air here in Winston-Salem.

Anyways, one of the songs on xPonential Radio’s playlist is “Video Games” by Lana Del Rey (see embedded video).  I really, really like how this song sounds, and as I’ve listened more I really appreciate its lyrics.  (Note: in the below analysis I’m assuming this song is about a woman and her boyfriend, but the song doesn’t explicitly say the partner is male.)

The song has an epic quality, in its orchestration and in Lana Del Rey’s voice.  In its sound and its video it echos the 1950s and 1960s.

For me, there’s a jarring effect.  Ostensibly the song’s lyrics are about a fawning woman who would do anything for the man she’s with.  The 1950s/60s theme, and Lana Del Rey’s voice, reinforce that literal reading: a totally submissive woman.

However, you can also read the song as an undercutting of that theme: that the singer understands her boyfriend doesn’t respect her or value her as a person, and understands that’s his loss not hers.  In this opposition to the primary message the singer is detached and doesn’t care about her boyfriend.

There’s possibly a third level of interpretation, too, that the singer is staying in the relationship because society believes the world is only worth living in if someone’s loving you, and her actions make him love her, although he doesn’t realize that she doesn’t love him back.

She sings about how one-sided the relationship is: he whistles for her and she comes.  He wants her to play video games with her.  (I hear this as “oh, you’re here–hey watch me play video games.”)    She wears his favorite perfume and dress and does everything that he wants.

In the second verse, when she sings about being in his arms while he’s drunk, it reminds me of My Papa’s Waltz (poem) by Theodore Roethke, a poem about an abusive father and his complex relationship with his child played out as they dance while the dad’s drunk.

I think the turning line for “Video Games,” or the line that for me reinforces this reading of the song, is

I heard you liked the bad girls, honey / Is that true? / It’s better than I even knew

She’s said, openly, that she wants to know everything he likes, and she has to find out from someone else that he likes bad girls.  This is particularly ironic because everything else in the song implies he wants a totally subservient (“good”) girlfriend.  I think “It’s better than I even knew” is her acknowledging the irony and laughing or enjoying how her boyfriend is so unaware of others that he doesn’t realize the contradiction.


12
Dec 11

What is your time horizon?

I have a hypothesis: different people think in different “time horizons.”  By that I mean, some people think way into the future and past when they make decisions or observations, and other people don’t.  Maybe this is just obvious?

For example, let’s say that Alice and Bob are in a meeting trying to make a decision about where to go to eat lunch.  Alice may tend not to think about the future, so she recommends bean burritos.  Bob is thinking about the future (specifically, the level of ventilation in their shared working area) and may recommend a lunch that’s less likely to produce side effects later.

Or, let’s say Alice and Bob are deciding whether to invest in company A or company B.  Alice may remember that five years ago company A made a really bad judgment call, and Bob may not remember (or care).

Or, let’s say Alice and Bob are deciding whether to build a lamp that’s powered by phone lines.  Alice may want to go ahead, but Bob may resist because he thinks phone lines may go away in a few years.

When we’re making decisions, or trying to communicate with other people, I think a big assumption each party makes is that we’re thinking over the same time horizons.  At work I may resist us going in a certain direction because I believe that five years from now a particular type of technology will no longer exist.  Someone else at the table may want to go forward, because they know the technology would be useful now.  The conversation is frustrating for both sides because we’re taking past one another–my point, although perhaps true, is not relevant for someone who’s more focused on today.  The other person wants to make people happy now, but four years from now we might be in a pickle.

I’d like to posit some factors that might lead to different time horizons:

  • how accurate you feel your mental models are for the situation–do you feel comfortable projecting what will happen in the future?
  • along those lines, how much experience do you have with this type of situation?  how much have your mental models been validated/adjusted by experience?
  • how detail-oriented are you? the more details you care about, the more difficult it may be to approximate the future
  • to what extent is past performance an indicator of future results?
  • related to that, is the thing you’re doing today/this week/this month seem cyclical?  can you project what might happen in the future because it’s a pattern?

This immediately leads me to a couple of tentative conclusions:

  • very, very few people are going to be good at retirement planning until retirement is really close, because you just don’t have the “time horizon”–few people have any idea what it looks like to be retired before they’re retired, and except in rare circumstances (like if you’re a retirement fund manager) you’re not going to get any practice by which to improve
  • someone who tends to “pattern-match,” or look for similarities between things, would probably have a longer time horizon.  For example, if you work in retail and see each customer as a different person with their own unique needs, that’s great, but your job is going to seem more like past performance (past customers) are no indicator of future results (future customers).  However, if you work in retail and you see customers as more or less the same with variations, it may be easier for you to extrapolate to what next week’s business might look like
  • experience could help with extending your time horizons IF you are good at building better and better mental models through that experience
Anyways, at the least I will try harder to discuss the facts, observations, and mental models I’m using when I’m talking with other people about what I think the future may be.

04
Dec 11

Hundreds and thousands of regrets

Kathryn Schultz gave a TED talk recently called “Don’t regret regret” (embedded here).  She discusses the characteristics of regret, and how regret leads to growth, set against a culture that encourages us to avoid regret and to live without regrets.

When I think about regret, I think about a Zen koan that Wikpedia calls the “Wild fox koan.”  Briefly, my  limited understanding of this koan is that the head of a monastery answered a student’s question in such a way that he was reborn as a wild fox for 500 lifetimes.  (Presumably, the answer he gave was not sufficient.)  After the 500 lifetimes he asked the current head of the monastery the question he’d been stumped on, and presumably receives a sufficient answer because he is done being reincarnated.

After the koan, there is a commentary on the koan that says the former head of the monastery enjoyed 500 happy blessed lives as a fox.  The commentary is followed by a poem:

Not falling, not ignoring:
Odd and even are on one die.
Not ignoring, not falling:
Hundreds and thousands of regrets!

The “hundreds and thousands of regrets!” line has been jarring to me, because everything up until that point seems like it’s worked out for the best. But, listening to Kathryn Schultz, I think that may be part of the point of the koan: everything did work out for the best.

Update 12/12/11: restructured post, added a little context to the koan.


30
Nov 11

We think we know what’s happening, but really we don’t

In the beginner’s mind, there are many possibilities.  In the expert’s mind, there are few.  –Shunryu Suzuki

Although we may think we know what’s going on around us, our brain is guessing.  We don’t get much input from our senses to tell us, for example, what’s physically behind us, but we have a pretty good guess that if there was a Christmas tree behind me 5 minutes ago the Christmas tree is probably still there.

I’d like to call our brain guessing about the world our “mental models.”  I have a mental model of the room that I’m in, that helps me pretend in my brain that I know what’s going on in this room, what will go on, and what has gone on.  If I can be computer-y about it, it’s like I have a function

f_downstairslivingroom(state)

where I can guess, based on a state (e.g. night-time, no one’s at home) that I know what’s going on in the downstairs living room, or at least the boundaries around what’s going on in that room.  (In my mental model for this room there could be cats clawing our couches, or a robber, or nothing, but there’s probably not a clown dancing.)  In a similar way of guessing what’s going on, I may have a mental model for our cat Fred:

f_fredthecat(state)

where I can guess what our cat Fred might be doing based on what’s going on (e.g. how much food is left in the bowl, whether there’s a Christmas tree).

A few years ago, f_fredthecat(Christmas Tree) would have yielded in my brain “Fred is probably climbing the Christmas tree.”  He really liked climbing our Christmas trees and could climb two or three feet off the ground.  Now, though, he’s older, and f_fredthecat(Christmas Tree) tends to yield “I may find pine needles in the litterbox.”  My brain’s mental model for Fred f_fredthecat changed as a reflection of a change in Fred.

Minds tend to like guessing about what’s going on in the world, and I’d bet we each have hundreds of thousands of mental models.  For example right now I have mental models like…

  • f_myhomelaptopcomputer: this laptop’s plugged in and charging, its brightness is near maximum, its hard drive has plenty of space, it’s been backed up recently by Time Machine
  • f_jeans: my jeans are dry, they are comfortable
  • f_kitchensink: the kitchen sink is probably dripping right now although I can’t see it or hear it
  • f_weddingpotteryplate: the plate made by a family friend at our wedding is still balanced on our plate rail (I can see it), and even though it’s been there for several years I am still convinced it will fall soon
  • f_highchair: the high chair’s wheels are locked in place (untested)
  • f_workbuilding: Six months ago I would have thought our work building was empty.  Three months ago I went in at this time of night and saw a cadre of custodians cleaning and vacuuming, so now I’ll guess there are probably lots of people cleaning up.

All of these things are guesses–possibly very educated guesses, but they are guesses.  Although my laptop charging light is on, it is theoretically possible that power is not actually going into my computer.  (Aside: Can you tell I don’t understand how charging a battery works?)  As another example of a possibly false guess, although my jeans feel dry they could be getting wet and I haven’t noticed yet.

There are a couple of challenging things for me about mental models:

  • They are not real.  I think I know all these things, and that I know what’s going on around me, due to a small number of observations and a LOT of historical experience, reading, similar things, etc..  All of these mental models are reduced/simplified versions of reality.  The kitchen sink may have stopped dripping–it’s unlikely but possible.  The high chair’s wheels may be crawling with ants.
  • These models are unique to each person.  You may have a well developed mental model for how cakes bake in an oven.  Someone else, say a professional baker, may have another mental model.  These two expert models are probably very, very close to one another but they likely have small differences based in the different experiences of each person.  Yet we talk about “baking a cake” as if we all shared exactly the same mental model.
  • The models improve with interactions.  The more I’ve worked with something, the more experience I have, and the better understanding/guessing I can do in my mental model for the thing.  However (see next bullet)…
  • Past performance is no indicator of future results.  Just because the high chair has never exploded, does not mean it definitely will not explode.  My mental model does not account for the possibility that the high chair might explode.

The importance of first impressions

Mental models get really interesting for me when it comes to “new” things.  When I encounter something new, I search through my existing mental models to find an approximate match for the new thing.  For example, when I see a new chair, my brain searches through my mental models to find…

  • f_giantofficechair
  • f_uncomfortablechair
  • f_paddedchair
  • f_chairsthatcatssiton
  • ...

In other words, all of the different types of ways that I think chairs might work.  Then, when I sit down, I narrow down the range and eventually create a new mental model for this new chair that’s a mix of all my past experiences plus what I start to perceive.  Certainly, this is all done subconsciously, and is part of why I get surprised if the chair falls apart when I sit on it.  If that happened to me all the time, it would be part of my mental model.  Instead, if a chair fell apart when I sat on it my consciousness would wake up–“what the heck just happened?!”–and also my mental models for all chairs would change to include the possibility that the chair might fall apart.

Take all that and apply it to people.  I think that first impressions when meeting people are so important because you are sizing up the new person against all your other mental models of people.  You’re asking yourself who this new person is similar to.  This new person is “30% my eighth-grade teacher, 5% my best friend, and 65% that guy that punched me in the face.”  After more experience interacting with the person, that model would be refined, and maybe those foundational models are questioned–“oh, this person isn’t like my best friend at all”–but that mental model I’ve applied to the new person is, in my mind, actually that person, and it takes a good deal of work to realize my mental model was off.

On Guessing Effectively

So although mental models have lots of faults (such as being a poor caricature of reality although people think of them as reality), mental models are certainly useful.  They are the way our brain makes sense of the world.  I would guess that our brain has a core “function,” something like:

process_observation(observation, mental_models)

where when we observe something with one of our senses, that observation is filtered through our mental models, but then might update our mental models.  For example,

process_observation("I physically feel uncomfortable", {f_bed,...})

I feel uncomfortable laying on this bed, which reinforces my mental model about our bed, that it has an old mattress and needs to be replaced.  Or,

process_observation("I heard a squeaky noise", {f_bed,...})

if I heard a squeaky noise, I might guess it’s a bed spring popping, even if something totally different squeaked.

Basically I’m trying to say that as we hear, see, smell, taste, touch, or think things, these observations go through the filter of our mental models, but then have the chance to update or change our mental models.  We could perceive things “incorrectly” if our starting mental models are bad, or we could make poor conclusions based on how good we are at making better guesses.  All this to say, you have a big advantage if you are pretty good at updating your mental models from processing observations.  And you have a huge disadvantage if your mental models are so bad that you aren’t able to see they’re wrong and invalidate them based on observations incorrectly filtered through those bad mental models.

The better you are at guessing how things work and inferring how they work from your limited observations, questioning your mental models when they don’t make sense, the better you’ll do at approximating reality.  You will be able to make more lasting inferences and “predict the future.”  Mental models are not reality, but if you have skill at developing accurate mental models quickly then you will be “ahead” of reality getting your observations confirmed rather than running into input that contradicts what you think.


27
Nov 11

Why people play “Kingdom of Loathing”

This post is about a game, Kingdom of Loathing (KoL), and what I’ve learned about how the game works and how it motivates people to keep playing.  Despite this dry analysis, the game itself is very funny.

I have a “systems approach” to games, which I think means that I play them to understand the game dynamics.  However, although I’ve played for a while I am not an expert–as you’ll see below, this game is designed so that you could spend months of solid effort trying to understand how the game works.  This game is a trap for systems thinkers.

KoL is a “free, comical RPG.”  You can be one of six character classes: two are muscle-types, two are mysticality-types, and two are moxie-types.  For example, one myst class is a “Sauceror” that can cast spells like “Stream of Sauce.”  You have three corresponding primary stats, Muscle, Myst, and Moxie.

There are two big signals that this game is complex:

  1. It has a wiki, TheKolWiki, that currently has 8,599 wiki page entries including a chart of the best food to eat by main stat gain.  (Side note, “old school” wikis such as the original WikiWiki used StudlyCaps to indicate wiki pages.  I am guessing it is not a coincidence that TheKolWiki is written in StudlyCaps.) 
  2. There exists a front-end client, KoLMafia.  KoLMafia is designed for advanced players.  It automates many parts of the game such as adventuring, crafting materials, and shopping.
The high-level game looks something like this:
  1. Create a character and choose your class
  2. Level the character and complete all quests until you complete the final quest and defeat The Naughty Sorceress
  3. Gather other resources if desired, e.g. farm for meat (the currency) or items
  4. “Ascend” (i.e. start over), gaining some sort of benefit for ascending.  Optionally, choose to make your next game more difficult to receive additional benefits.  You can choose a different class.  Go to step 2.

Rewards

Here are the high-level rewards (as I understand) for playing–the things that motivate people to continue playing:

  • “In-club” rewards such as the “haiku” chat channel for people who complete a haiku challenge in the game.  By “in-club,” I mean you are recognized as being cool or part of an elite sub-group.  There are hundreds of these types of rewards–everything from access to special chat channels to membership in prestigious clans like “Noblesse Oblige” to special items like “phish sticks” awarded to players who had accounts during a phishing scam and then changed their passwords.
  • “In-club” knowledge, such as knowing it’s called “KoL” or that Hagnk’s Ancestral Mini-Storage was once hit by a chunk of comet.  This knowledge you can use on the KoL Forum, in KoL in-game chat rooms, or other places where KoL folk hang out.  This also relates to a fundamental element of KoL: puns and inside jokes such as the “Piano Cat” familiar or an in-game Soul Coughing reference.
  • Trophies and collections, to show people or yourself how much you’ve done in the game, or how much cool stuff you have.
  • Smarter ways to play for people who put the time and/or cash money into it.  As you ascend, you can “perm” skills that you’ve gotten with each ascension: skills like Mad Looting Skillz (+20% item drops).  You can also buy items with cash money, or with “meat,” that help you play.  Please see “equipment,” below.
  • Knowledge is greatly rewarded.  There are food and drink recipes you can learn, which give you more turns per day to play.  You can learn good secret places to “farm” for items or you can find some trick to level your character more quickly.  The game rewards knowledge, but also other players reward knowledge.  The game has self-selected players that like knowledge.  This is part of the “systems thinking” trap–this game is designed with facets within facets so that you would have great difficulty learning, for example, what’s the best item to make with a Tome of Clip Art.  In this example, you’d need to understand all the possible items you could create, their effects, why you’re using the effect and whether it would be cheaper to buy something instead from the mall (or if you just want something should you instead sell a created item to the mall), etc., etc.
  • Longevity.  As you’ve been around longer, you have the option of getting equipment that’s phased out.  There are also many things that you can only do a limited number of times per day, e.g. get filthy lucre from the Bounty Hunter Hunter, so only people who have played regularly for a LONG time have access to certain items.
KoL is designed so that additional elements are added all the time to bolster these rewards.  The Tome of Clip Art, which introduced dozens of new items and play possibilities, was added in fall 2011.   New trophies are created.  Smarter ways of playing (perhaps relying on new items or item combinations or new play areas) are introduced over time.

Equipment

KoL has MANY, MANY options for items, grouped into categories including (but not limited to):

  • clothing (hats, pants, accessories, and shirts–if you have the Torso Awaregness skill)
  • weapons
  • familiars (creatures that help you fight, or farm for meat, or do a host of other things)
  • food and booze
How do you get this equipment?
  • monster drops: when you beat a monster, or when you use a skill on a monster such as Pickpocket.
  • “semi-rare” adventures: every ~100 adventures.  There are formulae depending on what kind of run you are on.  One of KoLMafia’s many features is that it tracks your next semi-rare adventure.
  • ultra-rare adventures
  • quest/adventure outputs: you get items when you complete certain quests
  • existing: you get gifts on your KoL birthdays or on certain other occasions
  • holidays: there are in-game holidays where you can get special items
  • gifts: you can give and receive gifts from people
  • Bounty Hunter Hunter items: you can earn “filthy lucre” (one per day) for completing Bounty Hunter Hunter quests, and when you have enough lucre (200 for the Manual of Transcendent Olfaction) you can get special Bounty Hunter Hunter items
  • buying it with cash money: there is a store called Mr. Store where you can buy Mr. A’s for $10 USD and then trade Mr. A’s for other items.  In probably the smartest monetization of gaming, most of the items you can trade for (sometimes called Mr. Store items) are replaced monthly.  For example, according to the wiki, in January 2005 (only) you could trade for an “orphan baby yeti.”  The only people who have these yetis in the game now are people who traded for them in January 2005, or whoever won first prize in a raffle in 2008, or whoever bought these items (with meat) from the people who had them.
  • buying it with meat: there is a mall, where players can set up stores and sell most of their items.  (Some items are marked non-tradeable.)  To get meat, you can buy it–$10 USD Mr. A’s currently sell for around 10 million meat–or you can earn it–150k meat/day is a good haul (for me).  (This means your meat farming earns you around 15 cents/day.)  Some people “play the market” with the KoL mall, by buying cheap items and then selling them for more money later.
Each type of equipment can give you bonuses, and there are outfits if you wear certain combinations of hat/pants/etc.  Mr. Store items help you much more than “free” items, with the exception of some ultra-rare items or special reward items.
Notably, when you ascend, you can choose to play in a “hardcore” mode, or not.  If you play in hardcore mode you don’t have access to any of your old equipment EXCEPT YOUR FAMILIARS.  I think this makes familiars extra popular, because “really awesome” players play in hardcore mode or some even more hardcore version of hardcore mode such as a Bad Moon run.

Conclusion

Even here, I can’t capture the high-level gameplay in under 1000 words.  The KoL designers are brilliant, and I am sure they make good money with how they’ve designed Mr. Store and the mall.  This game attracts really smart people, and keeps them hooked. I broke my addiction most recently by reading a great walkthrough that called for ~$500 USD worth of items for “optimal” play.  I have now broken my addiction twice (so far) but keep getting tempted to play again and learn more and write my own KoLMafia scripts and play the KoL mall and buy Mr. Store items that I can sell in a couple of years to others.

I guess my simplest conclusion would be, if you have some time to kill and like puns, try playing Kingdom of Loathing, but don’t fool yourself into thinking you can find an “optimal” strategy for playing the game.  It’s misleadingly complex.