Saturday, May 03, 2008

Warning: Grand Theft Auto is addictive!

I had a good laugh with this, thought I'd pass it along.

GTA 4 Liberty City Google Map

Its a coincidence that I found this today, as lately I've been messing around with Google maps myself.

http://grandtheftauto.ign.com//maps/1/Liberty-City-Map

Looking at the map,  I see only one airport ???!!! Is flying not that important anymore? Surely I must be mistaken.

Playing San Andreas, the Hydra (Harrier clone) was one of the more entertaining forms of transport and I have wasted so many hours just blowing up stuff with it.

Friday, May 02, 2008

MOSS Single Sign-On

I've started diving into the world of Sharepoint recently. One of our requirements of the project I am working on was for the user to be able to access content off existing external systems. MOSS provides SSO as an out of the box solution to enable this functionality.

What is SSO?

The default SSO service simply put, is a secure, pluggable storage mechanism for credential mapping between Sharepoint and other external systems.

Microsoft Office SharePoint Server 2007 provides a default single sign-on (SSO) service for the storage and mapping of credentials for use in connecting with third-party or back-end systems.

You can even plug-in an existing credential mapping system by implementing the ISSOProvider interface.

Setting up the SSO Service

using the service account to initially create the SSO database.

Using SSO

Now setup the application definitions and you're pretty much setting up the service. There are a few different ways we can use SSO:

Retrieving Credentials
http://mcse-blogs.com/certification/implementing-single-sign-on-sso-with-moss-2007.html

Logging into SQL Server as a data source for a DVWP http://blogs.msdn.com/sharepointdesigner/archive/2007/08/27/an-introduction-to-single-sign-on-sso-with-data-views.aspx

Logging into SQL Server using Windows Authentication
http://blogs.msdn.com/edhild/articles/377362.aspx

Forms Authentication and Screen scraping
http://odetocode.com/articles/162.aspx

To what extent is the out of the box functionality?

http://technet.microsoft.com/en-us/library/cc262932.aspx

Sunday, April 27, 2008

Find the System Uptime of your Windows/Linux Box

Ever wanted to find how long your Windows/Linux Box has been running?

For Windows

The Microsoft site suggests the following methods:

use the net statistics server command. Which can be re-written as net stats srv | Find "Statistics since" so we just get the info we are concerned about.

Or use a UpTime tool which does just that.

And my personal favorite method:

systeminfo | Find "Up Time"

Again, extracting only the information relevant to us.
For Linux

For the Linux environment we have the Uptime command:

uptime gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

Saturday, April 26, 2008

Halotography - Photo realistic Halo

Taken off the destructoid website.

Joshua used a combination of Halo 3 and Photoshop CS to give some of these images a more photorealistic look, with some impressive results. "I think this gives a much needed breath of fresh air to Halo," he writes to us. Anyone agree?

Check out his Filcker Page. The attention to detail is just super!

Useful XSLT / XML tools

I've worked on a XSLT based ad-hoc reporting solution a few months back. I don't think could have made much progress without the following tools at my side. Just thought I'd give them an honorable mention.


You guys got any favourite XML tools?

Sunday, April 20, 2008

Karateka and the IBM 8086

Karateka was the first game I ever played. I think I started playing this when I was like 5. Produced and Published by Brøderbund Software, Inc. this game would be the stepping stone for them to later create the famed Prince of Persia.
Sadly I was never really able to finish the game or rescue the princess. I used to get stuck at this position of the game (shown below), not crash or freeze, my character would literary just stand there not responding. Where the "evil-ninja" would then proceed to kick my ass.



I'll blame this on a hardware limitation or some software glitch or maybe it was just a shareware version I had. I used to play the same level over and over until I got bored. What else can a 5 year old to do?

And speaking of hardware, this is the beast I used to run it off:


The great IBM 8086. Oh man! I have so many fond memories around this machine. I guess my love(addiction :) ) for programming and computers as whole started out from here.

And just so you know here are the specs of this beast!
The first IBM PC ran on a 4.77 MHz Intel 8088 microprocessor. The PC came equipped with 16 kilobytes of memory, expandable to 256k. The PC came with one or two 160k floppy disk drives and an optional color monitor. The price tag started at $1,565, which would be nearly $4,000 today.

Saturday, April 19, 2008

Direct Download YouTube Video

So why download a YouTube video when you can just stream it?
Sri Lanka is not best known for it's blazing internet speed (especially the "home" packages). I for one just got tired of looking at choppy video.

Works great if you want to use your videos with your own home brew player/organizer.


Why don't you just go to keepvid.com or use a browser plug-in?

What? Where's the fun in that?
Think command line, think quick launchers, think batch process. Exactly!

Screen scraping
101

This is what I needs to be done to get the download url:
http://www.walkernews.net/2008/02/25/youtube-video-direct-download-link/

This is how we go about doing it in C#:
Download Watch Video page


Parse it for the download Url (this is where the magic happens)

Parse it for the page title (more magic!)


Construct your final URL and That's It!

Download the source and try it out for yourself.

Look forward to a powershell version in the future.

Sunday, October 08, 2006

Development and Vista

Visual Studio vs. Vista: What's going on here?

What's going on here indeed?

I understand that applications/operating systems cannot always have full backward compatibility. But the inability to run their flagship development environment on their (near) future flag ship OS is just insane.

I'm sure that Microsoft will eventually issue some patches/fixes. But until then this is only hurt the adoption rate of Vista by developers and more importantly businesses.

Friday, August 11, 2006

Javascript ASP.NET MessageBox

In Windows Forms it is very easy to pop up a status message by calling MessageBox.Show(“message”). It is that kind of object model we want in ASP.NET for printing out JavaScript alerts. We want Alert.Show(“message”) in ASP.NET.

JavaScript: Alert.Show(”message”) from ASP.NET code-behind

Simple and Elegant. Makes you wonder why somthing like this was not included with ASP.NET 2.0.

Saturday, August 05, 2006

How to contribute patches to Open Source Projects

Got some extra time? Want to help contribute to a piece of software which has improved your development or life?

Read this post by Scott Hanselman detailing the steps required to contribute patches to Open Source Projects.

Monday, July 31, 2006

Krugle, The Google for Source Code

Quickly find that Code Snippet you're looking for
find code find answers
Krugle makes it easy for developers to find source code and
technical information - fast!



This could be pretty useful as long as the script kiddies stay away.

Thursday, July 27, 2006

Temporary File Name

The Path.GetTempFileName() It's an easy way to reserve a temporary file name without having to reinvent the wheel, Pretty neat.

Once GetTempFileName() is called a temporary zero-length file is created for you, therefore guaranteeing it's availability.
The only gripe I have is that I cannot change the file extension without doing more I/O work on the file. It would have been nice if there was an overload to change the extension. For Instance, generating temporary HTML files etc... Files generated are currently with the *.tmp extension.

Wednesday, July 26, 2006

Infection and 7th Son Podcasts

Two of my favourite podcast novels came to an end recently:

Infection by Scott Sigler (with lots and lots of violence) and 7th Son by J.C. Hutchins (the master of cliff hangers)

Both final episodes were awesome. And no, I'm not going to spoil it for you, check them out for yourself.
I've been a fan of Scott Sigler since the days of Ancestor and discoverd J.C Hutchins' work through his promos.
So hurry up and download them while they're still avilable for free.

Monday, July 24, 2006

Virtual PC Free

I know this is old news, but this application deserves a mention. Virtual PC has saved me more times than I can count.
Especially working with my legacy printer driver software.

Taken from the site:
Microsoft will also offer the free download of Virtual PC 2007, with support for Windows Vista, available in 2007


This is great news indeed.

Sharing information between User Controls

I recently helped a friend clean up some code he inherited.
This web application had many user controls which needed to maintain some common information between each other. So each user control loads up the state from the business logic for each of it's instances.
As this was too repetitive and a performance hit, I decided to use per request caching. So only the first instance loads the information, and subsequent request are thought the cache.

More information here:
http://aspnet.4guysfromrolla.com/articles/060904-1.aspx

Friday, July 21, 2006

First Post, Yet again

Well this is my second blog. Used to have one a while back I got rid of it. Mostly due to neglect really.

So why start all over again?
I realised that by having a blog I was able to keep track of my thoughts over the years. Well at least on a technical level, which gives a lot of perspective on my progress. So this is my second attempt at this, hopefully I would keep it up-to-date this time round.

Please be advised that I'm not a professional writer (if that's not Obvious by now). I'll try keep this blog clean, cohesive and technical as possible, but please do forgive the occasional digressions.