Madhawa Learns To Blog

.net, c#, sql, OOAD and more mad memory dumps...

Wednesday, May 18, 2005

Via to launch Pentium M pin-compatible CPU ?

There is a rumor here that VIA planning to launch a socket 479 compatible CPU. Interesting eh? Seems both Intel and AMD will get good competitor. Then what we will get? :)

Tuesday, May 17, 2005

How compiler decides a method to inline or not?

When I’m dipping into improving performance of managed code I got wondered how compiler decides a method to inline or not.

Ok, First I’ll tell you what is method inlining (to whom, think what’s the hell is this inlining).

As all we know there is a cost associated with method calls; arguments need to be pushed on the stack or stored in registers, the method prolog and epilog need to be executed and so on. The cost of these calls can be avoided for certain methods by simply moving the method body of the method being called into the body of the caller. This is called Method In-lining. The JIT uses a number of heuristics to decide whether a method should be in-lined. The following is a list of the more significant of those (note that this is not exhaustive):

• Methods that are greater than 32 bytes of IL will not be inlined.
• Virtual functions are not inlined.
But if your virtual method is sealed its candidates for inlining as well as other compiler optimizations also.
• Methods that have complex flow control will not be in-lined. (Complex flow control is any flow control other than if/then/else; in this case, switch or while.)
• Methods that contain exception-handling blocks are not inlined, though methods that throw exceptions are still candidates for inlining.
• If any of the method's formal arguments are structs, the method will not be inlined.


But note on, those things might be change in future versions of the JIT.
And other thing, don’t compromise the correctness of the method to attempt to guarantee that it will be inlined.
Pretty interesting? ha

Monday, May 16, 2005

Gigabyte Enters Mobile Phone Market

Gigabyte Communications, established last June, said it plans to launch its first mobile phone under the Gigabyte brand in the July-September period. The handset will be targeted at the high-end segment, which accounts for about one-fifth of the nation's NT$42 billion (US$1.35) market.

Gigabyte enters cellphone market

Thursday, May 12, 2005

SOAP exception when dealing with XMLA

We got a web application which accessing SQL Analysis Service through XMLA. Some times when we accessing it gives a SOAP exception. We tried everything (restating services and server also) but failed. Reinstalling XMLA SDK solved this problem but as you can understand it’s not the solution since this thing happening several times per day.

Today I changed application pool of XMLA web service and guess what? It solved the problem. So I create a dedicated application pool for XMLA and things going smoothly now. But not sure what will happen next. If this will work well, I'll add our web application also to that application pool.

Enjoy True 5.1 Channel Surround Sound without a room full of speakers


Turtle Beach is showing off their new ‘Ear Force’ line of headphones, designed for gamers and movie watchers who want 5.1 surround sound without dealing with actual speakers. The X-51 is a folding pair, while the HPA are an amplified, slightly higher-end pair. The X-51s can be had now for around $80, while the HPAs are on pre-order. Both models come with a boom mic, suitable for voice chat or just hearing yourself breathe from each of the headphones 8 speakers (center, rear, and front on one layer, with subwoofer on top. Pretty crazy).

Product Page [TurtleBeach]

Improving .NET Application Performance and Scalability

hay folks!
I'm very curious abt performance of what I'm writing right... I think same goes u. When looking at
Mahasen's blog I found this usefull link.
So I thought putting it here. :D

Improving .NET Application Performance and Scalability

Wednesday, May 11, 2005

Are cows useful in IT field?

Are cows useful only to farmers or milkmen? How we can use in IT field?

Buddhima send me this funny one. It's really cool... :)

Man on trial for Dr Dre 'assault'



A man accused of punching Dr Dre at the hip hop Vibe Awards last November must stand trial on an assault charge, a judge has ruled.
Judge James Dabney said sufficient evidence had been found against Jimmy James Johnson, 26.

Mr Johnson allegedly punched Dre, whose real name is Andre Young, after asking for his autograph.

The incident sparked a brawl, during which Mr Johnson was allegedly stabbed by rapper Young Buck.

Mr Johnson suffered a collapsed lung. The brawl spread to involve many of the 1,000-strong crowd.

Buck, whose real name is David Darnell Brown, has pleaded not guilty and is on bail awaiting trial.

Dre, 40, had been about to receive a lifetime achievement award when he was punched.

Mr Brown is signed to Dr Dre's record label as part of G-Unit. His debut solo album, Straight Outta Cashville, went in at number three on the US Billboard chart in August.

Monday, May 09, 2005

Is there coding life after 40?

still at my mid twenties, still love coding...
still running da game... doing dat thing... ha
but how long I could hold this thing?

Is there coding life after 40?

Friday, May 06, 2005

Exchanging Ideas

"If you have an apple and I have an apple and we exchange apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas"
--George Bernard Shaw (1856-1950)

Wednesday, May 04, 2005

Correct way to bind Windows Forms ListControls

Did you ever think there is a correct way to bind a windows forms ListControl not to just setting DataSource, ValueMember and DisplayMember in any order. If you bind that way ignoring the order SelectedIndexChanged and SelectedValueChanged events will fire several times. And you can't make sure what will return for SelectedValue property from DataRowView and Int32. I think you guys won’t argue that this is a worst case.
Ok guys, there is a correct order to do that and then you won’t get any troubles on that.

You have to set those properties in following order.

1. DisplayMember
2. ValueMember
3. DataSource

And you can make sure you and your colleagues wont do wrong by using a helper function for that.
Well pretty good idea, ha. I went little further and create that helper method like this.

public static void ListControlBinding( ref ListControl listControl,object dataSource, string displayMember,string valueMember )
{
listControl.DisplayMember = displayMember;
listControl.ValueMember = valueMember;
listControl.DataSource = dataSource;
}

public static void ListControlBinding( ref ComboBox comboBox,object dataSource, string displayMember,string valueMember )
{
comboBox.DisplayMember = displayMember;
comboBox.ValueMember = valueMember;
comboBox.DataSource = dataSource;
}

I have put those methods in a another library. That’s why I'm passing Control as reference type. And I have overloaded ListControlBinding method for ListControl as well as ComboBox.

You can get extended info about this problem
here.