February 1, 2010 English, Success 5 comments
February 1, 2010 English, Success 5 comments
Point 6 in my Where Do You Want to Be In a Year? is:
“Improve my English skills to have at least upper-intermediate strong level (according to my company graduating)”
Previous Level: Intermediate
Last year my level was evaluated as Intermediate, but since that time I had a lot of experience of communication with native speakers. So I was pure much sure that my language is improved. I requested reevaluation, which occurred last week.
How was it?
I’ve drank too much coffee before came for my reevaluation, so my voice was a bit hoarse. Not a plus.
We spoke a bit, I mentioned about that I requested this reevaluation and why do I need that. Then she gave me feedback and proposed me to pass some test.
Feedback
Before test she said that my English level is not upper-intermediate definitely :( , and she explained why:
1) I repeated same words to much.
2) I do not use enough adjectives.
3) My speech is not fluent.
For upper-intermediate my English should be fluent!
Exercise for me
When I speak I should think not only about what I speak, but also how I speak.
Result
Current Level: Intermediate Strong
English courses
Also, I’m eligible for English courses in my company, so I moved to upper-intermediate course. This means that course could improve my skills to that level, of course if I’ll be a good student. I really need this study, even if it will be taking some time. I know that to compel myself learning that alone will not succeed. I’ve decided that course will help me with this just fine.
I’m on the way to have desired level of English, so will learn hard to have
Future Level: Upper-Intermediate Strong
January 30, 2010 MasterDiploma 1 comment
It’s time to start seriously work on my Master Diploma.
What about is my Master Diploma work?
In Artificial Intelligence we often use neural networks in try to simulate aspects of the biological neural networks. Applicability of these is very wide, it could be smart unit in some video game, or expert subsystem when diagnosis patient. Even your inbox e-mails are filtered with algorithm, which includes neural networks usage.
One great applicability of Self-Organizing Maps (one of the artificial neural networks) is possibility to analyze high-dimensional data, save its topology and translate it to low-dimensional representation which further could be easily analyzed by human brains.
For human being it is hard to work with dozens of input information for different aspects of one thing. For example 100 patients being diagnosing and for each we need 30-40 different measurements. SOM could easily classify data and for output with knowing of some existing diagnosis we can get “Patient – Diagnosis”.
I mentioned something like “with knowing of some existing…”. This means that SOM requires training, which takes execution time. If our application domain is something for military, time could be critical constraint.
In this work I’m going to significantly improve calculations of Self-Organizing Maps with introducing multi-threading improvements.
Project hosting
I already hosted my project with google code:
http://code.google.com/p/andriybudaydiploma/
Project is host for implementation of a parallel algorithm, purpose of
which is to significantly improve calculations of standard algorithm.
This is main goal of actual project.
This project represents Andriy Buday’s Master Diploma work.
e-mail me: andriybuday@gmail.com
What do I need to accomplish?
I need to ensure that I understand computations of SOM deeply.
Research over interned for similar works and take them into account.
I’ve decided to write my code from scratch, since I already have some implementation of SOM.
After I’ll have some implementation I need to analyze results I got on different systems.
Improve my knowledge of Java, Concurrency and train my scientific habits. :)
This blog and my Diploma
I was thinking about posting status of my work on Diploma on separate blog or site, but don’t want to have myseft scattered over different locations, so I’ve decided that just tag “Master Diploma” should be enough. I don’t think that it could make sense to hide something from the world or my co-workers or Customers (don’t even think they read my blog). And of course my Diploma is part of my Road To Success.
Please, wish me luck on this!
No doubt I will do the best to take my work to the breakthrough.
January 29, 2010 Design Patterns, Java No comments
Imagine that you have shop where your Customers could buy Laptops with configuration they prefer. You need to develop system which will allow you easily build any configuration of Laptop for any User.
How could you easily accomplish this?
Builder is Creational Design Patter which allows you build some whole Product (Laptop) by constructing together some parts like Processor, Memory, Monitor, HDD, Battery and so on.
So your employee talks to Customer and asks questions which memory do you want and so on. Or otherwise if Customer is not technic, employee could ask “Do you need this laptop for gaming?”.
So you need some steps to construct you computer and they are defined in Abstract Builder.
public Laptop getMyLaptop(){
return laptop;
}
//mentioned steps to build laptop
public abstract void setMonitorResolution();
public abstract void setProcessor();
public abstract void setMemory();
public abstract void setHDD();
public abstract void setBattery();
}
If your Customer answers like “Yes, I wanna play… play…!!!“. You already have implementation of Concrete Builder for gaming laptop like:
Or if you Customer is business guy and he watches presentations and exel reports in plain:
To manage steps to build your Laptop basing on the answer you need Director:
Here we have usage code.
BuyLaptop shopForYou = new BuyLaptop();//director
shopForYou.setLaptopBuilder(gamingBuilder);//Customer answered that he wants to play
shopForYou.constructLaptop();
Laptop laptop = shopForYou.getLaptop();//just get what he wants
laptop.print();
Output:
Easy, simple and great pattern.
What have I learned regarding of Java?
Nothing special, just how to format strings:
January 29, 2010 Book Reviews No comments
Domain Driven Design by Eric Evans is one of the books that every architect must read if he wants to develop really extensible enterprise level application, which absorbs knowledge of the problematic domain.
Book talks about Ubiquitous Language which is the language between Domain Experts and Developers and helps them build model of the application.
Once you have this language you could easily start build your model with Entities and Value Objects, making Associations between them and other elements of the system. Then you use Services to apply operations on your domain. To interact with Infrastructure you need Repositories and Factories, this makes Persistace Ignorance Layer to hide and isolate your model from technical impacts of your infrastructure.
Refactoring Toward Deeper Insight plus Distilling of model takes your system to the breakthrough. If you have clear model, future Developers could easily work with it addin new functionality and speaking with Customer on common language they will know it, because code raises it to them.
This is one of most valuable book I’ve ever read!
January 29, 2010 Errors, NHibernate No comments
Error:
I had something like this in the SaveCustomer method:
And this don’t work correctly. Simple change to
resolved my issue.
January 27, 2010 Deployment, Errors 2 comments
I got error which says “MyApplicationName has stopped working” once deployed simple tool application to the deployment machine which is MS 2008 Server.
But application works just fine on my Dev Machine.
I took a look on event viewer and it says:
Problem signature:
P1: myapplicationname.exe
P2: 1.0.0.0
P3: 4b607991
P4: MyApplicationName
P5: 1.0.0.0
P6: 4b607991
P7: 83
P8: f
P9: System.IO.FileNotFoundException
P10:
It looks like something I was referencing is something in the framework that wasn’t installed on the server.
But what?
I remembered that when worked with UI I inadvertently took some thing from ToolBox. I immediately removed that thing, but REFERENCE were left in projects references.
It was Microsoft.VisualBasic and Microsoft.VisualBasic.PowerPacks.Vs.
Moral:
Once you get errors on deployment machine check carefully if you haven’t referenced something that is not needed. And remember about Event Viewer.
January 27, 2010 .NET, Frameworks, MEF 4 comments
MEF is the Framework which allows you to load extensions to you application easily. It does discovery and composition of parts you need to be included in your application at run-time. You could extend your behavior simply with adding new Plugin. Managed Extensibility Framework will do everything for you.
Hello MEF World!
Assume we have really simple application and we want it to say “Hello MEF World!“:
That is absolutely how this look and we want to make this work. The main issue is to have instance in property ProgrammGreeter to be real instance of Greeter.
Lets accomplish this with MEF
In order to do this we need to include reference to System.ComponentModel.Composition.
Accordingly to MSDN: “MEF is an integral part of the .NET Framework 4 Beta 1, and is available wherever the .NET Framework is used. You can use MEF in your client applications, whether they use Windows Forms, WPF, or any other technology, or in server applications that use ASP.NET. In addition, there are plans to add MEF support for Silverlight applications.“
Most likely MEF will be included into .NET Framework 4.0, but for now we could download it from codeplex site here.
Once we added reference we could add Import and Export attributes.
Export stands for exposing some capabilities and Import stands for dependency on some other capability.
Our Greeter provides some capabilities so we add Export there:
We want to use that capability in our Programm class, we depend on that functionality. Add Import:
Usually our capabilities lives in other asseblies, but also they could live in called assembly. Anyway we need to say how to compose all our dependencies to MEF.
This could be done with method Compose which we be calling before we are using capabilities, usually at the start of app:
I ran my application and got:
How does Managed Extensibility Framework work?
I think that you are bit concerned/confused regarding that Compose method. Just read comments in code of Compose, which I made more detailed:
In Managed Extensibility Framework there are primitives called ComposablePart which holds extensions to your application grabbed from Catalog. But also it might be that they have Imports which also needed to be composed.
Take a look on this picture from Managed Extensibility Framework wiki page.
More complex Example
In this example we will have application which parses XML file (contains information about some developer). Then when we want to deploy our application to Clients we want that XML to pass some rules, but they could differ from Client to Client. To accomplish this we put rules into separate dll and will work with it as with plugin.
We have two assemblies:
Like on picture below. I simply don’t want to bore you with explaining of Rules logic. If you want sources just ping me.
Our Programm class wants to load rules from other assembly so we put Imports.
As you noticed we are using ImportMany, name says for itself.
We need to change our Compose method to search for Exports in Directory where execution assembly is located. For that we use DirectoryCatalog.
Put those dlls in one folder, and run MEF.DEMO. You will get:
The goal of MEF is to seamlessly glue together classes which import services from other parts of the application, and some classes which export those services. You could say that MEF is like DI container. Yes it has a lot of it, but Managed Extensibility Framework is concentrated on composition. And that composition could be done at run time at any point of time you want that to happen. Also you could do re-composition whenever you want to do that. You could load capabilities with Lazy technical or add some metadata to your exports. Discovering of dependencies in Catalog could be done with Filtering.
Managed Extensibility Framework is great feature, that Microsoft added to .NET 4.0 Framework.
January 26, 2010 QuickTip, UI, WindowsForms No comments
Do you want to see your button to be in pressed or unpressed state when you hit it once?
Did you catch that this behavior is not really button’s behavior – it is more checkBox’s behavior.
So to accomplish your goal you need move checkBox to your form and set appearance from “Normal” to “Button”. Like here:
Kick me if you don’t want to see such posts on my blog. :)
January 26, 2010 Opinion, RandomThoughts, Success No comments
I have 18th post this month that is more than in past three months. This means that I increased frequency of posting and I think that did not lost quality of its content. What do you think?
I think I’m good on this. I also increased amount of blogs I read (near 30).
Why do I think that blogging helps me?
To get more readers I need to have some certification that my blog is good to read and this could be reached only if I will continue learn something.
I also found one interested post where guy explains why Why Blog Post Frequency Does Not Matter Anymore. Yes, but my blog has defined content boundary and my posts are not something like posts on twitter, so I believe that it will lead me to Success.
Honestly I think we should see people in light of theirs attitude to something, but not in light of theirs knowledge of something.
Leave your comment with link to your blog. I will follow you immediately. ;)
January 25, 2010 Design Patterns 3 comments
Generally saying Specification is a predicate that determines if an object does or does not satisfy some criteria. By using Specifications you could easily recombine business logic together using boolean logic.
Have you ever thought that bool TryParse(string s, out int result) could be seen as some pattern? Yes we could talk about this method like about specification of integer represented in string, and this is validation usage. This pattern also could be used not only for Validation, but also for Queuring and Building purposes.
Let us imagine that we need to validate if some Patient is eligible for drugs procedures at home provided by nurse.
So this we will need two specifications. If they are both satisfied we could say that this patient is eligible for drugs procedures at home.
First specification
}
Second specification
As you guess ISpecification interface looks like:
Usage could look like:
You could say that we can put all verification in our method FetchPatientsForVisitWithDrugs. Yes, but this is not right way, because your specifications could be used in different locations and also if see this from DDD perspective you always need to bring concept things into the light.
Another question: Don’t you see this systax
if(drugsSpec.IsSatisfiedBy(patient) && nurseVisit.IsSatisfiedBy(patient))
to be boring systax? Yes, especially if you have many specifications.
Let us improve our design.
First we will add some methods to our interface like here:
}
And also will add CompositeSpecification which will be abstract base class for our two existing.
Let’s move to our existing specifications and how they changed with our new design:
}
This all gives us ability to have build specifications quering in more sweet way.
New Usage
Now we work with this new specification as with simple single one: if(specification.IsSatisfiedBy(patient))
With other specifications like OrSpecification and NotSpecification we could build more complicated queries.
For example I will show some possible usage of this in Nhibernate:
Advantages of the Specification: