Craft Controller gives 404 error So I am working on it first time. I created a Controller DB_DuhController having a method actionFoo()

I am then calling it as http://domain.craft.dev/admin/DB/duh/Foo but it's giving 404 all the time. What is wrong being done by me?
You need to use /actions (or whatever your Trigger word is) to access Controller actions.

Documentation: http://buildwithcraft.com/docs/config-settings#actionTrigger

EDIT: I realize I wasn't clear enough; this variable defaults to /actions. Unless you've set it to something else in your Config, add the /actions to your URL to access the Controller action.

So, your URL would be this: http://domain.craft.dev/actions/PluginHandle/Duh/foo

Note that capitalization matters.

It's also important to make sure that if you plan on making calls to this URL from outside Craft, you'll need to make sure that you're allowing anonymous access by setting that variable at the top of your controller:

protected $allowAnonymous = true;