|
|
Head of .NET Developer Tools - Red Gate Software
-
Posted Tuesday, December 16, 2008 4:16 PM |
In the most recent issue of the economist’s “Technology Quarterly” there is an article about one of the oldest inventions ever – the humble cooking stove. Why was this important, but decidedly "low-tech", device being featured alongside netbooks, botnets and exafloods?
The article described a project for producing stoves for refugees in Darfur. The stoves had been developed with efficiency in mind and were "state of the art" in terms of fuel economy and the effectiveness of their smoke exhausts. When these lab-developed stoves were sent for "on site" testing, however, the results were surprising and disappointing. The first thing they discovered was that one of the local dough based staple foods – assida – required vigorous stirring during cooking. The stoves were not built for stability and so the developers were confronted with the embarrassing and humbling sight of their stoves being sent crashing to the ground as people tried to use them for their intended purpose.
This cautionary tale highlights the importance of "user focused" design, even in comparatively low tech fields. The researchers had put a great deal of effort into their stove design but, by missing a fundamental use case, had ultimately failed to create a product that catered for the intended market. How many times do we see this in software development: a great "technical solution" that falls flat on its face because it doesn't actually do the job it needs to do?
The article also describes a second project, supplying stoves to local communities in India. These stoves had long chimneys to reduce respiratory problems caused by the smoke from cooking. However, a later survey revealed that just 3% of these chimneys were still being used for their intended purpose. The other 97% had either been sold or turned into irrigation channels. So, when writing you next great piece of code, bear in mind that your application is likely to be used in ways you never even imagined!
I’m a huge fan of user focused design and over the past year, Stephen Chambers, one of Red Gate’s usability engineers, has written several articles on this topic for Simple-Talk. He discusses some novel approaches to user-focused design, including a computer-free day spent sketching designs with paper and pencils, as well as some of his frustrations with software that, like the Darfur stoves, suffers from a lack of user focus by its developers.
These articles provide a great chronicle of our experiences as a team, and it is well worth giving a few of the ideas a go. However, from personal experience, I would suggest putting on some body armour before removing all of the computers from the office!
Have a great holiday season!
James
P.S. We are always looking for new .NET authors to write for Simple Talk. If you have something to say then check out our guidelines, and drop us an email! We pay competitive rates for all articles.
|
-
Posted Wednesday, November 19, 2008 10:08 AM |
So Microsoft has jumped on the Cloud bandwagon. I doubt there was a single person in the room who was surprised when Ray Ozzie got up on stage and announced their new Cloud OS, Windows Azure; but I’m sure many of us were interested to see Microsoft’s take on cloud computing.
Personally I’m not convinced that The Cloud is the future. The technology might be coming together, but there are still way too many unanswered questions. For many companies, their data is one of their most important assets; so it’s surprising that the Cloud providers have yet to answer how their offering fits into the regulatory framework, and if the data is really secure. I’m sure this won’t stop some early adopters, but I certainly wouldn’t want any business critical data sat on someone else’s server. At least, not without a very clear understanding from the provider about how that data will be protected.
Another issue with Cloud computing is that it leads to the ultimate vendor lock-in. Unless you are one of the provider’s two or three biggest customers, you’re going to have no say in the features which get dropped or deprecated from each release. The potential cost of rewriting parts of your codebase to comply is mind-bending. Vendor lock-in also brings huge risks to business continuity; what happens if your Cloud provider goes bust, decides they don’t like your application any more, or that you have breached their ToS and they suspend your account? Overnight your profitable, cash flow positive business is worth nothing. Is this really something you want to leave in the hands of another company who don’t really care, on an individual basis, if they have your business or not?
The last potentially worrying question I’ll ask today is this: What sort of app works well on the Cloud? AWS seems to have attracted a few applications but most of these are just using it as an alternative to a hosting company. Are there any parts of the application you are currently working on which could be moved to the cloud successfully, and would it benefit the end user if you were to do so?
Until these questions can be answered with something more than marketing hype I sure as hell won’t be going anywhere near a Cloud.
|
-
Posted Wednesday, October 22, 2008 6:50 PM |
Over the past few years we’ve seen a proliferation of new technologies from Microsoft. We have WPF, WWF, WCS, WCF, Silverlight, ASP.NET MVC, The entity framework, LINQ, Expression Studio, TFS, DLR, DSL… The list already appears endless, and in another two years we can probably add another half dozen technologies based around Windows 7, the much-rumored Cloud OS and the next version of .NET. As a developer, it feels like we are on a perpetual treadmill of new technologies and fads. And whilst I’m sure that some of these techniques and technologies can make our lives easier, how the hell do I tell which ones?
Let’s take WWF as an example – at the moment I understand the underlying principles of what it’s for, but how do I choose whether to leverage it during my development process? I know it’s a workflow processing system. But is it going to scale? Is it going to deal with that really nasty requirement I know is waiting for me six months down the line? I know that it will take me a week or two to roll my own solution which is sufficient, but it might take at least that long this time round to learn about WWF and decide if its going to help me or if I should roll my own. All these questions and so few answers.
How do you choose which technologies to learn? Have you spent time exploring these new possibilities? Are you still using C++ and Active X? I would love to hear what it takes for you to invest in a new technology. For me, I try and track adoption rates of these technologies; once they hit a certain % my job requires I spend some time learning about them to see if there are any opportunities there. But how do you deal with this if you have the pressure of project deadlines?
If you’re looking for simple solutions to make your development process smoother, then there are hundreds of mini-features in .NET Reflector which do just that. While working with Lutz on the transfer of the tool, I spent a lot of time digging around in its technological guts finding them. Given that some of these bits of functionality gold can be a little tricky to find, we have an article on .NET Reflector this month to make your life just that little bit easier - Reflector: Soup to Nuts is something like our very popular SQL Server Crib sheets, so let us know what you think!
If the feature you wish Reflector had is not in the core product, then there are over 30 add-ins available on codeplex.com. These add a huge amount of functionality to Reflector, from code analysis through to small tweaks to the UI. We also asked Richard Morris to sit down with the most prolific add-in author, Jonathan De Halleux, and discuss MbUnit, Reflector and working at Microsoft on Pex. We think he deserved to be Geek of the Week, but take a look at the interview and decide for yourself.
As always we love to hear from you, so if you have any feedback on Reflector or ideas for features you would love to see added or tweaked, please let us know!
Cheers,
James.
|
-
Posted Friday, November 09, 2007 12:27 PM |
Over the years I have installed Linux distro's many many times - the first was sometime around Red Hat 4 and it has never been a pleasant experience, that is until I came to do it this morning.
With trepidation I downloaded a copy of Ubuntu, burnt it to CD (kudos on the installation instructions - even gave me a link to a good ISO burner rather than me having to go and hunt one down) and put the CD into the drive and waited for a few hours of hell to begin.
Within a minute or two I had a Ubuntu desktop up and running through the magic of a LiveCD. This allowed me to play with my future distro but better than this there is a nice install icon on the desktop allowing me to run the Linux installer (another quite pleasant experience).
So what? Linux have eventually sorted out their installation mechanism so it isn't a total pain - what I like about this is the fact that someone has taken an existing technology (the LiveCD) and used it as part of the installer making my overall experience of installing Linux a joy rather than a pain.
(Don't worry I still have plenty of Windows machines and won't be switching my main desktop any time soon - there are just a few things I wanted to look at on Linux).
|
-
Posted Wednesday, October 03, 2007 7:45 PM |
Wow,
Lionel pointed me towards some news today announced on Scott Gutrie's blog.. Microsoft are to release the framework libraries source code with Visual Studio 2008. Seems like my usage of reflector will be going down!
|
-
Posted Wednesday, August 29, 2007 11:20 AM |
There has been plenty of response to my interview a few days ago with Simple-Talk – rather than trying to cram all of my thoughts into the size of a comment box I thought I would spend a little more time and try and respond to people more fully here.
Mike O’Neil pointed out Visual Assist X as a great Visual Studio Add in – personally I have tried it but didn’t miss it that much when my computer was rebuilt so I didn’t reinstall it – that’s not to say that its not a good tool, I hear plenty of good things about it, I think it just depends on your programming style.
Andrej Kuklin made some comments on ANTS Profiler, I disagree with him that it is “third best” – the line level timings are the killer feature for me. There were a few UI bugs introduced in v3 which have either been fixed or will be in the next round of point releases. On the memory profiling front I would agree that we don’t have it quite right yet and will be working to improve the situation over the next few months. We are currently doing quite a lot of R&D on the core engine looking at ways of improving the results collected and reducing overhead, we are also looking at the presentation of statistics from profiling and how to make these more useful for our customers. This is all still at a very early stage but watch out for more on this over the coming months. If you have any thoughts please feel free to email me/call me.
Mr Blunkett and Mr Blair then joined the discussion (I didn’t realise that Simple-Talk had such a reading among ex-government ministers) – they were discussing my analogy with Skoda’s and Porches. This comment was not really about individual development tools; rather, it was about the state of developer tools in general. We are still coding using a supped up text editor and I think there must be a better way. That is not to say I have the answer to what this better way is. Data Flow programming seems like an interesting avenue to me as do the DSL tools that are being worked on by Microsoft. Hopefully over the next few years we, as a community, can make it easier to express our program logic in ways which reduce the frequency of bugs and improve efficiency.
Finally Julian Bucknall, the CTO of Developer Express chimed in on his blog. I wanted to comment on my experience of Developer Express, their grid is one of the best around – it’s my grid of choice unless I am doing a lot of virtual stuff where by I will generally use Syncfusion’s grid (I prefer Syncfusion’s virtual data interface and DevExpress’ grid didn’t support virtual mode properly when I first started using it).
Julian then moves on to talk about support in response to a rant on channel9. Don’t get me wrong, Support is hard for third party vendors, and we all make mistakes. Having said this, I want to give DevExpress a little slap on the wrist for one thing they did which caused us a massive amount of pain with our customers.
The relevant forum thread is here. What had happened is DevExpress had released a .NET 2.0 and a .NET 1.1 build of their components, these components had the exact same strong name. SQL Compare et al were .NET 1.1 apps at the time so when someone only had .NET 2.0 installed then our programs would run in the .NET 2.0 runtime. When the .NET framework loaded the DevExpress libraries it would first search the GAC and if someone had .NET 2.0 DevExpress’ components installed (either through another application or because they were a developer) then our tool would crash as there were differences in behaviour between the .NET 1.1 and .NET 2.0 versions. Please obey strong naming conventions in future!
Even given this my personal experience is that DevExpress support is pretty good but one of the most important resources I have found are component vendors’ sample projects/applications, the best ones are ones which are clear, concise and show you how to achieve some specific goal while using the component.
|
-
Posted Tuesday, May 01, 2007 11:24 AM |
A year and a little bit ago, I sat down with Tom (head of development at Red Gate) to talk about what was next on the cards after SQL Data Compare. Tom asked that I join Helen and the rest of the SQL Backup team to act as technical lead on a new version of SQL Backup; this became version 5.0 a year later (with two interim releases of SQL Backup 4 in-between), and SQL Backup 5 is now ready for consumption.
I believe the final version of SQL Backup 5 raises the bar in the backup market, bringing Red Gate's principles of ingenious tools to a market where usability and intuitiveness are oft neglected and replaced with hundreds of fairly useless and incomprehensible options, with very little guidance to help you, the user.
There are too many new and exciting features to list them all here; however I will give an overview of my favourites:
The timeline must be one of the most fundamental changes to SQL Backup 5; Dan has done an awesome job of implementing Dom and Jamie’s designs – we spent a long time on the underlying data model, making sure it scaled up across your enterprise, whether it be 5 machines or 500 machines. Helen, Jason and Priya (and the other testers we stole from different projects for varying amounts of time) have done a wonderful job testing it – often to my despair…*
In addition to the major new UI, we have been busy working on the underlying engine; Peter has done a great job of improving performance, giving us an even greater edge over our competitors, as well as adding new, often-asked-for features such as multiple thread backups creating a single file. These give the performance of backing up to multiple files the simplicity of handling just a single file.
Another important thing for us was improving the support for cluster installations, and I believe we have carried this aim through. Our installers are now cluster-aware and should install SQL Backup seamlessly to your clusters. Our cluster licensing tool, LicenseActivation.exe, will also license all nodes in your cluster for you.
The final feature that I will mention here (there are many more goodies – have a dig around and see) is the new reporting mechanism in SQL Backup 5. This will allow you to generate reports from all your installations of SQL Backup 5 across your enterprise. The reporting mechanism tells you about any backups that generated warnings, successful backups, and failed backups, all from a single location ready for you to print off.
Whether you already use SQL Backup, have done in the past, or have never tried it before, I would encourage you to give it a go – in the words of Dr Pepper: "Try it, you might like it. What’s the worst that could happen?"
Download SQL Backup 5
*Jason took it upon himself to act as timeline destroyer, throwing more and more data at it. I think the record was 5000 databases on a single instance with a million or so backups in the backup history over the period of a few days – after quite a bit of work with ANTS profiler, and some tweaking of the information queries we were running on SQL Server, SQL Backup can now deal with these situations relatively well.
***
To celebrate the launch of SQL Backup 5.0, we’ve teamed up with the newly released SQL Stumpers Volume 2 e-book to offer one SQL Backup Pro license each to three winners who answer the following backup-themed SQL Stumper correctly.
You are doing a restore to a point-in-time. You have a full database backup from 8PM and one transaction log that covers the time from 8PM to 10PM. Your server is SQL Server 2000. You accidentally put in the point-in-time of restore to 11PM. In Enterprise Manager, what will be the result?
(Contributed by Robert Marda)
Choose one of the answers below:
1. The full backup will be restored and the transaction log will be applied to 10PM.
2. The full backup will be restored, and then the database will go into suspect mode when it tries to apply the transaction log to a point-in-time beyond its scope.
3. SQL Server 2000 won’t let you put in a time that is not in one of the transaction logs.
4. Only the full backup will be restored.
If you think you know the correct answer and would like to be in for a chance to win, please send us details of which you think is the correct answer with your name and email address to editor@simple-talk.com.
The winners will be chosen and notified by email on Tuesday 15 May.
|
-
Posted Thursday, March 29, 2007 9:34 AM |
I find that I end up custom painting a lot of the controls in Red Gate products, this is normally due to some gripe from our usability engineers - I was doing this today and wanted to gray scale some of the pngs when I need to show them disabled - This normally means loading up the excellent Paint.NET and grayscaling each one by hand - then I thought we can surely do this through code with GetPixel and SetPixel, my inital 0.33 of each of the color components didnt work that well and the images looked a little odd - a quick google turns up this: http://www.bobpowell.net/grayscale.htm which tells us to use a mix of 30% red, 59% green and 11% blue.
Giving us the following function: (From http://www.bobpowell.net/grayscale.htm)
public static Bitmap GrayScaleImage(Bitmap source)
{
Bitmap bm = new Bitmap(source.Width,source.Height);
for(int y=0;y<bm.Height;y++)
{
for(int x=0;x<bm.Width;x++)
{
Color c=source.GetPixel(x,y);
int luma = (int)(c.R*0.3 + c.G*0.59+ c.B*0.11);
bm.SetPixel(x,y,Color.FromArgb(luma,luma,luma));
}
}
return bm;
}
However with our alpha transparency png's this really doesnt work that well as you end up with little black borders, a quick tweak fixes this:
public static Bitmap GrayScaleImagePreserveTransparency(Bitmap source)
{
Bitmap bm = new Bitmap(source.Width,source.Height);
for(int y=0;y<bm.Height;y++)
{
for(int x=0;x<bm.Width;x++)
{
Color c=source.GetPixel(x,y);
int luma = (int)(c.R*0.3 + c.G*0.59+ c.B*0.11);
bm.SetPixel(x,y, Color.FromArgb(c.A, luma,luma,luma));
}
}
return bm;
}
|
-
Posted Thursday, March 01, 2007 7:59 PM |
-
Posted Thursday, December 07, 2006 4:14 PM |
After what seems like an age I am pleased to announce the release of the Backup 5.0 beta. Its a highly exciting time for all of us on the SQL Backup team and we are looking forward to seeing what you have to say about the new version of SQL Backup. From the release notes:
After an intensive research and development effort, the beta version for SQL Backup 5.0 is now ready for download. The full version of SQL Backup 5.0 is scheduled for release early in 2007. The beta offers you the chance to have your say now on how the full version will take shape. Your feedback really can influence the final product. Any feedback posted on the forum will be rewarded with Red Gate goodies! SQL Backup 5.0 provides a revolutionary way to manage your SQL Server backups, using a patent-pending timeline based approach.
Its taken a major effort from all of us involved in the development of SQL Backup to get to this stage and its really been the first time we have had the product in a state where we can give you a preview of the future direction of backup development. Our usability engineers have done an excellent job designing the UI as have the testers keeping us developers in check.
Please let us know what you think (and get download instructions) by going to our beta forum: http://www.red-gate.com/messageboard/viewforum.php?f=57
Technorati tags: SQL Server SQL Backup Red Gate
|
-
Posted Thursday, November 23, 2006 9:05 AM |
Its always nice as a developer when you find a new tool to make your life easier - understanding what is actually happening during the execution of your application (rather than what you think is happening) is key to fixing those hard to find bugs.
Visual Studio does a pretty good job of helping with this with its condition break points, break on thrown exceptions etc however its not always quite enough, I normally have a whole series of other tools open when debugging an application - whether its one of the sysinternals tools (dbgview, filemon, regmon, handle, and pstools among others), a copy of Ants Profiler or the SQL Server Profiler.
So its always nice when you find a new tool which makes your life even easier - I came across the managed stack explorer the other day which seems to be a great way to log how your stack changes over time - I'm not sure they have the architecture totally correct as it polls the application every x milliseconds rather than giving your a trace - personally I would rather have a trace of the stack over a period of time with the ability to explore the arguments of each call without having to step through the applicaiton - but it is certainly an interesting and potentially useful tool.
|
-
Posted Friday, November 10, 2006 10:51 AM |
There was an article about some research which Akamai has done on user’s experiences of online stores – mainly with respect to loading times - on Slashdot yesterday and it appeared on BBC News this morning as well.
Their headline conclusion was that if a web page took more than 4 seconds to load then a company would loose sales and users of their web sites would have a negative perception of the company.
Interestingly Red Gate did some research while developing ANTS Load to understand when people began to get frustrated with a webpage and when they would eventually abandon the website. This research lead Red Gate to develop the concept of the “frustration co-efficient” and “abandonment prediction” which were then built into the results presented by ANTS Load.
Do your web pages always load in under 4 seconds – especially under heavy load?
What percentage of your users abandons your website due to poor loading times?
Do your users get frustrated when using your website?
If you are not totally sure then I suggest you grab a trail version of ANTS Load and give it a go.
|
-
Posted Friday, November 10, 2006 10:25 AM |
I dont quite know when this appeared but Microsoft have added the sysinternals stuff to technet - If you havn't used sysinternals tools before then you are missing a real treat - I have lost count of the amount of times they have helped me debug some particularly tricky low level problem.. Anyway the link is http://www.microsoft.com/technet/sysinternals/default.mspx
|
-
Posted Thursday, November 02, 2006 3:03 PM |
When checking for local instances of SQL Server its normally best enumerate the value of the registry key HKLM\Software\Microsoft\Microsoft SQL Server\ and then look at the value on installed instances.
However on a 64 bit machine there are two keys, the 64 bit version and the 32 bit version for the machine so using the standard method will not work:
public static string[] EnumLocalInstances()
{
RegistryKey rk =
Registry.LocalMachine.OpenSubKey(
@"SOFTWARE\Microsoft\Microsoft SQL Server");
return rk.GetValue("InstalledInstances") as String[];
}
This will return just the 64 bit or the 32 bit instances depending if you are running in WOW or not.
To get both the 64 bit and 32 bit instances you need to use P/Invoke – the following code should do the job:
internal class ServerDiscovery
{
[DllImport("advapi32.dll", CharSet = CharSet.Unicode, EntryPoint = "RegOpenKeyEx")]
static extern int RegOpenKeyEx(
UIntPtr hKey,
string subKey,
uint options,
int sam,
out IntPtr phkResult);
[DllImport("advapi32.dll", SetLastError = true)]
static extern int RegQueryValueEx(
IntPtr hKey,
string lpValueName,
int lpReserved,
out uint lpType,
IntPtr lpData,
ref uint lpcbData);
const int KEY_QUERY_VALUE = 0x1;
const int KEY_SET_VALUE = 0x2;
const int KEY_CREATE_SUB_KEY = 0x4;
const int KEY_ENUMERATE_SUB_KEYS = 0x8;
const int KEY_NOTIFY = 0x10;
const int KEY_CREATE_LINK = 0x20;
const int KEY_WOW64_32KEY = 0x200;
const int KEY_WOW64_64KEY = 0x100;
const int KEY_WOW64_RES = 0x300;
static UIntPtr HKEY_LOCAL_MACHINE = (UIntPtr)0x80000002;
public static bool Is64BitMachine
{
get
{
try
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT AddressWidth FROM Win32_Processor");
ManagementObjectCollection collection = searcher.Get();
foreach (ManagementObject obj in collection)
{
return (UInt16)(obj["AddressWidth"]) == (UInt16)64;
}
}
catch(Exception)
{
;
}
return false;
}
}
internal static string[] GetLocalServers()
{
if(Is64BitMachine)
{
String[] instances64Bit = DoGetLocalInstances(KEY_WOW64_64KEY);
String[] instances32Bit = DoGetLocalInstances(KEY_WOW64_32KEY);
string[] returnValue = new string[instances32Bit.Length + instances64Bit.Length];
instances32Bit.CopyTo(returnValue, 0);
instances64Bit.CopyTo(returnValue, instances32Bit.Length);
return returnValue;
}
else
{
return DoGetLocalInstances(0);
}
}
private static string[] DoGetLocalInstances(int key)
{
string[] returnValue = new string[0];
try
{
IntPtr hResult;
int res = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
@"SOFTWARE\Microsoft\Microsoft SQL Server",
0,
KEY_QUERY_VALUE | key,
out hResult);
if (0 == res)
{
uint type;
uint dataLen = 0;
RegQueryValueEx(hResult, "InstalledInstances", 0, out type, IntPtr.Zero, ref dataLen);
byte[] databuff = new byte[dataLen];
byte[] temp = new byte[dataLen];
List<String> values = new List<string>();
GCHandle handle = GCHandle.Alloc(databuff, GCHandleType.Pinned);
try
{
RegQueryValueEx(hResult, "InstalledInstances", 0, out type, handle.AddrOfPinnedObject(), ref dataLen);
}
finally
{
handle.Free();
}
int i = 0;
int j = 0;
while (i < databuff.Length)
{
if (databuff[i] == '\0')
{
j = 0;
string str = Encoding.Default.GetString(temp).Trim('\0');
if (String.IsNullOrEmpty(str) == false)
{
values.Add(str);
}
temp = new byte[dataLen];
}
else
{
temp[j++] = databuff[i];
}
i++;
}
returnValue = new string[values.Count];
values.CopyTo(returnValue);
}
}
catch(Exception)
{
;
}
for (int i = 0; i < returnValue.Length; i++)
{
if (returnValue[i] == "MSSQLSERVER")
{
returnValue[i] = Environment.MachineName;
}
else
{
returnValue[i] = Environment.MachineName + @"\" + returnValue[i];
}
}
return returnValue;
}
}
|
-
Posted Monday, August 07, 2006 11:55 AM |
Rick Brewster has put up a post on his blog about Paint .NET v3 which will now support MDI - my one and only gripe with the current version of this wonderful little tool.
I love this tool it is great to see what can be achived with Windows Forms and .NET in what is normally an application domain with a large memory footprint and slow response times however Paint .NET bucks this trend is always seems highly responsive.
If you havn't yet tried out Paint .NET give it a go. It is a tool I use 2-3 times a week when I just want to do a simple tweak to an image as it is quicker to load then Paint Shop Pro/Photoshop and easier to use but still has all the functionality you need..
|
|
|