Dec 8, 2010

UI Spy Replacement: UI Verify

Here it is:
So far, I like it very much!

Take care!

WPF: In the search of automation Id for Popup

In case you are doing WPF development, and for some reason you are using Popup control (primitive), and it has no AutomationId (no matter what!!!) here is a cure:
 - How to set AutomationID and Name for Popup

Happy coding!

Dec 5, 2010

10 Pancakes #3

Enjoy good links:
 - Best code comments on StackOverflow 
 - Programmers jargon (good guidelines) on StackOverflow
 - Ultimate dev cheet sheet collection and more
 - Book: Software for your head (free PDF)
 - Go distributed .net with DryadLINQ
 - Visual Studio CTP with async pattern (C#5?)
 - Package management for .net
 - Rx Guidelines
 - Skills Matter - Yes, they are! 


Nov 29, 2010

Unity Interception (AOP)

Recently, I have been working on adding Unity Interception and found out that it is extremely poorly documented. Here is the list of links one may find useful:
 - The bare bones of Unity interceptions
 - Order Property and Firing of Handlers
 - Unity interception performance
 - INotifyPropertyChanged With Unity Interception AOP
 - Implementing INotifyProperyChanged with Unity Interception

Also, there are always opened questions here: unity-interception

Sep 13, 2010

10 Pancakes #2

This is yet another links list, enjoy.

 - WPF Triggers, Actions, Behaviors
 - Firedrill best practices for money saving
 - Patterns for Parallel Programming for .NET 4.0 book / guidelines
 - Code Contracts
 - Rx Extensions
 - Rx for Javascript
 - Free agile trainings
 - In fact, I see none people who do "agile" and familiar with agile principles and manifesto at the same time. I wonder why...
 - And dynamic languages are driving me crazy these days, I should learn a couple:

Aug 25, 2010

Why I love RhinoMocks?

Well, to begin with I really do :)

Anyway, currently I am involved in several projects simultaneously. And it turned out that each project has it's own 3-rd party libraries and tools. Well, one has RhinoMocks and the other has Moq. I do not mind learning new things so I thought why not to try Moq.

Everything went well (without documentation reading) until I decided to create a mock of the сlass with "virtual" method. The test was simply to check whether the method gets called. I wrote the test and it failed. Well, I added good code - failed again. Went through the debug - failed anyway :) What could go wrong?

Here is my class I had to mock:
    public class MyViewModel : ViewModelBase    
        public MyViewModel(IEventAggregator events)
            this.eventAggregator = events;

        // ... Lot's of other code.

        public virtual void VerifyCurrentView()
            // Smart things here

The class subscribes to certain events from event aggregator and tries to call VerifyCurrentView method after events are handled.

So, how would you check whether the VerifyCurrentView method code actually gets called?
Never mind, here is how I thought I could do this:

    var vm = new Mock< MyViewModel >(events);

Guess what? The constructor never gets called in this case :( I spent an hour trying to figure this out - no luck.

Consequently, the following test (mock) does not work:

    public void My_test_Moq_version()
        var events = new EventAggregator();
        var vm = new Mock< MyViewModel >(events);

        vm.Setup(m => m.VerifyCurrentView());

        // Act
        events.GetEvent< AlertHistoryLoadedEvent >()
            .Publish(new HistoryTypeInfo[0]);


And I had no idea why it was happening and neither a desire to know "the truth". I spent another 5 minutes to write the same with RhinoMocks:

        public void My_test()
            var events = new EventAggregator();
            var vm = MockRepository.GenerateMock(events);

            // Act
                  .Publish(new HistoryTypeInfo[0]);

            vm.AssertWasCalled(c => c.VerifyCurrentView());

And it works! Just like that.
RhinoMocks just rocks!

10 Pancakes #1

It has been a while since my last post. I think I will be posing more in the future, we will see :)

Anyway, today I would like to start a new ideas that I tried to put off too long time for now. You see, I find too much of interesting stuff every day and I cannot simply throw it to everybody via IM and e-mails.

Starting this week I will be posting links I went through and think would be beneficial to my friends, colleagues and other good people.

So, here is the first 10 links:
 - Scrum check-list 2010 free e-book:
 - New Uncle Bob Martin blog - the clean coder
 - Scott Hanselman over Effectiveness and Efficiency
 - SICP Book
 - Pro HTML5 book excerpt - Chapter 6
 - New Embedded DB for .Net - EffiProz
 - Managed Esent DB for .Net
 - RavenDb
 - The blog of Managed Esent author

May 6, 2010

Power Tools for Visual Studio 2010

Microsoft has gathered all power tools together on one site. Great!
So, whenever you need one of those go there to get it:


Have fun with it!

PS: Until Rob Conery will create a better tool just for you.

Apr 27, 2010

VSTS 2010: CodeContracts Issue

If you are unable to create any projects in Visual Studio 2010 after installing the "latest" CodeContracts build then the following link might help you to solve it pretty fast:

Mar 4, 2010

Job Invitation Dear

Hey! What you feel being invited to work for someone in the following way?

"We have a high growth of demand for development. A lot of projects are using this technology now. Much more are coming. You have a chance to join the newly formed expertise excellence department that will incorporate the technology experience in it. If you are keen of this technology it is the high time to jump in and take part in tremendous growth of expertise"

Do you feel excited?
Do you feel challenged?
Do you see opportunities?
Me? No, I do not! Do you know why?

Well, the famous Joel Spolsky said about it a lot already. You see, there should be something in the job post. There should be something in the employer, you know? I do not mean that everyone should strive for uniqueness, but trust me - if your company is able to interest someone to work for them only by using the job invitation then they probably can hire anyone to work with you.

Remember the quote in the beginning? How about this one?

"We have a high growth of demand for development [in the universe]. A lot of projects are using this technology now [in the universe]. Much more are coming [guess where to? to the universe]. You have a chance to join the newly formed expertise excellence department [in the universe] that will incorporate the technology experience in it. If you are keen of this technology it is the high time to jump in and take part in tremendous growth of expertise [in the universe]"

Does it sound somehow differently? You see, nothing has changed since I added the company name (the universe). The context did not change. The meaning left the same. There should be a difference. It just should be. If it does not, you lose. Because this is just the name, the name of your company is the only thing that makes your company different. This is it.

Jan 24, 2010

User Interface Design and Architecture

Not so long ago I started to deep into UI design and architecture, the process, tools, best practices and so on. The reason was simple, as soon as I started figuring out how to do great software I quickly found that the software should do the "right thing". And by doing the "right thing" it should show this thing, make it available for the end user, make him or her understand how it works without reading the specs or how-to material, do the thing, explain all steps, errors, warnings, show the result and finally the software should have a super cool and flashy look.

Well, as I started to look into details of what I was thinking about the more and more materials I started to find. Here, on this page I will try to gather the materials I, for some reason, found useful. And I do this for a very simple reason, not to find it again, because... you know, sometimes it is extremely hard to find good stuff even with Google.




Extremely useful tools will be referenced here.

And of course, I am very thankful for your feedback and help! Thank you very much!

Update: 04/10 - Added "color" articles' links