Richard Parker's blog

How to make your Xbox 360, Windows Home Server, Windows Media Centre and Windows 7 work together seamlessly

Posted in Media, Networks, Technology by Richard on October 29, 2009

In this post, I’ll discuss my experiences on building a robust, high-speed and high-definition media setup in your home, using Windows 7, Xbox 360 and Windows Home Server. If you’d like to leave a comment when you’ve read this post letting me know what you’d like to see more of (or less of), I’ll make sure I address that in either an edit to this post, or a brand new one. Thanks!

In this article, I cover:

  • Introducing Windows Media Centre
  • How To: Set up Windows Media Centre
  • How To: Connect your Xbox 360 to Windows Media Centre
  • Windows Home Server and your digital media

Feel free to skip to the section that interests you most.

An impulse purchase that changed the way we consume media in our household

At the weekend, something happened that rocked my world. It didn’t happen accidentally, either. I was out Dual Tuner Digital TV USB Stick shopping and I just happened to walk past Maplin (RadioShack, to you US folks) who had a special offer in their window: a KWorld PlusTV DVB-T Dual Freeview HD Tuner for the princely sum of just £24.99. That’s a small USB stick with an antenna connection on it that contains not one, but TWO HD Freeview TV tuners, giving the ability to watch one programme while recording another: for £24.99.

In the UK, Freeview gives access to about 100 digital channels, and, although they don’t broadcast in HD yet, in early 2010 the HD rollout begins.

Right now, the only way to get free HD TV over the air is to get Freesat HD or Sky+ HD, both of which require a satellite dish to be installed and cost a fair amount in set up and subscription fees.

At the time, like many geeks, I didn’t know why I wanted this particular gadget, but I the little voice inside of me compelled me to buy it. I figured, “hey, even if I don’t know what to do with it, perhaps Windows 7 will”. And that is where the fun began.

 

Introducing Windows Media Centre

With the recent release of Windows 7, millions of people globally have been busy remarking how much simpler the ‘simple’ things become when you install Windows 7.

Unlike Apple (for whom I shall now depart momentarily to direct a slight dig) who only have to worry about a limited number of devices on a limited platform of hardware, Microsoft have to build software that is actually compatible with hundreds of thousands of different devices and at least twice as many combinations. That is by no means an easy thing to accomplish, but Windows 7 seems to do it with dare I say it a certain degree of sentience: plug and play has actually come to life. Everything… every single USB gadget I own was detected first time, without me first needing to supply a driver CD. If Windows didn’t have the drivers, it ‘magicked’ them off the internet for me. Marvellous.

This includes the £24.99 TV Tuner from some anonymous company I’ve never heard of before. I plugged it in, and up popped the “Driver Installation” window and it downloaded the relevant drivers for me (I’m so glad it did as well – I don’t like installing drivers and software from anonymous small name companies).

A few minutes later, everything was successfully installed with zero effort on my part. In fact, the most strenuous part of this entire exercise was trying to open the box the device came in – which was apparently designed to survive a small tactical strike.

And this is where Windows Media Centre comes onto the scene – an incredible suite of technologies that’s designed with simplicity in mind. Shipped with Windows 7 Home Premium and Ultimate editions, Media Centre has – at its core – the ability to act as a centralised hub for all your digital media: music, videos, recorded and live TV. For anyone who’s seen TiVO or Sky+, Windows Media Centre does exactly what those two services do, but better, faster and subscription free.

 

Setting-up Media Centre

Launching “Windows Media Centre” from your Start Menu brings up a little animated Window:

image

Having detected that I had now installed a USB TV Tuner, Windows Media Centre asked me if I wanted to configure it. Allow it to complete the setup process, which – including the time it takes Media Centre to scan the TV frequencies in your country for available channels – took me about 10 minutes.

When the process is completed, Windows Media Centre is able to give you a TV guide showing weeks’ worth of programming schedules. The guide alone is worth ditching Sky+ for:

  • Beats Sky’s “Series Link” function by adding numerous extra functions giving greater control over what is recorded and when
  • Search for TV programmes by keyword in the title, or by cast members
  • Create wish lists: specify your favourite actors and actresses, and the guide records any programmes it finds with those stars as cast members
  • Manage potential recording conflicts before they arise and set priorities for your favourite shows

The list does actually go on. Have a look at some of the guide screenshots below:

image image image image

The trouble is right now – this is TV on my PC. My PC is in my office – not my front room. We need to break out of here and I’ll be damned if I’m going to run a VGA cable from here to my 42” LCD TV in the front room. Nay – I want an easier way!

Xbox 360

Those of us with an Xbox 360 (or three) laying about the house know that we’re supposed to be living in some futuristic media-utopia where our TV’s can access all our music, videos and photos. Even TV (alright, that’s slightly pointless but you get the picture). But, even with Vista, this wasn’t particularly easy to set up. So I never bothered with it. It just didn’t quite work as expected.

Turn on your Xbox 360 while your Windows 7 PC is on, and you’ll receive a polite little notification that “Windows has discovered a Media Centre Extender”. Discovery – what an appropriate word. It popped up, and I thought to myself …. “Please, continue”. And so Windows did. After being informed a few seconds later that everything was installed correctly, I wanted my Xbox 360 to be able to access the juicy goodness of Windows Media Centre.

Follow these steps:

  • Go to “System”
  • Go to “Computers”
  • Go to “Windows Media Centre”
  • If you’ve already set up (or tried to set up) a Windows Media Centre connection before, you’ll first want to choose “Disconnect”. If you’ve not tried that before, that option won’t be available to you.
  • Now, choose “Connect”.
  • Your Xbox 360 will search your network for available Windows Media Centre computers. After a few moments, your Windows 7 Media Centre should be discovered, and your Xbox 360 will display a two-part eight digit code on your screen.
  • Note that code down, and fire up the Windows Media Centre application on your PC.
  • Go to “Tasks”, then “Add Extender” to bring up this screen:

    image

  • Type in the eight digit code you were given by your Xbox 360, and press “Next”.
  • You’ll then see a screen similar to this:

    image

  • This process might take a little while to complete while your Media Libraries are constructed.
  • Once complete, you’ll see a screen like this:

    image

  • By this time, your Xbox 360’s display will have changed and will be displaying a very similar (if not completely identical) display to the Windows Media Centre application on your PC.

And that’s it, you’re done – your Xbox 360 is now connected to your Windows 7 Media Centre.

What about Windows Home Server?

Ah, the “server in the home”. Got one? I have. If you haven’t, you should.

It takes care of backing up all your PCs, laptops and personal devices and my HP MediaSmart Home Server even automatically backs up my iTunes Libraries and streams them over the network. In fact, they’re so good I’d recommend them even for small businesses. Just plug them in, install the software on your PCs and laptops and you’re safe from day one (you can even do a bare-metal rebuild if you are running Windows 7 – that rocks).

Even cooler is that with the PowerPack 3 Beta recently released by Microsoft you can now install a connector for Windows Media Centre that allows it to take full advantage of the awesome storage capacity of your Windows Home Server.

The Windows Home Server Media Centre Connector (desperately in need of a shorter name, though it is hard to imagine one more descriptive) adds a little tab to your Windows Media Centre menu that, in a nutshell, allows Media Centre to archive your recorded television programs off to your Home Server automatically. It also adds some other nifty functionality to allow you to view most of the information contained on your Home Server Console on your TV, too.

In summary

It starts with the purchase of a TV tuner ‘dongle’. With Windows 7, in literally just a few minutes you can pretty much overhaul the way you access your digital content in the home. Chuck an Xbox 360 into the mix, and you’ve got the capability to stream HD content to your TV, listen to your music and browse all your photos right from the comfort of your armchair. I’d also recommend getting your hands on a great media remote (this one from Logitech is awesome) because you’ll quickly get bored using the Xbox 360 controller. The Logitech remote can also control many other devices so you can ditch the collection of remotes you’ve probably already got.

With Windows Home Server chugging away too, you’ll never lose any of your digital recordings again and since storage is so cheap these days, you’ll have a very easy mechanism for expanding your storage on demand.

Microsoft unveil “Websitespark” programme

Posted in News by Richard on September 27, 2009

Microsoft recently announced the launch of the latest addition to their Partner Network: Websitespark. Following on from the success of the Bizspark programme for startup companies, Websitespark is aimed at supporting professional web development and design companies to succeed by offering proactive assistance in the form of business opportunities and it’s class-leading Windows and SQL Server products. So, whether you’re the “one man band” or a team of up to ten employees, you should check this out.

BizSpark has already helped hundreds (thousands, now, perhaps?) of startups to succeed, and Websitespark looks set to do the same for smaller teams of web professionals. With no up-front costs and no long-term commitments (just a $100 exit fee at the end of the programme period) , what more could you ask for?

Full information is online and available at http://www.microsoft.com/web/websitespark/

How to install Windows 7 from a USB pen drive

Posted in Uncategorized by Richard on August 7, 2009

I’ll show you how to create a bootable USB pen drive preloaded with Windows 7 installation media

If, like me, you’ve been eagerly awaiting the official release of Windows 7, you’ve no doubt wanted to install it on just about everything you have. We have a couple of Acer Aspire netbooks: fantastic, highly portable machines but, not fantastically powerful. Windows 7 boasts better performance on lower-spec hardware than it’s predecessor, so putting Windows 7 on the netbooks seems a logical choice.

It took about 12 minutes to install Windows 7 Ultimate from my USB pen drive to my Acer Aspire netbook

A while ago I blogged about how to install Windows Vista on your Aspire A150, so I thought now it would be a good time to update those instructions for Windows 7 users. Thankfully, the process is much more straightforward for Windows 7.

In case you’re wondering why you’d want to install from a USB pen drive, and not the DVD, consider these points:

  1. Your laptop/netbook might not have an optical drive
  2. Keeping the media on USB key is far handier than carrying the DVD around
  3. Installations are typically much faster

Before you begin, you’re going to need:

  • A spare USB key/pen drive
    • I used a ByteStor 8GB pen drive from Amazon. Just about any type of pen drive will work – but you will need one with a minimum of about 4GB.
  • Your Windows 7 installation DVD (or the downloaded ISO from MSDN).
    • If you downloaded as an ISO, you’re going to need software to ‘mount’ the ISO first. See Virtual CloneDrive (free).

Step-by-step instructions

Ok, to get started – you need to make your pen drive ‘bootable’. That is, your computer needs to be able to recognise it as something it can boot from, and that’s not something yours will do without a little bit of prep work.

To get started, open a command prompt window ‘as administrator’, i.e. right click the command prompt icon and choose “Run as administrator”. Then perform the following steps:

  • Plug in your USB pen drive. Make sure the contents are backed up to your hard disk somewhere, first. This process will erase the data on the flash drive.
  • Type the following. After each line, press the RETURN or ENTER key to execute the command you have just entered:
    DISKPART
    LIST DISK
    
  • Read the list on the screen. Figure out which ‘Disk ###’ is your pen drive. Look at the size of each drive listed – you should be able to figure it out by that. Note the disk number.
  • Now, type the following. After each line, press the RETURN or ENTER key to execute the command you have just entered. Please note: it is extremely vital that you note the correct disk number from the previous step and enter it correctly below. If you have chosen the wrong drive, the drive you mistakenly chose will be rendered unusable.
    SELECT DISK (type your pen drive number here, without brackets)
    CLEAN
    CREATE PARTITION PRIMARY
    SELECT PARTITION 1
    ACTIVE
    FORMAT FS=NTFS 
    
  • Now, your pen drive begins to format. This took about 10 minutes on my 8gb drive.
  • When formatting has completed, type:
    ASSIGN
    EXIT
    

Ok, that’s the hard work out of the way. At this point, you need your Win7 installation media. If it is on an ISO, mount it and make a note of the drive letter of your virtual drive. If it is a physical DVD, insert it into your computer and again, note the drive letter. Now, go back to the command prompt window and do the following:

  • Type:
    CD [your drive letter]:\          --- For example: CD D:\
    CD BOOT
    BOOTSECT.EXE /NT60 U:             --- (replace 'U' with your USB pen drive letter)
    

That’s it – you’re done in the command prompt. All you have to do now is copy the entire contents of your Windows 7 installation media across to the USB drive. Quickest way to do this is to open My Computer, open your DVD/Virtual DVD, press CTRL+A and then CTRL+C. Now go back to My Computer, open your USB pen drive, and press CTRL+V. When the copying has finished, you’re left with a bootable USB pen drive that contains Windows 7.

How to speed up your ASP.NET web application

Posted in ASP.NET, Microsoft.NET, Software Development by Richard on August 5, 2009

If your web site is slow, it’s annoying to your customers. It’s annoying because nobody likes to wait: we wait all day in the physical world: in queues at the shops, at the restaurant and even on the telephone. We’re always looking for ‘faster’, because in our web consumer minds, “faster equals better”. In my personal experience as a software developer, most users share at least one principle:

Better responsiveness equals a better product
- A. Customer

If your application is simple and responsive, people will use it. If it is clunky and slow to load, people are forced to wait. Think of your application (it doesn’t matter if it’s a web or a desktop application) as a racing car. As the manufacturer of that car, you’ll want customers to come and test drive it. You’ll hope that they’ll fall in love with it after driving it, and want to buy it. If that test drive is a good experience, they’ll hopefully part with some of their hard earned cash to pay for it – and bingo, you’ve done what you needed to do: make the sale. 

The same principle applies to software: if you deliver a fast, responsive application with a quick user interface, your users are more likely to think you’ve built a better product – (whether that’s right or technically wrong), because to Mr and Mrs User, a slow application is a bad one.

You can optimise your web site in just a few steps

As an ASP.NET developer, here’s a look (or a reminder) at some of the things you can look at doing before deciding it’s time to dig under the hood and start to make more fundamental changes in your application:

Disable debugging in your web.config

When you release an application in debug mode, ASP.NET forces certain files to be sent to the client with each request, instead of allowing the browser to cache them. Most people forget to switch debug mode off when they release. This creates an overhead for your server, and a longer wait for the client. Debug mode also causes other changes in your web application: think of it as a bloaty way to release because it has to include data and various hooks to allow you to debug the application that aren’t necessary in order to run it:

<compilation debug="false"/>

You’ll find the above line in your web.config file.

Enable IIS Request Compression

Request compression is a feature of Internet Information Services 6 and above that causes content to be compressed before transmission to the client, and then decompressed by the browser. Most modern browsers support this, and enabling it requires no modification to your web site at all. Do bear in mind that request compression will force your web server to work harder because it has to first compress data before sending it. This creates a small spike in CPU usage, for low to medium traffic web sites that really need a performance boost the extra CPU usage will more than likely be absorbed just fine.

In Internet Information Services 6:

  1. Launch IIS Manager
  2. Right-click the “Web Sites” node
  3. Click “Properties”
  4. Select the “Service” tab
  5. Tick “Compress application files” and “Compress static files”. Be sure to specify a temporary directory with sufficient free resources and consider adding a maximum limit to the temporary directory size.
  6. Click “Apply”
  7. Click “OK”

Request compression isn’t for everybody – be sure to weigh the pro’s and con’s for your particular environment.

Use page output caching

By default, IIS thinks that your ASP.NET page is dynamic. In many applications, however, not all the pages actually are. Even if they do rely on a database for content, oftentimes it’s not necessary to hit the database on each request to the page. Output caching can be enabled on a particular page by adding one line of code to the top of your ASPX file. It is a directive that informs .NET to keep a copy of the rendered page, and serve the copy (rather than the original) from disk each time it is called. This would include, for example, any database generated content from controls on the page itself, or any embedded user controls.

<%@ OutputCache Duration="10" VaryByParam="none"%>

Page output caching can be an extremely effective way to improve your web site’s performance and responsiveness. It’s a lot more flexible than I’ve explained here, and you should be aware that there are all manner of ways in which you can control the cached version of the page (for instance, you can modify the directive to have different cached versions of the page based on a URL parameter). For more information, see the MSDN documentation.

Next steps

When you’ve done these things, if your application could still use a boost, it’s time to start profiling. You’ve tried the ‘quick fixes’ – the 10 minute jobs that are more-than-likely going to make things better, but there’s always a chance the problem isn’t with your application per sé. The next step is to figure out what’s causing the problem. First identify the scope: is it limited to one user, or a bunch of users in a particular geographic region, or is it everybody? If it’s only a small bunch of people, it might be that your ISP is having routing issues and you need do nothing at all. On the other hand, you might find that everyone is affected by the issue.

In that case what you need to do is to investigate where your bottleneck is occurring. Is it your database? Is it your disks? Or is it, yes, hold on a second – more than likely it’s the things you’ve probably overlooked: your images and other media files.

Optimising your images

Many people, particularly in smaller teams, overlook image optimisation. Most image editing programs will optimise for you – and this can often reduce a file’s size anywhere between 5% and 20%, and sometimes more. With today’s media rich sites, look at what you can do to ease the burden.

Using a content delivery network

As your web site grows ever more popular, sometimes the best way to get a performance boost is to let somebody else handle delivery of your ‘resource files’ – these are your static images, scripts, movies, SWF files, etc. One option is to purchase more bandwidth from your supplier. Another is to enlist the support of a Content Delivery Network – kind of like a private, global internet with public endpoints close to your customers.

The benefit of a CDN is that you are effectively outsourcing the delivery of your static files onto another – usually much faster – network. Often this will result in an ability for your server to handle more connections than before, since it no longer has to worry about serving up the big files over and over again.

Going direct to one of the big networks can cost anywhere from about $1,000 per month upwards, but there are companies who provide full CDN integration for a fraction of the price.

 Good luck with your web site optimisation and please feel free to leave comments and tips for others.

Tagged with: , , ,