Thursday, May 15, 2014

HW0 PART 1 CS169.1X


I attempted the questions only on the last day - may 15th I used http://www.compileonline.com/execute_ruby_online.php for trying out the programs.

In the initial attempt, i made some silly mistakes . for question1, I gave a wrong name for the function name & for the 3rd question, i was returning a default value of true . The auto grader pointed this out on submission & i rectified this later.


i could not attempt to do pair programming due to my work scenario. I was on business travel most of the time. For Hw0, i was not able to complete the prior courses fully but was able to attempt & complete successfully due to the fact that it was all programming problems . I have prior experience coding.



Wednesday, July 13, 2011

Tuesday, July 12, 2011

What You Need to Know About Sunscreen In One Infographic [Infographic]

What You Need to Know About Sunscreen In One Infographic [Infographic]: "
We've mentioned how to apply sunscreen for the best protection before, but nothing beats an infographic for creatively conveying a wealth of information. The Sunscreen Smokescreen covers the what, why, and how of sunscreen protection in beautiful detail. More »






"

Sunday, July 3, 2011

Weight Loss Psychology: Why Your Brain Might be Holding You Back

Weight Loss Psychology: Why Your Brain Might be Holding You Back: "If you gave a test to a million people and three-quarters of them flunked, would you attribute their failure to a lack of willpower or laziness? Or would you wonder if the test was flawed?



If the test measured the ability to lose weight, the results would parallel the failure rates for Americans who are trying to reduce their girth. According to the 2011 Food & Health Survey conducted by the International Food Information Council Foundation, 77 percent of Americans are trying to lose weight or avoid gaining weight. Despite their efforts, nearly 70 percent of Americans are overweight or obese.



Given the inability of the majority of us to manage our weight, are we all just weak-willed slackers? Or are other factors operating to make failure the most likely outcome?



For the most part, the test takers do not blame others for their failure; they blame themselves. Desperate to succeed despite a history of dangerous scams and diet schemes, consumers continue their search for a magical solution to weight loss and willingly throw money at the problem. Growing at an annual rate of nearly 11 percent for the past five years, the market for weight-loss products (food, drugs, supplements, services, ingredients, devices, accessories and cosmetics) in 2014 is projected to reach $586 billion.



Designed to Eat



So why is it so difficult to lose weight? Obesity psychologist Jim Keller, Director of Behavioral Health at the WeightWise Bariatric Program in Oklahoma City, asserts that the human body and brain are designed to eat -- thus explaining why losing weight proves so challenging for so many.



Keller, who has conducted 14,000 psychological interviews of individuals considering bariatric surgery, says that the causes of obesity are complex. Obesity is not simply a function of laziness or an indication of emotional instability. In addition, genetic and biological factors do not act in isolation, but are constantly interacting with an array of environmental factors. Keller notes that both the availability and persuasive advertising of unhealthy food contribute to the obesity epidemic.



Why Is Changing Eating Habits So Difficult?



While external and genetic factors play a role, no one questions that individuals are in charge of their daily decisions about what and how much to eat. So once we make up our minds to change a habit, why do we find ourselves falling back into old ones? Why can't we simply make a decision and get on with it? What puzzles and frustrates many trying to lose weight is why changing one's eating habits is so darn hard.



According to Dr. Howard Rankin, an expert on behavioral change, a key part of the problem is that we believe we have more control over our behavior than we really do. Stress, anxiety and addiction can limit the conscious control we have over our choices. Dr. Rankin asserts:



What drives our behavior is not logic but brain biochemistry, habits and addiction, states of consciousness and what we see people around us doing. We are emotional beings with the ability to rationalize -- not rational beings with emotions. If we are stressed, depressed or addicted, no matter how good the advice we are given, chances are that we will not be able to act on it. The more primitive, emotional brain generally has precedence over the newer, more rational brain.



But even if we removed those individuals who are stressed, depressed or addicted from the test group, we still would be left with a large population of individuals who are unable to stick with their resolve to lose weight.



I speak from personal experience. I've started many a day resolved to eat healthfully for the rest of my life. But by late evening, a piece of chocolate cake with vanilla ice cream has somehow found its way into my stomach.



One possibility is that I have multiple personalities. Another is that resolve is not constant. According to Dr. Rankin, resolve ebbs and flows like the tide. One moment we can be fired up to be mindful of our eating, but in the next instant, our mood, our state of consciousness or the context has changed. Much to our chagrin, we find ourselves indulging in unhealthy treats.



Dr. Rankin also has a healthy respect for people's extraordinary ability to rationalize almost any behavior. We can persuade ourselves to do almost anything we want to do -- especially when the behaviors are ones that our brains are used to doing. But trying to persuade ourselves to do things that we don't really want to do -- behaviors our brain is not used to -- is not easy. We are very adept at making wonderful (and plausible) excuses as to why we can't do what we don't want to do.



Five Tips to Help You Lose Weight



The obstacles to losing weight, however, are not insurmountable. The National Weight Registry is tracking over 5,000 individuals who have lost an average of 66 pounds and kept the weight off for five years. Insights from their success stories are consistent with these five tips from Dr. Rankin:



1.) Focus on a change of heart, not a change of mind. Losing weight through changing what and how much you eat doesn't happen because you rationally decide to lose weight. You have to have a change of heart; that is, you must get in touch with your deepest, heartfelt desires.



Your motivation may not be positive. Indeed, it may stem from a fear of loss. For example, you may not want to get sick. Or you may not want to be ostracized. To get in touch with your motivation, think about the negative consequences of not changing as well as the positive ones. Getting fit must become a priority and your life must be organized accordingly. Nobody can change you but you, and once you've made the changes, you need to stay focused. Successful individuals keep their motivation in the forefront of their minds all the time.



2.) Practice self-discipline. Self-control is a muscle that, like other muscles, needs exercise and strengthening. Change doesn't happen because you want it to happen. Each time you resist temptation, you are developing greater self-control. Success breeds success. Facing down temptations builds strength for future decision moments. Some of my clients throw away their favorite food as a symbolic act that shows they have control over the food and not the other way round.



Self-discipline is required for behavior change, but does that mean that the lack of self-discipline causes obesity? No. That would be like saying aspirin helps a headache go away, so headaches are caused by a lack of aspirin -- which is nonsense!



3.) Eliminate or reduce sugary, fat-laden foods. Such foods create physical changes at a cellular level that alter how our brains and bodies react. When analyzing your level of addiction, consider both physical dependence (changes at the cellular level) and psychological dependence (the habitual repetition of a behavior in an attempt to satisfy an emotional need). For example, how often do you use a sugary treat to lift your spirits?



What is often misunderstood is that these dependences exist on a continuum. You can be mildly, moderately or severely dependent, and the degree of dependence determines how difficult it will be to change.



4.) Make history your teacher, not your jailer. You can learn from your mistakes. Instead of [beating yourself up] when you fail to keep your promises to yourself, seek to gain self-knowledge so you won't repeat the error. No one is perfect. Be sure to acknowledge what you are doing right, not just what isn't working.



5.) Surround yourself with friends, family and colleagues who will support your effort. Getting fit and losing weight absolutely require others. Although you alone can make the changes you need to make, you can't make the changes alone. Not only in terms of eating, but in all areas of our lives, we are much more influenced by other people than we imagine. One of the most potent forces for positive change is the emotional support of the individuals who surround you.



You must, however, ask for the support you need. Don't assume that others know what would be most helpful to you. Similarly, you need to avoid those people who aren't on the same page as you. Social pressure can work for you or against you. Hang out with the right people.



Change is difficult, and whoever finds a way to bottle and market motivation and self-discipline will make a fortune. In the absence of such a product, however, the next best thing is helpful insights into the process of changing our behavior.



Dr. Rankin reminds us that, for better or worse, our core, emotional values will ultimately determine our choices. Once we identify our heartfelt desires, we can use them to create a healthy lifestyle that reflects our best self. Our deepest values can be summoned to keep us on track, especially when we are facing temptations and distractions. They can also serve as our compass when we go astray.



If we are willing to remain diligently committed to our emotional values, we can be confident that we will succeed in realizing our health and fitness goals. And when we do, maybe some of us will go one step further and give support to family and friends so that they can join us in becoming healthier and happier.



"

Sunday, February 27, 2011

What Is Enlightenment?

What Is Enlightenment?: "'There is no enlightenment outside of daily life.' -- Thic Nhat Hanh



What is this enigmatic and exalted state called 'enlightenment'? Why is everyone so enamored by this word? Why is everyone so eager to attain it? Does anyone really understand the essence of it? Many speak of it as if they do, and while others use it to enhance their status. I have been in the presence of such people, and I am always astounded at the level of ignorance guiding their behavior. Such people are nowhere near awakened, let alone enlightened, and this includes both teacher and student. It is like the blind leading the blind. The irony is that the effort they expend on becoming enlightened only impedes the realization that they already are. Enlightenment is not something you do; it is about being.



This beingness seems to be the hardest lesson to master, for it involves a gradual, developmental and cumulative process of growth through steps and stages. It emerges as a natural consequence of allowing, rather than by any egoic effort to attain it, because it involves surrendering and the ultimate dissolution of the ego in order to realize it. You can read the world's greatest mystical and spiritual literature, become very knowledgeable on techniques, rites and rituals, and yet remain completely unchanged. Accumulation of knowledge is not enlightenment, and neither is the prowess of mystical vocabulary the proof.



What we need is a new definition of what enlightenment means within the context of modern existence. The popular version is depicted as a sudden state of rapture and ecstasy, accompanied by luminous light and visions, an end of suffering and the dawning of bliss, thus permanently enlightening the aspirant. All this may very well be true, but does this depiction really explain what enlightenment is?



This state of beingness is easy to attain or maintain in an ashram, monastery or somewhere up in the mountains far removed from the challenges of modern life. There's nothing wrong with pursuing a monastic life or dedicating your life to simplicity and seclusion; this has its time and value on the journey. But how much of that pursuit is authentic, versus escaping the demands of the world? When you live in seclusion, you bet it's easier to maintain a consciousness of love and compassion.



So what is enlightenment? How about coming down from that mountain and putting your unity consciousness to the test amidst mortgage payments and credit card debt, divorce lawyers and aging parents, nasty bosses and health problems, wars and poverty? Such conditions, as the alchemist knows, burns away the dross to reveal who we are not. Yes, in the midst of the madness we awaken, grow comfortable with our dualistic nature and develop mystical stamina so that we can handle our sobriety. Illusions are like drugs and enlightenment is like rehab.



An enlightened person neither seeks the light, nor remains inactive in the darkness. Their goal is not enlightenment, but of conduct toward self, life and others. When you're in the presence of such a person, no verbal exchange is necessary to know who you are dealing with. Such people can serve in monasteries or stock markets, run corporations or run for office, walk the desert or walk to work. They have the ability to see things as they really are, to accept what is and remain open to all of life. This is done not out of naiveté or denial, but out of profound understanding of how life really works.



'After enlightenment, the laundry.' -- a Zen proverb
"