On the Wednesday of my staycation, I met my friend Anica for dinner at a tiny little place called Dirt Candy. The candies in question are, of course, vegetables, those sometimes sweet, sometimes fresh, sometimes bitter, always tasty products of the soil. I love vegetables, as you well know, but I've been disappointed by the vast majority of vegetarian restaurants in which I've dined. They're usually all about austerity and making a chore of eating - which is a pretty horrifying thing to pay for, when you think about it.
But Dirt Candy (under the guidance of chef Amanda Cohen) is very, very different. It's vegetarian, yes - and they'll go vegan if you like - but it's the opposite of austere, boring or punishing. Our starter is a perfect example of the spirit of the place: jalapeno hush puppies, served with whipped maple butter. The hush puppies were lovely. Piping hot and studded with bits of hot pepper, they were made most delicious by the sweet, round flavor of the butter, which melted and pooled on contact. (We actually sneaked the butter off the plate and held onto it for the rest of the meal. I have resolved to serve as many things as possible with maple butter in future.)Our waitress recommended we each get both an appetizer and a main course; to tell the truth, we would have been fine forgoing at least one of the four dishes, but it was nice to taste so many things. I started with the barbecue carrot buns, which were served with a salad of cucumber, sesame and ginger. The salad was actually my favorite part of the dish; the buns, while tasty, were a bit under-seasoned and not quite, well, barbecue-y enough.
Anica's starter, on the other hand, was magnificent. A root vegetable salad served with greens, it had pumpkin as well as acorn and butternut squash. The croutons were flavored with blue cheese, and the crispy things were pepitas, pumpkin seeds coated with chickpea flour and fried. The dressing on this was insanely delicious - I don't buy bottled dressing, but if the chef were to bottle this, I'd spring for a whole case.
My picture of Anica's main was beyond blurry, so you're just going to have to trust me when I tell you that it was a plate of parsnip gnocchi served with a creamy root vegetable sauce and topped with carrot cake crumbs. It was tasty, but a bit on the sweet side.
We both loved my main, which featured all kinds of corn goodness: grits, huitlachoche (a delicious fungus that infects corn in a most wonderful way) and creamy corn, topped with pickled shiitakes (Yay, pickles!), an egg poached and fried in tempura batter, and a bit of salted ricotta. I. Was. In. Heaven. The egg and mushrooms in particularly made the dish for me.Finally, dessert. All through April, the restaurant ran a special on dessert - order one, get one free! Since there are only four desserts on the menu, full-stop, we were able to try a bit of everything! Clockwise from the top, we have pea and mint ice cream cake, red pepper red velvet cake, caramel pudding with caramel popcorn, and fennel funnel cake. The pudding won the day, by a long shot, but the red velvet cake was really interesting, too.
All in all, a wonderful meal. This is vegetarian cooking at its richest and most generous. No shortage of creativity, flavor or texture to be found here. Just some of the most delicious butter of all time, and popcorn-flavored pudding. Yum.
Dirt Candy
430 East 9th Street (Between 1st and A)
212.228.7732
Take a look at some cracking Quality Quotes I came across with my opinion on each one.
"The best way to get a project done faster is to start sooner." - Jim Highsmith
I guess most projects get into hiccups or suffer at some point because someone did not take that urgent call or Someone was not active enough when it was required, or someone did not see that far in the beganning. I strongly believe all these can be mitigated to a huge extent if teams start earlier. So at the point when sponsors are just coming up with the product idea and basic requirements, team identification can start. If the team takes of well, chances of a smooth release could increases manyfold.
"Programming can be fun, so can cryptography; however they should not be combined." - Kreitzberg and Shneiderman
I think its simple. We are at a position to realize that there is a limit to modularization and code less-get more done and everything else that is related. When things are changing on a less than half-monthly basis,no one wants to get into decrypting DA-Vinci code kind of puzzels just to get a simple thing done.
"Make everything as simple as possible, but not simpler." - Albert Einstein
I think it coincindes more or less with what I talked above. Or not?? Maybe someone could give another take ;-)
Currently, I can say that my team is going through a very important organizational change. I do not wish to write specifics of the change here. But I want to share my first hand experience, observations and conclusions on the Change Management process.
According to me communication and people management, before/during/after the change, are two of the most important CSF(critical success factors).
Today I want to demonstrate a JQuery slideshow tool that my friend Daniel Higginbotham wrote: Electric Slide. It’s tremendously simple to use, while still providing ways to customize and adapt its behavior as you need to.
Suppose you have a long series of slides containing text and/or images that you want to display as a slideshow on a web page; let’s use these Mickey images as an example:

You might represent these slides using a Rails ActiveRecord model called “Slide.” If you had one image per slide you could attach it to the slide model with Paperclip:
class Slide < ActiveRecord::Base has_attached_file :image end
|
The simplest way to display all of these would be to draw a single vertical column on a web page and let the user scroll down to view all of the slides: <% @slides.each do |slide| %> <%= image_tag slide.image.url %> <br/> <% end %> However, scrolling can be annoying especially if there are many images or a lot of text. Also, this isn’t a slideshow. I don’t see each image in the same location as the previous one. It’s harder to notice changes between the slides and also harder for me to surprise the user with something funny or unexpected in the following slide since they are all immediately visible. |
![]() |
Another simple solution would be to display each slide on a separate page and provide next/previous links, using code similar to this:
![]() |
<%= image_tag @slide.image.url %> <br> <%= link_to 'Prev', @slide.higher_item unless @slide.first? %> <%= link_to 'Next', @slide.lower_item unless @slide.last? %> |
But this is also annoying since each click takes the user to a separate page, changing the URL and also adding to the browser’s history list. Since all of these images are part of a single presentation I’d like to display them on one page. Additionally I have to write all of the navigation code: I might use acts_as_list in my model class like in the ERB snippet above, and then write the HTML to display the next/prev links in the proper location, to hide them when necessary, to give them the proper styling, etc. In other words, it’s a fair amount of work.
Electric Slide
Electric Slide to the rescue! If you install Daniel’s Electric Slide JQuery code file in your app, all you have to do is use a <div class=“slide”> tag around each image or whatever slide content you have, call a JQuery function when your page is loaded and Electric Slide will take care of the rest:
<script type="text/javascript" charset="utf-8"> $(function(){ $("#slides").electricSlide(); }) </script> <div id="slides"> <% @slides.each do |slide| %> <div class="slide"> <%= image_tag slide.image.url %> </div> <% end %> </div> |
![]() |
With just a little bit of CSS love, the slideshow can look like this (click through the screen shot to see a working example):
Now all the slides are displayed in a working slideshow inside my single web page! When I click on the previous or next links, I can watch Mickey move around without leaving the page. Let’s take a look at how my ERB and CSS code works and what Electric Slide is doing:
Detailed step-by-step example
Let’s create a new Rails app from scratch, copy the mickey images into it, install Electric Slide and then display them all as a slideshow… all in 10 minutes or less!
$ rails mickey-slides $ cd mickey-slides
Go ahead and download the Mickey images from my site; or feel free to use any images you have instead:
$ curl -O http://patshaughnessy.net/assets/2010/4/28/mickey-images.tar.gz $ tar zxvf mickey-images.tar.gz images/ images/mickey1.jpg images/mickey2.jpg images/mickey3.jpg images/mickey4.jpg images/mickey5.jpg images/mickey6.jpg
Now let’s use View Mapper to create my slide model with an “image” attachment:
$ sudo gem install view_mapper
$ ./script/generate scaffold_for_view slide --view paperclip:image
error The Paperclip plugin does not appear to be installed.Oh yea… I forgot to install Paperclip; let’s do that now also and then repeat the View Mapper command:
$ ./script/plugin install git://github.com/thoughtbot/paperclip.git $ ./script/generate scaffold_for_view slide --view paperclip:image $ rake db:migrate
Next let’s load the images into our database using Paperclip in the Rails console:
$ ./script/console
Loading development environment (Rails 2.3.5)
>> Dir.glob('images/*.jpg').each do |filename|
?> Slide.create :image => File.new(filename)
>> end
=> ["images/mickey1.jpg", "images/mickey2.jpg", "images/mickey3.jpg",
"images/mickey4.jpg", "images/mickey5.jpg", "images/mickey6.jpg"]Now we just need to install Electric Slide – let’s just get Daniel’s entire github repo including the examples and documentation:
$ cd .. $ git clone git://github.com/flyingmachine/electric-slide.git $ cd mickey-slides
And now let’s replace our default Rails prototype javascript files with JQuery and the Electric Slide code from Daniel’s repository:
$ rm -rf public/javascripts $ cp -r ../electric-slide/javascripts public/javascripts
Now edit app/views/layouts/slides.html.erb and include Electric Slide, JQuery and a new style.css file by replacing the existing stylesheet_link_tag ‘scaffold’ line with the lines highlighted below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <title>Slides: <%= controller.action_name %></title> <%= stylesheet_link_tag 'scaffold', 'styles' %> <%= javascript_include_tag 'jquery', 'jquery.sizes', 'jquery.electric-slide', 'jquery-ui' %> </head> <body> <p style="color: green"><%= flash[:notice] %></p> <%= yield %> </body> </html>
Now we can add the CSS code snippet from above into our app – copy this into a new file called public/stylesheets/styles.css, which we just included above in the layout:
body { background:#EEEEDD; } .slide { display:none; } #slides .slide-header { display: none } #slides .slide-footer { margin:0; width: 200px; } .slide-footer .previous { width:75px; float:left; } .slide-footer .next { width:75px; float:right; text-align:right; }
And finally replace the scaffolding slide index view, app/views/slides/index.html.erb, with the code from above:
<script type="text/javascript" charset="utf-8"> $(function(){ $("#slides").electricSlide(); }) </script> <div id="slides"> <% @slides.each do |slide| %> <div class="slide"> <%= image_tag slide.image.url %> </div> <% end %> </div>
Now start up your server at look for the Mickey slide show at http://localhost:3000/slides!
There are a few events coming up in the area of technology and social impact. Here are a couple worth highlighting:
Google and the MTA are hosting an "unconference" for developers. The MTA has openned their data sets, including maps and scheduling information, which can be used for transit tools and mashups on websites or mobile devices. In this time of severe budget cuts and service disruptions, the MTA is making a bold and smart move that will benefit customers with no additional cost in taxes or fees. This is a great example of a public-private partnership where everyone benefits.
The conference will be held at Google's Manhattan offices on May 5 from 6:30 - 10:00pm. Program highlights include:
Registration is free at the http://www.mta.info/developers/conf.html
Public/private partnerships will also be explored at New York City Symposium for Social Change: Building Businesses that Impact Our World. This event is scheduled for Monday, May 3 from 8:00am - 2:30pm at Lincoln Center. The event brings together representatives from Wall Street, foundations, think tanks, nonprofits to mobilize businesses to benefit New York City.
Register at nycsymposium.eventbrite.com. Type in "Friendly/Guest" where appropriate to waive the admission fee.
On the Wednesday of my staycation, I took a little walk through the West Village. I started out with lunch at Chelsea Thai (technically just north of said West Village), then made my way south and east. I encountered loads of goodies and pretty things along the way. Have a look!
First, while still at Chelsea Market, I took a peek into the mini Jacques Torres outlet across from Chelsea Thai. The chocolate chip cookies looked tempting, but I had another treat in mind.
Cherry blossoms were in full bloom along Hudson Street. Pretty, and so short-lived - the floral equivalent of spring in New York.
I passed Myers of Keswick, a charming little shop fully stocked with all kinds of goodies from the United Kingdom. The price of curing homesickness may be a bit steep, but ex-pat Brits in New York tend to flock here in any case in search of Lyle's Golden Syrup and authentic Cadbury chocolates.
I stopped into Chocolate Bar in desperate search of one of my own favorite treats: their milky-satly-pretzel bar. But, sadly, they were out! Cue my pout and change of direction to the east.
Typical West Village townhouses on Jane Street. I'd move here in a heartbeat. Anyone care to subsidize? Hmmmmm?
At the corner of West 4th and Bleecker, I stopped into the original outpost of Magnolia Bakery (they now have stores in Midtown and on the Upper West Side). While I'm not a huge fan of their cakes or cupcakes (too sweet, chewy instead of moist), I do love their little 75-cent chocolate chip cookies, though, so I bought one of them and kept on trucking. (But not before snapping a shot of their gorgeous mason jars full of sprinkles! I love this photo.)
Eventually, I made my way over to Washington Square Park, where I lounged in the sun, read a book, and generally enjoyed the fact that I had nowhere to be at that particular moment in time. Now that, my friends, is luxury indeed.
I have been involved in Analyst Relations activities at my company for two years now. Establishing and managing relationships with various analysts firms(Investor/Research/Third party) is very important specially in the IT industry.
Analyst firms usually come up with their surveys/questionnaires/waves on an annual basis. These waves are either specific to solution area (ERP, CRM, BI, etc.) or geography (APAC, North America, Europe, etc.). They reach out to major players in the industry and invite them in this annual exercise. Participating companies need to provide their capabilities and credentials relevant to the specific wave/area. Survey generally contains questions which are both, qualitative and quantitative. Answers to these questions help Analysts firms to evaluate the participants.
Apart from being a very important branding exercise for the participants, it gives an excellent opportunity to dig deeper in their own companies and have the visibility of the kind of work is being done at the ground level. The slices/dices of data points that needs to provided during this exercise is such that it requires connecting with all on going projects(across the board) individually. According to me, such interactions with the projects, is extremely enriching due to following two reasons.
1) Such interactions are rare in a year.
2) Information is as accurate as possible.
I am sure people from large organizations would appreciate this :). It's not that companies do not engage in periodic reporting of activities from bottom to top. But in a company with 150k+ employees, complete information often do not reach the corporate teams.
I think for companies, this internal knowledge discovery helps immensely for pursuing new opportunities.
After lunch at Nam Son, Emi, Miya and I walked over to Chinatown Ice Cream Factory for a sweet, cold treat. The Ice Cream Factory is known for its fresh product and its unusual flavors, and this visit didn't disappoint. Miya ordered the lychee, which she shared with an ice cream-crazy Emi.
I ordered the Zen butter, a combination of peanut butter and sesame seeds. It's more sesame-y than peanut-y, but it's 100% delicious. Creamy, cold and satisfying. Rich in a way that we're not really used to when it comes to ice cream, it's dense and nutty, but not even a little bit sweet. Good stuff.
Chinatown Ice Cream Factory
65 Bayard (Between Mott and Elizabeth)
212.608.4170
On Saturday, all of Union Square Greenmarket smelled of lilacs. It seemed every vendor in the park had bunches of them for sale. It was heavenly.
And this NYC Grows woolly pocket garden was pretty cool, too. Each pocket was planted with a different vegetable, flower or herb. Pretty freaking neat, and a reminder that, even in this most urban of landscapes, we need plant life to keep us sane, healthy and well-fed. (I planted my windowsill herb garden this weekend; how about you?)

We have been meaning to showcase Bicycle dreams to the biking community in Bangalore for ages. Finally have the DVD with us (thanks to Raghu)
Venue: BOTS terrace ( link to map and directions )
Time: 6:45pm
Date: 1 May 2010
Everyone pray that it does not rain too hard that evening ! Else its going to be a washout.
Last Sunday, I met my friends Caroline and Emily for brunch at Pulino's, Keith McNally's latest restaurant, and the newest addition to the now-completely-gentrified corner of Bowery and Houston. McNally is the force behind the Odéon, Balthazar, Schiller's Liquor Bar, Pastis...you get the idea. He specializes in creating buzz paired with seemingly time-worn atmosphere, and Pulino's is no exception to the rule.
Ostensibly a pizza restaurant (McNally hired San Francisco's Nate Appleman to create the menu and run the joint), it's first and foremost a gathering place for hipsters, hangers-on and (at brunch, at least) downtown parents and their children.The three of us decided to share a few things, starting with an appetizer of asparagus, ramps and rhubarb. The dish was clearly meant to be a celebration of early spring, featuring the season's three star ingredients. The grassy asparagus, tart rhubarb and stinky ramps actually went quite well together; the flavors weren't revolutionary, but it was tasty. The dish was completely overwhelmed, however, by two things: the mound of far-too-peppery black pepper mascarpone hiding beneath the asparagus, and the price: $14.
Next, we tried the margherita pizza, which we ordered with an egg on top. The pizza was very good - crisp but still chewy, and the sauce, cheese and basil were each top-notch. The egg was put on a bit early and the yolk was cooked all the way through, which was a bit disappointing. Overall, though, it's a solid pizza.
The star of the meal, by far, was the sweet pizza we shared as a dessert. It was topped with pecorino, pears, cinnamon and sugar (and, my guess is, a bit of butter). It was just sweet enough, and the pears were still a bit firm and not at all mushy. We devoured this, licked our fingers, and resolved to come back and order a large one very, very soon.
Pulino's
282 Bowery (at Houston Street)
212.226.1966
Happy Saturday, everyone! I spent my morning down at the Union Square Greenmarket, and returned home with quite a haul (potted herbs for my windowsill, asparagus, ramps, eggs, chives, potatoes). Before I head back out into the sunshine to run some errands, it's time for this week's Treasury!
First, a look at a gorgeous apartment in Bruges, widely regarded as Belgium's most picturesque town. The 17th-century house overlooks a canal, and is absolutely beautiful. I think the master bedroom nestled in the beamed eaves may be my favorite part. (Ignore the stuffed dogs, please.)
Next, these adorable ceramic baskets, which are modeled after the cardboard and paper varieties you see in markets all summer long. Imagine them piled high with raspberries, blueberries, strawberries or lemons. Gorgeous, right? I collect white ceramics, and these are going on my wish list, immediately. (Via the incomparable Creature Comforts.)
Finally, from Pink of Perfection, a recipe for a spring ragout of vegetables that looks absolutely too-licious. Radishes, snow peas, asparagus and herbs galore are enriched by butter, mustard and Parmesan cheese. Sounds like my kind of vegetables.
Whether you're following the slashing of local school budgets, burgeoning national debt, or global climate change, its easy to feel overwhelmed by the daunting, complex social challenges we're facing these days. How is it possible for one person to make a difference in the face of daunting obstacles? I'm increasingly seeing the potential of partnerships.
Even the rich and powerful are limited in what they can do independently. Warren Buffet made history in 2006 as the most generous philanthropist of all time when he decided to give most of his $44 billion fortune to the Bill & Melinda Gates Foundation. He wisely determined that he was better at making money than giving it away. Simply having money is not enough. Bill Gates, in turn, has billions of dollars of his own and expertise in business and philanthropy. However, even he has turned to partnerships to accomplish social impact goals. In the area of global health, the Gates foundation formed the GAVI Alliance, a public/private partnership of donor governments, private foundations, vaccine manufacturers, and multilateral institutions including the UN, UNICEF and the World Bank. The scale of the need for vaccines in developing countries is so vast, and the scope of change required in health and economic systems so great, that even a wealthy foundation can't be very effective alone.
I recently had a chat with Jeff Wishne, the Director of Social Impact for Thoughtworks software consultancy, about how he leverages partnerships. He has put put together innovative and cost effective programs that allow employees to use their "beach" time between client engagements to contribute to open source software for mobile health projects in Africa. Thoughtworks collaborates with non-profit partners to project manage the overall effort, provide ongoing consistency and quality control, and cue up work so that employees can make a significant contribution in short, unpredictable bursts of 'downtime'. Thoughtworks also benefits in employee recruitment and retention, as well as access to new ideas and technologies.
I was inspired to find ways that the AppDev group can use creative partnerships to make a greater impact with a limited amount of volunteer time.
Last Saturday, my cousin Jason and his lovely wife Abby invited me out to Brooklyn for dinner. They moved to Greenpoint late last year, and are loving the neighborhood. I'd never been, so I was eager to visit and check out their new digs and environs. Jason came and picked me up from my apartment (He has a car - very exciting for this Manhattanite!) and took me on a little tour of the neighborhood before we headed back to his place for a cocktail with Abby. Abby's brother Richard was there as well - a most excellent surprise - and after a martini, we headed around the corner for dinner at Anella.
Jason and Abby are no slouches when it comes to food, and since they've been raving about Anella ever since they discovered it last fall, I knew I was in for a treat. It's a tiny, U-shaped space with a little bar running along the center of the restaurant. We had to wait about half an hour for a table, so we enjoyed another cocktail. I went for the Heering Manhattan, made with rye, Heering cherry liqueur, dry vermouth and bitters. It was fabulous - a bit sweet, but complex enough to keep my attention.
Everything we ate was delicious - the asparagus with crispy egg, the mussels with brie butter and french fries, the strozapreti with bacon. But my favorite dish of the night, far and away, was the romaine heart salad. It was served chilled, on an ice-cold plate. The dressing was a simple combination of crème fraiche and lemon juice, and sprinkled atop the whole thing was a smattering of dill, some buttery bread crumbs, finely chopped white onion and - the pièce de resistance - fried capers.
If you've never had fried capers, now is the time to start. They are absolutely divine. Frying a caper for a couple of minutes opens it up into a flower-like shape, and brings out the nutty qualities of the normally briny berry. They're fantastic with loads of different dishes - try sprinkling them on top of pasta, salads, or even scrambled eggs. You can't go wrong.
But first, of course, try them with this. I feel pretty good about this tribute to Anella's delicious dish, but please let me know if you can think of ways to improve upon it.
Hearts of Romaine with Lemon, Crème Fraiche and Fried Capers
Adapted from Anella
1/4 cup plus one tablespoon canola oil, divided
2 tbs. capers, rinsed, drained and dried for 30 minutes on paper towels
1 tbs. butter
1 slice bread (I used whole wheat, but you can use whatever you like.)
3 tbs. crème fraiche
1 1/2 tsp. fresh lemon juice
1 romaine heart, halved lengthwise
1 tbs. dill, finely chopped
1 tbs. white onion, minced
Kosher salt and freshly ground black pepper
Fry the capers:
In a small skillet or saucepan set over medium-high heat, heat 1/4 cup of the canola oil until very hot. (A drop of water flicked onto the surface should crackle and evaporate immediately.) Add the capers and fry until they turn dark brown and smell nutty. Turn off the heat and, using a slotted spoon, remove the capers to a plate covered with paper towels. Set aside.
Make the buttery croutons:
In a medium skillet set over medium-high heat, heat the remaining canola oil with the butter. Once the butter has melted and is slightly foamy, add the slice of bread and turn the heat down slightly. Toast until dark brown on one side, then flip and toast the other side. Remove to a cutting board and slice into 1/4 or 1/2 inch squares. Set aside.
Make the dressing:
In a small bowl, whisk together the crème fraiche and lemon juice. The dressing should have a thick but drizzle-able consistency, like homemade ranch dressing. Season lightly with salt and pepper.
Assemble the salad:
Place the romaine heart halves side by side on a chilled plate. Drizzle generously with the dressing (Use it all; don't be afraid.), then sprinkle with the dill. Follow with the onion, then the croutons, and finally the capers. Finish with a bit of salt and pepper. Serve immediately.
Serves one, generously, or two, if you're really, really good at sharing.
Time to get your advocacy hat spandex on
Critical Mass Bangalore
Critical Mass Pune
This is an excellent video about ruby metaprogramming concept:-
http://www.infoq.com/presentations/metaprogramming-ruby
This was presented by Dave Thomas, a well known author of The Pragmatic Programmer book.
Last Friday, I met my friend Miya and her adorable daughter Emi down in Chinatown. Our goal: enjoy some tasty, nourishing pho. Miya's a vegetarian, and my friend Rich (who has excellent taste) had recommended the veggie pho at Nam Son, so that's where we went. And boy, was he right.
I ordered the pho with top round, brisket and tendon, while Miya went for veggie with veggie broth. Both were about six bucks, making them the most ridiculous bargains available. Seriously, these were huge bowls of soup. And they were oh-so-tasty.My beef pho had a traditional, spice-scented broth. The clove and anise came through loud and clear, emphasized by the rich beefiness of the soup. One of the things I love about broth is the way it can be so rich and yet almost completely devoid of fat. It sucks all the flavor out of the bones and becomes something entirely new. It's almost alchemy.
When it came to the meat, I was particularly fond of the tender brisket. It practially melted in my mouth, and was full to bursting with beef flavor. The tendon wasn't bad, but there was a bit much of it for my taste. I'd much rather have had double the brisket and half the tendon. One only needs so much chewiness. And the noodles were pretty good, too - firm enough to stand up to the hot soup, but still tender.
Miya's veggie version was no slouch, either. Absolutely chock full of veggies and tofu, it was quite a sight to see. We got to work doctoring our bowls with hoisin sauce, Sriracha (for me; none for Miya, since Emi was sharing her noodles), bean sprouts and Thai basil. The doctoring might be the best part, actually - working for your supper, as it were.
Nam Son
245 Grand Street (Between Chrystie and Bowery)
212.966.6507?
"It's cool, but is it work?" That was the question of the day last week when I visited one of Socialtext's newer customers: Oxford University Press. We're deploying to all 4,500 employees, and they're a wonderful client: intelligent, committed, and...
Lady M is a remarkably dainty little pastry shop in the heart of the Upper East Side. (Seriously. 78th and Madison - this is society matron territory at its best.) Its location helps to explain its bustling weekday afternoon trade (It also helps that there's little like it in the neighborhood, so
even working stiffs tend to visit for a quick coffee break.) as well as its absolutely obscene prices.
You'll pay $7.00 for a cappuccino here, and I can admit that it's a good cappuccino. But the real star of the show is the pastry, and the cakes in particular.
The shop's aesthetic mirrors that of its product: spare but luxe, light but creamy, elegant but decadent. Their signature cake is called the Mille Crêpes, and it's essentially 20 (not a thousand, as the name suggests) paper-thin crêpes stacked one on top of the other. Pastry cream is mixed with whipped cream and sandwiched in between each layer, and the top is covered in a fine, bruléed sugar crust. It is, in a word, delicious. (It's also pretty easy to copy; check out my recipe for it over here. That's a photo of it below.)
Last week, I decided to branch out from my usual crêpes cake routine to try the lemon meringue cake, a typical Lady M spin on a classic. Fluffy lemon cake replaces the lemon curd pie filling. A thin schmear of lemon custard separates the two cake layers, and the whole thing is topped by a perfect mountain of slightly toasted meringue.
It's a pretty good dessert, though I think the cake could be a bit tarter, which would make it a far better foil for the sweet-sweet-sweet meringue. All in all, it can't ever replace the Mille Crêpes in my estimation, but it's still pretty dang tasty.

So an Apple Engineer walks into a bar, has a few German ales, and leaves his 4th Gen iPhone behind. The real deal! The phone ends up with Gizmodo, who is later contacted by an Apple lawyer demanding the phone back.
What better time than a staycation to brush up on my art? I spent an afternoon last week at the Metropolitan Museum of Art, which, despite its lying only six short blocks from my apartment, I had not visited in almost a year.
It was a gloomy day outside, and the sky was that bright white color you see on chilly afternoons. The stone glowed under the filtered light, and the ladies decorating the cornices looked a bit forboding.The Met can seem imposing from certain angles, but I love that its sweep of stairs is so often - day or night - softened by the presence of pairs of friends sitting, chatting, and possibly enjoying a hot dog from the vendors that sell them (overpriced, of course, this is tourist central) down on the Fifth Avenue curb.
This is the Upper East Side at its finest, all neoclassical and proper. The area near the museum is well worth a wander, especially on a nice day. Me, I spent my time checking out the incredible exhibition of the Limbourg brothers' illuminated manuscript, Les Belles Heures du Duc de Berry. An incredibly tactile and awe-inspiring experience, if I do say so myself. You can get within inches of the folios and examine them with a museum-provided magnifying glass. I felt like a proper Sherlock Holmes, searching for meaning in the detailed borders, and gaping at the pin-pricked gold leaf that sparkled like the sun.Maybe I shouldn't wait so long next time.
I was working on one functionality where I needed to build hash like structure in javascript and make an ajax call to perform that particular action by passing that hash as params to process further. The functionality was to delete a numbered row from the form and after deletion the form should rearrange the rows in sequence while maintaining the order. I used javascript 2 dimensional array to treat it as hash.
e.g. On the form :-
No. | EmpID | Date | Location | Action |
1. | 123 |12-Mar-10 | Mumbai |Delete |
2. | 233 |10-Jan-10 | Mumbai |Delete |
3. | 444 |15-Mar-10 | Mumbai |Delete |
4. | 555 |18-Mar-10 | Mumbai |Delete |
So. If you delete the 3rd row, then after deletion the new form should render as :-
No. | EmpID | Date | Location | Action |
1. | 123 |12-Mar-10 | Mumbai |Delete |
2. | 233 |10-Jan-10 | Mumbai |Delete |
3. | 555 |18-Mar-10 | Mumbai |Delete |
The elements were written in table format. Each row is assigned unique id, so first row will have id = 1, 2nd row with id = 2 and so on. Each td has unique class.
After experimenting with MapReduce (Hadoop, Pig) last year, we recently ran some tests to check if its worth pursuing further for large data analytics.
Test details:
- Environment: We ran these tests on Amazon's cloud (quick, cheap, no hassles :-)
- Test data: 500 Million and 1 Billion rows of simple observations (2 column data - Customer_ID and Amount)
- Computation: Simple (group_by and summation)
After experimenting with MapReduce (Hadoop, Pig) last year, we recently ran some tests to check if its worth pursuing further for large data analytics.
Test details:
- Environment: We ran these tests on Amazon's cloud (quick, cheap, no hassles :-)
- Test data: 500 Million and 1 Billion rows of simple observations (2 column data - Customer_ID and Amount)
- Computation: Simple (group_by and summation)
Deb of Smitten Kitchen is a prodigiously talented cook, baker and photographer. She makes everything look delicious, and the jam tart she posted last week is no exception. She rightly points out that local fruit is not yet in bloom (despite our wealth of onions and eggs), and what better substitute is there than jam?
The tart is a modified version of a recipe that appears in David Lebovitz's new cookbook, Ready for Dessert. It's as easy as can be, with a dough made in the food processor and pressed into the tart pan - no rolling involved! The polenta (or corn meal) and eggs make the crust hearty and fuss-free, and the whole thing keeps wonderfully for several days (I made mine on Tuesday and was still eating it on Saturday.).
Choose any jam you like; I used a combination of blackberry and strawberry, which turned out to be delicious. The slightly sour blackberries tempered the sweet strawberries, and the whole thing was incredibly addictive. The one major change I made was swapping in vanilla extract for almond (I don't particularly care for almond extract.). Feel free to swap it back if that's your thing.
I may make a peach one tonight. I mean, how else can you have peaches in April?
Easy Jam Tart
Adapted from Smitten Kitchen
1 1/2 cups flour
1/2 cup stone-ground cornmeal or polenta
2 tsp. baking powder
1/2 tsp. salt
9 tbs. unsalted butter, at room temperature
1/2 cup granulated sugar
1 egg, whole
1 egg, separated
1/8 teaspoon vanilla extract
1 1/3 cups jam or marmalade
1 tbs. coarse-crystal or granulated sugar
In a small bowl, whisk together the flour, cornmeal, baking powder and salt. In a food processor, pulse the butter and 1/2 cup sugar together until smooth. Add the egg and egg yolk along with the vanilla and pulse until combined. With the processor on, gradually add the flour mixture through the feed tube and mix until the dough just comes together.
Transfer about one-third of the dough to a lightly floured counter and shape it into a log about 2 inches in diameter. Wrap it in plastic wrap and refrigerate it until needed. If the shelves in your fridge are wire, place the log on a plate before putting in the fridge.
Transfer the remaining dough to a buttered 9-inch tart pan with a removable bottom. 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 until firm, at least one hour.
Preheat the oven to 375°F. Spread the jam or marmalade evenly over the dough in the pan. Cut the chilled dough into very thin discs with a sharp paring knife. Arrange them slightly overlapped in concentric circles over the jam to form a top crust. (I used a square tart pan, so I did mine in rows, and let the jam peek out a bit.) Using a fork, beat the remaining egg white with a teaspoon of water until frothy; brush evenly over the tart lid and then sprinkle with1 tbs. of coarse sugar. Bake until the top crust is golden brown, about 20-25 minutes. Let cool completely before serving.
Keeps very well, wrapped tightly, at room temperature.
Along with ramps, pea greens are one of my favorite early-spring treats. They're a bit peppery, though not so strong as arugula, and go beautifully with mustard, honey and duck. Which is exactly how I like to celebrate their arrival. I did just that for lunch last Tuesday, before an edifying outing to the Metropolitan Museum of Art.
I've shared this recipe before, but I think it bears repeating. It's easy and delicious, and makes a comfortingly simple meal out of duck legs, another of my favorite things. Yum.
Fresh Fettuccine with Pea Greens and Duck
1 duck leg, skin-side seasoned with salt and pepper
3 tsp. olive oil, separated
1 small shallot, minced
1 garlic clove, sliced
2 loosely-packed cups pea greens, separated
1 tbs. Dijon mustard
1 tsp. honey
2 tbs. dry white wine (or dry Vermouth)
1/4 cup finely chopped chives
1/4 lb. frsh fettucine, cooked according to package instructions
1/2 tbs. unsalted butter
Salt and pepper, to taste
Pre-heat the oven to 425 degrees Fahrenheit. In a small skillet set over high heat, heat 1 tsp. of the olive oil for a minute or two. Place the duck leg in the skillet, skin-side down, and let sear on high heat for a minute, then reduce heat to medium and continue to cook for three to four more minutes, until the skin is dark brown and crispy. Turn the leg over and transfer the skillet to the oven. Cook for 10 minutes, then remove from oven and let sit while you prepare the pasta.
In a medium skillet set over medium-high heat, saute the shallots in two teaspoons of the olive oil until transluscent, about one minute. Add the garlic and saute for a minute more. Add the pea greens and chives and saute for two minutes, or until wilted. Add the mustard & honey to the pan and stir into the greens, shallots and garlic, until both are evenly distributed. Cook for two minutes, then add the wine.
Stir briskly, making sure you get any good brown bits from the pottom of the skillet incorporated into the sauce, then turn the heat down until the pasta is ready. Once pasta is ready, drain (Do NOT rinse!) and add to the skillet. Turn the heat to medium and cook the pasta and sauce together for a few minutes, stirring to distribute the sauce throughout the pasta. Add the butter stir once or twice to incorporate, and turn off the heat.
Line your plate with the remaining pea greens, top with the pasta, and place the duck leg on top. Sprinkle the remaining chives over everything, season to taste, and eat!
Serves one, generously.
It's that odd in-between time here in New York, when the seasons are paused mid-shift. Balmy spring dominates after noon, but in the mornings, the air still nips at you like it's winter. This past Saturday, I arrived at the Union Square Greenmarket under cool, gray skies. One of the first sights to greet me was a clear indicator of the chilly weather: hot apple cider!
Spring was on display, too, though, in the form of azaleas...
...and just-beginning-to-bloom lilacs...
...and edible flowers.
The perfect breakfast, no matter what the season? Ronnybrook's coffee-flavored milk. Remember when your parents would put just a smidge of their coffee in your milk to make you feel all grown-up? This is like that, but creamier. It's decadent, it's naughty, and I love it.
http://www.ip2location.com/free.asp
You can use this site to find out the location of any public IP address.
In the hunt to break the "monotonous" routine of sprinting and activities for my team, I thought to experiment with a "Gaming" contest at Kiprosh. I picked up couple of strategy games from http://freeonlinegames.com.
We had 1 hr gameful of fun and laughter with interesting "quick" meetings to invent and come up with new strategies for improving scores (as I gave certain scoring target to be a winner). At the end it become very addictive to leave but team quickly became more charged up and rejuvenated.
It also helped us as team to keep on changing couple of strategies and not to repeat mistakes to achieve higher scores & goals.
Last Monday, I decided to spend the first evening of my staycation venturing out to the (relatively new) Ikea in Red Hook. Red Hook is a formerly industrial enclave in the southwestern corner of Brooklyn, and is full of cool old warehouses converted into condo and studio space. To get to Ikea, you can take the subway and a free shuttle, or you can go glam and hop on the water taxi that leaves from the Wall Street pier.
Since I rarely make it onto the water (over or under it, surely, but not onto it), I opted for the latter option. Walking down Wall Street from Broadway reminded me of how much I love the financial district - it's dead as a doornail at night, but its streets are narrow, twisty and canyon-like in a way that no other part of the city is. It's downright gorgeous, and, during the day, full of energy.I won't bore you with the details of my Ikea run, but I will share some photos from the ride. The taxi terminal lies just south of the Brooklyn Bridge, and the views are spectacular. I love how, even from a distance, the bridge feels so touchable. Looking at it is like touching the sun-warmed stone itself.
Above is a shot of downtown Manhattan, with the water taxi sentry standing guard. Not to be morbid, but I'm still not used to that gaping hole in the skyline, and I don't think I ever will be.Next up, Lady Liberty! People who come to visit New York are often surprised by how large the harbor is; this is the closest shot I could grab of the Statue, even with full zoom. She technically lies on the New Jersey side of the harbor, something that has caused quite a bit of squabbling over the years.
Finally, land is sighted! This is a view of Ikea from the taxi; the ride took about 15 minutes total, and couldn't have been lovelier. I wouldn't mind a commute like this one, no sirree.
Arthur Benjamin says, "Statistics is the future of Math". I believe it and I'm learning Statistics. Statistics is a foundational skill I need to build Prediction Markets (my goal for 2010). I'm learning R (a statistical programming language). We've formed a study group and are following Google/Stanford Stats 202 lectures.
Its only been a couple of weeks but I'm excited about R. It seems powerful, fast (<1M rows dataset) and a lot of fun! I've been spending time at work and home to learn the constructs of the language and plot charts.
I'll share code, links, plots and my experiences of learning R in the following posts.
Arthur Benjamin says, "Statistics is the future of Math". I believe it and I'm learning Statistics. Statistics is a foundational skill I need to build Prediction Markets (my goal for 2010). I'm learning R (a statistical programming language). We've formed a study group and are following Google/Stanford Stats 202 lectures.
Its only been a couple of weeks but I'm excited about R. It seems powerful, fast (<1M rows dataset) and a lot of fun! I've been spending time at work and home to learn the constructs of the language and plot charts.
I'll share code, links, plots and my experiences of learning R in the following posts.
If you're a New Yorker, you've probably heard about the financial trouble and $800 million budget shortfall facing the MTA and the city's mass transit system. Yesterday, I spent the day with my Coro Leadership New York cohort exploring this issue in depth. I discovered, among other fascinating facts, that its always more fun to discuss finances from the gorgeous penthouse roof deck of a downtown Mahattan loft. Many thanks to our hosts The Open Planning Project, a nonprofit that develops open source software for transit applications - http://www.openplans.com/.
We had guest speakers from the MTA and the influential advocacy group Straphangers Campaign, and later interviewed key decision makers around the city. We then conducted a contentious budget negotiation exercise in a historic subway car in the NY Transit Museum in Brooklyn. This very cool museum is actually underground in a converted subway station, and well worth a trip to see the generations of restored subway cars, sections of buses, turnstiles, photographs, etc.
The budget negotiation exercise really brought home how difficult it is to decide on budget cuts with so many varied implications - job loss, accessibility for students and disabled riders, ability of employees to travel to their jobs and associated economic impact, long term infrastructure costs, etc. I was also stuck by the inherent tension that decision makers face when advocating for their interests and that of their constituents, while also taking into account what is fair and right for the region.
I'm sorry to see Coro coming to an end next month, though its an interesting time of transition. Soon we will no longer be students and instead 'alums' with the skills, resources and also responsibility to apply all we've seen and learned in a meaningful way.
Applications are being accepted now for 2010-11 Coro programs including Leadership New York and the Immigrant Civic Leadership programs. Check out the website for details: http://www.coro.org/
More reading about the MTA budget crisis, proposed cuts and fare hike:
• New York Times: Transit Agency Approves Cuts, and More Bad News Looms
http://www.nytimes.com/2010/03/25/nyregion/25mta.html?emc=eta1
• AM New York: MTA: Service Cuts are Less Doomsday and More “Restructuring”
http://amny.com/urbanite-1.812039/mta-service-cuts-are-less-doomsday-and-more-restructuring-1.1722534
• New York Post: Hike MTA Fares Now http://www.nypost.com/p/news/opinion/opedcolumnists/hike_mta_fares_now_I5yPUlYG6UmDBKonUCAFZI
• The Phantom Token Booth: MTA Cuts Station Agents
http://www.wnyc.org/news/articles/152720
• 2nd Avenue Sagas: Disabled, Students Hardest Hit in MTA Budget
http://secondavenuesagas.com/2009/12/14/disabled-students-hardest-hit-in-mta-budget/#comments
I stumbled across a situation when I have to schedule a job and I have to store today's weekday. I am also storing the schedule's created_at/ updated_at time in datetime format.
To store today's weekday, I said:
weekday = Time.now.wday
>> 4 #Thursday
When I stored the record
Schedule.first.created_at.wday
>> 3 #Wednesday
Why?
I dug in more and here are the facts.
We so say in environment.rb file:
config.time_zone = 'UTC'
But this applies to only the created_at/updated_at attributes and sets up the default timezone for the database and never applies to Time.now
So to keep Time.now in sync we have to set ENV['TZ'] in environment.rb file.
Again in console:
weekday = Time.now.wday
>> 3 #Wednesday
Schedule.first.created_at.wday
>> 3 #Wednesday
:)
I seem to be on a bit of an egg kick these days, in part because I'm not in the mood for defrosting anything protein-ish from my freezer, and in part because they're the sort of thing you can't really pack for lunch. I don't get to eat them too often during the week, and so I tend to gorge on them when I'm home.
For lunch the other day, I decided I wanted rice, but also an egg. Well, easy enough. Rice and eggs are a classic combination. Eggs are scrambled into fried rice, served fried on top of bibimbap, and huevos con arroz is literally that: eggs scrambled with rice. And so, for lunch, I improvised a bit. I cooked up some basic white rice, and worked on the topping in the meantime.
Leftover steamed broccoli was sauteed with garlic, soy sauce and a touch of rice wine vinegar (White wine vinegar will do in a pinch.). An egg was fried. Chives were sprinkled, and Sriracha was squeezed. Lunch was ready in ten minutes flat, and was delicious and satisfying.
It's not bibimbap (no array of marinated veggies, no delicious crust on the rice), but it assuaged the craving and made me a happy lady, so I consider it a mission accomplished.
Queenie's Craving Relief Rice
1/2 cup white rice
2 tsp. plus one tbs. canola oil, divided
2 cloves garlic, chopped
1 cup vegetables, chopped
1 tsp. rice wine vinegar
3 tsp. soy sauce, divided
1/4 tsp. sugar
1 egg
1 tbs. chives, finely chopped
Sriracha, for serving
Cook the rice according to the package directions. Set aside, covered, and keep warm.
Meanwhile, heat two teaspoons of the canola oil in a small skillet set over medium heat. Add the garlic and saute until fragrant and golden, about three minutes. Add the vegetables to the skillet and saute for a few minutes until warmed or cooked through, then add the vinegar, one teaspoon of soy sauce and the sugar. Cook until most of the liquid is absorbed. Transfer the vegetable mixture to a small bowl and wipe out the skillet.
Heat the remaining canola oil in the skillet over medium heat. Once hot, add the egg and fry until the whites are just set. Turn off the heat. Place the rice in a bowl, top with the vegetables, and then with the egg. Drizzle the remaining soy sauce over everything, then add the chives and Sriracha to taste. Serve immediately.
Serves one.
One of the best parts of any staycation is a hot, delicious breakfast. Most mornings, breakfast means some plain yogurt doctored with a dollop of jam or honey, eaten at my desk, typically while answering any emails that came in overnight.
Staycation breakfast, though, means farm eggs scrambled in butter, filled with sauteed ramps. Staycation breakfast, my friends, is awesome.
Scrambled Eggs with Ramps
2 tbs. unsalted butter, divided
5-6 ramps, cleaned, trimmed and chopped into 1-inch pieces
2 eggs, as fresh as can be
2 tbs. milk
Salt and freshly ground black pepper
In a small skillet set over medium heat, melt one tablespoon of the butter until it just begins to foam. Add the ramps and a teeny pinch of salt. Saute for a few minutes, until the ramp leaves are dark green, almost black, and the stalks are tender and beginning to brown. Season with a pinch of pepper.
Remove the ramps from the skillet and wipe out the pan with a paper towel. Return the skillet to medium heat, and melt the second tablespoon of butter, making sure it coats the bottom and sides of the skillet.
Meanwhile, whisk the eggs and milk together in a small bowl, using a fork. Add to the skillet and scramble gently. As the eggs begin to come together, add the ramps back into the pan and stir everything together. Continue to scramble until the eggs are just cooked (or longer, if you prefer drier eggs). Serve immediately.
Serves one.
click for a bigger image or download a pdf version to print out
We are racing at Nandi Hills, not to the top though. whew !
Date: 18 April 2010 (coming Sunday)
Time: 0700 hrs IST SHARP
Category: Road race
Distance: 50km ( there is an option to race only 35km if you like )
What are you waiting for, go ahead and REGISTER NOW
On Saturday, after dropping off a few bridesmaid's dresses near Gramercy Park (for a good cause), I walked across Gramercy and over to Chelsea to buy some organizational aids at The Container Store. Along the way, I realized I was hungry and decided to stop into the eminently convenient and delicious City Bakery.
The last time I blogged about City Bakery, it was all about their tasty brunch and ridiculous hot chocolate (complete with homemade marshmallows, of course). Since it wasn't too chilly out and I'd already eaten an early lunch, three o'clock seemed just the time for a chocolate chip cookie.
Oh my god, the cookie. City Bakery's chocolate chip cookie is a perfect blend of the crunchy and the chewy - it alternates between the two textures, chewy where it's a bit thicker, and crunchy in the little cookie cracks and along the edges. The chocolate is melty, smooth and rich, and the whole thing is just the right size for a satisfying snack.
And does it photograph beautifully, or what? Drool.
City Bakery
3 West 18th Street (Between 5th and 6th Avenues)
212.366.1414
In the last month, I got an opportunity to attend the very first Ruby conference held in Bangalore, India(20-21 March) organized by ThoughtWorks. The response was very huge (around 400 people ranging from beginners to CEOs from more than 100 companies) and people really enjoyed the event.
It was really great to hear some good speakers/industry leaders like Matz, Obie Fernandez, Ola Bini, etc. Many technical topics were presented like future of Ruby, Rails 3.0, Glassfish and WebRoar app servers, building cross platform mobile application with Rhodes framework, etc. You can find more details about these topics at http://rubyconfindia.org/
I felt a lot of enthusiasm and energy amongst the people w.r.t. Ruby and Rails. There are many small companies being set up especially in Pune and Bangalore for doing only rails projects. I really liked that !
Indian market is really catching up on Rails very fast !
Below is the way by which you can render partial with jQuery in your view.js.erb file :-
jQuery("#mydiv").html("<%= escape_javascript(render(:partial => 'my_partial', :locals => {:my_instance_var => @my_instance_var} ))%>");
Let not your 'I' get identified with your body and mind. This de-identification is meditation.
I started my journey this March'2010 towards building Kiprosh with foundation, goals and strong inclination towards
Few days back I was evaluating open source ASP.NET based Content Management System (CMS). I shortlisted 2 of them for my purpose i.e N2 and Umbraco. Competition was not even close as N2 was a clear winner. Though both are categorically advised to be consumed based on web content management requirements i.e. Umbraco is preferable for heavy (or large) and N2 for light (or medium to small) contents.
Umbraco is well positioned in developer community as N2 is pretty new. Umbraco's user base is huge comparatively but still N2 delivers due to its sheer simplicity. I like KIS (Keep It Simple) philosophy while development and N2 enables me to deliver keeping KIS into consideration.
Thanks to Shivani for helping me finalize one of the CMS for our purpose.
A few weeks ago, when Louisa was in town, I had a superlative meal at Frankie's Spuntino down on Clinton Street. You may remember my desperate attempt to recreate their roasted beet and avocado salad; this post is about my imitation version of their (justly) famous cavatelli with browned butter and hot sausage.
This pasta is, in a word, too-licious. While sage and browned butter are a well-known and time-honored pair, the addition of a pinch of garlic and some porky, spicy sausage really make the dish sing. The sauce, nothing more than butter and pasta cooking water, is silky and spare, and the sausage's snap plays beautifully with the chewiness of the al dente pasta.
Some versions I found online called for a bit more sage; I find it's better with about half a cup between two people. It's enough to lend a good dose of piney flavor without making every bit overwhelmingly herbal. And, as is my wont, I added a bit more garlic than most versions because, well, I like garlic. You might want to adjust your seasonings depending on the sausage you use (if it's heavy on the fennel, for example, you might want less sage), but this is a remarkably forgiving meal.
Finally, the question of what sort of pasta to use. I searched high and low for cavatelli this weekend, but to no avail. Instead, I went for orecchiette. I've used penne in earlier variations, but I think the orecchiette is more suited to the dish - but, if you can find cavatelli, please use it! It's even more delightfully chewy than orecchiette.
Oh, and, for my veggie friends - leave out the sausage, and sub in a teaspoon of crushed red pepper flakes. All of the heat, none of the meat! (Look, Mom, I made a rhyme!)
Frankie's [Orecchiette] with Browned Butter and Hot Sausage
1/2 lb. orecchiette or cavatelli
1 tbs. canola oil
2 links hot pork sausage
4 tbs. butter
1/2 cup sage leaves, whole
4 cloves garlic, chopped
Parmesan cheese, for serving
Salt and pepper
Cook the pasta in salted, boiling water until just al dente. Set aside, reserving 1/2 cup of the cooking water. Meanwhile, in a medium skillet set over moderately high heat, brown the sausage links until dark brown on all sides. The sausages should be just barely cooked through.
Wipe out the skillet and turn the heat to medium. Add the butter and melt it and then continue to cook until the milk solids begin to turn brown and smell nutty. Add the sage and garlic and cook for a minute to release the flavors. Slice the sausages crosswise into rounds and add back to the pan. Add the cooked pasta to the pan, along with a bit of the cooking water. Cook over medium heat until the the pasta has absorbed a good bit of the sauce and everything is well-combined.
Transfer the pasta and sauce to two bowls or plates, sprinkle lightly with salt, pepper and parmesan, and serve immediately.
Serves 2.
Rules of Thumb (by Alan M. Webber) was my cerebral diet for the weekend. The book outlines 52 practical advices on how to win at business without losing your self. Alan's approach of putting his points across by relating to past experiences is easy to read and easier to connect.
Here are rules, I could relate easily:
#3 - Ask the last question first
#5 - Change is a math formula. Change happens when 'Cost of maintaining Status Quo is greater than the Risk of Change'
#10 - A good question beats a good answer. Asking questions can be dangerous; Not asking them can be fatal
#12 - The difference between a crisis and an opportunity is when you learn about it
#17 - Entrepreneurs choose serendipity over efficiency
#29 - Words matter
#30 - The likeliest sources of great ideas are in the most unlikely places
#32 - Content isn't the king; Context is
#35 - Loyalty is a two way street - Arnold "Red" Auerbach - Coach, The Boston Celtics
#41 - If you want to be a real leader; First get real about Leadership
#43 - Don't confuse Credential with Talent. Hire for Attitude; Train for skill
#45 - Failure isn't failing; Failure is failing to try
#51 - Take your work seriously; yourself 'Not so much'
#52 - Stay Alert! There are teachers everywhere
Recommended reading..
During my weekend browsing on twitter, I came across this interesting analogy comparing Apple vs Android to McDonald vs Burger King : http://bit.ly/a8ZSl2
In the article Rob Diana argues
- McDonalds leads innovation and consistency supported by detailed market study in selecting locations of their stores (comparable to apple's product innovation)
- In contrast, Burger King follows a simple yet effective strategy of opening their store near to existing McDonald store and differentiates offering by allowing customers to choose the ingredients of their burger (comparable to Android's strategy of following iPhone with flexible hardware platforms)
Here is my take:
1. apple is undoubtedly the leading innovator in mobile computing. They are maximizing the tight coupling of hardware and software to deliver products that are more often than not prove to be game changer
2. Android on the other hand is fast catching up, but I see following impediments to android's future growth
- lack of control on underlying hardware: OS design is likely to get more and more complex (there-by inducing potential bugs) in future
- As more and more manufacturers (without any differentiating value added services) adopt Android, it's only a logical conclusion that Android platform will be commoditized and cannibalized, their by allowing apple to strengthen it's lead
It's high time that manufacturers like HTC, Motorola, Samsung, take a cue from "Burger King" model of being flexible in giving users what they want (at least in terms of innovation in service delivery, if not on technology)..
In this concluding part, I am sharing the retrospective findings from our new approach towards Performance evaluation in agile teams
Continue:
1. Empower associates to select their own goals (albeit within an organizational framework)
2. Peer evaluation process
Start:
1. Periodic peer evaluations instead of waiting till the end of the evaluation cycle
2. Include more subjective feedback
Stop:
1. None
On hindsight, we realized partial success with the new process we adopted. Further in the process we realized there is a significant opportunity for disparate agile team to share and learn from each other.
Less than a year ago we had a chance to ride with a biker who rode a heavy dual suspension (umm kinda, we all know that having a heavy spring in the rear does not really qualify for a full sus right !!) on one of those grueling long rides to Bheemeshwari.
While most of us rode our fancy uberlight speed machines, our man rode all the way and back on his dualie, phew! Grit and determination. We saw great racing potential in him, and he didn’t disappoint any of us.
He would eventually go on to win the first race at the Bangalore Bicycle Championships.
He’s none other than Gaurav ‘rocket singh’ Dwivedi.
Gaurav Racing to fourth place at the second race at the BBCh
After the race this is what Georg, winner of the championships in 2009, had to say about Gaurav
We are proud to say that the Bangalore Bicycle Championships (a.k.a BBCh) has been instrumental in the formation of some kickass racing teams and Gaurav rides for one such team, Spectrum racing.
Spectrum Racing at the races – Manjula, Siva, Arvind, Ravi and Gaurav
What next ? Well, Gaurav has been invited by KNKYNY racing (another local team) to ride along with them in the Tour of Friendship, a 5 day stage race in Thailand this May. The whole team is currently being trained by Australian pro rider – Darren Reid.
A bunch of us caught up with Gaurav and quizzed him on a couple of things. Here is what he had to say
GaggleOfAdmiringFans – What do you think about the Bangalore Bicycle Championships ? Gaurav – These races ignite the competitive spirit in me. The idea of someone trying to push me behind, kicks me to ride harder and drives me to do better. There is no better sense of accomplishment than finishing a race well. To all you IT guys, believe me – finishing a race will give you much more satisfaction than delivering a project successfully. GaggleOfAdmiringFans – Thoughts on winning the first race and about being in the top 5 in the second ? Gaurav – The first race this season was my first ever attempt at a Time Trial. To me it was tougher than other kind of races. In other races categories you know whom you are competing against. At least some rider would be ahead or behind you. But in a time trial, you just get to compete with yourself. Couldn’t believe it when I got to know the results. In the second race I was aiming to be in the top 5. I knew that Darren would vanish in no time. Vivek and Georg also overtook in 2nd lap. Naveen was the surprise package in the race and gave a very good fight. I stood 4th and I was extremely satisfied, coz Vivek and Georg were ‘within my sight’ when they completed the race, unlike the previous races. :) GaggleOfAdmiringFans – Training ? Gaurav – So far I was not following any proper plan for training. Two 50+ km rides on weekdays and a ~100 km ride on Sat/Sun had been the norm with Team Spectrum, of which I am a part. However, after the confirmation of the Tour of Friendship, Vivek and Darren have been helping me with regular planned training. GaggleOfAdmiringFans – Team Spectrum ? Gaurav – Team Spectrum is the brainchild of Dr Arvind Bhateja. He has been instrumental in getting the act together, which includes getting sponsorship from Spectrum Physiotherapy Centre & Sita Bhateja hospital. The team includes Amrish, Arvind, Manjula, Mohan, Murthy, Siva, Ravi, Ullas and me. We are slowly improving and we plan to kick ass in the upcoming races. GaggleOfAdmiringFans – Racing with the KYNKYNY team ? Gaurav – I am extremely privileged to be invited with the KYNKYNY team for the Tour of Friendship. At the end of the day we are all riders, doesn’t really matter to which team we belong. (Read the last sentence as: Let me lay my hands on the magic potion that Kinkys drink before their rides/races and of course find out who ‘Getafix, the druid’ is!!) GaggleOfAdmiringFans – Do you use a bicycle often in the city ? Gaurav – I have been regularly commuting to office on the bicycle. I live in BTM and work at Embassy Golf Links Biz park. The to & fro distance comes out to ~19 kms with an average total commute time of about half hour. Yup, am much faster on my bicycle :) GaggleOfAdmiringFans – Tell us more… Gaurav – Well, It all started in June, 2009. I had been regularly paying the gym and was using it very irregularly. Gym was basically to keep my weight in check and it was boring as hell, coz of the daily routine and absence of chics umm I mean inspiration. Just went and picked up a cycle and next day I was commuting to work on it. And it was brilliant. Never looked back ! My first BBCh race was the off-road race at Turrahalli. My bike broke down in lap 3. Somehow completed the race. And this is how it all began. Couldn’t bear to see people zipping past me, so upgraded to a super sexy bike in Aug.
Wow. Thats super exciting. Thank you Gaurav. We wish you the very best for the next season of racing at the oh-so-exciting Bangalore Bicycle Championships and also at the Tour of Friendship.
the BBCh Race Marshals Team
Every year, I spend a week off from work just enjoying New York City. Living in New York, it's easy to forget that the city is as big or as full of amazing experiences as it is. You get into a rhythm (mine is work, cooking, theatre, drinks with friends) and don't stop to drink in the multitude of opportunities right smack in front of you.
My annual staycations are meant as an antidote to that particular brand of lethargy. This year, I'm planning to spend some time in Brooklyn (Williamsburg one day; DUMBO and Cobble Hill/Carroll Gardens another), hit a few museums (I want to see this illumination exhibit at the Met in particular) and do some serious windowsill gardening. I also want to carve out some time to spend with my friend Miya, who's working on decorating her new apartment. Can anyone say inspiration board?
Any suggestions or requests for how I spend my time this week? Dinners at Dirt Candy and SHO Shaun Hergatt are already on the itinerary. Am also planning to dig into a bowl of pho at some point, visit Marlow & Sons for lunch, and stop by Blue Bottle for some coffee. What else shall I do, dear readers?
Bring on the ideas!
Happy Saturday, folks! It's a blustery day here in New York, and I've just returned from a chilly trip to Union Square for my weekly provisions (Including ramps, mais oui!). I've just begun a 10-day staycation (more on that later), and I can't wait to get to it. Before that, though, it's time for this week's edition of the Treasury!First up, the coolest house tour I've seen in quite a while: impeccably styled, modern dollhouses, courtesy of the New York Times. If you can't afford a houseful of full-size mid-century furniture, why not go the miniature route?
Next, a nerdy delight for food and language lovers alike! Food52 has begun publishing food crosswords by puzzle-maker Michelle Humes. They're pretty fun, and far easier than the Times' Friday puzzle. Brush up on your culinary trivia and dive in!
Finally, another house tour (life-size, this time). This one is of the most adorable houseboat you've ever seen. Josie Curran and her husband share this boat in Hampton Court in southwest London. It's pretty amazing; I'd live there in a heartbeat, and not just because it's in one of my most favorite cities on earth.
This warm weather we've been having here in New York has me craving summer foods. Berries, beans, stone fruits, corn, tomatoes, cucumbers (the gorgeous, flavorful, juicy kind you only get in June and July) - and, of course, ice cream.

What are you craving these days?
Attended the technical architects's conference in my organization last week on 30th March.
Want to talk here about the inaugural talk about India's next global export - Jugaad. It was by Prof. Prasad Kaipi, who is heading executive director of Center of Leadership, innovation and Change at ISB, hyderabad.
He talked about 'Jugaad - an Indian model of Innovation', where necessity and resource / time crunch has given rise to innovative solutions to existing problems. It was nice to hear the examples that he cited about solutions of using tractor as a vehicle, and washing machines as lassi-makers, and firing pins for russian tanks and so on. There have been criticism like Jugaad being only a stop-gap or work-around solution, so how do we take this globally around the world.
He talked a lot about making the Jugaad solutions in India meet the global standards.
He focused on 6 attributes to pay attention to making the Jugaad solutions acceptable world-wide:
On Friday night, Cristin and I met up at Salumeria Rosi Parmacotto to enjoy some Italian nibbles and dish about the goings-on in our lives. We ordered a bottle of red wine along with come caponata, brussels sprouts, burrata and arista.
First up was the caponata, a sweet and tangy eggplant relish studded with stewed onions and peppers. This was delicious - alternately musky and bright in flavor, and full of interesting texture. It was particularly tasty (and sinful) heaped onto the small slices of focaccia that came in our little bread bowl. The salt on top of the focaccia set off the sweet caponata beautifully.
Next, the arista. Arista is pork loin, slow roasted and basted with an assortment of spices. It's served cold, sliced thin, and it's quite yummy. One of the subtler breeds of salumi, it's gently porky and lightly fatty. Perfect for a middle course on a warm spring night - and I suspect it'd make a tasty sandwich, too.
Of all the dishes we ordered, the burrata was least exciting. It was good, but not creamy or magical enough to write home about. I was a bit underwhelmed, to be honest.
Last, but most definitely not least: the brussels sprouts. Lightly sauteed in pancetta fat (the pancetta itself was tossed back into the mix as a finishing touch) and touched with red wine vinegar, this dish represents three of my favorite things brought together in one perfect place. They'll be off the menu soon, since the cold weather is pretty much over, so go soon or go home.
Overall, I found Salumeria Rosi to be pretty darn good - a good value, great service, and pretty much everything we tasted was delicious. I'll definitely be back, and I can't wait to sample some more salumi options when I go.
Salumeria Rosi Parmacotto
283 Amsterdam Ave. (Between 73rd and 74th Streets)
212-877-4800
It's still early spring when it comes to Greenmarket eats, but that doesn't mean you can't find some goodies. The potatoes are fabulous right now (I'm addicted to a waxy breed named Nicola.), and the celeriac abounds.
And you can find some sweet, fat carrots - not like the bland specimens you sometimes get in grocery stores.These may look like parsnips, but they're actually parsley root, and they're delicious.
So, this week, instead of buying, say, tomatoes and peppers from your grocery store, why not try to get out to your local market and see what's in season? (Though, I suppose, if you live in the southern hemisphere, that might be peppers and tomatoes!)
'Tis the season, my friends: the season for ramps. If you live on the eastern seaboard of the United States, chances are you've encountered ramps at least once. They're a wild onion prized for their unique stank and delectable, meaty flavor. They look a bit like a scallion, but with a purple tinge, slightly more bulbous, um, bulb and flat, dark green leaves. They pair gorgeously with anything smoked (like bacon), sweet (like corn or stone fruits) or tangy (like vinegar). And I can't get enough.
Last Saturday, after hearing that ramps had made their first Greenmarket appearance on Wednesday, I made sure to be up good and early for a trip down to Union Square. Turns out the slightly schizophrenic weather we've been having this year (freezing cold, then hot, then rainy and cool, then warm) is perfect weather for growing ramps, and that's why they're available a couple weeks earlier than normal.I arrived just as the clock struck eight AM and hoofed it over to the Mountain Sweet Berry Farm Stand at 16th and Broadway. Sure enough, two crates full of ramps stood at attention, just waiting to be swarmed by food-obsessed New Yorkers like me (and you!). I was early enough to avoid any kind of line, and was even able to snap a few photos without being shoved from behind by ramp-mad hordes. And look what I spotted! (Pun not intended, but not edited out, either.)
Apparently, I was in good company. The Spotted Pig's bike, complete with cooler, was sitting right there, clearly awaiting a pre-ordered take of the morning's ramp harvest. After a swing through the market (and a stop in Whole Foods for some bacon, since Flying Pigs Farm was out), I jumped back on the 4 train to head uptown for a breakfast of champions.
Fresh fettucine with ramps, bacon and an egg is my traditional dish of celebration. I welcome ramps with open arms, pasta and pork. It's just my way. (Using fettucine and eggs from the Greenmarket helps keep things local, fresh and delicious.)
Trust me: you should run out right now to make this. (Vegetarian folk, just sub in a tablespoon or so of olive oil for the bacon fat, and don't skimp on the cheese. It's almost as good as the bacony version. A hit of cream or half and half wouldn't hurt you, either.)
Fresh Fettucine with Ramps, Bacon and an Egg
2 slices thick-cut, maple-cured bacon cut crosswise into 3/4 inch pieces
1/2 bunch of ramps, cleaned and chopped into one-inch lengths (about 1 cup)
1/4 pound fresh fettucine, cooked to al dente and drained (save 1/4 cup of the cooking water)
1/4 cup grated parmesan cheese
1 tbs. olive oil
1 egg
Salt and pepper
Set a medium skillet over high heat; heat until hot. Turn heat down to medium high and add the bacon to the pan. Cook slowly, rendering the fat until the bacon is just crispy. Remove the bacon pieces with a slotted spoon.
Add the ramps to the pain and saute them in the bacon fat, cooking until the white parts begin to brown. Season (lightly) with salt and pepper, and return the bacon to the pan. Add the fettucine and stir with tongs to combine the sauce with the pasta, adding a little pasta water if things need moisture. Turn off the heat.
In a small skillet, heat the olive oil over meidum heat. Once it's hot, crack the egg into the pan and fry until the edges just begin to turn crispy. Mound the pasta on a plate or in a bowl, top with the fried egg and parmesan cheese, and eat!
Serves one.
I just updated View Mapper to support scaffolding for models in a has_many, :through relationship. It generates a complex form that is a combination of the “belongs_to” scaffolding from part 1 of this series and the nested attributes scaffolding I wrote about in November:

Based on the programmer/assignment/project example from the ActiveRecord documentation page, this form will create a new programmer record and allow the user to add one or more assignments, each of which also has a name text field. For each new assignment the user can also select an existing project record. Here’s the Programmer model with the has_many :through association:
class Programmer < ActiveRecord::Base has_many :projects, :through => :assignments has_many :assignments accepts_nested_attributes_for :assignments, :allow_destroy => true, :reject_if => proc { |attrs| attrs['name'].blank? && attrs['project_id'].blank? } end
This implements a many-many relationship between programmers and projects; the assignments model is used to map the projects with the programmers. I’ve also specified that the programmer model accepts_nested_attributes_for assignments… more on that below.
You can now use the “view_for” generator from View Mapper to generate the form above for your models using a new view called “has_many_existing:”
$ sudo gem install view_mapper $ script/generate view_for programmer --view has_many_existing:projects
Assumptions and requirements
<u>Nested Attributes:</u> the form above works by using ActiveRecord’s nested attributes feature to save multiple assignments for a single programmer. Therefore, you need to be sure you call accepts_nested_attributes_for in your target model; if you forget to do this, you’ll get an error from View Mapper:
$ script/generate view_for programmer --view has_many_existing:projects
warning Model Programmer does not accept nested attributes
for model Assignment.To fix this problem you can use the code I showed above:
class Programmer < ActiveRecord::Base has_many :projects, :through => :assignments has_many :assignmentsaccepts_nested_attributes_for :assignments, :allow_destroy => true, :reject_if => proc { |attrs| attrs['name'].blank? && attrs['project_id'].blank? }end
The options I’ve specified here tell ActiveRecord it is allowed to delete assignment records (when the user clicks “remove” in the form) and to avoid creating empty assignment records if all of their attributes are blank (if the user clicked “Add Assignment” an extra time).
Or if you prefer you can generate the entire target model including the nested attributes call using the scaffold_for_view generator like this – specify the new model’s columns using the same syntax as the standard Rails scaffold generator:
$ script/generate scaffold_for_view programmer
first_name:string last_name:string
--view has_many_existing:projectsIt’s easy to overlook one very elegant detail here about ActiveRecord’s nested attribtues feature: note that “project_id” is one of the nested attributes, generated by each of the project select list boxes. (They are implemented with collection_select; see part 1 of this series). Now when the new programmer form is submitted all of the associations for each assignment – and for the new programmer – are setup. In other words, after you save the new programmer record this way you can immediately access the associated projects through assignments: “programmer.projects” – very cool! And it's all seamless: I don't have to write any code in my controller to associate the projects or assignments with the new programmer.
<u>Correct associations among your models:</u> if you forget to put the proper associations in your three models the has_many :through behavior will not work. You need to have six associations setup among your three models like this:
class Programmer < ActiveRecord::Base has_many :projects, :through => :assignments has_many :assignments end class Project < ActiveRecord::Base has_many :programmers, :through => :assignments has_many :assignments end class Assignment < ActiveRecord::Base belongs_to :project belongs_to :programmer end
View Mapper will help you out by displaying an error message if you’re missing one of these:
$ script/generate scaffold_for_view programmer name:string
--view has_many_existing:projects
warning Model Project does not contain a has_many association for Assignment.…or if you’re missing one of the corresponding foreign key columns in the “through” model:
$ script/generate scaffold_for_view programmer name:string
--view has_many_existing:projects
warning Model Assignment does not contain a foreign key for Programmer.<u>Has many existing model identified by name attribute:</u> In the form above, the Project records were identified in the select list boxes using their “name” attribute. Therefore, you need to insure that your existing model has a name column or method; if it does not View Mapper will display an error message like this:
$ script/generate scaffold_for_view programmer name:string
--view has_many_existing:projects
warning Model Project does not have a name attribute.To fix this problem, add a “name” method to your existing model, or else you can specify that View Mapper use a different attribute (e.g. “code”) instead with this syntax:
$ script/generate scaffold_for_view programmer name:string
--view has_many_existing:projects[code]<u>Associated model name method in through model:</u> The last requirement is that the through model, Assignment in this example, have a method (“project_name”) to display the name of its associated existing model. View Mapper requires this to avoid putting this code into the view:
class Assignment < ActiveRecord::Base belongs_to :project belongs_to :programmerdef project_name project.name if project endend
If you forget this method, View Mapper will remind you with this error message:
$ script/generate scaffold_for_view programmer name:string
--view has_many_existing:projects[code]
warning Model Assignment does not have a method project_code.Detailed Example
Here’s a step by step example of how to create a Rails application from scratch that contains the has_many :through scaffolding:
$ rails hmt_example
Here’s our model to hold the existing data:
$ cd hmt_example $ script/generate model project code:string
And the through model to associate projects with programmers; note I’ve included integer attributes as the foreign keys for both the existing model and the new model:
$ script/generate model assignment name:string
project_id:integer programmer_id:integer
$ rake db:migrateNext edit the new models and enter the required associations along with the project_code method:
class Project < ActiveRecord::Base has_many :programmers, :through => :assignments has_many :assignments end class Assignment < ActiveRecord::Base belongs_to :programmer belongs_to :project def project_code project.code if project end end
Now we’re ready to create the programmer has_many :through scaffolding; note I’ve specified “code” as the attribute to use to identify each project:
$ sudo gem install view_mapper
$ script/generate scaffold_for_view programmer
first_name:string last_name:string
--view has_many_existing:projects[code]
$ rake db:migrateNote this won’t work yet for a has_and_belongs_to_many association; dealing with that is next on my View Mapper to do list.
Good morning, my lovelies! It's a gorgeous, crisp Saturday morning here in New York - and, perhaps even more exciting than the weather: I bought my first ramps of the season this morning!
I made it to the Greenmarket by eight o'clock, and by eight-o'-five I had two bunches of those babies in my hot little hands. As I type, I'm rendering some maple bacon in which to cook about a third of my haul. (Pickling will come later in the season.) In the meantime, let's get down to Treasury business!
First up, some truly adorable pillows from MissMosh, a cute Etsy shop. I'm particularly taken with the chevron pillow, and am seriously considering ordering one in blue or coral for my living room armchair. Can't get enough of zigzags right now!
Next up, the gorgeous home of actress Julie Bowen (from Modern Family), decorated by her sister, the talented LA-based designer Molly Luetkemeyer. I love the house's modern, unstuffy feel, especially the use of color throughout. I could live here, for sure. And that bathroom? I die.
Finally, from Design Crush, an awesome collection of signage photography, including one with a quote from Eternal Sunshine of the Spotless Mind, one of my all-time favorite movies. These photos are forlornly beautiful, each nodding gently to a more prosperous era. And, you know...pancakes!
One of the classic pleasures of New York life is lunch from a halal food truck. Nothing says power lunch like a styrofoam box full of rice, iceberg lettuce and chicken thighs, topped with generous glugs of white sauce and hot sauce.
I typically indulge in what we New Yorkers fondly term "street meat" a couple of times a month, usually when I haven't had time to make lunch the night before. It's cheap, it's filling, and, frankly - it's delicious. Sometimes you can't beat a guilty pleasure, and street meat fits the bill in more ways than one. It's pretty bad for you - that mayonnaise-based sauce, the oil in which the chicken is cooked, the copious amounts of white rice...but it's also just so damn tasty.
And if you doubt its iconic stature, recall the scene in Working Girl where Harrison Ford & Melanie Griffith talk serious business over gyros from a cart. Nothing is more New York than that, my friends. (Except for the scene where she gets splashed in traffic, adding insult to injury. We've all been there, am I right?)
I think I have never encountered this issue until today. On my current Ruby on Rails project I am using Oracle as the database. I have a user model, which has an attribute email and the requirement was that a user can have more than one email id (separated by comma). I initially thought that I should use :text type, as I literally forgot that I am writing a migration against oracle database. Later, when the actual requirement come into the picture, I had to revise as user can have just one email-id and I started thinking about changing the type from :text to string.
There were two reasons to change the column type:
1. As per the requirement, user cannot have so many email-ids
2. Changing the column type from clob to string in oracle would give good performance boost
I decided to change the column type by simply using :
change_column :users, :email, :string, :limit => 4000
D:\rubyapp>rake db:migrate
(in D:/rubyapp)
== ChangeEmailColumnTypeToStringInUsers: migrating ===========================
-- change_column(:users, :email, :string, {:limit=>4000})
rake aborted!
An error has occurred, all later migrations canceled:
OCIError: ORA-22859: invalid modification of columns: ALTER TABLE users MODIFY email VARCHAR2(4000)
(See full trace by running task with --trace)
Failed! But why?
I came across: http://snippets.dzone.com/posts/show/3022
I followed the same pattern:
1. Add a temporary column with type as string (varchar2 in local)
2. Update all the records and copy text from email column to temporary column
3. Remove email column
4. Rename temporary column to email
I decided to not to run oracle commands in migration.
Here is how my migration now looks like:
class ChangeEmailColumnTypeToStringInUsers < ActiveRecord::Migration
def self.up
add_column :users, :email_temp, :string, :limit => 200
User.all.each do |user|
user.update_attribute("email_temp", user.email)
end
remove_column :users, :email
rename_column :users, :email_temp, :email
end
def self.down
add_column :users, :email_temp, :text
User.all.each do |user|
user.update_attribute("email_temp", user.email)
end
remove_column :users, :email
rename_column :users, :email_temp, :email
end
end
Very simple!
Last weekend, I was walking home from the subway when I passed the Street Sweets truck. I'd been fancying a bit of something sweet, maybe chocolate, and I spied a few fudgey brownies in the display case. I queued up behind a woman who spent a not inconsiderable amount of time choosing an Easter bunny, and then it was my turn.
Service at the truck was great, and I was especially impressed when they asked whether I wanted a brownie from the corner, middle or edge of the pan. Preferring a high fudge-to-crumble ratio, I of course asked for a middle piece. The crew placed my brownie in a little paper bag sealed with an adorable, giant sticker, and I set off home to enjoy my booty.
The brownie was delicious. In fact, I'd venture to say that it was almost as good as the brownies my mother makes, and that's high praise indeed. It was dark and rich, full of good chocolate flavor. The crust on top was minimally crumbly, and there were no nuts to get in the way of the chocolate. (Those of you who like nuts in your brownies? You're just...wrong. Sorry to be the one to break it to you. Kisses!)
I'd definitely go back - and I wouldn't mind trying one of the filled brioches, either. No, sirree.
Street Sweets
Check Twitter for Locations