- Meditation is not about doing:
It is easy to be in meditation, but it is extremely difficult to do meditation.
Imagine how difficult it would have been if we had to do breathing. Like all natural processes, meditation is spontaneous and effortless.
- Meditation is a state:
It has a very great advantage of being a fact and not a fiction
- Socrates
Meditation is the state of silence where we can introspect without either guilt or pride. In the state of deep meditation, we can correct even the fundamental flaws of our personality effortlessly.
Meditation is a state that extends much beyond mere relaxation. It is the experience of a state called as ‘thoughtless awareness’ where we are not hindered by the thoughts arising from the worries of the past or the anxieties about the future and being in the present where we experience our true nature.
- Meditation is not an exercise:
Breathing exercises or stretching exercises do not constitute meditation. They are merely techniques that can be used to enter into meditation.
- Not all who talk, know:
Stop thinking and talking about it and there is nothing you will not be able to know
- Zen Koan
People who talk about meditation sometimes have never actually experienced it. And even if someone has experienced it, it is of little value to us unless we can experience it ourselves too.
- Meditation has no prerequisites:
It is not mandatory to have a silent room or peaceful settings to meditate. If there is noise outside, meditation will make you silent inside. It is possible to meditate even in a crowded train or during a crisis.
- Meditation is not giving up on life:
We don’t need to renounce our day-to-day activities in order to meditate. Instead, meditation helps us to do things better. Proper meditation does not make us passive; instead it makes us dynamic and energetic.
- Meditation is not for sale:
Look and you will find it - what is unsought will go undetected
- Sophocles
You cannot buy meditation. You cannot sell meditation. You cannot do meditation. You cannot force meditation. Like all natural processes – like flowers blooming and seeds sprouting – meditation is spontaneous, effortless and always born out of the individual’s desire.
While it is easy to believe that more you pay, better the product/service you get, it is often untrue with meditation. People who spend millions usually learn nothing of value. Nowadays, a lot of ‘commercial yoga’ techniques are available in the market that promises extraordinary things but usually is observed to deliver nothing of much significance.
- Knowing is not the same as being:
The story is about you
- Horace
Listening to lectures on meditation is not the same as the actual meditation itself. No amount of books can teach you to swim unless you jump into the water.
A second’s experience is worth more than years of study. Direct perception is worth more than hours of listening to second-hand knowledge. To be is much greater than to know.
- Abnormal behavior is not meditation:
It is no proof of a man’s understanding to be able to confirm whatever he pleases; but to be able to discern that which is true is true and that which is false is false, that is a mark of character and intelligence.
- Emanuel Swedenborg
Mind going blank, losing consciousness, doing weird things are things that are neither spiritual nor meditative. Many believe that anything that is paranormal is spiritual. However, from my experience, I have come to understand that true meditation is not something abnormal. It is a profound state of inner silence that helps us understand ourselves better. It is natural and uncomplicated. And has no price tag associated with it.
- Meditation, a fashion statement?
The supreme happiness in life is the conviction that we are loved
- Victor Hugo
The ability to love oneself and other human beings equally is the most beautiful and attractive quality a human being can have. Meditation has the capacity to trigger this beautiful quality and thus is an eternal fashion statement. Meditation can never go out of fashion as long as humans desire for love and compassion.
Overview:
I was invited to review the existing automated testing solution created by the testing team of Equifax project. They are facing problems related to QARun tool and clear understanding of testing methodology and framework creation.
Objective:
Review the existing framework of automated tests for a group of J2EE applications. Define a strategy for creating automated regression test suite to increase efficiency og testing team.
Application Architecture:
A set of application related to user credit details. All the data and logic handled within Mainframes. Multiple small J2EE applications basically taking care of reporting and some decision making using reports.
Data Flow:
Input Web Forms => XML => C++ => Mainframe Flat File => Mainframes Processing => Mainframe Flat File => C++ => => XML => Output Report on Web Screen
A very good set of test data is already available and is maintained by the test team. This is a great positive point.
Problem:
1. Tool being used is QA Run. It is incapable of identifying the objects on the web screen required to validate the test criteria.
Current Solution (Using QA Run):
1. Fill up the form in browser
2. Submit to generate report on screen
3. Select all the data on screen using Select All command.
4. Copy it to a txt file
5. Save it to a folder as baseline.
6. Next release repeat all the above steps.
7. Compare the two files generated above and validate of each and every character in the txt files match in terms of its location and value.
8. If they don't match look up the root cause manually.
I identified the following problems:
1. No Clear distinction of GUI and Data validation test cases.
2. Current methodology is fragile.
3. No clear boundaries for the data inside txt files to help validate reliably.
Solutions Discussed:
1. Define Gui validation test cases and data validation test cases separately.
2. Get them signed off by the stake holders for priority and importance.
3. As discussed with the DEV team, get an XML generated from existing DOM object within code which is being used to generate the report.
4. Using XPath and VBScript (under QA Run) code the data validation scenarios as automated test scripts.
Additionally:
1. Define naming conventions for test script files / test objects
2. Setup process for getting signoff from stakeholder
3. Educate the test team regarding the naming conventions and use of SVN.
4. Synchronize with the DEV team to get their help as and when required.
5. Team to learn and try XPath
Next Steps:
1. Undersand the gap between the DOM Object and the result report web page if any.
2. Create simple test script using an XML as input data and the test condition created using XPath in VBScript.
3. Present to stakeholders.
This was a very interesting exercise for me and hope this to leads to a win win kind of a solution for both the test team and the stakeholders.
Error:
(TR0112) There isn't enough memory available.
Reason:
"Enable Mutli-Processing" enabled on datasources and the addition of the new datasource appears to push the limitations of this feature based on the size of the data being pulled.
Remove multi-processing from datasources
1. Open the model in Transformer
2. Right click the datasource and select "properties"
3. Click on the General tab
4. Uncheck "enable multi-processing" and click OK
5. Repeat steps 2 through 4 for all data source entries
6. Test / Build
Also ensure that there are enough system resources available when building the cube. This includes plenty of free memory, diskspace, and processor time. For example, if your database is using up 90% of the memory while you attempt to launch rsserver to build cubes, the cube build will fail at some point due to lack of memory available. Lack of memory in this case can also seen via monitoring the syslog (on unix system only) file.
When a cube is automated to rebuild on a regular basis, transformer fails to create the cube due to the failed authentication. Transformer prompts for user password even if the prompt for password box is unchecked in the Signon Property Sheet and Include Access Manager auto-access in the model is checked in the authentication tab of Model Property Sheet.
Error Details:
(TR1907) Transformer can't gain access to database 'Database Name' with signon information 'username'. [->Cancel] PowerPlay Transformer
Reason:
The Database signon is not recognized by Transformer via Access Manager due to an incorrect database name. Database name specified within transformer needs to be exactly the same as the one set up within Access Manager. This is also case sensitive.
Use Access Manager to record the database authentication and set the auto-access to access manager's signon. Cognos common signons are set to flown from Access Manager user class as well as the database signon
Steps:
1. Create the data source in Access Manager Admin Console
2. Add user signos into the user class Administrator
3. Uncheck the box against Prompt for Password in the user signon property sheet
4. Within datasource property sheet, specify the datasource name, which should be exactly the same as the one in Access Manager. The datasource name is case sensitive.
5. Activate "Include Access Manager auto-access in the model" from Authentication tab of the Model Property Sheet
Interesting article……
What killed Ranjan Das and Lessons for Corporate India
A month ago, many of us heard about the sad demise of Ranjan Das from Bandra, Mumbai. Ranjan, just 42 years of age, was the CEO of SAP-Indian Subcontinent, the youngest CEO of an MNC in India. He was very active in sports, was a fitness freak and a marathon runner. It was common to see him run on Bandra's Carter Road. Just after Diwali, on 21st Oct, he returned home from his gym after a workout, collapsed with a massive heart attack and died. He is survived by his wife and two very young kids.
It was certainly a wake-up call for corporate India. However, it was even more disastrous for runners amongst us. Since Ranjan was an
avid marathoner (in Feb 09, he ran Chennai Marathon at the same time some of us were running Pondicherry Marathon 180 km away), the question came as to why an exceptionally active, athletic person succumb to heart attack at 42 years of age.
Was it the stress?
A couple of you called me asking about the reasons. While Ranjan had mentioned that he faced a lot of stress, that is a common element in most of our lives. We used to think that by being fit, one can conquer the bad effects of stress. So I doubted if the cause was stress.
The Real Reason
However, everyone missed out a small line in the reports that Ranjan used to make do with 4-5 hours of sleep. This is an earlier interview of Ranjan on NDTV in the program 'Boss' Day Out':
http://connect.in.com/ranjan-das/play-video-boss-day-out-ranjan-das-of-sap-india-229111-807ecfcf1ad966036c289b3ba6c376f2530d7484.html <
http://connect.in.com/ranjan-das/play-video-boss-day-out-ranjan-das-of-sap-india-229111-807ecfcf1ad966036c289b3ba6c376f2530d7484.html >
Here he himself admits that he would love to get more sleep (and that he was not proud of his ability to manage without sleep, contrary to what others extolled).
The Evidence
Last week, I was working with a well-known cardiologist on the subject of ‘Heart Disease caused by Lack of Sleep’. While I cannot share the video nor the slides because of confidentiality reasons, I have distilled the key points below in the hope it will save some of our lives.
Some Excerpts:
· Short sleep duration (<5> compared to those who slept longer than 6 hours per night. Paper published in 2009.
As you know, high BP kills.
· Young people (25-49 years of age) are
twice as likely to get high BP if they sleep less. Paper published in 2006.
· Individuals who slept
less than 5 hours a night had a 3-fold increased risk of heart attacks .. Paper published in 1999.
· Complete and partial lack of sleep increased the blood concentrations of
High sensitivity C-Reactive Protein (hs-cRP), the strongest predictor of heart attacks.
Even after getting adequate sleep later, the levels stayed high!!
· Just
one night of sleep loss increases very toxic substances in body such as Interleukin-6 (IL-6), Tumour Necrosis Factor-Alpha (TNF-alpha) and C-reactive protein (cRP). They increase risks of many medical conditions, including
cancer, arthritis and
heart disease . Paper published in 2004.
· Sleeping for
<=5 hours per night leads to 39% increase in heart disease. Sleeping for
<=6 hours per night leads to 18% increase in heart disease. Paper published in 2006.
Ideal Sleep
For lack of space, I cannot explain here the ideal sleep architecture. But in brief, sleep is composed of two stages: REM (Rapid Eye Movement) and non-REM. The former helps in
mental consolidation while the latter helps in
physical repair and rebuilding . During the night, you alternate between REM and non-REM stages 4-5 times.
The earlier part of sleep is mostly non-REM. During that period, your pituitary gland releases growth hormones that repair your body. The latter part of sleep is more and more REM type.
For you to be mentally alert during the day, the latter part of sleep is more important. No wonder when you wake up with an alarm clock
after 5-6 hours of sleep , you are mentally irritable throughout the day (
lack of REM sleep ). And if you have slept for
less than 5 hours , your body is in a complete physical mess (
lack of non-REM sleep), you are tired throughout the day, moving like a zombie and your immunity is way down (I’ve been there, done that
L )
Finally, as long-distance runners, you need an hour of extra sleep to repair the running related damage.
If you want to know if you are getting
adequate sleep , take Epworth Sleepiness Test below.
Interpretation : Score of 0-9 is considered normal while 10 and above abnormal. Many a times, I have clocked 21 out the maximum possible 24, the only saving grace being the last situation, since I don’t like to drive (maybe, I should ask my driver to answer that line
J )
In conclusion:
Barring stress control, Ranjan Das did everything right: eating proper food, exercising (marathoning!), maintaining proper weight. But he missed getting proper and adequate sleep, minimum 7 hours. In my opinion, that killed him.
If you are not getting enough sleep (7 hours), you are playing with fire, even if you have low stress.
I always took pride in my ability to work 50 hours at a stretch whenever the situation warranted. But I was so spooked after seeing the scientific evidence last week that since Saturday night, I ensure I do not even set the alarm clock under 7 hours. Now, that is a nice excuse to get some more sleep.
J
Unfortunately, Ranjan Das is not alone when it comes to missing sleep. Many of us are doing exactly the same, perhaps out of ignorance.
This is a wonderful feature.
Badminton. Wow!!! What a game. I just love the moments every morning I am with my badminton playmates. These 30 minutes of my daily mornings since last 6 months enrich my entire day like nothing else.
The laughter, the fun, the positive spirit of competition, sometimes conflicts and what not. We share and enjoy so much in these moments. And today I realized something which I had read and heard before but never experienced.
Four of us - Mr. Uday Kumar, Dubey Ji, Raj and myself were playing a match of 15 points. The play started and was going bit dull. Myself and Udayji on one side and Raj + Dubeyji on the other. We started scoring points whereas Raj and Dubeyji stopped on there first point. The score reached 10:1. The game was losing fun.
I thought of trying something at that point to give the game a fun lift. I started returning the shuttle to Raj and Dubeyji simply on their rackets rather than trying to dodge them to get more points. Soon I could see their confidence building up. They started scoring quickly. On our side Udayji was trying hard at his end but wasn't able to manage increasing our points because of my support to our opponents.
Soon we reached equilibrium. We were at 11:11. Now I came back to the killing sporting spirit of our original game. And all four of us were giving our best to win the game. The last 4 points till 15 gave us so much fun and excitement, we enjoyed like nothing.
I heard Raj and Udayji say, ohh it was great feeling reaching 11 from 1, the feeling as if we had already won. And ofcourse we on our side were joyous of the win.
Now the moral I derived from this unplanned and spontaneous incident was basically my control over the game was such that I allowed me to take it in whatever direction I want. I decided to infuse fun and excitement in the game and was able to successfully add it for all of us.
Drive towards excellence.
Today I'd like to announce the release of a gem I've been working on Legacy Data
Getting started on a Rails project with a large existing database can be daunting. How to you extract all the information that's
encoded in the database? Do you have to understand the entire data model before you get started? The models_from_tables generator
in the legacy_data gem can help! This generator looks into your existing database and generates ActiveRecord models based on the
information encoded in it.
How to use it
-
- To generate an ActiveRecord model for each table in the database just type
script/generate models_from_tables
-
- If you don't want all tables in the database tell it which table to model
script/generate models_from_tables --table-name comments
This uses any foreign_key constraints in the database to spider the database and model the comments table and all associated tables.
-
- If you really only want the comments table tell it not to follow any foreign_keys
script/generate models_from_tables --table-name comments --skip-associated
-
- If you use factory girl (and everyone should) it will generate a simple factory for each model it generates
script/generate models_from_tables --table-name comments --with-factories
-
(You do need to install the plugin gem install legacy_data as long as http://gemcutter.org is one of your gem sources)
Examples
Several examples come with the gem source in the examples folder on github. These include
-
- A simple blog database tested with MySQL and Sqlite3
-
- The Drupal 6.14 database tested with MySQL
-
- The J2EE Petstore example tested with MySQL, Sqlite3 and Oracle
-
What kind of information can it extract from the database?
Associations
If the database contains foreign_key constraints it uses them to build has_many or belongs_to associations
in your ActiveRecord models
Validation constraints
It will generate the following types of validation constraints in your models
-
-
validates_uniqueness_of - For columns where the database has an index that enforces uniqueness
-
-
validates_presence_of - When the database column is non-nullable
-
-
validates_inclusion_of - For non-nullable boolean columns and custom constraints with a SQL rule flag IN ('Y', 'N')
-
-
validates_numericality_of - For integer columns (nullable and non-nullable)
-
-
custom validation - For custom SQL validation rules in the database it puts a placeholder in your model with the original SQL for you to translate into Ruby
-
Non-Rails naming conventions
Since the database is existing it's likely that it doesn't follow Rails naming conventions. Not to worry as the generator will
put the non-standard name into the generated models if it needs to.
What kinds of non-standard names can it generate?
Let's look at a sample output
class Post < ActiveRecord::Base
set_table_name :tbpost
set_primary_key :postid
# Relationships
has_many :comments, :foreign_key => :postid
# Constraints
validates_presence_of :title, :body
end
-
-
Class Names - It named the model Post instead of the Rails convention Tbpost. The generator could not do this itself but knowing the conventions will often not apply to legacy databases it pauses after spidering the database giving you a chance to override the table to class name mapping. It generates a yaml file
app/models/table_mappings.yml where you can verify or change any class name before proceeding to generate the models.
-
-
Table Names - It overrode the table name since the actual name tbpost does not match the Rails naming convention posts
-
-
Primary Keys - It overrode the primary key since the actual column postid does not match the Rails naming convention id
-
-
Foreign Keys - It overrode the foreign key on the comment table to be postid instead of the Rails naming convention id
-
Today I'd like to announce the release of a gem I've been working on Legacy Data
Getting started on a Rails project with a large existing database can be daunting. How to you extract all the information that's
encoded in the database? Do you have to understand the entire data model before you get started? The models_from_tables generator
in the legacy_data gem can help! This generator looks into your existing database and generates ActiveRecord models based on the
information encoded in it.
How to use it
-
- To generate an ActiveRecord model for each table in the database just type
script/generate models_from_tables
-
- If you don't want all tables in the database tell it which table to model
script/generate models_from_tables --table-name comments
This uses any foreign_key constraints in the database to spider the database and model the comments table and all associated tables.
-
- If you really only want the comments table tell it not to follow any foreign_keys
script/generate models_from_tables --table-name comments --skip-associated
-
- If you use factory girl (and everyone should) it will generate a simple factory for each model it generates
script/generate models_from_tables --table-name comments --with-factories
-
(You do need to install the plugin gem install legacy_data as long as http://gemcutter.org is one of your gem sources)
Examples
Several examples come with the gem source in the examples folder on github. These include
-
- A simple blog database tested with MySQL and Sqlite3
-
- The Drupal 6.14 database tested with MySQL
-
- The J2EE Petstore example tested with MySQL, Sqlite3 and Oracle
-
What kind of information can it extract from the database?
Associations
If the database contains foreign_key constraints it uses them to build has_many or belongs_to associations
in your ActiveRecord models
Validation constraints
It will generate the following types of validation constraints in your models
-
-
validates_uniqueness_of - For columns where the database has an index that enforces uniqueness
-
-
validates_presence_of - When the database column is non-nullable
-
-
validates_inclusion_of - For non-nullable boolean columns and custom constraints with a SQL rule flag IN ('Y', 'N')
-
-
validates_numericality_of - For integer columns (nullable and non-nullable)
-
-
custom validation - For custom SQL validation rules in the database it puts a placeholder in your model with the original SQL for you to translate into Ruby
-
Non-Rails naming conventions
Since the database is existing it's likely that it doesn't follow Rails naming conventions. Not to worry as the generator will
put the non-standard name into the generated models if it needs to.
What kinds of non-standard names can it generate?
Let's look at a sample output
class Post < ActiveRecord::Base
set_table_name :tbpost
set_primary_key :postid
# Relationships
has_many :comments, :foreign_key => :postid
# Constraints
validates_presence_of :title, :body
end
-
-
Class Names - It named the model Post instead of the Rails convention Tbpost. The generator could not do this itself but knowing the conventions will often not apply to legacy databases it pauses after spidering the database giving you a chance to override the table to class name mapping. It generates a yaml file
app/models/table_mappings.yml where you can verify or change any class name before proceeding to generate the models.
-
-
Table Names - It overrode the table name since the actual name tbpost does not match the Rails naming convention posts
-
-
Primary Keys - It overrode the primary key since the actual column postid does not match the Rails naming convention id
-
-
Foreign Keys - It overrode the foreign key on the comment table to be postid instead of the Rails naming convention id
-
I'm a firm believer in the importance of top-down and behavior-driven development. I often start writing an integration test as the first step to implementing a story. When I started doing Rails development, the expressiveness of Ruby encouraged me to start building a DSL to easily express the way I most-often wrote integration tests. In the pre-RSpec days, this was just a subclass of ActionController::IntegrationTest that encapsulated the session management code to simplify authoring tests from the perspective of a single user. As the behavior-driven development idea started taking hold, I adapted the DSL to more-closely match those concepts, and finally integrated it with RSpec. The result of this effort was Spectie (rhymes with necktie).
The primary goal of Spectie is to provide a simple, straight-forward way for developers to write BDD-style integration tests for their projects in a way that is most natural to them, using existing practices and idioms of the Ruby language.
Here is a simple example of the Spectie syntax in a Rails integration test:
Feature "Compelling Feature" do
Scenario "As a user, I would like to use a compelling feature" do
Given :i_have_an_account, :email => "ryan@kinderman.net"
And :i_have_logged_in
When :i_access_a_compelling_feature
Then :i_am_presented_with_stunning_results
end
def i_have_an_account(options)
@user = create_user(options[:email])
end
def i_have_logged_in
log_in_as @user
end
def i_access_a_compelling_feature
get compelling_feature_path
response.should be_success
end
def i_am_presented_with_stunning_results
response.should have_text("Simply stunning!")
end
end
Install
Spectie is available on GitHub, Gemcutter, and RubyForge. The following should get it installed quickly for most people:
% sudo gem install spectie
For more information on using Spectie, visit http://github.com/ryankinderman/spectie.
Why not Cucumber or Coulda?
At the time that this is being written, Cucumber is the new hotness in BDD integration testing. My reasons for sticking with Spectie instead of switching to Cucumber like the rest of the world are as follows:
- Using regular expressions in place of normal Ruby method names seems like a potential maintenance nightmare, above and beyond the usual potential.
- The layer of indirection that is created in order to write tests in plain text doesn't seem worth the cost of maintenance in most cases.
- Separating a feature from its "step definitions" seems mostly unnecessary. I like keeping my scenarios and steps in one file until the feature becomes sufficiently big that it warrants extra organizational consideration.
These reasons are more-or-less the same as those given by Evan Light, who recently published Coulda, which is his solution for avoiding the cuke. What sets Spectie apart from Coulda is its reliance on and integration with RSpec. The Spectie 'Feature' statement has the same behavior as an RSpec 'describe' statement, and the 'Scenario' statement is the same as the RSpec 'example' and 'it' statements. By building on RSpec, Spectie can take advantage of the contextual nesting provided by RSpec, and rely on RSpec to provide the BDD-style syntax within what I've been calling a scenario statement (the words after the Given/When/Thens). Coulda is built directly on Test::Unit. I'm a firm believer in code reuse, and RSpec is the de facto standard for writing BDD-style tests. Spectie, then, is a feature-driven skin on top of RSpec for writing BDD-style integration tests. To me, it only makes sense to do things that way; as RSpec evolves, so will Spectie.