dotnet

Cross platform games on the PS3 and the Xbox 360

Oliver Brown
— This upcoming video may not be available to view yet.

In case you didn’t know, the PS3 can run Linux. Not only that but it’s officially supported by Sony. You can download (for free) a utility to put a boot loader on to some media (most likely a hard-drive but memory cards, memory sticks and anything else the PS3 can read (and can hold 10Mb) are supported) and set it to boot “Other OS” (that’s what the menu says). There are already videos on the Internet of it running Fedora. Zac Bowling already has one running Mono, a task simplified by the fact that the cell processor appears as a PPC. So where does the Xbox 360 come into this? Well Microsoft are releasing something called XNA, a modified/extended version of the the .NET 2.0 run-time with emphasis on Managed DirectX that is available for Windows and the Xbox 360. A version of XNA called Mono.Xna that is built on top of the Tao framework is in development. The end result is that in theory, games developed using XNA will run on Windows, Linux, Macs, PS3’s and Xbox 360’s. A few problems still exist. The processor that the PS3 uses is rather strictly an in-order processor so most stuff that isn’t written specifically for that will run slowly (although video playback will be pretty zippy) and so far there is no hardware 3D support for an “Other OS” so XNA (if it were available now) would run slowly.

This is an imported post and may not be formatted correctly. View the original here.

A safe language on a safe OS

Oliver Brown
— This upcoming video may not be available to view yet.

Have you heard of “managed” code? Generally it refers to code that has no direct access to memory and instead has to access everything through a protected interface of sorts. The main advantages are that a program can’t go poking memory that it shouldn’t and useful rules can be enforced like type safety.

The most prevalent example of managed code is nearly everything running under .NET/Mono. Admittedly you can mark parts as “unsafe” letting you use pointers and stopping the garbage collector arbitrarily moving your data around but most of the usefulness comes from avoiding this where possible.

The problem is, you can’t always avoid it. The main reason for this is you have to access existing non managed systems. Rewriting everything in managed code is not feasible and although you can lessen any problems by writing wrappers so there is only one point of contact between managed and unmanaged code, problems can still occur - the sort of problems the managed code was supposed to prevent.

Microsoft are investigating a solution. After reading that last paragraph, the form of the solution should be obvious but for the most part it’s unworkable in the real world - eliminate all unmanaged code.

A lot of people claim managed code, or specifically .NET is slow and inefficient. Well it is. But it can be made faster. Most inefficiency is caused by a lot of run time checks to make sure everything is as it should be. If the code lives in an entirely managed world however most of these checks can be removed since (barring random hardware failure) the program can be guaranteed to satisfy the run time checks at compile time.

For more details about Singularity, Microsoft’s research operating system written in C#, check out this article by James Larus, Galen Hunt, and David Tarditi over at MSDN.

ASP.NET sucks

Oliver Brown
— This upcoming video may not be available to view yet.

I recently bought a book about ASP.NET: Pro ASP.NET in C# by Apress, mainly because when I was looking for jobs there were lots of ASP.NET jobs advertised. And I have to say I have no idea why. Part of the problem may be that is book isn’t very good (there are bits of vague contradictions and a general obsessive (and inaccurate) preachiness about it) but I think there are major limitations to ASP.NET.

Firstly the inability to post to a different page. Who the hell decided that was good idea? I know it can be faked but that’s just silly. And you can only really have one form on a page. Well you can only have one “rich” form that ASP.NET can access in a clever and high level way.

I’m assuming people will disagree with me (if not, why is it so popular). If you do, please explain why ASP.NET is supposed to be so amazing because I don’t see it…

Updated - Clarifying my position on ASP.net