Just for my reference: Windows Azure Platform FAQs contains a nice overview and description of many of the aspects of Microsoft’s cloud offering, including SQL Azure, and a list of feature differences between SQL Server versions and SQL Azure.
admin
Improving SQL Server Management Studio’s Tabs
I saw this post by Brent Ozar, Fixing SQL Server Management Studio’s Tab Text, and immediately made the changes whilst face palming myself and going “D’oh!” at the same time.
What are the improvements? First, the status bar is moved to the top of the tabbed window space, where your eyes are normally focused. Second it removes the server name, database name and login (which are all in the status bar anyway) from each tab title so that you can actually navigate around the tabs!
It’s been a constant source of frustration over many years of using SSMS, and I feel chastised for not investigating the options before. Nice one Brent!
MVC Mini Profiler
If you are working with ASP.NET MVC 3 you might be interested in this project: the mvc-mini-profiler. It includes standard profiler timing output but also comprehensive database profiling capabilities.
MVC Mini Profiler was designed by the team at Stack Overflow, and is actively being used there to monitor the Stack Exchange family of sites.
Visual Studio 2010 Web Standards Update
Visual Studio 2010 Web Standards Update is a free extension available for anyone who is using Visual Studio 2010 SP1 and it provides HTML5 & CSS3 support based on current W3C specifications.
It supports:
- HTML5 – Video, Audio, Input Type, Drag & Drop, WAI-ARIA, Microdata, Schema.org
- Browser API – GeoLocation & Local Storage
- CSS3 – 2D Transforms, 3D Transforms, Animations, Background & Borders, Basic Box Model, Basic UI, Behaviour, Colour, Flexible Box Layout, Fonts, Paged Media, Hyperlink Presentation, Line, Lists, Marquee, Media Queries, Multi Column, Namespaces, Presentation Levels, Ruby, Selectors, Speech, Syntax, Template Layout, Text & Transitions. It also supports vendor specific prefixes like –ms, -webkit & -moz.
Note: This extension is created by a bunch of folks within Microsoft in their spare time. This is NOT an official Microsoft product
Scott Hanselman blogged about it here.
You can download here: Web Standards Update for Microsoft Visual Studio 2010 SP1
Who’s Your Product?
Love this quote, which sums up the model of companies like facebook, google etc.:
“If you are not paying for it, you’re not the customer; you’re the product being sold.”
Originally(?) appeared here and quoted many times since.
Perth .NET User Group, Thurs June 2nd: Good Things Come to Those Who ‘await’ with Joe Albahari
Join us at the Perth .NET user group, June 2nd 5:30pm, where Joe Albahari will showcase the magic of C# 5’s await and async keywords. You’ll see how easy asynchronous programming has become with Microsoft’s latest CTP, and how much you can achieve without being a guru in multithreading or monadic calculus.
We’ll start with very simple examples to introduce asynchronous programming in general: what exactly is it, how does it differ from multithreading, and why do we need it? Then we’ll examine the historical support for asynchronous programming in the .NET Framework and what people are doing right now. You’ll see why BackgroundWorker and the event-based pattern are clumsy and often inadequate – and how the APM strikes fear, pain (and ultimately asynchrophobia) into the hearts of the even most hard-core programmers. We’ll then demonstrate how the async CTP eliminates the problem almost entirely – allowing you to program as you always have.
- TOPIC: Introduction to C# 5 async with Joe Albahari
- DATE: Thursday, June 2nd, 5:30pm – 7:00pm
- VENUE: Enex 100 Seminar Room, Level 3, 100 St Georges Terrace, Perth
- COST: Free. All welcome
There will be plenty of practical examples – from making a rich client app responsive to writing high-concurrency apps and games. We’ll also cover limitations and discuss when you would use this versus Reactive Extensions. The presentation will assume minimum background knowledge and yet will go fairly deep. We’ll also look at what the compiler actually does in translating asynchronous calls, and potential extensibility points. This is a great chance to get to grips with an otherwise difficult-to-research topic.
Joe Albahari is a C# MVP and author of C# 4.0 in a Nutshell and LINQPad. He has presented at TechEd and JAOO, and is a regular speaker in the Perth .NET UG. He has an extensive free online resource on .NET multithreading and parallel programming at www.albahari.com/threading/
Mount .iso files in Windows
I remember Greg Low once talking about the “Resolved: by Design” or “Resolved: as Won’t Fix” replies on Connect when the issue being raised or asked for was clearly a good idea (obviously there are time constraints and sometimes things just aren’t possible); his point was that it doesn’t take too many such responses for even someone evangelical in their conscientious raising of issues to be less than enthusiastic about continuing to do so.
Why do I mention that? Well, ever wanted to mount an .iso file natively in windows? Not such a surprising thing to want to do, right? Especially as Microsoft actually provide many downloads in this format (such as the Windows 7 OS, which is what I was installing). Check out this Connect article “Mount .iso files”. It had 919 up-votes at last count!… Something for Windows 8?
I resorted to using one of the many third party installs which do the job: Virtual CloneDrive. But it really does feel like this should be part of Windows. Getting community/user feedback on your products is a great way to improve them, but only if you’re listening.
“Thank you for your comment/suggestion.
We will continue to monitor your submission and when it reaches the vote threshold from the community we will forward it to the appropriate feature team. We will also respond here to let you know it has been escalated.”
I wonder what that vote threshold is!
Free ASP.NET MVC2 Book
Apparently a very good book on ASP.NET MVC 2 is “MVC 2 In Action” from Manning, and while the authors are putting the finishing touches to the MVC 3 version of the book, the entire MVC 2 version is available completely free in Word document form at: https://github.com/jeffreypalermo/mvc2inaction.
Every version of MVC relies on the previous version (except with a few breaking changes), so there is still value in reading this free resource.
Jeffrey Palermo’s original post is here.
ASP.NET Web Forms and ASP.NET MVC Video Training
Microsoft has made the “Pluralsight On-Demand!” 10 part ASP.NET MVC 3 video training course available free of charge. (“Essential Videos” left-hand pane).
Similarly, there is a 9 part ASP.NET Web Forms 4 video training course also available for free.
TSQL: Finding Maximum, Minimum and Average Data Row Lengths
This is probably a classic example of if you find you are doing something complicated, there’s almost certainly a better way. It’s also an example of if you think something is genuinely useful and can’t understand why it’s not been implemented already, it probably has but you just haven’t found it yet!
I wanted to get a table’s approximate minimum, maximum and average row size, so after a few attempts I came up with this TSQL snippet:
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/white-space: pre;/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
declare @schemaname varchar(200) = 'Person'
declare @tablename varchar(200) = 'Person'
declare @columnList nvarchar(max)
declare @sql nvarchar(max)
set @columnList =
stuff(
( SELECT
' + ISNULL(DATALENGTH(' + c.name + '),0)'
FROM
sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
where SCHEMA_NAME(schema_id) = @schemaname and t.name = @tablename
for xml path('')
)
, 1, 3, '')
SET @sql = 'SELECT ''' + @schemaname + '.' + @tablename + ''' as TableName,' +
' MIN(' + @columnList + ') AS MinRowLength, ' +
' MAX(' + @columnList + ') AS MaxRowLength, ' +
' AVG(' + @columnList + ') AS AverageRowLength ' +
' FROM [' + @schemaname + '].[' + @tablename + ']'
EXEC sp_executesql @sql
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/white-space: pre;/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
[Note: It’s not 100% accurate due to some row overheads, but it is close enough for many purposes.]
At which point, the thought “Surely there exists a built-in method to do this?” crossed my mind, and of course there is!
If you have sufficient permissions you can quickly produce a min, max and average row size for each table in a database (along with fragmentation information) using
DBCC SHOWCONTIG WITH TABLERESULTS