Advancing Backwards

Boldly going in the wrong direction since 2008

After waiting a few months for Supreme Commander 2 to be released, I happily ran down to my local Gamestop and purchased my copy yesterday. Normally, I would have just bought the game off of Steam, as it ends up being a touch cheaper what with very little tax involved. But, as I have a rather slow internet connection (I live out in the boondocks, no high speed cable lines or DSL to be found), I decided that if I wanted to play it sometime this week, I should just suck it up and purchase a hard copy of the game.

This actually turned out to be a mistake, as once I popped the disk to install, Steam pops up, saying that game will be installed through its SteamWorks service. No big deal, Empire: Total War did something similar, and it worked just fine. So, the game installs, and immediately after its finished, Steam begins “updating” the game. Still no problem, maybe there was a patch rushed out on release day to fix some bugs. But, then I looked at the download size of the patch, and its close to 4 gigs…

Turns out, the install disc only installs a portion of the game, the rest of which still needs to be downloaded. Not cool Steam, not cool at all. Whats the point of buying a hard copy? Are you trying to force us to use Steam? In the future, it would be really nice if there was some sort of warning about this type of underhanded activity on the box…and in the meantime, Ill be waiting a loooong time to play my game…

This is a topic that I couldn’t help but notice is MIA from many Android tutorials and books, even though its a relatively simple process. If you are familiar with creating and working with directories and files in Java, there’s nothing new here, but what threw me off initially was where to actually put the darn directory.

public class DirectoryTest extends Activity {

     private static final String TAG = "DirTest Output:";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        File sddir = new File("/sdcard/testDirectory");

        if (sddir.mkdirs()) {
             Toast toast = Toast.makeText(this,
             "Directory successfully created!",
					Toast.LENGTH_SHORT);
	     toast.setGravity(Gravity.CENTER, 0, 0);
	     toast.show();
        }else{
             Log.e(TAG, "Create dir in sdcard failed");
             Toast toast = Toast.makeText(this,
             "Directory creation failed!",
 					Toast.LENGTH_SHORT);
 	     toast.setGravity(Gravity.CENTER, 0, 0);
 	     toast.show();
        }
    }
}

Like I said, pretty simple. We create a new file object with the path to the SD card, which happens to just be /sdcard, and then we call the mkdirs() method, which will create all the directories along the chain we specified in our File object. Nice and easy.

So, I changed web hosts today.

No real impetus for the change, other than the fact that I was getting tired of all the hoops I was having to jump through to do things with my old host. They primarily dealt with Rails hosting, and that was fine, but Ive slowly been drifting away from Rails over the past year, and moving back towards PHP. My old host just didn’t have things set up to the point where it was easy to host both types of applications on the same account.

So, here I am. I ditched the old Rails blog, moved to WordPress, and registered a slightly shorter version of my URL, www.advback.com. I’m liking WordPress so far, its exactly what Ive been (and still am, in some capacity) desperately trying to recreate with my various Rails based monstrosities. One of my favorite features thus far is the little code/syntax highlighting plugin I installed. Quite cool, and very useful as well:

public class TestClass extends Activity {
     @Override
     public void onCreate(Bundle savedInstanceState){
          Button button = (Button)findViewById(R.id.button_id);
          int x = 42;
          String text = "Syntax highlighting is awesome!";
     }
}

Fun stuff, I must admit. So basically, nothing changes. Ill keep putting my mindless (and hopefully, occasionally useful) babblings up here, and you, the collective audience that is the internet, will continue to not read them. Business as usual.

Cheers to the new site.