Madhawa Learns To Blog

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

Thursday, June 30, 2005

Use code snippets in Visual Studio 2005

Visual Studio 2005 provides a cool feature called code snippets. We can use code snippet to type a short alias, and then expand it into a common programming construct. Code snippets can make writing program code quicker, easier, and more reliable.

U can use this feature in 2 ways. You can just create a programming construct and write code inside it or select lines of codes and then create a code snippet to surround that.

To create an empty snippet all u have to do is type a short name for the alias — a code snippet shortcut — then press TAB. To use IntelliSense menu u can press CTRL+K, then X. This will activate code snippet IntelliSense menu and u can select and press tab to insert that.

To surround with code snippets just select lines u wanna surround and press CTRL+R, then S. That’s all.

After u enter code snippet it will highlights editable areas and u can use tab to navigate trough those. And u can press enter or escape to cancel field editing and return the Code Editor to normal.

Wednesday, June 29, 2005

what is Effective Communication?

Jack and Max are walking from religious service. Jack wonders whether it would be all right to smoke while praying.

Max replies, "Why don't you ask the Priest?".

So Jack goes up to the Priest and asks, "Priest, may I smoke while I pray?".

But the Priest says, "No, my son, you may not. That's utter disrespect to our religion."
Jack goes back to his friend and tells him what the good Priest told him.

Max says, "I'm not surprised. You asked the wrong question. Let me try."

And so Max goes up to the Priest and asks, "Priest, may I pray while I smoke?"

To which the Priest eagerly replies, "By all means, my son. By all means."

Moral: The reply you get depends on the question you ask.

Monday, June 27, 2005

Sumudu's gonna blog

Oh yeah, finally he is doing that thing. Sumudu is another homey I inherited and implemented right. (anyway these days I prefer composition over inheritance :D) Senior developer got lot of experience in .net since the beta release. (hay guys I'm talking abt days that there were no IDE's for .net right...).

You can reach his blog here. http://www.sumudusharp.blogspot.com

Keep da good works up man!

How Speech Recognition Works—And Doesn't Work

Well, I'm not much interested in Speech Recognition technology and related things. But I know it’s a hot topic over the web lot of folks curious abt. If you are, check this out.

Friday, June 17, 2005

My dream phones have released


Check these babes out! W800 W600

Monday, June 13, 2005

Does your role in the development team effects in performance tuning?

Ok guys, its abt performance again. You know in a development team all members have to keep performance in mind right… But that affects ur role in the team.

Performance affects different roles in different ways:

· As an architect, you need to balance performance and scalability with other quality-of-service (QoS) attributes such as manageability, interoperability, security, and maintainability.

· As a developer, you need to know where to start, how to proceed, and when you have optimized your software enough.

· As a tester, you need to validate whether the application supports expected workloads.

· As an administrator, you need to know when an application no longer meets its service level agreements, and you need to be able to create effective growth plans.

· As an organization, you need to know how to manage performance throughout the software life cycle, as well as lower total cost of ownership of the software that your organization creates.

And other crucial thing is when to approach into the performance in the life cycle of a project. This is for architects right...

Reactive vs. Proactive Approach

"If you're very lucky, performance problems can be fixed after the fact. But, as often as not, it will take a great deal of effort to get your code to where it needs to be for acceptable performance. This is a very bad trap to fall into. At its worst, you'll be faced with a memorable and sometimes job-ending quote: 'This will never work. You're going to have to start all over.'"
Rico Mariani, Architect, Microsoft

Performance is frequently neglected until a customer reports a problem. In other cases, performance is not evaluated until system test or initial deployment. In either case, you may not be able to fix the issue by throwing more hardware at the problem.

There are several problems with a reactive approach to performance. Performance problems are frequently introduced early in the design and design issues cannot always be fixed through tuning or more efficient coding. Also, fixing architectural or design issues later in the cycle is not always possible. At best, it is inefficient, and it is usually very expensive. You experience increased hardware expenses and finally increased total cost of ownership.

But in proactive approach you know where to focus your optimization efforts and
its decrease the need to tune and redesign as well as expensive hardware upgrades. This will leads to reduced operational cost and total cost of ownership.

TV Stick - Smallest USB TV tuner


Hay guys, from my teen ages I got huge interest in gadgets. So you can expect lot of posts on those things apart from software engineering in my blog. I think you guys will love that.

So today when I was browsing the web I see this cool
TV stick that I always dreamed about. But it will take couple of months to buy that in Sri Lanka right.

Thursday, June 09, 2005

Three IT consultants

Mahasen had mailed me this funny thing. But there is a serious story behind that right... to make ur face into a monkey face Check this out... :D

One day, three consultants, one from Wipro, one from Infosys and one from Virtusa, went out for a walk. They were old buddies from engg. college,and they were together for a college reunion. For no apparent reason, they went into a zoo and passed a monkey.

Being in the same business and from the same college, there was a little bit of a peer competition going on between themselves - they couldn't resist testing themselves against each other - especially the Infosys guy. Said he to the others: "Why don't we prove who is the best among ourselves?". Why not, said the other two. The Infoscion said "Let's have a test. Whoever makes this monkey laugh, works for the best firm". By mutual agreement, the Infoscion took the first turn.

Being a pure logical strategist, the Infoscion tried to make the monkey laugh by telling jokes. The monkey stayed still. As a more practical consultant, the Wipro guy tried to make funny gestures... ... no good, the monkey stayed put... Now, comes the guy from Virtusa... being the practical guy he was always trained to be,

He whispered something into the monkey's ear, and it burst out laughing at him. The other two were astonished. How did this guy manage to beat them? No way they were going to accept defeat so easily.
So the Wipro guy said "OK, let's take another test. Let's make this monkey cry !!" So there they went again, applying the same methods as before. The Infosys guy narrated sad stories, The Wipro guy made sad gestures, And they failed again... Then, the guy from Virtusa again whispered something into the monkey's ear. And lo! Patting the Virtusan's shoulder,it started crying,

The other two just could not believe their eyes! So the Infoscion said "OK, you've won twice. If you can win just this one, we will bow to you. Let's make this monkey run". And he barked at the monkey and ordered him to run. Of course, it stayed where it was. The Wipro guy, true to his type, pushed and prodded the monkey - still no go.

So...here comes our Virtusa guy again, and whispers into the monkey's ear. The monkey just takes off! It runs and runs as fast as it can, as if it was scared to death! The other two surrendered.

Said they: "OK, we give up. You're the best among us, and you work for the best firm of the three. But please, please tell us your secret," they begged him. "Well", said the Virtusa, "The first time I made it laugh, I told it I work for Virtusa. The next time, I told the monkey how much I get paid...so it started crying. And then I told him that I was here for recruitment!!

Monday, June 06, 2005

The most powerful audio processor ever built


The most powerful audio processor ever built will soon be providing previously unimaginable benefits to users around the world. Delivering such benefits as accelerated frame-rates in games, providing the most realistic headphone surround experience and even adding back in to music the sparkle that is lost during MP3 or WMA compression - this new technology is going to transform the world of entertainment. Whatever you enjoy doing, if it involves audio, is never going to be the same again!
Check this out on Creative site or read a review here.