Hitting a forehand is so complex that any words to describe won’t do much justice in practice. Though, that doesn’t stop me from sharing with you, my own discoveries of this stroke, which helped my game tremendously.

I have been playing tennis for the past few years. However, I hit a plateau at certain (close to 4.0) level and never made much progress. However, over the past few months, I have started to improve considerably. Why now and what has changed?

I came to a new realization that I can improve. Previously, I had a limiting belief that, this was all I could improve. The improvements actually started coming after I stopped relying on advice from many sources (including books, web discussions, tennis teaching web sites etc). Once I had taken personal responsibility for my own improvement, then there are no crutches per se to fallback on; I could not blame some external thing for my lack of success.

One of the first realizations that came to me is that my racquet face is open when hitting the ball. Due to this fact, my ball lacked depth and speed, since a lot of energy is wasted.

Conventional theory tells us that to keep the arm in “double bend” position to get keep the arm stable. Unfortunately this is the advice that got me to an open face since my execution is just wrong. Why did it go wrong?

Here is the dilemma. It is very hard to translate words into actions and telling ourselves to hit certain way. There are so many things happening so fast when hitting a ball, all bets are off. Body falls back on old habits and the shot is hit with a slightly open face.

However, due to this new found inner teacher, I came to realization that I need to rely on feel a lot. Here is the thing. Sometimes, all of us have circumstances where we could hit the ball authoritatively. But we forget that soon and old habits start to assert themselves.

I found out that I can fix this problem by involving my intellect. Feeling produced a shot and then after the game, I try to reproduce that shot at home (shadow swinging) and analyze what I did well.

My first realization is that the racquet face is slightly closed when the ball is hit. So what’s the new thing I was doing different? My take back has changed; Instead of taking the racquet straight back, I started to cock my wrist and then take back. One other way to tell is the racquet is held such a way that it is in upright in your hand or like racquet standing on the “handle bottom” up-right but in your hands. One other way is, it’s like showing the racquet face to the ball. This one thing alone solved a lot of my problems involving timing.

With this, as soon as the ball starts coming to you, the racquet is up facing the ball. Then just take it back and hit. Simple, right!

No! The problem still remained and I am still hitting with an open face, though now I feel like I have lot more time to hit the ball. Then one of the days, I started hitting authoritatively and found the answer to be one more secret.

In this new stroke, I started to pull the racquet rather than pushing, here are two loaded terms. But the essential thing is when you pull the racquet, it automatically does all the right things: double bend, closed/straight racquet face, wiper motion etc).

Once I incorporated it (by deliberating pulling with muscles: see later), my stroke became much stronger but still I had problems with consistency and power. Analysis showed me that I am falling back on my old habits. Then, bam!, another day, another discovery.

This time I realized that the pull comes naturally by the way the racquet is taken back.

Pulling is natural when thing is getting away from you. For example, try to pull a stationary racquet, it’s so unnatural. One other way is to take back in a controlled fashion using a bunch of muscles to direct the racquet. This causes issues as the tensed muscles want to push forward.

So the new secret is to take back the racquet by almost throwing towards the fence. Keep the wrist coked though, otherwise I lost the feeling of control. When time comes to swing forward, as you feel the racquet getting away from you, then you naturally pull the racquet forward.

This solves 2 things in one shot: Gives you the pulling motion naturally as explained 2. Since the racquet is way back there, you arm generates lot of power. One thing to watch out though is that you may start your pullback when the racquet is pretty high in the air, then bring it down a bit consciously and it gives you both pulling and topspin.

To summarize:
1. First thing, cock the wrist and get the racquet upright
2. Take back the racquet as much as possible (straight arm) until you feel you can not extend it further (keep the wrist coked as long as possible)
3. Bring the arm a bit down and your body automatically pulls the racquet to slam the ball.

BTW, who does this perfectly? Yes, you guessed (its Roger Federer). But most pros are also hitting this way since they all have power and consistency compared to us mortals.

Thanks for reading. But please do realize one thing. These words mean nothing. They are only pointers. To make this knowledge your own, you have to discover your own feeling, your own analysis and there are no shortcuts.

Happy hitting!

I used Visual C++ for a number of years and loved the simplicity of the search.  C-F3 brings the word under the cursor into the clipboard and does a forward search.  Then F3 moves forwards through the search results while Shift-F3 goes back.

A similar feature in Vim I used to love is the asterisk  * does the same thing as C-F3.

When I moved to Emacs, I hated the incremental search which forced me to to type the current word again.  But now that I know the power of Emacs, I figured out how to fix this myself. Hurray!

Here is my rendition of this behavior which goes in the .emacs or init.el file.

(setq my-search-wrap nil)

(defun my-search-func (dir)
  (interactive)
  (let* ((text (car search-ring)) newpoint)
        (when my-search-wrap
             (goto-char (if (= dir 1) (point-min) (point-max)))
             (setq my-search-wrap nil))
        (setq newpoint (search-forward text nil t dir))
        (if newpoint
          (set-mark (if (= dir 1) (- newpoint (length text))
                         (+ newpoint (length text))))
          (message "Search Failed: %s" text) (ding)
          (setq my-search-wrap "some")
)))

(defun my-search-fwd () (interactive) (my-search-func 1))
(defun my-search-bwd () (interactive) (my-search-func -1))

(defun yank-thing-into-search ()
   (interactive)
   (let ((text (if mark-active
                 (buffer-substring-no-properties (region-beginning)(region-end))
                 (or (current-word) ""))))
     (when (> (length text) 0)
             (isearch-update-ring text)
             (setq my-search-wrap nil)
             (my-search-fwd))))

(global-set-key (kbd "<f3>")  'my-search-fwd)
(global-set-key (kbd "<S-f3>") 'my-search-bwd)
(global-set-key (kbd "<C-f3>") 'yank-thing-into-search)

There are a number of biases, actually way too many to even wade through on the internet. These biases affect our decision process as the mind applies the bias filter automatically to the facts and the thought process.

I’d like to talk about this bias for which I have no technical name, so lets call it “setup bias”.

Setup bias is a bias that estimates a future outcome by giving too much credence to preconceived (mostly factual) capabilities of certain factors and at the same time discounting unimportant (again preconceived) factors.

For example, Mavericks were such a great teams last 2 or 3 NBA season. However, they melted when time came in playoffs. As an effect of this bias, I’d have bet that Mavericks would win all the way. My reasoning is based on the talent of individual players and how much talent they had. I really thought they were a much better and should have won the NBA title. So what happened? A number of factors came in that I ignored or haven’t given importance. In this case, its many things: mental toughness, luck, perisistence of opposite team, Pat Riley believeing in his core that his team will win (saw in an interview just before the 3 or 4th game).

Setup bias:
(Mavs) Talent of individual players as a whole, Deep bench, tenacious owner (with software that is optimizing the stats and giving them edge), great coach (very enthisiastic)
(Heat) Talented team, but no where near Mavs, Coach that hasn’t won in a while
Assumption: Mavs would win NBA title.

So what happended: Heat won the title.

Reality: No Luck (Mavs not scoring for minutes), Pat Riley not believeing that he’d lose and his team buying it – this confidence made them perform better when it counted, Mavs coach turned out to be not so good at playoffs where mental toughness is much more important than any other factor and he didn’t prepare his team for that (btw Phil Jackson is the master here)

In this case, somebody else won the NBA title. Not a big deal! But what happens you are in a situation where a lot of money is at stake.

Lets say you like this company because they have unbeatable business model, a royalty stream that is endless and a powerful engineering team and seemed like perfect setup.

Would you put all your eggs in one basket of this company? Well I did. Then the reality kicked in.
There is a number of hidden and unforeseen factors (that were no where in the horizon) came to roost on negative side. Suddenly the momentum is gone and the stock went nowhere. Still I am not writing it off. But I missed many opportunities because of this inaction caused by this bias.

Please be mindful next time when your are taking big decision. Are you giving way too much importance to some factors and ignoring others. Even if there is no other negative factors, never underestimate factors such as pure (un)luck, tenacity of the other side even if untalented.

When learning Ruby, one thing always bugged me is the location where class methods are stored. Remember class methods are very similar to the “static” methods in Java anc C++ etc. Once defined, you can use this with the class. I knew that object methods are stored in its class object methods_table and there is no space for class methods as I researched through some of the core data structures MRI uses.

Where are these methods stored then?

Let me tell (guess?) you the answer without further ado.

The class method are stored in the bubblewrap class (aka metaclass) that surrounds the class object. Viola, the problem is solved by not complicating the object structure.

Please correct me if this is wrong.

Wanted to take a peek and possibly contribute to the Rubinius project as it seems be the most exciting project for me after fancying Parrot and Perl6 for a while.

Documenting steps to make a freshly installed Ubuntu 7.1 to compile Rubinius.  More instructions are available this Rubinius development site.

Here are the steps I followed.

#install ruby and rake
sudo apt-get install ruby
sudo apt-get install rake
# Install git
sudo apt-get install git-core
#configure git
git config  --global user.name "Your Name"
git config  --global user.email "your@email"

#Download source code anonymously
git clone git://git.rubini.us/code
# Now the code is setup in the code/ directory
# Setup the development environment
#first comment out the a line from this file if you don't have the cd-rom using which Ubuntu is installed
sudo vi /etc/apt/sources.list
# Comment out deb cdrom line
#install gcc development environment
sudo apt-get install build-essential
#now we need zlib dev headers - dont know why this is not included in build-essential
sudo apt-get install zlib1g-dev

# now light at the end of tunnel
# cd into the code directory
cd code
rake build
# that should build Rubinius
# once build is complete, run
shotgun/rubinius -v

This command seems to bring irb like prompt unlike ruby command

Let the fun begin!


	
	

As many of you, I first started writing a simple editor which in my case is Vim. Vim provides syntax highlighting and other powerful features. However, an IDE makes development more pleasurable by providing lot of extra goodies such a project context, tabbed windows, auto-completion and so on.

At the beginning, I tried a few Ruby IDEs such as Eclipse, RadRails and even using Vim as IDE. None of these solutions are satisfactory until I came across Netbeans 6.o.

Netbeans is simply awesome. I can not believe suhc powerful and useful software is also free! Now I use Netbeans 6.0 beta1 as my Ruby IDE. Even though it is beta software, Netbeans never crashed on me and its Ruby capabilities are plain unbeatable and extremely useful. It made programming Ruby fun again keeping me at a high level and taking care of mundane things such as editor and file management.

Netbeans is definitely worth a try! Once tasted, it will be very hard to move back to whatever you were using.

Ruby is magical in its abilities to extend an already existing object and a class etc. How does it do?

First, realize that in Ruby, everything is an object. An object basically has space for the object-scope variables (similar to private variables in Java and C++). However, object has no space for methods.

Then where are these methods stored?

The object method are stored in another object typically the Class object of the current object. Object in addition to space for object-scope variable also have a pointer to the Class object using which the methods are accessed.

Class inheritance then is implemented as pointers to classes all the way up the inheritance chain.

So how do you add a method to just one object?

Obviously the method can not be added to the Class since that would affect every object of that class.

In this case, Ruby using a special syntax to create bubble-wrap object behind the curtains to wrap the current object. A method added to this bubble-wrap object (of type Class) is only usable to the object it surrounds.

Let’s say,

dude= "Sudheer"
def dude.greet()
   "Hello " + self + "!"
end
dude.greet  --> Hello Sudheer!

Now, the string “dude” has a method added called “greet”. However, this method is not added to the String class. A new bubble-wrap class is created with the ‘greet’ method is attached in that wrap!

For curious, the inheritance chain is preserved by the bubble-wrap class having its class pointed to the object ‘dude’s class!

Recently wanted to learn at a more deeper level. One way that helps me in this regard is either solve a complex problem or build a significant and long program. In this case, I came across the metakoans.rb quiz and thought that this a perfect chance to know more about Ruby.

As part of learning Ruby, I read a few articles on Ruby metaprogramming and thought I quite understood it. However, in reality it turned out be more complex that I initially thought. But in the end, I got the ‘aha’ moment like happens to every zen student and everything is understood in one single timeless moment :)

For those interested, here is the solution I came up with. However, if you are serious about learning metaprogramming in Ruby, I encourage you to solve it by yourself.

class Module
   def attribute(arg, &block)
      a = arg.is_a?(Hash) ? arg.keys.first : arg
      p = proc do |me|
         if me.instance_variable_defined?("@#{a}") then
            me.instance_variable_get("@#{a}")
         elsif arg.is_a?(Hash)
            arg.values.first
         elsif block_given?
            me.instance_eval(&block)
         else nil end
      end
      define_method("#{a}")  { p.call(self) }
      define_method("#{a}?") { p.call (self) ? true : false }
      define_method("#{a}=") { |val| instance_variable_set("@#{a}", val) }
   end
end

Follow

Get every new post delivered to your Inbox.