Archive for July, 2009

Apple Tablet Out in Q1 of 2010?

Apple Insider has a new post up as of yesterday positing an Apple tablet to be released sometime early next year. Apparently, the anonymous sources that AI talks to have been feeding them information for the last two years on the device, but AI only recently deemed the plans far enough along to talk about:

The 10-inch, 3G-enabled tablet, akin to a jumbo iPod touch, is the latest brainchild of chief executive Steve Jobs. That distinction, as insiders will tell you, carries its share of baggage. Under the critical eye of Jobs, contours must be precise, each pixel of the interface has to match a particular vision, and there can be no fault — no matter how slight — or it’s back to the drawing board.

As such, AppleInsider has observed silently as the project was reset at least a half-dozen times over the past 24 months. Each time, development was frozen and key aspects of the device rethought, retooled and repositioned. At times, those close to the Apple co-founder had their doubts that it would ever see the light of day, just like a smaller PDA device he canned a few years after returning to the company.

Two things are intriguing about this article:

  • Apple apparently dropped an Intel Atom-based chipset in favor of rolling their own with hardware capabilities they got when they purchased PA Semi last year. This was probably the genesis of the minor brouhaha that came up last year when Intel executives trash talked the iPhone’s processing capabilities. No one likes being jilted.
  • This thing is very much not an iPhone (it apparently doesn’t have a mic, and so can’t do voice calls, a key part of the AT&T exclusivity contract), but it does have 3G in it. This could mean that Apple is clearing the way to at least use other carriers for the tablet device. Verizon is hauling ass on building its next generation network in time for Q1 of 2010. TechCrunch has sources that think this is for Apple.

Exciting stuff. I can’t wait until the release. My bet is that it will get announced in late January and be released in late March.

The biggest thing about this is going to be the impact that it has on wireless data networks. If it’s non-cellular, and the 3G or 4G or whatever access is there to serve its internet needs, then we’re talking about the average user slurping down a lot of bits over a wireless carrier’s infrastructure. At least in the beginning, that ain’t going to be cheap. If this thing can revolutionize the netbook-ish space like the iPhone has the smartphone space, then perhaps we’ll see some serious drive on the part of US wireless carriers to bump up their pathetic bandwidth rates to something more like what the rest of the developed world (especially Japan and South Korea) enjoy.

Ruby XML Part 4 – Correction and Elucidation

Hola amigos. I know it’s been a long time since I rapped at you on my Ruby XML stuff, and some of these posts have been pretty dunce-tastic, so I know all my readers were looking forward with bated breath to the next installment, wherein I would no doubt prove that I had grown incrementally smarter. Wait no longer.

OK so first things first. This thing I’ve messed around with recently isn’t a service — it’s a client. We must make sure that we get the nomenclature correct so that we’ll know what we’re all talking about. The thing on the other end is the service. I was referring to it as a service in kind of a generic way, but it wasn’t too helpful because this is most definitely properly called a client.

So what kinds of changes have I made recently? Well first off, I decided that this snippet from my last post was just painful to the point of utter crappiness:

1
2
w = WebEx::Request.new
w.send_request(XMLObject.create_attendee(@attendee))

Not only is it ugly, it’s long-winded and hard to remember. As soon as I had another person working with this code at work, I felt the sting of shame and knew I had to re-factor. I decided that there was no reason not to take the opportunity to use one of Ruby’s vaunted metaprogramming features to try and make this a little shorter. Now it works like this:

1
2
w = WebEx::Request.new
w.create_attendee(@attendee)

Maybe #method_missing?

So how did I accomplish that? Simple, I used Ruby’s method_missing to enable arbitrary method calls to be made on the WebEx::Request object.

method_missing is a hook method that gets called when there’s no definition found for a method called on an object — i.e. the method is missing. When that happens, the Ruby interpreter automatically calls an instance method called method_missing. Usually, that’s not defined, so the interpreter will raise an exception, but if method_missing is defined, the interpreter does whatever it says to. Here, I’m defining it like this:

1
2
3
def method_missing(request_method, *args)
  self.send_request(WebEx::XMLObject.send(request_method.to_sym, *args))
end

In this case, self is of course an object of the WebEx::Request class. When the interpreter tries to call #create_attendee on an instance of that class, it can’t find the method and method_missing is called. My implementation of method_missing assumes that the “method” being called on the WebEx::Request object is a real class method of the XMLObject class (which is where all my actual API calls are), so it calls it there, passing along the arguments it received in the first place.

Of course, if no such class method exists, the interpreter throws an exception like it should. But for legitimate calls, I’ve shortened my code by quite a bit.

<gasp> isn’t it bad to use method_missing?

Some might argue that this is a cavalier usage of method_missing. I don’t really think so. The entirety of my request class is only like three methods other than this. It exists only to make a request and process the result, but it does that dumbly because it actually uses XMLObjects for the real meat of both. WebEx::Request is just a dumb object acting on stuff at the direction of the WebEx::XMLObjects that it calls through XMLObject class methods. If the Request class had a lot more methods, using method_missing might have been an irresponsible design choice. But since the notion of the request and the thing being requested are necessarily intertwined, this approach made a lot of sense to me because it let me join the two classes up for usage (WebEx::Request and WebEx::XMLObject), improving readability and reducing verbosity but still letting me keep the two classes usefully separate in the code.

method_missing is one of those things that you’ll sometimes hear people talking about Ruby referring to as magic. Like other, more experienced folk, I hate the usage of the word “magic” to describe things that happen in Ruby. The concepts behind metaprogramming aren’t that difficult, and as Mr. Giles says in his blog post, metaprogramming is just programming. If not for method_missing, you wouldn’t have cool stuff like Builder and RSpec. Or maybe you would, but not as elegantly. method_missing underlies much of the powerful Doman-Specific Language stuff that is so popular and useful in Ruby, so as my dad used to say: “it’s not bad or scary — it’s just different.”

(Gist of the full module)

Tags: ,

Video Games — Violence and Evolution

I read this GamaSutra editorial with some head-nodding and some thoughts that it was a shame the author couldn’t have centered his critique more tightly on the idea that game designers need to get more creative (by looking for something better to make than just Yet Another FPS) because the maturation of the medium demands it.

His central premise is that while super-violent video games are fun, watching increasingly realistic depictions of human murder is probably not all that great for the human psyche. By the time that complete photorealism is possible in games (he pegs this to be about a decade away), the average gamer will be involved in tens of thousands of acts of simulated murder, torture, etc.

Eventually, he says:

If the video and computer game industry doesn’t begin to show concern over widespread and flippant depictions of realistic human violence, game publishers will soon be asking players to regularly murder scores of astoundingly realistic virtual people, enjoy it, and defend the practice from critics of the art form. (Actually, they already do, but I digress.)

But the industry shouldn’t be asking this of its loyal fans and customers. This is not just a financial issue between publishers and their wallets; it’s an ethical issue that will increasingly affect our laws, culture, and society on a deep level.

I agree. But I also agree that censorship isn’t the answer. I think what the industry really needs is a healthy combination of shame and aspiration.

Murder isn’t the point – evolution is.

Blowing things (and people) up in video games is just super fun. That’s why there’s so many FPS games out there. But let’s face it — lots of them suck. You have to ask yourself if the designers could possibly be doing other, more interesting things with their creative/programming prowess. Perhaps if there were a more permeating ethos of pride in the variety and quality of things tried in games, if game designers looked at their medium as a method for creating societal commentary and art as well as entertainment, the way filmmakers do, we’d start to see something different.

Edwards focusses on murder in this article, but for me it’s less about the psychic damage of playing violent games than it is about it being simply boring as shit to have most blockbuster titles revolve around killing. As far as I’m concerned, the game industry is guilty less of promulgating psycopathy than they are of simple lazy thinking. Edwards touches on this slightly:

I can’t help but feel that such a profound and tragic event as human murder or even “justified” human killing should be a rare and powerful statement in games, not a common theme. With the ever-increasing power developers have in their hands to rip apart virtual lives, I think it’s time to re-examine the use of death and killing as a core game mechanic.

Perhaps the public is already beginning to tire of wantonly violent gameplay with its enthusiastic embrace of both casual games and the Nintendo Wii’s lighter fare. Many players are flocking to innovative, less intense games that make the “hardcore” (read: “mostly violent and/or realistic”) gaming world shudder.

I’m not sure I want to have to wait for the public to get there though. I want the video game industry to develop a sense of pride that says “when we make any game (even FPS games), they will be works of art. And we will look for ways to push the limits of creativity, wonder, and fun as well as artificially induced adrenaline rushes.”

I guess what I’m saying is that if I were on the Call of Duty: Modern Warfare team and I went out and played Little Big Planet, I’d probably want to sit down and cry 15 minutes later, wondering why the hell I’d made yet another borderline-shameful simulation of the pain and death of real soldiers instead of something profoundly cool, beautiful, artistic, and novel.

In other words, gore won’t ever feed the soul. And it’s becoming time that game developers look upon that objective as, at least in part, their job.

Tags: