Tuesday, December 15, 2009

Performance Issues

I have been part of software projects where we constantly have to tune the code (C#/SQL) for performance improvements. The question you have to ask yourself before doing any code change for performance is "Does this code really warrant changes for performance issues"? Most of the time someone would say changing the code to use LINQ instead of for each loop would make it faster.. Most of the time such recommendations tend to be wrong. Write code that is readable/maintainable before thinking too much about the 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

This was a real funny take on the Jod oriented social networking site LinkedIn.

Anybody who knows what a linked in is should see this :)

Wednesday, September 16, 2009

Cool new technology

Wanted to blog about this new product/application/company that made waves in the techcrunch top 50 of 2009.. IMO is an application that would turn your iphone to a joystick kind of device for your PC games.. I think this is a nice idea, sure it's not going to beat wii in terms of gameplay, but I am impressed with the idea of controlling your PC games using your iphone or ipod touch.

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

Nice article on SQL Server Optimization tips and performance consideration for selecting SQL Server data types.

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

Nice article by Chris Eargle on when we should use structs:

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

I know I am not updating this blog as frequently as I would expect, but would like to put in extra effort to make it a place worth visiting/RSS(ing) !!! This is my 100th blog post, I am happy to reach a personal milestone.

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

Nice post by Julien Couvreur's on the difference between 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)
Loading...