Archive

Archive for the ‘Personal’ Category

Farewell, Steve. And we thank you.

Thursday, 6 October 2011 5:35 pm Comments off

10.5.11.inifintiy

Categories: Apple, Personal

The Dell XPS 8300

Monday, 23 May 2011 10:21 pm 3 comments

If you follow me on Twitter, you’ll know that my ancient Pentium 4 powered desktop died on Saturday. I had powered it off and unplugged from the socket while I was away in holiday. So it died a peaceful death in its sleep. Smile My it rest in peace forever more….

 

So I had to go off to Dell and spec a replacement PC.

I settled on an XPS 8300 with a nice new Intel i7-2600. Its the latest Sandy Bridge CPU, 4 cores clocked at 3.40Ghz.

Base
Intel® Core™ i7-2600 Processor (3.40GHz, 8MB)

Memory
8192MB Dual Channel DDR3 1333MHz [2x4096] Memory

Video Card
Graphics : 1GB AMD Radeon HD 6670

Hard Drive
1.5TB (7,200rpm) Serial ATA Hard Drive

Microsoft Operating System
English Genuine Windows®7 Professional SP1 (64 BIT)

Sound Cards
Sound : Integrated 7.1 with THX® TruStudio

 

I’m quite looking forward to playing with this once it arrives. All that power…..

Once again I’ll be able to run Visual Studio on the desktop. As well as  Virtual PC and Virtualbox.

Not to mention the fact that Flight Simulator is going to rock on this machine Smile

Expect a review in about 2 weeks  Smile

Categories: Dell, Personal, Tech, Uncategorized

Holiday Reading iList

Friday, 13 May 2011 10:52 pm Comments off

While I don’t usually do this before going on holiday, this time I’m not taking any dead tree books with me at all.

Rather, I’m taking my trusty iPad with IBooks and Kindle for iPad installed. Since we’re flying Ryanair, with their stickiness for baggage weights and sizes, he weight saved has been substantial. Usually I take a couple of paperbacks and a hardcover or two, so my bags a lot lighter this time around.

So, that reading list again, split up between iBooks and Kindle.

iBooks:

1. The Void Trilogy – Peter F Hamilton
2. Pandora’s Star – Peter F Hamilton
3. Judas Unchained – Peter F Hamilton
4. Servants of the People – Andrew Rawnsley
5. Life and Death of the Party – Andrew Rawnsley
6. Red November – W. Craig Reed
7. The Hobbit – J.R.R Tolkien
8. Paypal API’s Up and Running – Micheal Balderas

Kindle

1. The Design of Everyday Things – Don Norman
2. Dreaming in Code – Scott Rosenburg

I think that’ll keep me busy for a week :)

As you can see the above list is heavily biased towards iBooks. The ability to buy a book off iBooks without even thinking about it is the probable reason. Amazon Kindle gives you too much pause for thought.

About the Paypal API book. Yes, I’m sad. I do have the tendency to program while on holiday. If you’ll recall, I did some major re-architecting of my Client Server Chat project while is was in Spain in December. So goodness know what I might do this time around.

I hear the Design of Everyday Things is a seminal work and every designer should read it. Jeff Atwood of the Coding Horror blog (and Stackoverflow, StackExchange etc) highly recommends it.

Dreaming in Code is the most readable book about programmers and programming I’ve ever read. Though I must say reading it elicits the same reaction as watching Dennis Nedry screw Jurassic Park’s computer systems up: A Long Loud Cry of NOOOOOOOOOOOOOOOOOOOO!

Sightly changing the subject away from books, I got the Camera Connection Kit for my iPad. It’s works like a swiss car. If I could get Visual Studio on my IPad, I’d leave the laptop at home.

I’ll see you all in a week (and a bit, one always needs a holiday from holiday when you get back)

Story of My Life

Sunday, 27 March 2011 7:00 pm Comments off

20110327-195941.jpg

Categories: Funny, Personal

Deploying your Database to SQL Azure (and using ASP.Net Membership with it)

Saturday, 5 March 2011 8:55 pm 3 comments

Its been quite quiet around here on the blog. And the reason for that is the fact that I got asked by a Herbalife Distributor to put a little e-commerce site together (its called flying Shakes). So its been a very busy few weeks here, and hopefully as things settle down, we can get back to business as usual. I’ve badly neglected the blog and the screencast series.

I have a few instructive posts to write about this whole experience, as it presented a few unique challenges.

Now. I’m staring at the back end here since deploying the database to SQL Azure was the difficult part of deployment. The reason for this is mainly due to the ASP.Net Membership database.

But we’ll start from the beginning. Now I’m assuming here that your database is complete and ready for deployment.

Step 0: Sign up for Windows Azure (if you haven’t already) and provision a new database. Take note of the servers fully qualified DNS address and remember  your username and password. You’ll need it in a bit.

Step 1 Attach your database to to your local SQL Server. Use SQL Server  Management Studio to do that.

At this point  we have our two databases  and we need to transfer  the schema and data from one to the other. To do that, we’ll use a helpful little Codeplex project called SQL Azure Migration Wizard. Download it and unzip the files.

Run the exe. I chose Analyse and Migrate:

Capture

 

Enter your Local SQL Server details:

Capture2

 

Capture3

 

Hit Next until it asks if you’re ready to generate the SQL Scripts. This is the screen you get after its analyse the database and complied the scripts.

Capture4

Now you get the second login in screen that connects you to your newly created SQL Azure Database.

This is the crucial bit. You have to replace SERVER with your server name in both the server name box and the Username box, replacing username with your username in the process. You need to have @SERVER after your username or the connection will fail.

Capture5

Fill in the rest of your details and hit Connect. Press next and at the next screen you’ll be ready to execute the SQL scripts against your SQL Azure database.

And its that easy.

All you have to do is to go ahead and change your connection string from the local DB to the one hosted on SQL Azure.

There is one last thing to do. When you first deploy your site and try and run it against SQL Azure, it won’t work. the reason being is that you have to set a firewall rule for your SQL Azure Database by IP Address range. So you should receive an error message saying that IP address such and such is not authorised to access the database. So you just need to go ahead and set the appropriate rule in the Management Portal. You’ll need to wait a while before those settings take effect.

And you should be good to go.

 

The ASP.Net Membership Database

In the normal course of events, you can setup Visual Studio to run the SQL Scripts against whatever database you have specified in your connection string when you Publish your project. However, there is a big gotcha. The SQL Scripts that ship with Visual Studio will not run against SQL Azure. This is because SQL Azure is restricted.

Even if you log into your SQL Azure database using SQL Management Studio you’ll see that your options are limited as to what you can do with  the database from within SQL Management Studio. And if you try and run the scripts manually, they still wont run.

However, Microsoft has published a SQL Azure friendly set of scripts for ASP.net.

So we have two options: We can run the migrate tool again, and use the ASP.net Membership database  to transfer over Schema and Data. Or we can run the scripts against the database.

For the sake of variety, I’ll go through the scripts and run them against the database.

  1. Open SQL Management Studio and log into your SQL Azure Database.
  2. Go File-> Open and navigate to the folder the new scripts are in.
  3. Open InstallCommon.sql and run it. You must run this before running any of the others.
  4. For ASP.net Membership run the scripts for Roles, Personalisation, Profile and Membership.

At this point I need to point out that bad things will happen if you try running your website now, even if your connection string has been changed.

ASP.net will try and create a new mdf file for the membership database. You get this error:

An error occurred during the execution of the SQL file ‘InstallCommon.sql’. The SQL error number is 5123 and the SqlException message is: CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file ‘C:\USERS\ROBERTO\DOCUMENTS\VISUAL STUDIO 2010\PROJECTS\FLYINGSHAKESTORE\MVCMUSICSTORE\APP_DATA\ASPNETDB_TMP.MDF’. CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Creating the ASPNETDB_74b63e50f61642dc8316048e24c7e499 database…

Now, the problem with all this is the machine.config file where all of these default settings actually reside. See internally, it has a LocalSQLServer connection string. And by default, the RoleManager will use it because its a default setting. Here’s what it looks like:

<connectionStrings>		
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>	</connectionStrings>
<system.web>		
<processModel autoConfig="true"/>	
<httpHandlers/>		
<membership>			
<providers>				
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>			</providers>		
</membership>
<profile>
<providers>	
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>			</providers>
</profile>
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>				<add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
</system.web>

So, we have to overwrite those settings in our own web.config file like so:

<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider"> 
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" connectionStringName="..." type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral...."/> 
</providers>
</roleManager>
<membership>
<providers> 
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider.... connectionStringName=""..../>        </providers> 
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" connectionStringName="" type="System.Web.Profile.SqlProfileProvider..../>
</providers> 
</profile>

Now, what we are doing here is simply replacing the connectionstringaname attribute in each of these providers with our own connection string name. Before that, however, we put “<clear/>” to dump the previous settings defined in the machine.config file and force it to use our modified settings.

That should  allow the role manager to use the our SQL Azure database instead of trying to attach its own. Things should run perfectly now.

Finally

The Azure Management Portal has a very nice UI for managing and editing your database. You can add and remove tables, columns rows etc. Its really good. And rather welcome. I thought I’d have to script every change and alteration.

Pre Sunday Sunday Times iPad App Review

Friday, 4 February 2011 11:24 pm Comments off

Now before we get much further into this review, you need to understand that I am very much an information junkie. Reading the Sunday times over of cup of tea on Sunday morning is very much a part of life. Of course, being a Sunday morning, it involves actually getting out of bed and driving to the shop to get it. I’m not Tory enough to get it delivered. In fact, I’m not Tory At all. I’m kidding.

The fact is that I very much prefer the Sunday papers, their articles and opinion pieces having been digested for an entire week before writers put pen to paper. Even a Murdoch paper ends up sounding reasonable after a week of through thought.

But I digress Now, on to the app itself.

I must say that at least visually, the app is very well designed. For a paper the size of the Sunday Times, the navigation is actually quite simple. Each issue of the times is split up into a number of sections. Each section has a front page and a table of contents for each story in that section.

The majority of your time is going to be spent in the Section part of the application. Her you have the sections laid out for you. Then, you can filter these sections by the issue they come from. So unless you filter, this area is going to be come rather crowded.

This is also where you download the individual sections from the issue you have bought. This is of prime importance for me. Basically because I’m not going to be reading every single section of the paper. So I get to pick and choose what I want to download and I content have to wait for the whole paper to download before I can start reading.

Now, you also get a page view, where you can scrobble along to find the exact page you’d like to read. This is rather useful, specially given the sheer number of pages you’re going to end up with in the larger sections of the paper.

Finally, the store is quite simply laid out, with the option buy the latest issue front and centre. You can swipe to the right to but older issues if you want, though frankly why would you want to? Anyhow, i can see why it could come in useful for some.

Finally, it should be noted that the multimedia content is only visible in landscape mode, or so it appears anyway. You have the option of reading a story in portrait if you went as well, but I fee that this app really is made to be viewed in landscape. It is after all a Sunday paper, made for reading slowly and thoughtfully on the couch, and not a daily paper made for busy people with less time on their hands.

The fact of the matt is that at £1.79 an issue, this is a steal. And in the process, as if its not a bargain already, I get to stay warm in bed and read it on Sunday morning. It doesn’t get much better an that.

Heres the obligatory screenshot gallery. Note: I used one of the sample issues here and downloaded the Magazine section of the paper.

photo 1photo 2photo 3photo 1photo 2photo 3photo 5photo 4

Categories: Apple, Personal, Software, UI

Amazing: Snow Removal, Central Alberta

Saturday, 15 January 2011 3:39 pm Comments off

Posting this for future reference this winter. The lesson being: be grateful you don’t live in Canada.

 

Thanks Micah for posting this.

Categories: Note to Self, Personal, Videos, Web
Follow

Get every new post delivered to your Inbox.