Prem's views on life, .net and software development (everything contained in one strongly typed weblog).
Tuesday, December 15, 2009
Performance Issues
Always, Always measure your performance problems before and after making code changes to conclude that you have impacted code in a positive way. Even though this principal applies for both code that is in active development and production, it is critical in case of code that has already been deployed to production.
One of my favorite c# blogger John Skeet wrote an excellent article on this topic. He sums it up real nice in one line "Performance is important - too important to be guessed about instead of measured."
Monday, November 23, 2009
Funny Take on LinkedIn
Anybody who knows what a linked in is should see this :)
Wednesday, September 16, 2009
Cool new technology
I was really surprised to see that this company is run by bunch of guys from Gurgoen, India.. nice to see an indian company making waves in innovation rather than doing the mundane software development/maintenance
Monday, June 15, 2009
SQL Server Optimization tips
Most of the content of this article would have been greek and latin to me had I not been working in Lumenos.
I still remember those days when I used to write "Extravaganza Report" in one single stored procedure spanning 2000 lines. I have moved more toward ORM based architecture these days in my current company, but I still think a report as complex (it really was) as extravaganza needs stored procedure for the kind of SLA that was expected out it..
Thursday, June 11, 2009
Scenarios when you can use struct
He mentions the following criteria for creating struct
1. Does it represent a single value?
2. Will the instance size be under 16 bytes?
3. Should it be immutable (modifications actually make a new copy in memory, forcing you to pass by ref to methods)?
4. Will this rarely need to be boxed (cast to an object)?
5. Will it usually be short-lived?
6. Will it mostly be embedded in other objects?
Click here to read the full article
Monday, March 30, 2009
Improving Process in Software Company
It has been busy period for me trying to setup process in my current company. For those of you interested in knowing things that I have standardized
-> Usage of Cruisecontrol.Net for Continuous Integration
Initially i found configuring this tool really difficult but once I completed setting up couple of projects using it, I am very comfortable with it nowadays. I might not be a continuous integration guru but certainly I could fix any cc.net issue without hiring an external consultant.
We are currently using CruiseControl.Net for migration across to our QA environments as well. This has made the deployment of code a breeze.
-> NDepend for Static analysis
Ndepend is certainly one of the best tools you could purchase to have better control of the quality of code your team is putting out. The parameters I am currently auditing include number of lines in method, cyclometric complexity and comment percentage.
-> Schemaspy for generating automatic Entity Relationship Diagrams
This is a great tool for creating ER diagrams from your database automatically and provides web based output that your team could use as a reference.
I always prefer to automate as much as possible and monitor it periodically to ensure things work as smooth as possible. You would do yourself a great favour by setting up Continuous Integration, One click Code migration and report generation using a tool like nDepend on code quality.
Having worked on improving process in the current company, I want to evaluate where we stand now in "Joel Test"
1. Do you use source control? Yes, we use Borland StarTeam
2. Can you make a build in one step? Yes
3. Do you make daily builds? Yes, we use CruiseControl.Net
4. Do you have a bug database? No
5. Do you fix bugs before writing new code? Yes
6. Do you have an up-to-date schedule? No
7. Do you have a spec? No
8. Do programmers have quiet working conditions? Yes
9. Do you use the best tools money can buy? Yes
10. Do you have testers? Yes
11. Do new candidates write code during their interview? No
12. Do you do hallway usability testing? No
Current score for my team is 7/12 on Joel Test, not good, but I certainly think we have come a long way from where we were... Hope to see this improve...
Friday, February 20, 2009
Difference between C# delegates vs Events
In a nutshell, the article summarizes the main differences between delegates vs events.
1. Events can be used inside an interface while a delegate cannot be.
2. Event can be invoked only from within the class in which it has been declared, while a delegate can be invoked even from the class that is creating the object.
3. Event has a pair of customizable accessors (add and remove)
4. Event signature can only be type foo(object source, EventArgs e)
Tuesday, November 25, 2008
Running SchemaSpy for database tables in SQL Server 2005
I was looking for a tool to generate the schema diagram from my SQL Server 2005 development database. After some research I found the open source tool SchemaSpy which meet my needs, it also had decent reviews in few blogs. But I had problem running the tool to generate the Html documents for my schema.
After playing around with the option parameters, I was finally able to get it to generate the documentation needed. Couple of things to ensure before running schemaspy to generate documentation for SQL Server 2005 schema.
- Download Microsoft JDBC driver for SQL Server 2005
- Download Graphviz
Make sure the Graphviz installation is added to your system PATH variable. Run the following command
java -jar schemaSpy.jar -t mssql05 -db <name of the database> -host <Ip address/hostname> -s dbo -port 1433 -u <username of the database> -p <Password for the userId> -o library
Saturday, November 01, 2008
Difference between Static and Singleton Pattern
I wanted to blog about this for a while, b'cos I found many folks not being able to answer this question during the interview process. Few differences worth mentioning are
- Singletons can implement interfaces and inherit from other classes (while static classes cannot).
- Singletons can be extended (used as a subclass) while static classes cannot.
- There is only one instance in case of Singletons but there is none in case of Static classes.
- Singletons can be passed around as a parameter to function calls but you can't do that with a Static class.
Saturday, October 18, 2008
Stella's Restaurant in Alexandria Closed?
While chatting with my good friend Nick, I came to know that Stella's (a nice restaurant in Duke Street, Alexandria) has been closed for more than couple of years now. It is a nice, cosy restaurant that we used to go for lunch when we were working in Lumenos. I certainly have quite a lot of sweet memories there especially going for chipotle chicken on thursdays and happy hour(even though i don't drink.... just to have my root BEER/Diet Coke !!!).. The outdoor dining area in Stella's is a real nice place to have lunch/dinner.
It would have been a great trip down the memory lane if I could have had a chiptole chicken with some good old friends when I do go to USA for a business trip.. Probably have to be happy eating my foot long roasted chicken in Hearty Italian made fresh in the Subway across the Road !!