|
|
Project Manager - Red Gate Software - http://cloudservices.red-gate.com
Development Factotum at Red Gate Software Ltd. Now working on a hosted system for maintaining cloud applications http://cloudservices.red-gate.com
-
Posted Sunday, April 29, 2012 9:35 AM |
It's the same old old problem you want to make a set of columns the same height but life it too short for the CSS only version. It's technically possible to do but nowadays you can't run the web without having javascript turned on. There must be an easier way. After a short amount of googling I came across a few solutions. A couple were GPL'd which ruled them straight out as I want Red Gate to pay for my mortgage. The best simple solution was found at. http://www.cssnewbie.com/equal-height-columns-with-jquery/ function equalHeight(group) { var tallest = 0; group.Each(function() { var thisHeight = $(this).height(); if(thisHeight > tallest) { tallest = thisHeight; } }); group.height(tallest); } Now this worked for my particular situation but wasn't quite nice enough for me. So I thought I'd put it forward to our internal web development e-mail list to see what they made of the issue. This is a list made of developers, designers, marketers who use HTML so can be quite a useful forum for getting good ideas. This threw up the beautiful code from Matt Lee. Or, if you like a bit of code golf (and are using underscore.js, which you should be!): $.fn.equalize = function () { return this.css("height", _.max(this.map(function () { return $(this).height(); }))); }; See the whole thing at: http://jsbin.com/isixib/edit#javascript,html,live Also, I don't think Richard's version worked if the elements were in increasing height order: http://jsbin.com/abovoq/edit#javascript,html,live This seems to do the job really nicely and I thought it was so elegant that it should be shared. enjoy. The way I call this is to on every page perform the following code to equalize groups of divs to be the same height - it will also work for multiple rows and columns of divs: http://jsbin.com/isixib/2/edit#javascript,html,live $("div.height1").equalize(); $("div.height2").equalize(); $("div.height3").equalize();
|
-
Posted Thursday, April 19, 2012 1:27 AM |
 For the past several months I've been working on something new. This is a hosted service for maintaining cloud applications cunningly named Red Gate Cloud Services. It's been live since the beginning of the year and it's free to try it out too. Schedule SQL Azure Backups Simply put you can schedule backups of your SQL Azure database to be performed really easily, I've been driving to keep the UI as clean and modern as I can and with the help of tools like twitter bootstrap and MVC3 I feel I've achieved something quite special. Not skimping on the features, this allows you to set a retention policy, get a transactionally consistent backup and recieve e-mail alerts for success and failures.  Backup your Azure blobs to Amazon S3 The next full scale tool feature that is available is that you can just as easily schedule a backup of your Azure blobs to Amazon S3. It really is this simple to use. In fact a few customers (yes people really do pay $10 a month for this) have said they'd like the option to synchronise whole storage accounts - so I'll make that happen.  Community There is an active community forming around the tool to help guide the development, after all in order for this tool to be truly useful I need input of what you'd like to get from it. This is being developed as a lean startup within the fold of Red Gate so I don't have to worry about paying my mortgage whilst I develop it, which is nice. If you're not familiar with the term lean startup you should really read Eric Ries' book. Did I mention it's free to try it out yet? Also you can check out it's development history by looking at the development announcements blog.
|
-
Posted Friday, January 13, 2012 1:14 AM |
Before you read this you should probably read my original post 5 Reasons why I hate WPF. Also "Qwertie" wrote a nice article detail about his overview of why WPF sucks. 1 - Binding There is something so nice about setting a button to be enabled or not enabled based on a property in the view. All the enabling and disabling is handled for you (more or less). I find that using MVVM helps in many ways to separate UI logic from UI appearance. Something I've always found difficult when writing WinForms in the past. Using this mechanism and writing a simple implementation of INotifyPropertyChanged means your control availability can be declarative rather than procedural. public bool ShowFinished { get { return m_ShowFinished; } set { m_ShowFinished = value; OnPropertyChanged(() => ShowFinished); } } Then in your XAML you can do something moderately simple (albeit with arcane syntax) <BooleanToVisibilityConverter x:Key="boolToVis" /> <StackPanel Orientation="Horizontal" Visibility="{Binding ShowFinished, Mode=OneWay, Converter={StaticResource boolToVis}}"> Simply set the property to whatever you want in code and the visibility of the stack panel in the UI will show or hide depending on the value. However I have found problems where multiple properties changes in a short space of time don't seem to actually update until the UI receives some event to prompt a redraw. 2 - Pretty One thing nobody can deny is that XAML programs can routinely look much prettier with much less work than the same program done via WinForms. This is one of those occasions that are making something hard trivially easy. Say you want to slide in a panel from the side covering the controls and landing with a nice bounce above. No problem. <EventTrigger RoutedEvent="ToggleButton.Checked"> <EventTrigger.Actions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName="RightSlide" Storyboard.TargetProperty="X" From="{Binding Path=ActualWidth, ElementName=HiddenSlideOut, Mode=OneWay}" To="0" Duration="0:0:0.6"> <DoubleAnimation.EasingFunction> <BounceEase EasingMode="EaseOut" /> </DoubleAnimation.EasingFunction> </DoubleAnimation> </Storyboard> </BeginStoryboard> </EventTrigger.Actions> </EventTrigger> The danger here is (apart from again the arcane syntax) that it's almost too easy to do fancy graphics. Developers are not known for their restraint when given shiny things to play with - just look at <marquee> or <blink>. The design of a program is best left to a UX professional - step away from the shiny thing. I may be old fashioned but one of the things I liked about WinForms is some degree of consistency. If something was a button it looked like a button, it rarely looked like a teapot or a spinning cube. Until there is some form on consistency in the new UI I worry that users won't be able to get the most out of a program because they simply won't know what is design and what is interface. 3 - Separation of UI and Engine MVVM is a new thing for me. I was only introduced to design patterns when I started and Red Gate and I still feel I should get more experience writing code using them than I do. I really like the idea behind the MVVM pattern that you can do with XAML. This makes it much easier to test the UI using automated tests and generally inspires you to write cleaner XAML using bindings a lot more extensively. The gotchas are there for all to see though, try showing a modal dialog box for instance. Or perhaps you'd like to close the application. There are solutions to the issues but none of them yet have the simple elegance of MVVM itself. 4 - CSS style re-use Using WinForms colour consistency is neigh on impossible to achieve. However with the use of resources in XAML it's the simplest thing in the world to make sure all your controls share a common colour scheme and even more via the use control templates and decorators. I do think there are many varied ways of doing the same thing and very few "best practices" that were truly elegant. <Brush x:Key="SlideColor">#373737</Brush> <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" /> 5 - XML I've a confession to make, my name is Richard Mitchell and I'm an XML addict. Ever since I made extensive use out of XML and XSLT in a previous job I've fallen in love (or lust) with it. Now there are those of you who like to point out the failings of XML but almost always in those circumstances you shouldn't be using XML in the first place for that problem. The simple rules and fantastic tool support nowadays makes autocompleting even complex XML an absolute breeze and XSD support makes it even better. Conclusion Should you try WPF - I say yes. If nothing else it gives you a great new perspective on how UI programming could work, perhaps you'll stay in the WPF world or use your knowledge in HTML5 (the future is obviously HTML5 no matter how much I personally dislike javascript).
|
-
Posted Friday, September 09, 2011 12:01 AM |
So a month ago now I wrote a blog post in a state of fury at Microsoft for updating SQL Azure without a proper announcement, it's time for an update. After the blog post I was e-mailed by somebody in Microsoft to talk through my issues with the way that the SQL Azure update was handled. It seems that I wasn't the only one who was - to put it mildly - a little upset. From what I've heard my blog post created a little stir on the MVP forums (which I can't see). Kudos however goes to Microsoft for at least posting a blog article explaining in detail the issue we hit so that others are at least a little more prepared. I'm still not convinced that Microsoft it going the right way in updating Azure, if you're not on the right private CTP you can be taken by surprise by a new feature. Also I continue to say there should be a way to test against a release/update of Azure before the actual roll-out occurs. After all I'm sure Microsoft have some internal version of Azure against which they can test things, so why can't we? So what now, well the best things I can suggest is keep a very very close eye on the Microsoft blogs on Azure, be sure to read and understand every article and think about how it could affect you. It's not an ideal situation but I hope that this communication is still a work in progress. You can be sure I'll be talking to as many Microsoft people as I can at SQL Pass Summit to try to get clarification. If you want to come chat to me about SQL Azure or Azure in general please do. I'm not sure if I'll be hovering around the stand much but I'll make sure there are contact details for me at the stand. Otherwise tweet me (and I'll hope the wi-fi works) @richard_j_m
|
-
Posted Monday, August 15, 2011 12:01 AM |
Recently somebody showed me a little trick to get a command prompt in any directory. Simply hold down SHIFT whilst pressing right-click on the folder and the menu option containing "Open command window here" appears as if by magic.  I know this is simple but it's not something I knew about, or had forgotten about. There seems to be a complete list of short-cuts on MSDN. http://support.microsoft.com/kb/126449 Hopefully this can save you as much time as it does for me.
|
-
Posted Monday, August 08, 2011 9:54 PM |
For an update to this article please read my new blog post. How "not" to update SQL Azure - continued Well what an eventful day in "The Cloud" yesterday was, and I don't reckon today is going to be much better. On Friday 5th August we received an error about SQL Azure Backup from a customer. Suddenly the program would no longer connect to SQL Azure, I assumed something had changed in his database so I postponed investigating until Monday. Also on Friday I was experimenting with the new BACPAC CTP and I couldn't get DacImportExportCli.exe or the API to connect to my Azure databases at all. The program was simply failing at first attempt with. ExtractDac: Failure Extracting Database 'widgetdev' Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Reference to database and/or server name in 'master.sys.databases' is not supported in this version of SQL Server. at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql I didn't think much more of it until I came into the office on Monday only to be greeted by many more errors from SQL Azure Backup. It seems the program simply wouldn't work but bizarrely only in Western Europe. After some investigation it seems our SQL Server identification routine was failing to recognise SQL Azure anymore. This was due to Microsoft having quietly updated the Western Europe data centre to use a new version of SQL Azure based on the Denali codebase. This can be seeing by comparing the result of.. select SERVERPROPERTY('EngineEdition') Northern Europe = Microsoft SQL Azure (RTM) - 10.25.9644.0 Jun 16 2011 16:24:06 Copyright (c) Microsoft Corporation Western Europe = Microsoft SQL Azure (RTM) - 11.0.1440.26 Jul 11 2011 17:50:21 Copyright (c) Microsoft Corporation Thanks to Microsoft for the huge amount of notice given for this major (and breaking) change. As changing the Major.Minor version of a product is to my mind no doubt a breaking change. The only mention of this that I had come across was posted just a couple of weeks ago. http://blogs.msdn.com/b/windowsazure/archive/2011/07/13/announcing-sql-azure-july-2011-service-release.aspx However almost no details were given about the speed of rollout. How are tools vendors meant to test products against a platform with no notice? This is completely unacceptable to my mind. We need to be given far more explicit notice about breaking changes like this. I mean even Microsoft products such as DacImportExportCli.exe were unprepared and have been broken. We need a much better notification system and ideally some datacentre that is designated as the first roll-out location so that third party tools can be tested before breaking changes are rolled out to customers live systems. In case you're wondering how to tell if the SQL Server you are connected to is SQL Azure or not you can use the following property which returns 5 if the server is SQL Azure. select SERVERPROPERTY('EngineEdition') I am so not impressed by Microsoft right now I can barely contain my fury.
|
-
Posted Tuesday, July 05, 2011 1:42 AM |
Download the zip here Working in New Biz As I work in Red Gate's new business division much of what we do isn't very visible. So along with Marine Barbaroux I decided to try to create an engaging website to capture what we're doing in an easy to digest way. The idea is to create a website that can be used by everybody in Red Gate to get a picture of what we're doing on a day-to-day basis. It isn't quite there yet but I thought I'd share the work so far so that anybody can play with it. How it works The website is run entirely in javascript and makes use of jquery so should be hostable on whatever web server you have lying around. The main index.htm page reads a data page html and uses the data inside to construct the pages and segments on the fly. The reader can then browse around the various pages reading all the updates.  A sample "empty" page The segments are arranged in 3 columns and 3 rows, each being a known size. Each segment can span half to 3 columns and 1 to 3 rows. The smallest segment being a perfect square of 175px which looks really nice with just a simple image on it. Have a play Please feel free to download the source code for the update pages and have a play with it. I've tried to go through and comment the code so hopefully it should make sense. Things to do There are still quite a few refinements I'd like to make which I will probably do over time if it takes off. These are (in no particular order) - Back from sub-page goes to referring page
- Clean up carousel - probably re-implement.
- Allow swipe to work on iPad etc (did try it but couldn't get it to work)
- Similarly allow mouse drag to shift pages
- Also allow keyboard to work left + right
- Back button via pushing history on stack or clever stuff?
- Neaten sources - probably provide some sort of data source server
Download the zip here
|
-
Posted Thursday, June 23, 2011 1:26 AM |
11:06am - Currently SQL Azure in western europe is down How do I know this? Well on labs.red-gate.com (my Azure website) I have elmah installed which started sending me e-mails about connection failures from 10:40am when trying to get the dynamic content from the database (I was too busy playing with my new Eee Pad transformer to notice immediately). Going to the website confirmed the failure and trying to connect to SQL Azure from SQL Server Management studio and the Management confirmed bad things were going on. 11:15am - Need to get the site back up Luckily due to SQL Azure Backup I have a local database with contents from my SQL Azure database on my local machine. So I now need to get this to be publicly visible, change the connection string in my website and then we're all good (making a lot of assumptions along the way) My options to get the database live go something along the lines of. - Punch a hole in the firewall straight at my computer
- Use an already internet visible SQL Server and put the database there
- Create a new internet visible SQL Server and likewise restore the database
- Create another SQL Azure Server and put the database there
Not everything is going smoothly now. There's a little panic setting in. Punching a hole in the firewall to my computer is a bad idea. We don't have any network visible SQL Servers and changing the firewall rules on anything is going to take too long. Attempting to create another SQL Azure Server is failing - seems to be claiming I don't have any  We also have monitor.red-gate.com running on AWS - does that have a SQL Server handy for me? - No, although we do have a SQL Azure Server already setup and running in another datacentre. Great! A solution. 12:00(ish)pm Use SQL Compare/SQL Data Compare to restore data contents to Azure Using SQL Compare and SQL Data Compare I start synching the schema and data from my local RedGateLabs database to the new database I created in SQL Azure in north america. Whilst doing this I start changing the connection strings to point to the new server and run a local copy to test the database has synch'ed up properly. All seems good. 12:18pm Deploy site to staging - test if site works and switch to live Start the publish process from Visual Studio and 12 minutes later we have a working labs.red-gate.com on stanging using the SQL Azure Server in north america. Perform a swap to get staging live and we're done. It's back up thanks to a lot of luck and a little preparation. 12:25pm Publish this article And...breath...
|
-
Posted Thursday, June 16, 2011 4:00 AM |
I decided to use writing a new tool as a way to learn WPF and MVVM and I thought I'd write down a few of my problems as a way of cathartic release. I decided to read a book before attempting WPF for the first time as I've heard others complain about the steep learning curve. I chose the rather excellent "WPF 4 Unleashed" by Adam Nathan to read through and "Pro WPF in C# 2010" by Matthew MacDonald as a reference whilst I programmed. 1 - Poor editing support for XAML The first thing I think any developer is going to notice about starting with XAML is that the visual studio designer is pretty poor (choosing my words carefully). I liken it to using the experience using Word to edit HTML documents. Really you have no choice but to hand code it if you want anything even roughly resembling something maintainable xaml. Even then the designer doesn't give the best of previews e.g.  Why no scrollbars? 2 - Poor editing support for Graphics Next up comes what is a strength of WPF, the vector graphics. Now don't get me wrong I like vector graphics just the tool support at the moment is terrible. The only bright ray of hope is Inkscape which will allow you to trace a bitmap to convert it into vector and also export xaml files. I found this helped somewhat but still the output wasn't very clean and for simpler graphics like the arrow or the tick I just resorted to drawing on graph paper and typing the ever so user friendly PathGeometry directly. <PathGeometry x:Key="DatabaseShape" Figures="M 150,100 L 150,250 Q 150,280 225,280 S 300,280 300,250 L 300,100 Q 300,80 225,80 S 150,80 150,100 M 150,150 Q 150,170 225,170 S 300,170 300,150 M 150,200 Q 150,230 225,230 S 300,230 300,200" FillRule="Nonzero" /> Yes, I coded this by hand. 3 - Blurry bitmap appearance Now for another drawback when favouring vectors. I'm not a purist and am regularly accused of committing coding horrors however, Dear Microsoft, Please support just showing a bitmap at normal resolution without resorting to blurring it. I will get images and I can't spend the time converting everything to vectors so sometimes I just want to show a bitmap without having to swallow a whole bottle of Kool-Aid. It amazes me that WPF doesn't include this ability as standard. 4 - Changing appearance of standard control Is it a good or a bad thing that in order to change some relatively minor appearance of a standard control you have to copy the whole control template into your project and modify it? I really miss the ability to just change behaviour or appearance slightly with a cleverly constructed sub-class in winforms. To me it just seems a little heavy-handed and I really hope there must be a better way of doing things that I've just not found in my initial investigation. 5 - Hard Trivial - Trivial Hard I can't remember the exact quote but it went something like. "WPF makes the hard trivial and trivial hard" If you want your application to contain lots of custom drawing, drop shadows, blended backgrounds and an almost CSS like way of designing the UI's then WPF and MVVM is fantastic. However if you want to show a modal dialog box - beware!!! Why? I mean the Kool-Aid drinkers out there talk about lovely design patterns and clever ways to get around what to me is a very common requirement. I did manage to bodge my way around it using a Callback a collection of ICommands and a ManualResetEvent. I even think it's not that terrible a way of doing things although I'm probably wrong. Conclusions Is WPF all bad? No, certainly not. I think there's a steep learning curve so reading a book before you start is a must in my opinion. However the clever databinding, MVVM and resource dictionaries make for a very testable way to program a UI. WPF takes away most of the rendering and re-painting that plagues me when I use winforms and is a blessing worth a fair amount of pain. Is it right yet? I'm not sure but I'll certainly play with it some more and see where my journey takes me. I'd love to hear your experiences of WPF if you've tried it, and any solutions to some of my gripes above as I can't believe I'm just not missing something fundamental.
|
-
Posted Tuesday, November 23, 2010 4:10 AM |
So, how can we demo this thing? In the beginning there was a product, and it was a good product for the testers had decreed it so, and nobody argues with a tester. But then comes the inevitable question of how can somebody test it out without risk. Red Gate prides itself on the tools being easy for people to trial before they buy, and no cut down trial for you sir, oh no, for you sir only the best will do - a fully functional trial - suits you sir. The problem The problem comes when you get a tool that has to be configured to use your live servers in order to trial it, the average dba has better things to do than trial products in this way. This makes actually seeing what the tool feels like to use a bit difficult, you could rely on product videos (quality varies and you always have that sneaking suspicion it has been rehearsed for days) or bite the bullet and commit your time to perform the install to see for yourself. Neither solution is particularly attractive. The solution Now SQL Monitor has an architecture that lends itself well to a demo, there is a back end database for storage, a base monitor for actually doing the monitoring and a web UI front end which requests data from the base monitor. So the team set one of their number on working out a solution, the inestimable Philip Wise. Wouldn't it be great if we could show this working on a real site, a really big site, a famous site. As it happens we have such a beast available to us - what about letting people see what it looks likes when we monitor SQL Server Central. There is an element of showing our dirty laundry in public but let's be honest and let people make up their own mind. The implementation Obviously we don't want people to be able to modify the alerts on the live system so some modifications had to be made to make the web UI be read-only and not need a password entry. Then we needed to work out where to host this. We decided on EC2 primarily because it was easy to set-up (the testers had been using it for large scale testing of SQL Monitor), allowed the user to install full programs on the system and provided a load balancer so that we could have a couple of actual SQL Monitor installs. The data from SQL Server Central is actually replicated into local databases on EC2 from the actual live monitoring system in the SQL Server Central DMZ, this is actually working quite well and although we have seen a hiccough once it recovered quickly. Having the load balancer in place has meant it's easy to take one server out of the pool perform updates on it and switch it live with one click being able to switch back to the old system should there be a problem or just go ahead and update the old system and bring it back into the pool.  The result - go on try it yourself if you don't believe me http://www.thefutureofmonitoring.com/ This has meant we have a fantastic demo site available world-wide for a next generation monitoring tool for little initial outlay. Will the site remain on EC2 in the long term, not sure, the cost is not insignificant in comparison to static hosting so we'll see how things develop. All in all a great tool with a great demo "in the cloud". Neat.
|
-
Posted Monday, November 15, 2010 8:42 AM |
This weekend I took one of the Samsung Galaxy Tabs we have lying around the office here home to see how I got on with it as I've been thinking of buying one. Initial impressions The look and feel of the Tab is quite nice. It's a lot smaller than an iPad but that is no bad thing as I imagine they are targeted at different markets. The Tab fits into my inside coat pocket nicely and doesn't feel like it's weighing me down too much. Connecting up the Tab to the network at work was fine, typing in the password was a bit of a faff but after that I was connected to the internet and found that yes I could view websites - wooo. Come home with me my pretty Now I have the Tab at home I can really start to personalise it and put those tools that I really can't live without. Again getting it on the home network was a faff, I use a large key that I store on a usb key, can't access that from a Tab of course, perhaps if I'd transferred it to a micro-sd card I'd have got around that. First few applications to get installed. - Dropbox ( I need my keepass file )
- KeePassDroid ( I need my password for . )
- TweetDeck ( and.. )
- Facebook
Copying and pasting my passwords from KeePassDroid took a couple of attempts, I really like the swipe down access to notifications - and in this case the ability to copy and paste my username and password from one running app to another. Multi-tasking in order to achieve something like this is very neat, having all of Dropbox, KeePassDroid and TweetDeck running at the same time. Although I did find myself trying to switch into the active applications using the "Active Applications" link from the homepage, being forced to navigate to the place you started the other app from is just too clunky. More customisation So now I'm in contact with the world all is good, strangely I had to give over my google account information to download applications which then set-up my sync to google mail, contacts and calendar but I didn't actually mind that as that meant I'm now even more contact ready. A few obligatory games made their way onto the Tab. - Angry Birds ( of course )
- Alchemy
- Unblock Me Free
So now I'm no only in contact with the world but I'm also having fun, this is when I noticed a real hardware snafu by Samsung. The screen looks great in both portrait and landscape however when viewing games or e.g. iPlayer ( I watched last weeks F1 race on it ) in landscape the stereo speakers are both on the right - surely some hardware designer is going D'Oh! Corporate-Ready? Not really So putting on my work hat ( after revenging myself on those curséd pigs for a bit ) I decided to hook up my exchange account. After an incredibly scary warning prior to connecting I found it mostly worked. I could see my work e-mail, my calendar and outlook contacts synched up, but not the Global Address List. This is a real let down as I need that to send e-mail to people at work and as far as I can tell I'm not the only one who feels this is a major drawback - http://code.google.com/p/android/issues/detail?id=4602. The system will auto-complete addresses but they aren't there in the contacts initially. Also upon reading an e-mail I thought I'd check out a bug link to our internal bug tracking system. Right, need to set-up a connection to the VPN - how hard can it be? Turns out - impossible, I'm reasonably tech-savvy and I know about networks, I even installed a couple of tools to try to diagnose the problems But still no joy and no way I could tell what the IP address of the VPN link was - it seemed to connect but I just couldn't make it work. Some of this may have been due to the fact I'd had to fix the Tab to a static IP on my home network in the morning as for whatever reason it refused to pick up a DHCP address ( it had worked fine the night before ). Still was nice having my work Mail accessible via the main Mail app and my google mail via the GMail app and my combined calendar. Shame I couldn't get my work Notes into Memos too. Final thoughts I only really had the Tab for a weekend and I do quite like it, I really like the software, probably more so than the hardware, it's neither small enough to be a phone nor large enough to get the most out of web pages like an iPad. Installing application from Marketplace is terrifying, this application needs access to your location - why? I don't want it to have that but my only option is not using the application rather than denying it rights. A barcode scanner that wants to read my e-mail - fsck off! There are probably ways to work around some of the problems I had with the Tab but I didn't come across them. The android marketplace is so poorly organised that it's of no use - sorted by what?, how many people voted for that 5 star?, how may downloads? Being always connected is a great feeling, maybe it's because I've never had a "smart" phone ( a Tocco Lite does not count Samsung! ). So maybe I won't have a Tab but perhaps a Galaxy S is more up my street. The iPads lack of multi-tasking and lack of customisation would be a killer for me.
|
-
Posted Tuesday, November 02, 2010 4:20 PM |
In the Beginning Red Gate in the past has always produced lovely tools, however sometimes things are created which are never quite good enough to become products. So instead of keeping these things to ourselves we started putting them online for others to make the most out of - http://labs.red-gate.com. Being Red Gate the initial site was put up in a hurry using media wiki and languished there for many moons, unloved and unimpressive Project Thus was born a plan, and it was a cunning plan. In the past Red Gate has taken in interns to work on products, this time we would get a group of interns and give them the goal of developing a new website in just one week. The 7 interns would be joined by two developers, one project manager and as much design, ux and tech comms resource as we could scrounge. The first day was spent sketching the UI and specifying what was going to demoed on the Friday in front of all the steak (mmmm steak) holders. This was interesting as things always start off very ambitious and then reality kicks in that it's almost lunchtime on day 1 and you have to have everything finished for final testing in 3.5 days. The team was split nominally into two, although in effect there were three major efforts going on, the underlying system, the admin interface and the public website itself. ASP.NET MVC was used as the technology mainly because it's cool, new and very quick to get going with a fairly shallow learning curve. The interns really stepped up and created something amazing in such a short space of time really getting a feeling for what's it like to develop in a real company with a real deadline. Shame we couldn't get testing resource to run alongside the interns as I think that was one experience that was sadly missing. Presentation Amazingly the team pulled together and although there were a few disagreements (and one nerf casualty - don't ask) I was amazed that on Friday we could stand up in front of the heads of all the divisions of Red Gate and the CEOs and show something that looked great and pretty much did what we said it was going to do. An awesome effort by everybody involved. After The interns left *sob* back to life in academia, I hope they'll be back though. Now the cold light of day dawns and we have to get this thing ready so I organised a bug hunt getting all those evil testers the interns missed, about 12 pages full of niggles were found with only a few serious bugs so it held up pretty well all things considered. A couple of choice bugs were the use of arabic in tool names, or perhaps the ability to send malicious ratings for tools - 16000 out of 5! Red Gate people can be truly evil sometimes. So after tweaking the system and making modifications to the admin site it's all looking ready to deploy. There it languishes for a while as many people have other things to do that take priority until. Azure Up pops an idea, we fancy playing with Windows Azure so let's deploy the new labs site on the Azure platform. How hard can it be? Actually it turns out harder than I thought but still surprisingly easy once the initial modifications are made, I didn't really take notes so this is from memory. - First deploy a Hello World app to your Azure to get familiar with the tools
- Add a Windows Azure Cloud Service project to the solution
- Add Web Role in Solution to put your web sites in the Azure Cloud Thingy
- Add a WebRole.cs (have a look at your hello world version and copy it)
- Add references to your project
- Microsoft.WindowsAzure.Diagnostics (Copy Local = True)
- Microsoft.WindowsAzure.ServiceRuntime (Copy Local = False, don't know why it just is)
- Microsoft.WindowsAzure.StorageClient (Copy Local = True)
- Modify your web config adding the system.diagnostics/trace/listeners/AzureDiagnostics section - have a look in your hello world app
- Try it out on your local fabric
- Create your SQL Azure database
- Use the alpha versions of SQL Compare/SQL Data Compare for Azure or the Azure migration wizard to get your local db over to the cloud
- Modify your connection string to point at the cloud - does is still run with a remote db on the local development fabric? You probably didn't change the firewall rules did you?
- Make sure you attempt no local file access if you need to store files use Azure Blob Storage, it's not that complicated although you will have to recode stuff
- Try deploying - I find using the deploy in Visual Studio was the best as it logged the history of status changes allowing you see how long it takes - I was finding deployment took between 10 and 20 minutes
- Then realise that you still have to modify the SQL Azure firewall to allow your Azure hosted service to talk to your database ("Allow Microsoft Services access to this server")
- If you're using MVC curse and swear and eventually discover the reason you've got stuck in the dreaded Initializing/Busy/Stopped looped is that Copy Local should be True for System.Web.Mvc
- Then when you deploy for real discover that you really really need MultipleActiveResultSets=True on your connection string or all hell breaks lose and starts rampaging up the high street
- Also as an aside I put Elmah error reporting on the site and it pretty much just worked, did have to modify the sql a little to add a clustered index on the main table as SQL Azure doesn't like bucket tables currently
That's it after a few days of fiddling we're live on http://labs.red-gate.com all in all pretty good and the staging/deployment switch that Azure can do as a party piece is pretty neat for bug fixing too.
|
-
Posted Friday, January 23, 2009 7:08 AM |
So we're coding away - as you do - on our lovely new product (Blatant Plug : Exchange Server Archiver). Things are going well code monkeys are ooking nicely, testers are being evil as only they know how. Now I'm all for thoroughly tested products, things weren't always this way and I remember when I started working with full-time testers and took every bug as a personal insult. Afterwards I came to realise that we're all working to get the best product we possibly can in the time available out the punters. OK, back to the story. A bug was raised, this is a good thing, let's have a look what have the testers done now. Hmmm. What. What! Let me get this straight you started the archive service, it wrote an XML configuration file out to a directory. Things are going well so far. We have a running service and a config file. You then, whilst the service was running, after it successfully saved the config file, removed the write access to the location where it saved the XML file. It carried on running, but no, that wasn't enough for you - you had to go and make a change, prompting the archive service to try to save it's XML config file again, it knows it has write access, it just did it when it started up, yet funnily enough it now fails. Now I don't argue that technically this is a bug, but really, I mean, is this actually ever going to happen in the real world. My argument was no and I wanted to close the bug as "NotABug" but the tester wouldn't budge. I brought the test lead in, they wouldn't budge. I brought in a tester from another team. Still no. At which point I admitted defeat and set the bug to "Future" instead. Now opinions wanted - is this a bug or should I be allowed to close it as "Won't Fix"? If there is no consensus there may have to be a paint ball battle to solve this thorny problem. This post has been brought to you with :) placed wherever you feel like in the text.
|
-
Posted Thursday, May 22, 2008 8:36 AM |
|
What I learned lately - by Richard Mitchell Aged 32 3/4.
1. When you're managing a large project team don't expect to get 4 days coding done a week. 2. Designing a UI that people can use is much harder than it seems. 3. Hire the right people and they'll work wonders. 4. I can't pronounce Hungarian names. 5. Or French ones. 6. And I get English ones wrong (Clive is pronounced Colin in my head) 7. Foam dart guns are fun. 8. Splitting work into components allows multiple developers to just get on with it. 9. Setting up test systems is a hair-pulling screaming experience that is more likely than anything else to make somebody go postal (see 7). 10. My team are wunnerful.
|
-
Posted Thursday, February 21, 2008 9:04 AM |
As I've been doing a bit of work on remoting (see my previous blog post) I'm necessarily looking quite a bit into the serialization of messages. Yesterday I found quite a good article on the CodeProject website with a good set of references about remoting it's well worth a read. While I'm on the subject I thought I'd share my variation of Ingo Rammer's RemotingHelper class. This is a class that enables you to create remote classes based on interfaces via the remoting configuration file. Normally you would have to use a call to Activator.GetObject() and that takes URL so suddenly all of your configuration has to be done outside the easy to edit config file. The only issues I had with the Ingo's RemotingHelper class was that it was very fussy over the type of the remoting object so if the version changed it would stop working. To rectify that issue for my case I only store the FullName in the lookup table. This makes it a lot easier when getting auto-versioned builds from our build system (we have two build computers, one called Bob and the other called Wendy - guess why) so I don't have to change both the client and server every single time.
/// <summary> /// Use Interface-based remote objects with config files /// http://www.thinktecture.com/resourcearchive /// /net-remoting-faq/useinterfaceswithconfigfiles /// </summary> public class RemotingHelper { private static bool m_IsInit; private static Dictionary<string, WellKnownClientTypeEntry> m_WellKnownTypes;
/// <summary> /// Replacement to Activator.GetObject which allows config files /// to work properly /// </summary> /// <param name="type">Type to create</param> /// <returns>Type created</returns> public static Object GetObject(Type type) { if (!m_IsInit) { InitTypeCache(); }
WellKnownClientTypeEntry entr;
if (!m_WellKnownTypes.TryGetValue(type.FullName, out entr)) { throw new RemotingException("Type not found!"); }
return Activator.GetObject(entr.ObjectType, entr.ObjectUrl); }
private static void InitTypeCache() { m_IsInit = true; m_WellKnownTypes = new Dictionary<string, WellKnownClientTypeEntry>(); foreach (WellKnownClientTypeEntry entr in RemotingConfiguration.GetRegisteredWellKnownClientTypes()) {
if (entr.ObjectType == null) { throw new RemotingException("A configured type could not " + "be found. Please check spelling"); } m_WellKnownTypes.Add(entr.ObjectType.FullName, entr); } } }
This only really works because the FullName is likely to be pretty unique and will change a lot less often than the Type information which changes every build due to the version increments. The actual purpose of this blog at the start was to mention a lovely little thing I stumbled across while looking for solutions to the Shared version mismatch remoting calls was to do with serializing classes for persistence. Again if you serialize something to disk it's all good you can load it up again no problems. Unless the version of your strongly named assembly changes version at which point suddenly it stops working. The simple solution that seems to work is....
BinaryFormatter formatter = new BinaryFormatter(); formatter.AssemblyFormat = FormatterAssemblyStyle.Simple;
Now when deserializing the runtime now no longer has to find the perfect match for the assembly - just something that is 'close enough' will do - lovely jubbly.
|
|
|