|
|
Do you want fries with that?
-
Cast your mind back to 1995 when the chairman of Oracle, Larry Ellison stated “The personal computer is a ridiculous device”, later followed by “It's too hard to use, too powerful, too costly...” Larry Ellison was off course championing what he thought was the PC’s replacement the NC or Network Computer. The idea behind the NC was not a bad one, everything was stored on centrally held servers (on the Internet) where you didn’t have to worry about how it was going to be backed up and you could access your information from any NC device no matter where you were in the world. The problem was his idea was probably 14 years to early and since then the PC has become slim lined and very cheap. Today we store a lot of our information online (or dare I call it the cloud?). As consumers we store our photos on flikr, backup up our files using BT Digital Vault and Microsoft’s SkyDrive, we download and store our music on the Internet, we watch TV and films over the Internet and we log into our PC’s or servers at home using programs such as GoToMyPC. Without realising it PC’s started to fulfil the role of Network Computers with the advent of faster broadband connections. But it is not just PC’s that get to play in this new interactive world there are a multitude of devices that access the Internet daily such as Smart Mobile phones, games consoles, set top boxes and even common house hold appliances. As things are going it appears more and more of the things we do on our computers will be hosted online. The companies providing us with these services will need to scale to meet these demands and to help them meet these demands, is my favourite buzz word of the year “the cloud”. As a consumer I am not too worried about where my data is stored or where my services are provided from as long as it is secure and I can get to my data. One of the biggest problems for services and goods companies is the age old problem of anticipating demand. If I overspend on my infrastructure to supply demand I have costs I will find harder to recoup because demand was not as high as I anticipated. Demand will not always be consistent and so as a company I would like to have the resources on tap I can pay for when I need them instantly, without having to fork out for large infrastructure I will only use intermittently. Eventually if (and this is a big if) cloud computing takes off in a big way we may find that we no longer need the benefits of a powerful PC. Soon the very desktops we use could be stored in a “Cloud Computing Container”. No longer would we need to worry about upgrades to our operating systems, performance or the software we use - all of this would be taken care of for us. All we would need to access our desktops is a simple Internet enabled computer or dare I say Network Computer?
|
-
A few days ago my Dell Latitude D830 suddenly died on me and would not turn itself back on. The IT department removed my hard disk and placed it inside a new D830. All seemed to work perfectly until I rebooted and started to get the above error. I was unable to connect to the network, certain programs wouldn't work and I wasn't even able to look at the event log to see what was wrong!
So taking out my personal laptop I Googled the error and came up with some rather interesting results. It appears that when Vista starts up, if any of the programs hang or fail it can lead to some pretty strange behaviour. The first error I received was the "People near me service has failed. A system call that should never fail has failed". It appears the culprit was the winsock service and the fastest way to solve the problem was to open a command line window as Administrator and use the following command.
Netsh winsock reset
Reboot your machine and like magic, the problem is solved.
You can find more about the problem here http://social.technet.microsoft.com/Forums/en-US/itprovistasecurity/thread/f4ce24aa-ae9d-4927-8b0f-52f3ddc4fbd9
|
-
Last week I happily started a project in Visual Studio 2008 and made some good progress in getting my code ready. What I hadn't realised was Visual Studio started this project in Temporary Project mode. It's a useful feature if like me you need to quickly try out a few ideas on a quick application. The only problem with Temporary Projects is what seems to happen to them when your machine crashes (a rare occurrence but it happens).
As you guessed my machine crashed after I had tried to start it up after putting it in hibernation mode. When I went back to Visual Studio I couldn't find any trace of my projects in its history and searched my hard disk for the project which was mysteriously gone. Doing some BING-ing (yes I have started using Microsoft's new search engine) I found the location for Temporary Projects, which is:
C:\Users\<your username>\AppData\Local\Temporary Projects
Opening this folder I was horrified to discover it was empty, where had my project gone? My only theory on the matter was that temporary projects ask you if you want to save them when you close Visual Studio. Because Visual Studio had effectively been terminated when my machine crashed I am guessing when I started up Visual Studio again when my machine rebooted it must have deleted what was in the Temporary Projects folder. I'd love to know if this is the case, anyway to cut a long story short there is a feature in Vista I have never used until today called "Restore previous versions". To restore a previous version of a folder right click on the folder and select this option. You can then select which version of the folder you wish to recover –great! What a life saver that was!
|
-
This entry is more for my own future reference. If you need to update an MS Ajax update panel client side, use the following syntax in your JavaScript.
__doPostBack('myUpdatePanel', '')
Where 'myUpdatePanel' is the ID of your update panel. You can read more on this from Dave Wards blog.
|
-
Finally I had the opportunity to give Google's new web browser Google Chrome a test drive. Google Chrome installs in under 3 minutes which is pretty impressive! Launching Google Chrome is also pretty fast it's pretty much instant in launching when compared to Firefox 3 which pauses for a bit. Below is a table of memory usage on first load for each browser using Google as their home page.
Browser | Memory Used | IE 7 | 12,276 K | Google Chrome | 19,184 K | Firefox 3 | 44, 376 K |
Google Chromes memory usage appears similar to Internet Explorer. Loading pages is almost instant with Google Chrome while there appears to be the slightest of hiccups with Firefox, Internet Explorer appears to be the slowest (on my machine) when loading web pages. I am not sure if Google Chrome loads pages in a clever way that make them appear almost instant, whatever it does its pretty smooth.
So what features do you get with Google Chrome? Well on first inspection Google Chrome is incredibly light weight it reminds you of the earlier versions of Firefox. Hidden away in the interface is tabbing, book marking and a developer menu. One thing I couldn't find though was the Google Toolbar! Oh well maybe its planned for a future release? Typing URL's into the search bar kicks in an intelligent Google Suggest type interface for the closest match to what you are typing. Right click on any element on the page reveals a context menu with an "Inspect element" option which opens up a new window with an HTML element and resource inspector. The inspector also enables you to view a graph of how long items took to download and their size, however I was unable to get this to work.
Over all I really like Google Chrome I am not entirely sure what it uses under the covers they have mentioned using components from Mozilla Firefox and Apples Webkit. Whatever they have used the experience for me so far has been good.
|
-
I recently had a strange issue with my Outlook inbox being renamed to that of a document I had just emailed from Word. I wasn't able to rename the folder and discovered the only solution was to start up Outlook with the following command line.
"C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE" /resetfoldernames
This set all of my system folders in Outlook back to their default names.
|
-
Sitecore a .NET content management system I have spoken about on several occasions, have released a light weight version of their content management system called Sitecore Xpress. Sitecore Xpress is free for use on your personal site and is targeted towards developers. Signing up for Sitecore Xpress will give you access to Sitecores Developer Network which enables you to download the latest Sitecore modules and interact with other developers on chat forums for advice, tips and the sharing of code. Sitecores approach on releasing a "free" version of their software should help to spread its popularity among developers helping them to experiment with the software and create new functionality for it. Similar to the approach used by open source content management systems such as Joomla.
|
-
Putting all the above into one stored procedure has often been a TSQL dynamic nightmare putting together various bits of SQL strings and executing them. Looking around the web I have found various examples but not for all of what I wanted to do in one procedure. There were examples for paging, filtering and sorting but all as separate examples. Since I finally managed to put these all together I thought I'd blog about it, more for my own reference than anything else. But if it works for you and you have any improvements or suggestions I would love to hear from you. | set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- ============================================= -- Author: Rory Street -- Modified date: 10 Jan 2008 -- Description: Get Products with optional keyword search sorting and paging. -- -- ============================================= ALTER PROCEDURE [dbo].[GetProductsWithPaging] @StartRowIndex int = 0, @MaximumRows int = 10, @SortCol varchar(100), @SortDir varchar(5), @AmountFrom decimal(38,11)=null, @AmountTo decimal(38,11)=null, @KeyWordSearch varchar(200)=null WITH EXECUTE AS CALLER AS BEGIN SET NOCOUNT ON; with TableCTE as ( SELECT TOP 500 ProductSKU,ProductTitle,ProductDescription,Price,Category (ROW_NUMBER() OVER (Order By CASE WHEN @SortCol='ProductTitle' AND @SortDir='DESC' THEN ProductTitle END DESC, CASE WHEN @SortCol='ProductTitle' AND @SortDir='ASC' THEN ProductTitle END ASC, CASE WHEN @SortCol='ProductDescription' AND @SortDir='DESC' THEN ProductDescription END DESC, CASE WHEN @SortCol='ProductDescription' AND @SortDir='ASC' THEN ProductDescription END ASC, CASE WHEN @SortCol='Price' AND @SortDir='DESC' THEN Price END DESC, CASE WHEN @SortCol='Price' AND @SortDir='ASC' THEN Price END ASC, CASE WHEN @SortCol='Category' AND @SortDir='DESC' THEN Category END DESC, CASE WHEN @SortCol='Category' AND @SortDir='ASC' THEN Category END ASC, )) AS Row FROM tblProducts WHERE ((@KeyWordSearch is null) or (ProductDescription like @KeyWordSearch)) AND ((@AmountFrom is null) or (Price >= @AmountFrom )) AND ((@AmountTo is null) or (Price <= @AmountTo )) ) select * from TableCTE WHERE Row BETWEEN @StartRowIndex +1 AND @StartRowIndex + @MaximumRows END | How it works The thing I like about the above example is it does not use dynamically created SQL. I have deliberately used a basic example above of a simple product table that I wish to sort, filter and search from my product page. To make things a bit more interesting my product page is actually a WCF client (don't worry you can still call this procedure directly without WCF). As you can understand it doesn't make sense to download all of the data when using WCF and then trying to page and sort the data. You would create an interface that would accept paging and sorting and this stored procedure works pretty nicely with that type of concept. The stored procedure uses the Row_Number internal function to assign each rows with a unique sequential number based on the column we are sorting by which is handled by the CASE statements which works out which column we wish to search by using the @SortCol parameter. Paging is done by using the @StartRowIndex and @MaximumRows parameters. So for example if you wanted to page through your data with 10 records per page. Page ones settings would be @StartRowIndex=0 and @MaximumRows=11 for page two the settings would be @StartRowIndex=10 and @MaximumRows=11. Now you're probably wondering why I make the maximum amount of rows 11? The reason for this is that when I load the data on the client I will only display 10 of the rows if I get back 11 though, I know there is another page with at least 1 record so I can show my "Next Page" button on the client. Note This example will only work with SQL Server 2005 as it uses a CTE method.
|
-
The below is more for my own reference so I don't forget it: Check the following registry key. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VS\Servicing\8.0 Check if the SP value is 1. Check your Visual Studio version from the Help > About menu is set to Version 8.0.50727.762
|
-
I was having problems connecting to the TFS server from my machine and no one else appeared to have the same issue from their machine. Half way through pulling out my hair, I noticed MS Fiddler was open. After I closed it, like magic I could reconnect back to TFS!
|
-
The following is more a reference for myself so that I don't forget it. I've been battling with a build script that's being deployed using a WIX installer and get the following error. Task "Web.WebSite.CreateVirtualDirectory" error : Message = Exception from HRESULT: 0x80005000 The solution to the problem was pretty simple in my web installer I had put the name of the virtual directory of the project with a trailing backslash \website when all I should have done was quite simply put website.
|
-
 This is a little app I created to make comparing changes between live and staging versions of web sites easier for some of our testers and us poor dev's who get told something doesn't look right on the test server but looks fine on the dev box ("it works on my machine!"). Its pretty simple, all it does is take two URL's from the user and then shows the user two embedded browsers in the application. What ever the user clicks on in the top browser gets browsed in the bottom URL. So for example if I put the URL http://www.conchango.com in the top browser and then http://testcomsite in the bottom URL browser. If I navigated to say http://www.conchango.com/Web/Public/Content/AboutUs/AboutUs.aspx the browser below will navigate to http://testcomsite/Web/Public/Content/AboutUs/AboutUs.aspx , or attempt to load the same page on that site. My latest version of this application now includes a plugin that enables users to browse Mozilla and IE pages side by side using a Mozilla ActiveX plugin I found here. I will shortly be uploading the binary and code for this simple app after I've packaged it up. If anyone has found a more up to date Mozilla ActiveX plugin that is more recent than 1.7 I'd love to hear from you.
|
-
Recently I had to create a custom membership provider for a client which required authentication through two user ids and fragments of the users password. You can understand that using the Logon control that comes out of the box with ASP.NET 2.0 will not accommodate this membership provider, so I went about creating my own form control to submit the data to the membership provider I created. All worked fine however I couldn't for the life of me figure out how to actually set the users Context.User.Identity.Name which will basically allow you to identify the user once logged in. This is something the log in control does automatically for you that you don't usually have to think about, anyway the simple line of code is below. FormsAuthentication.SetAuthCookie(userName, false)
|
-
I've never really used TFS Source control offline before and have been in more projects where I have used the latest version of Visual Source Safe. In comparison TFS source control seems a lot more rich in features, sadly its missing one key feature that Source Safe was very good at and that's the ability to easily work offline and then check what ever changes you had back in and merge them with source safe. I've found an interesting webcast on how to work offline with TFS using TFS Power Toy.
|
-
I've just been reading my colleague Jamie Thomson's blog about Windows Live Write beta 2 I've recently started using it myself and hurried to download the beta 2 version, hopefully now I could start using an English UK dictionary instead of a English US dictionary when writing blog posts (colour shall always have a u in it!). But alas the installer only installed the beta 1 version again and didn't give me the option to use a UK dictionary. Argghhh! I really love Windows Live Writer I'd just like the option to choose what dictionary I use.
|
|
|
|