The obligatory “How I Feel About Twitter” post
I resisted Twitter for a long time. I never saw much attraction in knowing what people are doing every minute of the day. I sure didn’t think anyone would give a crap what I was doing (still don’t). However, as time went on and I ran into more people using it, I saw that people mostly ignore that fundamental question (“what are you doing?”) and more often give 140-character insights into their current situation or project or whatever. I began to thaw (if not warm up) to the idea, and now throw my twisted point of view out there on a fairly regular basis. I don’t follow a lot of folks and very few people I actually care about follow me; I doubt it’ll ever be the Big Thing with me like it is some people. I don’t use it for gleaning news or searching for info. If Twitter’s down, it’s not the end of my day or even a big inconvenience. I’m just not that into it.
With that said, I am inclined to wonder a little about Twitter’s future. They don’t seem to be able to get ahead of their phenomenal growth in terms of scalability. Understand that I don’t propose to have a solution for them; I’m not an expert on their architecture or massive scaling in general. I’m not going to say that Ruby is the heart of the issue, or Java VM’s or whatever other reasons the pundits give. I definitely feel for them; I would hate to be in their highly visible position when the gears stop turning. They seem to be at that tipping point, where they’re getting too big for their current britches but the new, bigger britches are still a little bit out of reach.
After last week’s highly publicized outage, everybody and their brother jumped in with opinions on the matter. They weren’t directly under attack; Google and other places were hit, too. Twitter was just the unlucky saps with the most public fail. Why, everyone wanted to know, could Google keep up with the extra demand brought on by the DDOS attack, but Twitter couldn’t (again) ? Of course, to little old me sitting on the outside, far from the hallowed hills of San Francisco and Seattle and Silicon Valley, the answer seems to be reasonably obvious; Google’s freaking huge and well financed! Twitter’s still getting their feet under them. Of COURSE they don’t have the capacity a behemoth like Google has.
There are two broad choices of opinion here: either Twitter is a classic victim of its own success (they simply got bigger a lot faster than they anticipated), or they made mistakes in their load planning. I don’t think anyone could have predicted the Ashton or Oprah effect. The cause is now insignificant; what they do about it is what will define them going forward. It will be interesting to see where they go, and whether it will be fast enough to keep the ever-fickle internet public happy and focused on their product. Will they wither like MySpace, or will they triumph like Facebook?
Either way, I’ll be sure to hedge my bets and not get too attached. Yesterday’s darling is today’s cliche. Better to place my attentions on important things like long, boring blog posts no one cares about—140 characters are for sissies!
Vershun Controle: Yur Doin It Rong
Version control, in a very simplified nutshell, is software that tracks changes to files and allows reverting back to older or different versions of same. In the programming world, its classic use is in a team shop, where multiple programmers may be working on the same file. The version control software, or VCS, time-stamps each change and allows selection or merging of those changes into the production product. If somebody makes a boo-boo, an older revision can be reactivated. All of the change tracking happens more-or-less automatically, so the coders don’t have to worry about the logisitcs.
I had considered setting up version control software (Subversion, cvs, etc.) for my web work, but had always dismissed it as not worth the trouble for a solo coder. No one but me’s going to be jiggling the wires, so as long as I’m careful…right? Well, today was the day for me to pay the piper. I needed to make a quick, minor layout change to a friend’s website…no big deal. I keep a copy of the website on my machine for easy reference, so I just made the changes there and then sent them out to the server.
Big mistake. When I pushed out the changes and then loaded the live page, I immediately noticed that I had broken the navigation–a fancy CSS-driven nested navigation. No problem, I thought; I’ll just roll back the changes in my editor and figure out what went wrong. I control-Z’d all the way back to the original copies of all the files I changed, then sent them back out again…and the nav was still broken. What the heck?!?
I realized then that I must’ve made some changes on another computer somewhere along the way, and never copied them to my home machine. When I over-wrote the server files with my local copies, I permanently deleted those changes and broke the nav in the process. That’s when the scrambling began…this was my friend’s business website, and he would not appreciate my rookie mistake. In short, I felt like a gigantic dumbass. No, I didn’t feel like a dumbass, I was a dumbass.
The most likely place for those changes to be stored was on my work laptop, where I have made copies of his site for offline backup purposes. Usually I carry the laptop home with me at night in case I get a late night call from work, so restoring the files would have been a simple matter. But, that laptop’s motherboard died earlier this week and the new one hadn’t arrived yet, so it’s a brick. No easy fix in sight.
Luckily, the laptop started giving signs of pending demise before it actually died, so I burned an image of the hard drive just in case. I drove up to work and went through the steps of restoring the necessary files from the image, copied them out to my DropBox online folder (and a thumb drive, just in case!), and headed back home. A few uploads later things were back aright.
If you happen to be a programmer of anything that you’d consider important or that you care about, take it from me…you need version control. I very narrowly avoided having to basically recreate this website’s navigation system from scratch, something that would take hours of needless work. Even with the narrow miss, I still spent hours fixing my dumb mistake instead of enjoying a nice afternoon of Mass Effect like I had planned. You can bet that I’ll be more careful in the future, and that I will be figuring out how to set up and use VCS very soon.
there is life after phpmyadmin!
**EDIT TO THE EDIT: It turns out that the remote access permission was exactly the problem. I had to go into my hosting account’s CPanel and add my IP address to the remote access permissions. Then, in MySQL Administrator, you simply use the server’s IP address as the host and the db user name & password. Easy squeezy.
***EDIT: After all of my excitement below, I’m having a hard time connecting to shared hosts with the software. “Remote access” has to be enabled on the database for it to work, which is probably a good chunk of my problem. A big part of it, too, is figuring out what the actual server address is—the virtual host name doesn’t work. The more obfuscation there is, the more complicated things become.***
In all my days of dinking with MySQL databases both professionally and privately, I have never run into a time where the PHPMyAdmin web-based administration tool couldn’t do what I needed it to do. But, I had never done anything with a truly large database, either—Joomla!, WordPress and the like just aren’t that big (at least in their initial states, prior to being populated with a lot of content). Neither were the databases for any of my hand-rolled applications.
All of that changed when I was tasked at work with moving a WordPress blog to a new server. Having done this several times before, I thought little of it—just a quick export via PHPMyAdmin, and then an import of same. A few minor changes to the WordPress config file and badabing! We’re on the air. Upon inspection, it turned out that the database for this particular blog was 62MB—not that large in my estimation, but apparently so for PHPMyAdmin. I tried a few times to do the standard table export, but it always hung before the process could complete. I still don’t know what the practical limit is for PHPMyAdmin, but apparently it’s less than 62MB.
So, I was left wondering just what exactly I should do. As luck would have it, the server we were moving from is a “real” server (virtual dedicated, actually) with access to the command line—a treat for this old shared hosting warhorse. It is a Windows box, but the MySQL prompt was still available. I started searching for command-line backup or export information and came up with a few different options. I ran into a few problems because most of them were for linux boxes, and the Windows syntax is slightly different. The one I ultimately used successfully was this one:
mysqldump -u username -p --databases dbname > output.db_filename.sql
Run that from the MySQL installation directory and you’re golden (once you move the resulting file somewhere you can use it, that is).
However, while working that out it occurred to me that the new server was good ol’ shared hosting, with no SSH access or command line to be had. If PHPMyAdmin couldn’t export a file that size, would it be able to import one? I was justifiably afraid that my triumph would be short-lived. I started looking for PHPMyAdmin alternatives.
What I ran across somewhat accidentally surprised me (I’m kinda thick that way): a solution straight from the horse’s mouth! The gang at MySQL/Sun have a set of GUI tools for MySQL that not only work on local databases, but remote ones, as well. I downloaded the MySQL Administrator application and in short order I was in business. I was able to connect to the old database, do an export, then connect to the new database and import in relatively short and painless order. Why hadn’t I seen this before now???? The Administrator includes the Query Browser, as well, so it’s kind of a one-stop shop for blossoming database geeks.
If there’s a way to create new db’s in MySQL Administrator I’m not aware of it; that’s still a chore for the host’s wizards or PHPMyAdmin. But for routine maintenance and backups, I’m pulling up stakes and switching to these apps until I find a reason not to.
See, I’m easy to please!