LvivIT #0 – it was awesome!

September 17, 2011 Conferences No comments

Yet another time, I’m on .net community conference in Lviv again. This time LvivIT. You know what makes me happy about this? It is understanding that such events are happening more and more often and they become more mature in my native city. Presenters are more and more known guys. This also makes me think that we start witnessing something that is more common to big cities in USA, cities that have few or more technology user groups. At least now I know that we are moving in the right direction. Cool.

This event welcomed presenters from other cities of Ukraine. Below I’m going to list some of my and only my thoughts on all of presentations, without mentioning names of presenters.

1. This man simply rocks, he had absolutely another style of presenting. He doesn’t follow any kind of agenda and even doesn’t have presentation. He simply started with throwing two iPads into auditory with his app started on it. Application is game, that scored first place in marketplace for some period of time, thus man simply has up to 20K per day, and he is delivering his story of success to us. Main thing I got from this presentation is that if you want to succeed, you have to work on things you like and don’t compromise with different bulshit surrounding you. He ended presentation with no special attention to the audience, but started finishing soup he brought instead of lunch (in between of what? or doesn’t he have enough time to eat normally?). Everyone expressed much interest in this person and his game. I saw how much he is proud of it, when he had words with interested guys after presentation. This really inspires.

2. Second presentation was about html4 and html5 & further future of HTML and web technologies, so called web 3.0. During this presentation I got what it means when there is person in audience that takes all words of speaker into criticism and then simply gives hard time to presenter. They almost yelled at each other.

3. Believe me or not, but there was presentation on Agile, when guy said nothing about Agile itself, but gave everyone know that it really works. “AGILE! Yes!” He showed example of SorceForge implementing agile and succeeding. Another portion of presentation were results of surveys on if agile really works. From this presentation I’ve learned about another way of presenting material.

4. I’ve also learned, that presenters have to be ready before the presentation, and not show that they are not up to speed with stuff. Even when you joke about preparing some slide hour ago, you have to cover it with your deep knowledge… Or at least it is my personal thought. Ok, maybe that is because I’m experienced in material of topic presented on fourth presentation.

5. “Silverlight is not dead” first words given from him, latest presenter. He talked about features that will be added to Silverlight 5, like multicolumn text, multi-click, XAML extensions, ancestor, elevated trust, and in-browser elevated trust, graphics improvements, multicore usage, vector printing, 3D with XNA. Also presenter showed known slide on future of SL and Windows 8 with green and blue divisions of world :). Personally I liked this presentation because it clearly and honestly listed things coming in SL. I even think that one of the features can be utilized in project I’m working on now.

To summarize, I want to say that this event really was awesome! I enjoyed it very much! Well done, guys, especially Dima and sponsor and of course presenters!


No comments


Delivering presentation w/o eye-contact sucks

August 29, 2011 Presentation No comments

On Thursday 18 August I delivered presentation on Software Estimation. Mainly I went thought the agenda that more-or-less matches contents of the book “Software Estimation: Demystifying the Black Art”, as I found it covering most of the main aspects of the estimation. I prepared a lot of interesting stories and analogies to explain stuff and presented that with great dedication… but… my audience was connected on the phone (except of two in room with me) and we did not have web cam (our IT dep. failure)… so… it really sucked.

I simply cannot know if they accept words and jokes I produce, thus I cannot understand if I have do adjust my speech. Also it is not possible to know if audience gets information easily or it goes hard. Asking audience different questions and getting response from them is also hard. Much more conversation was going between me and two people in meeting room. Long story short, when there is no visual feedback presenting information makes me, as presenter, frustrated. Of course it is not secret that it is important to have eye-contact with audience, I just wanted to complain a bit.

Ok, as we live in bureaucracy and connected world, there was feedback – filled survey. And you know what? It s***ed again – I got only 3 records in survey, even they are very positive (except complains on work of IT) it means only one thing – my audience didn’t admire the presentation. I won’t be surprised if 2 of 3 responses are from guys listening to me in the meeting room.


No comments


Just upgraded to AutoMapper 1.1 RTM

August 24, 2011 AutoMapper No comments

Just upgraded AutoMapper to 1.1 version. What is really funny about this update is that we used pre-release version of this tool in production. And it worked well, even there were some bugs, so I’m having some doubts if we relied on some of those bugs : ).

Here are Release notes we should benefit from:

For the 1.0 RTM: http://automapper.codeplex.com/releases/view/39791 For the 1.1 RTM: http://automapper.codeplex.com/releases/view/44802

Honestly I did not find some major changes and there were no obvious (compile error) breaking changes, even we used many of AutoMapper features. There are slight performance improvements and added features that we probably don’t need or maybe need. Thus I would like to complain about AutoMapper a bit – it is lacking documentation. Sometimes it is much easier to read about some feature and realize “aha, great, now we can utilize this capability!”.

There is only one hint to upgrading process I would like to add. When upgrading version I guess you would usually replace path to assembly in all *.csproj, but don’t be lazy and do full search in other files, as you might have different build/deploy scripts that push 3rdParty components to appropriate folders.


No comments


Upgrading to higher version of NHibernate w/ FluentNH

August 23, 2011 NHibernate No comments

“How much would it take?” – Yeah, it is interesting question, which we gave to ourselves being maybe 3rd year of developing projects based on NHibernate. We took quick look and from top of the head it looks like it would take a lot of time, because FluentNhibernate has changed syntaxes, because there might be something not working after changes, etc.
You know what? I was able to change version of NHibernate and make it working for us within 25 minutes.
It just proves known statement about giving estimates: Judge as last resort!” Better compute and much better count if applicable.
So what is needed to be changed when you are upgrading to higher version of NHibernate w/ FluentNHiberante (from 2.0.0.4000 to 3.1.0.4000):
  1. Download compatible versions of NH and FNH. Usually FNH is step behind. (see release notes)
  2. Update references of your projects if you have folders for versions of 3rdParties.
  3. Update fluent initialization of NH with adding proxyfactory, like below:

var configuration = new Configuration();
var properties = new Dictionary<string, string>();
properties.Add(“proxyfactory.factory_class”, “NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle”);

4. Also you would need to reference NHibernate.ByteCode.Castle in your starting project.

5. Update fluent mapping with removing different noise code like below (if you are below 1.0 version):

image

We had about 250 mapping files so “Ctrl+H” had to be used a lot.
6. Run your application and see if you don’t have any issues.

So, long story short, updating to higher version of NH is not painful. It is still not clear if it has big impact or not, especially for big project.
If we decide to upgrade I will let you know if testing shows big impact.


No comments


My 200th blog post. Sometimes it is hard to blog.

August 22, 2011 Uncategorized No comments

Hello. Officially this is my 200th blog post.

In my “100th blog post” I wrote that blogging pays off and indeed it brought me many cool things, like knowledge, opportunities, also I became noticeable by others in my company.

In that hundred posts I finished my series on design patters. I prepared for being senior developer and became him. I delivered many presentations, including one big it-jam. I wrote few popular posts on career plan and interviews. I had many other not less interesting posts.

It took me 9 months to have those first 100 posts and now I see that next portion took me over year. Interesting… when will I get my 300th post. Would it take year, less, or more? I cannot answer, but I know that blogging started to be hard for me. Not because I don’t have things to blog about, but because I don’t stop myself for few moments to write about something. Almost each day I have some challenges at work, I can blog about. I read many interesting stuff, which I can try out and blog about. But I don’t.

I know, I know real blogger shouldn’t write such posts. And I wouldn’t even try to convince anyone that I’ve been very busy or something… I had lot of routine stuff that many people have all their life. I had nothing unusual but for some reason lost feeling of the road I’ve decided to take. Why did I?

I have disease – I often think that I will do the stuff later, maybe in the evening or tomorrow. And when I think so I do nothing next day. It is damn stupid habit. For the dozen of weeks I thought that I will post latest 2 design patterns, but I did not. Some time passed and I had them on my blog, but it was too hard.

Why do I think that I will do all the stuff tomorrow? It is not possible. There are guys at work that never think that way. They are so much responsible, they fill that cannot left working place until some good portion of their job is done. WTF? Why I don’t have such skill?

I probably didn’t read my blog for some long time! I need to! Here is something that gives me some advices on how I should proceed.

Where have I been? Nothing is going to be tomorrow if I do nothing today!

I DO NOT LEAVE THINGS FOR TOMORROW!!!


No comments


Book Review: “Software Estimation: Demystifying the Black Art”

August 17, 2011 Book Reviews No comments

imageFinally I have another post on read book (after so long time not reading posting). This time book is on software estimation called “Software Estimation: Demystifying the Black Art”.

This is first book that I read about estimation end-to-end, and I have to say that it is extremely good and I think it covers most of the topics needed to be able to see how estimation works.

It consists with three parts, each gives you good set of knowledge, first one on core concepts, second on fundamental techniques and third one on challenges you might dive in when estimating.

Honestly I started to read this book, because I knew that I will have presentation/training to deliver. I heard about most of the concepts mentioned in book, but (!) book gave great insight into them and from different perspectives so I started to wish that I had reconsidered all of the many estimates I gave in the past.

I would really recommend you to read this book as it helps you to think deeper when working on estimates.



No comments


WCF Configuration caused memory ‘leaks’

August 17, 2011 Performance, WCF 9 comments

If you are lazy to read whole post, jump to “Summary”.

Have you been in situation when a project was designed for low performance needs and in the end of the day customers want it to be 100 times faster? You have to be ready for such time and be ready to scale.

We changed the configuration of our application for more aggressive processing but it did not meet customer needs, so we had to do much more other tweaks to make our service performing better. Unfortunately along with with improvements we started to get memory leaks.

So our app started to eat memory dramatically. Within 5-15 minutes it was already hitting 2Gb score. Why the hell? Most of the changes were configuration and performance tweaks.

I decided to profile the application with ANTS Memory Profiler. (by the way it is simply amazing profiler). After I learned what means what in the profiler, I was able to analyze what I see. Turns out our application produces huge memory fragmentation with large objects. (see screenshots below)

Here are some recommendations for fixing such issues from profiler website:

Solving large object heap fragmentation

Large object heap fragmentation can be one of the most difficult types of memory problem to solve, because it often involves changes to the architecture of the application. The best approach to use will depend on the exact nature of your program:

•Split arrays into smaller units so that they remain below 85kB (and so are never allocated on the large object heap).

•Alternatively, you can allocate the largest and longest-living objects first (if your objects are files which are queued for processing, for example).

•In some cases, it may be that periodically stopping and restarting the program is the only option.

So what are these large objects? My initial thought was that out app simply was not keeping up with processing and we overloaded memory with many large collections that were not garbage collected.

clip_image002

But what was interesting was this funny  Byte[] array keeping 134Mb of memory… I drilled deeper and found the following:

image

Oh, System.ServiceModel.Channels.BufferManager! This made me thinks that large objects are actually allocated by WCF and never disposed, so in the end of the day it was causing our memory leaks.

So I knew that it is something related to WCF BufferManager. I started looking at what was changed in WCF configuration in order to process bigger messages. Here is what I found:

<binding name=”Allscripts.Homecare.WSHTTPBinding.Configuration” closeTimeout=”00:05:00″ openTimeout=”00:05:00″ receiveTimeout=”00:10:00″ sendTimeout=”00:05:00″ maxBufferPoolSize=”2147483647″ maxReceivedMessageSize=”2147483647″>
<readerQuotas maxDepth=”2147483647″ maxStringContentLength=”2147483647″ maxArrayLength=”2147483647″ maxBytesPerRead=”2147483647″ maxNameTableCharCount=”2147483647″/>

Do you see anything interesting about the configuration above? Yes, all values are set to max. What are chances that someone really evaluated their impact on performance before setting everything to max? Max is always better. Isn’t it? maxBufferPoolSize property is related to BufferManager. A bit of a search and I found this:

From http://kennyw.com/work/indigo/51 :

“On the built-in WCF Bindings and Transport Binding Elements, we expose MaxBufferPoolSize as a property for you to control our cache footprint. If you are sending small (< 64K) messages, then the default value of 512K is likely acceptable. For larger messages, it’s often best to avoid pooling altogether, which you can accomplish by setting MaxBufferPoolSize=0. You should of course profile your code under different values to determine the settings that will be optimal for your application.”

So with changing maxBufferPoolSize to 0 I was able to witness stability in the work of our service. Of course, it was still consuming some memory because of hard time we gave it, but it was not leaking.

From the picture below you can see that there is no problem with Large Objects Heap. It was nicely bumping up and down (blue line).

image

 

Summary

If you have performance problems, and try to fix them by changing all configuration parameters (timeouts, buffer sizes, other stuff) do this carefully. Always evaluate the performance impact. If you already have problems, use advanced profilers.

Surprisingly, increasing WCF maxBufferPoolSize doesn’t always mean increase in performance, rather it can result in huge memory leaks if the size of your messages is larger than 64K. For larger messages it is better to set MaxBufferPoolSize=0. For me it sounds like GC is not so keen on disposing large objects from heap and this caused our issues.

Hope this helps someone.


9 comments


Visual Studio 2010 hangs during installation…

August 15, 2011 VS2010 2 comments

Today I spent good porting of time trying to downgrade my VS2010 from Premium to Professional edition.

When I run VS install I got following hanging:

image

I had to wait about 20-30 minutes to get to the next step. So I tried to kill process are restart again, reboot PC and other things. Of course I did research over internet and it gave me much hints, but not complete solution.

Maybe it is only solution for my particular problem, but it also might be your problem.

1. Download Process Monitor and start spying your setup.exe.

2. Find out root causes of hanging.

image

3. Resolve issues. In my case those were missed registry keys, which I had to manually create and locked files – I had to kill processes using them. I also discovered that some of the issues were related to IE settings, so I put all to defaults, cleared all history/cached data.

4. If it doesn’t help, continue your research. For me this one post was very useful.

Hope this helps someone.


2 comments


Mine time management = pomodoro + outlook + notepad + paper

June 22, 2011 Success 6 comments

Have you ever read any books on time management? I’m sure you read maybe few of them or at least read articles/blogs and of course heard a lot. Have you ever tried some time management techniques? I’m sure you tried. Have you ever failed in those tries? I guess you did. And if you did not fail, than you are probably very lucky person. I believe I have an answer why those fail, or at least failed for me. Reason is – none of particular techniques that I tried really matched my personality and my style of work. There are things that simply cannot work for you. That’s it.

So what do I recommend to make it happen?

Play more and more with different (!) techniques, think about them, think why they work and don’t work for you. Also try to mix them. Try to adapt what you learnt more and never be precise to what is written in the book.

And here is what I think works for me

Paper notebooks

I have two paper notebooks. One I always have with myself when I’m outside of the work and another is always at work. I never forget working one at home and vice-versa.

Work-notebook. Usually I write to this notebook as I go. Anything could go there – meeting minutes, my thoughts, items to work on, even some bad words if I’m not satisfied with meeting I’m attending. I would have used laptop instead, but I’m not at position/company where guys have laptops for work.

Personal-notebook. Is something where everything goes planned per each day. For example I can put there to have haircut on Friday. But I also like to list there items for the next day that are related to work, grouped by need in them. Something like “must”, “nice”, ”awesome” so in the end of the day when I take a look at it and I did everything from “must” section I’m already satisfied with my day and if I did something from “nice” or “awesome” I’m proud of myself.

Plan Of Attack

I have txt file located at my working desktop called “Plan of Attack.txt”. It is very similar to what you would have called “todo.txt”, but except of writing there things I need to work on, I also put anything that could come into my mind while working on something else. For example while I was working on coding stuff X, I realized that I need to send short e-mail to customer on feature Y. Even if this e-mail could be short, instead of writing it immediately I do my “Alt+Tab” and document “e-mail on Y”, which is probably one second to do. By this process I did not lose my concentration on stuff X and I avoided stress for my memory to remember about that Y.

Outlook

I utilize Outlook very much for planning stuff for the day along with applying “pomodoro” technique. This is also very interesting that I have 15-30 minutes appointments in outlook that look like “Plan of attach and e-mails”. During that time I work on my inbox and I also reorganize what I have in my magic file by simply changing order items are located in file. Those at the top have higher priority. Once I sent e-mail on Y appropriate line disappears from my list.

Pomodoro technique

I try to stay maximum focused on things I do, and this is very much propagated by pomodoro technique. My outlook has 30 minutes personal appointments, I mark them as “free time”, so it shows people that they anyway can schedule meeting with me at that point of time. Also if I have to much external interruption (e.i. guys asking questions) I put a note at the paper near me with label “I’m available starting from xx:xx”. So during 25 minutes I just do my job, say “Pomodoro: Coding – Security” or “Pomodoro: E-mails”, very focused. Here is also one important note: I do not use this technique if I feel that I’m concentrated at work and have no issues with continuing what I do. I can continuously work on coding something during 2 hours and still be focused. I do not interrupt myself by these “tomatoes” if such things happen (usually at night).

Free time which is never free

I also have free spots, of course they are always occupied by something I need to help on, on short conversations with others and many other things that steal our time. But there is pros. in free spots – I can spend it on my further planning and I can go through my scribbles in notebooks and… I have time to relax.

Spend time wisely

When someone cannot be in time with task they do there are doubts if they spend their time wisely. Having this doubt can be fair and can be not. People always have different vision on what is important for other people and what is definition of “done”. Doesn’t matter how much stuff you’ve done and will do, please always know why you do everything in your life.

Key things to the whole damn time management:

  • Every thought or task is documented, so your mind if free to do what it is intended to do at the moment
  • Have time to reorganize tasks and plan them
  • Be maximum focused on tasks you do at the moment
  • Have time to relax and think about things you do and will do in future

Thank you very much for reading this blog post, looking forward to hear feedbacks from you.


6 comments


Technical Leader

June 8, 2011 TeamWork 6 comments

There has been a while since I posted something relatively personal. In recent time I’ve been working as Technical Leader for two projects (for one maybe partially thanks to another great team member). Being TL might be also justification on why I did not post that much, but probably it is not justification, it is just prove of my bad time management.
In this blog post I would like to talk about people motivating and leading team as I have much of this activities now. My vision could be very weak in this respect, but I have it clear in my mind and I would like to share it with you.
I did some research on who is tech leader and I also read couple books
on managements and have some ideas from them. I also had some
conversations inside of the company on this assignment. So I know there
is lot of stuff and information we can read/share. There are huge set of
different opinions on this manner and most of them are correct. So I just express what I was able to compose withing allocated time for this blog post.
In manner of couple of months I’ll see if my attitude and actions are correct. I will definitely share this with you, dear readers.
Here is how I see goal of good Technical Leader:
TL’s goal is to ensure that each team member (including him/her-self) is happy with work they do and that they constantly grow their professional skills, therefore establishing overall success of the project.
I believe it sounds differently from what you can read from other sources, but there are dozen of different definitions of this role, so above one is mine. To be a good technical leader you might need to take a lot steps before you succeed.
TRUST
But unless people believe in you, and have strong trust in you, you might not be able to do much.
It might be difficult to build trust, but it is doable. Here are my thoughts:
1) Explicitly show your desire to work for the projects success thought the prism of everyone’s happiness.
2) Work very hard on learning new stuff each day, make sure people know that you are very strong in your knowledge.
3) Stand for the people in your team, always show respect, always treat them as the best developers.
4) Listen to people, ensure they know that their ideas are valued.
5) Show that you try to understand needs of each person you interact with.
Here are some things I do now:
1. Ensuring that people don’t have anything on their way to complete tasks.
2. Giving clear tasks and establishing clear expectations, especially for the people that are not highly motivated.
3. Acknowledging developer’s work. So if some of the developer’s did great job I’m sure everyone should know otherwise it just dies with closing task in tracking system.
4. Coaching on technical stuff when it is appropriate.
5. Giving people tasks they like and tasks that challenge them. Also if people don’t reveal much interest I just hope that next task they pick up will be something they will like.
6. Inspiring developers us much as I can.
7. Showing personal responsibility and technical skills as an example. 
Here is something I would like to improve:
1. Make sure everyone feels high responsibility for the work they do.
2. Make everyone believe in project and is really willing to make it happen.
3. Make the team to be an extremely collaborative, self-defensive, self-organized, motivated and oriented to success.
Here are also some things I would like to try:
1. Build table of everyone’s weak and strong areas and try to use it the best.
2. Find best tasks for the people so they learn and get excited about working.
Thanks for reading this blog post!


6 comments