Wednesday, December 7, 2011

Four Simple Fitness Fundamentals

Four Simple Fitness Fundamentals:
Editor’s note: This is a guest post from Chris of Zen to Fitness.

Health and Fitness have always been meaningful to me as I work in the industry and have always been fascinated by the topic. Nowadays I see too many people push themselves too hard, use bad form and quite simply overdo it with exercise or trying to be healthy in the quest to be fit.


We also have a tendency to make health and fitness much too complicated …


From this I came to think about a few fundamentals – things I find really important in living a healthy lifestyle. I came up with just four, sure there are others but these are the ones I feel everyone who wants to live a healthier lifestyle or be fitter should know.


Bodyweight is King. The Squat and Pushup should be mastered before you move onto other weighted exercises or doing resistance training using weights. This is something I have learnt in my years personal training – the majority of people cannot do a bodyweight squat with good form or weight distribution. As for pushups few people can do 10-15 with good form – these two movements are the starting point and should be practiced and strengthened before doing anything else.


The best thing is amazing workouts can be made up of just running, squats and pushups.


Cardio is Great. Not Essential. Some people love to run, others don’t. Some like to go on long bike rides to release stress others don’t. We are all different and this is most true when it comes to cardiovascular fitness and training – some of us love it and find it to be a great tension and stress reliever, while others find it boring, monotonous and strenuous.


Learn to love and live with yourself. If you love doing cardio (running, jogging, crosstrainer etc etc) then do it, if you don’t there are plenty of other ways to stay fit – whether it be bodyweight intervals or playing sports with friends. Find what you are into – the truth is that there are many many ways to gain cardiovascular fitness. Pick what works for you.


Walk Everyday. Find Rhythm. Walking gives rhythm to our lives – it helps us think, re-aligns the body and limbers up the knees and hips. If you live in a city walking should be your main form of transport, I always say that if the distance is walkable do it by foot.


If you live somewhere more remote walking can be harder as it is sometimes hard to gather motivation to walk without a real purpose. Try listening to a podcast or music while walking – this helps time pass by and gives you a time to listen to what you want without distractions.


For optimal health I always say the two most essential things are walking and stretching – neither are to be obsessed over but if you can fit in at least 20 minutes of walking everyday and start or end your day with a good total body stretch out you are on the right path.


Live an Invigorating Life. Last but not least – living an invigorating life is probably the most essential thing when it comes to health and fitness. This means living a life that we get strength or energy from – something that gives us a reason to be active and move.


Whether this energy comes from doing a job you love, being around people you have fun with, travelling or just doing stuff you love. We need something in our lives to gain strength from. Excitement and passion change things up and gives us the motivation to exercise, eat well and most importantly makes us feel good.


I would even go as far as saying one of the best ways to stay fit is just to live life — be active, play with your kids, play tennis, touch football or whatever sports you enjoy, do some bodyweight exercises in the morning, walk lots and eat lots of wholesome food. In all honesty that is how most of the healthiest people I know live.


Integrate the fundamentals then go from there.


Of course it is great to take things to the next level but first gain a foothold on your health by doing the basics right.


Chris is the author of ‘All About Fitness’ and writes about staying fit while living life at Zen to Fitness.




Monday, November 16, 2009

Filtering Collection

package org.jai.core.collections;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class CollectionsFilter {

public static void main(String[] args) {
List list = Arrays.asList(new Integer[] { 1, 2, 3, 4, 5, 6, 7,
8, 9, 10 });
Collection evenNumbers = Utils.filter(list,
new Predicate() {
public boolean apply(Integer i) {
if (i % 2 == 0) {
return true;
}
return false;
}
});

Collection oddNumbers = Utils.filter(list,
new Predicate() {
public boolean apply(Integer i) {
if (i % 2 != 0) {
return true;
}
return false;
}
});
System.out.println("EVEN Numbers > " + evenNumbers);
System.out.println("ODD Numbers > " + oddNumbers);
}

}

Wednesday, October 14, 2009

Passion

It’s passion that makes the difference
Between a good performance and an inspiring performance
to go beyond competence.
It’s passion that lifts a person head and shoulders
above the rest in difficult times.

A strong commitment brings your whole being
into play – body, mind, and spirit,
making you feel more vital and fully alive;
enabling you to tap inner strengths,
resources, abilities and energies
that you didn’t know existed.

When you have fire in your heart, it lifts your entire life;
days go faster, life’s chores become more interesting.
you gain more resilience, more buoyancy,
and when you are spirited,
it radiates to every one around you.

 

 

EasyMock Weird Error

java.lang.NoSuchMethodError: org.easymock.internal.RecordState.(Lorg/easymock/internal/IMocksBehavior;)V
at org.easymock.internal.MocksControl.reset(MocksControl.java:66)
at org.easymock.internal.MocksControl.(MocksControl.java:29)
at org.easymock.classextension.internal.MocksClassControl.(MocksClassControl.java:19
)

As a thumb rule…
Should you find any “L”s or “V”s in the exception stack trace, just check your CLASSPATH. There might be class files(jar files) conflict. Don’t just get bluffed by the Exception message: NoSuchMethodError. The Class and the method will be there…but it might be there more than ONCE.

I got this message while I was trying PowerMock. This distribution has its own EasyMock jar file and my project is also referencing an existing (old version) easy mock jar file. This was fixed when I reorderd the jar file in Order & Export tab of Eclipse’s Java Build Path.

org.hibernate.HibernateException: Wrong column type Found: char, expected: varchar2(255)

Problem:
org.hibernate.HibernateException: Wrong column type Found: char, expected: varchar2(255)

This exception was raised for the mapping:

@Column(name = "CNTRY_NM")
public String getCountry() {
return country;
}

Analysis: This means to say that Hibernate has found char as the dataType of the column in the DATABASE and in your mapping you specified the data type as String.

    By default, the Hibernate converts java.lang.String to varchar2(255).

In other words, the data type of ‘CNTRY_NM’ column was defined as CHAR(50 Byte) in the database. Where as the data type of the corresponding attribute in the Entity class is java.lang.String. As there is a mismatch in the columns, the exception is thrown. When you specify schema validation by Hibernate (hibernate.hbm2ddl.auto = validate) this exception is thrown.

Solution:
@Column(name = "CNTRY_NM", columnDefinition = "char")
public String getCountry() {
return country;
}

Monday, July 6, 2009

Smart Tags


Provide “…choices for enhancing content and layout…”

Feature of Win XP.

Identified by “purple dashed underlining”.

Similar to hyperlinks but more complex and interactive.

When the cursor hovers over a Smart Tagged word, a drop down list appears with a selection of links related to the word.

A button on the toolbar turns the Smart Tag option on and off.

Callout 11 Smart Tag Actions buttonCallout 22 Smart tag indicator

Each smart tag recognizer identifies a type of data, such as names, dates, or telephone numbers, and contains the logic needed to provide one or more actions for each data type.

When you type text into a new document or open an existing document, the logic in the smart tag looks for words that match the data types in the list. When the smart tag finds a match, it places a smart tag indicator— a dotted purple line— under the term and enables the appropriate actions.

The actions you can take depend on the type of data that Word recognizes and labels with a smart tag.

For example, "Nate Sun" in the previous example is recognized as a "person name" smart tag with actions you can take, such as Open Contact, Schedule a Meeting, Add to Contacts, or Insert Address.

Smart Tags recognize patterns (e.g. a part number) and associate actions within Microsoft Office (Word, Excel, PowerPoint, and Outlook). These actions provide a quick way to get information about the part recognized from SAP and AeroPDM.

Smart Tags are indicated by a small purple triangle in Excel or a purple underline in Word/Outlook/PowerPoint

source: Microsoft.


Followers