SharonsFuzzyArian











Yesterday one of my Colleagues (Rajesh) gave me a thought process on a new Microsoft Licensed Product tool called ‘Code Rush Xpress’ for C#, which takes care of hand-picked features of CodeRush and Refactor-Pro , doing more than what we expect!! I have got it installed and started trying to explore its maximum trait in the Visual Studio. ;)

Here are few Samplings of what we benefit out of this tool..

Find any File or Symbol…

Go to any file or symbol in the solution efficiently.

Type in a few letters of the name to filter…

Or hold down the SHIFT key to filter only on uppercase letters…

Uppercase characters can appear anywhere. Any uppercase characters not specified in the filter are highlighted in blue…

The uppercase letters need not be sequential. Notice how “RD” in the screen shot below matches both “ResolveDelegate.cs” and “ResolveCallbackDelegate.cs”.

Tab to Next Reference

This is a really cool navigation feature that takes you to the next (and previous) reference just by pressing the TAB key (or SHIFT+TAB to go backwards) when the caret is inside an identifier, member, or a type. For example, in the following code, the caret was inside the last Person type reference (in the “newPerson()” instantiation call) when the TAB key was pressed, causing the Person reference at the top of the file to become highlighted.

Expand/Shrink Selection

This feature allows you to increase a selection by logical blocks, or decrease an expanded selection by the same logical blocks. This feature is perfect when refactoring, since many refactorings work on a contiguous selection of code (e.g., extract method, introduce local, etc.).

TDD-Style Intelligent Declaration Based on Usage

Place the caret on any undeclared element in your code and press the Refactor/Code key (CTRL+`) to see a list of intelligent suggestions for the type of the new variable. For example, in the screen shot below two appropriate types are suggested, even though Console.WriteLine has many overloads that accept a wide variety of types.

You can even turn a function call or property access into a variable declaration.

This makes writing code with Visual Studio’s Intellisense really fast. Just use Intellisense to produce the property reference or function call, and then press the Refactor/Code key to declare a new local variable of the appropriate type. Here’s an example with a function call—notice the caret can be just about anywhere on the function call, even at the end of the line.

You can even declare a local from a simple instantiation, like this:

And it’s worth noting you can declare all kinds of elements based on usage, not just locals. Anything you need types, members, fields—the full list of elements that can be declared appears below.

Professional Grade Refactorings

CodeRush Xpress includes many powerful refactorings to help improve the quality of your code. For example, consider the following:

private static void ShowInt(int n)
{
Console.WriteLine(n);
}
private static void ShowEntries(List<int> entries)
{
entries.ForEach((
Action<int>)ShowInt);
}

With the caret on the ShowInt method reference, you can press the Refactor! key…

and then select Inline Delegate. This will produce the following code:

private static void ShowEntries(List<int> entries)
{
entries.ForEach(
delegate(int n)
{
Console.WriteLine(n);
});
}

Notice the caret is on the delegate keyword. You can immediately press the Refactor! key again…

Note that we can go in two directions now. We can either convert the anonymous method to a named method (in essence reversing the Inline Delegate refactoring we just performed), or we can take it a step further and compress the anonymous method into a lambda expression. Choosing Compress to Lambda Expression, we get the following:

private static void ShowEntries(List<int> entries)
{
entries.ForEach(n =>
Console.WriteLine(n));
}

CodeRush Xpress is loaded with powerful refactorings taken from Refactor! Pro. One of our favorites, Extract Method to Type, allows you to extract a method from one type into another, updating both the calling code and the extracted method appropriately. For an example, consider the following code:

class Person
{
public string Name { get; set; }
public bool IsAnOrphan { get; set; }
public Person Mother { get; set; }
public Person Father { get; set; }
}
// ...
class BabyMaker
{
public Person MakeOne(Person mother, Person father, string name)
{
Person newBaby = new Person();
newBaby.Name = name;
newBaby.Mother = mother;
newBaby.Father = father;
newBaby.IsAnOrphan = newBaby.Mother == null && newBaby.Father == null;
return newBaby;
}
}

Notice that the code in the MakeOne method contains a local variable that’s an instance of type Person, and that code sets the IsAnOrphan property. There is some logic in this method that pertains to Person, but it feels like it’s in the wrong class!

We already have the class Person in our solution, so it makes sense to move some of this code to the proper class. With CoderRush Xpress installed, all we need to do is select the code we want to move….

Press the Refactor key…

And choose “Extract Method to Person“. CodeRush Xpress analyzes the selection and determines there’s at least one local variable of a type you have declared elsewhere in the solution. Now let’s apply this refactoring…

Press the UP and/or DOWN ARROW keys to select a location for this new method, and press ENTER to commit. Give the method a meaningful name…

Cool. Now we have the logic (that should have been inside Person to start with) right where it belongs. Notice how the new SetParents instance method works on the instance itself (compare that code with the original code that operated on the newBaby local). The code is easier to read and cleaner in both locations.

Notice also that tiny dark blue triangle, in the code above. That’s a stack-based marker, and CodeRush Xpress drops markers automatically whenever you apply a refactoring or TDD-style declaration that takes you away from the original location. You can jump back at any time to the top marker on the stack by pressing ESCAPE.

There are many more refactorings and cool features in CodeRush Xpress. This is just a preview. Here’s the full list of what you get:

Editor Features

  • Duplicate Line
  • Highlight Usages
  • Clipboard Features
    • Smart Cut/Copy
    • Paste Replace
  • Enhanced Selection Abilities
    • Extend/reduce selection
    • Camel-case selection

Navigation Features

  • Camel-case Navigation
  • Tab to Next Reference
  • Go to File
  • Go to Symbol (QuickNav)

TDD – Declaration from Usage

  • Types
    • Declare Class
    • Declare Delegate
    • Declare Enum
    • Declare Enum Element
    • Declare Interface
    • Declare Struct
  • Members
    • Declare Constructor
    • Declare Event Handler
    • Declare Getter
    • Declare Method
    • Declare Property
    • Declare Property (auto-implemented)
    • Declare Property (with backing field)
    • Declare Setter
  • Variables
    • Declare Field
    • Declare Local
    • Declare Local (implicit)

Refactorings

  • Add/Remove Block Delimiters
  • Combine Conditionals (merge nested “If” statements)
  • Compress to Lambda Expression
  • Compress to Ternary Expression
  • Convert to Auto-implemented Property
  • Convert to Initializer (use object/collection initialize when possible)
  • Create Backing Store (converts Auto-implemented Property to standard Property with get and set)
  • Decompose Initializer
  • Decompose Parameter
  • Expand Lambda Expression
  • Expand Ternary Expression
  • Extract Method to Type
  • Flatten Conditional
  • Introduce Local (introduce variable)
  • Inline Delegate
  • Inline Temp (inline variable)
  • Make Explicit
  • Make Implicit
  • Move Type to File
  • Name Anonymous Method
  • Name Anonymous Type
  • Reverse Conditional (invert “if”)
  • Split Conditional (split complex “If” statements)
  • Use StringBuilder
  • Use String.Format


{May 27, 2009}   GM Diet…..

All our colleagues are following the GM Diet starting this Monday and we all had a tuff time on Monday alone, as only Fruits should be consumed the whole day! :(
Tuesday was full Vegetables day and morning alone I was not that comfortable but after my lunch, things went on fine.
Wednesday will be a mixture of Fruits and Vegetables, and am feeling little better now, other than the tiredness!
Thursday will be only Bananas and Milk! ha ha..
Friday will be only Tomatoes and a cup of Rice!! God, I don’t how we are gonna handle this day.. :(
Saturday will be a cup of Rice and some Vegetables :)
Sunday will be a cup of Rice with some Vegetables and some Fruits as well. :) and then the diet ends there :) :)
We have all noted down our weights on Monday before starting, lets see what’s on Sunday night.. :(
But one thing, through the course, am feeling much lighter in mind and there are much freshness inside our body.. ;) hope we are all getting lighter as days goes by..



{May 24, 2009}   The Complete Health Guide

STAMINA EXERCISES

  • Walking: Excellent cardiovascular benefits for the advanced age groups.. Should be done briskly with swinging of the arms. Comfortable shoes must be worn. May be done morning or evening for 30-60 minutes.
  • Jogging: Suitable for younger age group below 50 years. 30 minutes is all that is required and may be done continuously, or jog and walk in between when fatigued. The pace of jogging is equal to that of a brisk walk run on soft or grassy surface. Wear comfortable clothes and breathe freely.
  • Swimming: For those who know how to swim, 20 minutes of continuous swimming is sufficient. Alternately swim the length of a pool 10-20 meters, rest at the end for 30 seconds, swim back. 10 such lengths is good. Use any stroke you know. They are all of almost equal cardiovascular and muscular benefit.
  • Cycling: For any age group. Minimum time 45-60 minutes of continuous controlled fast cycling. Cycling up slopes gives added benefit. Ordinary cycles are good enough and indoor stationary exercycles may also be used at low resistance for 45 minutes.
  • Games: For the fitter younger age group. Get fit first before playing games such as squash, badminton, tennis, handball, basketball, football etc.. Warm up before the games. 30-45 minutes of the game is sufficient. Weekend or once a week games must be avoided unless other fitness programmes are done on other days. Play within your capacity.

  • STRENGTH EXERCISES

    Improve muscular strength with 10-20 repetitions of each of these movements.
    www.forwards4all.com

    MOBILITY EXERCISES

    www.forwards4all.com


    BACK EXERCISES

    www.forwards4all.com

    MOBILITY EXERCISES

    www.forwards4all.com


    BACK EXERCISES

    www.forwards4all.com

    GYM EXERCISES / WEIGHT TRAINING

    Weight training is basically for strengthening and building up the muscles. An all-round programme must have some stretching and cardio-vascular exercises as well. In addition, weight training loads the bones thereby strengthening and protecting against osteoporosis. The points to keep in mind in weight training are as follows:

  • The ideal weight training schedule is on alternate days i.e. 3 days a week with a complete rest on weekends.
  • The systems of training different muscle groups on different days, may be good for competitive sportsmen. The best system for non-competitive sportsmen is to exercise the entire body in each session. The major muscle groups are: Upper body – Shoulders, Arms, Chest and Lower body – Back, Abdomen, Legs.
  • Suppleness and stamina can also be built up through weight training by following a body builder-type schedule. Weights are also used to stretch muscles, build muscular endurance and cardiovascular stamina by repeating each exercise by using lighter weights with more repetitions.
  • If repetition are too easy, the weight used is too little. And in case it is not possible to complete the repetitions, it means the weight carried is too heavy.
  • A repetition is one complete exercise movement from the starting point to finish and then back again to the starting point. A set is a group of repetitions of the same exercise. Therefore, for the upper body 8 repetitions is one set. For the lower body, 15 repetitions forms one set.
  • We prescribe three sets of exercises for each muscle group. However, several systems of weight training prescribe different repetitions as well as different sets.


    www.forwards4all.com

    NUTRITION AND CALORIE MANAGEMENT

    Generally speaking, our daily food intake must comprise a balanced diet of 1500-2000k calories with fibre (above 75 gm) and low fat (below 30 gm). Consult your nutritionist for specific advice.

    www.forwards4all.com
    www.forwards4all.com
    www.forwards4all.com
    www.forwards4all.com
    www.forwards4all.com


    MICRO-NUTRIENTS

    The guide to healthy eating pyramid provides you a balanced diet, with ample vitamins, minerals and anti-oxidants. The therapeutic benefit of these micro-nutrients are explained below.

    www.forwards4all.com
    www.forwards4all.com

    STRESS MANAGEMENT

    Stress has existed from the time of Early Man but has now become an omnipresent phenomenon in the life of ‘Modern Man’. It has pervaded all layers of life.

    Stress is the bio-psycho-social response of the body to a demand, mental or physical. Stress is an arousal response the body makes, when a situation is perceived as being stressful. The impact of this arousal affects emotional as well as cognitive thinking. The impact is seen in behavioral and physiological change.. When stress is long term and chronic it leads to chronic psychosomatic ailments. While there is an undeniable link between stress and illness, optimal stress is a prerequisite for success in every task. Stress is the wind beneath your wings pushing you towards achievement. If stress can trigger off psychosomatic ailments in those living in the fast track, it can be a trigger even to those who suffer from monotony, boredom or frustration. It is therefore very essential to bring a balance between too much and too little stress.

    The first step in managing stress is to develop a stress-free personality. A high self-esteem, assertive behavior and a positive attitude help in building a stress-free perception. It also helps to focus on areas where control and change are possible. Locate the source of stress and use a problem solving approach to deal with it step by step. All stress you can understand. Some you can change. Some you may have little control over. You may then need to change your attitude and response towards these stressors. Thereby reducing stress.

    Any exercise programme done regularly utilizes the body’s stress hormones. Exercise not only makes the body fit, but also acclimatizes the heart and lungs to increased activity, as in stressful situations. Relaxation and meditation techniques result in calming brain waves, and reducing the effects of stress. This is especially effective with stressrelated ailments such as Hypertension, Headaches, Digestive ailments, Cardiac ailments, Sleep problems to name just a few. Stress may be an irritant in your life or it may be a factor of passive existence. Change of perspective will help change this stress to an active, rewarding life. One of the best gifts of nature is sleep. Daily sleep of 6 – 8 hours helps in relaxation and repair of the body and mind. It provides sufficient time for deep – NREM and dream REM sleep restoring physical and mental health.

    Stress may be an irritant in your life or it may be a factor of passive existence. Change of perspective will help change this stress to an active, rewarding life. One of the best gifts of nature is sleep. Daily sleep of 6 to 8 hours helps in relaxation and repair of the body and mind. It provides sufficient time for deep – NREM and dream REM sleep restoring physical and mental health.

    Use some of these stress defense mechanisms & optimize your stress.

  • Quality time for family will ensure that you have a retreat called home.
  • Plan your career well, it will give you challenge, satisfaction & security.
  • An assertive personality is responsible to self & others. Learn this skill.
  • Communication is the key to relationship building. Listen better and your conflicts will slowly dissolve.
  • Develop a sense of humor. Learn to laugh at life, its paradoxes and at yourself.
  • Plan a little idleness & quietness each day. You will be able to recharge.
  • Exercise is arousal and relaxation is the opposite. Yet both are necessary on a daily basis. Practice both.
  • Sleep well and you will have renewed energy to face the next day’s Stresses.
  • Plan your time well. You only have 24 /hours a day and many important areas to fit in. A simple formula for time & stress management. You could personalize it to suit your needs. Remember you can’t delete any activity or reduce time for health factors.

    Hours Activity
    6-8 Sleep
    8-10 Work, Occupation, Study
    1 Exercise
    1 3 big and 2 small meals Quality family time
    6 Relaxation, personal hygiene, social time, quiet personal time, others
    24 Total time in a day

    EAR, NOSE, THROAT, TEETH, EYE CARE

    I. Ears

  • Have periodic examination of your ears, especially if you notice your hearing decreasing.
  • Do not put drops, oil, etc. in your ears without doctor’s advise.
  • Do not clean the ears with pins, keys, pens, etc.
  • Do not remove foreign objects from the ear without a doctor’s assistance.
  • Do not unnecessarily- clean ears after bath with ear buds, etc.
  • Loud noises are harmful for the ears.
  • Do not slap children / others on the ears.
  • Do not allow dirty water to enter into the ears.
  • In all cases of ear ache, ringing in the ears, discharge from the ears, giddiness, vertigo, nausea, vomiting etc.- immediately consult your doctor.

  • II. Nose

  • Do not squeeze a boil or pimple around the area of the nose.
  • Do not try and remove a foreign object from the nasal passage without a doctor’s assistance.
  • Do not unnecessarily pick the nose or blow the nose vigorously.
  • Avoid unnecessary misuse of nasal drops inhalers, etc. without a doctor’s approval.
  • Consult your doctor immediately in case of injury and breathing difficulty.

  • III. Throat

  • Avoid the.use of irritants to the throat such as smoking, chewing tobacco / paan, etc.
  • Avoid putting coins, marbles, pins, etc. in the mouth.
  • Do not shout, scream etc. this causes hoarseness. In cases of hoarseness – rest the throat without misuse till hoarseness passes. If hoarseness persists for more than 7 days, consult your doctor.
  • Avoid eating excessively cold/hot spicy foods.
  • Avoid talking when food/water is in the mouth.
  • Eat food calmly- avoid hurry.
  • In case of glandular swelling in the neck, consult your doctor.

  • IV. Teeth

  • Brush your teeth once / twice a day prior to sleeping using a medium tooth brush.
  • Massage your gums once a day with your finger for one minute.
  • Avoid using abrasive tooth powders, salt, tobacco, etc. for cleaning the teeth.
  • Avoid use of any other person’s tooth brush.
  • Change your tooth brush atleast once every 90 days.
  • Use dental floss for removing food particles, avoid the use of pins, etc.
  • Do not smoke, use tobacco, chew gum, eat chocolate, candy etc.
  • Eat plenty of crunchy fresh vegetables and fruit.
  • In case of irregular, sharp, broken teeth, contact your dentist.
  • Do not apply medicine without consulting your doctor.
  • In case of tooth ache, gum bleeding, ulcers of the gum and cheek, white patches, etc., consult your dentist.
  • Dental check every six months; especially for growing children is essential.



    Last Friday, i came across http://www.wolframalpha.com/ site, which is a computational knowledge search engine. It’s more than what the normal search engines does.
    For example, when a date is entered, there is a detail about what the user entered, what’s the Day, Time and Year differences till date, When the Sun rose and set and any notable public events that occurred.I would recommend to use many things and get amazed by it. Guys plz try X + Y = 9 ;) and get charged..
    There are more intricate details about the search, mainly in a mathematical way. This is just a beta version for now, and they are all set to wait for their real release which mostly will not be free! Lets wait for the future generation product the more sooner.

    Recommend all to glance over this site: http://www.readwriteweb.com/archives/wolfram_alpha_launch_starts_tonight.php



    This post is again going to be something with the dreams as well…but this time its not me dreaming!! :)

    I remember it was late my school days, one Saturday noon, when, as usual I was having one of my books and trying to read without me dozing off… :) It was our parent’s master bedroom and my mom was already sleeping. My mom was then, a trained Montessori teacher. When it comes to reading for me, I like being alone, without the conscious of no one peeping on me! Since my mom had slumbered, I was now hitting my head over the books; I mean I was trying to grasp the notes! I was very in close proximity to her, that’s when she suddenly woke up and gave me a tight slap and then immediately slept off!!! :( :(

    That’s it, I was thunder-shocked, for that time, I dint know what to do, neither did I was able to raise my voice out, as it was totally blocked. For literally five long minutes, I was so afraid to move! I pacified myself that it should be a dream, but the point was, I wasn’t sleeping to dream!!and the pain was mounting. Then I suddenly ran out of the room, locked the room and ran to my dad, who was happily watching some cricket match!darn..

    When I told him what happened to me, he said, come and sit to watch the match and chill out! I was really pissed and showed him my cheek. He first dint believe until he saw me still frightful. I was following him inside the bedroom, when we saw she was fast asleep (happily may be).. :( He again confirmed with me about the incident, then he went inside to wake her up, asking her whether she was fine (may be he too was dreadful!!). She woke up and when she came to know what had happened, she thought we all were making her bakra!! (come on..its my cheek :( ).. She differed to the occurrence, saying it was pointless to strike me. We used to wonder, whether she had any dream of her small naughty students, that made her to strike me, but even then she said she dint have any dreams that time… :( this was the funniest incident as far as our family members are considered and I remember, that day many our neighborhoods started inquiring me about the same..

    Till date no one knows what made her to get up and kick me and then continue to doze off from where she felt… :)

    But anyways, I have many episodes of my mom whipping us in my childhood days..so it doesn’t matter ;) :) :)



    This is the most useful write-up that i can ever give you all. I remember when i went for few Yoga classes, i was informed to massage my legs if at all any of my other parts of body are little not at ease, and it happens to be true. The most sensitive part for the leg would be the place where the Stomach area is marked, so while massaging your leg, be little soft on your own tummy!! ;)
    Foot Reflexology chart

    Another piece of good info of your working hands.. Again be careful on your Stomach and Kidney parts

    Reflex_hand



    {May 20, 2009}   Our Lucky Bamboos…

    People, i dono how far we are believing, but our project is trying to raise ‘Lucky’ Bamboo in each of our desks..please check out my colleagues blog on it – Rajeshwaran

    We are just hoping that it grows out well in each one of our desk’s… whether it brings luck or not, is a different belief, but we are all enjoying the pleasure of taking the pain to make the plant grow ;)



    {May 18, 2009}   Pasanga… :)

    On May 9th, as our colleagues have planned suddenly, went out to Satyam Cinemas for the Tamil movie called “Pasanga” directed by the newbie known as “Pandiraj” who is protected with the Production support of M.SasiKumar, of fame ‘Subrmaniyapuram’ movie.

    We all went as a jolly trip, just as any other outing, but right from the movie started, other than the trailer, there were no places where in the people didn’t forget to laugh out loud. If you cant believe, even in few serious scenes, there is a humor triggered either in the side of the screen, or may be, the director dared to show it as the main scene itself!! Hats off to him for completely stress buster-ed us totally..and not to forget, this continued for about a week as well.. :)

    All the characters introduction part was really too cute to be viewed, esp, i liked the really small boy, who is also called as “Bujjima“.. ;) and then this cutie kid is trying to get interest with another small gal kid!!! man, your way on your heals..!!

    Another interesting character is the boy called as ‘Pagoda’.. ha ha.. one might tend to laugh hearing his name.. he is done his best level of acting for a kid to do.. :)   Other kid who adds humor to the scene is the one who is called as “Appatha“!! He also does some inspirational approach to the movie..

    The hero and the heroine are so real kind characters. I have seen the heroine as a modern gal, but her explode on the adverse side, makes our eyebrows one step way up.. The guy tries his simple level best to inspire her by his characters…which are so so natural.. :)

    The songs are all mind-blowing.. The climax is the best scene that can be ever made with the small kids.. After ‘Anjali’, is the best ever kids movie according to me.. All the naughty tweety kids fight’s are eye treaters..!

    The most tricky thing is to handle all these small naughtiest kids on sets and make a lovely movie.. i don’t mind seeing the same movie how many ever times i can!! ;)   Classy picture of today’s times..



    {May 18, 2009}   LTTE Chief….

    The demise of LTTE Prabhakaran, as sources says, had raised a question of whether it is a good time started for the Srilankan Country’s well-being or its a huge loss for the Tamil citizens. More than all of these reasons, a human is found to be no more..when can our children, grand-children see a beautiful and peaceful world to live-in.They say, its the end of Srilankan war..?? There are so many places for such wars to be ended? When all these are gonna stop… :( whatever the case may be, let his soul rest in peace if this is really true! If not let some source may protect the human for his better living..



    {May 18, 2009}   Monday Syndrome….

    Today is little bored up..ve loads of work but the day is more gloomy, so as my mind.. :(

    Thinking how to make the day little interesting!!???…



    et cetera
    Follow

    Get every new post delivered to your Inbox.