September 17, 2011 Conferences No comments
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!
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.
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.
August 23, 2011 NHibernate No comments
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):
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.
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!!!
August 17, 2011 Book Reviews No comments
Finally 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.
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.
But what was interesting was this funny Byte[] array keeping 134Mb of memory… I drilled deeper and found the following:
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).
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.
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:
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
Thank you very much for reading this blog post, looking forward to hear feedbacks from you.
June 8, 2011 TeamWork 6 comments