September 18, 2010 Coaching 3 comments
September 18, 2010 Coaching 3 comments
I’ve been writing blog post on Motivation and then realized that wrote much about mentee, so I’ve decided to put in another blog post.
Mentee
In one of my tweets I’ve already mentioned
that I got mentee to work with. I’m really happy to coach/mentor person
who isn’t spoiled by the years of being working in environment that did
not aid his motivation.
My tips regarding of how you should deal with your mentee
Each
new employee has a good motivation and you should keep it on the level
it was when he came at first day! It is very important, but sadly not
many cares about this. I did not read a lot of books on
motivation, but I know what motivates me and have an idea about what can motivate others. I’m using this technics:
Listed above is just some list of recommendations/ideas that I’m currently using and I do not pretend to say that this is full comprehensive list of what you should do to keep your mentee motivated.
September 18, 2010 Book Reviews, Opinion 2 comments
Question of Motivation
Motivation constantly decreases with time
New employees are motivated
Latest months my company hired lot of new staff. When I come into room where most of them are located I feel that I’m on another planet. They all have eyes with fire inside! Their hearts desire to do something that will rock! They are open for learning new technologies.
Money
Few other thoughts, but I did not say this (-:
Why do I recommend this book?
September 17, 2010 Opinion 5 comments
September 16, 2010 Book Reviews, TeamWork 3 comments
September 14, 2010 DDD, Presentation, PublicTalks No comments
Tuesday, Presentation for Main Office
Whole night before presentation I spent reading some awesome articles on DDD and really enjoyed it. That leaded to 4 hours of sleep. Also I took some anti-cold medicine with paracetamol, like on the picture below:
Rule of the presenter, you probably have never heard about:
Feedback that I got from this office is like 4.5 out of 5, in details my knowledge of topic and presenting was ok, but something was not really up to their expectations.
Wednesday, Presentation for Dev Centers
Did not get official feedback from them. None voted :(
Thursday, Presentation for Lviv2 Office
September 13, 2010 IT-Jam, MEF, Presentation, PublicTalks 4 comments
So, that have happened: I visited Kharkiv and I spoke on Managed Extensibility Framework at IT-Jam conference.
IT-Jam
So the whole conference was divided into many sections in which of them Speakers, like me, talked on different stuff. Sections were: (.NET), (Databases, Management), (Mobile, WEB), (PHP, QA) and they were located on 3rd floor (see picture below).
Except of the regular speeches in Open Space sections, there was a huge showroom, were Guru, as they call them, were talking:
As I read from other blog posts this year it was first year, when IT-Jam had separate section for .NET and I should be proved that I took part in it.
So the agenda for .NET section:
My presentation
Since I was speaker I did not leave my .NET section till my delivery, so I listened to Viacheslav and Dima. Both presented very well. Dima made the whole public laughing by using jokes with mentioning Kharkiv’s governor and organizers of the IT-Jam.
My time. I plugged in proector and it turned out, that my resolution has significantly decreased. Was needed to move to “Full Screen” mode in VS and making sure that other tools I’m using fit well. My presentation was more about writing code then about showing slides and talking around them.
Here is presentation itself:
In first demo I wrote ever simplest console application, you probably saw in many introduction videos on MEF.
Second demo was dedicated to demonstrate features of the MEF, like Laziness, Recomposition, Metadata. So I built simple WPF (maybe my second WPF app, after VS plugin) and plugin functionality. Each plugin was able to provide simple string. Here I mentioned one of the teachers on first courses in Lviv University. She used to write “Hellow Word!” :) on the board. So I was needed to implement new version of plugin (Metadata) and reload it (with Recomposition, for example). Guys, who studied there do you remember?
In the end I got many-many questions. It was just question-storm. Wow! I really liked it. Just presenting is very simple, but being able to answer for all questions is something where you should be additional prepared.
Parts Lifetime Question
There was one question where I answered not completely correctly. Question was: “Does CompositionContainer keep references to the parts it clued together.” I answered that yes. But correct answer is not that trivial. MEF is smart enough to keep references only to things that are shared and do not implement IDisposable. You can read in details here. I hope that guy will take a look at my blog and will get correct answer. I really worry about my reputation as public speaker.
As I counted up to 70 people were listening to me and this is the biggest audience I ever had. Hope that number of readers of my blog will increase. Cannot check it right now, since I’m now in train and out of any acceptable connection.
THANK YOU ALL!
Thanks to organizers everything was on the top of people expectations. They managed to host 1200 attendees and make everyone happy. Plus to organizing conference they prepared free food everywhere and party for the evening. They made IT-Jam awesome kick-ass cool event!
Kharkiv
Next day I had great time in Kharkiv, I will probably put link [here] to the blog post of my girlfriend very soon. Really enjoyed its monuments (except of “red star” kind), a lot of fountains, great zoo, cable way and other see-sights.
September 9, 2010 Events, MEF, Presentation 5 comments
I’ll be speaking in Open Space Discussion at IT-Jam in Kharkiv this weekend.
So here is the road I will have to take to get there:
For some reason Ukrainian flights are way-way to expensive and therefor not acceptable by most of the people here. Even more this infrastructure is not really developed to be able to provide good services.
That is why I will have to spend 18 hours only for one way trip (>1000 km). At least I’ll have few friends with me and paper book to read.
Since it is far from Lviv and event is only for one day I’ve decided to stay there for one additional day and go out sightseeing.
Aha, almost forgot, I’ll be speaking on MEF:
After I’m back I will definitely post something about this event.
September 4, 2010 CI, Environment, UnitTesting 6 comments
Couple of days ago I’ve been on CI seminar, where guy had been talking about concepts of the Continuous Integration and at some moment mentioned about testing environment and it suddenly dawned upon me and I would like to share my thoughts on this.
Two of many concepts of the CI are:
Feel the difference?
Ok, why do I ask about this?
Maybe a week ago we’ve moved to approach that builds sources and runs unit tests on absolutely virgin machine. Simply saying, nothing is installed into GAC, except of maybe .net framework. Everything needed we take from library folders under source control. And I agree that is really good thing. Compiler is also ok to build projects when they have reference only to root assembly in folder of other assemblies of some particular component. BUT, when you execute your code (run tests) CRL tries to find assemblies in execution folder and then in GAC. Since we have nothing in GAC, we should ensure that everything gets copied to execution folder, and here we dive into issues.
Fixes
In case of simple referencing this is not a big issue. You just should be as a spider and catch what is missed on enigma CI build machine. In some cases this is very trivial – you see System.IO.FileNotFoundException, in other cases it is not obvious.
Interesting trick
Here is one of tricts that we were needed to apply to make UT happy:
Since dll-s like sqlceme.dll are part of SQL CE, but are not CLR dlls we cannot reference them. So we add them as link in your project and then change Build property to “Copy Always” to have them in bin.
There were some other tricks we were needed to try. They are simple, but there are many.
Main Question is still remaining
All that is not main intent of this post. Main is this: Do I really need to do this. Why is this correct?
And if we are so dedicated to CI, then I would like to know also what are we testing? That our code is able to run even if none of 3rd party components are installed?
I still have some doubts, maybe I’m wrong. I would really appreciate any of your thoughts, comments that will help me figure it out and find the right way.
For fun (but maybe will get lucky) I also asked Martin Fowler in twitter:
As you all may know Microsoft committed some efforts to make VS2010 easy to extend. Extensions are built upon Managed Extensibility Framework, which has been shipped in .NET Framework 4.0. If you haven’t heard about it go and check it out on codeplex mef web page or either read my quick article on it.
Visual Studio 2010 SDK
In order to build you first extentions to VS you will need to download Visual Studio SDK
Download Visual Studio 2010 SDK
After you have installed it under New Project -> Other Project Types you will see Extensibility, which leads you to this list of project types:
Add-in Project
If you selected Add-in project it will lead you to nice wizard, which will ask you if you want to have your AddIn in Tools menu if you should like to start it on the start of VS and what are about information. After you finished with wizard you will get project structure similar to this:
What is interesting about this Add-in project?
Connect class
First of all you get Connect class with provides you with basic method within which you can push in your logic. I put MessageBox.Show(“Hello World!”); under Exec() method.
Extensibility configuration
Also you have two xml bases fixes which are describing your plugin. One of the is located inside of your folder and another one lives somewhere like: C:UsersandriyDocumentsVisual Studio 2010AddinsAndriyAddIn – For Testing.AddIn
F5
When you hit F5, accordingly to project properties, it fires devenv.exe with key /resetaddin AndriyAddIn.Connect.
/ResetAddin Removes commands and command UI associated with the specified Add-in.
When it is re-registering AddIn it is using Extension configuration from file which lifes in Documents folder.You can go to Tools -> Add-in Manager… and turn on/off you plugin.
Here it is
For some odd reason I did not find any way to change the icon it gave for my AddIn:
Anyway it works as designed – show message box. :)
I was able to put my logo only into About section using this config:
Visual Studio Package Project
This time Wizard has 7 pages and it generates a huge (as for template) project:
See there MyControl.xaml? It is WPF UserControl which will be smoothly added to your Visual Studio (just like ToolBox).
To create something at least a bit useful I decided to create ever simplest RSS fetcher and use it for my blog. Being new to WPF it took a lot of my nervous to get that working. And one thought: Why did they create graphic editor for WPF. It is very hard to do something with it. XAML is way to much better choice.
So after I added some not really clear code (crappy?) like this:
LoadRss(); if (rssProvider.Document != null) { var entries = rssProvider.Document.GetElementsByTagName("entry"); RssTextList.Items.Clear(); foreach (XmlNode entry in entries) { var displayItem = new DisplayItem(entry["title"].InnerText, entry["feedburner:origLink"].InnerText); RssTextList.Items.Add(displayItem); } }
I know, I know, this doesn’t much standard rss xml, that is why my RssReader will work probably for feedburner urls. Honestly, I’m not sure about that.
Also I gave up to create binding for my ListBox as it could be preferable for WPF. I saw some ready controls for RSS reading, but hey I did it myself.
Ok. Under View -> Other Windows you will see just created Plugin window:
Finally, RSS feed of my blog inside of Visual Studio
And the whole buity of my today’s work – I can see my (or someone else post titles and by clicking navigate to web) inside of Visual Studio:
August 29, 2010 NHibernate No comments
Few days ago I’ve faced with duplication of data in XML we send to vendors and it leaded my to basic understanding how fetching works within NHibernate.
Database
So to make things clear we will start with ever simplest database layout and few datarows as on picture below:
I’m using following code to test our activities.
It fetches Customer with passed in FetchMode and then uses Orders to examine how lazy loading works.
Then I’m calling method for each of the FetchMode in separate sessions like below:
Mapping of the Customer
Generated SQL-s
NHibernate can generate two types of fetching: either join or either separate select statements. So our code generated three join statements for Default, Eager, Join. Also two calls to database with two selects for the Lazy and Select. So all FetchMode except of Default are overriding our Customer mapping.
Join SQL
There is one thing you should remember about such kind of fetching – you will get duplication of the entities in your collections. You should apply joining when you are going to have some specific restrictions in your query.
Duplication of entities:
On the picture above you see two customers, which are the same references and represent same customer with same id = 10. To eliminate this issue you should apply one of the fixes: use distinct, use subquery or filter entities in client code. This article should make this more clear.
My recommendation is never use “.FetchType.Join()” in your One-To-Many relations as I did that. Better let NHibernate do it by default. Nhibernate applies Join to Many-To-One relations and Select to One-To-Many.
In my case better use following:
The less you write code – the less mistakes you do. :)
Two SELECT-s
This type of query is generated if you have Select() fetch type. If you have LazyLoad in your mapping second select will be executed only on accesing of the Orders property of Customer. In other case (Not.LazyLoad) it will be executed immediately on fetching Customer.
Hope this brings some light. At least for me it does.