November 1, 2010 Opinion, SQL 6 comments
November 1, 2010 Opinion, SQL 6 comments
Today I’ve been on technical meeting where TSQLUnit was discussed as approach of testing database.
From what I understood it looks like this is very powerful and great tool for testing stored procedures and other execution code inside of SQL Server. It allows easily create setup for each test with minimal database schema, needed exactly for some particular stored procedure. After test got executed it rolls back to state before running test. Cool!
From my point of view this is really good thing to test stored procedures in isolated environment, as any good UT does with testing code. There is also question about integration of those tests with changes in real database and one great mind have produced using schemabindings in SQL Server.
It should be also possible to integrate TSQLUnit with CI by using NAnt.
Why?
There is only one thing I kept in my mind and did not talk about it during meeting. It is question: why do we still write lot of stored procedures? Yea, I understand that sometimes they are really needed and that there are some reporting projects that might require fetching lot of data at once. But during the meeting it looked like guys are going to use it for many other projects. Hm… From my point of view, this kind of tests should be written in regular programming language, executing some code and fetching needed data as it will be used further, after roll-backing inserted data – therefore we have integration tests. All them should run separately. And as per me this should be fine unless you have logic in database – I agree, that in this case we have to come to some database testing tools. Why should we have logic it in database unless there are some special requirements?
I still feel a bit frustrated, because for me it is quite hard to answer for the question of having logic in code or having some heavy portion of it in database. I vote for first variant, but maybe I do not have enough experience to understand why it is great to have logic in database. Who knows?
What do you think?
November 1, 2010 DDD, Opinion, PublicTalks, Success No comments
I had chance to speak at yet another Lviv .NET UG meeting. This time I spoke about Domain-Driven Design. It looks like people got interested in this topic.
You can read my feedback post about this event at Lviv .NET UG site by the link “Зустріч #7. Враження, враження, враження…” (it is in Ukrainian).
I will write almost the same here and add some own opinions, so it would be interested not only for those who doesn’t know Ukrainian, but for those who would like to hear my personal opinions.
How it was
It was really great that we’ve got more than 80 people registered for this event. And if company where we hosted this event would provide us with bigger meeting room, we would probably have over 50 near 60 people attending. So as you understand because there was lack of physical room some people just turned around and went home. Crap! I would love to have them all listening to me.
Getting Scrum
Event has two speakers, me and Igor Racyborynsky. Ihor talked about “Getting Scrum”. We all played scrum and formed following product backlog:
It was really interesting, at least not as usual presentation. But he has not covered all about the scrum and at least key concepts. Although it went extremely good.
Domain-Driven Design
I talked about Domain-Driven Design for the 5th time. Yeah! I even don’t need any time to get prepared.
It was late in the evening, so many people got tired, especially me talking over 1 hour bombarding with new and new terms and mentioning lot of information about known concepts and patterns.
This time I’ve got many different cool presents:
Do you know what I like about delivering presentation to huge audience? – I always get couple of people that are excited about my speech and interested in my. They then come and talk with me as I’m an expert. I feet bit scary and nervous to show that I’m not that cool :)
Beer
As usual we have small beer party in the end. This time it probably wasn’t that small. You decide:
Speaking at JUG about DDD
Today I was invited to Java User Group meeting to talk about DDD again. Thank you guys.
October 17, 2010 Career, Opinion, Success No comments
Job and happiness
Cheese
Money table
You can put as Deposit | MDeposit (e.g. 10000) | -be honest | |
You need per day | PerDay (e.g. 100) | PerMonth=PerDay*30 | -calculated |
Per day to be happy | PerDayHappy (e.g. 500) | PayMonthHappy=PerDayHappy*30 | -up to you |
Ave. bank interest | InterestRate (e.g. 0.12) | MInterest=YouHave*InterestRate/12 | -depends on banks |
You are safe: | YouAreSafe=PerMonth*6 | YouHave > YouAreSafe ? (“you are more or less in good situation”) : (“Hey man, do you think about the future?”) | -if you do not have enough to live half a year, something is definitely bad with your budget |
You can live without need to work | YouHaveEnough=PerMonth*12/InterestRate | YouHave > YouHaveEnough ? (“you can stop working without impact on your life”) : (“it is too hard to reach this since needs often increase ”) | months you have to wait to reach this goal:(YouHaveEnough-YouHave)/(MDeposit+MInterest) |
You are free, or even rich | YouHappy=PerMonthHappy*12/InterestRate | YouHave > YouHappy ? (“hey! you are rich”):(“almost none reach this, since they start spending too much when they have enough”) | months you have to wait to reach this goal: (YouHappy-YouHave)/(MDeposit+MInterest) |
What do I recommend to help you find out if some job is for you?
Job of my dream
Questions:
Also I was looking for some other good lists of questions. One is more general and other is awesome list of questions from stackoverflow.
Awesome questions list from stackoverflow
Here below in dark-blue is complete list of questions composed by Rob Wells on stackoverflow. This is copy-paste (!). All rights are reserved for stackoverflow and I do not pretend to be author of any part of it. Please follow this link to see original question.
Questions for development:
Questions about estimating:
Questions regarding the team:
Questions regarding personnel type policies:
Questions about management:
For the manager:
Then I ask them to answer the same kinds of questions for the company as a whole, explaining that I consider there’s such a thing as a company “personality” that usually emanates from the top. I ask how that has changed over the years (if they’ve been there very long).
Further questions on management:
Questions on the work environment:
Miscellaneous questions:
Hope you liked this blog post. Looking forward to hear from you guys!
September 26, 2010 C#, Design Patterns, Java, Opinion, Personal, Success 12 comments
Yeah, title sounds not logically, but you will understand in a few why it is still relevant to this blog post.
It was and it is a good idea to…
In one of my blog posts I’ve decided to have all of the GoF Design Patterns written with Java. And idea itself is very good. Having all of the design patterns written by your own with you own examples gives you understanding of the DP that you cannot gain anywhere else plus to that if you have industrial experience of using all of them you can start think that you are guru of DP.
Process of writing my post on one of the Design Patterns looks like this: I read chapter of the GoF book on the particular DP, then I think up my own example if I do not have it already in my mind and after I’m done with some preliminary ideas I search over the internet for interesting articles on it and probably rethink some of the aspects of my example. After all of that I proceed to writing blog post and source code with Java.
Conclusion: Awesome and probably one of the best ways of learning DP is to have your own example of using it and industrial experience.
Design Patterns articles
One of the intents of having DP written in Java was to familiarize with that language. But it turns out that I did not learn much from Java (except of few things). Also few months ago I started keeping up Tuesday’s Design Pattern on the Lviv .NET User Group Page. Since it is .NET specific UG, I used to do following: 1) translate and 2) translate. In first place it is translation from English to Ukrainian and in second from Java to C#. When with item number one I have to apply some logic and rephrasing I cannot say the same about second item. I just copy code-paste code into Visual Studio and change few keywords. So what do I learn regarding of Java in this case?
I will continue learning Java, but I have to consider better way of doing it. I will also continue writing about Design Patterns, but with examples in C#.
Conclusion: Learning another programming language (Java) is really great idea, but be sure that you choose right approach of doing this.
First free e-book
On the road to Lviv I got perfect idea to start my first book. Of course this cannot be comprehensive stunning author’s book, but I have to start with something. In other words some probing book and this could be this “try it” case. I’m almost sure that there are no books about GoF Design Patterns in Ukrainian. (I suppose that there are in Russian, which can be easily understandable for most Ukrainians…)
How this book will be different?
Why do I need it?
I understand that this book might not be popular at all. But I have to start with something and plus to this it will help me familiarize with the whole process and build my confidence for future.
Also if you have some doubts about my idea I have a question for you: “Have you ever dreamt about your own book? If yes, do you have at least small book written?”
Conclusion: Never be skeptic about starting your first book. It might be a huge step to your success as anything else you are hesitating about but still dreaming about it!
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
August 12, 2010 Career, CI, Opinion No comments
For today it was planned to learn SQL and Continues Integration. In this blog post I’m going to express few thoughts on Continuous Integration. Only thoughts, because you can read comprehensive articles on it over the internet, like this one written by Martin Fowler.
My definition of CI:
I took picture somewhere from web, since I like how it illustrates CI |
Few main suggestions on introducing CI:
And some thoughts about blind architectors
When, I came to the project and I faced lot of difficulties that project had, like having sources under different repositories, having not automated procedure of builds, also when someone failed build, everyone knew about that next day and all QA work was stopped; lot of complains about merging sources; dry applying sources to diff versions procedures. None knew what is going with project till next day! I was junior at that moment I did not know about CI, but, hey where our architects have been? Thanks to efforts of new fresh architects we’ve got CI and it applies to our project very smoothly. What is left is to convince devs do committs more often and cover everything with Unit Tests. (But that has also something to do with our project specifics.)
Why didn’t they consider introducing CI earlier? This is mysterious question, I do not understand. There should be definitely something significant (like CI) that we can improve!
Since each software company wants to develop into huge one and be evident player in the IT industry, managers work on improving skills of the personal. For not English speaking country, as Ukraine, it is quite critical for the employees to know English well. That is why many companies are investing money on creating English courses.
Half of the English courses, I’m attending are left and I would like to provide some feedback that can be useful for my teacher, for people who are attending courses, and for anyone else who is working in outsourcing software company in non-English speaking country.
I’ve been attending regular Upper-Intermediate course for about 4 months and I see many advantages of it, but classes do not bring as much value for my work, as I’m expecting to get.
Difficulties
Why don’t classes bring enough value for my everyday work?
First and the major reason is that subject of our studies is completely unrelated to matters we are encountering during daily work. For example one of the latest chapters of our student’s book was “Literature”. For me it was the worst chapter in that book. I’m not keen on literature, so maybe that is the reason why I was so much bored with that chapter. Maybe, but if we take a look at this from other side asking ourselves question “Which value does chapter about literature can bring to software guys?” my statement about that being worst chapter doesn’t look ridiculous. Except of some out of the common situations, like dinner with client or library software solution, literature topics bring small value. I do not say that it is bad to have such topics; I say that to some extent it is waste of time which could be consumed by learning other more interesting stuff.
Gap between engineers and English teachers
More over I think that I understand why this gap exists – because people who created study books are from another life area than software guys are. They are academic guys, they write articles and some fiction stories. On another hand we have software engineers who develop programs and discuss them, who look bit prosy for others, but we know what we know.
For example, I often watch different programming video. Guru speak about new frameworks coming soon, about mature approaches to building software, they show best practices and design patterns. Surprisingly I understand absolutely everything from their speech (maybe 1-2 words per minute missed). Why? Because they operate with words and terms I’m using in everyday work and because I’m interested to hear things they say. On one of the lessons we had listening practice, where guy talked about the train in Asia, and how some lady brought insects on plate for eating and about wooden sticks and bla-bla… Question is: why on earth I need this?
Advantages, Improvements, Thoughts…
Is everything so much bad?
No, of course, no! Main point of my previous paragraph is that classes are not 100% concentrated on needs of software engineers.
These classes bring lot for my general understanding of English Language. I now feel more confident in using perfect tenses and different grammar. Classes are great revision of the grammar, that you learnt at some time and then have forgotten.
On my previous Performance Appraisal I got remark from client, that my English has improved. I should thank my company for giving me opportunity to learn English.
Improvements to regular courses that I see are:
Have brief review of the upcoming topics and find out if people are interested in them. If not maybe it worth to provide one-two lessons that do not belong to regular course, like one lesson of “listening & speaking” one lesson for grammar one for video, after that proceed with further chapters. Get feedback from people. Btw: I really appreciate, that my teacher asked for feedback. You rock! I know that feedback is the most reinforcing way of improvements.
Course I’m attending is comprehensive (learnt this word at classes :)) set of activities, but I would really like to see more speaking. Make people speak more, and provide feedback on that only after person finished. I would like to see it more regulated. Make everyone speak.
Make some friendly-competitive environment. I’m kind of person who would like to win some rewards, like “Best presentations deliverer”. For now I would win only “Most Thursday lessons missed” – 9AM is too early for owl.
Have some home activities that differs from usual, like ask for watching some film and provide review for the students. Or simply let people introduce and explain their duties in company. That should be interesting.
Additional learning is needed
As per me it is required to work on English by your own and simultaneously attend classes. How does it work?
English teachers are the best in their understanding of grammar. Particularly my teacher can explain tenses just terrifically. Your everyday work doesn’t require complex grammar to be used, but nothing restricts you from doing that. Simply start listening to your clients more attentively and catch the smallest matters they say. Write more clean and sophisticated letters. Now you have theoretical knowledge, go and use.
My list of activities I do for learning English:
Conclusion
English classes are definitely needed for the software company. And I really enjoy attending them, but hate that they suck time that I need for my sleep and dislike that they are not software-related, but I try to understand this. I see some improvements, biggest part of them are applicable to our courses, but not necessary near to wishes of other students. As always everything depends on your desire to work, so I have my own list of activities I do for learning English.
Please let me know your thoughts about said above.
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.
May 9, 2010 C#, Java, MasterDiploma, Opinion 4 comments
Is CLR worse than JVM or it is just because my code is bad?
Today I had conversation with one man, who is great defender and evangelist of Java related technologies.
We talked about some algorithm implemented by me with C#. That is implementation of SOM algorithm and Concurrency stuff for it. My concurrency implementation doesn’t show time improvements unless grid size is big. He was able to achive better result with small grid sizes.
There could mean two reasons:
Taking into consideration that I’m getting better results when grid is of bigger sizes I could suppose that in my algorithm there is code which takes constant (or near that) time and is not paralleled.
When I look at picture of Task Manager when my programm is executing I see that second processor has gaps when it does nothing:
This could mean only one: I need to take better look what else is executed in one thread in my application and could be paralleled.
Converting C# code to Java
But back to that man and Java. I said to myself that it is possible to move my code to Java if something.
C# to Java Converter
Download C# to Java Converter demo version from here. Since it is demo you could not convert more than 1000 lines of your code. Order costs 119$.
Because of that I was forced to remove all not necessary code. I removed all concrete classes that I’m not using and GUI, but that did not help. I did not know how much should I delete more.
Number of lines in my project/solution
I googled for line numbers in C# and found this nice tool:
Now I know that my program has about 4000 lines of code. I left about 980 lines of code in two projects that I needed and was porting them to Java separately.
Converter GUI
And converted them to Java:
Is conversion an easy task?
Conversion could be painful if you have a lot of code that interacts with system, like threads, reading and writing to files, reading configuration file, etc.
Also it was not able to recognize ‘var’ keyword. It shows me this:
I moved back to my C# code and changed all var to the explicit types. And regenerated Java code.
There were some troubles when I’m delivering from List<T> and doing some stuff around that.
This code:
I rewrote manually to:
Also Converter was not able to convert this:
The biggest challenge is ThreadPool and synchronizing threads tech-nicks. This requires lot of google search that shows me that instead of ManualResetEvent I could use CyclicBarrier and how to utilize thread queuing in Java.
P/S I need to find gaps in my code to show that at least CLR and myself are not so much bad things in this world :)