Ideas and Coffee at 3.47 AM
Some half baked beans... Tao, Zen and the art of converting coffee into ideas...
-
NHibernate...
Well this blog is not really an original one... I just read about a really cool tool and I want to remind myself that I need to research it one of these days... its about NHibernate...
-
SQL Cache Dependancy
During my interview for the next project, I was asked a question. How would you refresh the UI on a page or a cache as soon as the data in the back end database changes (seems to be a very common interview question these days). The best answer that I could come up with at the spur of the moment was the observer pattern.Since there is no way that one could send back a signal from the database to an application saying "I have changed", the only thing I could think of at that moment was to implement the subject in the application itself. I thought at that moment that the subject would be something like a windows service that would keep an eye on the database and when the data changes, it would notify all the observers which in turn would either refresh the cache / UI or ask the right component to do so.I was not convinced though that this is the best solution and did a little research. Well it seems that they have come up with a cleaner solution in ASP.Net 2.0. In fact Dr. Dobb's Jounal had an article about it. ASP.Net 2.0 supplies a class called the SQLCacheDependancy that inherits from the CacheDependancy. Check it out... -
Smart People
I have been thinking that it is kinda impossible to work on something intellectually challenging in a consulting company... There are no. of factors that work here. But mostly it is because they treat the product like someone else's product. Like you are driving someone else's car. You would take care of it because you don't want to damage it when you return it. But you wouldn't love it the way you would love your own car that was bought out of your own hard earned money. Usually the focus is on profitability and even though they understand at the higher level of management that quality is going to get them more deals, at the lower levels (tech lead, developer and manager) the focus is mostly on on-time delivery and profitability by faster returns.
Also there is always a dearth of people and so they recruit below par people and then the below par people stick around for so long that they eventually get promoted and since they are promoted and expensive the company wants them to work on high risk and responsible stuff like architectures and management. See where I am going with this...?
What happens in the process is that quality suffers. I have literally heard people ridicule writing test cases in code, saying, "Writing code to test my code is a waste of time. If I have that kind of bandwidth I should write more production code instead".
There is this great article that says that smart people hate non intellectual work. It is extremely difficult to get a smart person do a mundane job. And a smart person doing a stupid job actually makes him stupid. Smart people usually like to work with the best tools and technologies and they like to do something that is intellectually challenging.
For once I would like to work with really smart people on a project that is really intellectually challenging. -
Where did the Web Controls Library Template go...
I have installed the Visual Studio 2005 Team System, the 180 days trial version on my machine. But I can't see the Web controls library template there. I do see the windows controls library there but no Web Controls Library template. Is it because it doesn't ship with the 180 days trial version?
-
I wish I wouldn't test...
Have you ever noticed, as a software project comes to an end, you will see all the developers in the same state. You will see long beards, long faces and long groans... All the developers would be in the same state for one reason. They would be doing the thing that they hate the most. Testing. The QA team would be breathing down upon their necks, the client would bebreathing down upon the necks of the delivery guys / engagement manager, there would be a lot of fatigue because all the developers have been working on the same project for a year or so depending upon the complexity of the project. Defects keep appearing on modules that were developed over a year ago… Some of the developers are even new who are providing maintenance to code that has been written by someone else… And they complain that the guy who wrote the code was an imbecile… And eventually everyone just keeps praying as to how you can get over this project, get released and start off something new…
What do you do about it? I have been wondering… how do you make the last couple of months’ experience interesting? Well most of the last few months of any project are dependant on QA. Now that’s what the developers hate the most. And that’s what they are expected to do towards the end. Wouldn’t it be great if all the dirty testing would just go away…? Well it wouldn’t go away, but we could surely automate it… when I say automate, I do not mean the automated testing tools that are available… that’s the QA’s work to use automated testing tools to test the build. I am talking about automating the testing that the developer has to go through before releasing it to QA… One thing that developers do not mind doing is code. So why not do something in a good way so that the entire QA Experience in the end becomes pleasant.
Build an NUnit framework right from the beginning. Doing this from the beginning is a very good idea. Reasons? The energy level is high, the deadlines are not very tight and everyone has enough bandwidth to just do it. Once we have completed 1/3rd of the project, things start getting a little tight… this is the time when the team lead should kick in some discipline. A module shouldn’t be considered complete until the test cases are written. The leads should also consider the time to write test cases in their estimates.
By the time 2/3rd of the project is done, most of the unit test framework is ready. Now where this helps is that once you have changed some code or added some component, you can run the tests and make sure that nothing that has already been written and was previously working has not broken. That way we don’t have to test every little piece of code that has been written since God created the heaven’s and the earth… well 10 months into the same code and it does feel like that…
Last 1/3rd of the project, three things happen… one people will realize the merits of writing tests. Second people will get habituated to writing tests and third the frequency of new tests would decrease.
There is more automation that can be brought into development. But this would involve writing utilities and using over the team… utilities which are custom… like to test a particular scenario you require a specific set of data in the database. And there are so many such “scenarios” that you need to test. We could broadly classify these scenarios, and write SQL Scripts to generate a set of data that would enable the testing. Write a simple crude utility that could give you a choice to choose a classification and create the required environment.
In fact I was thinking could I create a generic framework that would enable me to automate such mundane tasks across projects and make software development exciting… If work is exciting, quality would most definitely follow… -
Migration to Studio 2005
This whole episode of code synchronization (refer to previous blogs) actually made me start thinking about migration once. And I looked up the msdn and googled for it. The interesting thing is that I didn't find anything significant on Migration strategies to 2005. There is one age old article at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/cominterop.asp that compares migration and interop and says some things about migration strategies if you are migrating from classic to .net.
-
VSS API for .Net
Just found out the API to the VSS. If using visual Studio .Net, the API is at C:\Program Files\Microsoft Visual Studio\VSS\win32.
-
VSS Utility
Current Project as i blogged before, I am facing a problem. It is a synchronization problem from offshore. Refer to previous blog for more information. Well I have been thinking about a solution to this problem. There are a couple of solutions to this problem. I might try to find a solution to this problem by upping the technology, or I might try to solve this problem by upping the process.
-
VSS Code Synchronization
The funny thing about VSS is that the code synchronization is pretty slow when you are working on an onsite-offshore model. Consider this. I have a VSS Database in US. The developers are working here checking out and checking in files. There is another team working offshore. In a situation like this the synchronization becomes a nightmare if you have a separate VSS Database for the Offshore team.
-
NUnit Issues...
Everyone talks about Test driven development and Unit testing these days. And theoretically it isn’t quite bad actually. I have been reading about it since ages and the last time I finished my project, I had some time to delve over it and thought of actually implementing it in practice.