August 1, 2010 Opinion, Personal No comments
August 1, 2010 Opinion, Personal No comments
I saw guys, who bought T-shirts with inscription like “Follow me on twitter @andriybuday”. These weekend I’ve been on Rock Fest in Slavske and I did something more original. Take a look:
Not so long ago I created my twitter account. Indeed it brings me some value and I get fun with it. But many people get interested how that rubbish could bring any value for me or either someone else. Couple of my friends are really concerned about it and even laugh.
Which kind of value does it bring?
I decide whom to follow, this way I consequently decide which kind of information I will get. So if I’m following some programming guys, I obviously get bombarded with information on programming. The more information I get – the more information I process – the more value it brings. The only one important restriction is that information have to be useful.
So whom do I follow?
I follow lot of MVPs on .NET(C#) and other geeks, this way I get information about new technologies and opinion on them provided directly from best professionals around the world.
Also I follow twitter accounts of different interesting sites/organizations on programming. This way I instantly get information when new podcast is ready and I can immediately start downloading it for my listening. Also I’m informed if some new versions of some products are available. For example I get information that NHibernate 3.0 Preview is available. Please notice that since I’m following those, whom I chose, I do not get information about new version of Photoshop or something like that.
I follow friends and local programmers. Actually most of my friends are developers, but anyway following them keeps me informed about their interests and allows me know what do they do.
Also I follow just few News accounts to be informed about events from real non-virtual world.
Whom do I not follow?
Different bullshit first of all, then accounts that post advertisements, those who posts on not interested for me themes. I do not follow or start unfollowing accounts, from which I get twits too often or who mix good stuff and advertisements.
How do I decide whom to follow?
Decision if I should follow someone I make taking into consideration his/her/its top 10-20 posts, if there is no more than 50-60% information on tech or something I’m interested to get from that account I do not follow that account.
What do I tweet?
Of course information that is similar to information that I would like to hear from others. It is different links on programming, my opinions on some technologies or my thoughts on stuff I use right in the moment of tweeting. I also share my personal success notes like passing some MS exam or like fixing ugly bug related to some technology.
Reasons why I do use twitter
Concern about the time it takes
Yes, indeed twitter takes some time on responses and tweeting and it could even take away your concentration on work. So where from do I take this time? I would say: I do not IM others uselessly and I do not spent my time on youtube or other entertainments during the work, so I think that having few tweets per day is ok, taking into account the value it brings to me.
You decide your own if twitter is something for you or not.
August 1, 2010 Career, Certification, Success No comments
I already wrote some posts on certification, where I mentioned why do I need certification and which value does it bring to me. After those posts I almost have nothing to add.
But maybe few things…
How 70-505 differs from 70-536? Questions in 505 are not so wide and after passing 536 + reading training kit it is much easier to pass this one.
How did I prepare? As I mentioned in one of my blog posts, I read training kit on 505 exam. Reading was boring. Taking into account that I already have strength experience working with WinForms it was ridiculous to read about some things like adding controls or something like that. But anyway I found some stuff interested for me. Also I did some research over internet on how other passed this exam. Not enough information exist about this one. Maybe because it is not very popular.
Also I worked on training tests, including demo test on MeasureUp.
Passing Exam
As you see preparation looks very similar to what I had for my 536 exam but I was still worrying about passing exam, since I already failed it. That time I even did not read training kit and was sure in passing exam.
As I was afraid to fail it once again, while testing I was really concentrated on questions and. I PASSED EXAM with score 1000, this means that I answered correctly on all 40 questions. It was really surprising and is pleasure for me.
You can see my transcript using this information:
https://mcp.microsoft.com/authenticate/validatemcp.aspx
Transcript ID: 904316
Access Code: andriybuday
Effect on Career
In post It is time to get Microsoft Certification, I wrote that certification is important for my career growth. Actually in few words my company has schema that defines conditions to be eligible for promoting to the next level.
Here is my current status:
As you can see, I satisfy all conditions for being Senior.
I have just perfect Performance and it was noticed by my managers, also I worked in my company near 2.5 years (looks like this condition is bonus for me, since now it should be 3+ years), also my English is now evaluated as Upper-Intermediate, I did dozen of presentations, and finally I got that certification.
So what is left? – Knowledge Evaluation.
Knowledge Evaluation is meeting when guru guys bombard me with questions to ensure that I’m competent in areas, which are already defined somewhere in requirements. So my next step is to find out my weak areas and get better with them, so I will have more balanced knowledge. I now feel that in some areas I’m competent but some are still very weak, because I do not have experience working with them. You can expect that soon you will see posts on themes I do not know well, but I try hard to figure out them for myself and for you. Hope they will be interested for you!
Please let me know your thoughts on this post.
July 25, 2010 Design Patterns 4 comments
Imagine that your application is very complicated and it happened that you use two logging providers – one is Log4J and another is Java Logging. Your co-worker got great idea to have specification of which of the providers to use in configuration file. As you wrap all logging logic behind some ILogger interface, you also want to hide exact logging provider from client code and pass creating logic to some separate class.
For me this design patter is the most familiar and easiest. I’m sure that most of the readers have seen it many times. So the intent of the Factory Method is to hide exact class that should be created basing on some conditions.
In our example classes that should be created are Log4J or JavaLogging, they both implement interface ILogger, that is widely used in your application.
As you already guess it might be that in future you will decide to use another logging provider. As we already described in our scenario we read which logging provider to use from some configuration. For not exposing exact classes we delegate this work to LoggerProviderFactory. Here is usage:
ILogger logger = LoggerProviderFactory.GetLoggingProvider(providerType);
logger.LogToConsole(“Hello Factory Method Design Pattern.”);
}
private LoggerProviderFactory.LoggingProviders getTypeOfLoggingProviderFromConfigFile() {
return LoggerProviderFactory.LoggingProviders.Log4J;
}
What we are getting back from GetLoggingProvider method is interface. Factory Method decides which of the concretes return basing on the input parameter, which in our case is enum.
Here is implementation of Factory Method:
public enum LoggingProviders{
JavaLogging,
Log4J
}
// this is our factory method…
public static ILogger GetLoggingProvider(LoggingProviders logProviders)
{
switch(logProviders){
case JavaLogging:
return new JavaLogging();
case Log4J:
return new Log4J();
default:
return new JavaLogging();
}
}
}
Because my hardcoded configuration logic returns me Log4J and since implementation of LogToConsole of Log4J concrete logger looks like:
I’m getting this as output: Log4J: Hello Factory Method Design Pattern.
Here is my drawing try:
If you liked or disliked this blog post, just let me know.
July 25, 2010 Career, Success No comments
First of all, and as per me, interviewers ask mainly those things that they know well
So if you are candidate for junior position, range of questions that interviewer has could be dramatically wide for you. But once again, if you are junior, he will ask you basics in which he is guru. This means that slight inaccuracy in your definition will just highlight that you are new incomer. This shouldn’t make you sad.
If you are candidate for mediate position, you already are competent in some areas. This means that two things might happen, either your interviewer is competent in them also or either not. In first variant you will need to prove that you are really competent, and after you are done with that, probably general questions will go smoothly. In second variant it doesn’t matter how good you are in those things, everything will depend on other questions. But anyway try to highlight your strength areas.
Regarding senior positions I have almost nothing to say, because I’m still intermediate developer. I think that in this case company finds some resources that are super-competent and everything looks like in med variant, just on another level, or maybe they take candidate basing on his general applicability to this position.
For Junior
Try to show that are able to learn everything, that you are passionate about learning new technologies and can think out of the box. (One friend gave me this hint.) Generally they take juniors for their growth capabilities. That is like investment.
For intermediate
Be confident in things you know and ready for the questions you don’t know answers. Show readiness to solve problems and be honest when answering.
Interview and candidate attitude to work
Remember that you are also interviewing
Did I have one recently?
I’m not throwing you to send resumes and go to dozen interviews, but I recommend having one interview at least once a year, just to know if you need to pay more attention on learning something or improving something.
I am not afraid to say above, even if my current employer will read this blog post or if company who asked me for interview will read this. Why? Because if I stay, this means that current company satisfies me with conditions it gives me and this should make it happy that resources are not going away. If I move, this means that another company finds me more valuable than current, and this means only one – I was losing something at my work.
Guys, that all is about how much you cost. And I know answer for this question:
July 24, 2010 Design Patterns, Java 1 comment
Have you worked with Outlook calendar or any other mature calendar, that allows you copy some events from day to day?
For example your friend scheduled small beer party for Friday, 23 July where he listed his friends, also he allocated time from 7pm till 3 am and put high priority, he also described that it is great to have party on Friday after work in the comments. As you were invited, party went extremely well. In the end of party your friend decided to schedule similar party for the next Friday, but since he had already drunk too much it was complicated for him to populate all of the fields of the event in calendar. Which kind of enhancement would you propose for the calendar, your friend uses? Probably copy-paste functionality.
Prototype is design pattern, that allows us create complete copies of instances already defined in design (list of possible types of events) or either run-time(Friday’s event), so we no longer need reinstantiate them from A to Z. Already defined instances are called prototypical instances.
As we already described one applicability of Prototype for copying instances specified at run-time, this design pattern could be also used for reducing number of subclasses in the system. For example instead of having subclasses like “5 floors apartment block with 3 rooms flats“, “9 floors apartment block with 2-3-4 rooms flats” and “12 floors apartment block with 1-2-3 rooms flats” you may have 3 instances of ApartmentBlock initialized with needed properties, and then you just copy one of them when you need to build new building somewhere in the city. In other words no need to write either this “new ApBlockWith9FloorsAnd234Flats()” or this “new ApartmentBlock(){Floors = 9; FlatsDic = {2,3,4}}“.
What you need is something like “_9FloorsApBlock.Clone()“. Of course you can combine this with FactoryMethod, so you will have something like “GetMe9FloorsAppBlock()“, which inside calls cloning of prototypical instance.
Example
Let’s now take a look at Prototype, which defines clone() method for our prototypes.
My concrete Prototype class is calendar event, which looks like this:
Client code is executed, when my friend wants to open calendar, right click on event and paste it into other location, therefor changing start/end date & time.
Take a look on this process:
public CalendarEvent getExistingEvent(){
CalendarEvent beerParty = new CalendarEvent();
ArrayList<Attendee> friends = new ArrayList<Attendee>();
Attendee andriy = new Attendee();
andriy.FirstName = “Andriy”;
andriy.LastName = “Buday”;
friends.add(andriy);
beerParty.set_attendees(friends);
beerParty.set_startDateAndTime(new Date(2010,7,23,19,0,0));
beerParty.set_priority(Priority.High());
return beerParty;
}
public void Run() throws CloneNotSupportedException {
CalendarEvent beerParty = getExistingEvent();
CalendarEvent nextFridayEvent = (CalendarEvent) beerParty.clone();
nextFridayEvent.set_startDateAndTime(new Date(2010,7,30,19,0,0));
// we will talk about further code a bit later
nextFridayEvent.get_attendees().get(0).EmailAddress = “andriybuday@liamg.com”;
nextFridayEvent.get_priority().setPriorityValue(0);
if(beerParty.get_attendees() != nextFridayEvent.get_attendees())
{
System.out.println(“GOOD: Each event has own list of attendees.”);
}
if(beerParty.get_attendees().get(0).EmailAddress == nextFridayEvent.get_attendees().get(0).EmailAddress)
{
//In this case it is good to have shallow copy of the attendees.
System.out.println(“GOOD: If I updated my e-mail address it will be updated in all events.”);
}
if(beerParty.get_priority().isHigh() != nextFridayEvent.get_priority().isHigh())
{
System.out.println(“GOOD: Each event should have own priority object, fully-copied.”);
}
}
}
As you can see my friend got copy of the existing event and by grag-drop changed its date. But after that I noticed that I can change my address in his attendees list, so I did that, also after we got another beer and felt sick we decided to lower priority to neutral with this line: nextFridayEvent.get_priority().setPriorityValue(0);
Looks like we’ve got what we want – copy of the existing event, with attendees, priority, etc. But it turns out that when I open old event I see that priority is now neutral, not high. As you already guessed that is because we executed shallow copy.
Shallow copy copies only direct value field and keeps same references.
Deep copy copies whole graph of objects, so they all have different addresses in heap.
CLONE
For Prototype we can implement clone() our own way, so for example I can have partially deep copy, so my new address should be the same in all events, but priority should keep different.
In Prototype design pattern we implement clone method. Sometimes we may need complete deep copy which can be archived by manual copying which is cumbersome, by reflection, which could be slow, or by serializing and deserializing to new object, which is also expensive. But sometimes you need partial deep copying like in our example. That is why programming languages introduces Cloneable interfaces to be implemented by our own. Suitalbe for our example could look like:
// we also would like to copy priority
copy.set_priority(this.get_priority().clone());
return copy;
}
I already wrote console outputs that say we are ok. But also here is screenshot from debug mode to prove that I do not cheat:
Hope this article wasn’t boring and brought more understanding of Prototype design pattern. Please let me know what you think about it!
Here is my Design Patterns Table.
July 22, 2010 TeamWork 10 comments
I’ve been writing e-mail to my co-workers, notifying them about changes I did in sprint backlog. Then I switched to people avaliability and continued about complaining why do we allocate only 6 hours per day for tasks and then did unexpected – shared my thoughts on being result oriented.
EMAIL:
[Something about my changes…
complains-complains-complains- sorry could not share them – complains-complains-complains – complains looks like “we have X hour for this and that where then other Y go?”]
I understand what you may think about me after this, but root of our being behind the schedule is our attitude to work.
I would like to see sprint backlog populated with tasks we really do and fulfilled to meet our allocation per day.
If we are agile team, that want to meet project success, why don’t everyone commit himself equally with others.
If we are professionals who what to achieve career picks and earn something valuable for our lives we need to be result oriented.
All my complains above could be discounted if we all want make customer happy and get it DONE. I want! And you?
Looking forward to hear from you?
Now I think about the consequences that my e-mail will bring. Indeed it looks like I’m too concerned about my project or either I’m emotional, since complained about those things.
Really would like to hear from you about your opinion on this.
Maybe:
I’m complaing bitch
I do not understand that people have other life priorities
I’m too young
I’m bad team worker, I need to start playing from other side
I should become lazy :)
This will have:
Good consequences and they will like my e-mail
Neutral
Bad consequences and will simply make barrier between me and them
Please share other variants, that is really something, I’m interested in to hear from you, readers!
July 22, 2010 AutoMapper, DevMeeting, Presentation, Success 12 comments
Today I performed developer’s meeting on AutoMapper. I would say that it went good, but I did not really enjoy it and will explain why. But I do not regret doing this presentation and will explain why.
Why am I upset of today’s presentation delivery?
Not so many people got interested in theme, that I’ve decided to present. There were about 10 or less developers in conference room. I really expected to have bigger audience and had prepared to speak to other division of our software business unit. But I believe there are some reasons why I did not get many listeners.
Few important thoughts for presenters that encounter the same
Never be disappointed by the number of attendees.. at least at the beginning, so this will not decrease quiality of your speach.
If topic of you speech is not really popular it doesn’t mean that you should discount its value.
If topic is indeed simple don’t neglect your preparations. For some reason I even wasn’t a bit nervous before presentation, as I’m usually are and I don’t find this to be good.
Take a look around, you probably will see those who are interested in topic and those who are simply excited by your presentations. Special thank to today’s attendees, without you I would have to talk to walls.
For future pay more attention on actuality and popularity of the topic. I personally going to create monkeysurvey to get that information.
With smaller audience you get more feedbacks. Why? Easily, they feel more relaxed and you have more time to allocate to each of them. In today’s presenation I got so many interesting questions and figured them out for myself and for audience online, while writing code. That was amazing.
Try to understand those who did not participate. Probably they counted to be more reasonable to spend that hour on some urgent issues or they discounted topic, since they are sure that will not need AutoMapper. And if they even will need it, it is quite possible to learn it in amount of couple of hours.
Still be proud of yourself. This is must be, otherwise you will lose confidence which costs a lot.
Presentation
For my presentation I’ve used already existing posts on AutoMapper, also for the end of presentation I had real world usage examples.
And here is presentation itself:
Don’t forget to check out my article on AutoMapper here.
July 18, 2010 Book Reviews, Certification, Fun 6 comments
Book talks on different Windows Forms related stuff. From the beginning it tries to teach me how to create simple forms app and add controls to it, but hey with my experience developing applications it is too boring. In advanced WinForms controls it talks on ListBox, TreeView, CheckBoxes and so on :) After so complex things it leads me to ADO.NET and how to work with connection Strings and how to even read data from DataReader. In advanced topics on Windows Forms Development it talks on how to create MDI application. OMG, i knew how to do them on my 3rd year in university. In asynchronous operations it talks on how I can use BackgroundWorker and even what is Thread and how to synchronize two of them. Maybe the most interested chapter was Deployment, at least because I never really used it either at work or in university.
But you know what is the most funny about all of this? – Possibility that I will not pass this exam. Why? – Because these entry ms exams are kind of exams for con. It require simple knowing of names of classes and functions. But on other hand I understand, that they couldn’t make it different.
You just need to read this kit to pass this exam, almost no way to do it different.
I understand that if you have no experience working with Windows Forms book could bring lot of value for you. For example, do you know how to create not rectangular button or how to print documents programmatically.
Fact that I read this book means only one – which I’m going to schedule exam for next Friday and spend my evenings trying tests from book, and maybe MeasureUp. Also researching over internet how to prepare myself fot it.
So, wish me good luck on passing this exam.
July 17, 2010 LvivNetUserGroup, Personal 4 comments
Being software developer is often pleasure, except of money it sometimes could even bring gifts.
VS 2010 Bag I’ve got at 3rd Lviv .Net User Group meeting. This bag isn’t really of good quality, but it brings me pleasure to use it, since now Visual Studio 2010 covers my back :)
Working Effectively with Legacy Code came to me from USA and I’m really looking forward to read it soon. It looks that this is going to be my first non-electronic book in English that I will read full-length.
Book on Silverlight 4 (also got at Lviv .Net UG) isn’t something that I hurry to read, because I’m sure that I will start with articles on Silverlight when I’ll get to it.
July 16, 2010 Fun 2 comments
Today Firefox asked me for update, of course I approved.
When it started downloading updates very quickly I got this picture:
Readers, do you see anything wrong with it? :)
I never thought that guys from Firefox could do such fun and stupid bug, but this proves that we all are human, still not ideal robots.