2009/07 Archives
Wed Jul 29 00:20:48 EDT 2009
omerta
Thanks to HN, I've been going through the archive of Paul Carr's former column for The Guardian. Carr's a technology journalist, specifically, a web technology journalist, and has an uncanny knack for making the most boring thing in the world ("social networking services") sound like non-stop cocaine-fueled parties. He's quite the writer.
But like every other technology journalist in the world, he's fucking batshit obsessed with twitter.
I'm not going to talk about why I don't like twitter (Think of your favorite criticism of the service, then imagnine me nodding along slowly) since twitter-hate is as cliche and played as twitter love.
Instead, the bblog policy will be, from now on, that twitter doesn't exist. No such thing. When it talks, no one hears.
Remember how I cited Jay Lake's twitter in the Star Trek afteraction-report? Never happened. And archive.org has concluded that bbot.org is owned by a domain squatter, after four attempts to index me, so there's no wayback machine to contradict my airbrushing.
I'm sure everyone can agree that this is a much more mature course of action than whining about it. Now stop sending me invites.
Speaking of invites! Thank you, JackSparrow, for inviting me to HDahoy. I'd thank you directly, but there doesn't seem to be a messaging interface. Beta for a reason, it would appear.
Sun Jul 26 01:00:06 EDT 2009
testing a battery pack like a man
Blogathon 2009 wordcount: 1397
About a year ago, shortly before I quit my job at lowes, I bought an electric bike kit,[*] since I was, at the time, commuting to work by bicycle, and thought commuting to work by electric bicycle a splendid idea. Once unemployed, my enthusiasm for spending money to commute faster to a job I no longer had held little appeal, and the batteries disappeared into a box in the next move. They remained in that box for the next year, until it occured to me that I really shouldn't have left lead-acid batteries flat for so long, and embarked on a frantic search for them.
*: When I bought it, you could just buy the motor and controller by themselves, but apparently batteryspace has started bundling their battery packs with the motors. I couldn't recommend buying from them before, and I certainly can't now.
Sure enough, when I found them and hooked them up to the charger, it charged for a good five seconds before reporting that the pack was completely charged, which meant, either that the pack was sulfated and now had bugger all capacity, or that the charger was broken.
Fortunately I had a 8 ohm power resistor on hand. Since I=V/R, that means the resistor would draw 4.5 watts at 36 volts, well within the pack's discharge limit, but not so light that it takes forever to run down.
Unfortunately, the power resistor is only rated to 20 watts, and I'll be running 140-odd through it, which would be a problem if resistors went pop and stopped working as soon as you exceeded their power rating. Fortunately, resistors can handle substantially more power with heroic cooling.
Baby, I'm an overclocker.
Heroic cooling is what I do.

The setup is the battery connected to the terminal strip through some Anderson Powerpole connectors, then to the power resistor, with the two 16 gauge wires connecting it to the multimeter.

The resistor itself is suspended in approximately 500 ml of water, which should have enough mass to keep from boiling over the half hour or so it'll take to discharge the pack, not that a mere 100C would damage the resistor.
Following the advice of Derek Lowe, I considered the very worst case scenario of my test setup. That would be a internal short and resultant lead metal fire. Thus, two fire extinguishers,

and a nearby door, for running away.
Thus equipped, I sat down with my trusty pocket-watch, and, for the next twenty-three minutes, wrote down numbers. The results!
And the raw data [7.4 KiB .ods].
You can tell that it's real science, because the data is so ugly.
Unfortunately, I terminated the test at 10.55 cell voltage, having forgotten that the datasheet graph, at a equivalent discharge, ran the cells down to 9 volts.
This makes it impossible to calculate the real capacity of the battery with any precision, but a rough estimate puts it at 120 amp-hours, well above what would be considered "dead", and pretty close to its original capacity. Science!

The water heat sink got fairly warm (~45-50C) nucleated bubbles on the interior of the glass, and gently steamed, (which I utterly failed to photograph) but otherwise worked perfectly.
Sat Jul 25 23:30:16 EDT 2009
copper II: apache virtual host configuration
Blogathon 2009 wordcount: 907
So I purchased a dedicated server from serverpronto (the starter+) on advice of Steve, because I was tired of using NFSnet's e-mail forwarding to a gmail account, since that toolchain relies on several people to do their job perfectly, one of which (Google) who doesn't even get paid for privilege. I'd much rather have the whole mess in my hands, so I can get mad at myself when it doesn't work.
But configuring postfix is hard, and apache is easy, so I decided to get apache working first.
The server itself I named copperII, in memory of the late, great, copper.
I have a total of five domains, bbot.org, 7chon.org, unitinu.net, kyonko.org and bierwagen.us. The last four don't get any traffic that matters, so I moved them over first, saving bbot.org for last.
Moving was a simple matter of four ftp operations, and one scp. The Pointless Four consist of either a single index.html file each, (7chon, bierwagen) or an index and an image. (kyonko, unitinu)
bbot.org, of course, has quite a lot more stuff, and thus required a recursive scp. Amusingly, this had to be done from copperII, and not from my laptop, since a architectural bug requires a fairly insecure workaround to be able to ssh out from ssh.phx.nearlyfreespeech.net. Bizarrely, this presents with the error message "Host key verification failed", when the problem is that it can't open /dev/tty.
I copied each site to its own directory under /srv/www/vhosts/, then proceeded to make a virtual host configuration file for each site in /etc/apache2/vhosts.d/ by editing the provided template file with the information for 7chon.org, then using a simple sed pipe operation of the form "s/target/replacement/g". S means substitute, and the final flag means "globally", or else sed will just replace the first instance of target with replacement, which is hilariously confusing the first time you forget the final g.
copperII:/etc/apache2/vhosts.d # sed s/7chon/unitinu/g 7chon.conf > unitinu.conf
copperII:/etc/apache2/vhosts.d # sed s/org/us/g unitinu.conf
The format of the virtual host config file is fairly straightforward. For minimum functionality, all you have to do it set ServerName to the domain name, then DocumentRoot and the final Directory tag to the full directory path. Once you do that, run httpd2 -t to check the configuration files (it should return "Syntax OK") and whatever distro-specific services manager operation to restart apache. In suse, it's /etc/rc.d/apache2 restart, though you should call it with status first to make sure it's running.
After that all you need to do is change the A records for each domain to point at the IP address of the server and it magically serves different content depending on what the client asks for! Magic!
On copper I set up logging so that bbot.org got its own log file, while the other domains logged to a common file. This is done by setting the CustomLog variable to /path/to/log and type of log, the type of log, if not one of the default log formats, being defined by LogFormat.
bbot.org was told to log to /var/log/apache2/bbot-access and bbot-error using the default combined log format, but the other sites had to use a custom log format that included the name of the site in the common virtual host log file, or else I would get confused, and cry. Fortunately for me, Apache provided an example of a common vhost log format in the documentation, saving me from having to exercise independent thought.
LogFormat "%v %l %u %t \"%r\" %>s %b" commonvhost
ErrorLog /var/log/apache2/vhosts-error
CustomLog /var/log/apache2/vhosts-access comonvhost
This started logging to the correct location, but all it actually logged was "comonvhost" over and over, indicating that it had correctly parse the configuration file, but had ignored the LogFormat setting, for some reason. You should be able to see why.
Correct! As stated in the Official Apache Foundation Documentation for HTTPd 2.0, there is a typo in the CustomLog setting, specifying the log format as "comonvhost" instead of "commonvhost". Apache, slavishly obeying what I told it to do instead of what I wanted it to do, proceeded to log the word "comonvhost" to the access log on every access. Thanks, Apache.
This can be thought of as an example of the age old SQL injection exploit, only implemented in brain matter, and thus impossible to patch. I implicitly trusted the documentation, and thus copy and pasted the code snippet into my configuration file without thinking about it. Thanks, brain.
Next: Awstats, Postfix, and the TF2 Dedicated Server!
Sat Jul 25 01:49:17 EDT 2009
talking the talk VI
bbot: blog more
tee: i have to have a deep subject first
tee: so they all stay good
bbot: I challenged dravas and atanok to a blogathon
bbot: whoever has the highest wordcount wins
tee: lol
bbot: I bet I can beat all three of you
bbot: Combined!
tee: :3
tee: probably cause i dont just make random posts about dog poop
tee: hoping people will enjoy them
bbot: What's that? Is that the sound of a little girl, crying?
bbot: Afraid she'll get her ass kicked in a blogging contest?
bbot: Sorry, I have no advice for that little girl. Because she's right. She doesn't have a chance against the bbot.
tee: maybe ill find something to write about
Sun Jul 12 10:02:28 UTC 2009
the tf2 annoying bastard guide
OR
SPAWN CAMPING FOR FUN AND PROFIT
But bbot! Isn't spawn camping utterly reprehensible, the domain of poltroons and mountebanks, exclusively the work of grinning thugs from an overwhelmingly superior team, who lack the common decency to switch to the other side?
Well, for one, I think you're not using "mountebank" correctly. And for two, you're completely right! With even teams, spawncamping is typically a losing strategy.
The enemy spawn is a hostile desert to a member of the opposing team. Enemies spawn in groups and are always at full health, and when injured, can easily duck back into the spawn and thus to a resupply cabinet. In addition, there are never any objectives nearby, and the terrain is very rarely advantageous to the attacker, with the spawn room at the end of a blind corridor or its topological equivalent.
Thus, the only reason you would want to hang around there for any length of time is to destroy the teleporter entrances, then run away from the inevitable flood of hostiles who were planning on using that teleporter.
The teleport run is fairly risky, since it requires getting to the enemy spawn undetected, as it takes several seconds to destroy the entrance, which is enough time for a pursuing hostile to kill you. Which is why it is usually undertaken by a spy or a scout, or somewhat more unusually, a pyro.
(An edge condition of the spawn camp is the setup room uber pyro rush. On dustbowl, the setup gates on stages 2 and 3 are not protected by player clipping brushes, which means enemy players can walk right in. This is normally a bad idea, since the interstice is full of angry people, but handily for us, the medic can make people invulnerable. Usually done concurrently with a heavy uber, with the heavy acting as the anvil to the pyro's hammer. This strategy will typically take out everyone who isn't ubered or cowering in the spawn room, and, if the pyro is both using the backburner, and very, very lucky, can kill one or more of blu's ubercharged medics.)
So, under standard conditions, spawn camping is either impossible or extremely unproductive. But what you can do is pepper hostiles with fire as they exit the spawn room, then run away, with hordes of very slightly injured hostiles in pursuit, typically while giggling. This is called Spawn Heckling, a subset of Wasting The Enemy's Time, a grand old tradition; and will usually result in your swift death.
But not always.
Team Fortress 2, broadly, seeks to concentrate combat into fronts. This has a number of advantages. People new to the game don't have to know what the objectives are, because they can just head to where all the people are shooting each other, where they will not be terribly effective, but not actively useless.
Concentrated front gameplay is also more fun, because you spend more time shooting people, and less time trying to get to a place where you can shoot people.
To further this end, TF2 uses two tricks, variable respawn delay, and forward spawn rooms.
Variable respawn delays act twofold, by spawning people in groups, who tend to stick together, and by dynamically adjusting the effectiveness of a team, by making a winning team more effective, and a losing team less so, with "winning" being defined as how many control points are held. This seems, generously, unsporting, but you must realize what when one team loses, the other team wins. When both teams wrestle over a single point for half an hour, alternately losing and gaining it, and eventually ending the match in a stalemate, both teams fail.
To present an even more enormous advantage to the attacking team, most control point maps have dynamic respawn rooms. The more points a team has, the farther forward they spawn.
This is because, in a platonic standard "respawn room at each end", the farther forward team A pushes, the longer it takes for team A to get to the front lines, and the easier it is for team B to defend, perfect for inspiring unbreakable stalemates, and precisely the opposite of what we want.
To counteract this, the winning team's respawn rooms move forward, which evens the playing field, though it may not seem like it in-game, since the winning team is usually stomping the losing team at this point.
The effect is much more pronounced in maps without dynamic spawn rooms, such as cp_toy_fort. Toy fort is a rats-style map, where the players are "tiny", compared to map geometry. Rats is, of course, a venerable HL1 DM map where the players were the size of rats, set in a kitchen, complete with mouse holes a mousetrap that would gib you if you stood on the trigger.
In toy fort every match every game is a long brutal grind, with the center point changing hands several dozen times, until finally one of the teams ends up with enough skilled players to fool the auto balancer into thinking that the teams are even, and thus to victory.
That never happens.
But dynamic respawn rooms, wonderful as they are, have a weakness. They're dynamic.
They're typically embedded in map geometry, which means that there is terrain and health kits for the enterprising Bastard to exploit.
Spawn heckling a forward spawn allows you to retreat into the hills when pursued, to heal up, and to show up again thirty seconds to shout some more insults at their backs.
Spawn heckling can be performed with limited success on any map with dynamic respawn rooms, but shines on payload maps, where the bomb path is long, convoluted, and sees a lot of combat, which means plenty of supplies.
Where spawn heckling comes into its true enemy annoying glory is on pl_badwater. The blu forward spawn is right next to the second point, and is close to no less than six ammo packs and seven health packs, making a sufficiently sneaky spawn heckler immortal.
Like the teleport run, spawn heckling calls for extreme mobility. Since spawn heckling requires peppering enemies at long range, the Pyro is out, (though using the flare gun may be profitable) leaving the Scout and the Spy.
While the force-of-nature in the hands of a talented scout is preternaturally annoying, the Spy is my class of choice for spawn heckling. The Spy is the second greatest threat on the battlefield, behind a ubercharged heavy, and attracts instant attention from any nearby enemy. A spawn heckling spy poses very little risk to any single player,[*] but logic does not so easily override instinct. The electrosapper can destroy teleporters with little risk to the heckler, and the ambassador scores critical hits on headshots, which take very little skill to achieve on players leaving the spawn room.
*: It is rather difficult to backstab a player aware of you, and while it is quite easy to score a single headshot with the ambassador, it is not quite as easy to score a fatal followup headshot if the target is trying at all not to be shot.
The point of spawn heckling is to waste the enemy's time, which typically means not killing them. This is because combat is fairly risky, when returning to your position after respawning takes half a minute of infiltration, which, depending on how lucky you are, may even take several tries. So, the name of the game is long range ambassador shots and cloaking, hit and run, with emphasis on run.
Don't forget to make fun of the other team in allchat.
So go forth, you bastards. Go forth and heckle.
Hello, d20 readers. You may be interested in my review of Trackmania Nations Forever (Spoilers: I wasn't fond of it) or my efforts in map design, or a longer series on water simulation
Or, if you're looking for something a bit odder, a transcript of a a youtube video.