Posts

Showing posts from 2014

My Favourite Visual Studio Features #myVSUK

Image
It's been really interesting to read some of people's submissions for the Visual Studio Features competition. Quite varied. I thought I'd add my top 5 into the mix, although I've probably missed the deadline :) 1 - Test Explorer Test Explorer, Docked Left in my Main Window I really love having Test Explorer baked in, especially when the XUnit runner is installed. Previously I used to use ReSharper's test manager but now I pretty much only use this. The addition of playlists in VS2013 has also helped. You can run tests automatically after build, search your tests and group in various ways. One of my most used features. 2 -  Navigate To or as I say Ctrl + T Finding those Test Types are now just one Key Combo away :) This is another feature I used to use Resharper extensively for, the ability to quickly find a type by name. Just hit Ctrl+, start typing, instant win :) 3 - Server Explorer with Azure Integration Managing and Viewing Azure Serv

The importance of all-age user testing and the UIButton Touch Area

Image
Of late I have been getting various users to try out an iOS app I have been building using Xamarin.iOS, and I got some interesting feedback which I thought I'd share. The app runs on iPod Touch's / iPhone's so a common platform. One of the areas people commented on was Ease of Use. Interestingly most people commented that the app felt natural and looked easy to use, however about 30% of my responses contained "I struggled to accurately tap the response icons", "I kept missing the buttons and began to get frustrated", "Wearing gloves seemed to make it harder to tap the icons". My first response to this was "really?", The icons by my standards were fairly large and didn't look too small, in fact I deliberately made them slightly larger than Apple's recommended 44x44 [ref: http://stackoverflow.com/questions/1928991/minimum-sensible-button-size-on-iphone ] So I found out more information from the affected users. Turns out

Using LinqPad to replace my "test" console applications

Image
I've used LinqPad since... well forever :) I've had the free version since the early days and then paid for the full thing when I started out on my own a few years ago. At the beginning I was mainly using it for quick testing DB queries and quick idea jottings without thinking about big architectures etc, basically a scratchpad , and it's always worked well for me. Even more so after I started using it to connect to Azure using the Azure Table Storage driver. Another thing I have always done, even when I have lots of unit tests, is to often have a console app in most of my API projects. Be this WebApi or older ones using MVC or WCF. These exist to test the client libraries for the API's that I have written which integration easier. These console apps mainly have a few methods that allow me to easily and quickly try out my service api's. Be this querying, uploading / downloading files etc. These console apps aren't instead of unit tests or integration test

Base64 Images with Xamarin.IOS

Today I was adding the ability to render Base64 encoded image strings to my iOS application which is built using Xamarin.iOS. These images are just small thumbnails and are stored in a small database within my app. Since iOS 7 it's really easy to render these as UIImage's inside an UIImageView, in objective-c you simply do something along the lines of: NSData* data = [[NSData alloc] initWithBase64EncodedString:base64String options:0]; UIImage* image = [UIImage imageWithData:data]; With Xamarin.IOS this would translate to: var image = new NSData(base64image, NSDataBase64DecodingOptions.None); var uiImage = UIImage.LoadFromData(image); However running this gives you the following exception: System.Exception: Could not initialize an instance of the type 'MonoTouch.Foundation.NSData': the native 'initWithBase64EncodedData:options:' method returned nil. Ouch As this exception is within the NSData class which is a class that Xamarin generates to map