Wednesday, November 28, 2007

Mysterious ### signs during Work Items export to Excel

Several of my co-workers have run into the problem of exporting work items into the Excel 2007.  The problem was/is during the export of HTML type fields (like description) in some cases they have gotten #### instead of actual words.

image

There is a forms post that have one of the permanent solutions listed, but I found a workaround to the problem or at least temporary solution by formatting the cell/column.

option 1:

I have selected "Format Cells" -> Number -> Custom -> General -> OK

and the final result is:

image

option 2:

alternative approach, if one knows how to use new Excel ribbon menus would be selecting cell/column and: Home ->Style -> Normal to reset the style and to re-enable wrapping: Alignment -> Wrap Text

So what is the moral of the post? Lets stop blaming TFS and start learning on how to use Excel  :)

Tuesday, June 5, 2007

First Impressions of Tech Ed 2007: Process + Quality + Agility = Success

Key note presentation by Bob Mugila was pretty entertaining, "Back to the Future" skit was great. I like the message presented by Bob, he had mention that IT is a big pendulum that swings from what is the important at this time, and three key pilars of it are: process, quality, and agility.
From my working experience, I can totally see it. When I started to work at one of my old companies it was all about process, it was driven into my head "RUP this and RUP that", we need to have a process in place on how to take a lunch prior to taking it. Shortly after I have started to dream about the process in my sleep, the company took a turn into a new direction, that can be summarise as: "we do not care how you do it, but it must be done with 'high' quality and bug free!"

What I liked about keynote presentation is that for us to succeed, we need to do combination of all three. The idea that if you have a process in place, we can improve the quality of work (simply by doing what we do and examining the history) and of course if the process is flexible we can achieve agility without sacrificing the first two. It totally make sense, that combination of 3 is what will make any company successful. Interesting observation that at my current company we are taking the position that: process, quality, and agility is truly a single driving force/foundation to the success.

Sunday, April 22, 2007

Test Driven Development & Visual Studio Team System

Recently, I was given an opportunity to give a presentation on TDD and how one may use VS2005 to accomplish this task. During the presentation I have used a standard Microsoft presentation on TDD and VSTS.
During my presentation I showed several examples on how to author: unit test, manual tests, load tests, web tests, database unit tests (stored procedures), and ordered tests. We have looked closer at: Test Manager, Code Coverage, Code Analysis and how these functionality integrates with TFS. The sample solution containing all the code can be found here.

My final thoughts on testing in VSTS:
1. Visual Studio Team System makes testing easy, great auto-generation tools allow one to generate all the plumbing without any hassle; it also provides a starting point for learning how to create tests.
2. With an exception on Windows Forms UI tests VSTS allows to generate tests that will cover all the aspects of the development and testing.
3. 100% Code Coverage does not mean that the application is bullet prove, it should be used in conjunction with Code Analysis to identify if we are comfortable the number of tests.
4. all written tests should be used in regression testing, once we start to modify existing code.
5. We have "white tests" written usually by developers that deal implementation and technology details; and "black tests" written by testers (QC/QA) that deal functional requirements of the application.

An interesting thought: From the tester's point of view we need to create a "time line". For example users does something in the system, system does something in response and based on the those results user does something else. For example user creates a task, task's work flow/state triggers additional email notifications that may provide user with additional information.

So what is the problem? The problem is that we are violating several rules: Unit Test must be simple and cover small portions of the functionality and all Unit Tests must be independent of each other. My current solution for this problem:
1. use multiple asserts in the test and
2. group relevant tests in Ordered Test.

Any thoughts on it?

Monday, April 9, 2007

ORM:1, Hand Coding:0

By definition I am lazy, I love using tools to reduce my workload. Object Relational Mapping (ORM) is one of those tools that I can not live without.

Several projects ago we decided that it would be better if we generate at least 85% of persistence layer automatically, but still would have control of how and when do we use ORM. NHibernate was our choice of the ORM (at time it was beta 0.8).

So why does ORM rule? Well, I would like to share a great story on how we were able to leverage NHibernate. On one of my current projects we are using NHibernate (1.03 beta) to generate the persistence layer for the use with Oracle 10G R2.
As we were reviewing and finalizing the requirements for purchasing production hardware and licenses, the client’s newly hired CIO, asked us: “why do we need to have both Oracle and SQL Server?” Of course we answered that: “we are using Oracle because it is your preferred choice of database to persist application data. SQL Server is a requirement for the BizTalk 2006, which we are using as a middleware server.”
The next question was: “What will it take to switch to SQL Server completely?” I should mention this conversation took place half way through our development effort. Our response was: “since we are using ORM to abstract the database from the application, it should only take 54 hours.”
Here is a list of tasks we had to do:
1. SQL Server Setup (Total Effort: 4 hours)
2. Database Conversion (Total Effort: 24 hours)
a) re-create 135+ tables from the Database Definition Language (DDL) scripts;
b) make unit conversion updates like: Change VARCHAR2 to VARCHAR, CLOB to VARCHAR(MAX), NUMBER to BIGINT, NUMBER (1) to BIT/BOOLEAN
c) update defaults, identities
d) update naming conventions
e) update DDL Script that generates triggers
f) update 5 stored procedures and functions
3. Code Updates (Total Effort: 10 hours)
a) Update the NHibernate XML Mapping files (82+)
b) Update the method that calls stored procedures
4. Regression Testing (Total Effort: 16 hours)

As soon as we got the green light from the CIO to go ahead and make the conversion, our DBA and Lead Developer spent one week-end making the conversion. It surprised me that our actual implementation time was 55 hours, and most of that was spent in data conversion (32 hours).

So on the following Monday, one of developers had a shocking experience. In the morning he was working on one of his features that required saving. Typically, he would open Toad to view the table he was saving to, in order to verify the results. According to him, he was getting pretty mad, because a simple save feature started to look like a nightmare. He would type the values on the form, click save, get no errors, go look for the results in Toad and see no changes in the table, sol he tries to reload the form/restart application/visual studio/computer and see that typed values are loading back, while still not showing in the database. How can you troubleshoot a problem like that?
Luckily, we have "Daily Stand Up Meetings," at which everyone gives updates on items they are currently working and have completed. So as the news of the database switch were announced, you could clearly hear swearing from the developer. Mel, feel free to add to the story.


In the end:
- listening to the boss on why we should be using ORM is 0.0001 man hours,
- choosing an ORM is 40 man hours,
- crash learning NHibernate is 80 man hours,
- getting comfortable with NHibernate is 160 man hours,
- switching database during the development without developers noticing is PRICELESS!

Saturday, January 20, 2007

Josh and Brian get Codemash style haircuts!

At our first Codemash convention, Josh Holmes made a bold statement: that if by the end of the conference we add 500 blog entries on the topic of the CODEMASH, then he will shave his head.
Brian Prince up the ante to 600 entries for his hair removal.

Josh and Brian on day one of the Codemash:



and this is them at the closing note of the Codemash



In case you have missed the hair cutting process or really want it to see it again, based on the people's demand, I bring you ... What 600 blog entries can achieve!

Friday, January 19, 2007

Codemash - what i got out of it

In several sessions I have heard speakers talking about of what we are getting without knowing how to get concept. I feel there is a trend to abstract/simplify programming, we are getting tools that will allow us to concentrate on getting WHAT we need, and letting underlying framework to figure on HOW to fulfil the request.

This will allow us to take advantage of the hardware (multi-cores) and framework changes.

For example, if we need to loop through the list of cities and do something with result(s), if we use 'for', we are stucked with a single thread.

foreach (City city in cities)
if (city.Name == "Columbus")
whatever

but if we use LINQ, even though it does not use multi-threading right now, he are not programming on HOW we are getting the data, which leaves framework for the future evolution to make a smart decision on how to get those cities for us:
var results = from city in cities
where city.Name =="Columbus"
select city;

Codemash, QSI Party

I think QSI party was a great success. I had an opportunity to talk to a lot of people, and again take a few snap-shots, see them at flickr (codemashqsi).

ps
Just trying to see Josh and Brian with shaven heads.

Codemash Networking

No it is not about Brian's presentation.

So what is the networking, well it is as simple as a group of geeks getting together in the water park. what should you expect? find out for yourself at flickr (codemashnetworking)

I now do have an answer to a mind boggling question: can a Midwest developer surf?
see it for yourself "Codemash Networking".

Codemash, Day 1

First day was awesome, I continue to help with running the conference. I have enjoyed all sessions I have attended, some of them have confirmed that what I am doing is "the right thing". I also saw a few new angles/perspectives from other technologies.

My thoughts on DSL, we all use it everyday, probably the most common/broad would be the language itself; obviously my English DSL skill can be improved :), but if people can understand me, that is good enough for me!

Anyway, more pictures from Codemash Day 1 event, can be found on the flickr you can use codemash or codemashday1 tags to get to the pictures

Thursday, January 18, 2007

CodeMash, Day 0

Day Zero of CodeMash is over! I felt it would never end, I helped to setup and run the registration for it. If you have a chance you should check out the cool WPF check-in application that was written for this event by Brian, it took him only a few hours. Obviously, not without errors, I spent several hours chasing the tail to figure it out, what in the world "User login is not part of the trusted connection", we can run the application to look up the data, but we were not able to update it; in the end it was a simple mismatch between database column name and the application field.

Anyway I have uploaded "CodeMash - Day 0" pictures on my msn spaces and a copy of them is loaded to flickr with tag "CodeMash"