Tips and Tricks tags
Windows 10 Animations
You’ve upgraded to windows 10 and are really enjoying it. But are you making the most of the visualisations it now provides you? Since Aero came onto the scene in Vista, Windows has leveraged your graphics card to add heaps of whiz-bang effects to windows. Transparent windows, animating transitions and other such …
ExternalAnnotations, or how to not depend on jetbrains.annotations.dll
There is some great static analysis stuff that ReSharper does for you. Specifically around nullability, purity and usage of your code. From their Code Annotations page in Visual Studio: ReSharper Annotations help reduce false positive warnings, explicitly declare purity and nullability in your code, deal with implicit …
Using C# 5.0 with Visual Studio 2015
Visual Studio 2015 is out and brings us the new C# 6 language features. We also have the new .Net 4.6 Runtime. But what does that mean? Well, the framework version and language version are two separate concerns. You can practically pick any framework, with any language, and it will work. This means that If you want to …
The Service Locator base class anti-pattern
Something I have seen a lot of over the last few years is a lot of service location, particularly in base classes, particularly in Controllers. But not limited to there, it can happen anywhere we see base classes. Short rant about inheritance The longer I do this, the more I find that base classes are not meant to be …
Code Demoing with Visual Studio
I often find myself in a meeting or presentation, Visual Studio open, showing some code. What is the question I can almost guarantee that someone will ask? Can you please make the code bigger. Now I have a trick that I find really useful that saves a lot of hassle and works really well. It comes in the form of a Visual …
git lol
I saw Scott Chacon use git lol on an introduction to git video, and thought it looked like a neat alias idea. I did some searching and came across this blog post by Franz Bettag, in which he creates an alias for git log called git lol. I’m not sure if he came up with it, but it looks like Scott Chacon is the …
Console2 Console arrow keys acting wrong - The fix
The Introduction I’m having fun using all my console windows inside tabs in one application using Console2 (hooray for easily finding a Hanselman blog post on my specific topic for you to read all about it) and it has been going well. The Issue However, the other day, my whole console window started sliding …
New Zealand Public holidays Calendar
Want to see all the New Zealand public holidays on your calendar on your Google Calendar, but don’t want to have to enter them yourself, or maintain them? I found this great page with public holidays and calendars on the MBIE site. They have the New Zealand public holidays here for the current, past and future …
Hosts entries and windows services
This is regarding an issue where the hosts file is being ignored when running a service as local system. Skip to the bottom for the solution or read on if you care what lead to the need for this in the first place. The Problem Recently I had an issue with my machine and hosts file being ignored. I was using a Windows …
Dialogs From Outside the UI
If you are getting the “Dialogs must be user-initiated.” error in Visual Studio, you are probably calling an OpenFileDialog or SaveFileDialog from the wrong place. The most common ‘wrong place’ seems to actually be the debugger. If are stepping through your code and try to step over a …