Sep 13 2010

How to Install Red5 0.9.1 on CentOS 5

 

I run an unmoderated roleplaying chat, and I've been wanting to upgrade the chat software I'm using (currently Flash chat from Tufat.com) to something a little better. Most of the "better" packages require having a Flash server installed, but Adobe's is pretty expensive. There's an open-source alternative written in Java called Red5.

However, Red5 currently suffers from pretty bad documentation. So, here's a tutorial on how to install Red5 0.9.1 under CentOS 5.

  1. Get root access (I'm not sure if this step is really necessary, but it was in my case)
    From the command prompt, execute:
    sudo -i
     
  2. Install Java
    From the command prompt, execute:
    yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
     
  3. Install Ant
    From the command prompt, execute:
    cd /usr/src
    wget 
    http://opensource.become.com/apache/ant/binaries/apache-ant-1.7.1-bin.tar.gz
    tar zxvf apache-ant-1.7.1-bin.tar.gz
    mv apache-ant-1.7.1/ /usr/local/ant

     
  4. Export variables for Ant and Java
    From the command prompt, execute:
    export ANT_HOME=/usr/local/ant
    export JAVA_HOME=/usr/lib/jvm/java
    export PATH=$PATH:/usr/local/ant/bin
    export CLASSPATH=.:$JAVA_HOME/lib/
    classes.zip
    echo 'export ANT_HOME=/usr/local/ant' >> /etc/bashrc
    echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/bashrc
    echo 'export PATH=$PATH:/usr/local/ant/bin' >> /etc/bashrc
    echo 'export CLASSPATH=.:$JAVA_HOME/lib/
    classes.zip' >> /etc/bashrc

     
  5. Download and install Red5 Server
    From the command prompt, execute:
    cd /usr/src
    svn checkout 
    http://red5.googlecode.com/svn/java/server/trunk/red5
    mv red5 /usr/local/
    cd /usr/local/red5
    ant prepare
    ant dist

     

    You should see lots of output, and at the end it should say "Build successful."  If you see some errors instead of that, it's probably because you don't have Java or Ant installed correctly.  I'm not really experienced enough to give troubleshooting tips with that.
     

  6. (Optional) Edit Red5 config file
    By default, the config sets Red5 up to bind to all IPs.  If you don't want it to do that, edit red5/conf/red5.properties file, and anywhere you see the IP 0.0.0.0 replace it with your server's actual IP address. You can find this IP by executing this command:
    /sbin/ifconfig eth0| grep 'inet addr:'
    Then use the IP address listed directly after "inet addr:"

     
  7. Install Tomcat container
    This is necessary to make it so that you can verify your installation and administer it via the web.

     

    1. Create the directory red5/plugins.
    2. Go to http://www.red5.org/wiki/AppServer/JEEContainerPlugins, download the pre-compiled Tomcat JAR and save it to red5/plugins
    3. Look inside of that Tomcat JAR (you can rename it to .zip and unzip it if need be), extract the jee-container.xml file, replace your current red5/conf/jee-container.xml file with that one.
    4. Go to http://code.google.com/p/red5/source/browse/#svn/repository/tomcat, save the latest version of each file there to red5/plugins
      • As of when this guide was written, this includes 6.0.26 of Catalina and Jasper and Tomcat-Coyote, and 6.0.20 of Tomcat-dbcp, Tomcat-juli, and Tomcat-juli-adapters
         
  8. Start Red5 and test installation
    From the command prompt in the /usr/local/red5 directory, execute:
    ./red5.sh
    If all goes well, that should end with something to the effect of "[INFO] [Launcher:/installer] org.red5.server.service.Installer – Installer service created".  If it hangs at "Bootstrap complete," that most likely means that you did not correctly install the Tomcat container in the previous step.

Note that when you launch from the command line, if you kill that terminal window then Red5 will stop running as well. In not too long I'm going to update this tutorial to show you how to get around that.

 

 

 


Sep 10 2010

Politics, Maturity

It seems to me that the vast majority of people have political beliefs that benefit their situation. That seems natural, but then again, isn't selfishness something that we as humans try to work past? Civilization exists for the greater good of everyone, after all.

But again, it seems that most people are unable to grasp this, or at best they justify selfishness with logic instead of looking at things logically from the get-go. The rich say, "Less taxes on the rich!" The poor and middle class say, "More taxes on the rich!" This is normal, and people who hold selfish political beliefs generally don't interest me. It's expected. Though sometimes their systems of self-justification are interesting, ranging from thought-provoking to absurd.

What really pique my interest are people whose political views don't benefit themselves, or people like themselves. The person who says, "You know, I'd be okay with paying more taxes." The rich woman who says, "I think welfare is a necessary part of our society." The all-American country boy who says, "Shit, let more Mexicans in — they're just takin' the jobs we don't wanna do anyway!" The unemployed man who says, "I think unemployment benefits are too high." The girl eligible for disability who says, "I don't need this." The retired person who says, "I don't think there should be social security."

I personally hold some political beliefs that definitely don't benefit me. I think that taxes need to be higher — though I also think that government spending needs to be more efficient. I'm fine with the near-fact that people in my generation will pay social security but not get anything back from it. Not all of my political beliefs are that way, of course, but a few are. And though I know a few people who are the same, it seems that by and large, such people are very much in the minority.

This would seem to me to lead toward a tyranny of the majority. If 75% of the (voting) people realize that they can take resources from everyone else, and they vote for candidates that enact laws which benefit them (at cost to others), then… well, I think you can see where this is headed.

This line of thought always leads me to this quote, which is often attributed to Alexander Fraser Tytler though its origins are still unclear (some attribute it to Alexis de Tocqueville):

A democracy cannot exist as a permanent form of government. It can only exist until the majority discovers it can vote itself largess out of the public treasury. After that, the majority always votes for the candidate promising the most benefits with the result the democracy collapses because of the loose fiscal policy ensuing, always to be followed by a dictatorship, then a monarchy.

Sounds a little scary, huh?


Sep 8 2010

Dragon*Con Survival Guide

I will start this out by saying that DragonCon was my first convention ever. I went on a lark at the last minute in 2003 thanks to a friend, and had an absolute blast. I met tons of new and completely awesome people (I'm still good friends with my roommates from the first year), saw lots of cool panels, took hundreds of pictures, and got almost no sleep because I was too excited to waste my time sleeping.

Since then, the convention has gotten different for me, and in general. I hardly take any pictures. Yes, it's full of awesome costumes. They'll be there next year too. And the year after. I go to fewer panels. As time goes on, DragonCon is more about hanging out with friends and partying than it is seeing celebs or sitting in on panels. Many of those friends, I only get to see once a year at DragonCon, in fact. So generally I plan one or two panel-type things to do per day, max, and otherwise just fly by the seat of my pants.

Caveat: A lot of this might seem very doom and gloom. My intent here is to prepare you for the worst. Things aren't necessarily this bad, but if you go in prepared for what could happen, you will have a much better con experience.

What you came here for

Okay, enough with the reminiscing. DragonCon, if done improperly, is a torturous thing. Some bits of advice actually come from the pitfalls the poor E experienced in that linked blog post. So here are some tips to get you through the convention:

  • Parking: Don't park downtown. For the love of Cthulu, just don't do it. If you're lucky, it will only be absurdly expensive. If you're not lucky, you'll get your car booted. Most of the little lots that seem like they're cheap will "reset" at 6am, so you have to pay again around 6-7am or have your car booted (which will cost you about $75). They are especially bad about doing this on Saturday morning, when the parade is. I speak from experience (see picture to the right). So where do you park? The convention hotels are all right by the Peachtree MARTA rail station, so I highly advise that you park at a MARTA station with long-term parking, and take the train down. Some MARTA stations will charge $5 per day, and some are free. For those of you who have never taken public transportation before: don't panic. It's very easy, and safe, and after you've done it you'll laugh at yourself for being so nervous about it.
  • Hotels: Book at one of the convention hotels, in October or November. Whenever they open up, book a room at one of the convention hotels (preferably Marriott, Hyatt, or Hilton). It's well worth it to have your room right there, without having to take a cab or train back. They are expensive though; with taxes, plan on paying around $200 per night.
  • Hotel check-in: Do it early, request a low floor. Elevator wait times are absurd. Really, really absurd. At 1am, you seriously might have to wait 30+ minutes to get on an elevator. So if you can get a floor low enough that you can just use the stairs, do it. Also, by "early" I mean, get there around 11am on Thursday. Have a job or something else that prevents you from coming until Friday? Pray that some non-convention-goer left a room on Friday. Otherwise, you're fucked.
  • Elevators: Go down to go up (and vice-versa). It's sad that people do this, because it actually slows down the elevators overall. But because so many other people do it, you sort of have to, in order to get anywhere. So no matter which direction you're going, push both buttons, and hop on the first elevator with a spot regardless of which way it's going.
  • Badge lines: Bring a book. This year, on-site registration (the people who didn't get one ahead of time) had very short lines, like 30 minutes or less. For those who wanted to save money and pre-registered? 5-6 hour waits. No exaggeration. However, I'm betting that because of that serious dichotomy, more people will pay on-site next year. So either way, plan on staying a while. I suggest getting in line Thursday or Friday morning, about an hour before the lines actually open up. That way you'll only have around 2 hours total waiting, and it won't be in the blistering hot Atlanta sun.
    Edit: Next year they're supposed to be using a barcode scanning system that will speed things up. Cross your fingers and hope that it works; if so, waits should be more like 1-2 hours max.

    • Alternatively, you can do what I did and get an eternal badge. This is if you know you're going to be coming to at least 10 more Dragon*Cons, otherwise it's not worth it. But if you are, you pay 10x the going rate for on-site registration (this last year that meant $1,000), and you get a forever pass. Now, you still have to get a badge each year, you just don't have to pay for it and you get in a special eternals-only line, which has almost no wait.
  • Celebrity panels: Watch them on Dragon*Con TV. Seriously. It's either that, or get in line 3 hours before the panel begins. If you only get there an hour early, you won't get in. This also applies to otherwise popular panels, like the Buffy Horror Picture Show, and pretty much anything to do with Firefly. Lines literally wrap around the hotels for these panels. If someone is being organized about it, they'll count and say, "Everyone past here won't get in." That level of organization and thought is a very rare occurrence though.
    Edit: This isn't necessarily true in all cases (mainly for popular celebs/shows, though sometimes even then you'll get lucky), but it's best to plan ahead. If you get there 3 hours early and no one is in line, go do something else for 30-45 minutes then come back.
  • Room parties: find where they are, and go to them. DigiTribe usually has an awesome open roomparty all weekend long. They don't charge for booze, but they gladly accept donations, so please toss 'em a few bucks so that they don't run out on Friday night. There are other cool room parties, but sometimes you just have to know someone throwing one, to know where they are.
  • Drinking: Know your limits, stick to one type of drink. Trust me, it is Bad NewsTM to start off with beer, move to vodka crans, then finish the night off with a Jaeger bomb. Other normal drinking rules apply: know your limits, eat well beforehand, and if you're female don't leave your drink unattended (I've never heard of someone getting slipped something in their drink at DCon, but better safe than sorry). Also, stock up on Saturday. Beer and liquor cannot be sold at bars on Sunday in Georgia (only at bars). Yeah, fuck the Bible Belt and our teetotalling governor. Also, don't buy drinks at Pulse in the Marriott. They're stupid expensive, like $16 for a Grey Goose martini expensive. Rum buckets are the way to go, generally available at the bar on the smoker's deck of the Hyatt. $12 for about 6-8 shots of rum in a tasty mixed drink. Cross the street from Marriott to Hyatt, go up the stairs, and the smoker's deck is the area right before all the glass doors.
  • Eating: bring snacks, don't expect to get a seat in the food court. The places in the food court are actually pretty decent at getting people their food quickly. And they are amazingly nice for having to deal with such a horde of people. But there is simply not enough seating for everyone. So be prepared to go back to your hotel room to eat, or to camp out on the floor somewhere. Also, bring snacks. Not only can they help you wait until after the lunch/dinner rush, they come in quite handy at 3am when you're plastered and really need something other than booze to put in your stomach. There's only one good 24-hour food place near the convention, the Metro Café Diner.
  • Buying stuff: avoid impulse buys (generally). What I do is take a picture of things I want on Friday (along with the price tag and booth it's at), then on Saturday or Sunday if I still want them, I'll buy. However, if there's only one or two of what you want left, this rule doesn't necessarily apply. This year, I lost out on getting a sweet leather mask because I waited too long.
  • Walking around: be careful where you walk. This actually consists of a few parts:
    • Do not, under any circumstances, just stop where you are. Step off to the side, then stop. If you can't find a place outside of traffic in the immediate vicinity, then keep walking until you do. Otherwise the fifty people behind you will keep moving forward while you're trying to stop, and you are the loser in that equation. This applies everywhere with crowds, including the dealer rooms.
    • Don't rush into empty pockets in crowds. If you're in a really crowded area and you see a big empty pocket? Look again; there's someone trying to set up a picture there. They've probably been trying to do so for the past few minutes because dumbasses keep getting in their way. Do not be one of those dumbasses.
    • When you get to the bottom of escalators, keep moving. If there are people not moving in front of you when you get to the bottom, yell at them. If they don't respond immediately, push them the fuck out of the way. Screw politeness; this is safety. People get hurt because of stop-ups at the bottom of the escalator. If you stop, even if it's because someone in front of you is stopped, expect to be pushed. Really, the people behind you have absolutely no choice in the matter — that escalator sure as hell isn't stopping, after all. (Note: usually there will be hotel security staff making sure that people keep moving. Do not be angry at them; they keep things sane.)
  • Waiting in lines: be sociable. You'll be surprised at the awesome people you will meet while waiting in line. Plus, it helps pass the time.

I think that about covers my advice. What do you think; is there anything I left out?

Edits/additions based on feedback

  • Bathe. Do this, every day. If you need to, bathe once in the morning and once in the afternoon or evening. Remember the rule of thumb: if you can smell yourself at all, other people smell it ten times worse. And if you really hate the funk on others, carry a small bottle of Febreeze and spritz people who stink around you. Be nice about it, and they'll probably even thank you, since most geeks don't seem to be aware of the statement in bold above. The same goes for bad breath — carry some gum with you and offer it to people with halitosis when having a conversation. If you talk to enough people, this will happen.
  • Beggars: ignore them. Whenever you go even a half-block from the hotel, beggars will ask you for money. They all have a story ("I just need a buck or two to pay for a bus ride back to my family in <city>"). These stories are not true. Do not give them money. Do not tell them "no." The only defense is to pretend like they don't exist. Seriously, even if they get in your personal space, just ignore them. Have a conversation with your friend as if the beggar were incorporeal and invisible. This is the only way to get them to go away. If you tell them, "Sorry I don't have cash," or anything else, they will pester you even more, because you have acknowledged their existence.
  • Health: beware the con crud. You've got tens of thousands of people packed into a small area. So carry water with you, don't share drinks or food, wash your hands before eating, and bring some vitamin C along. And if you don't like secondhand smoke, avoid all smoking areas at all costs, especially the smoker's deck at the Hyatt (just outside the Hyatt series of glass doors on the way to the Marriott). Also, if you're drunk, beware the stairs down from there to the street — they will test your equilibrium.
  • Costumes and clothing: think it through. First off, they don't call it Hotlanta for nothin'. You're going to be walking around in the heat, so keep this in mind when you're planning your costume. And if you're doing body paint, use sealers so it doesn't run everywhere when you start sweating. Also, you're going to be doing a lot of walking. Ladies (and guys), this means wear comfortable shoes. At the very least, have a backup plan for when those sexy 4-inch stilettos get unbearable. If you're making a complex costume, remember that at some point, you're going to need to use the restroom. Make sure your costume can accommodate that.
  • Be nice, and have thick skin. This weekend is fun, but also stressful for a lot of people. A lot of the people here are introverts, and don't do well in large crowds. So try to be nice to them. Also treat the convention staff and hotel staff well. They have to put up with a lot of shit. Don't add to it. They might even be short with you; if so, be nice — you'll be surprised how far you can go with that (apparently this doesn't work on the dicktards who boot cars in the parking lots though).

Sep 8 2010

iOS 4.1 Preliminary Review

There were a few neat improvements in iOS 4.1. It had some smaller bug fixes of course, like fixing the proximity sensor so that you're less likely to hit the mute or end call buttons with your cheek while you're talking. Neither has happened to me, but my girlfriend did once suffer from the accidental mute issue. It also has a game interaction feature, where you can invite friends to join in on games, earn achievements (I couldn't personally care less, but there seems to be a craze over achievements in the gaming world), and that sort of thing.

But there were two big updates that really interested me personally: high-def uploads, and HDR photos.

High-Def Uploads

Now the built-in movie uploader (which can upload to YouTube) is able to upload in full 720p high-def. if you're on a WiFi network. It used to force the resolution down, so my first iPhone 4 test video actually got uploaded as low-def.

HDR Photos

HDR stands for "high dynamic range." You only really need to use this option if the photo you're taking has very bright and/or very dark areas that you want to come out better. The phone snaps 2 shots in quick succession and uses some magic to combine them into one good shot with (more) consistent lighting.

Here's an example, normal on left, HDR on right:

 

You can click the images for higher-resolution versions.  However, this doesn't really do much for photos that aren't high-contrast. Here's an example of a normal and HDR version of a picture with consistent lighting:

 

The second one actually looks worse, in my opinion — a little more washed-out (since it's darkening the really light areas and lightening the dark areas). So make sure to only use this option when you need it.


Aug 29 2010

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.

Aug 26 2010

Dad

This post is mostly to get some things off my chest about the situation with my father, and also to let everyone know what's happened and how things are going. More important points in bold, for those who just want the bullet points.

The History

My father is an alcoholic. Has been for most of his life. But the story starts even before that. His father was also an alcoholic. He would work long hours at BF Goodrich, come home, have dinner, then drink. Grandpa didn't drink to get drunk; he drank to pass out. My father has told stories like once when playing cards with grandpa when he was a kid, granpda just passed out in the middle of it.

Dad also became an alcoholic. I'm not sure when he started drinking, but I do know that it was before I was born. For years he controlled it pretty well, but then it seemed to get out of hand. His second wife divorced him because of it, but it didn't get really bad until grandpa died. Not long after that, dad spiraled downward pretty fast. So far that grandma and one of his sisters put him in the hospital and forced him to take Antabuse. My memory is honestly a bit hazy, but I recall him being in and out a few times before he decided he wanted to get better. For the next 10 years, he kept his sobriety.

Recent News

But for the past 6-7 years, my dad has again been losing the battle with alcohol. I think it started when I moved to Atlanta. Part of me can't help but feel at cause, but the rational side of me knows that it's not my responsibility to be around to keep dad sober. He had some ups and downs, at one point had 2 years sobriety, but then began the downward spiral again. His alcoholism is compounded by depression and anxiety issues, as well as sleeplessness (he uses the "I drink so I can sleep" excuse that grandpa did). He also got involved with crack-cocaine, which would be more worrying to me than the alcohol if the alcohol issue weren't life-threateningly bad. Dad's AA friend Jeff started getting in touch with me to let me know when things got bad.

A few weeks ago, things got really bad. Dad called into work for an entire week, and during that time pretty much subsisted on beer alone. If you've seen Leaving Las Vegas, it was a lot like that. Only in real life, it's a lot more messy. Jeff said that when he went in to check on my dad (I'd given him a key to dad's house some time ago), he found him unconscious naked on the couch, with beer cans covering the floor, and fecal matter all over the kitchen floor, living room, hallway, and bathroom.

It was never this bad. The next day Jeff roused my dad so that he could talk to me on the phone. Previous to this, dad had always said that he just wanted to be numb, but that he didn't want to die. This time he told me, "I just don't want to live any more."

The Saga

That was all it took. The next day I drove up to Louisville and took out a mental inquest warrant on my father. That is a warrant saying that he is a danger to himself or others due to a mental illness. Alcoholism is considered a "voluntary mental illness" so warrants are only issued in cases where people are suicidal, homicidal, etc.

The warrant was completed that night, and within 45 minutes the police were on my father's doorstep. My father's condition was so bad (a few of the cops uttered such phrases as "holy mother of god") that they called an ambulance for him, which took him to the ER in the hospital. After they got him in stable condition (which took about 24 hours), they moved him to the psychiatric ward. The psych ward upheld the mental inquest, and sent him along to a rehab facility.

It took dad almost 2 weeks to completely sober up and come out of the mental fog. The facility he was at is supposed to be one of the best in the region (dad mentioned people from a few states away being there), and his therapist/social worker Maria seemed to be very experienced and skilled with people in dad's situation (though they said he was among the worst that they had to deal with). She knew exactly the sorts of pitfalls that he would face after coming out of rehab, and wanted to prepare him for those.

I could probably write several thousand words about this, but to sum up, dad wants to get better. At least, he says he does, and I hope that's true. The doctor told him that he doesn't have another run like that in him — if he goes back to drinking, he will die. He's currently in a transitional living house, supervised 24/7 but the guys in the house go out to a few meetings a day and have other scheduled activities, so it's a little more freedom than the intensive inpatient ward. They're basically teaching dad how to live sober again. When alcoholics get to the point my father did, they forget what it is they love in life. Their life becomes a cycle of drink, sleep, work. So they are going to teach my dad how to break that cycle, and form new habits of living. Dad also volunteered to go on Antabuse, which I think is a great sign.

He's been keeping in touch with me every day. There were (and to some extent, still are) concerns about his work,but I think everything will be fine there. He has a medical doctor saying that he needs to be under this care, and his work has a strong union, so I doubt that anything bad will come of it. Then again, they did fire him for going into treatment a decade and a half ago due to some loophole they have where you can't get more than one instance of temporary disability for the same mental illness. But he fought the man, and actually won that one after an 8-year-long battle.

Things are looking up. Let's hope they stay that way. My friends have all been very supportive, and I am truly blessed to have the great people in my life that I do.

Idea for a next post: With my parents, how did I end up not completely screwed up? Or am I?


Aug 25 2010

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 (EDIT: after a modem glitch and talking to Actiontec support, this is apparently supposed to be MMODE. No clue why ADSL2 worked before).
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.


Aug 9 2010

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.


Jun 29 2010

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.


Jun 26 2010

iPhone 4 Preliminary Review

I got my iPhone 4 a day early (thanks to ordering it through the Apple website), and have taken some time to try out its features. I’m coming from a 3G though, not a 3GS, so this thing is probably more impressive to me than it would be to someone with the latter.  So, review below, with important parts in bold.

General Feel

This thing is way more responsive than the 3G. Then again, the iOS 4 did seem to speed up my 3G a bit too, but it was still fairly laggy for most things. The iPhone 4, however, feels just about as snappy as the iPad (which is to say very snappy).

The battery life seems good.  The first day I used it more than moderate but less than heavy/constant, for about 8 hours — recorded maybe 6 minutes worth of video, lots of app downloading and use, compressed a couple of videos and sent them to YouTube, etc. I also had WiFi and Bluetooth on. That used up about half the battery, which is nothing magical, but still pretty impressive. Second day, with a bit of talking, Bluetooth turned off most of the day, and medium to light usage, between 10am and 6pm the battery is at 70%. Not too shabby.

I didn’t think that I was going to even notice the snazzy “Retina” display that packs tons of pixels in tightly, but I actually do notice things being much more crisp.

Form Factor

I’m not in love with the design, but I don’t hate it either. It is rather annoying that accessories that I bought for my 3G (like case/protector, car dash mount, etc.) won’t work with the iPhone 4. It is thinner though, which is subtle but can still be noticed, and I like the design of the buttons — raised and separate.

The smudge-resistant glass actually works fairly well. Well enough that the smudges that do show up are subtle, and get cleaned off completely when I put the phone in my pocket and take it back out again.

Video/Photos

The camera does seem to take better low-light pictures from my preliminary tests, though nothing magical — you’re not going to get great low-light photos from any smartphone with current technology. That’s mitigated by the flash though; the LED flash does seem to help a lot. The general picture quality of the front-facing (main) camera is quite good. About as good as a point-and-shoot camera in fact. I took the picture on the left last night (click on it to see the full-sized version). It was enough of a close-up that I had to tap to focus.

Video quality is good, though holding the phone in your hand to take video isn’t the most natural thing in the world. It also disappointed me to discover that you can’t switch between the front and back cameras when recording video — it’s either one or the other.

There is also a built-in utility to upload to YouTube. On the downside, it downsamples to 320p, so no uploading hi-def videos directly to YouTube from your phone. On the plus side, that means it doesn’t take a year and a day to upload videos. I’d like the ability to control this.

The rear-facing camera seems pretty decent. Not as swank as the front-facing camera, but definitely good enough for basic self-photos. One thing that would have been nice is a fake flash for this. I bet someone will make an app for that — something that makes the screen mostly white but shows just enough of what the front camera is seeing so that you can tell what you’re taking a picture of.

iMovie

iMovie is pretty basic, but a cool toy. It allows you to do some very simple video editing like adding a single non-DRM song as background accompaniment to your video project, mesh multiple videos and/or photos together (with some basic transitions), add a Ken Burns effect to your photos, and add a title to your video.

Things that I think that I should be able to do in iMovie, but can’t:

  • Set the volume level of the music clip.
  • Set the music clip to start somewhere other than the beginning of the video.
  • Make the music clip start somewhere other than the beginning of the song (so I can start playing at the good part of Final Countdown, for example).
  • Crop the music clip, to make it stop playing when I want it to.
  • Insert a title over a photo (it can only be added to a video clip as things stand).
  • Add multiple music clips.
  • Insert an image into the middle of a movie clip, so that the clip pauses to show the photo, then continues.

Here’s a link to a quick clip I tossed together of Link at White Wolf | CCP getting “iced” at work, video taken on iPhone 4 and edited with the iMovie app.

Miscellaneous

You lose reception if you hold the phone in your left hand. This is apparently a known issue, and Apple’s reaction has been less than reassuring. I’m not sure if this can be fixed (without a recall of some sort), and it’s pretty astounding that it got through Apple’s QA. I’ve heard that this issue is also fixed by using the bumpers that Apple sells, so I assume that when protective cases come out those will solve it too. So while it’s certainly a bad flaw, functionally it won’t affect most people. I’m assuming that most people will use a case anyway — otherwise the screen is at risk of breaking if you drop it.

The voice commands are new to me, since I didn’t have a 3GS. They seem to work fairly well — not much better or worse than your average voice command system.

Conclusion

The iPhone 4 is definitely a worthy upgrade from a 3G. If I had a 3GS… maybe not so much better that it’s worth another 2 year contract and $299. Probably not worth it, really. In fact, I’d probably have been better served to get the discounted 3GS, but I’m a technophile and have to have the latest and greatest. The camera quality is great, the phone itself is responsive, and though it’s definitely not the perfect phone, I am quite glad that I upgraded.