Archive for the 'Computing' Category

Computing

vBulletin Login Integration

I run a roleplaying chat website that has a forum and a separate chat section. However, the forum is integrated into the main site, and the chat. I was recently looking at moving from phpBB to vBulletin as the forum software[1], but needed to make sure that I could still plug the chat and the rest of the site into that easily. Apparently the vBulletin people are paranoid about giving out any code that is in any way related to vBulletin, even this sort of thing. So I did some digging, and found out how to do it.

Here's an example of how to do that. It really is pretty simple.

<?php
// This gets the vBulletin user login info
$curdir = getcwd();
chdir('/path/to/your/forums');  // Change to vBulletin directory
require_once('/path/to/your/forums/global.php');
chdir($curdir);  // Change back to previous directory

// This is the part that actually deals with users
if ($vbulletin->userinfo['userid'] == 0) {
  // User is not logged in; maybe show login form here
  echo "Not logged in.";
} else {
  // User is logged in
  echo "Welcome Back, <b>".$vbulletin->userinfo['username']."</b>";
  // See if user is in a certain user group
  if ($vbulletin->userinfo['usergroupid'] == '6' ) {
  // Maybe this is an admin usergroup, so show admin stuff here
  }
}
?>

So I hope someone else out there finds this useful. If you want to see what all data is contained in $vbulletin->userinfo, just do echo nl2br(print_r($vbulletin->userinfo, true)).

Caveat: I have yet to try this myself, so I'm not 100% sure it will work. But it seems to make sense, and is similar to integration of phpBB and SMF.

[1] Why move from phpBB to vBulletin, when vBulletin costs nearly $200? Overall vBulletin is just better, but here are a few more specific reasons, in order of importance:

  • vBulletin supports Facebook Connect out of the box. That means users don't have to sign up for an account on the forum — they can just click the Facebook Connect button, click to verify, and then bam… they have an account and they're logged in.
  • vBulletin has better anti-spam controls. My forum gets hit with more spam than regular posts. The best anti-spam measure is to require that new users pass a reCAPTCHA test. Modules that make phpBB do this are buggy at best. Granted, SMF (which is free) also has a module that does this pretty easily. It does not, as far as I can tell, currently have a working module for this. The best contender that I found costs $20, and seemed to have a broken implementation on their own site. Not very heartening.
  • vBulletin has a better plugin system. It's nowhere near as awesome as that of WordPress, but still much better than the "send file to server via FTP, edit your existing files" method of phpBB. Granted, a lot of the vBulletin community still does modifications in the old hack-ish way. SMF has a similar system to vBulletin. So as you can see, if it weren't for the damn Facebook Connect thing, SMF would probably win out. It's possible that between now and when I get around to this, the SMF mod will be working though.
  • vBulletin is neater. It's just got a lot more AJAX stuff, a WYSIWYG editor, and other little features that add up to making it a nicer overall experience.

Computing, Reviews, tech

New AT&T DSL Service, Actiontec GT701D Modem

Recently AT&T was running a deal where their 6Mbps DSL service is $20 a month for an entire year, then $45/mo after that (they might still be running it). I was paying about $65/mo for cable modem service through Comcast, so even after buying the modem, this will save me about $500 the first year, and $240 every year thereafter. Slightly slower service, but really that’s a no-brainer for me.

The default modem that AT&T recommends is the Motorola 2210. According to all reviews I’ve read about this modem, it overheats and dies a little over a year after setup. So searching for alternatives, I found the Actiontec GT701D, which (as an added bonus) was also $30 cheaper. The only downside is that AT&T tech support can’t help much with the setup. I figure I’m handy with computers, so I’ll take the gamble on the cheaper and better modem.

Short story: everything worked out fine (eventually) and now I’m on my DSL connection.

The Actiontec didn’t initially connect up with the automagic detection, so I had to do a bit of snooping. It’s a very good thing that I still had my old ‘net connection running, to do some Google Fu. After a bit of searching I found the right settings. For anyone else out there in this situation, here’s what those settings are:

Username: attreg@att.net
Pass: attreg
VPI: 8 (this is for AL, FL, GA, KY, LA, MS, NC, SC, TN; other states use 0 for this)
VCI: 35
DSL Mode Setting: ADSL2
ATM QoS class: UBR

Note that the username/password are only for initial setup. You have to go to the registration URL to set up your real username/password. But do note that the password you use for your modem is the alphanumeric string that gets automatically assigned to you, not the one that you type in yourself.

Computing, Work

Subversion Checksum Mismatch Workaround

This post relates to Subversion, a version control system. This is used most commonly in programming to allow multiple programmers to work on the same set of files at the same time without stepping on each other’s toes. It also lets you “roll back” your code to any point in time, so if you screw something up, it’s ultra easy to go back to the point before that.

Some writers also use this sort of things to keep copies of their writing, and then if they change/remove something that they later decide they shouldn’t have, it’s easy to peek back at what it was like.

Anyway, sometimes when dealing with Subversion, you might get an error like this when trying to run svn update:

svn: Checksum mismatch for ‘/path/to/repository/.svn/text-base/some-file.php.svn-base’; expected: ‘e5b110ec4409891e81f38203d45e4f5d’, actual: ‘c84a851f87b9b62934b44adc457dcfd0′

There are two fixes for this.  The first is to just delete the directory containing the code where the checksum mismatch is (including the .svn directory below it), and run svn update again from one directory up. But if, like me, the checksum mismatch is in the base directory and it’s inconvenient to do that*, there is another solution. Basically you will check out a fresh copy of the affected directory, and copy over the SVN file with the checksum error.

  1. Check out a new copy of the repository in some other directory. If the problem is in a subdirectory, you only have to check out that subdirectory.
  2. Rename the file mentioned above (the one with the checksum error, /path/to/repository/.svn/text-base/some-file.php.svn-base in this example) to add -bak on the end of it.  It’s always good to have a backup.
  3. Copy that file from the working copy you created in step 1 to your “real” repository location.
  4. Run svn update to see if it works. If not, make sure that in step 3 you copied the file to the correct directory (it needs to go under the .svn/text-base/ directory).
  5. Once that works, you can delete the other working copy you checked out, as well as the -bak file you created.

I’m putting this here in the hopes that Google will index this, and someone else with the same problem might find it useful.

* In my case, I have a lot of images and other things that need to be there, but that aren’t in the SVN repository, so just wiping it out and checking out a whole new working copy of the repository doesn’t really work.

Computing, Work

MySQL Training

A few weeks ago, I went to a MySQL training seminar focused on developing and tuning high-availability applications with MySQL, hosted by Percona and paid for by my work. It was an extremely informative seminar. We’ve hired the people at Percona before as our database ninjas, as I like to call them. They are not at all cheap to hire for consulting, but they are absolutely worth every penny. These guys live and breathe MySQL.

Anyway, I took away some good tidbits from the session, but more than that I gleaned some good general philosophies. For example, when diagnosing a problem first make sure it’s really a problem. If only a few users are experiencing it intermittently, then maybe it’s not worth 40 man-hours to investigate and fix. Another tips is: have good instrumentation. Don’t take educated guesses as to what might be slow — build in some metrics so that you can see exactly where a problem is.

A lot of this stuff is still sinking in, but I’ve already started putting some of it to use immediately. Good company investment, and a good personal investment too.

Computing

MySQL “Can’t create table” error fix for WAMP

This is a post for the MySQL geeks out there, and also for anyone who had a similar problem and might be searching for a solution.

I was trying to copy our testing server’s database to my local machine, so I can do some local development (I’ve set up a web server and database on my personal computer, so that I can test things out before moving them to the development server). I’m using WAMP for that, which is a very simple way to set up a local webserver on Windows.

Well, when I tried to import the database I got the following error:

Error Code: 1005 - Can't create table 'whatever' (errno: 121)

So I edited my.ini, and increased max_allowed_packet, like so:

[mysqld]
max_allowed_packet=32M

I’ve heard that some other people have also had to increase wait_timeout to something like 45 seconds to fix this error.

Computing

Google Flops?

Google Buzz, and before it Google Wave, seemed to have great potential. I played with both when they came out.  But my interest quickly waned, and from what I can tell I’m very much not alone in that.

Part of the reason is that I think Google jumped the gun. In marketing, you have to be careful about when you create a buzz (pun intended). And especially with products like these, they’re only useful if everyone is using them. In both of these cases, I think Google was directing the general tech populace to use products that were incomplete.

With Wave, they should have had permissions from the get-go, so that you could invite people to see, but not edit, a Wave. They have that now, which is nice, but it’s a bit late in the game — comparatively few people regularly use Wave any more. There are a lot of other things they did wrong with Wave, too: it was much buggier than I’d expect from a Google beta, slow as molasses, and too broad in scope. That last one is really what killed it, I think. People generally want a clear path for using a product; they want a sexy sports car, not a bunch of parts that they have to figure out how to best put together to build a sports car that suits their needs.

With Buzz, they went the other way. It’s too damn simple. I have lots of friends. Some I’m closer to than others. Some I want to pay more attention to than others. So maybe I’d like to be able to easily see a Buzz stream from only certain groups, instead of everybody. Maybe once I start or participate in a discussion, I’d like to select whether I get emails specifically for that discussion. (And while I’m at it, hey Facebook! How about being able to turn off receiving emails just because I thumbed-up a post that 50,000 other people feel the need to comment on?) Maybe I would like to have my Twitter posts show up in some decent timeframe, instead of the next day if I’m lucky.

Overall, I love the things Google does. Chrome is amazing, and broke the web browser mold when it came out. Gmail has been my email client of choice for years now. Their search engine revolutionized the web.

Then again, not every hit can be a home run. I like that they’re trying new things! I just think that a lot of these things have great potential, but were executed poorly. And that makes me sad.

Computing, Reviews, tech

Computer Building Fun

Two tools I really didn’t think I’d need for building a system: needle-nosed pliers, and a file. Where the hard drive went in, there was a retaining bracket that was preventing a hard drive screw from passing, so I had to bend it. And when I replaced the case fans with better and quieter ones, the size on the front one was off by a fraction of a millimeter, which required filing off the plastic around where it went in.

However, this time no blood was spilled. I think that might be a first. So, I consider it a success!

I also remembered how annoying it can be to build a system. I got a power source that can handle 2 video cards (“Crossfire capable” they call it, for ATI cards), but the kind I got took both of the power connectors. So I can’t actually use 2 without upgrading my power source. Talking to NewEgg about that, but so far no luck asking for an exchange.

Also, I remembered a little hack for installing Windows clean, using an upgrade disc. You can use an upgrade version as the full version in one of two ways when installing it fresh (i.e. wiping whatever is already on there, if anything: install it fresh and then install it over itself, or (the quicker, easier way) do a simple registry edit.

Something else I realized: I have a Logitech Performance MX wireless mouse (no, I did not just realize this, shut up). It is pretty awesome, but my only complaint has been that it will randomly stick, and for 30 seconds or so it stutters and jumps around the screen when I try to move it. Today I tried something that seems obvious: I moved the damn wireless receiver to a USB port closer to the mouse. Guess what? No issues since then. I know, I’m a frackin’ genius.

Okay, so how does the shiny new system work, you ask?

It’s fast. Very fast. I attribute almost all of that to the SSD. That’s a solid-state drive; a hard drive with no moving parts. They are expensive, for much less space than you will get with a normal hard drive, but they are about twice as fast, 1/4 the size overall, use far less power, make no noise, and emit almost no heat. For laptops, they are about the most awesome thing you can have. For desktops, still quite awesome.

One not-fast bit is logging into Windows. It gets to the login screen, I enter the password, then… it sits there for 20 seconds before continuing. I’m not sure why this is, and I don’t think it initially did it. But it doesn’t happen when I’m waking the computer from sleep or hibernate, and I almost never have cause to do a full power-off or reset, so that’s not really a big deal.

The only other pet peeve I have is that, even though there is a connector for it, the case has no hard drive activity indicator light. And since the SSD is even more silent than a ball-gagged ninja, there’s no way for me to know when lots of hard drive access is going on. I mainly look at this when the system seems to be randomly crunching/slow though, and since that hasn’t yet happened… I can live with it for now.

My work-oriented stuff is very fast as well. We use Subversion, a system that lets multiple people work on the same code at the same time without stepping on each other’s toes, and it also retains a complete history of every change ever made to the code, so that you can roll back if you screw something up. Performing updates and commits with this is very notably faster than it was on my old system (also a quad-core system, with 5 GB of RAM).

Computing, tech

My New System

For those interested, here are the components of the system I’m about to build. It’s not top-of-the-line, but I’m pretty happy with the price/performance balance.  :)  Parts should all be here by early next week.

Motherboard: Gigabyte GA-790XTA-UD4 (AMD, SATA 6Gb/s,USB 3, supports dual video cards)
GIGABYTE MotherboardThere were cheaper options, and I’m only getting 1 video card and not 2, but I wanted SATA 6, USB 3, and the possibility for 2 cards, for future upgrades.

Processor: AMD Phenom II X4 925 Deneb 2.8GHz Quad-Core
Nothing too fancy here.  It’s reasonably fast, but I didn’t want to go crazy.  Processor speed is actually less important to overall system speed than most people think.

Video Card: XFX Radeon 5850 1 GB
XFX Radeon HD 5850Here I splurged a bit.  DirectX 11 card, again looking to the future.  I could have gotten two lesser cards for slightly cheaper, and just as good of performance, but that would be noisier, take more power, and not leave room for future upgrades without replacing both cards. This way if I want more power, I add another 8580 (which by that time will have gone down in price significantly).

RAM: G.SKILL Ripjaws Series 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1600
This is fast RAM.  Not as fast as the motherboard is capable of, but any faster starts quickly driving the price vs. performance into exponential (i.e. bad) territory. The computer I’m on now actually has 5 GB of RAM, so… well, in a few months it’s possible I’ll double this to 8, since I will be using this system as a work computer as well, and that means having lots of memory-intensive applications open.

Hard Drive (system): OCZ Agility 60 GB SSD

This baby is probably the biggest factor in this build affecting normal system performance.  It has a small amount of storage space (as most SSDs do), but solid state disks offer amazing performance. Here is an article from Microsoft about Windows 7′s performance on SSDs, and some of the benefits of SSDs in general. My housemate Cary has one in his Alienware system, and he says he definitely notices the difference. Coworker Sparr had a netbook that ran from an SSD and he also said it performed notably better than a standard hard drive — faster boot-up and overall operation, lower power consumption, no noise. Having your operating system run from one of these will nearly halve your boot-up time. Putting WoW on it will cut your load times similarly.

Hard Drive (storage): Western Digital Caviar Black 750GB 7200 RPM SATA 3.0Gb/s
This is where media and programs (that don’t need to load up really fast) will go. Nothing too special, though it is the higher-end Western Digital line, with a 32 MB cache. And they say once you go (Western Digital) Black…

Case:  Raidmax Smilodon ATX-612WBP
RAIDMAX SmilodonHonestly I don’t love this case — don’t have it, I just don’t love it.  However, it was on special, and the case is going to sit out of my sight for 99% of the time I’m using the computer anyway, so I mostly just needed something that will hold the rest of the stuff. And it’s not particularly ugly, just not particularly pretty (in my opinion) either.  If I was buying today instead of a few days ago, I’d probably get this case, which they’re running a special on for $50 and free shipping (coupon code TTCPN-N0012USU-FEB10).

There are also some odds and ends, like Scythe Slipstream case fans (better fans, and quieter), a 780W power supply, etc.  This build was mostly based on this article, with upgrades where I felt would be good, and some components switched out where I could find a better deal, or a better product for the same or lesser price. Ironically, since that build was written, some prices have actually gone up (I assume due to the weakening of the dollar, and the fact that most components are made overseas).

I did forget to order a 2.5″ to 3.5″ adapter for the SSD, but that’s livable — I can get one of those for less than $10 somewhere local.

Computing, Friends, Gaming

Roleplaying Via Google Wave

First off, let me say that I’ve only been in one Google Wave gaming session so far, and have seen a few other sessions.  So I haven’t done very in-depth or broad testing of this stuff.  Also, Google Wave itself is evolving — it’s still in beta, so I’m not going to talk about bugs, or technical issues that I’m sure will be hammered out.

My friend and former coworker Justin Achilli is running a 3.5 D&D game via Google Wave, as an experiment in its viability for online roleplay.  He’s shared his own thoughts, and I’d like to share a few of mine from a player’s perspective.

So, from my perspective, so far I’m getting exactly what I expected.   It’s somewhat of a mix of playing via live chat (of which I have several years experience on White Wolf’s now-defunct moderated chats) and play-by-post, with most of the advantages and disadvantages therein.   I’ll list some below, and again, I’m going to refrain from putting any disadvantages down that I expect to be addressed (e.g. it’s still fairly slow and has the occasional glitch).

Advantages (compared to tabletop)

  • It’s easier to schedule.  No transit time to/from; just log in and bam, you’re in game.
  • When a player misses a session, the playback feature makes it easy for them to get caught up.
  • It’s possible to narrate aspects of your character’s actions in more stylish detail.
  • It’s easier to have secret side-conversations where necessary (no passing of notes or leaning over and whispering).
  • There’s a complete record of each session, which game masters or payers can look back on (or search) if they’ve forgotten something.
  • It’s possible for several people to type simultaneously without the “talking over one another” effect you get in real life.
  • It allows you to multitask without being distracting to others.

Disadvantages

  • Hell of a lot slower-going than tabletop for character interaction.
  • Even slower than that for combat — and the more crunchy the combat, the slower it is.
  • More impersonal.
  • Can’t use things like mood music/lighting to set the mood (though it would be easy to use a third-party app to stream a playlist).

Overall I prefer tabletop, but I do like online mediums (including Wave) as an option if tabletop isn’t.   I think Wave offers some advantages over both chat-based and PbM/PbP play as well — it’s the best of both worlds when talking about those two options.  I also think Wave is better for more story-centric games/systems than crunchy games, but I’m sure that there will be a number of plugins (or “robots” as Wave calls them) for that sort of thing.  There are already some robots for things like dice rolling, maps, and other such things.  I’m excited to see what can and will be done.

Computing, Gaming, Reviews

Champions Online – Initial Impressions

For my initial impressions, I am going to leave out issues that are obviously bugs — the game doesn’t even officially launch for 2 days, and there really aren’t that many bugs to speak of.  Far fewer than I’ve seen in most products at release these days, in fact.  In any case, this review will be pretty scattershot — a lot of 90 degree turns.  So strap yourself in.

Character Creation

First things first: the character creator.  It’s even better than the one in City of Heroes, which itself was lightyears ahead of everything else I’ve seen.  However, I say “better” with a few caveats.  The Champions Online character creator is lacking some costume basics — for example, there is only one option for an emblem on your back, no option for a trench coat, and other small things of that nature.  It’s also tough to find some of the options; they seem grouped somewhat unintuitively to me (for example, the “Shirts w/Integrated Shoulders” section has no items that have integrated shoulderpieces).  But from my experience with City of Heroes, I know that this will be fixed in time.  I think one of the things they were trying to do was avoid copying City of Heroes costume pieces.  In fact, I’d bet they went to great lengths to do so, for legal reasons.  And with the huge library of things available in City of Heroes, it will be difficult to come up with new pieces that are notably different in Champions Online.

Depth of Play

The game definitely has more depth than CoH.  Around level 5, you start working with the crafting system, in fact.  This is a little too soon for my tastes — I like to just run around and get the basics down for the first hour or two of play, myself.  Were I not already familiar with the CoH crafting system, I would probably be confused by this.  Actually, I am familiar with the CoH crafting system, and I am still a little confused by this.  The main way to build things seems to be by deconstructing items that you get (akin to disenchanting in World of Warcraft), and then using those base components to build something.  You also gain skill much faster by deconstructing things than by building things.

Speaking of level 5, you get a fast-travel power at level 5.  I have not the words for how awesome this is.

Annoyances

This brings me to my first annoyance.  Latency.  This is a huge one.  I’m not talking about real “lag,” but rather when you press W to go forward, it takes about 0.5 seconds to start going.  Same when you let off to stop.  Which isn’t even noticeable when you’re running around normally, but once you get that travel power, it can make you overshoot your target by about 30 feet.

Another annoyance is the aggro range of mobs, which is ginormous.  Actually, I like this in theory, because it seems more realistic.  Seems pretty silly that if you’re thumping some dude’s friend 30 feet away, he’s not going to come over.  However, the problem is that in most of the zones (that I’ve been in so far, anyway), there are mobs strewn about every 30-40 feet.  When you fight one small group, at least one adjacent group generally joins the fray.  This gets really annoying when you’re trying to fight a mini-boss, and/or when you’re about to die and attempting to run to a safe place.  It’s also bad because you can’t pull the camera out very far.  I like for my camera to be out to where I can see around 3-4x the aggro range around me, at least.  Can’t do that here.

Combat and Missions

This is also made more of an issue by the game’s AI, which I must say is fairly good.  If you’re using a bunch of close-range attacks, and your opponent has a ranged attack, then they will generally try to distance themselves.  Villains and sometimes even normal mobs will go out to get reinforcements.  This makes the game feel a lot more realistic than other MMOs I’ve played, and also adds a bit of challenge

The combat system is pretty straightforward, aside from one thing: blocking.  You can press the Shift key to block attacks.  This is very important in a lot of villain fights — there will be a visual indicator (starburst usually) over the villain indicating that some big attack is coming.  If you don’t block, you get walloped for a big chunk.  If you do block, then it’s not so bad.  It makes combat feel more active.  They still need to work on the targeting though; often you find yourself in the middle of a pretty big group, and tabbing through to get to that villain isn’t always feasible.

I really like the mission system overall.  It shows you on the map and minimap exactly where your objectives are, circled in the case of objectives that are in a general area.  When you mouse over it, the mission name comes up you can click on it to open a description of the mission details.  Very nice for keeping track of what you’re doing.  There are also impromptu group missions, that you don’t actually have to group up for.  For example, aliens are invading and when you come near the city defense system, you can jump in and start helping to defend it.  There are several phases to this, with different objectives (defend the cannon, get parts for it, etc.).  When you’re through, it opens up another quest for you, and it also shows you a ranking of who helped the most.  Then the mission resets.

I think this open mission system is really great, because a lot of MMO players frankly aren’t very social.  It can be tedious and annoying to get a group together.  But if you can just jump in and coordinate your efforts, then you skip all of the awkward and sometimes tedious rigmarole of forming  a group.  Plus, it’s very superhero-like to see a situation, then just jump in.

Overall Impression

Overall, the game feels much more superhero-like than City of Heroes.  You can take out the mooks and minions like chaff (unless you do something dumb and really overload yourself), which is thematic.  The game has extremely customizable character aesthetics, even more so than its progenitor.  It’s a lot deeper than City of Heroes, which I hope translates to a more sustainable end-game.

Next »