I'm an avid Flight Simulation fan, have been for years much to the mirth and merriment of the people I know. I enjoy nothing more (well, within reason) than filing a flight plan from one place to another and sitting online while I'm guided via live air traffic control - pretty much as real as it gets without setting foot into an actual plane.
The live air traffic control is from VATSIM, or more specifically the people connected to the VATSIM servers who have nothing but a simulated radar screen on their PC's with which to talk to and guide us armchair pilots from one place to the next, over the internet.
It's a lot of fun and it's the nearest I'll get to realising my childhood dream of being a pilot, because I have the worlds shittest right eye. I can see everything with it, only it's like looking through slightly frosted glass. So, Mr Woods isn't allowed to fly the Big Iron (though I *will* get my PPL one day).
I've been a member of the FlightSim community since about 1993 or 1994, (back in the dark days of FS4.0b with the aircraft and scenery design addon!) and during the years I've learned a LOT about piloting, navigation, radio communications, etiquette and aircraft stats. All of which appeal to me.
So it's my turn to give something back, no matter how trivial. Enter VatSimSigs.
VatSimSigs is, as the about page will tell you, simply a web application that allows you to display a signature on forums, reflecting your connection status to VATSIM - that is, online or offline. This is especially handy for those who browse the forums and are interested in seeing whether or not their buddies are online.
In addition, it also allows you to upload "sets" of images, which I have cunningly entitled "image sets" (genius!). These sets of images are a two-part group of signature images, one for online and one for offline statuses - but because the system generates HTML or UBB code links, you can have multiple different signatures running through your singular VatSimSigs account.
What this means is that if you're a member of a virtual airline (and I am, I'm a First Officer rank on www.thomsonvirtual.com , defected from KnightAir ), you can have one signature for that forum and another for additional forums, such as BAVirtual or EasyJetVirtual or whatever other forum you frequent. All from one place, no administration necessary - VatSimSigs will do the processing and make sure the correct status image is served no matter which image is requested.
VatSimSigs is also free of charge - so enjoy, tell your friends and have three greens!
For those who are interested, It's built in ASP.NET MVC 2.0, and took about 19 hours to complete from start to finish including design / development / deployment - not bad going :)
Seems to me that Posterous isn't all it's cracked up to be with regards comment spam - sorry for all the messages advertising sunglasses, lolitas and penis creams (none of which I have bought by the way, although I do need some new sunglasses) - normal service is hereby resumed.
As everyone who uses the Tyne Tunnel knows, sometimes it's good to be able to look ahead to see what road conditions are like, as it tends to get fairly busy at peak times of the day.
As a regular user of the Tunnel, last night I decided to build a simple application for my phone in C# using the Windows Mobile SDK so that I can quickly load up the webcams which are available at www.tt2.co.uk - hopefully it'll be of use to some other people with Windows Mobile phones, and i've made it available to download below.
Here's a few screenshots:
As you can see it's fairly basic but it has a user-selectable "auto update every X seconds" facility, a toggleable "auto cycle" through all available cameras facility, and that's er, pretty much it - obviously an internet connection is required and remember to close the app if you get charged for data (or it'll refresh every 30 seconds by default!)
This is only tested on an O2 XDA Orbit II handset - it requires QVGA Portrait mode and I have no idea whether it'll work on any other device - use at your own risk.
Facebook Like plugin - why something so small is so massive
21 April 2010
Tonight I watched the Facebook Feight keynote where Facebook announced their new technologies and applications live to the world.
One thing that really stood out for me was something so simple you have to wonder at its genius. The like button.
You're probably familiar (at least if you use Facebook) with the like button. Essentially its purpose is to announce that you like a specific item someone has posted, be it a URL, a video or a picture, so that your friends on Facebook can see that you enjoyed it.
What Facebook have done is bring that Like button to the entire web. Any page. Any image. Any piece of content. You can announce that you like anything at all no matter which site it is featured on. All you have to do is incorporate a single line of code into your existing website which points to the item you wish to 'like'. This results in something like the following:
This is game changing.
Imagine, if you will, that you're called Bob and you own Bob's Online Makeup Emporium. You're doing pretty well selling lipstick and various concoctions that I have no idea about but you want to increase traffic to your site and you stumble upon this new 'Like' plugin. You spend two or three minutes integrating the code into your website and to test it out you load up a browser, visit your Makeup Emporium, select one of the products and click "Like".
By liking that product what you have done is told Facebook that you liked the product. Facebook adds something like this to your profile:
Pretty cool. But the beauty of it is in its simplicity. You haven't just liked something, you've told every single person on your Facebook contact list that you liked something because they see the same thing on their Facebook news feed. What if you have 500 friends, and they all think "hmm, I like lipstick I'll check that out..." then click on that link? You know what happens, they arrive on the page and potentially buy the product, but if they TOO click on 'Like' then they announce to all of their friends on Facebook in exactly the same way. If they have 500 more friends, then that's another 500 potential purchasers. Who, if they too 'Like' the item, will in turn announce it to all of their friends This is huge.
The reason this is so massive is because traditionally you had to reach out with AdWords based on specific keywords, paying a premium to be top of the sponsored listings, or employ various tricks and techniques to shoehorn yourself to the top of Google's listings.
Now, however, all you have to do is Like something and there's an immediate potential snowball effect. One "Like" turns into 10 "Likes", which turns into 50 "Likes" which in turn gets exponentially bigger and bigger and bigger. Each one of these visitors is a potential customer (because who doesn't like things that their friends like?) and you have to do zero marketing to encourage it - your friends and their friends and their friends' friends are doing it for you - simply because you have provided a product that people like.
Expect to see loads of these Like buttons on sites from now on - you'd have to be crazy to pass up the opportunity to appeal to such a massive potential market with barely any outlay or effort required.
While I was out and about this evening, I was fortunate enough to be driving along as the Sun set in the sky. Straight in front of me it shone, very low (and large) in the sky and for some reason (perhaps the ash cloud from the Icelandic volcanic eruption lately, or just the fact that it was so low that the atmosphere filtered some of it's intensity out), I could stare straight at it.
It was amazing - here I was, tootling along in my car, living my life, doing my thing and in a couple of inches of view ahead of me, was over a million miles worth of burning, boiling, beautiful, floating light. A million miles. That's a long, long way! Think about it; you probably only get about 150,000 miles out of the life of your car and it takes you 10 years to travel them. Think about how far you travel in ten years in your car up and down the motorways, to the shops, on holidays... this was ten times that distance, visible straight in front of me, and I imagined a line barely reaching a quarter of the way across. That's how far I'd have driven.
It makes you think, you know, this beautiful ball of light is floating around in the empty darkness of space about 95 million miles away from where you live your life. There's barely anything in between, and it sometimes looks like you could just reach out and touch it. Perhaps the human mind is incapable of comprehending such distances, but I know that while I was looking at this amazing spectacle, I felt extremely insignificant.
And insignificant I am. We all are. We're tiny little ants in the massive black farm we call the Universe, and sadly being so small we'll never see most of it. Check out this video which puts a sense of scale on things.
So, since I'll never see most of the amazing wonders this Universe contains, I'll have to make the most of the ones I can see, and enjoy my insignificance as much as I can.
As long as I get to see the Sun like I did tonight, it's not that hard to do.
Am I the only one totally blown away by the level of detail? Truely, we're on the frontier of great things now that technologies are starting to mature.
This industry never, ever gets boring, that's for sure!
As you can probably see, there have been a canny few changes around here, but one which you might not notice is the fact that I've now switched from a custom-made blogging system to the fantastic Posterous.com service.
Posterous, a free blogging service, is a piece of piss to set-up. All you have to do is e-mail some images, text, links to YouTube etc to the "post@posterous.com" account and bam, it's instantly converted to a nicely formatted blog post with embedded video links, galleries etc.
Normally Posterous blogs are hosted using the format "yourhostname.posterous.com", but you can point your DNS to the Posterous servers in order to use your own domain. Useful for some, but not for me because I do other things on this domain such as display my portfolio of work, and other stuff that I maybe haven't implented yet. If I pointed my DNS away I'd lose the ability to do this.
For those reasons, I decided that I was going to use the Posterous API to query my Posterous account, and read in the blog posts as if they were hosted here. Thanks to the PosterAPI project written in C# by Nuane, I can do this no problem at all (although the Posterous API only returns the previous 50 items, which is a bit pap). See the links in the footer for more details on how this works.
Sooo - since it's a bit easier to post and edit, you might find this blog gets updated a bit more frequently! Enjoy!
Edit: Bear with me while I import all of my previous articles - it's a pain in the arse, since I didn't have an XML-RPC enabled blog beforehand so I'm having to do it manually...
Also, it appears that Posterous severely buggers up any attempt at making your pages validate properly, with its YouTube embed code - bah! Something I'll have to live with I think!
Incorporating common ViewData into multiple Controllers in ASP.NET MVC without duplicating code
13 March 2010
In this short tutorial I will show you how to make common ViewData information available to your Views in ASP.NET MVC, without having to duplicate ViewData[] variables in each seperate controller
During my learning phase of ASP.NET MVC, one of my bugbears was that when I wanted to display information from my database on multiple Views, I had to load that data in during the running of each Controller Action, and essentially duplicating code across multiple Controller Actions.
For instance, if I wanted a list of categories for my products on the Master Page, in each controller I might have something like:
ViewData["Categories"] = (from c in db.Categories where c.isEnabled = true orderby c.Title descending select c)
If you imagine that code repeated throughout the perhaps 20 or 30 Controller Actions within the application, you can see the kind of problems you'd have maintaining it - it's a violation of the DRY (Don't Repeat Yourself) principle for starters.
Essentially the solution is very simple and involves creating a new abstract class of Controller called "CommonController" (or XController, or whateverController you like) and placing the code in there instead of your actual controller.
When you create a controller normally, this is the code you use:
public class HomeController : Controller
Create a new controller, and use this instead:
public abstract class CommonController : Controller
Notice the "abstract" keyword in there, that's the only difference.
Now, in your actual Controllers, you need them to inherit this CommonController instead of the normal Controller, so instead of using:
public class HomeController : Controller
You need to use:
public class HomeController : CommonController
Now, in this class instead of the usual ActionResult methods, you'll have a void method set up like so:
public void GlobalController() { ViewData["MyVariable"] = value; }
Now that you've done that, all of the ViewData variables set in CommonController will be available to the Views returned from your Controller.