Wednesday, May 25, 2005

The Singularity

Slashdot had an article yesterday about downloading your brain.

It reminded me of an essay called Staring into the Singularity.

The essay talks about what happens when we develop an AI that is capable of improving itself, by designing and implementing it's own software and hardware. Once this happens, thanks to ever-increasing hardware speed the work that the AI is capable of doing in a given timeframe rises asymptotically to infinity in a short period of time.

At this point the essay proposes that one by one the neurons in your brain can be replaced by a wireless device that performs the actual processing. The physical neuron will not be shut down until the inputs and outputs are modelled exactly by the computer. This way, your conscious is shifted into a computer seamlessly, and there is never two copies of you running at any point (which is one of the major issues raised in the Slashdot article).

It's a thought-provoking read.

Tuesday, May 24, 2005

Macro to attach to asp.net process

You know how much of a pain it is to debug web apps in Visual Studio .Net? You either run the website (which takes forever) or have to attach to the aspnet_wp.exe by clicking [Alt]dp[Enter][Enter][Enter].

Finally! A macro to attach to the process automatically! Thanks to Dan.


Sub AttachToAspDotNet()
  Dim attached As Boolean = False
  Dim proc As EnvDTE.Process
  For Each proc In DTE.Debugger.LocalProcesses
    If (Right(proc.Name, 13) = "aspnet_wp.exe") Then
      proc.Attach()
      attached = True
      Exit For
    End If
  Next

  If attached = False Then
    MsgBox("aspnet_wp.exe is not running")
  End If
End Sub

Monday, May 23, 2005

Plane reverse thrusters Part II

I flew to Sydney on the weekend. On the way back, I was sitting just in front of the wing. As we were landing, I checked out the engine on the Boeing 737 and lo and behold, the back part of the engine slid back just as the loud windy noise started. It looked just like this (about half way down the page, under the heading "b) Reverse Thrust Configuration".

So, this just goes to show, not all of the information on the internet is bullshit. Unless this post is also bullshit... hmmmm.

Friday, May 20, 2005

Plane reverse thrusters

I just read about reverse thrusters for jet airplanes. You know when you touch down and then you hear a really loud sound from the engines and the plane slows down quite rapidly?

I always assumed they somehow ran the engine in reverse or something. I knew that didn't make much sense, but I didn't really know how it would work.

Well, it turns out they deploy these big diverters behind the engine that just redirects the jet exhaust!

See this Wikipedia article for more info.

O2 Xda II Mini

I recently purchased an O2 XDA II mini. It's manufactured by HTC. It's also badged and sold as an iMate JAM.

I love it. I'm all for convergence. Where I used to carry around:
- A mobile phone (Nokia 6610)
- A 256MB USB flash memory stick
- A Palm Vx, which despite being old was still very capable.
- A paper based diary
- A flash based MP3 player

I now have just one device. It covers all these functions, plus it provides:
- A camera/video, albeit a really crap one
- Voice recording
- Masses of applications
- Wikipedia on the device if I'm ever curious about just about anything.

I also don't have to worry about synchronising people's contact details across my phone, palm and PCs. The Xda synchronises automatically with Outlook on my work and home computers.

Pros:
- Small form factor an ideal compromise between mobile phone and organiser with a useful screen
- I can write my own programs for it! This is one of the most important points for me.

Cons:
- If I ever want to just carry a mobile, it's a bit bulkier than my old mobile.
- Only 128MB RAM. I bought a 1GB expansion card, so that's okay :) I can't wait until they've got a multiGB hard disk built in.

Next time I'll talk about how I tend to use it and the applications I've written for it.

Wednesday, May 18, 2005

Movie Physics

Dammit! I just saw a trailer for the Fantastic Four movie. I was really looking forward to this one. The FF, Victor von Doom, what's not to love?

Then I saw a scene where a truck is coming towards The Thing (the strong, orange, rocky one) and someone else who was lying on the ground. So The Thing jumps in front of the person, braces himself and hip and shoulders the truck.

The truck crumples around him and stops dead (cool CGI, by the way, he's almost enclosed by the truck due to the crumpling).

But get this... the truck stops. Excuse me for having a brain, but exactly how is he anchored to the road?? Fair enough he's not hurt. I guess he weighs a fair bit too, but not as much as a truck, I'd wager. What should have happened is that he puts a big dent in the truck and gets carried along. It's the whole conservation of momentum thing I'm talking about.

This kind of thing just ruins the illusion for me. It rubs into my face that what I'm watching is not real. It sucks. And it's becoming rampant.

Remember in The Hulk when he's standing on the roof of a building and jumps a few kilometers away? Well, if he applied that much force to the roof of a building, the only thing that would happen is that he blasts the roof out from under his feet and he falls down.

At least let's get some semblance of an excuse for something vaguely resembling realism. Please?

VB.NET vs C#.NET

There's an interesting discussion happening at work at the moment about VB vs C# code. My thoughts:

VB as a language was designed to abstract a lot of complex functionality so that the programmer didn't have to "bother" with it. This is great for small and simple applications. It provided a great platform for developing small applications quickly and efficiently.

C++ however doesn't try to hide detail (although later libraries such as the STL started to edge in this direction). So you have more power and control, but also an increased level of complexity. So it took longer to produce a simple application but is more capable for a complex application.

So from my point of view, the comparison is between ignoring complexity and knowing, at a deeper level, what was actually happening when you call a function with a reference parameter. Knowing how memory is managed and how pointers work. Coz this stuff is still important, no matter how much .NET tries to hide from you.

I don't think there is any difference in VB or C# code. The only differences nowdays (.NET) is the syntax.

However, there is a big difference in code written by someone how 'gets' how the low level operations work and someone who doesn't. This is, to me, the essence of the (unfair IMO) categorisation of VB programmers and C++/# programmers. The categorisation is based on where you came from. If you started working with C++ you probably understand this stuff, or you wouldn't have cut it as a C++ developer. If you started working with VB, you didn't have to do that. Mind you, that doesn't necessarily mean that you don't get it... there's no reason that a programmer starting with VB is any less capable of understanding what's going on under the hood.

Joel on Software has an interesting article about Leaky Abstractions that also illustrates this issue. It's pretty long, but it's almost certainly written better than this (admittedly long-winded) post :)

Steamships

I was amazed to read that the QE2 was originally built with a steam turbine! It's maiden voyage was in 1969. I didn't realise that steam turbines were still in use at this late date. She was refitted with diesel engines in 1986.

And thus it begins...

Okay, so I got me one of these newfangled blog thingies. I expect that the world will now be a better place, with no more hunger, poverty or war. That's the way these things work, isn't it??