Logo

A Blackberry addict discovers grassroots enterprise in India

about 1 month ago | Surbhi Bhati: Clean Desk, Jammed drawers

Well, since last couple of months, i am not actually writing my won blog, but sharing other ones that i find interesting..Can this be called cheating?? Anyway, who cares ;)

This is a post from Shekhar Kapur's latest blog. For those who do not know him, Shekhar is a renowned Film director not only in India but in Hollywood as well. This is the link to his blog,
http://shekharkapur.com/blog/2010/07/a-blackberry-addict-discovers-grassroots-enterprise-in-india/
and for your ease, I am pasting the actual post here..

A greater ‘hole in the wall’ you cannot imagine. A small fading sign on the top saying “Cellphoon reapars” barely visible through the street vendors crowding the Juhu Market in Mumbai. On my way to buy a new Blackberry, my innate sense of adventure (foolishness) made me stop my car and investigate. A shop not more than 6 feet by 6 feet. Grimy and uncleaned.

‘Can you fix a blackberry ?”

‘ Of course , show me”

” How old are you”

‘Sixteen’

Bullshit. He was no more than 10. Not handing my precious blackberry to a 10 year old in unwashed and torn T shirt and pyjama’s ! At least if I buy a new one, they would extract the data for me. Something I have been meaning to do for a year now.

‘What’s wrong with it ?”

‘Well, the roller track ball does not respond. It’s kind of stuck and I cannot operate it”

He grabs it from my hand and looks at it

“You should wash your hands. Many customers have same problem. Roller ball get greasy and dirty, then no working’

Look who was telling me to wash my hands. He probably has not bathed for 10 days, I leaned out to snatch my useless blackberry back.

” you come back in one hour and I fix it’

I am not leaving all my precious data in this unwashed kid’s hands for an hour. No way.

“who will fix it ?”

‘Big brother’

‘ How big is ‘big brother?’

‘big …. umm ..thirty’

Then suddenly big brother walks in. 30 ??? He is no more than 19.

‘What problem ?’ He says grabbing the phone from my greasy hand into his greasier hand. Obviously not trained in etiquette by an upmarket retail store manager.

‘Normal blackberry problem. I replace with original part now. You must wash your hand before you use this’

What is this about me washing my hands suddenly ?? 19 year old big brother rummages through a dubious drawer full of junk and fishes out a spare roller ball packed in cheap cellophane wrapper. Original part ? I doubt it.

But by now I am in the lap of the real India and there is no escape as he fishes out a couple of screwdrivers and sets about opening my Blackberry.

“How long will this take ?”

” Six minutes ”

This I have to see. After spending the whole morning trying to find a Blackberry service centre and getting vague answers about sending the phone in for an assessment that might take a week, I settle down next to his grubby cramped work space. At least I am going to be able to watch all my stored data vanish into virtual space. People crowd around to see what’s happening. I am not breathing easy anyway. I tell myself this is an adventure and literally have to stop myself grabbing my precious blackberry back and making a quick escape.

But in exactly six minutes this kid handed my blackberry back. He had changed the part and cleaned and serviced the the whole phone. Taken it apart, and put it together. As I turned the phone on there was a horrific 2 minutes where the phone would not come on. I looked at him with such hostility that he stepped back.

‘you have more than thousand phone numbers ?”

‘yes’.

‘backed up ?’

‘no’

‘Must back up. I do it for you. Never open phone before backing up’

‘You tell me that now ?’

But then the phone came on and my data was still there. Everyone watching laughed and clapped. This was becoming a show. A six minute show.

I asked him how much.

‘ 500 rupees’ He ventured uncertainly . People around watched in glee expecting a negotiation. Thats $ 10 dollars as against the Rs 30,000 ($ 600) I was a about to spend on a new blackberry or a couple of weeks without my phone. I looked suitably shocked at his ‘high price ‘ but calmly paid him. Much to the disapointment of the expectant crowd.

‘do you have an Iphone ? Even the new ‘4? one ?

‘no, why”

‘I break the code for you and load any ‘app’ or film you want. I give you 10 film on your memory stick on this one, and change every week for small fee’

I went home having discovered the true entreprenuership that lies at what we call the ‘bottom of the pyramid’. Some may call it piracy, which of course it is, but what can you say about a two uneducated and untrained brothers aged 10 and 19 that set up a ‘hole in the wall’ shop and can fix any technology that the greatest technologists in the world can throw at them.

I smiled at the future of our country. If only we could learn to harness this potential.

‘Please wash your hands before use’ were his last words to me. Now I am feeling seriously unclean.

Adopting enterprise mobility using Smartphones

about 1 month ago | Lalatendu Das: Interpretations of Technorealism

With ample help from my colleagues Basav, Jayendra and Dipen, I compiled my first study on role of Smartphone in enterprise IT. Check out the first draft:


Comments are welcome.

Fiorini Restaurant

about 1 month ago | Suman Thareja: Spice it up!..

Nothing satisfies the desire for carbs better than a good plate of pasta.  Fiorini Restaurant has some great dishes to satisfy the craving! This appetizer portion ravioli di verdura; hand crafted ravioli filled with roasted vegetables, porcini mushroom ragu ($19) is plate licking delicious.  The porcini mushroom ragu has a fresh lemon/lime zest, that leaves you wanting more. Thank heavens [...]

Miya and Elisabeth will style your life.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Who are Miya and Elisabeth? Why, they're those lovely ladies you see right up at the top of this post, and they are simply fabulous. I've blogged about my friend Miya's incredible talents before - she is a true artist, and a designer extraordinaire. (She created my header, with which I am in deep, deep love.) Her newest venture is a joint effort with her equally talented friend Elisabeth, and is called You + ME*. (The "you" being, well, you, and the ME being Miya and Elisabeth.)

These two are life stylists. They will help you find the perfect gift, plan the perfect moment, or design the perfect party. Whatever your heart desires. Their goal is to make your life as pretty as a picture, something at which they excel pretty damn hard. Need proof? First, let me tell you this: Miya's wedding was one of the most beautiful, original, thoughtful events I've ever attended. Everything about it was pitch-perfect without being twee, and I've rarely seen a group of guests enjoy themselves the way they did that night. And don't get me started on the super awesomeness of that photo booth (again, see above) and those flowers.

Need more proof? Head on over to their new website, and make sure to check out their inspiring blog, full of cool gift, shopping and cooking ideas. I don't know about you, but I'm ready for some lemon-blueberry pancakes. Like, right now.

Have you RE-worked?

about 1 month ago | Gurpreet Singh: Gurpreet's Blogs

What's in my DNA today?

about 1 month ago | Yashasree Barve: Life is Beautiful !!

Around 4-5 years back, when I was a loyal reader of Times of India, I saw this advertisement of a new newspaper being launched. It read "What's BMC digging for? a) Water b) gold c) Petrol". It was so apt looking at the roads that are always dug by BMC for some reason or the other. I tried to give DNA a shot, and really fell in love with it. Today after 5 years, it has become a part of my life, and I really look forward to what's in the DNA today.

It brought in many concepts of Web 2.0 such as readers contributing to news, as well as opinions on latest happenings. It also has a separate edition for kids on sunday called YA! which my kids simply love.

DNA is celebrating its 5th anniversary, and enjoy a snapshot of the cartoons published over these 5 years !
Looking forward to a continued relationship with you DNA ! 

Is IT about process or technology?

about 1 month ago | Biju Bhaskar: Thoughts on enterprise application development...

Neither...... it is the people that matters  : )

Neither Scrum, XP, Kanban etc going to build any great IT/app dev organization. Nor, J2EE, RubyonRails etc.. Always there will be new processes and technologies. But what matters most is the folks you have.

Are you hiring the right people? Are you taking care of your existing folks by focusing on their professional development, giving them growth opportunities, challenging work etc.? Are you understanding their personal goals and aspirations and supporting it? Are you creating an environment for everybody to grow? Are you creating an environment where folks can try new things without fear of failure? Are you managing out folks who are not doing well and are a burden on the team? If you are saying yes to all of these, then I think your organization is on the path to greatness. Then the folks will make the organization great...technology or process doesn't matter at all...

Agree or disagree?

Agile NCR 2010

about 1 month ago | Shakti Choudhary: Shakti1985's Blog

Hi, Flashback: On 14th July 2010, my manager and my buddy asked me to join Agile NCR 2010 and my perception was ” OH MY GOSH, another conference!!” and also to make it more interesting, it was on a weekend and to make it more dramatic, my travel time to the location was 90 minutes. [...]

Biriyani Cart

about 1 month ago | Suman Thareja: Spice it up!..

With a cart at pretty much every corner around the city, its hard to know where to go to and what to get!  One of my favorties is the Biriyani Cart(s) on 46th and 6th. They have Lamb over rice (cart on the left) which they claim is the best,  I’m not so sure, I [...]

The Big picture - Tour de France

about 1 month ago | Rohan Kini: blog@BumsOnTheSaddle.com - Home

Enjoy some fantastic shots of the Tour (Part 1, Part 2)

The Big picture has snapped up the high’s and low’s of one of the toughest cycling races in the world, perfectly.

Brilliant !

Code record/playback using Rails 3 generators

about 1 month ago | Pat Shaughnessy: Pat Shaughnessy - Home

For a while I’ve been thinking that writing a Rails generator is a fairly difficult thing to do. First you need to learn about Thor and the Rails generator system: what sort of Ruby class you need to write, how to handle arguments, how to run commands like “copy_file”, etc. Then you need to write ERB files to produce the code that you’d like to generate, which is always a chore.

So last night I wrote a gem called generate_from_diff that let’s you create Rails 3 generators automatically using a code record/playback model. Here’s how it works:

  • You make a code change in some Rails project, and commit it to your Git repo.
  • You run a command from my gem to extract this code change from the Git repo into a new Rails 3 generator.
  • You later run this new generator in any other Rails 3 app, and your recorded code changes are “played back,” or applied to your new project, using the Unix patch utility written by Larry Wall.

You’ve created a Rails 3 generator without ever writing a single line of generator code!

Disclaimer: I just got this working last night, so it’s still very rough; but if the idea seems worthwhile I’ll clean it up and try to make it more robust and useable. Another disclaimer: none of this will work on Windows since it relies on the Unix patch utility.

Example: recording code into a new generator

Let’s look at an example to try to make this a bit clearer. Support I create a new Rails 3 application:

$ rails new first_app
      create  
      create  README
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
etc...

And let’s run bundle install to be sure I have all the required gems. This is usually not necessary for a new, empty Rails app, but I want to have my Gemfile.lock file created... more on that in a moment.

$ cd first_app
$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.0.beta4) 
Using builder (2.1.2) 
etc...

And let’s create a new Git repo here and check the empty application into it:

$ git init
Initialized empty Git repository in /Users/pat/.../first_app/.git/
$ git add .
$ git commit -m"New sample app"

This first Git revision will serve as the baseline for recording my new generator, which I’ll do in a minute. The reason I ran bundle install was to insure that the Gemfile.lock file would be included in the baseline... and so not included in the recorded code change.

Now let’s write some code that I can record into a new generator. Suppose at my company I want to create a controller that returns the build number, diagnostics and some other information about each of my Rails apps. I might do this by creating a new controller as follows:

$ rails generate controller build_info
      create  app/controllers/build_info_controller.rb
      invoke  erb
      create    app/views/build_info
      invoke  test_unit
      create    test/functional/build_info_controller_test.rb
      invoke  helper
etc...

And in this new controller I’ll add a single index action:

class BuildInfoController < ApplicationController
  def index
    render :text => 'Some interesting build info about this app...'
  end
end

Finally, I’ll add a route to send “build_info” requests to this action:

FirstApp::Application.routes.draw do |map|

  match 'build_info' => 'build_info#index'

...etc...

This is somewhat silly, but it’s simple enough to use as an example here. Now if I run my app I’ll get this fascinating page:

Next let’s “record” this sample code by using generate_from_diff to create a new Rails generator for it. First, we need to install generate_from_diff:

$ gem install generate_from_diff
Successfully installed generate_from_diff-0.0.1
1 gem installed
Installing ri documentation for generate_from_diff-0.0.1...
Installing RDoc documentation for generate_from_diff-0.0.1...

Next, let’s commit my new controller and routes.rb code changes:

$ git add .

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#        new file:   app/controllers/build_info_controller.rb
#        new file:   app/helpers/build_info_helper.rb
#        modified:   config/routes.rb
#        new file:   test/functional/build_info_controller_test.rb
#        new file:   test/unit/helpers/build_info_helper_test.rb
#

$ git commit -m"Build info"
Created commit 037ca3b: Build info
 5 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 app/controllers/build_info_controller.rb
 create mode 100644 app/helpers/build_info_helper.rb
 create mode 100644 test/functional/build_info_controller_test.rb
 create mode 100644 test/unit/helpers/build_info_helper_test.rb

One last detail: we need to edit the Gemfile to load generate_from_diff into this application:

source 'http://rubygems.org'

gem 'generate_from_diff'
gem 'rails', '3.0.0.beta4' etc...

Finally we create our new generator by just running this command:

$ rails generate generator_from_diff build_info HEAD~1 HEAD
    create  lib/generators/build_info
    create  lib/generators/build_info/build_info_generator.rb
    create  lib/generators/build_info/USAGE
       run  git diff --no-prefix HEAD~1 HEAD from "."

Ok - what happened here was that I ran a generator called “generator_from_diff” that is located inside the generate_from_diff gem. I provided it with the name of the new generator I want to create: “build_info” in this example. This is similar to how the Rails 3 “generator generator” works: it generates a generator. But next I provide two Git revisions, in this example “HEAD~1” and “HEAD,” the first and second revisions in my Git repo. The first value is the baseline revision: what to compare to. In this example, this is my new, empty Rails application. The second revision is what code to record and save into the new generator, in this example this revision contains all of my controller and routes.rb changes.

Example: playing back code using a generator

Now let’s see if we can use this new Rails generator to copy the build_info controller and route into a different Rails app. First, let’s create a second, new Rails application:

$ cd ..
$ rails new second_app
    create  
    create  README
    create  Rakefile
    create  config.ru
...etc...
$ cd second_app

And next, let’s copy the new generator we just created in the first app, over to this new app:

$ mkdir lib/generators
$ cp -r ../first_app/lib/generators/build_info lib/generators

And now we can just run our new generator to playback the code changes that I recorded above:

$ rails generate build_info
      gsub  lib/generators/build_info/build_info.patch
       run  patch -p0 < /Users/pat/.../second_app/lib/generators/build_info/build_info.patch from "."
  patching file app/controllers/build_info_controller.rb
  patching file app/helpers/build_info_helper.rb
  patching file config/routes.rb
  patching file test/functional/build_info_controller_test.rb
  patching file test/unit/helpers/build_info_helper_test.rb

That’s it! Now I can run the second app and see the same build status page that we had before:

How does this actually work?

Here’s what is going on under the hood. First, when you record your code changes into the new generator like this:

$ rails generate generator_from_diff build_info HEAD~1 HEAD

... the “generator_from_diff” code actually runs the “git diff” command like this:

$ git diff HEAD~1 HEAD
diff --git a/app/controllers/build_info_controller.rb
           b/app/controllers/build_info_controller.rb
new file mode 100644
index 0000000..c44d83e
--- /dev/null
+++ b/app/controllers/build_info_controller.rb
@@ -0,0 +1,5 @@
+class BuildInfoController < ApplicationController
+  def index

...etc...

This produces a list of all the text changes that were made from one revision (HEAD~1) to another (HEAD). These are then saved into a file called “build_info.patch,” saved inside the new generator.

Later, the text differences, the “patch,” are applied to whatever new or existing files are found relative to the current directory when you run the generator. This copies the new controller file as well as the new route inside of routes.rb into the other application. The patch file is applied using this command:

patch -p0 < lib/generators/build_info/build_info.patch

I use patch instead of git apply to avoid the need to match revision id’s; these will be different from one repo to another.

Ok sounds interesting - so where are you going with this next?

I think it’s cool to be able to “record” Rails generators without writing any code. If this seems like a useful idea, then I’ll spend some more time to clean it up and make it more robust. For example, I’m thinking of adding some code to warn you before the patch is run if there are unexpected files present, or if some expected files are missing.

Next, I’m considering enhancing the gem to perform search/replace using arguments or options that you specify when recording the generator. For example, suppose you recorded a series of code changes that had to do with a model called “Person.” But imagine that you want to be able to playback those code changes in a target application that might have a different model name, “User” instead of “Person” for example. Then the gem could search/replace on the patch file, both when it’s recorded and again when it’s played back, to cause the generated code to use User instead of Person.

60th and 1st, 25 July, 2:00 PM.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Is anyone else addicted to Hipstamatic? Because I am.

Apparently, I'm all about the peaches.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Summer's bounty is everywhere these days. On trips to the market, I'm typically overwhelmed by the options on hand: berries, tomatoes, corn, melon, greens, stone fruit...they all abound, and, more often than not, temptation overwhelms my reason. I wind up with three pounds of peaches, or two pounds of plums, and I'm left - all alone - in my apartment, trying to figure out what to do with all of it before it goes bad on me.

This weekend, I decided to make a cake. As I often do when I am in need of inspiration, I headed over to Smitten Kitchen and did a little poking around. I searched for plum recipes, peach recipes, general stone fruit recipes...and hit the jackpot. I wanted something tasty that would showcase the peaches and plums I'd bought, but also be easy to get into the office the next morning. (I made a blueberry-nectarine buckle last week that nearly did me in on the subway.) Deb's dimpled plum cake seemed the perfect solution.

I didn't have enough peaches to make a lemon-and-peach version, so I went half and half: lemon with peaches and green plums. I was also out of light brown sugar, so I used dark - and loved the results. The cake was moist, with a fine crumb, and fragrant with lemon and molasses. And, true to expectations, it was remarkably easy to make and to transport - and, given that it was more or less gone by 1 PM, I'd say it was a hit at the office, too.

What more could a girl ask for out of some Sunday afternoon interwebs poking-about?

Dimply Peach and Plum Cake

Adapted from Smitten Kitchen

1 1/2 cups flour
2 tsp. baking powder
1/4 tsp. salt
Scant 1/4 teaspoon ground cinnamon
5 tbs. unsalted butter, at room temperature
3/4 cup (packed) dark brown sugar
2 eggs
1/3 cup canola oil
Grated zest of 1 lemon
1 1/2 teaspoons pure vanilla extract
Two peaches and three plums, halved and pitted

Place a rack in the center of your oven and pre-heat to 350 degrees Fahrenheit. Butter and flour an eight-inch square baking pan, and place on a cookie sheet. Set aside.

Stir together the flour, baking powder, salt and cinnamon in a small bowl.

In the bowl of a stand mixer fitted with the paddle attachment (or using a hand mixer fitted with the beaters), beat the butter on medium speed until it is light and creamy, about three minutes. Add the sugar and continue to beat on medium speed, about three minutes more, until the mixture is light, fluffy and uniform. Add the eggs one at a time, beating well to incorporate fully after each addition.

Beat in the oil, zest and vanilla, then reduce the speed to low and add the dry ingredients in two or three batches. Using a spatula, give the bowl a good swipe around the edges to make sure the batter is uniform. Pour into the prepared pan.

Arrange the plums and peaches prettily, cut-side up, in the batter. Jiggle them a bit to make sure their tops are even with the top of the batter.

Bake for 30-40 minutes, checking every five minutes past twenty to see how you're doing. When a knife or tester inserted into the middle of the cake comes out clean, you're done.

Set the cake on a rack to cool for at least fifteen minutes. (This will also give the fruit juice that's come out of the plums and peaches to seep into the cake.) When you're ready to serve the cake, run a knife around the edge and invert it onto a plate, then back onto a final plate. (In other words, serve fruit-side up.)

Serves 8.

Chin Chin

about 1 month ago | Suman Thareja: Spice it up!..

Its been around since 1987, the Chefs at Chin Chin must be doing something right.  There are a few dishes that I would go back for.  The cold string beans and bean sprouts they serve complimentary are worth the trip; wish they had them on the menu!! jumbo prawns szechuan ($29.50), they have a nice kick [...]

Perfect pancakes...and peaches.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

A couple of years ago, during my annual visit to Nick and Louisa, we ate the most delicious pancakes I have ever tasted. They come to us - unsurprisingly - courtesy of the amazing Ruth Reichl, who added her own personal pancake recipe to the Gourmet cookbook. Their marvelous texture and flavor come mainly from an exorbitant amount of butter in the batter and from being cooked as pancakes should be: gently, in just enough fat, over a moderate flame.

In fact, no matter the recipe, those are the basic principles to making a quality pancake. Too many of us let the skillet get too hot, or fail to wipe it down between batches. Doing so results, respectively, in burned outsides and raw insides, as well as a smoky, gritty mess of a pan. By following a few simple steps, we can all avoid the dreaded "first pancake" syndrome, and turn out perfect specimen after perfect specimen.

First of all: use enough oil, but not too much. If you are using a non-stick skillet, you want only the thinnest film of oil, about half a teaspoon per batch for a large (8 to 12 inch) skillet. For a standard skillet, use just a bit more; you should be able to swirl the oil around a bit - but just a bit.

Keep the heat moderate; when you drop your batter into the pan, it should hiss slightly and not stick, but it should brown slowly to a golden hue, not quickly to dark brown or black. Just keep an eye on it; if the edges of your pancakes bubble rapidly immediately, the pan is too hot. Don't be precious about adjusting the heat as you go; the pan will change in temperature as you add or remove pancakes to it. You must compensate by adjusting the flame.

Wipe out the pan between batches, and add fresh oil. If things have gotten really sticky and icky, use a bit of water to get the brown bits up from the bottom before wiping with a paper towel.

Finally, pay attention! Pancakes are not something you can walk away from. Watch how they bubble, how they firm up around the edges; they will not cook on a perfect schedule, so you must pay attention to them and flip them according to their own time.

Now that you know how to make pancakes in general, why not try these in particular? I've taken Ruth's superlative version and riffed on it a bit; the butter has been browned, and I've added chopped fresh peaches to the mix, in a nod to a) the season, and b) the fact that I didn't have any blueberries in the house this morning.

I hope you enjoy them!

Browned Butter Pancakes
Adapted from the Gourmet Cookbook

1 cup buttermilk (plain old milk will work, too)
2 eggs
3 tbs. canola oil
8 tbs. (1 stick) unsalted butter
1 cup flour
4 tsp. granulated sugar
4 tsp. baking powder
1 tsp. salt
3-4 ripe peaches, peeled, pitted and cut into 1/2-inch cubes
Additional canola oil, for cooking

In a small skillet or saucepan set over medium heat, melt the butter. Continue to cook just until the butter turns slightly brown and smells nutty. Set aside until cool.

In a small bowl, whisk together the buttermilk, eggs and oil, then whisk in the cooled, browned butter. In a medium bowl, stir together the flour, sugar, backing powder and salt. Stir in the milk mixture until just combined.

Heat 1/2 teaspoon or so of oil in a large skillet over moderate heat until hot but not smoking. Working in batches of two, pour 1/2-cup measures of batter into skillet. Drop five or six peach cubes into each pancake and cook until bubbles have formed on top and broken, about two minutes.

Flip pancakes with a spatula and cook until undersides are golden, about a minute or two longer. Remove from the pan to a warmed plate. Wipe out the skillet between batches, adding oil for the next batch to the clean skillet. Continue until all the batter has been turned into pancakes!

Makes about eight pancakes.

Taksim

about 1 month ago | Suman Thareja: Spice it up!..

Taksim.  The food is delicious and prices are reasonable at this middle eastern / turkish restaurant. One can survive just on the meze platter: eggplant salad, stuffed vine leaves, zucchini eggplant and peppers, cacik, tabuli and hummus.  Served with unlimited bread. But Why stop there..try the Lamb Adana Platter ($14.95) Squeeze some extra lemon for [...]

Indian state population and crime plot

about 1 month ago | Prasoon Sharma: Enterprise Software Does not Have to Suck

Comparison of population mix and number of crimes per year in Indian states


 
More populous states seem more dangerous - law of crouds


Comparison of population mix and number of crimes per person in Indian states

 


Is there a correlation between the religious mix in a state and riots in that state?

 


Which are the best and worst states to live in?
Using GDP/person as a proxy to growth and opportunities in a state, the following plot shows the states with high/low growth/opportunities and high/low crimes...

 




Examples of the implications of growth and opportunities and state of crime in Indian territories...




What could Indian states do to move to the "magic quadrant"?


Indian state crime plot

about 1 month ago | Prasoon Sharma: Enterprise Software Does not Have to Suck

Here's an attempt to plot crime in Indian states. The data was obtained from Systemic Peace Organization. Next I plan to overlay crime data on the state population.   

 

As population differs significantly in Indian states, here are the crimes/person to determine the safest and the most dangerous states.
  • Daman & Diu has the highest crime rate per person. This territory has liquor license whereas the state close to it, Gujarat doesn't. Could that be a contributing factor?
  • Bihar, Assam, Jharkhand and Rajasthan don't surprise as the most dangerous states but its interesting to see Kerela with high crime rate per person given its 100% literacy rate
  • The safe places to live include Nagaland, Delhi, Punjab, Haryana, Chandigarh.



India crime trend


Queenie's Treasury

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Happy weekend, guys! It's yet another sweltering day here in New York (95 and super-humid, yay!), and I've taken refuge from the sun in my apartment. Before I get down to figuring out what to do with the pound each of plums and peaches I bought this morning, it's time for an edition of the Treasury!

First up this week, an intriguing, slightly haunting story from the New York Times. Rokeby was built by the Astor family in the 19th century, and now, despite its crumbling state, it plays home to a motley crew of Astor and Livingston descendants, most of them artists. The piece is a captivating portrait of the decay of the American aristocracy; at Rokeby, an oval skylight installed by Stanford White co-exists with peeling paint and a lack of adequate heating. The photos have an eerie beauty, and I kind of want to poke around the place on my own.

J. Kenji Lopez-Alt has done it again. The MIT grad's Food Lab series for Serious Eats is one of the most awesome things on the interwebs, and his latest installation - instructions for making an In-N-Out Double-Double, Animal-Style - is the bomb. For those of us who live out here on the East Coast (read: sans In-N-Out), the ability to make a replica of the original right in a home kitchen is a pretty brilliant thing.

If you follow the interior design blogosphere at all, you've probably heard the news: Brides.com is now playing host to the Domino archives. Stories are being added slowly but surely, which is super-exciting, especially for those of us who don't have back issues on hand at home. One my favorite Domino stories of all time featured the design of editor Tori Mellott's 450 square foot apartment. Small space decorating is near and dear to my heart, and Tori's place is downright inspiring. I especially love her kitchen. That toile wallpaper and those kelly-green cabinets make me so, so happy.

Oh. Em. Gee.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

The march of the peaches continues, my friends, and I couldn't be happier about it. Last week, I spotted a recipe for peaches poached in wine and basil over at Food52 and instantly intrigued. I've always been more of a baker than a poacher, but something about the simplicity of the recipe (wine, basil, sugar, water, peaches) called to me.

The fact that I'd bought two pounds of peaches to no particular end might also have had something to do with it.

Regardless of motivation, the fact remains that I decided to make the poached peaches on Sunday afternoon. I tweaked the recipe in the smallest way (using rosé instead of white wine, since it's what I had on hand), but the results were still heavenly.

After only a few minutes of poaching (and a very easy peel), the peaches were even more luscious and heady than they'd been in their raw form. The syrup heightened their sweetness, and the slow poaching process coaxed the peaches from delightfully ripe to lusciously, sensually soft. The rosé wine lent itself to a rosier syrup than I'd expected, delicately scented with basil. Its remainders will, no doubt, make for amazing cocktails.

Guys, I gotta tell you: this is pretty much the sexiest dessert ever. For reals.

Enjoy. (Insert lascivious wink here.)

Peaches Poached in Wine and Basil
Adapted from TheRunawaySpoon on Food52

1 cup (dry) rosé wine
1 1/2 cups water
1 1/2 cups granulated sugar
1 large bunch basil (about two cups' worth of leaves)
6 ripe yellow peaches

Place the wine, water and sugar into a wide-bottomed saucepan and stir to dissolve the sugar a bit. Bring to a boil over medium heat, and continue to boil for five minutes. Turn the heat down and allow the syrup to simmer gently while you halve the peaches.

Cut the peaches in half and gently remove the pits. This can be a delicate undertaking, depending on how ripe the peaches are. Add half the basil leaves to the syrup, then place the peaches in the pan, cut side down. (If all of your peaches don't fit in one go, you can do multiple rounds.)

Poach the peaches cut side down for about three minutes, then turn them (I used my fish spatula) over and poach for an additional three or four minutes. When pricked with a knife, the peaches should give way easily.

Using a slotted spoon, remove the peaches to a plate. Add any peach juices from the cutting board to the pan, along with the remaining basil. Bring the syrup to a boil and cook until reduced by half. Pour in any juices that have collected from the peaches, and let cool to room temperature.

Serve the peaches drizzled with the syrup; whipped cream or vanilla ice cream would also be lovely. Reserve most of the syrup for use in cocktails. Trust me.

Serves six.

Eddie’s Pizza Truck

about 1 month ago | Suman Thareja: Spice it up!..

You gotta love NYC for its creativity; not that selling food out of a truck is a new concept; just the sheer number of trucks and the type of food they are selling is growing tremendously. Eddie’s Pizza Truck like many others have embraced technology as part of their business and marketing; they are on [...]

Hasgat - A book by Dilip Prabhawalkar

about 1 month ago | Niranjan Sarade: InLoveWithNature

Yesterday, my father gave a marathi book - 'Hasgat' to me. It is written by a well known and my favorite marathi actor Dilip Prabhawalkar. I could not resist myself to read his book. The book made my travel to office and back to home journey jovial.

The book is a collection of short stories which can be enjoyed any time. The common thread that binds these stories is the element of situational humour and the naive characters in each of these, reminiscent of the P.G. Wodehousian style, which has admittedly been one of Prabhawalkar's literary influences.

Dilip Prabhawalkar has done a great work in theatre, cinema, television and as a writer as well. Please take a look at his website :- http://dilipprabhavalkar.com/v1/indexHtml.htm

I have watched his drama - 'Hasvaphasvi' at least 8 to 10 times. You can see the pictures of six different character roles that he played in that drama at : http://dilipprabhavalkar.com/v1/hasvaphasvi.htm

Isn't it awesome ? :-)

Enjoy reading ...

Haandi

about 1 month ago | Suman Thareja: Spice it up!..

Haandi is symbolic of roadside truck stops in India/Pakistan; though in NYC its a cab stop.  If you can bear the hole in the wall feeling you could be in for a treat! Not everything is great (stick to the grilled stuff).  The chef is surely liberal with the oil in his/her cooking, though there [...]

Kalustyans

about 1 month ago | Suman Thareja: Spice it up!..

A proud post for Spice it up! Given Kalustyans in curry hill is known to sell over 4000 amazing spices, tea, snacks, cheeses, olives and a ton more from around the world. Rack after rack filled with spices one might not have even heard of.  Everywhere you look there is the bright yellow label describing [...]

Easy as tart.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

I think I might have mentioned how much I love blueberries. And how much I love peaches. What, therefore, could be better than a recipe that combines the two into one delicious whole? Not a whole lot.

I'm a big fan of peach-blueberry pie, made with mountains of peaches and a very few berries, but I wasn't thinking far enough ahead to such a creation when I did my marketing last Saturday. The result? A pint of gorgeous, plump blueberries, and two small peaches left over from half a week of snacking on their companions.

The solution? A recipe for a smallish, easy-to-make tart that emphasizes the berries, treats the peaches as a luscious garnish and generally busts any myth claiming that pastry is tricky to prepare. You can use your food processor to make the dough, which you then press into the pan. No rolling means no flour-strewn counters. This recipe is a one-paper-towel-clean-up kind of deal, friends.

Hope you like it!

Simple Blueberry-Peach Tart

For the crust:
1 1/4 cups flour
1/4 cup sugar
1/4 tsp. salt
1 stick (1/4 lb.) very cold butter (cut into bits)
1 egg yolk

For the filling:
1 pint blueberries
Juice of half a lemon
Scant teaspoon of cinnamon
2 tbs. turbinado sugar, divided
1/8 tsp. salt
2 peaches, sliced
1 tbs. milk or cream

Lightly whipped cream, for serving

Place the flour, sugar, salt and butter in the bowl of a food processor fitted with the blade attachment. Pulse until the mixture resembles a coarse meal. Add the yolk and pulse a few more times, until the mixture becomes to come together.

Dump the dough into the middle of a tart pan (I use my eight by ten inch rectangular tart pan; you can also use a nine or ten inch circular pan.). Using your hands or the flat bottom of a measuring cup, press the dough evenly into the bottom. Press the dough up the sides to the rim of the pan and set the tart pan on a baking sheet. Refrigerate the dough-lined pan for 30 minutes.

Place a rack in the center of the oven and pre-heat it to 375 degrees Fahrenheit. Meanwhile, mix the blueberries, lemon juice, cinnamon and one tablespoon plus one teaspoon of the sugar together in a medium bowl. Allow to sit while the oven pre-heats. Once the oven is ready, remove the tart shell from the fridge and pour the blueberry filling into it, distributing evenly.

Place the peach slices on top of the berries, arranging them evenly over the top of the tart. Sprinkle the entire tart with the remaining sugar and lightly brush the exposed crust with the cream. Place the tart in the oven and bake until the berries are bubbling and the crust is golden, about 25-35 minutes depending on your oven's personality.

Cool on a rack until nearly cool before serving. You can also cool the tart completely, cover it well with plastic wrap, and serve it the next day. (Note: if you are in an area with a lot of humidity, the crust may soften a bit overnight. It's still tasty, though!) Serve topped with whipped cream.

Serves six.

Dhaba

about 1 month ago | Suman Thareja: Spice it up!..

Since Indian food is so readily available to me at home, I usually don’t venture towards Indian restaurants, especially not buffets.  For $13 this buffet at Dhaba is worth trying.  Authentic flavors (not crazily spiced) and good ambiance (surprising!). Buffet typically has an appetizer, atleast two non veg dishes, 2-3 veg dishes, a ‘salad’ bar, [...]

10 important things while considering a web app

about 1 month ago | Gourav Tiwari: easy_software = Agile.find(ruby_on_rails)

I came across an interesting article by Fred Wilson:
http://thinkvitamin.com/business/fred-wilsons-10-golden-principles-of-successful-web-apps/

Easily add/remove Vim scripts

about 1 month ago | Ryan Kinderman: kinderman.net :

I like being able to easily add and remove Vim scripts, whether it's to try one out or easily upgrade to a newer version down the line. Since the directory structure of a script almost always follows the standard runtime directory structure, I simply wrote a script that adds each directory under $HOME/.vim/vendor to Vim's runtimepath, so that Vim includes the vendor directories in its script-searching behavior. That way, I can simply download something like rails.vim, which has files in autoload, doc, and plugin, and would be very annoying to remove manually, uncompress it into its own directory under $HOME/.vim/vendor, restart Vim, and the script is loaded. Removing the script is as easy as removing the directory under vendor and restarting Vim.

To add this behavior, simply put the following in your $HOME/.vimrc file:

let vendorpaths = globpath("$HOME/.vim", "vendor/*")

let vendorruntimepaths = substitute(vendorpaths, "\n", ",", "g")
set runtimepath^=vendorruntimepaths

let vendorpathslist = split(vendorpaths, "\n")
for vendorpath in vendorpathslist
  if isdirectory(vendorpath."/doc")
    execute "helptags ".vendorpath."/doc"
  endif
endfor

For the latest and greatest version of this code, refer to my vimrc.

Auto-saving sessions in Vim

about 1 month ago | Ryan Kinderman: kinderman.net :

Back when I used Textmate, I liked that you could save projects to a file so that you could quit Textmate and come back later, load the project file up, and have all the files and tabs set up and open the way you had them. Since switching to Vim, I've gotten the same functionality (and more!) using the :mksession command. One thing that's missing in Vim, however, is the ability to auto-save a session. There are a few add-ons that do this, but add a bunch of other functionality that I find unnecessary. Below is a little script I wrote that adds auto-saving sessions to Vim:

function! AutosaveSessionOn(session_file_path)
  augroup AutosaveSession
    au!
    exec "au VimLeave * mks! " . a:session_file_path
  augroup end
  let g:AutosaveSessionFilePath = a:session_file_path

  echo "Auto-saving sessions to \"" . a:session_file_path . "\""
endfunction

function! AutosaveSessionOff()
  if exists("g:AutosaveSessionFilePath")
    unlet g:AutosaveSessionFilePath
  endif

  augroup AutosaveSession
    au!
  augroup end
  augroup! AutosaveSession

  echo "Auto-saving sessions is off"
endfunction

command! -complete=file -nargs=1 AutosaveSessionOn call AutosaveSessionOn(<f-args>)
command! AutosaveSessionOff call AutosaveSessionOff()

augroup AutosaveSession
  au!
  au SessionLoadPost * if exists("g:AutosaveSessionFilePath") != 0|call AutosaveSessionOn(g:AutosaveSessionFilePath)|endif
augroup end

To begin auto-saving sessions, simply run:

:AutosaveSessionOn <session filename>

Your session will then be automatically saved to the given session filename when Vim exits. Also, if you have globals in your sessionoptions list, when you load the auto-saved session, auto-saving will continue to occur to that session file. To turn auto-saving to the session file off, run:

:AutosaveSessionOff

For the latest and greatest version, refer to my vimrc.

Indian state population plot

about 1 month ago | Prasoon Sharma: Enterprise Software Does not Have to Suck

Here's a quick R plot of population in Indian states and the breakdown by the religion people practice. The data was obtained from this Indian government site. I'm looking for other state-level data to overlay on this to find interesting patterns e.g. crime, literacy etc.



Here's the demographics of India on Wikipedia.

As next steps, I would like to:
1) "zoom" into the areas of chart that are too small to be interpreted properly, and
2) plot this data on the map of India.

Any suggestions?

OSCON

about 1 month ago | Pat Shaughnessy: Pat Shaughnessy - Home

Update: OSCON was a lot of fun... if anyone is interested in seeing the slides Alex and I wrote they’re up on slide share.

 

I just arrived in Portland for OSCON; my friend Alex Rothenberg and I are going to talk here about on Thursday about using Rails in the Enterprise… about some of the things he and I do at our day job while working with Rails and legacy technologies. We'll post the slides online later this week.

I won’t be blogging here, but if you’re interested in what’s going on at OSCON follow me on Twitter @patshaughnessy2, or the official tag is #OSCON. If you are in Portland definitely drop by and say hello!

Not too cool for school.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

One of the coolest things I'm doing this summer is going to school. That's right, I'm back on the books! The School of Visual Arts recently created an MFA program for Interaction Design, and I'm taking one of their Summer Intensive courses. So far, it's been a great experience. I'm working on a group project and seriously enjoying the assigned reading.

Our first individual assignment was to write a short essay about one of our design heroes. None of you, I'm sure, will be surprised to learn that I chose one Mrs. Julia Child. I thought I'd share my little essay with you, since I know you love her as much as I do - or, if you don't, you soon will!

Julia Child is widely credited with revolutionizing the way mid-20th century Americans cooked and ate - and rightly so. But while we typically think of Julia's influence flowing primarily from her television shows - The French Chef in particular - it was her innovative way of writing a recipe, more than anything else, that led to her enormous influence on American home cooking and cuisine.

Traditionally, a recipe is written as a list of ingredients followed by a set of instructions in paragraph form. Julia, however, knew that, when presented with recipes in this format, people tend to forgo reading through the recipe ahead of time, instead assembling the ingredients and diving in head-first. This method - cooking a recipe cold, without reading through the steps required - can often lead to confusion, mishaps and a frantic search for necessary equipment.

In Mastering the Art of French Cooking, Julia and her co-authors addressed this issue by listing ingredients and equipment alongside the relevant steps in the recipe instructions, instead of ahead of them. The result? Cooks were forced to read through the entire process ahead of time, ensuring a firmer grasp on the principles of the recipe and a far sunnier outcome.

Add in the book's incredible helpful, beautiful line drawings that assisted readers in the trimming or artichokes and trussing of chickens, and it becomes clear that Julia Child's Mastering the Art of French Cooking is a masterpiece of design as well as of cuisine.

Dispatch from the field: Union Square Greenmarket.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

July is a time of exceptional beauty at the Greenmarket. Tomatoes are finally out in full force, and bell peppers are popping up, too. Raspberries, blueberries and blackberries are parading through the stands.

Did I mention the peppers? These little Hungarian guys were all over the place last weekend, just begging to be mixed into a stir fry or chopped into a salad.

And stone fruit! Tiny, perfect, sweet-tart plums were everywhere, as were nectarines and peaches. Large, purple-skinned plums can't be far behind.

Tomatoes again, but I couldn't leave you without a last shot of the colorful goodness.

Cellini

about 1 month ago | Suman Thareja: Spice it up!..

Cellini, a tasty Italian in midtown.  Given where it is, it does tend to get the work crowd.  They serve complimentary cheese / olives along with the bread until you are ready to order..always a nice touch. Everything on their special’s menu looks great. Absolutely delicous.  Cileno “Gargano”: Brolied Chilean sea bass, salad of micro [...]

Food for thought....07/18

about 1 month ago | Lalatendu Das: Interpretations of Technorealism

few short articles for weekend reading...

  1. Impediments to Keeping Top Talent
  2. A hierarchy of failure worth following
  3. How to seek and destroy organizational silos
  4. How to improve a team's velocity 
  5. Agile Metrics

Stakeholder acceptance always trumps the greater good..does it??

about 1 month ago | Lalatendu Das: Interpretations of Technorealism


Things ..all agile organization must avoid..

Failsafe.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

If there's one hors d'ouevre that never goes out of style, it has to be the crudité plate. A platter of fresh, seasonal vegetables accompanied by a delicious dip is pretty much always a crowd-pleaser, at least in my circles. In fact, I could make a whole meal of crudités, given ample opportunity and time.

The key to a great crudité platter is twofold: keep the veggies interesting, seasonal and colorful, and keep the dip interesting and fresh. Packaged dips or bottled dressings simply won't do here, and since making a delicious fresh version takes about ten minutes, why would you bother with the overpriced, over-processed variety? As far as veggies go, get creative. This time, I let the Greenmarket be my guide, and wound up with zucchini, cucumbers, carrots, radishes and grape tomatoes. A few weeks ago, it might have been fennel, radishes and snap peas.

I've spent years searching for the perfect dip, and I think I've finally found it. The recipe has been right under my nose all this time, lurking in my well-loved (but apparently not well-enough-thumbed) copy of The New Basics Cookbook. It's a twist on the classic Green Goddess dressing from the 1970s, here re-invented as a slightly chunky, herb-filled dip. I've made a few changes (subbing in yogurt for sour cream; using anchovy paste in the place of minced filets), but it's pretty true to the original, and will no doubt make your guests ask for the recipe. (It's happened to me each time I've served it, and I love it!)

Go forth and appetize, my friends.

Green Goddess Dip
Adapted from The New Basics Cookbook

3/4 cup mayonnaise
3/4 cup plain yogurt
1/4 cup fresh lemon juice (about one lemon's worth)
2 tsp. anchovy paste (or 4 anchovy filets, finely minced)
1/4 cup finely chopped flat-leaft parsley
1 clove garlic, finely minced
2 tbs. thinly sliced scallions
2 tbs. finely chopped chives
2 tbs. finely chopped tarragon leaves
Kosher salt and freshly ground black pepper

Combine the mayonnaise, yogurt, lemon juice and anchovy paste in a medium bowl, and mix well. Stir in the remaining ingredients and taste the dip. Adjust the seasoning to your liking.

Cover the bowl with plastic wrap and refrigerate the dip for at least 3 hours to allow the flavors to blend.

Makes 2 cups of dip, enough for about 8-10 people.

Auto-saving sessions in Vim

about 1 month ago | Ryan Kinderman: kinderman.net :

Back when I used Textmate, I liked that you could save projects to a file so that you could quit Textmate and come back later, load the project file up, and have all the files and tabs set up and open the way you had them. Since switching to Vim, I've gotten the same functionality (and more!) using the :mksession command. One thing that's missing in Vim, however, is the ability to auto-save a session. Below is a little script I wrote that adds auto-saving sessions to Vim. For the script to work, you'll need to add globals to your sessionoptions.

function! AutosaveSessionOn(session_file_path)
  augroup AutosaveSession
    au!
    exec "au VimLeave * mks! " . a:session_file_path
  augroup end
  let g:AutosaveSessionFilePath = a:session_file_path

  echo "Auto-saving sessions to \"" . a:session_file_path . "\""
endfunction

function! AutosaveSessionOff()
  if exists("g:AutosaveSessionFilePath")
    unlet g:AutosaveSessionFilePath
  endif

  augroup AutosaveSession
    au!
  augroup end
  augroup! AutosaveSession

  echo "Auto-saving sessions is off"
endfunction

command! -complete=file -nargs=1 AutosaveSessionOn call AutosaveSessionOn(<f-args>)
command! AutosaveSessionOff call AutosaveSessionOff()

augroup AutosaveSession
  au!
  au SessionLoadPost * if exists("g:AutosaveSessionFilePath") != 0|call AutosaveSessionOn(g:AutosaveSessionFilePath)|endif
augroup end

For the latest and greatest version, refer to my vimrc. Currently, it only saves the session when quitting Vim. In the future, I'd like the auto-saving to happen on a number of common changes, but haven't looked into that yet. I'm fairly new to this Vim scripting stuff, so suggestions are welcome!

Test Driven Development

about 1 month ago | Prasoon Sharma: Enterprise Software Does not Have to Suck

The best quote on TDD...

Test driven development isn’t actually testing, but designing.
The code I might write in my unit test describes the design I’d like to see reflected in the code I’ll write. The running unit test doesn’t confirm my code is bug free, just that it meets the design I described in my unit test. Test Driven Development is a thinking technique; a designing technique.

Momiji Sushi

about 1 month ago | Suman Thareja: Spice it up!..

Its always a little sketchy when a restaurant’s menu looks like an album.  Makes you wonder how ‘fresh’ your food really is?  when was it REALLY made? How does a place manage to make 3000 things relatively well?  I don’t know the answer to those, but I do know Momiji Sushi has pretty tasty food [...]

Speaking at Agile NCR 2010

about 1 month ago | Biju Bhaskar: Thoughts on enterprise application development...

I will be speaking at Agile NCR 2010 this weekend. If you are in and around Delhi/Gurgaon region this looks like a great event to meet and hear from other agile enthusiasts.

 http://www.agileindia.org/agilencr2010


Here is the abstract of my talk:

Agile 2.0 - Our Road to Mastery
An experience report on how to sustain a successful agile adoption and take the road to mastery in agile.

Similar to other IT organizations we faced the challenge of keeping the momentum going after successfully rolling out agile. Some of the questions we faced were... how can we take the organization to next level in agile maturity? how can we make our good teams great? who should run it?

This report shares some successful change strategies, some failed approaches, and finally how we leveraged human passion to run the change process.

This is the life.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

I love my job. I like my life. And, most days, I'm pretty darn content with the demands they place on me. But, every once in a while, I sneak a glance over at the other side. What might it be like to be feckless and free, to be one of the ladies who lunch? One recent afternoon, I caught a whiff of luxury, and I liked it.

Lunch at Brasserie Ruhlman, Laurent Torondel's vast indoor/outdoor restaurant in Rockefeller Center, is most definitely a luxury. Menu highlights include steak frites, a lobster roll, oysters and sole meunière. Starting with shrimp cocktail, therefore, does seem the thing to do. What's more classic, or more perfect for a warm summer afternoon?

And I know you know that a true lady who lunches always orders steak tartar. After all, what good is a meal if it doesn't need to be mixed tableside? (Actually, this is the place to tell you that the service at Brasserie Ruhlman was a bit odd. Our waiter didn't seem to care for us much, and instead of offering to mix up my tartar himself, he said, "Would you like to stir?" and kind of walked away. Lame.)

And this is excellent steak tartar. The meat was fresh as could be, and the sauce and, er, fixins were wonderful: big, juicy, salty capers, chopped shallots, dill and parsley, all topped with a piquant dressing and a teeny, perfect quail egg. Yum.

The fries were pretty freaking awesome, too. If not terribly ladylike. Whatever.

Brasserie Ruhlmann
45 Rockefeller Plaza
212.974.2020

Little Thai Kitchen

about 1 month ago | Suman Thareja: Spice it up!..

Thai food is pretty easy to find in New York since there are so many options!  Really good Thai though is still harder to find.  This tiny restaurant, if you can call it that with 5-6 tables in midtown east lives up to its name: Little Thai Kitchen (LTK). Most dishes are pretty tasty and [...]

Tao

about 1 month ago | Suman Thareja: Spice it up!..

No matter how many times I go to Tao;  love it every time!  Its hard to go wrong with their menu. The lunch special is well priced and more food than you could want.  The food coma is totally worth it!  I recommend the Bang Bang Chicken Salad or the Peking Duck Spring Rolls.   The [...]

Le quatorze juillet.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

It's that time again, folks! Time for feasting, fireworks and patriotism.

No, no - this isn't a late Fourth of July post. This is a FourTEENTH of July post. Today is Bastille Day, the day when France celebrates the storming of the Bastille prison (a turning point in the French Revolution) and their république in general. Here in the States, it's a fabulous excuse to celebrate French culture, wine and food.

I plan to mark the occasion with a glass of champagne and a crêpe of some kind. Or maybe some mussels. Ooooh, or steak frites. Hmmmm...

How will you celebrate? Whatever French tradition, drink or meal you choose, get things started off right with a little Marseillaise action. That's right, kiddos. It's time for your annual Casablanca clip. Enjoy.

Where is Biju?

about 1 month ago | Biju Bhaskar: Thoughts on enterprise application development...

Apologies for not blogging for the last few months. It has been a crazy few months as I took up a new role in India. Now that things have settled down a bit, I plan to blog more. Keep watching this space  : )
thanks

Hell’s Kitchen

about 1 month ago | Suman Thareja: Spice it up!..

Mexican cuisine is probably in top 5 cuisines for me.  My second time at Hell’s Kitchen was just as satisfying as my first, with the exception of the Guacamole with homemade crispy guajillo corn tortillas ($11). Even though the tortillas are good, Guac is definately not worth it.  For Guac I would suggest Dos Caminos, [...]

On a roll.

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

I've lived on the Upper East Side of Manhattan for about seven years now. That's meant enduring seven years of raised eyebrows, "Oh, I'm so sorrys," and "But where do you eats?" Truth is, I moved to the neighborhood for the cheap rent, and stayed for the convenient commute. But, finally, my years of patient waiting (broken only by marvelous dinners at the now-shuttered Bar États-Unis and the slightly-too-dear-for-everyday Spigolo) seem to be paying off. The Upper East Side is creeping ever so slowly toward becoming cool.

No, really.

A few new places with cred have opened recently (not to mention the Shake Shack due to start slinging burgers by the end of the month), including an uptown branch of the downtown seafood mecca, Luke's Lobster. Jeremy and I visited their original East Village shop back in March, and thoroughly enjoyed ourselves. The rolls are plain and simple: lobster, butter, salt, pepper and a touch of Hellmann's, served up on a butter-toasted hot dog bun.

Now that they're so close to home, I've gotten the chance to try the shrimp roll, which is similarly unadorned, and just as tasty. The shrimp are small and tender, and pop lusciously in the mouth. For me, the buttered roll is half the point of a seafood roll, and the shrimp's less aggressive flavor lets the roll shine even brighter - so that made me pretty happy.

Most exciting of all, Luke's uptown branch has installed a Fryolator and will soon be serving fried belly clams. (As early as today; the staff needs to conquer some eyelash-singeing hiccups first.)

This New Englander couldn't be more excited. Bring. It. On.

Luke's Lobster
242 E. 81st Street (Between 2nd and 3rd Avenues)
212.249.4241

The Plaza Food Hall

about 1 month ago | Suman Thareja: Spice it up!..

The Plaza Hotel opened its Food Hall on June 1st!  Location, quality, food and prices are all pretty good. A fun place to hang out and catch up with a friend.  Private; yet public.  It has the location and ambiance, though prices are reasonable given its the Plaza.  And if you are running out of [...]

Queenie's Treasury

about 1 month ago | Queenie Takes Manhattan: Queenie Takes Manhattan

It's the weekend! Hallelujah! It's been a wild, wacky (and actually pretty wonderful) week chez Queenie, and I'm looking forward to a little bit of rest and relaxation over the next two days. Before I get down to the relaxation part, though, I need to bake a cake for this guy. And before that, I have some Treasury goodness to share with you. Here goes!

First up, a recipe for Planter's Punch from Serious Eats. Planter's Punch is a classic rum cocktail made with dark rum, simple syrup, lime juice and bitters. It's pretty much perfect for the kind of stiflingly hot weather we've been having in New York recently, and has some sentimental value for me, too. My grandparents used to have a house on a teeny little island in the Bahamas, and Planter's Punch was the cocktail my grandfather would have ready and waiting for guests upon their arrival. So, for my purposes, I shall re-christen the drink Pops' Punch - but you go ahead and call it whatever you like.

I love this room. I could live in this room. And, yes, I know - it's really, really pink. But still. I could live here. That ceiling! That table! That pendant! Love.

The Style Files brings you the prettiest lemonade ever. I don't plan to make any this weekend (see above, re: cake-baking), but I think you definitely should. Please send pictures, okay?

Planter's Punch photo courtesy of Art of Drink.

Using LEFT OUTER JOIN with SearchLogic

2 months ago | Pat Shaughnessy: Pat Shaughnessy - Home

LEFT OUTER JOIN queries are a great way to handle associations that may contain missing or null values. For example, suppose I have an application with a has_one/belongs_to association between books and authors.

class Book < ActiveRecord::Base
  has_one :author
end
class Author < ActiveRecord::Base
  belongs_to :book
end

If I want to identify the books that don’t have any authors, I can use this SQL statement:

SELECT * FROM books LEFT OUTER JOIN authors ON authors.book_id = books.id
WHERE authors.book_id IS NULL

I need to use LEFT OUTER JOIN here since a normal INNER JOIN query would only return books that have authors. Or if I want to sort the books by their author, I could use:

SELECT * FROM books LEFT OUTER JOIN  authors ON authors.book_id = books.id
ORDER BY authors.name

This sort would work even if some of the books didn’t have an author assigned to them. If we had used a normal INNER JOIN query the books with no author would have been dropped from the sorted list.

Today I’m going to discuss how to use LEFT OUTER JOIN with ActiveRecord and SearchLogic, allowing you to handle associations that might have missing records easily and cleanly.

ActiveRecord :joins

Before we go any farther, let’s setup the book/author example so we can explore how ActiveRecord handles joins:

$ rails outer_join_example
$ cd outer_join_example
$ script/generate model book title:string
$ script/generate model author name:string book_id:integer
$ rake db:migrate

And don’t forget to add the has_one/belongs_to lines to the two new models:

class Book < ActiveRecord::Base
  has_one :author
end
class Author < ActiveRecord::Base
  belongs_to :book
end

And now let’s create some books and authors we can use to test with:

$ script/console 
Loading development environment (Rails 2.3.5)
>> [ 'One', 'Two', 'Three' ].each do |title|
?> book = Book.create :title => title
>> book.author = Author.create :name => "Author of Book #{title}"
>> book.save
>> end

Let’s get started by looking at how you would sort the books by their author’s name, using a normal INNER JOIN query:

>> ActiveRecord::Base.logger = Logger.new(STDOUT)
>> Book.find(:all, :joins => :author, :order => 'authors.name')
       .collect { |book| book.title }
   Book Load (1.4ms)   SELECT "books".* FROM "books" INNER JOIN "authors"
                       ON authors.book_id = books.id ORDER BY name
=> ["One", "Three", "Two"]

Great – here using find with the :joins option we’ve told ActiveRecord to load all the books, and to join with the authors table so we can sort on the authors.name column. But watch what happens if I add a couple of new books that have no author yet, and then repeat the same INNER JOIN sort query:

>> Book.create :title => 'Four'
>> Book.create :title => 'Five'
>> Book.find(:all, :joins => :author, :order => 'name')
       .collect { |book| book.title }
   Book Load (1.8ms)   SELECT "books".* FROM "books" INNER JOIN "authors"
                       ON authors.book_id = books.id ORDER BY name
=> ["One", "Three", "Two"]

Books “Four” and “Five” are dropped entirely. This is because INNER JOIN only includes records in the result set that have values from both the books and authors tables. Since there is no author record for these books, they don’t appear at all.

ActiveRecord :include

The simplest way to get around this problem is to use ActiveRecord’s :include option, instead of the :joins option. Let’s rewrite that call to Book.find and use :include instead:

>> Book.find(:all, :include => :author, :order => 'authors.name')
       .collect { |book| book.title }
   Book Load Including Associations (2.8ms)   SELECT "books"."id" AS t0_r0,
"books"."title" AS t0_r1, "books"."created_at" AS t0_r2,
"books"."updated_at" AS t0_r3, "authors"."id" AS t1_r0,
"authors"."name" AS t1_r1, "authors"."book_id" AS t1_r2,
"authors"."created_at" AS t1_r3, "authors"."updated_at" AS t1_r4 FROM "books"
LEFT OUTER JOIN "authors" ON authors.book_id = books.id ORDER BY authors.name
=> ["Four", "Five", "One", "Three", "Two"]

Now we get books “Four” and “Five” in the sorted list; this is because ActiveRecord uses a LEFT OUTER JOIN query when you specify the :include option. Note they appear first since their author name values are both null, which is sorted before any of the other authors. If you read the ActiveRecord log output, you’ll see it generated a very complex SQL statement that explicitly mentions each column of both the books and authors tables. It used a column naming pattern, “t0_r1” etc., to identify each column. The reason for all of this is that ActiveRecord is executing the “Load Including Associations” operation, which is loading each and every attribute for all of the associated objects. This guarantees that we get every possible value for all the books and their authors.

So this is perfect! Now I can write a named_scope to sort books by their author name, including null authors, like this:

class Book < ActiveRecord::Base
  has_one :author
  named_scope :sorted_by_author_with_nulls,
    { :include => :author, :order => 'authors.name' }
end

And trying it in the console:

>> Book.sorted_by_author_with_nulls.collect { |book| book.title }
  Book Load Including Associations (3.9ms)   SELECT "books"."id" AS t0_r0,
"books"."title" AS t0_r1, "books"."created_at" AS t0_r2,
"books"."updated_at" AS t0_r3, "authors"."id" AS t1_r0,
"authors"."name" AS t1_r1, "authors"."book_id" AS t1_r2,
"authors"."created_at" AS t1_r3, "authors"."updated_at" AS t1_r4 FROM "books"
LEFT OUTER JOIN "authors" ON authors.book_id = books.id ORDER BY authors.name
=> ["Four", "Five", "One", "Three", "Two"]

I can now also write this named_scope called “missing_author,” which returns just the books that have a missing author:

class Book < ActiveRecord::Base
  has_one :author
  named_scope :sorted_by_author_with_nulls,
    { :include => :author, :order => 'authors.name' }
  named_scope :missing_author,
    { :include => :author, :conditions => 'authors.name IS NULL' }
end

And in the console:

>> Book.missing_author.collect { |book| book.title }
  Book Load Including Associations (1.9ms)   SELECT "books"."id" AS t0_r0,
"books"."title" AS t0_r1, "books"."created_at" AS t0_r2,
"books"."updated_at" AS t0_r3, "authors"."id" AS t1_r0,
"authors"."name" AS t1_r1, "authors"."book_id" AS t1_r2,
"authors"."created_at" AS t1_r3, "authors"."updated_at" AS t1_r4 FROM "books"
LEFT OUTER JOIN "authors" ON authors.book_id = books.id
WHERE (authors.name IS NULL)
=> ["Four", "Five"]

What’s wrong with :include?

It sounds like I’m done and that the :include option is the perfect way to handle associations that might contain null or missing values. But not so fast… it turns out that using :include is often a bad idea. A great resource on :joins and :include options is Ryan Bates’s screen cast from 2009. If you think you need to use one of these find options, invest a few minutes and listen to Ryan’s explanation. Here I’ll just mention a couple of potential problems with using :include with named scopes:

1. It‘s potentially slow and wasteful. :include causes ActiveRecord to load every attribute for every included associated object, which is often much more information than you really need. If your named scope only requires one or two columns from the associated table, then using :include might be overkill.

2. As Ryan mentions, you lose control over the “SELECT” portion of the query. This means that if you write a named scope that uses :include, like the missing_author example above, then you can’t chain it together with other named scopes that contain a select option. For example, you couldn’t write code like this:

Book.missing_author.scoped(:select => 'DISTINCT title')

This might appear to work, but if you look at the query ActiveRecord generates you’ll notice that it doesn’t contain the DISTINCT keyword. This is because the Load Including Associations query ignores the select scope.

A better way to write a named_scope that uses LEFT OUTER JOIN is actually to go back to the :joins option, like this:

class Book < ActiveRecord::Base
  has_one :author
  named_scope :sorted_by_author_with_nulls, {
    :joins => 'LEFT OUTER JOIN authors ON authors.book_id = books.id',
    :order => 'authors.name'
  }
  named_scope :missing_author, {
    :joins => 'LEFT OUTER JOIN authors ON authors.book_id = books.id',
    :conditions => 'authors.id IS NULL'
  }
end

Here I’ve written the join clause of the query for each scope, typing in the LEFT OUTER JOIN syntax explicitly. Here’s the example from above using DISTINCT:

>> Book.missing_author.scoped(:select => 'DISTINCT title')
   Book Load (1.1ms)   SELECT DISTINCT title FROM "books"
                       LEFT OUTER JOIN authors ON authors.book_id = books.id
                       WHERE (authors.id IS NULL) 
=> [#<Book title: "Four">, #<Book title: "Five">]

It works now since the :joins option simply adds LEFT OUTER JOIN to the query without rewriting the entire SELECT statement. Then ActiveRecord combines the join with the select scope, inserting the DISTINCT keyword into the query.

Customizing SearchLogic to use LEFT OUTER JOIN

Ok – now using the same techniques from my last post, let’s see if we can customize SearchLogic to support this sort of named scope. First let’s install SearchLogic into our sample app:

$ script/plugin install http://github.com/binarylogic/searchlogic.git

And next, let’s implement a new named scoped called “without_author” that will work the same way as the “missing_author” scope from above. We’ll use method_missing the same way that SearchLogic does; see my last article for a more complete explanation. Here we go:

class Book < ActiveRecord::Base
  has_one :author
  class << self
    def method_missing(name, *args, &block)
      if name == :without_author
        named_scope :without_author,
          {
            :joins => 'LEFT OUTER JOIN authors
                       ON authors.book_id = books.id',
            :conditions => 'authors.id IS NULL'
          }
          without_author
      else
        super
      end
    end
  end
end

And let’s try it in the console:

>> Book.without_author.collect { |book| book.title }
   Book Load (1.3ms)   SELECT "books".* FROM "books" LEFT OUTER JOIN authors
   ON authors.book_id = books.id WHERE (authors.id IS NULL) 
=> ["Four", "Five"]

Works perfectly! All we need to do now is generalize this for any model and association. Following the pattern from the SearchLogic source code, to get a list of associated models I can call “reflect_on_all_associations.” This will return a list of AssociationReflection objects, each of which represents an association between this model (Book) and some other model (Author). See the ActiveRecord source code for more details.

Here’s what the code looks like with the call to reflect_on_all_associations:

class Book < ActiveRecord::Base
  has_one :author
  class << self
    def method_missing(name, *args, &block)
      association_names =
        reflect_on_all_associations.collect { |assoc| assoc.name }
      if name.to_s =~ /^without_(#{association_names.join("|")})$/
        named_scope :without_author,
          {
            :joins => 'LEFT OUTER JOIN authors
                       ON authors.book_id = books.id',
            :conditions => 'authors.id IS NULL'
          }
          without_author
      else
        super
      end
    end
  end
end

You can see that we construct a regex pattern from a list of associated model names, joined with the | character. For example, if there were 3 associated models, then we would use /without_(assoc1|assoc2|assoc3)/… in this example since Book has only one associated model, we have a simple regex pattern: /without_(author)/.

Let’s make sure the code still works in the console:

>> Book.without_author.collect { |book| book.title }
   Book Load (1.0ms)   SELECT "books".* FROM "books" LEFT OUTER JOIN authors
   ON authors.book_id = books.id WHERE (authors.id IS NULL) 
=> ["Four", "Five"]

So far so good. The next thing we need to do is replace the hard coded values in the call to named_scope. To do this, we’ll need the AssociationReflection object that corresponds to the matching association name. Here’s some code that does that:

def matching_association(match)
  @matching_association ||= reflect_on_all_associations.detect do |assoc|
    assoc.name.to_s == match
  end
end

If we pass in the matching name from the regex pattern above, e.g. matching_association($1), then we’ll get the corresponding association object. Once we have that, we can get the name of that association’s database table and primary key:

associated_table = matching_association($1).table_name
associated_key = matching_association($1).primary_key_name

One subtle point to note here: ActiveRecord's AssociationReflection.primary_key_name method actually returns the foreign key column for this association, the book_id column in the authors table, and not the primary key of the authors table, which would have just been id. It works properly, but possibly should have been named foreign_key_name. Anyway, now we’ll need these values to construct our LEFT OUTER JOIN and condition strings. These methods do that:

def join_clause(associated_table, associated_key)
  outer_join = "LEFT OUTER JOIN #{associated_table}"
  outer_join += " ON #{associated_table}.#{associated_key}"
  outer_join += " = #{quoted_table_name}.#{primary_key}"
end

def where_clause(associated_table, associated_key)
  "#{associated_table}.#{associated_key} IS NULL"
end

Finally, we can put it all together like this:

class Book < ActiveRecord::Base
  has_one :author

  class << self
    def method_missing(name, *args, &block)
      association_names =
        reflect_on_all_associations.collect { |assoc| assoc.name }
      if name.to_s =~ /^without_(#{association_names.join("|")})$/
        associated_table = matching_association($1).table_name
        associated_key = matching_association($1).primary_key_name
        named_scope name,
          {
            :joins => join_clause(associated_table, associated_key),
            :conditions => where_clause(associated_table, associated_key)
          }
        send(name)
      else
        super
      end
    end

    def matching_association(match)
      @matching_association ||= reflect_on_all_associations.detect do |assoc|
        assoc.name.to_s == match
      end
    end

    def join_clause(associated_table, associated_key)
      outer_join = "LEFT OUTER JOIN #{associated_table}"
      outer_join += " ON #{associated_table}.#{associated_key}"
      outer_join += " = #{quoted_table_name}.#{primary_key}"
    end

    def where_clause(associated_table, associated_key)
      "#{associated_table}.#{associated_key} IS NULL"
    end
  end
end

Note that I used “send(name)” to call the named scope we just created with named_scope. Let’s make sure it still all works properly in the console:

>> Book.without_author.collect { |book| book.title }
   Book Load (1.0ms)   SELECT "books".* FROM "books"
   LEFT OUTER JOIN authors ON authors.book_id = "books".id
   WHERE (authors.book_id IS NULL) 
=> ["Four", "Five"]

Phew – it does! Ideally I would have some RSpec examples setup to test this, instead of using the console.

Just like in my last article, the last thing I’ll do today is move these class methods out of the Book model and into a new module called SearchLogicExtensions, which in my application I saved into a file called config/initializers/search_logic_extensions.rb. This causes the method missing code to be loaded when my app starts up. At the bottom I extend ActiveRecord::Base with the new module, so the named scope can be used by every model in my application:

module SearchLogicExtensions
  def method_missing(name, *args, &block)
    association_names =
      reflect_on_all_associations.collect { |assoc| assoc.name }
    if name.to_s =~ /^without_(#{association_names.join("|")})$/
      associated_table = matching_association($1).table_name
      associated_key = matching_association($1).primary_key_name
      named_scope name,
        {
          :joins => join_clause(associated_table, associated_key),
          :conditions => where_clause(associated_table, associated_key)
        }
      send(name)
    else
      super
    end
  end

  def matching_association(match)
    @matching_association ||= reflect_on_all_associations.detect do |assoc|
        assoc.name.to_s == match
    end
  end

  def join_clause(associated_table, associated_key)
    outer_join = "LEFT OUTER JOIN #{associated_table}"
    outer_join += " ON #{associated_table}.#{associated_key}"
    outer_join += " = #{quoted_table_name}.#{primary_key}"
  end

  def where_clause(associated_table, associated_key)
    "#{associated_table}.#{associated_key} IS NULL"
  end
end

ActiveRecord::Base.extend(SearchLogicExtensions)

Ghenet

2 months ago | Suman Thareja: Spice it up!..

Absolute favorite restaurant in the NY area: Ghenet (Brooklyn)…If you like your food to have a kick and don’t mind eating from the same plate with your hygenic friends..this is a must try! I suggest an appetizer and a combination platter (veg or non veg) for first timers.  Best value for your money too! Appetizer: Engouday [...]

World Bank data plots

2 months ago | Prasoon Sharma: Enterprise Software Does not Have to Suck

Couple of weeks ago, I was looking for interesting data sets to play with using R. I came across this post and got inspired to use World Bank data to extract interesting patterns/facts about developing countries. World Bank has 300+ World Development indicators on 200+ countries from 1960 to 2008.

I plotted BRIC (Brazil, Russia, India, China) nations against USA.  Here are some plots on a few topics...

Economic Policy and External Debt



Education



Environment



Financial Sector



Health



Infrastructure



Labor



Private Sector



Public Sector



Science and Technology



Social Development



Urban Improvement

Get thee a galette!

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Berry season is in full swing here in New York, which means fresh blueberries are abundant. The berries are at the height of their goodness: they're firm and sweet and just a tad tart. And while berries from southern New England and the Midatlantic don't get the magnificently wild tang that graces berries from Maine, ours are still pretty darn good.

When faced with a pile of in-season fruit of any variety, my first instinct, typically, is to bake a tart. This time around, it's a blueberry galette, a free-form tart very similar to the strawberry-rhubarb crostata I made back in the beginning of June. Instead of individually sized tarts, here I've made one large dessert to serve a group of four or five, but it's just as easy to make as the crostata, and just as fun to eat.

I've seasoned the tart with my favorite combination for blueberries: sugar, vanilla and cinnamon, along with a dotting of butter and a hint of salt. The butter and vanilla lend the berries richness, while the cinnamon adds a spice to heighten their tart nature. Once you add all that, you will, of course, need a bit of sweetened whipped cream to cut through it.

Am I right?

Blueberry Galette


For the pastry:

1 1/4 cups flour
1/4 cup polenta
2 tsp. granluated sugar
1/4 tsp. salt
1 stick butter, very cold or frozen, cut into 1/2-inch bits
3 tbs. ice water

For the filling:
1 pint of blueberries, rinsed and dried
2 tbs. turbinado sugar
1/2 tsp. cinnamon
1/2 tsp. vanilla
1/8 tsp. salt
1 tbs. butter, cut into 1/4-inch bits

1 egg, beaten with a tablespoon of cold water
Sweetened whipped cream, for serving

Place the flour, polenta, sugar salt and butter in the bowl of a food processor fitted with the blade attachment. Pulse together until the mixture is mealy and most of the butter is about the size of small peas. With the processor running, stream the water in one teaspoon at a time until the mixture begins to come together in one or two big clumps. You may not need all the water, depending on the humidity in your ingredients and the air. (Alternately, you can make the pastry in a medium bowl, using a pastry blender. A food processor is super-fast, but a pastry blender works well, too. Make sure to chill the bowl ahead of time.)

Turn the dough out onto a lightly floured surface and mold into a large disc. Wrap in plastic wrap and place in the refrigerator. Let the dough rest for at least an hour; it can sit in the fridge for up to 36 hours before you use it.

When you're ready to make the filling and bake the galette, take the dough out of the fridge and let it sit; this will help take the chill off a bit. Pre-heat the oven to 375 degrees Fahrenheit. Place the blueberries in a medium bowl and add the sugar, cinnamon, vanilla and salt. Toss to combine evenly, and set aside while you roll out the pastry.

Lightly flour a piece of parchment paper and place the dough in its center. Flour your pin and use it to whack the disk of pastry once or twice, then start rolling it out from the middle outward, spinning it if you need to, until you have a roughly circular shape about 1/4 inch thick. Transfer the crust (on the parchment paper) to a cookie sheet.

Spoon the filling into the middle of the tart, leaving about two inches of crust as a border. Starting anywhere you'd like, fold the pastry up over the filling. Continue to fold in triangles as you go around the tart (Refer to the photo above; it's easy to do once you take a look at a finished version, I think.) until all the edges are folded over the filling, leaving a nice circle of pretty fruit exposed. Using a pastry brush, paint the crust with the beaten egg; this will give it a nice sheen. Dot the exposed filling with the butter.

Place the tart in the oven and bake for 25-35 minutes, depending on your oven, rotating the tart halfway through baking. Bake until golden-brown and bubbly; the crust may leak some juices, but should hold up pretty well in any case, despite the liquid. Once the tart is done, remove it from the oven and transfer it, on its parchment paper, to a cooling rack. Cool close to completely before slicing. Serve topped with whipped cream.

Serves four to five, generously.

New friends and noodles.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Last week, I met a new friend for dinner at Momofuku Noodle Bar. Jason is someone I've been tweeting with for more than a year now. He's been living in Boston, but moved to New York about a month ago - something I find very, very brave. He's living in Park Slope, but I insisted we have our first meal together at one of my favorite Manhattan spots.

It was a warm evening, and I ordered the ginger-scallion noodles, a tangle of hot ramen dressed in room-temperature ginger-scallion sauce and topped with pickled cucumbers and marinated mushrooms. I, of course, added several glugs of Sriracha and proceeded to attack the bowl. Yum.

To drink, Jason and I both went for the shoju slushies: limeade, this time. I had a small, but could have had about four large ones. But that might give my new friend the wrong impression. Gotta save the drunkenness for a little while, at least. Right?

Grill-tastic.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

One of the best things about having an actual backyard is the ability to grill with abandon. I really, really miss grilling; it's been almost nine years since I had a grill at my disposal, and, believe me - I feel its absence.

So, of course, I was seriously psyched to get to eat a whole lot of grilled goodies during my trip to Ohio last month. Nick and Louisa are pretty amazing with the grill; Nick's ribs in particular are really. Effing. Good. On this trip, though, we tried to be a bit healthier, and went with slightly less naughty cuts and sauces. We grilled some gorgeous peppers and spring onions one night, to eat alongside...

...this. This is matambre (courtesy of The Gourmet Cookbook), a traditional Argentinian preparation for flank steak. You butterfly the flank steak and fill it with a mixture of breadcrumbs, garlic, parsley, spinach, bacon and carrots, held together with a bit of the rendered bacon fat. Rolling it and tying it for grilling is most definitely a two person job, but once it's ready to go, it's easy to finish.

And super-easy to eat. The meat was seriously flavorful after sitting only an hour or so full of filling; it would probably be even more impressive having sat around for a whole day - which you can totally do. An excellent option for making ahead of time.

Another night, we tried Gourmet's Foolproof Grilled Chicken. It's brined before it's grilled, and once it's cooked, you dip it in a spicy, Asian-inspired vinaigrette made with fish sauce and lime juice. It is, in a word, delicious.

And did I mention...smoky from the grill? Oh yes.

Augmented Array in Ruby

2 months ago | Niranjan Sarade: InLoveWithNature

Few days ago, I was randomly going through the Ruby Array class API and the method '*' caught my attention.

array * int -> an_array : Returns a new array built by concatenating the int copies of self.

[ 1, 2, 3 ] * 3 #=> [ 1, 2, 3, 1, 2, 3, 1, 2, 3 ]

I just had a thought can I have a method named '/' which will return a new array by splitting the array into arrays of int divisor elements each ?

The functionality that I was looking for :-

[1,2,3,4,5,6]/1 # => [[1], [2], [3], [4], [5], [6]]
[1,2,3,4,5,6]/2 # => [[1, 2], [3, 4], [5, 6]]
[1,2,3,4,5,6]/3 # => [[1, 2, 3], [4, 5, 6]]

I gave it a try, my fingers typed the code as per my brain's instructions and it worked the way I expected.

Then I saw the methods at(index) and fetch(index) and thought can I fetch or even set the elements of the array with the index as if index acting as array's attributes ?

Like this :-

ary = [1,2,3]
ary._0 = 25
ary._0 # => 25
ary._1 = 10
ary._1 # => 10
ary # => [25, 10,3]

For the above to work, I played with the method_missing method.

Few things that I noticed in the Array class were it has 'first' and 'last' methods but not 'first=' and 'last=' methods. It has 'nitems' method which returns the number of non-nil elements, but no 'nilitems' method which will return nil elements in the array.

My mind started to think whether I can build some other useful methods as well and it came to a sufficiently big list which I finally moved into a gem. I named the gem as 'augmented_array' and pushed it to gemcutter.

Install:
====
gem install augmented_array

Uninstall:
====
gem uninstall augmented_array

Source Code is available at my Github repository.

Summer in a bowl.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Corn is in season, folks! Corn started showing up at the Greenmarket during the last weekend of June, just in time for the Fourth. There's little that says "summer" to me quite as clearly a fresh ear of sweet yellow corn, so, of course, I had to snap some up to feed myself over the long holiday weekend. I nabbed five ears and decided to use the first to make one of my favorite treats: warm corn and tomato salad.

I've made endless variations of this salad over the years; my favorites always include garlic, chives and a healthy amount of salt and pepper. This time around, I added a handful of gorgeous scallions and topped the whole thing with a fried egg - the easiest way to turn a bowlful of veggies into a fully-rounded meal.

This salad is a celebration of early summer, one that can be enjoyed for breakfast, lunch or dinner - or all three, if that's how you roll.

Corn and Tomato Salad with a Fried Egg

2 tsp. olive oil, plus more for frying the egg
1 clove garlic, finely chopped
2 scallions, thinly sliced
1 ear of corn, sliced off the cob
1 medium tomato, cut into 1/2-inch pieces
2 tbs. chives, finely chopped
1 egg
Salt and freshly ground black pepper

Heat 2 tsp. of olive oil in a small (6-inch) skillet set over medium heat. Once hot, add the garlic and scallions and saute for a few minutes, until the garlic is fragrant and the scallions are softened.

Add the corn to the pan and saute for a minute or two, mixing the corn well with the aromatics. Add the tomato and season with salt and pepper. Cook for about a minute, stirring, and then add 2/3 of the chives to the pan. Cook for another minute or so, then remove the mixture to a shallow bowl.

Wipe out the skillet with a paper towel. Add enough olive oil to thoroughly coat the bottom of the pan and set it to warm over medium heat. Crack the egg into a ramekin. Once the pan is hot, add the egg slowly to the pan, doing your best to center the yolk in the white.

Fry the egg over medium heat for 3-5 minutes, depending on how done you like your eggs. Season lightly with salt and pepper, then remove from the pan with a slotted spatula (I like this one.) and add it to the top of the corn and tomato mixture.

Top the egg and salad with the remaining chives, season to taste with salt and pepper, and eat!

Serves one.

Getting to an effective Daily Stand Ups

2 months ago | Prashant Kumar: Just Like That or May be NOT!!!

I just stumbled across a great read on Daily stand ups -> http://bit.ly/a6UXXJ

Getting in the spirit, Greenmarket-style.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Even the Greenmarket was patriotic this weekend.

Between the blueberries, raspberries, sweet cherries and red and white currants, it was a veritable playground for those eager to bake a flag cake, cherry pie, or berry tart. (I'm among that last group there. Recipe for blueberry galette, coming up!

Independence: worth celebrating.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Happy Fourth of July, everyone! Independence Day in the States is generally considered to be a time of barbecues, fireworks and general merriment. (Lest we forget, though, here's the reason we're celebrating: our Declaration of Independence.) Me? I'll be spending the day making a blueberry tart, doing a little shopping, and seeing a French movie. I know, I know - sacrilegious!

It's not that I wouldn't love to be barbecuing in the open air, but this is New York, and that sort of thing is a bit harder to come by. Instead, we drink rosé at cafe tables, enjoy a delicious meal, and recall our status as one of the nation's original capital cities.

How are you celebrating the Fourth?

"Right thing all the time"

2 months ago | Riju Kansal: Riju's Thoughts Captured...

Doing the right thing all the time. Every minute, every day, thruout the year. This is the hidden meaning behind the saying - 'Right thing @ Right time'. When you do right thing all the time, automatically when right time comes, the results accelerate. People call it luck. :)

Queenie's Treasury

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Happy Fourth of July weekend, everyone! In a move I consider to be true to the holiday's culinary traditions, I've bought a pint of blueberries to use in a small tart tomorrow, and cannot wait for some seriously good fireworks. In the meantime, here are some Treasury picks to entertain you.First up this week, a fabulous spot for vintage goodies. Haven Vintage's Etsy shop is my latest favorite. I've been poking around for some vintage cocktail glasses for a bar cart (another recent obsession), and found a gorgeous set of gold, faux-cane old-fashioneds at Haven. They have a perfectly curated assortment of vintage and antique pieces, mostly small housewares. I can picture this yellow wire basket holding throw blankets in a bedroom corner, and the bar towels? They just make me happy!

Next, an interesting article from the New York Times about Connecticut's cutthroat world of farmers' market promotion and, well, marketing. The field is so flush with contenders in the state that markets have begun offering promotions and discounts to entice buyers to their booths. I wish this were a problem in some of the neighborhoods here in New York.

Last, a little something to make you smile - or, if you're like me, to make you laugh so hard that your coffee almost comes out your nose. Catalog Living is a new blog chronicling the ridiculousness that is housewares catalog styling. Random hats under the coffee table? Giant, impossible seashells? Useless, oversized abacuses? (Abaci?) Catalog Living has - and mocks - it all. I can't get enough.

Experienced power of Automation Testing!

2 months ago | Riju Kansal: Riju's Thoughts Captured...

Recently I experienced a wonderful effect of Automation Test Suite. I think I'd like preserve this experience in the form of few words and share it with friends.


Present Scenario:
Cycle 3 Started beginning of this week.
The 26 Test Sets totalling 3000+ automated test cases started to be executed.
Test data was prepared as a pre-requisite by SME manual testing team.
The very first day of Cycle 3 execution the application which was nearing UAT completion, started crying.
23 Critical, High and Medium defects were logged the very first day.
The management lost confidence in the build.
No Go.

Scenario a couple of months back:
Automation suite creation in progress.
The scripts are failing due to problems within themselves.
The automation review process is identifying a lot of issues within scripts.
The naming conventions are not being followed completely.
No test data management strategy is documented.
Testing team starts estimating 100% manual regression cycle.
Management sees low confidence in automation testing.

How did the perspective change within a couple of months?
Results.

Business looks for results to accept success on ROI.
But someone in the top leadership had the "vision" to be patient and invest in building an Automation test suite. They accepted waiting and waiting for the build and review cycle of automation test suite, to be complete.

Recently, just on click of a button the 3000+ test cases drilled thru the huge complex application with a huge business value. Helping the leadership to decide quickly not to launch the product at this point in time, and wait for the desired quality in the product to be built.

Last gasp.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Strawberry season is drawing to a close.

I actually couldn't believe how plentiful the berries still were last Saturday, and I was glad for it. Late-season berries tend to be sweeter and gushier; they're basically sugar held loosely together by vitamin C and strawberry seeds.

You have to eat them the day you buy them, lest they turn into strawberry booze overnight, but that's okay. After all, how could you ever resist?

Maybe there will be some tomorrow, too. Mmmmm...

The One Minute Manager

2 months ago | Niranjan Sarade: InLoveWithNature

Yesterday I read a management book - 'The One Minute Manager' written by Ken Blanchard and Spencer Johnson. I liked that book very much. It's practical. It includes some examples demonstrating how you can effectively handle the people under you. By the book definition, effective managers manage themselves and the people they work with so that both the organization and the people profit from their presence.

The metaphor, The One Minute Manager means it takes very little time for that manager to get big results from people and behind this success lie just three secrets :-

- One minute goals
- One minute praisings
- One minute reprimands

One should read this little book to know more about these secrets.
It is really good to know that the leaders of American and Japanese industry have made this book compulsory reading for all their managers.

Enjoy reading ...

Packaging lust.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

When Louisa and I visited the farmers' market at Crocker Park, we also stopped in to Trader Joe's for some additional provisions.

We have a Trader Joe's in Manhattan these days, but I don't go there terribly often. It's down in Union Square, and I'm typically pretty Greenmarket-focused whenever I'm there.

As a result, I haven't had a lot of opportunity to admire Trader Joe's packaging up close and personal. I was seriously blown away by the boxes of pudding.

I don't really care for instant pudding (though I'm sure theirs is better than most), but the packaging? It's fabulous! It's retro-magical! It's a 50s party in your grocery cart!

Now that's what I call a vacation.

2 months ago | Queenie Takes Manhattan: Queenie Takes Manhattan

Gewurtztraminer.

Rosé.

Happiness.