Friday, December 20, 2013
Friday, October 11, 2013
Control+F5(may be multiple times) or go to Settings and clear cache from there.
Now, the things got simplified, after long click on Reload button you'll see the following menu:
An important point: the menu shows up only if Developer Tools are open.
Monday, November 5, 2012
Some time ago I tried playing with Task Parallel Library, but eventually it appeared that TPL is not applicable in this scenario.
This time I've found Rx Extensions and I really liked the approach. My task with sequential background execution is solved with the help of the extensions quite gracefully (here is simplified version):
var service = new PingService("google.com"); // Every second the ping service will be called from background thread, producing a sequence of metrics var metrics = Observable.Interval(TimeSpan.FromSeconds(1)) .Select(i => service.Execute()); // Consuming the sequence of metrics and updating UI subscription = metrics.Subscribe( metric => Console.WriteLine(metric.RoundtripTime), exception => Console.WriteLine(exception.Message));
Applying Rx Extensions drastically simplified the service itself and program environment as additionally I got rid of events and handlers, I am satisfied with the changes it brought. In my scenario it looks like a simple messaging bus between services and their consumers.
I'm pretty confident that Reactive Extensions can change your attitude to composing asynchronous and event-based programs (as it once happened with invention of LINQ for data querying). More on Rx can be found on MSDN, 101 Samples, IntroToRx.
Sunday, November 4, 2012
However, last week I was diving deep in autofac IoC container and one thing in their documentation just made me rethink all that I knew about the relationships between the components (actually, I didn't think of anything except the first type from the list). Here is what they call relationships:
|A needs B||A(B b)||Dependency|
|A needs B at some point in the future||A(Lazy<B> b)||Delayed instantiation|
|A needs B until some point in the future||A(Owned<B> b)||Controlled lifetime|
|A needs to create instances of B||A(Func<B> b)||Dynamic instantiation|
|A provides parameters of types X and Y to B||A(Func<X,Y,B> b)||Parameterisation|
|A needs all the kinds of B||A(IEnumerable<B> b)||Enumeration|
|A needs to know X about B||A(Meta<T> b) and A(Meta<B,X> b)||Metadata interrogation|
More on the relationships you can read in the dedicated article Relationship Zoo, highly recommended. I hope it will make you rethink what DI was meant for you.
Friday, November 2, 2012
So first, I tried it in Visual Studio 2010, silently hoping that the troubles are gone. And yes, the extra boldness of some symbols is no more the case. Here is how it looks:
|Inconsolata in Visual Studio 2010|
After that I switched to Visual Studio 2012. No surprises, the font is rendered perfectly:
|Inconsolata in Visual Studio 2012|
So I guess, the confrontation is over. If you love Inconsolata font, just get its latest version from google code repository and enjoy!
Tuesday, April 3, 2012
Friday, July 15, 2011
Recently I was investigating Microsoft Windows Control Panel applets and found an unexpected issue. Although most of contemporary applets look like they have identical look’n’feel properties, it is not true. Moreover, I suspect that there was no any common UI guidance for them. Look here, I took 3 random Control Panel Applets, placed them into a stack and compared left margin of main title. It is different in all applets!
Follow the red line:
Let’s check vertical margins. Oh, no. The same picture.
How this can be? The author of UI guidance for applications for Windows doesn’t follow their own rules.