Tuesday, November 21, 2006

The Mysterious Apple Phone

Howdy.

First off, this post begins simply as a response to the latest rumor over at MacRumors.com. It got me thinking, and rather than post in the forums I thought I'd start a long-winded and nary-insightful blog post. As if you all care what I think.

The Apple of the 1980's was about Simplifying Computers, to bring them to the non-geek. The Apple of the 1990's was about Staying Afloat. The Apple of the 2000's, firmly re-seated in the public eye with the iPod, iTunes, and Mac OS X, is about Lifestyle Integration. This is why I think an Apple iPhone is not unlikely.

Here's one thing I think Steve Jobs knows: the phone is not the end-all-be-all device. It's not going to cook you dinner (although you can use it to order some), it's not going to wash up after you (though you could call in an emergency maid, maybe), and it's not going to make you more attractive when it goes off in a movie theater. But phones are more and more people-friendly.

Remember when YOU had to know everybody's phone number, or look it up in a book? Crazy. Nowadays, we simply look through our contact list or our recent calls, and the phone knows all the numbers it needs to connect. Phones also integrate the answering machine functions via voicemail, and can actively alert you when a message is available.

What most phones suck at, however, is Internet. Sure, many have mini-browsers, and can surf websites on their tiny, tiny screens. But it's clumsy to navigate, and clumsy to fill out forms or do any real work with. Phones that are actually good at surfing , on the other hand, are generally terrible at being phones. They end up being bulky, or have too many buttons, or are simply buggy. Sure, they can make calls, but it feels like a 1990's palm pilot with phone support added as an afterthought.

Bulk, buttons, and bugs were the three craptastic features of almost every MP3 player available just before the release of the iPod. Hmm... might this be something Apple could do right, and score big with? You bet.

But look at all the other moves Apple is making. They've got a lot of personal info management built into OS X with iCal and Address Book. Depending on your phone, you can make these apps play nice and have things sync. But an Apple iTunes-like solution is going to simply work better. Looking ahead at Leopard, we've got a ToDo's and Notes system ramping up as an underlying element of the OS. Wouldn't it be nice to have a smart phone that integrates with that functionality as well?

Then we've got iChat AV. Imagine being able to connect via the Internet with your buddies online from your cell phone. Seems nice enough, maybe not a killer app, though. Now imagine an integrated camera. Yes, it syncs with iPhoto, but is also capable of video conferencing through your phone.

Probably not all that useful if you're using it as a typical handset. But then there's this iTV thing that's coming out - remember when we found a 'missing integrated iPod dock' on the mac mini? Try an iPhone dock on the iTV. And it just so happens that your integrated camera faces the couch while all your contact info & photos are syncing up. (Of course, when your boss calls and fires you, don't blame the iPhone for the 17 "YOU'RE FIRED" faxes that appear throughout the house.) Now you're in prime position to video conference minus a computer.

And then there's the Zune. Microsoft is pushing hard the 'Wireless sharing of music.' It's a given that the iPhone will have integrated iTunes support with music listening built in. But with a Zune, your friend needs to be physically close (and with his Zune) in order to share something. What if you could get the same functionality over broadband with other iPhone users? Now space is not a limiting factor for sharing your music with others. And, of course, the iPhone would actually integrate with the iTunes Music store. Not only could you buy any music at any time with your phone, but when you're listening to your friend's shared music, a purchase is just a click or two away. How's that for appeasing the RIAA?

So I think it's a definite possibility. I simply can't say that it will actually happen, but I've got to believe that this could be why the Zune doesn't seem to be fazing Apple in the slightest.

And I doubt this would happen, but I'll throw it out there because I think it's a neat idea. Most phones have GPS. What if movie theaters (and upscale pickle-butted restaurants) had a database that they could register with to define their 'space'? A phone, when on the network, could use that GPS information to auto-silence. Emphasis on the Auto. After all, Steve doesn't want a phone going off during Cars - even if it is an iPhone.

Tuesday, June 27, 2006

Piece of Cake

Well, folks, I'm back from Summer Film with a vengance. And it's time to get down to some programming, so here goes.

We've all heard about Ruby on Rails. "It's so great," they say. "Ruby is so simple, and efficient," I hear. "There's a cool guide that has Foxes!" says some other guy from the back.

But I already know PHP. I like PHP. In fact, I really like PHP. It has that old-school C style syntax, and yet, it's just frustratingly different enough from C to make it enjoyable to code in. (I use 4; 5's good too, but I haven't bothered to seriously update, because my hosts still use 4 on the majority of their boxes, including the one I'm on.)

So what great MVC package is there for PHP similar to Rails for Ruby? Well, there's PHP on Trax. A plus is that it fairly closely follows Rails. But, it requires PHP 5. Hmm. Yeah. 5's great, but no thanks right now.

There's also TaniPHP, which supports PHP 4. But that's not been updated in ages, and it looks like it won't be.

And then there's CakePHP. PHP 4 support, check. Inspired by Rails, check. Good documentation, check. Active community, check. Fantastic.

So here's my adventure installing CakePHP on Mac OS X. You can follow along, if you like.

Step Zero: Install PHP and MySQL for OS X. I did this a long time ago, but if you're just getting started, you'll probably like to do this. Otherwise, things are really not going to make sense later. There are great instructions for installing PHP & MySQL by hand on Apple's Developer Connection, but I'm not setting up a production box, I'm setting up a development box. For that, I do things the easy way. I'll optimize later.

So here's the easy way: Marc Liyanage's OS X Packages. Easy, helpful, just follow his instructions.

Step One: Download and unzip Cake. Because I'm developing multiple Cake apps, I'm going to put the resulting directory in my /Library (that's Root Library. Not the User or System Library.) On most Unix systems, a shared Cake install goes to /usr/lib.

The latest stable version at the time of this writing is 1.1.5.3148. Go ahead and download it from CakeForge. Once you've unzipped it, rename the resulting folder "Cake" and move Cake to /Library. Now you'll have your Cake Libraries installed in /Library/Cake. Recursively delicious.

Step Two: It's likely you want to work on your Cake application somewhere other than /Library. And you probably don't feel like modifying httpd.conf either. So good news - you can simply move the /Library/Cake/app folder wherever you feel like working - and name it whatever you like. You can also duplicate this folder and create multiple Cake apps. I simply put it in my home directory. Thus, I end up with /Users/myhomedir/app. If I want to start a blog application (like the tutorial app, for example) I'll duplicate that folder and rename it 'blog.' I can duplicate this folder over and over to create my applications.

Step Three: Now that you have your library and applications folders in place, you need to move Cake's webroot directory into the place where you want to serve your files from. For example, when you activate Personal Web Sharing, the Apache serves files from /Library/WebServer/Documents. If I move /Users/myhomedir/app/webroot to /Library/WebServer/Documents/webroot, then my Cake application will be accessible at http://localhost/webroot/. If I copy the contents of app/webroot, to /Library/WebServer/Documents, then my Cake app will simply serve out of http://localhost.

I like working out of my home directory, though. Fortunately, Personal Web Sharing also enables the Sites folder of my home directory to serve files: http://localhost/~myhomedir/. Using the blog example, I'll typically move the webroot folder (in /Users/myhomedir/app) to /Users/myhomedir/Sites, and then rename it 'blog.' Now, my Cake blog will be served from http://localhost/~myhomedir/blog/. Flexible, and handy.

Step Four: Now all your files are in place. To give Cake a working install, though, you'll need to tell it where your libraries and app files are!

Going back to the blog example, let's review: My Cake Libraries are in /Library/Cake. My Application Folder is /Users/myhomedir/blog. My Application Webroot is /Users/myhomedir/Sites/blog.

First, modify the index.php file in your webroot. Look for the comment box that talks about Cake being installed in a directory layout different from it's distribution. Modify the code like so:

/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
* Each define has a commented line of code that explains what you would change.
*
*/
if (!defined('ROOT')) {
  //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS
               //LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
  //You should also use the DS define to seperate your directories
  //define('ROOT', dirname(dirname(dirname(__FILE__))));
  define('ROOT', DS . 'Users' . DS . 'myhomedir');
}
if (!defined('APP_DIR')) {
  //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';
  //define('APP_DIR', basename(dirname(dirname(__FILE__))));
  define('APP_DIR', 'blog');
}
/**
* This only needs to be changed if the cake installed libs are located
* outside of the distributed directory structure.
*/
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
  //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE
        //CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
  //You should also use the DS define to seperate your directories
  //define('CAKE_CORE_INCLUDE_PATH', ROOT);
  define('CAKE_CORE_INCLUDE_PATH', DS . 'Library' . DS . 'Cake');
}

Now Cake knows where to find it's library and application files.

All that's left is to setup the database connection. Easy peasy: go to the application directory (/Users/myhomedir/blog). You'll see a "config" folder. Within that folder, duplicate "database.php.default" and rename the copy database.php. Open up this file in your text editor of choice (I like jEdit as far as programming, by the way).

Cake is nice in that you can be simultaneously running a few databases in order to have a 'testing' environment and a 'default' environment. Since this is just a development box, I generally just modify the default array. For this setup, you need only change the "login", "password," and "database" values to their appropriate MySQL values. For example:

var $default = array('driver' => 'mysql',
      'connect' => 'mysql_connect',
      'host' => 'localhost',
      'login' => 'mymysqluser',
      'password' => 'foxessuckoknotreally',
      'database' => 'blog',
      'prefix' => '');

Step Five: Start coding!

That's all there is to it. You're ready to code up the Blog tutorial, or start your own application. And a big plus is that for any major Cake changes, you can just install the new libraries into /Library/Cake, without having to change your application code!

Out.

Tuesday, May 30, 2006

C'mon, Pistons.

The last thing Detroit needs is another Red Wings. You went into the championships #1, come out #1 too. Please? Ben Wallace criticized the emphasis on offense that Saunders has brought to the club. This is probably because Big Ben is a powerhouse defender, and now feels like his skills aren't as useful in an offensive club. That couldn't be more wrong. The Pistons need Ben to continue to be a powerhouse defender. They need him to try to stop Shaq. Nobody actually can stop Shaq for any length of time, but Wallace could come close. Yet he didn't seem to be putting in enough of an effort until the third quarter. Of course, Detroit as a whole needs to play like they played that third quarter. Twelve points down, to four points up, back to twelve down. The third was the only quarter that they played Piston basketball. Frustrating. Oh well. See you tomorrow, boys.

Sunday, May 28, 2006

Block Party!

Oh cripes. A political post. I'm not at all sure that this idea is new. I bet some political scientist has already come up with it and found great formulas to integrate it into his voting scheme. But since I haven't read about that guy yet, I'm goint to take credit for it. I'm starting a new political party. Right now. If you want to join, add a comment. You're in. I'll get you on the newsletter. When we get one. It's called the Block Party. We have no candidates. Correct. Nobody will ever run as the Block Party candidate or on the Block Party ticket. What we're trying to do is block a sweeping majority across all sections of the government by any other party. For example, right now, the Republican Party holds a majority in the House, Senate, and they hold the White House. Concievably, they could pass any bill they wanted, if they could simply work together. (They can't seem to yet, fortunately.) Don't get me wrong; I don't think the Republican Party is out to destroy America. They believe that everything they're doing is good, moral, and right. But I don't agree with everything they stand for. Likewise, I don't agree with everything the Democrats stand for either. I don't think anybody is completely left- or right-wing. But there sure are a lot of folks out there who vote straight ticket. They pick one party and go all the way with them, without getting to know all the candidates and what they really stand for. The Block Party is about educating voters about candidates. You need to know who you're voting for. If you end up voting straight ticket, do so because every candidate you vote for is truely your candidate and not simply the Party's with whom you tend to agree. Rule 1: If you know nothing about the candidates running for a seat, abstain. Rule 2: If no candidate running for a seat is your candidate, abstain, or write-in your choice. If the candidate you agree with runs with the party you don't, vote for him anyway. Rule 3: If the candidates seem to have no real, tangible differences, and you feel you could vote either way, then look at the rest of your ballot. Are you voting mostly for one party? Vote for the other party when it seems the options are equal. Our government is based on checks and balances. Avoiding party majorities across sections of government keeps those checks and balances intact. It even strengthens them. This is my philosophy; if both the Legislature and the Exectuive are at odds, then very little gets done. And the things that do get done tend to benefit the people more, simply because they were necessary to the point of the parties coming together. As a bonus, the less the government does, the less they're messing with me. Cool. Here's a great link to get you thinking about your candidates: Project Vote Smart. And don't forget to vote in November.

Drag 'n Drop Googley Goodness

Hey all. Got a pet project I'm gonna lay on 'ya. It's a Google Search builder. One of the fun things about Google is the interesting stuff you can find by just surfing and modifying your searches. But it's such a hassle typing all the time. You gotta put your hand on the mouse to click links anyway, right? So with this (very beta! so beta, it's alpha!) page, you can drag-and-drop words. The green box is words you're looking for, the red box is words you're ignoring. The orange box is a shelf to save interesting results in. Yellow words are draggable. Give it a shot. Click the "Semi-Live" to get a new page of results every time you drag a word around. One caveat: This does break the "back" button. It's all AJAX-y and cool, but I haven't given it any kind of memory yet. I'll get to it. Rock.

Myspace... Facebook... right.

I hear these things are totally sweet. They're cool or something. I don't get it. Call me old fashioned, but I just like finding people in the real world. Every one of my best friends I've met because I just happened to be somewhere (that's not my house) at the same time as somebody else. I guess I'm also a bit paranoid about putting too much personal info on the internet in one convenient location. Maybe I'm just jealous or something. Nowadays you can Google search for people with your interests. To me, it takes the fun out. There's nothing quite like talking to somebody you've never met, and finding out that you both like some random, short-lived scifi show. The fact is, at any given time, you've got at least three things in common with the person you're standing next to in the elevator. And one of those things is that neither of you will say 'hi' first. And what's with these minors drinking and then posting pictures of themselves drunk? You might think that you're lost in a sea of information, but it's amazing what a search box can find you. Anyway, I think I'm cool with not getting it. I don't, and I'm pretty sure I don't want to.

Saturday, May 27, 2006

Fun with Adsense and Blogger

Hey all! Soooo.... I've set up this blog, right. It's right here. You're reading it. Good on ya. And Blogger makes it really easy to add Google Adsense to the blog. Real easy. 'Cuz Google owns Blogger. Cool beans. It's all good. But, you've got one spot (according to the Blogger Template tools) that those ads can go. I'm a rebel, so I manually re-placed the adds over in the Sidebar where they don't look like some crazy post where I when jumbo-doodle-cakes talkin' 'bout Pistons Collectible Gear in crazy link-type format. Fantastic. Then I went to change the color scheme of the Adsense. That's when it hit me. Boom. Jackhammer. You simply can't move the Adsense. We want it up top. That's it. So I re-moved it down to the side bar and figured I'd fix the colors in the code. If you're like me and you've moved your Adsense button, don't ever touch the Adsense tab in Template editor, or you'll find all your hard work undone. So I go to edit the colors. I do so. The Adsense code is nice in that it gives you helpful javascript variables that you can set to the appropriate color as you see fit. I did so. I preview'ed. Everything is cool. But when I go to re-publish my site, the colors won't stick. The Adsense is right where it's supposed to be. It looks OK. But it's stuck color-wise. Which is really odd, because it works in the Blogger Preview. But not fo-real I guess. Not cool, guys. Huh. UPDATE: Well, the colors updated between runs of Firefox. Which is interesting, because the first thing I tried was a reload, followed by a reload-frame, followed by a clear of the cache. Another interesting quirk: when I went to update this post, Firefox would routinely crash. I am now updating in Safari. Freaky. Huh again.

Pistons Rock.

Hey. So this is going to be one of those posts where I act like I know something about sports. I assure you, I don't. It's all a clever (or not so much...) ruse. The Pistons rock. They just do. And every time Shaq goes up against them, he gets frustrated. Case in point: 2004. LA Lakers. Goin' home. Could be due to bad team dynamics that year. Could have been Kobe's big head. Also could have been the Piston's stiffling defense that year. Case in point: 2005. Miami Heat. Lasted a bit longer - full seven games. And the Pistons did end up losing a tough 7 game series - but in the Finals, not in the Conferences. They lost game one agains the Heat this year. At home even - ouch. But they were coming off an unlikely (dare I say fluke?) 7-game against the Cavs. They came back strong to win Game 2 - although those last few minutes weren't the hottest in Piston history. Can they beat the Heat? Sure. But what do they need to do? 1. Get a lead early. Duh. No brainer. Getting the lead keeps them in the scoring mentality. When the Pistons get down, they start tightening the defense, which is a good thing, but it makes them conservative on the scoring end also. That's not Flip's game - it's Brown's, and it hurts them to play one coach's style under another coach. Flip's about scoring - get ahead and keep on getting ahead. 2. Think you're the underdog. The Pistons always play better when they think they're not getting any respect. It worked great in 2004 when nobody saw them coming. It worked well (although not as playoffs-finishing well) in 2005 when nobody thought they could do it again. But now they're considered a powerhouse team. They've got 64 wins this season to prove it (plus 9 in the playoffs so far). And somehow, unless the chips are down, they just don't seem to quite play Piston basketball. Hence games 6 and 7 of the Cleveland series. Hence Game 2 of this Miami series. Somehow, they have to convince themselves that winning against Miami isn't easy, simple, or likely, and that they are the underdog, not the Heat. 3. Go to Work. This one is simple. Show up and play like crazy. Go bananas. If everybody on the team played with the heart of Lindsay Hunter every game, they'd be absolutely unstoppable. That's all there is to it. (Have I mentioned that I think Lindsay is the reincarnation of Joe Dumars? I do. In fact, I'd believe that absolutely if it weren't for the fact that ol' Joe is still alive.) So there ya go. I'll see you at the sports bar.

Hey all.

Guess I got a blog. Looka me. Bloggin'.

Monday, January 01, 2001

Category