# Wednesday, 01 August 2007

Hmmm, what would be the best way to process 50000 records in a database?

Bruteforce :- Just run the query through a SQLDataReader and process them one by one. Simple, easy and straightforward. Unfortunately doing something like that would tie up system resources and processing pretty badly.

ThreadPool :- Same as above but, execution would be on a seperate threadpool thread. Which usually yields processing to the OS when needed.

MSMQ :- Put all the records into MSMQ and then have another thread do the processing, since MSMQ is in charge of releasing the items for processing. Processor load would not be 100% during processing, going this route requires the presence of MSMQ on your server and also the maintainence of a new private queue.

Chunks :- Process a number of rows.. say... 500 at a time, and then take a breather of say.. 10 seconds.. and then go again, because the code takes a breather the processor load is comparatively lower since it's not CONSTANTLY in use. Unfortunately, because your code takes a breather... since you're not processing all the time, you need a lot more time to finish the job.

Hmmm.. so which method should I use?

Wednesday, 01 August 2007 00:13:07 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [1]  | 
# Tuesday, 31 July 2007

I have this funny feeling that I've actually posted something like this before... but hey, it's an interesting topic.

As an ISV that works to serve the client's needs and there are many times where we are presented with a requirement where we KNOW it's a critically bad idea which would generally cause a lot of usability problems should we go ahead with the requirement.

But... the client doesn't listen, even though we were brought in there in the first place to advise them as well as develop the system.

Even worse is when the client just puts their foot down and says "You just do what we tell you to do!"

That's when we do what the client tells us to do, but we try our best to take the necessary precautions so that if the problems crop up it either doesn't hurt the system that badly or we can apply our fixes as quickly as possible.

That is... unless the problem is formed at the very core of the system and since everything is built around the core... there's no easy way to fix it once it goes down.

At times like this I really wish that I could just tell the client Look, we're trying our best to help you here, can you please just listen to us? We are looking out for your best interests too you know.

Tuesday, 31 July 2007 00:06:25 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Monday, 30 July 2007

Ok, so I'm a bit slow on the bandwagon but.. Silverlight 1.0 RC1 has been released. So you can pick it up here. If you're a developer do pick up the SDK as well. And you're gonna need a new version of Blend 2 for editing purposes, but the download page is a bit weird so why don't you try and find where is the download link and if you fail then click here. For all other information do remember that both the MSDN Silverlight section is available as well as the official Silverlight site on the net (remember it's www.silverlight.NET instead of .com!)

Me? As excited as I over the release I can't help feeling a bit peeved that Windows 2000 support didn't make the cut this time around, would have made a huge difference for me.

Monday, 30 July 2007 10:18:29 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Sunday, 29 July 2007

I got my hands on a fan today.

A USB Fan.

An Oscillating USB Fan.


It used to have a grill to make it look like a real desktop fan, but it was getting in the way of the blades, so I removed it (it can be seen on the stack behind the fan) but.. more problems, now it's too light so it starts moving around when it's on.

Maybe that's why they use gooseneck cables for USB fans usually?

Sunday, 29 July 2007 23:28:43 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Friday, 27 July 2007

As I expected, Transformers The Movie SUCKED ASS!!! Most people don't agree with me since they say I should have just let go of the fact that I have previous memories about the Transformers that definitely couldn't be fulfilled by the movie. What were my gripes with the movie? Let's see now... the big ass plot holes? The fact that the human characters were useless and unnecessary? The fact that the Autobots are idiots? The fact that the Decepticons have such a small role to play that it felt like a damn joke?

I guess this comic totally sums up my gripes about the movie.

Don't even get me started on the movie tie in games...

Friday, 27 July 2007 18:41:32 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  |