Sunday, November 30, 2008

Honoring the System/360

I just found this celebration of the 40th anniversary of the System/360 at the Computer History Museum.

Another presentation at the museum said that the S/360 project is like Google today pouring $32 billion into a new product which might or might not work to replace search. I found a video of the presentation here.

For the few who have the opportunity to write their programs on punched cards, paper tape, teletypes, CRTs, and now Visual Studio 2008, perhaps we should be more prepared to celebrate the 50th anniversary in 2014.

Deism, predestination, omniscience, infralapsarianism ...

(This post is meant for trained computer scientists.)

I write a program, say, a game with different role playing characters. Let's call this program The World. There are good guys and bad guys in The World. There are space invaders, and spaceships too.

I am the creator of this program.
[Aug 2010 update: by sheer coincidence I came across this 1976 article: ]

Unless I have lots of time, I have to write the program running on an existing operating system. Hence, I would be making operating system calls. In addition, I may make use of third-party libraries. But nothing prevents me from also writing the operating system from scratch, starting with the first IPL instruction. It would take a long time, but is something a mere mortal can definitely accomplish.

Nevertheless and notwithstanding that my program with the OS is now more than 800MB of machine code, my program is pretty simplistic and deterministic. The outcome of every single player action is known when I wrote, or even at the time I designed, the program. Which spaceship is going to crash and burn, which corner of which space invader is going to be blown off, are all known by me, the creator, long before anyone inserts the first coin and a new player life is created. I have to write every single line of code that shows the bits of space invader falling off, pixel by pixel.

After many days (definitely far greater than six) of designing, coding and debugging, I could have a nice running game. With all the effort put in, The World is complex, in fact very complex (and very buggy). And it would probably be beautiful too, with lots of graphics, animation, and audio effects.

Now, I have complete knowledge of The World. Because I code every line, I know everything there is to it about this game. Over time, I may forget things here and there, but all I have to do is to refer to the source code, and if it is amply commented, I would be able to understand every bit again.

The World may be an enjoyable game offering countless hours of excitement and challenges, lots of explosions, and births of new lives and deaths of many others. But in the eyes of us human beings, that is, the class of living things who are capable of creating The World, it is a simple program, albeit with many lines of code.

Despite all the colorful graphics, sound and fury, my program is by all definitions still very dumb. Every single action is hard-coded in The World at the time of creation. Every possible outcome is predictable, and has to be decided and coded by me the creator. What happens when a player moves the joystick one degree to the right, I have to code the response, depending on the state of all the other parameters at that moment in the game. Nothing can be unexpected. If there is, it usually ends up as a bug and has to be corrected.

Which game character survives to eternity, which goes up in a ball of pixelated flame, it's all in my hands. I make the decision, at my own will and good pleasure.

Each player life has a certain amount of free choice. The outcome of every choice still has to abide strictly by my algorithms. When a new player life is created, I throw a die, a pseudo-random number that is still pre-determined on which algorithm I use, to set it on its initial path of action. be completed

Friday, November 28, 2008

Motorola Motorokr S9-HD - After two days

I am very pleased with the audio performance of this mobile concert hall. Anywhere (almost) or anytime, this headset turns my Nokia E-71 into a very nice piano concerto machine.

At Nokia volume level 1 (one notch above mute) and Motorola minimum volume level (double beeps), I can hear the klavier keys crisp and sharp, almost like sitting next to it. The cellos and double basses stun as they reverberate through my nervous system. ppp passages drown me in a stupor, and as the orchestra crescendos in the final bars, I have to hold back from clapping and making a fool of myself.

I said almost anywhere as the sealing capability of the "ear buds" is zero. Other than in a quiet environment, I have to push the "ear buds" with both hands into my ears and hold them there. So while it's cord-free, it's definitely not hands-free. The "ear buds" are no ear buds. They are gigantic speakers that perhaps only Shrek can call them ear buds.

Wednesday, November 26, 2008

IIS ASP.Net - What identity is your page running in?

There are at least three identities that I know of when you run an ASP.Net page on an IIS server. They are:

  1. At the page level: Page.User.Identity

  2. At the thread level: System.Threading.Thread.CurrentPrincipal.Identity

  3. At the process level: System.Security.Principal.WindowsIdentity.GetCurrent()

Then there are authentication and impersonation modes to set. In Vista, the Computer Management configuration is not as neat as XP or Server 2003, as follows:

Click to see details

The different identities have values as follows (the IIS server is mozart and the web browser user is UserA):

Authentication ModeASP.Net ImpersonationProcessThreadPage
AnonymousFalseNT AUTHORITY\