Wolfenstein 3d iPhone Review

ID Software have taken time out from letting you play Quake 3 in your browser to release a port of the granddaddy of all first person shooters - Wolfenstein 3d. The iPhone is really beginning to show itself as an excellent gaming platform, and despite its age Wolfenstein really looks at home on the phone.

The graphics are, quite frankly, rubbish. However, they’re exactly as they were when the game was released in 1992 which is exactly the point. The sound has faired much better and sounds great. The voices of the German soldiers still send shivers up your spine. It’s an extremely faithful port of the game, and the addition of an automatic save feature means it really works as a pick up and play game. It’s very easy to dip in and out of taking one level at a time.

The controls have naturally been revamped for the iPhone’s unique control system. You steer by moving your left finger over up/down/left/right arrows and fire by tapping your right finger on a button. This works really well and it is very easy to pick up and to start running around the Nazi prison that you find yourself in. The controls do rather feel like driving a fork lift truck. You regularly find your self reversing backwards around a corner, which is not how a person would move, but it’s easy to forgive and hard to see how else it could be done.

Read More...

"Programming Collective Intelligence" Book Review

Toby Segaran’s book is given the subtitle “Building Smart Web 2.0 Applications”. It’s clearly been assigned to the book by a marketing drone who felt that they needed to get the phrase “Web 2.0” in there somewhere. Unfortunately this left me feeling a bit disappointed when read this book because it’s not really what the book is about. A far better subtitle would have been “An Introduction to Machine Learning”, but I don’t work in marketing.

My expectation based on the title was that the book would focus mainly on how to generate recommendations based on a user interactions with a set of objects. I was expecting it to cover not only the mathematical basis for such algorithms but also the practical implications that sites like Last.fm and Amazon have to deal with processing such enormous data sets. While the book does cover recommendation systems they’ve given only a small slice of what is already quite a short book. There is no mention of how to process huge datasets either through map/reduce or some other scalable architecture.

The rest of the book is take up with classifying objects in a set, predicting the prices of a new objects given similar objects or filtering items such as email into spam and ham. These are staples of machine learning textbooks, but here are introduced in a very accessible and easy to read way. These chapters are interesting and informative but perhaps not that useful if you’re building a web 2.0 site.

Read More...

iPhone 3.0 Thoughts

Yesterday, as was splashed all over the web, Apple announced the iPhone OS 3.0. The key features in my view that were announced are cut and paste, push services and the possibility of turn by turn navigation.

I was a bit skeptical over being able to copy and paste. I imagined that it would only be useful if your were using the iPhone for business, which I don’t. Apple’s implementation seems to be highly impressive though, and I’m suitably impressed. Rather than just being limited to copying text between the inbuilt application it appears that you will be able to copy HTML, images and more between both the inbuilt applications and more. If you want to send more than one photo in an email just copy it from the photo app and paste it straight into an email. Sweet.

Recently my iPhone has been suffering from a strange problem where the battery goes from full to empty in just a few hours and feels warm to the touch. I suspect that the problem maybe due to the mail app so it is excellent news that the much delayed push services will be coming this summer. Rather than applications needing to poll for information developers can ‘push’ updates out to your phone automatically. This has the dual benefit of saving battery power and giving some applications a fake running in the background mode. The facebook app could keep you logged into facebook chat all the time and alert you whenever someone sends you a message. The same is true for email and other chat applications.

Read More...

Updating CouchDB Views In Django

CouchDB views are a bit like stored procedures in a traditional database system. As with stored procedures it’s difficult to keep them in sync with your code, and to keep them in your version control system. In this article I’ll show you how you can use a django management command to update your views from files in your code base.

CouchDB uses a map/reduce system where each view is made of a filter program (the map) and an optional post processor that runs over the output of the map (the reduce). These pairs are grouped into design documents which are stored as a single unit in the couchdb database.

This command assumes that you store your map and reduce functions in the directory structure set out below.

project/
    app/
        couchviews/
            database1/
                design1/
                    mapreduce1/
                        map.js reduce.js
                    mapreduce2/
                        map.js
                design2/
                    mapreduce3/
                        map.js reduce.js
             database3/
                 design3/
                     mapreduce4/
                         map.js reduce.js
Read More...

Creating Django Management Commands

Creating a website with Django is great fun, but eventually you’ll need to write a tool to clean up you data, expire old users or one of the myriad of other administration tasks that are involved with running a website.

You’ll be very used to using manage.py to create your database and to run your webserver. It make sense to use the same script for your own admin tools. Not only to get the benefit of sharing lots of you code but also Django will take care of parsing command line arguments and importing your settings for you.

Unfortunately the Django documentation is quite lacking on how to add your own command, but it’s really quite easy.

If your app is in project/app then create the directories project/app/management/commands. Create an empty file called __init__.py in both the management and commands directories. Once you’ve done that every other python file in the commands directory can be executed via manage.py. If you create the file project/app/management/commands/x.py then it can be run as manage.py x.

Read More...