Carmack on the PS3 and 360

John Carmack, the 3D game engine guru from id Software and a game developer I hold in very high regard, and Todd Hollenshead, CEO of id Software, were recently interviewed by GameInformer. Carmack recently received a Technology Emmy for his work and innovation on 3D engines, a well deserved award.

I was a bit surprised while reading the interview. Carmack seems to be a pretty big believer in DirectX these days, and thinks highly of the XBox 360. On the flip side, he’s not a fan of the asymmetric CPU of the PS3 and thinks Sony has dropped the ball when it comes to tools. I never realized that Carmack was such a fan of DirectX. He used to tout OpenGL so highly.

Todd and Carmack also talked about episodic gaming. Their general consensus seems to be that episodic gaming just isn’t there yet. It doesn’t make sense because by the time you get the first episode out, you’ve essentially completed all of the development. Shipping episodes at that point doesn’t make sense since you’ve already spent the capital to make the game to begin with.

Episodic games seem like a great idea from the outside, but perhaps they’re right. Traditionally, the initial games have sold well, but expansion packs don’t. Episodic gaming may be similar in nature with respect to sales. If the content is right, however, perhaps episodes will work. But then there’s the issue of release times. If you release a 5-10 hour episode, when is the optimal time to release the next episode? You’ll have gamers who play the entire episode on the day it’s released and then get bored waiting for more. And then there’s the gamers who take their time and finish the episode in a week or two. If you release too early, you upset those some people who don’t want to have to pay for content constantly, while waiting may cause those bored customers to lose interest.

The interview covered a few more areas such as DirectX, Quakecon, and Hollywood. I encourage you to check it out, it makes for good reading!

iPhone… A revolution?

So the cat’s out of the bag. Apple is already in the computer business, the music business, the video/TV business, and now they’re joining the cell phone business. Wow, they’ve come pretty far in the last 7 years alone.

So what is this iPhone thing anyway? Steve says it’s going to revolutionize phones, and that it’s 5 years ahead of the current generation. So does it really stack up? Well, since it’s only a prototype at this point, that’s a little hard to say. The feature set is impressive, as was the demonstration given at Macworld. Most of the reviews I’ve read have been pretty positive too.

So let’s break this down a little bit and see what we have. The most noticeable difference is the complete and total lack of a keypad/keyboard. In fact, there are a grant total of four buttons on this thing, five if you count up/down volume as two. And only one of them is on the actual face of the device. This may seem odd at first, but the beauty here is that any application developed for the iPhone can arbitrarily create their own buttons. How? Why?

Well, the entire face of the phone is one giant touchscreen. In fact, it’s a multi-touch screen meaning that you can touch multiple points on the screen at the same time for some special effects such as zooming in on a picture. This means that developers are not tied to a pre-defined keypad and can create what they need as the application is run. So, for instance, the phone itself has a large keypad for dialing a telephone number. In SMS and email mode, the keypad is shrunk slightly and becomes a full keyboard.

As Steve pointed out in his keynote, this is very similar to what happens on a PC today. A PC application can display buttons and controls in any configuration it needs, allowing the user to interact with it through use of a mouse. Now imagine the iPhone taking the place of the PC and your finger taking the place of the mouse. Your finger is a superb pointing device and it’s pretty handy too.

The iPhone runs an embedded version of OSX, allowing it access to a full array of rich applications. It should also allow developers a access to a familiar API for programming. While no mention of third-party development has been made yet, you can bet that Apple will release some sort of SDK. The full touchscreen capabilities of this device will definitely make for some innovative applications.

It supports WiFi, EDGE, and Bluetooth 2.0 in addition to Quad-Band GSM for telephony. WiFi access is touted as “automatic” and requires no user intervention. While this is likely true in situations where there is no WiFi security in place, the experience when in a secure environment is unknown. More details will likely be released over the coming months.

Cingular is the provider of choice right now. Apple signed an exclusivity contract with Cingular, so you’re tied to their network for the time being. Being a Cingular customer myself, this isn’t such a bad thing. I like Cingular’s network as I’ve had better luck with it than the other networks I’ve been on.

In addition to phone capabilities, the iPhone is a fully functional iPod. It syncs with iTunes as you would expect, has an iPod docking connector, and supports audio and video playback. One of the cooler features is the ability to tip the iPhone on it’s side to enable landscape mode. The iPhone automatically switches to landscape mode when it detects the change in pitch. Video must be viewed in landscape mode.

So it looks like the iPhone has all of the current smartphone capabilities and then some. But how will it do in the market? The two models announced at Macworld are priced pretty high. The 4 Gig model will run you $499 for the 4 Gig model, and $599 for the 8 Gig. This makes the iPhone one of the more expensive phones on the market. However, it seems that Apple is betting that a unified device, phone/iPod/camera/Internet, will be worth the premium price. They may be right, but only time will tell.

UPDATE : According to an article in the New York Times, Jobs is looking to restrict third-party applications on the iPhone. From the article :

“These are devices that need to work, and you can’t do that if you load any software on them,” he said. “That doesn’t mean there’s not going to be software to buy that you can load on them coming from us. It doesn’t mean we have to write it all, but it means it has to be more of a controlled environment.”

So it sounds like Apple is interested in third-party apps, but in a controlled manner. This means extra hoops that third-party developers need to jump through. This may also entail additional costs for the official Apple stamp of approval, meaning that smaller developers may be locked out of the system. Given the price point of the phone, I hope Apple realizes the importance of third-party apps and the impact they have. Without additional applications, Apple just has a fancy phone with little or no draw.

SpamAssassin and Bayes

I’ve been messing around with SpamAssassin a lot lately and the topic of database optimization came up. I’m using Bayesian filtering to improve the spam scores and, to increase speed and manageability, I have SpamAssassin set to use MySQL as the database engine. Bayes is fairly resource intensive on both I/O and CPU depending on the current action being performed. Since I decided to use MySQL as the storage engine, most of the I/O is handled there.

I started looking into performance issues with Bayes recently and noticed a few “issues” that I’ve been trying to work out. The biggest issue is performance on the MySQL side. The Bayes database is enormous and it’s taking a while to deal with the queries. So, my initial thought was to look into reducing the size of the database.

There are a few different tables used by Bayes. The main table that grows the largest is the bayes_token table. That’s where all of the core statistical data is stored and it just takes up a lot of room. There’s not a lot that can be done about it. Or so I thought. Apparently if you have SpamAssassin set up to train Bayes automatically, it doesn’t always train the mail for the correct user. For instance, if you receive mail that is BCCed to you, then the mail could be learned for the user listed in the To: field. This means the Bayes database can contain a ton of “junk” in it that you’ll never use. So my first order of business then is to trim out the non-existent users.

The bayes_seen table is used to track the message IDs of messages that have already been parsed and learned by Bayes. A useful table to prevent unnecessary CPU utilization, but there is no automatic trimming function. This means the database grows indefinitely. The awl table is similar to this in that it can grow indefinitely and has no autotrim mechanism. For both of these tables I’ve added a timestamp field to monitor additions and updates. With that in place, I can write some simple Perl code to automatically trim entries that are sufficiently old enough to be irrelevant. For the bayes_seen database I plan on using a default lifetime of 1 month. For the awl I’m looking at dropping any entries with a single hit over 3 months old, and any entries over 1 month old with less than 5 hits. Since MySQL automatically updates the timestamp field for any changes to the row, this should be sufficient enough to keep any relevant entries from being deleted.

While researching all of this I was directed to a site about MySQL optimization. The MySQL Performance Blog is run by Peter Zaitsev and Vadim Tkachenko, both former MySQL employees. The entry I was directed to dealt with general MySQL optimization and is a great starting point for anyone using MySQL. I hate to admit it, but I was completely unaware that this much performance could be coaxed out of MySQL with these simple settings. While I was aware that tuning was possible, I just never dealt with a large enough database to warrant it.

I discovered, through the above blog and further research, that the default settings in MySQL are extremely conservative! By default, most of the memory allocation variables are maxed out at a mere 8 Megs of memory. I guess the general idea is to ship with settings that are almost guaranteed to work and allow the admin to tune the system from there.

I’m still tuning and playing with the parameters, but it looks like I’ve easily increased the speed of this beast by a factor of 5. It’s to the point now where a simple ‘show processlist’ is hardly listing any processes anymore because they’re completing so fast! I’ve been a fan of MySQL for a while now and I’ve been pretty impressed with the performance I’ve seen from it. With these changes and further tuning, I’m sure I’ll be even more impressed.

So today’s blog entry has a lesson to be learned. Research is key when deploying services like this, even if they’re for yourself. Definitely check into performance tuning for your systems. You’ll thank me later.

Linux Upgrades – Installation from a software raid

I recently had to upgrade a few machines with a newer version of Linux. Unfortunately, the CD-ROM drives in these machines were not functioning, so I decided to upgrade the system via a hard drive install. Hard drive installs are pretty simple and are part of the standard distro for Redhat. However, the machines I had to upgrade were all set up with software raid 1.

My initial thought was to merely put in the raid location where the install media was located. However, the installation program does not allow this and actually presents a list of acceptable locations.

So from here, I decided to choose one of the 2 raid drives and use that instead. The system graciously accepted this and launched the GUI installer to complete the process. All went smoothly until I reached the final step in the wizard, the actual install. At this point the installer crashed with a Python error. Upon inspection of the error, it appeared that the drive I was trying to use for the installation media was not available. Closer inspection revealed the truth, mdadm started up and activated all of the raid partitions on the system, making the partition I needed unavailable.

So what do I do now? I re-ran the installation and deleted the raid partition, being careful to leave the physical partitions in-tact. Again, the installer crashed at the same step. It seems that the installer scanned the entire hard drive for raid partitions whether they had valid mount points or not.

I finally solved the problem through a crude hack during the setup phase of the installation. I made sure to delete the raid partition once again, leaving the physical drives in-tact. I stepped through the entire process but stopped just before the final install step. At this point, I switched to the CLI console via Ctrl-Shift-F2. I created a small bash script that looked something like this :

#!/bin/bash

mdadm –stop /dev/md3

exec /bin/bash ./myscript.bash

I ran this script and switched back to the installer via Ctrl-F6. I proceeded with the installation and the installer happily installed the OS onto the drives. Once completed, I switched back to the CLI console, edited the new /etc/fstab file and added a mount point for the raid drive I used, and rebooted. The system came up without any issues and ran normally.

Just thought I’d share this with the rest of you, should you run into the same situation. It took me a while to figure out how to make the system do what I wanted. Just be sure that your install media is on a drive that the installer will NOT need to write files to.

Voting in an electronic world

Well, I did my civic duty and voted this morning. I have my misgivings about the entire election process and the corruption that abounds in the government, but if I refuse to vote, then I really can’t complain, can I.

So, after waking up and getting ready for work, I headed to the local polling location to check out the Diebold AccuVote TSX system they wanted me to vote on. It’s a neat looking machine from afar, but once I got up close, I was sorely disappointed.

I can’t put my finger on it exactly, but these seemed to be very flimsy, rushed systems. The touchscreen didn’t feel right, tho it was presumably accurate, lighting up my choices as I chose them. There was a slight delay after I touched the screen, however, and that was annoying. The first time I tried to vote, it rejected the card I was given and flashed an error about being cleared. Well, I hope that’s what it said. Thinking back on it now, I’m upset that I didn’t take more time to read the screen. I’m honestly not sure if the error stated that the card was cleared, or that the machine was cleared. And when I returned the card for one that worked, the lady I gave it to mentioned that there were a bunch of cards she was having problems with. Not good..

On a positive note, the mechanism that held and ejected the voting card seemed to be well built. It worked well. I think that’s about the only piece that I thought was decent though. Kinda pathetic actually.

Speaking of the Diebold machines, I urge you to check out the HBO special, “Hacking Democracy.” The entire show is up on Google Video for your viewing pleasure. You can access the video here.

Firefox 2.0 Released!

Firefox 2.0 was released earlier today. I wrote previously about this latest release while it was still in Beta. I recommended then that you check it out, and with the final release here, I’ll say it again! This is one of the best browsers out there. Give it a try, it’s easy to uninstall if you find you don’t like it!

Internet Explorer 7.0 Released

Well, it looks like Microsoft has finally released Internet Explorer 7.0 to the public. Initially you have to download and install it manually, but they plan on releasing this on Windows Update in the near future.

I’m a huge fan of Firefox, so why am I bringing this to your attention? Well, there are a couple of reasons. It’s more secure than IE 6.0, much closer to being standards compliant, and if you have to use IE at all then this should make life a little safer and easier.

If you use Firefox exclusively, then please, continue doing so! And maybe even take a glance at version 2.0! But if you need IE at all, even for the IE Tab extension for Firefox, then please update IE to this latest version.

Interactive Searching

Saw this over at LetsKillDave.. I guess the Windows Live team has been playing around with the idea of interactive searching. They’ve come up with something they call Ms. Dewey. It’s pretty neat to play with. Just ask her a question and just before she returns the results, she converses with you. Some of the responses are quite funny. Check it out.

Some ideas for questions :

r u hot? (Thanks Ozy)

These are from one of the comments at LetsKillDave :

Where can I get a date?
Where can I get tested for STDs?
How do I tell my mother she’s a grandmother?
Are you gaining weight?
Where do republicans come from?

Or ask her about Bill Gates or George Bush. I think I’ve seen about 20-30 different responses so far. I’m not sure how many there are total.

Other ideas.. Ask about suicide, the weather, or just simply curse at her. All unique responses.. This is quite the time waster.. Highly recommended!

Update : Try telling her to take her clothes off… No, really, try it..

powered by performancing firefox (yeah, I’m checking it out)

Windows Live Writer Beta

I’m writing this post using the new Windows Live Writer Beta. It’s a blogging tool that allows you to write your blog entries offline and upload them later. Useful, I guess, if you’re not connected all the time. For me, it’s just something to play with. Time will tell whether I like it or not.

To use Writer with a Serendipity blog you’ll need to install the XML-RPC plugin. Once that’s up and working you need to tell Writer what kind of blog you’re using. After it fails the auto-detect you’ll need to choose the API to use. I’m using the Metaweblog API and it seems to be working fine. It also asks for the URL for publishing. For the XML-RPC plugin, the URL will be something like this : http://www.example.com/blog/serendipity_xmlrpc.php

So, for now, I’m just messing around with the system to see what it’s capable of. It seems to be a fairly nice system, pretty at least. Just a document editor with the standard font options on the surface. Hyperlinks are available (as they should be), and it seems to handle media as well such as pictures, movies, audio, etc. I’ve haven’t dealt with media yet on this blog, so I’m not that interested in those capabilities.

Writer won’t download the categories I have set up on my blog, so I’ll have to hand-edit that after I publish. No big deal I guess, but kinda defeats the purpose of this utility. I also don’t see a way to add serendipity tags, so that’s another hand-edit. You can add third party tags such as those from Technorati, LiveJournal, and others, but I have no interest in that.

The web preview is pretty nice. It shows you exactly what the web page will look like when you publish it. It’s pretty cool and seems to work well.

Well, I guess it’s a little nicer than the JavaScript WYSIWYG editor that’s built into serendipity, but between the need for XML-RPC and the lack of serendipity features, I don’t think I’ll be continuing to use Live Writer. While trying to get Writer to work, I also ran across two other tools, w.bloggar and Performancing. The first is a program similar to Writer that seems to allow offline editing. The second is a Firefox plugin that seems to have a ton of features. I’ll be checking both out in the near future.