Thursday, April 5, 2007

Keep application performance design in first place.

Most often when we write a piece of software we often lack of consideration thanking about designing a fast loading program and this is always true if we designed a small program. Actually there are various of ways to improve the performance of program, for example keep the program initialization as light weight as possible, be careful when we allocate memory, and always think of threaded programming design. Sometimes, we feel demotivated because of the expensive cost involve in having putting performance design in the first place, however, investment will be well worth if the customer don't feel your software is slow and underperformed in average.

Assume that we design a small program called Sales Reporting to be used in an organization. Since the program has just only a few modules, we ignore the performance design. Over the time, we might be adding some functionality, hence the complexity of the program increase. Maintainability of the program also an issue if the program is not well designed. One day, you are requested to improve the performance of the program because users are keep complaining that the slow loading program keep them not be patient anymore. Users are fed up and their work is always distracted. The company are not going to invest to redesigned the program because over the year many time and money was spent in maintaining the program. The program is reliable and the problem is just lack of performance. You as a software consultant is hired to perform this task, what is the first thing you would do?

You might be run test the program at the first place to see which area need to be improved. You had identify that some areas need to be redesigned for significant performance gain. You had just planned the initial strategy. Secondly, you are looking to the source code, you are over surprise that most part of the code could be very difficult to be modify for performance gain because the original designer do not keep the best practise in coding hence lead to performance issue. Another concern is that the application is extremely tedious to convert to threaded application because initially the program is very difficult to maintain and the structure the application is not well understood by anyone.

You see, the scenario above has demonstrated that application tend to be extremely difficult to gain performance when the application aged. To solve this problem we must keep performance design in the first place during application planning and design phase.

Wednesday, April 4, 2007

Format default date in SQL Server 2005

Normally the default date for sql server is shown as 1/1/2007 12:00:00, however i feel the format of the date is too long and it would be better to be formatted as 1 Jan 2007. In order to create this effect, here the tip.

CONVERT(CHAR(11), getdate(), 106) AS Date

Thursday, March 8, 2007

Framework 3.5 linq rocks inside .NET 2.0

Today i have tested the Visual Studio Orcas CTP and I found the linq feature is really cool. I did some testing whereby i tried to create a class which uses some linq features. I compiled it with the framework 3.5 and finally i tried to reference it in my Visual Studio 2005. Guess what i managed to call the assembly compiled in framework 3.5 inside my framework 2.0 project. Therefore, this concluded that i could create my signed business logic classes using linq.

Great job!

Thursday, March 1, 2007

SQL Server 2005 Compact Edition - Internal Error: Invalid reconciler parameter

If you are experiencing this error "Internal Error: Invalid reconciler parameter" when you are doing merge replication or sync stuffs, don't worry because the error is due to the directory path is too long to be supported in .NET, therefore you need to copy your solution folder and paste it to C:\ for instance so that the directory path could be recognized by .NET.

For more detail explanation, please go to
http://pluralsight.com/blogs/jimw/archive/2006/06/18/28427.aspx

SQL Server 2005 Compact Edition Tutorial

Developing mobile application never been so easier with Visual Studio 2005. The SQL Server 2005 Compact Edition also comes with free. With a lot of support, there is no reason that I want to get started with my own written mobile application. To learn more about the SQL Server 2005 Compact Edition, please visit the http://msdn2.microsoft.com/en-us/sql/bb219480.aspx to quickly get started the tutorials to experience the most advance features.

N Computing vs Personal Computing - my point of view

My company recently have a plan to improve existing IT infrastructure by replacing those old PCs so that our staffs could be happier and more productive. However, my manager was asking me to give him some advice and recommendation of it and he also did suggest me about the N Computing solution (http://www.ncomputing.com/). I was very impress with the technology because it could save us tons of money off from buying "duplicated" hardware and software licences.

After i had done my researches and I found that the device is not as cheap as i thought. In the US it is sold at USD50 per device however in Malaysia, it is sold at USD162. NComputing in Malaysia pricing is so ridiculous and unreasonable since today computing is so cheap that i could built a PC with a 2.8GHz processor, motherboard V+L+S, 512 RAM, DVDRW drive and casing (a PC really need a protection), which cost me at USD151 only. That is US10 cheaper and I could get a real computer rather that just a simple station box. I could upgrade my PC over time with more functionality but I have limited or no upgradable ability with the NComputing station box.

Are you wondering how i could built the PC so cheap? The reason is the PC has no hard disk inside because i want to compare between "Apple X" and "Apple Y". The concept of using N computing is to connect the station box (client) with the host (server) in multi-user session scenario using a network connection. However it also can be done by a PC without a hard disk since I could use a open source Linux OS distribution such as KNOPPIX (http://www.knopper.com/) to be loaded by just a CD or DVD!. Inside the distribution DVD, it comes with plenty of useful software including Open Office 2.1 and a FireFox Internet browser. In this case I could remote access to my Windows Server 2003 host which supports multi-concurrent user via the Internet browser. Therefore, I have no problem running Windows application such as Ms Office 2007.

As my conclusion, I would consider the station box if it is less than US50 else it should be an obsolete technology if the cost of making it is too high. Since today computing is so cheap, in which an unused CPU resources could be used as distributed computing purposes but not the station box.

Wednesday, February 28, 2007

Extreme Programming Part 1 - Introduction

Extreme programming or XP is a software development methodology that aim to improve software development productivity, reduce risk and cost. The main focus is to develop software in incrementally, rapid prototyping and communicate frequently that lead to accept requirement changes frequently ( most programmers hate it) and However XP doesn't work for all scenario specially for mission critical system and large system because those system normally needs highly formal specification whereas XP programming is just the opposite.

The main challenge of XP is real fun because you need to do everything yourself and you will deal with customers frequently and communicate with your peers frequently. You got to work out with a prototype very fast an usually you need a code generator to generate the whole application for you. Eg. Iron Speed http://www.ironspeed.com/ does the job. You got to test it and evaluate it for whatever reason to meet the requirements. XP is great if you have a small team around 2-6 people.

To be continued...