Logo

May the force be with you..

about 1 year ago | Lalatendu Das: Interpretations of Technorealism

As a kid, I was really fascinated with "Star Wars" in general, and the aforesaid lines from Master Yoda in particular. For the uninitiated Yoda is the famous Jedi Master in the 'Star Wars' universe, who is a strong proponent of 'the Force' (a binding, metaphysical and ubiquitous power in Star Wars universe).


'The force' might be a figment of imagination of George Lucas, but it was intriguing nonetheless. I was really fascinated about a particular scene in 'The Empire Strikes Back', where Master Yoda teaches Luke Skywalker on how to use your mind power to interact with 'the Force' and move mundane (and almost always heavy..) objects from one place to another, without batting an eyelid.... I wished I could do that..

But that was then..


Coming back to our real world, how about moving a real object by just thinking about it? fascinating?? There is a new start-up company named nuerosky, who have developed a technology called Brain Computer Interface (BCI). BCI let's you catch your brainwaves and translate your thoughts to actions!!! (well almost...).


Check it out... And may the force be with you..

Two loves, united.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

As you all know by now, I love France. This love started as a sort of pining, probably around the time I started taking after-school French lessons in the first grade. In those lessons, we learned, among other things, to count to ten by memorizing stories. For example, for un, deux, trois, quatre, cinq, we learned the following story:

"One day, a cat wanted to cross a river, but didn't think it could swim across. A snake named Trois, resting in the branches of a tree on the opposite bank of the river, convinced the cat it could swim across easily. The cat believed Trois, began to swim, and sank. Repeat after me: Under Trois, Cat sank."

Lovely, non?

And yet, despite this gory tale, my love of France and the French language persisted and flourishes to this day, fueled in part by an ever-growing love of French cuisine. It's only natural, then, that the food-based French idioms Clotilde Dusoulier shares on Chocolate & Zucchini each week have me entranced. They combine a few of my favorite things. A few choice phrases:

"Aller à quelqu'un comme un tablier à une vache." Literally, "like an apron suits a cow," it's used to describe something that is bizarre or simply unbecoming on a person.

"Le ver est dans le fruit." Literally, "the worm is in the fruit," it means "the damage is already done," but it's so much more poetic.

Go check out the whole list, and let me know which ones are your favorites!

Rainy travels, part one.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

Last weekend, my friends Miles and Hall invited me to join them on a trip to Milford, Pennsylvania, in the Delaware Water Gap area. Nestled in a valley just west of the river, Milford is tiny but bustling, full of weekending New Yorkers and inhabited by a cast of characters worthy of Stars Hollow.

Our home base for the weekend was the Hotel Fauchère, established in 1852 by Louis Fauchère, then master chef at the legendary Delmonico's Restaurant in New York. Miles and Hall own a beautiful hotel of their own (Otahuna Lodge on New Zealand's South Island), and discovered the Fauchère through their Relais and Châteaux connections. The existing hotel was built in 1880, and is a gorgeous example of Italianate architecture, complete with clean, straight lines and flat roof.

Upon arrival, we were shown to our rooms, right next to one another on the third floor of the hotel, overlooking the garden. While the boys had a glassed-in shower in their room, mine featured a deep, claw-footed soaking tub. The rooms were pleasant, and the beds were very comfortable, but the bathrooms were gorgeous, all grey-streaked marble and Pennsylvania bluestone. Overall, the hotel gives off an air of summery ease, with plenty of spots to lounge, read, or play a game of dice (as Miles and I did on the super-rainy Saturday afternoon).

About fifteen minutes after check-in, Miles knocked on my door to let me know a little welcome gift had arrived: cheese, apple walnut bread from the hotel's patisserie, and an ice-cold bottle of Schramsberg. We headed out to the garden to enjoy these delights, enjoying one of the weekend's few hours of sunshine.

Next up, the sights of historic Milford, including a walking tour and a visit to Grey Towers. Oh, and, you know: food.

Go get a life:

about 1 year ago | Nilesh Naik: TechnoBites

We all are amid one of the biggest economic crisis that we have seen during our life. Job cuts, companies going bankrupt have been hogging limelight for quite some time. And for those who have trying to weather this storm life for them can be quantified only in the terms of work. You better slog from dawn to dusk or be ready to face the inevitable. These are the emotions many of us are going through right now. In 2001, it was only the IT companies, but now almost every sector is reeling under recession

But while all this is happening there is an organization that wants to lead in a different way. A top private sector company has asked its employees to ‘Go get a life’ by not spending much time at workplace and asked them to leave max 2 hours after the official business working hours. But sadly organizations like these are rare. In most organizations, performance is measured, not by quality of effort put in or the output shown, but by the amount of time spent in office, which may have been spent productively or not (usually the latter)! Even more unfortunate is the practice of sticking around in office till the boss leaves and my friends from other organizations still follow this practice.

In this current scenario, more and more corporates are asking their employees to come up with ideas to beat this recession. We too have a portal which provides a platform for employees to voice their ideas. But great ideas seldom come while sitting at a desk. Employees cannot be productive if they are tied up in office all day. It is important to re-charge your batteries and that cannot happen in the confines of an office.

My organization does help in overcoming these daily office stress by organizing fun events during weekends like a trip in or around Mumbai(trek, nature walk etc.) or some social event like visiting some foundation for underprivileged children.

"Your life today is the result of your attitudes and choices in the past…"

about 1 year ago | Abhishek Dharga: Face The Truth


I haven't written this article myself, but came across it on net. Its an amazing must read.........

"Your life today is the result of your attitudes and choices in the past…"
This is a story of an elderly carpenter who had been working for a contractor for the past 53 years. He had built many beautiful houses but now as he was getting old, he wanted to retire and lead a leisurely life with his family. So, he goes to the contractor and tells him about his plan of retiring. The contractor feels sad at the prospect of losing a good worker but agrees to the plan because the carpenter had indeed become too fragile for the tough building work. But as a last request, he asks the old carpenter to construct just one last house.
The old man agrees and starts working but his heart was not in his work anymore. He had lost the motivation towards work. So, he resorted to shoddy workmanship and constructed the house half-heartedly. After the house was built, the contractor came to visit his employee's last piece of work. After inspecting the house, he handed over the front door keys to the carpenter and said, "This is your new house. My gift to you." The carpenter was shocked and upset. Had he known that he was building his own house, he would have done a better job!".
Think of ourselves as the carpenter. Though we work hard every day, we put our least to some work, which we don't like and get shocked at a situation we have created for ourselves and try to figure out why we didn't do it differently.
Learn to enjoy your responsibilities with pleasure and not with pain. "Life is a do-it-yourself project". Do your job enthusiastically and with devotion, a positive output and a pleasing life will certainly be on your way.

Cinnamon buns, two ways.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

A couple of weekend ago, I set myself a challenge: make a whole hell of a lot of cinnamon buns.

Cinnamon buns are one of my favorite things of all time, but I'd never, ever made them at home before. I had no idea where to start (an internet search for recipes yielded, as you can imagine, an overwhelming number of options), and so I consulted my new go-to: my tweeps.

They came through with two very different recipes: one a quick-rising, buttermilk-based, biscuity version, and one a more traditional yeasted bun, with nuts and a caramel topping. Both are delicious, but different enough to satisfy two very different kinds of cravings. (Click the link for the buttermilk recipe; see below for the for yeast-risen recipe.)

The buttermilk biscuit version is chewy, slightly salty, and tangy from the buttermilk and cream cheese topping. The yeasted version is lighter in texture and has a deep, caramel flavor, made even richer by the addition of nuts to the filling. It also makes about three times as many rolls, so be prepared to either freeze your leftovers (they keep well for a few weeks) or invite over an army of friends to eat them while they're hot.

No matter which you choose (or if you make both), make sure to roll the filling tightly into the dough, something key to an evenly-baked, moist bun. And, of course, you must enjoy at least one bun with a cup of coffee - there really is nothing better than that.


Katie's Cinnamon Nut Buns

Makes approximately 24 buns

For the rolls:
1/4 cup warm water (about 110-115 degrees)

2 packets (1/4 ounce) active dry yeast

1 1/2 cups warm whole milk (110-115 degrees)

1/2 cup unsalted butter, melted and cooled slightly

1/4 cup sugar

2 1/4 tsp. salt

3 large eggs

6 cups all-purpose flour (plus more for work surface)


For the filling:
1 cup packed dark brown sugar
2/3 cup pecans

1/2 tsp. ground cinnamon

A pinch of salt
1/2 cup butter, at room temperature

For the glaze:

1 cup packed dark brown sugar

6 tbsp. unsalted butter

2 tbsp. water


Sprinkle yeast on water in small bowl, let stand until foamy (5-10 min.).

Butter two 13x9 (or three 9x9) baking pans; set aside.

In a large bowl, whisk together milk, butter, salt, sugar, and eggs. Add yeast mixture.
Using a wooden spoon, stir in 6 cups flour, until you have a soft, shaggy dough (if needed add more flour).

Turn dough out onto a floured work surface; knead until smooth (5 to 10 min.) Butter the inside of a large bowl; place dough in bowl, turning to coat. Cover bowl with plastic wrap and let stand in a warm spot until dough has doubled in size, at least one hour.

Place all of the filling ingredients - except for the butter - in the bowl of a food processor fitted with the blade attachment. Pulse until coarsely ground; set nut mixture aside.

Divide the risen dough in half (keep the other half covered). On a flour-dusted surface, roll dough out into a rectangle about 16 inches by 10 inches. Spread 4 tablespoons of the butter over dough, leaving about 1/2-inch border all around.

Sprinkle half the nut mixture over butter. Leave a border around the filling so it doesn't spill over. ? Roll the dough tightly, crosswise, like a jelly roll. Once you've finished rolling, use a sharp knife to cut the log crosswise into 12 equal pieces.

Place buns, cut side down, in the prepared pans. Cover pans loosely with plastic wrap and let stand in a warm spot until doubled in size (about an hour).

Place the oven racks in the upper and lower thirds of the oven, and preheat to 375°F. Bake buns until golden brown (25 to 30 minutes), rotating pans back-to-front and top-to-bottom halfway through.

Remove pans from the oven and let cool in pans, on racks, for fifteen minutes. Meanwhile, prepare the glaze:

In a small saucepan set over medium heat, mix the brown sugar, butter and water, stirring gently until the mixture comes to a simmer. Cook one minute more, then drizzle the glaze over the cooled buns. Let stand 10 more minutes before serving.

Buns keep well, cooled completely and then frozen in plastic bags, for up to four weeks. Thaw overnight and warm gently in the oven before serving.

Many, many thanks to @lostplum and @KathrynYu for the awesome recipes!

Happy to announce version 1.2 of my news reader application

about 1 year ago | Rohan Daxini: Rohan Daxini

After much of a delay and managing time to code during weekends, I am glad to announce version 1.2 of my news aggregator application. Check out http://whiz.kiprosh.com

Current Features

  • drag and drop widgets
  • simple accordion driven ui for conveniently reading news
  • cross browser compatibility - tested on widely used 9 different browsers
  • ajax driven functionality
  • tried to made it one of the fastest rss reader
To keep it simple at this point of time, I just have very limited set of rss feed sources in the app.

Oh btw thanks to Nilesh, Alex, Matt, Biju and Sachin for feedback and appreciating the application :)


Upcoming Features (for v1.3 and higher)
  • navigation menu to have list of various feeds categorized appropriately
  • feeds source with aditional info like ranks, no of hits etc.
  • user personalized start pages and improved UI
  • ability to search particular news / information from the list of rss feeds or user selected feeds

What Grandaddy Taught me about Information Flow

about 1 year ago | Michael Idinopulos: Transparent Office

My grandfather never used computers, and he died when "wiki" was still just a word in Hawaiian. But in a single comment he taught me all about Enterprise 2.0. Grandaddy (known to the rest of the world as Phil Plesofsky)...

Playing with Prawnto - Ruby PDF generator plugin

about 1 year ago | Niranjan Sarade: InLoveWithNature

I recently watched Ryan's railscast PDFs with Prawn and tried it on tool version tracker application's index page (Please see my previous blog - Tool Version Tracker )

It was a good experience of writing text, image, table to pdf document with clean and neat code. I was able to generate the pdf document I intended to display in less than 20-25 minutes. (installing prawn gem, prawnto plugin, understanding some API and making code changes :-)

Prawnto is a rails plugin leveraging the Prawn library to produce compiled pdf views. The plugin adds a new template handler class that will process any views with a .prawn extension. These .prawn views are evaluated as ruby code and are provided an instantiated Prawn::Document object as 'pdf'. The pdf object gives you complete access to all of prawn's capabilities.

I added the following line to my index.rhtml page :-

link_to 'PDF Format', tools_url(:pdf)

Then I created index.pdf.prawn file :-



Clicking 'PDF Format' link on index page generated inline pdf for tools as below :-



There are many things that you can do with prawnto. (http://www.cracklabs.com/prawnto/demos) I plan to try these different options.

Have a nice pdf ! :-)

Taming the beast: Using JRuby and RSpec to test a J2EE application

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

Working with J2EE applications is something like wandering in a jungle: you never quite know what wild animal you’ll find around the next corner… it might be an ORM tool like Hibernate; it could be an application framework like Spring or Struts with lots of confusing XML files, or it might just be a long list of obscure JAR files that you need to find and download… whatever it is, you’re guaranteed to spend countless hours wasting time learning things you really didn’t want to know. This article will show how you can get your J2EE application under control by using JRuby and RSpec… but first, let’s take a quick look at what RSpec is and how it’s normally used with Ruby.

Using RSpec with Ruby

If you are a Ruby developer, you would probably write code similar to this to add up an array of numbers:

class Calculator
  def self.sum numbers
    numbers.inject do |sum, x|
      sum+x
    end
  end
end

This is simple enough to run:

$ irb
irb(main):001:0> require 'calculator.rb'
=> true
irb(main):002:0> Calculator.sum [2, 3]
=> 5

One of the best things about Ruby are all of the different testing tools available to you – for example, you could write a test for this method using RSpec like this:

require 'calculator.rb'
describe "Calculator" do
  it "should add numbers correctly" do
    Calculator.sum([1, 2]).should == 3
    Calculator.sum([2, 2]).should == 4
    Calculator.sum([2, 3, 4]).should == 9
  end
end

And then run the spec as follows:

$ spec calculator_spec.rb 
.
Finished in 0.001703 seconds
1 example, 0 failures

RSpec allows you to write test code that is readable, and also behavior-oriented; that is, the tests reflect the way an end user might actually behave. In fact, RSpec is really just the first step towards behavior-driven-development. The Ruby community also benefits from other tools such as WebRat, Cucumber, etc., that can make testing very easy and effective.

A J2EE sample app

Let’s rewrite the “sum” Ruby method above using Java. To make this feel more like an actual J2EE application, we’ll use a service class that will perform the actual sum operation for us, and set it up with the Spring framework. We can start by writing an XML file called “ApplicationContext.xml” for Spring to use, and declare a bean called “calculatorService:”

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
  "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
  <bean id="calculatorService"
    class="calculator.CalculatorServiceImpl">
  </bean>
</beans>

In a real J2EE app, we would probably have an interface called “CalculatorService” like this:

package calculator;
public interface CalculatorService {
  public int sum(int[] array);
}

And then we’d implement it using a concrete class, like this:

package calculator;
public class CalculatorServiceImpl implements CalculatorService {
  public int sum(int[] array)
  {
    int sum = 0;
    for (int number: array)
    {
      sum += number;
    }
    return sum;
  }
}

And finally, let’s write a simple Java command line client for this so we can test running it from the command line:

package calculator;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class CalculatorApp {
  public static void main(String[] args) throws Exception {
    int[] array = { 2, 3 };
    ClassPathXmlApplicationContext application_context =
      new ClassPathXmlApplicationContext("ApplicationContext.xml");
    CalculatorService calculator =
      (CalculatorService)application_context.getBean("calculatorService");
    System.out.println("2 + 3 is: " + Integer.toString(calculator.sum(array)));
  }
}

This will also help us figure out how to write the ruby spec later. If you run this from Eclipse or your favorite Java IDE, you’ll get:

Jun 25, 2009 12:21:58 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@3479e304: display name [org.springframework.context.support.ClassPathXmlApplicationContext@3479e304]; startup date [Thu Jun 25 12:21:58 EDT 2009]; root of context hierarchy
Jun 25, 2009 12:21:58 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [ApplicationContext.xml]
Jun 25, 2009 12:21:58 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@3479e304]: org.springframework.beans.factory.support.DefaultListableBeanFactory@604788d5
Jun 25, 2009 12:21:58 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@604788d5: defining beans [calculatorService]; root of factory hierarchy
2 + 3 is: 5

This is starting to feel like an actual “Enterprise” J2EE application now that we have an XML config file and lots of confusing information being logged!

Running RSpec with JRuby

Now that we have a J2EE application to test, let’s get started with JRuby. First, you will need to download and install JRuby. This is really just a matter of downloading the TAR file and then placing the JRuby bin folder on your path. Test that you have it setup properly by running this command:

$ jruby --version
jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-03 rev 7996) [x86_64-java]

Now let’s update our Ruby spec from above and get it to work with Java. Here’s what we had for Ruby:

require 'calculator.rb'
describe "Calculator" do
  it "should add numbers correctly" do
    Calculator.add([1, 2]).should == 3
    Calculator.add([2, 2]).should == 4
    Calculator.add([2, 3, 4]).should == 9
  end
end

The key to using JRuby to test Java is to add this line at the top of the spec:

require 'java'

This tells JRuby that we want to allow the Ruby code to call Java directly. But what code should we try to call? The nice thing about the Spring framework is that is makes a series of “beans,” i.e. Java objects, available to us. The reason I went to the trouble of adding the Spring framework to this sample app is that for a real J2EE application using Spring to create and load a Java object will be the simplest path towards testing your target application. What I did while testing a real J2EE application was to:

  • Identify what business logic I wanted to test
  • Look for the Java object that was the top-level, simplest interface to that business logic under the user interface layer
  • Find a bean in the ApplicationContext.xml file that corresponded to that Java object. In my case, there actually was no such bean, and I had to slightly modify the application I was testing by adding a new <bean> tag to one of the Spring XML files.

If your application is not using Spring, you might simply be able to create a Java object directly from your Ruby code, or in the worst case scenario you might have to make Java code changes to the target J2EE app to break dependencies that the object you’d like to test has on other objects, interfaces, services, etc., allowing you to create it in isolation. Michael Feathers has written an entire book on dependency breaking techniques.

Back to this sample app: here in our Ruby spec we can follow the same pattern that I used above in the command line Java client: calling “ClassPathXmlApplicationContext” to get the application context, and then creating a bean with getBean. The other thing we need to add are “include_class” directives that indicate to JRuby which Java classes should be loaded from the classpath and made available to the Ruby script. Here’s the spec code with the new JRuby code changes in bold:

require 'java'
include_class 'org.springframework.context.ApplicationContext'
include_class
  'org.springframework.context.support.ClassPathXmlApplicationContext'
describe "Calculator" do
  it "should add numbers correctly" do
    application_context =
      ClassPathXmlApplicationContext.new "ApplicationContext.xml"
    calculator =  application_context.getBean "calculatorService"
    calculator.sum([1, 2]).should == 3
    calculator.sum([2, 2]).should == 4
    calculator.sum([2, 3, 4]).should == 9
  end
end

Now let’s try to run it using JRuby. Another trick with JRuby is knowing how to use the “-S” option – this allows you to run a Ruby command like “gem” or “spec,” but inside a JRuby session. So here’s how to run our new spec using JRuby:

$ jruby -S spec calculator_spec.rb 
(eval):1:in `include_class': cannot load Java class
  org.springframework.context.ApplicationContext (NameError)
  from /Users/pat/src/jruby-1.1.5/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/object.rb:38:in `eval'
  from /Users/pat/src/jruby-1.1.5/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/object.rb:67:in `include_class'
  from /Users/pat/src/jruby-1.1.5/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/object.rb:38:in `each'
  from /Users/pat/src/jruby-1.1.5/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/object.rb:38:in `include_class'
  from calculator_spec.rb:2

So what is the error message all about? This just means that JRuby wasn’t able to find the ApplicationContext class from Spring on the classpath. But what is the classpath anyway? It would be nice to be able to simply specify the classpath using a command line option, the way you do with a java command line using “-cp” for example. But for JRuby you need to specify the classpath as an environment setting. To make this easier, I wrote a simple shell script for running a JRuby spec:

BASE=`pwd`
CLASSPATH=$BASE/lib/spring-2.5.1.jar
export CLASSPATH
jruby -S spec $1

This just gets the current working directory and constructs the classpath setting, indicating where to find the Spring JAR file. Finally we export the classpath value and call JRuby. This will work on the Mac and Linux; for Windows you would need something slightly different. Anyway, now I can run my specs like this:

$ ./jruby-spec.sh calculator_spec.rb 
F
1)
NativeException in 'Calculator should add numbers correctly'
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
org/springframework/util/ClassUtils.java:73:in `<clinit>'
org/springframework/core/io/DefaultResourceLoader.java:52:in `<init>'
org/springframework/context/support/AbstractApplicationContext.java:198:in `<init>'
org/springframework/context/support/AbstractRefreshableApplicationContext.java:80:in `<init>'
org/springframework/context/support/AbstractXmlApplicationContext.java:58:in `<init>'
org/springframework/context/support/ClassPathXmlApplicationContext.java:119:in `<init>'
org/springframework/context/support/ClassPathXmlApplicationContext.java:66:in `<init>'
sun/reflect/NativeConstructorAccessorImpl.java:-2:in `newInstance0'
sun/reflect/NativeConstructorAccessorImpl.java:39:in `newInstance'
sun/reflect/DelegatingConstructorAccessorImpl.java:27:in `newInstance'
java/lang/reflect/Constructor.java:513:in `newInstance'
org/jruby/javasupport/JavaConstructor.java:226:in `new_instance'
org/jruby/java/invokers/ConstructorInvoker.java:100:in `call'
org/jruby/java/invokers/ConstructorInvoker.java:180:in `call'
etc...

Oops – it turns out that Spring actually requires the Apache Commons logging JAR file to be on the classpath also. This sample app is definitely reminding me of a complex J2EE app running on WebSphere or WebLogic! Let’s add commons-logging-1.0.4.jar to the classpath in my shell script and try again:

$ ./jruby-spec.sh calculator_spec.rb 
Jun 25, 2009 1:58:15 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4c6c3e: display name [org.springframework.context.support.ClassPathXmlApplicationContext@4c6c3e]; startup date [Thu Jun 25 13:58:15 EDT 2009]; root of context hierarchy
Jun 25, 2009 1:58:15 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [ApplicationContext.xml]
F
1)
NativeException in 'Calculator should add numbers correctly'
org.springframework.beans.factory.BeanDefinitionStoreException:
  IOException parsing XML document from class path resource
  [ApplicationContext.xml]; nested exception is java.io.FileNotFoundException:
  class path resource [ApplicationContext.xml] cannot be opened because
  it does not exist
org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java:334:in `loadBeanDefinitions'
org/springframework/beans/factory/xml/XmlBeanDefinitionReader.java:295:in `loadBeanDefinitions'

Once again, I’ve forgotten something in my class path: this time it’s the ApplicationContext.xml file which I passed into ClassPathXmlApplicationContext in the spec. As the name implies, I need to put the XML file on the classpath in order for Spring to be able to find it. Let’s cut to the chase and put everything I need onto the classpath… here’s the final version of jruby-spec.sh (the classpath line split into two for readability):

BASE=`pwd`
CLASSPATH=$BASE/bin:$BASE/resources:$BASE/lib/spring-2.5.1.jar:
  $BASE/lib/commons-logging-1.0.4.jar
export CLASSPATH
jruby -S spec $1

Now JRuby will be able to find everything that it needs: Spring, Apache Common Logging, the ApplicationContext.xml file, and also the application’s class files saved under “bin” by Eclipse. Now if I run the spec once more it should all work:

$ ./jruby-spec.sh calculator_spec.rb 
Jun 25, 2009 2:02:22 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1717d968: display name [org.springframework.context.support.ClassPathXmlApplicationContext@1717d968]; startup date [Thu Jun 25 14:02:22 EDT 2009]; root of context hierarchy
Jun 25, 2009 2:02:22 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [ApplicationContext.xml]
Jun 25, 2009 2:02:22 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@1717d968]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5a21fdc8
Jun 25, 2009 2:02:22 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5a21fdc8: defining beans [calculatorService]; root of factory hierarchy
F
1)
TypeError in 'Calculator should add numbers correctly'
for method sum expected [[I]; got: [org.jruby.RubyArray];
  error: argument type mismatch calculator_spec.rb:8:
Finished in 0.70559 seconds
1 example, 1 failure

What’s this error all about? I do have the correct classpath now, but what does “RubyArray” mean? I thought I passed an array of integers into the calculator service:

calculator.sum([1, 2]).should == 3

Well it turns out that Ruby and JRuby aren’t quite the same thing. Since JRuby is actually a Java application itself, it implements each Ruby class with a corresponding Java class. For the Ruby Array class, JRuby has created a class called “org.jruby.RubyArray.” When you call Java code and pass in Ruby objects, JRuby actually provides the Java equivalent of these Ruby objects to the Java code. That’s why we get an error here; our calculator service doesn’t expect a RubyArray – it expects int[] instead.

To avoid this error, we need to convert the RubyArray into a normal Java array, using a JRuby method called “to_java()”, like this:

calculator.sum([1, 2].to_java(:int)).should == 3

To_java takes a symbol as a parameter, which indicates what type each element of the Ruby array should be converted into. Now our spec will pass!

$ ./jruby-spec.sh calculator_spec.rb 
Jun 25, 2009 2:15:37 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1717d968: display name [org.springframework.context.support.ClassPathXmlApplicationContext@1717d968]; startup date [Thu Jun 25 14:15:37 EDT 2009]; root of context hierarchy
Jun 25, 2009 2:15:37 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [ApplicationContext.xml]
Jun 25, 2009 2:15:37 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@1717d968]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5a21fdc8
Jun 25, 2009 2:15:37 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5a21fdc8: defining beans [calculatorService]; root of factory hierarchy
.
Finished in 0.28237 seconds
1 example, 0 failures

Taking a step back, I think what we’ve done is quite interesting; we have:

  • Pulled a J2EE application out of Eclipse, IntelliJ or whatever IDE you project uses, and started to run it from the command line instead. For me, avoiding a confusing and complex IDE makes the application easier to work with… more like a Rails app.
  • Documented what the classpath needs to be and what JAR files the application requires in an understandable text file format, rather than having it hidden away in a confusing Eclipse dialog box.
  • Exposed the J2EE application’s business logic to testing below the user interface layer – nothing here involves a web browser or user interface testing tool like Selenium.
  • Started to apply behavior driven development to a J2EE application, using the best tools available, which happen to be written in Ruby.
In a future post, I’ll try to take the next step of using Cucumber features to test this same J2EE sample app. It will be interesting to find out if Cucumber works will with JRuby.

Alternate iPhone native application development platform

about 1 year ago | Lalatendu Das: Interpretations of Technorealism

Ansca - a start-up company, launched a new iphone native application development platform named 'Corona'. Corona uses a scripting language named 'Lua' (more in line of Javascript/ActionScript).

So far, one of the entry barriers for new developers was the steep learning curve of Objective-C (on Cocoa/XCode). With Corona, we are likely to see many more first time developers developing native iphone apps. Happy browsing the AppStore !

Using Github Through Draconian Proxies (Windows And Unix)

about 1 year ago | Alex Rothenberg: Common Sense Software

I came across this great set of instructions on how to tunnel through a proxy to use github - http://returnbooleantrue.blogspot.com/2009/06/using-github-through-draconian-proxies.html

The proxy where I work is not quite so draconian that I need to follow these steps but its nice to have these instructions just in case :)

Metric_fu 1.1.0 released with a patch from me

about 1 year ago | Alex Rothenberg: Common Sense Software

Metric_fu just released version 1.1.0 of their gem which I'm pleased to say includes a patch submitted by me. This is exciting as its the first time I've had my code included by someone I don't know in one of the open source projects I admire.

I was not originally going to make the patch as I thought I'd just hack around to fix the problem locally just enough to get it working but my friend Matt encouraged me to fix the root cause which turned out to be not too hard and got me into the metric_fu source. I always learn something when I read source from others I admire.

The process of submitting the patch was pretty easy and I plan to make it a habit when I run into issues with other gems. I,

  1. Experienced a problem and decided not to live with it
  2. Created a fork of metric_fu on github
  3. Cloned locally and iteratively made my changes until I had my fix complete
  4. Rebased my changes into a single commit (I wrote an article on this a few weeks ago)
  5. Pushed my patch back to github on a branch
  6. Submitted my patch back to Jake's repository as an issue

Solving the problem of gem dependencies with github names

I am using relevance-rcov instead of the rubyforge version of rcov as it has been maintained more recently and specifically fixed a segmentation fault problem I previously faced. The problem is that I couldn't install metric_fu as it put a gem dependency on 'rcov' in its gemspec. What seems broken is that there's no way to put a dependency on 'rcov' but have rubygems realize that 'relevance-rcov' is a fork of rcov so should satisfy the dependency.

I've seen a lot of talk recently about rubygems (including Why Using require ‘rubygems’ Is Wrong, RubyGems: Problems and (proposed) Solutions and Rip: A Next Generation Ruby Packaging System - Watch Out RubyGems!) but so far I haven't found a solution to the forking and naming problem emerge.

For Metric_fu I decided to change the install-time dependency to a runtime one. This solves my basic problem of not finding relevance-rcov but also allows for more flexibile use of metric_fu. If someone does not want to generate reek or rcov metrics why should they be forced to install those gems in order to use metric_fu? By defering the dependency until runtime we will never hit the dependency for those metrics we are not using.

You can look through the commit to see exactly how I did this.
  1. Deleted the install time dependencies from metric_fu.gemspec
  2. Added the runtime dependencies when a specific type of metric is instantiated by
    • Inserting a verify_dependencies! strategy step to the initialization in lib/base/generator.rb
    • Implementing verify_dependencies! in each of the subclasses for different metrics in lib/generators/*
  3. Did it with TDD writing tests around everything before implementing my changes

Should gems use install time dependencies? Should a gem author decide which fork of a gem is required? What do you think?

Change of season.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

The asparagus are few and far between, strawberries are everywhere, and the tomatoes are starting to pop up at more and more stands...this can only mean one thing: summer is here, however cold and rainy it may be. I'm looking forward to a couple months of tomato, basil & corn salads, roast squash, beets galore, and stone fruits.

What are you most excited about this summer - food-related or no?

Extra Sanitize your models

about 1 year ago | Amit Kumar: RubyizednRailified

We have been using xss_sanitize, which is nicely bundled plugin. You drop it in your Rails application and rest the plugin takes care of protecting from XSS attacks. In our project, we found issues dealing with other special characters like -> microsoft single-double quotes, asterisk, percentage, tilda, angular brackets, question mark etc.

These characters cause extra pain to handle when they appear in urls. You have to encode/decode them. Rolled out a simple but effective plugin. It does nothing but puts an extra layer of sanitization on top of xss_terminate. Yes it is independent of xss_terminate and you can just use it.

Check the project page for usage.

Google Documents: Simple but effective.

about 1 year ago | Binoy Shah: Binoy Thinks

Today, I and Abhishek were discussing about uploading a document into a Blog site. All we could find is an option of adding a hyperlink into the Blog.

While exploring the Google homepage, I came across a page called Google Documents. And as I started exploring it further, I found it really really useful.It is simple yet a really effective tool to share documents over the internet. In Google Docs, one can create docs in Excel, Word or PPT format.

I could also upload in various formats like .doc, .xls, .ods, .ppt and many more. The best part that I liked about Google docs is sharing of the documents and ability to edit it online.

The tool is pretty simple to use. Yet another Google tool that is easy to use, light in framework and most importantly very effective.

Just one thing to note is it should be used with discretion and confidentiality of the content should be maintained.

How to Use your iPhone's Internet on your Mac

about 1 year ago | Erika Santos: Santos on Technology and Life

Out of all the features with the 3.0 iPhone software upgrade, there's really only one that blew my mind: Tethering, connecting a device that can access the Internet to another device that cannot. Basically, you access Internet on your Mac computer through the Internet you're paying for your phone.

However, this feature is apparently dormant on the iPhone until ATT manages to build up its network to support such a boost in demand.

So if this feature is not being offered by ATT, why am I excited about it? I'm glad you asked. I'm excited because with a little bit of what I affectionately call 'legal hacking', you can tether today!

P.s.: I wrote this blog entry through tethering. The speed was pretty darn good.

Step by step (for Mac):

1. Use FIREFOX to download file ATT_US.ipcc

2. Make sure to QUIT iTunes

3. Open Terminal and type "defaults write com.apple.iTunes carrier-testing -bool TRUE" (without the “ “). Then hit enter.

4. Open iTunes, select your phone and press "check for updates" while holding down the 'Alt' key on your keyboard. You will be prompted to select a file. Select the ATT_US.ipcc file.

5. Sync your phone

6. After you load the file, make sure you restart the phone

7. Pat yourself on the back; you're tethering!









Feature list of information management tool

about 1 year ago | Abhishek Dharga: Face The Truth

Few days back, our technology excellence group gave me a Cognos 8 features list to review.
I had to review the features supported by cognos 8 .
After reviewing it I got to know some new features of Cognos 8.

I also came across some features that were not directly supported by Cognos 8 but could be implemented indirectly.
There were certain features which we never knew existed in Cognos because I did not get a chance to implement those in the Project that I am working.
Having a knowledge of these features certainly helped me understand the tool better.
I can now use this feature list to compare Cognos 8 with various information management tools in the market so as to give informed consultancy to my clients.

Below is the link to Cognos 8 feature list

http://spreadsheets.google.com/pub?key=rCcMS5fI3RE-z560jsqEo7A&output=html

Gallivanting around Pike County.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

Hello there, dear readers! This is one of those posts where I'm the one looking to you for advice and wisdom.

I'm headed to Milford, Pennsylvania tomorrow for a long weekend with some very good friends (Miles and Hall, who decamped to New Zealand a couple of years ago when they bought Otahuna Lodge, the most amazing lodge you'll ever see), and am wondering what you wise folk recommend we do.

Obviously, a visit to the fluviarchy is in order, as is a stop at the patisserie in our hotel. But what else, what else? Do tell!

Code Reading – The Open Source Perspective

about 1 year ago | Niranjan Sarade: InLoveWithNature

The book 'Code Reading' has been written by Diomidis Spinellis.

This book is the first one to exclusively deal with code reading as a distinct activity. It primarily emphasizes on developing and improvising the Code Reading or comprehending skills of a programmer. The simplest way to learn to write great code is by reading good code. For that, one needs to make a distinction between a good and bad code.

The level of abstraction the programmer can hit upon given a section of code to analyze, depends on his/her code reading skills and perception about the problem. This book helps to enhance these skills.

At the beginning, it briefly introduces the commonly used programming structures and explains how to extract semantic meaning out of them. It talks about different nifty code reading techniques that may be used in the following scenarios –

- Analyzing large bodies of code
- Adding new functionality
- Fixing bugs
- Integrating into new environments
- Code Reuse

It further talks about understanding project build process, following coding standards and conventions, effectively using software documentation to supplement code reading efforts and getting architecture overview from a code in terms of design patterns.

It also describes some of the code reading and browsing tools which can enhance the code reading efficiency. (e.g. Regular expressions, grep for search, diff for difference in files, source navigator for browsing, code beautifiers, runtime tools like profiler – gprof in unix, etc.)

Reading this book will definitely spur interest into the programmers to learn a lot from the existing open source code and make valuable contributions to the open source world in future.

Opera unite: Reinventing the Web

about 1 year ago | Lalatendu Das: Interpretations of Technorealism

Yesterday, Opera labs launched 'Opera unite' which claims to 'reinvent the web'. ..and how?

This new technology essentially turns every computer running the Opera browser into a full fledged web server. You can use Opera unite to share documents, music, photos, videos or use it to run websites or even setup chat rooms without needing any third party software.

As per the concept, i think it's noble, a bright idea and has potential to change the way we work. As per Lawrence Eng (a product analyst in Opera software)..."This technology is a radical first step towards addressing what I call “the Internet’s unfulfilled promise”, which is about our ability to connect with each other and participate meaningfully online—on our own terms, and without losing control of our data"

So far so good, but does it work?? I checked it out.
I downloaded and setup two services to explore those better.
FileSharing: - Pretty interesting, you can share files from your file system, directly with all netizens. You can specify security rules as well.
Fridge:- lets you put notes, stickies on your fridge. What's more, you can share your fridge will all, so that others can see your notes and put more notes also (if you permit). But this service was not very reliable. not sure if it works for you, but you can see my notes at http://office.lalatendu.operaunite.com/fridge/

My verdict. Concept: 8/10, Implementation 5/10 (see more idepth analysis on why Opera unite doesn't deliver what it promises to : http://factoryjoe.com/blog/2009/06/16/thoughts-on-opera-unite/)
Nonetheless, recommended for all.

Mobile Phones for Data Gathering

about 1 year ago | Amy Grandov: Technology for Social Innovation

CNN reported yesterday on the use of mobile phones and open source software to help developing countries gather information to fight infectious diseases. A field worker with a mobile phone can enter data about vaccine availability or an outbreak of symptoms, for example, and instantly inform headquarters. The article quotes some interesting statistics: Of 4 billion mobile phones, 2.2 billion are owned in the developing world. 64% of mobile phone users are in the developing world. The availability of mobile phones far outstrips computers, and even land lines.

For more information about the use of mobile technology for humanitarian goals, check out MobileActive and Open Mobile Consortium.

Twitter is the new CNN

about 1 year ago | Michael Idinopulos: Transparent Office

CNN thought its biggest threat was FOX News. It was wrong. The competition is Twitter, and the competition is winning. In 1980, CNN went live as America's first all-news TV network. It raised a fundamental question: Is there enough news...

Redesign for Existing Sites

about 1 year ago | Amy Grandov: Technology for Social Innovation

Lotus Notes design - an oxymoron? Apparently not. I recently listened to a UXDesignCast podcast interview with Mary Beth Raven (User Experience Lead for Lotus Notes) and John Lance (Product Designer for Lotus Notes Calendar and Scheduling). IBM updated the design for Notes 8, and as an end user I have to agree its a big improvement. At Mary Beth's admission, Lotus Notes design had been neglected for years, and the old interface was tired and years out of date.

Introducing a new design to a very mature product with an established userbase of 140million is no easy accomplishment. The strategy for Notes 8 was clearly a 'big bang' release of a new design. Its encouraging to see that they used a user-centered design approach, complete with personas and iterative user feedback.

Jared Spool, a well known user experience designer and thought leader, discussed Amazon's contrasting approach in a very entertaining yet fact-rich podcast on UIE.com. Jared describes how Amazon evolves incrementally and subtly, and never releases a big redesign. Also 'user centered', Amazon introduces changes to small populations of its users, monitors user actions and behaviors, and iterates on the design change before releasing it more broadly. Amazon also has a huge population of existing users, and in general people hate change. Amazon is not risk averse - they take chances and accept failure as a part of the process of innovation. But changes are small and gradual. If you're interested in Amazon as a site or a business, this podcast is definitely worth a listen. Jared also goes into several reasons why you can't simply copy what Amazon does on your website due to some unique characteristics of the company, its business model, and its customers.

I don't think its possible to say one strategy is better than the other in all cases. But it is a good observation on the part of Amazon, and Jared Spool, that no one really enjoys having a site they're familiar with redesigned. Even if the design is an improvement, you're likely to hear complaints as people can't find what they're looking for, or aren't comfortable yet with the cool new features being offered. Product developers should consider options for introducing changes in smaller, digestable chunks (well suited to Agile software processes!)

RailRoad - RoR diagram generator

about 1 year ago | Niranjan Sarade: InLoveWithNature

Thanks to Javier Smaldone for developing this gem!

http://railroad.rubyforge.org/

This gem generates model and controller diagrams in RoR application. Javier has built on top of the original idea by Matt Biddulph. I mentioned Matt's idea in one of my earlier posts - Shaping models in RoR.

We should play with RailRoad in all our RoR applications to understand the complexity of the relationships that we have developed.

Factory Girl - fixtures replacement for focussed and readable tests

about 1 year ago | Amit Kumar: RubyizednRailified

Why Factory Girl:

  1. Fixtures separates the data we are testing with actual behavior
  2. Makes tests brittle and you have to look at fixture files to understand the tests, which is certainly not the intent for the tests
  3. Its painful to have fixtures maintained for each model
  4. You have to keep switching between files to see what fixtures there are, always struggling with dependencies and conflicts
How to get started:
  1. gem install thoughtbot-factory_girl --source http://gems.github.com
  2. Add the following code to your test environment file ---> config.gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => http://gems.github.com
  3. Add test/factories.rb if using UnitTesting framework or spec/factories.rb if using Rspec framework. It will be automatically loaded if defined at this location
  4. Ryan Bates has an excellent screencast @ http://railscasts.com/episodes/158-factories-not-fixtures
  5. Excellent documentation

I'm a nerd, and a sucker for detail.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

My latest obsession, as many of you may already know, is Battlestar Galactica. I only got "real" cable (as opposed to randomly-there-when-you-plug-into-the-wall-NYC cable) last year, so I wasn't able to watch the SciFi Channel's re-imagining of the seventies miniseries from the beginning. Since people have been raving about it to me for years, I decided the right and proper thing to do would be to wait till I had time (read: till my shows were off the air for the summer) and watch the entire series on DVD.

Well, I just finished season 2, and I'm in love.

For those who don't know, Battlestar Galactica (BSG, to those of us nerdy enough to tweet about it on a regular basis) chronicles the struggles of a group of 50,000 human survivors of a massive holocaust of their 12 colonies. They've been wiped out by the Cylons, a race of machines originally created by humans to help out around the house (and the factories and airports, one imagines). This group of 50,000 are a society in unexpected exile; things are decidedly low-tech, as far as space travel with gravity goes.

One nifty manifestation of the series' analog sensibility is the ubiquity of the mason jar as drinking cup and all-around handy vessel. I noticed the mason jars about halfway through season one, and it was one of the tiny little touches sprinkled throughout that demonstrate the show's incredible attention to detail.

After all, mason jars were created for canning; it represents our terrestrial connections, our link to the rhythm of the seasons and the need to preserve them throughout the year. They are decidedly low-tech and old-fashioned, and yet the space-faring vessels depicted in BSG all seem to have them in spades. (The image above is of an actual prop from the show.)

Highly practical, as they're darn useful, and hold a generous helping of ambrosia.

Photo of the mason jar courtesy of www.aarondouglasfans.com.

Business rule documentation embedding in report

about 1 year ago | Abhishek Dharga: Face The Truth

When I first started working on Cognos the first task assigned to me was to prepare report specification document. This document gives an idea about the design of a report as well as business rules implemented in the Report. It took me around 3 Days to deliver that document.
We then had a brain storming session where we discussed how we make documentation process simpler.
As a team (Cognos pool) we came up with certain points and finally decided to create one documentation page in the report itself.
This documentation page should not visible to users and developers only would have access to it.
The separate report page mentions all the business rules as well as additional information about the objects in report.
Ram created template which contains one documentation page. Now whenever we start building a new report we use the same template.
Embedding the documentation in application made our documentation simpler. It has worked for us. Do you think it can work for you??

Bing Search Tricks (even Google and Yahoo doesn't have these features)

about 1 year ago | Rohan Daxini: Rohan Daxini

Use these cool and interesting tricks with Microsoft's new search engine Bing.com

1) Get Bing search results as RSS feeds
Neither Google nor Yahoo provide RSS feeds of their search results. We can subscribe to search pages from Bing as RSS feeds.
- Open Bing Search
- type your query, say for example "Ajax" and
- then on the results page, append “&format=rss” to the URL
in my case where i tried search query as "Ajax", the rss URL got created is http://www.bing.com/search?q=ajax&form=QBLH&format=rss
(This is one of my favorite feature as I am trying few feeds in my aggregator app :) )

2) Find Web Pages That Link to Documents, MP3s, Videos, ZIPs or other file types
The "contains:" operator in Bing search helps us find web pages that link to other online documents and multimedia files like music and video. This is different from Google’s filetype: search operator that looks for content inside PDF and Office documents.
For example, if we wish to find all pages on Wikipedia that link to MP3 files, type “site:wikipedia.org contains:mp3?

3) Limit Your Search to Websites that offer RSS Feeds
Another search operator in Bing Search is “hasfeed” - it lets you find only those web pages that link to RSS feeds. For example, you could write “ASP.NET MVC hasfeed:” to find web pages that are about “ASP.NET MVC” and also syndicate content as RSS feeds.

We can also group hasfeed: with other search operatorsLets say if we want to know about all pages related to ASP.NET MVC on MSDN.COM that have feeds, then we should just type “asp.net mvc site:msdn.com hasfeed:

4) Track Companies from the IE Favorites Bar
If we search for a company stock (e.g. GOOG or MSFT), Bing will automatically create a web slice for that company which we may then add to IE 8 and track the performance directly from the favorites bar. We need Internet Explorer 8 to try this feature.

Speedy shortcake.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

The other night, on my way home from work, I got a hankering for something sweet. I try not to eat "real" dessert very often, but sometimes the voice inside will not be denied. I had some gorgeous strawberries just sitting at home, on the brink of going bad, so I decided the time was right for some strawberry shortcake.

However, it was already 7:30, I wasn't home yet, and I wasn't much in the mood for cooking dinner AND baking dessert. So, I crossed my fingers and stopped off at Two Little Red Hens on my way home. Sure enough, they had a few buttermilk biscuits left. I snagged one and ran home with my treasure.

After I'd eaten dinner, I sliced a few berries, sprinkled them with sugar, and set them aside to macerate a bit while I whipped a little cream (spiked with a touch of vanilla extract). I sliced open the biscuit, saved half for breakfast the next morning, and put together my half-homemade, half-storebought delight. Juicy, sweet berries spooned over buttery, flaky biscuit, with a generous portion of whipped cream on top.

Who says you have to do everything from scratch, every time? Not I.

Auto complete for complex forms using nested attributes in Rails 2.3

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

I just updated my fork of the auto_complete plugin to support Rails 2.3 nested attributes. Thanks to Anthony Frustagli for the code and ideas that I used as the basis for this fix.

<u>Basic usage:</u>

To use auto_complete on a complex form with nested attributes, just call “text_field_for_auto_complete” right on the form builder object yielded by form_for or fields_for, like in this example:

<% parent_form.fields_for :children do |child_form| %>
  <%= child_form.text_field_with_auto_complete :name, {},
        { :method => :get, :skip_style => true } %>
<% end %>

If you have Rails 2.3, this code will iterate over each child object and display a text field with auto complete support. My plugin will generate HTML and Javascript that works even when repeated in a loop like this. Also note that I’ve left off the object name parameter from text_field_with_auto_complete. It’s not needed now, since the object is indicated by the surrounding call to fields_for. The other parameters are optional and are taken unchanged from the original auto_complete plugin:

  • “:method => :get” indicates GET requests should be used by the AJAX calls to load the pick list values, avoiding problems with CSRF protection.
  • And “:skip => :true” indicates that the inline CSS stylesheet used by the auto complete drop down Prototype code should be skipped. Since we’re iterating over child objects we don’t want the same CSS code repeated once for each; instead include it once in a parent object’s call to text_field_for_auto_complete or else just include it manually somewhere.

That’s it – it should just work. If you’re interested in learning more about how to use nested attributes and what my plugin is actually doing, read on…

<u>Details:</u>

To learn more, let’s take a look at a simple nested attribute example, using the Projects/Tasks models from Ryan Bates' complex forms screen cast:

class Project < ActiveRecord::Base
  has_many :tasks
  accepts_nested_attributes_for :tasks, :allow_destroy => true
end
class Task < ActiveRecord::Base
  belongs_to :project
end

A project has many tasks, and each task belongs to a project. Here I’ve also declared that each project “accepts nested attributes for” tasks. This is a new method added to ActiveRecord in Rails 2.3… for lots of examples and explanation just take a look directly at the new nested_attributes.rb code file in Rails 2.3. In a nutshell, “accepts_nested_attributes_for” tells ActiveRecord that the project model should be able to save the attributes of the associated task model objects when a project is saved. This means that when I submit my project form, it can also contain a series of task fields as well. For example, my view code might look something like this:

<% form_for @project do |project_form| %>
  <p>
    <%= project_form.label :name, "Project:" %>
    <%= project_form.text_field :name %>
  </p>
  <% project_form.fields_for :tasks do |task_form| %>
    <%= task_form.label :name, "Task:" %>
    <%= task_form.text_field :name %>
  <% end %>
<% end %>

This displays a name text field for the project, and then calls “fields_for” again right on the form builder yielded by form_for. This is new for Rails 2.3. In earlier versions of Rails you had to explicitly iterate over the child objects and call fields_for for each one. Now in Rails 2.3, you can call fields_for as a method of the parent form and it will automatically iterate over all of the child objects and call fields_for. If we take a look at the HTML generated by this example form, we’ll find something like:

<input id="project_name" name="project[name]"
  size="30" type="text" value="Some project" />
<input id="project_tasks_attributes_0_id"
  name="project[tasks_attributes][0][id]" type="hidden" value="1" />
<input id="project_tasks_attributes_0_name"
  name="project[tasks_attributes][0][name]" type="text" value="Task one" />
<input id="project_tasks_attributes_1_id"
  name="project[tasks_attributes][1][id]" type="hidden" value="2" />
<input id="project_tasks_attributes_1_name"
  name="project[tasks_attributes][1][name]" type="text" value="Task two" />

I’ve simplified this to make it more readable. You can see the iteration by project_form.fields_for :tasks, and that for each task there’s an <input> tag for the “name” field, along with another hidden <input> tag containing the task’s “id” attribute. The most important detail here is the name given to each of these tags: “project[tasks_attributes][0][name]” for example. Since the tasks are nested attributes of the project, they are displayed using the PARENT_OBJECT[CHILD_OBJECTS_attributes][INDEX][FIELD] pattern, while for the project we get the simple OBJECT[FIELD] pattern. This is the key to making nested attributes work. In our project model, when we called “has_many :tasks”, Rails defined some new methods for us on the Project class to handle tasks: tasks, tasks=, task_ids, task_ids= and a couple of others as well. Now with Rails 2.3, when we call “accepts_nested_attributes_for :tasks” Rails defines another new method for Project called tasks_attributes= in order to process all of the new nested parameters for tasks when the complex project form is submitted. This is the reason for the “_attributes” in the naming pattern used in the form.

Now… how do we get auto complete to work for this form? The problem with auto complete on a complex form has always been that the Javascript and HMTL used by the Prototype library assumes that the <input> tag, <div> tag and related Javascript code would be unique on the HTML page. If you just call the text_field_with_auto_complete macro from the standard auto_complete plugin like this…

<% project_form.fields_for :tasks do |task_form| %>
  <%= text_field_with_auto_complete :task, :name, {},
        { :method => :get, :skip_style => true } %>
<% end %>

… it will not work. The first problem is that text_field_with_auto_complete does not know that fields_for is iterating over the child tasks, or which task is currently being processed in the iteration. But even if you were able to identify the current task object somehow, you would still get HTML like this:

<input id="task_name" name="task[name]" size="30" type="text" />
<div class="auto_complete" id="task_name_auto_complete"></div>
<script type="text/javascript">
//<![CDATA[
var task_name_auto_completer = new Ajax.Autocompleter('task_name',
  'task_name_auto_complete', '/projects/auto_complete_for_task_name',
  {method:'get'})
//]]>
</script>

…

<input id="task_name" name="task[name]" size="30" type="text" />
<div class="auto_complete" id="task_name_auto_complete"></div>
<script type="text/javascript">
//<![CDATA[
var task_name_auto_completer = new Ajax.Autocompleter('task_name',
  'task_name_auto_complete', '/projects/auto_complete_for_task_name',
  {method:'get'})
//]]>
</script>

Now the <input id=“task_name”> tag is repeated on the same page, and the Javascript call to Ajax.Autocompleter('task_name', … ) will not work since the browser will not be able to identify which <input> tag to use.

If you use my plugin instead of the original auto_complete plugin…

$ rm -rf vendor/plugins/auto_complete
$ ./script/plugin install git://github.com/patshaughnessy/auto_complete.git
Initialized empty Git repository in /Users/pat/rails-app/vendor/plugins/auto_complete/.git/
remote: Counting objects: 20, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 20 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (20/20), done.
From git://github.com/patshaughnessy/auto_complete
 * branch            HEAD       -> FETCH_HEAD

… and restart your Rails app, then you can change your view to call text_field_with_auto_complete as a method of the form builder, like this:

<% project_form.fields_for :tasks do |task_form| %>
  <%= task_form.text_field_with_auto_complete :name, {},
  { :method => :get, :skip_style => true } %>
<% end %>

Note that I’ve also dropped :task as a parameter since that’s implicit in the call to fields_for. In fact, since text_field_with_auto_complete is now a method of the FormBuilder object (“task_form”), it has access to the task object currently being processed in the iteration. Now if you refresh the same form you’ll instead get this HTML instead:

<input id="project_tasks_attributes_0_name"
  name="project[tasks_attributes][0][name]"
  size="30" type="text" value="Task one" />
<div class="auto_complete" id="project_tasks_attributes_0_name_auto_complete">
</div><script type="text/javascript">
//<![CDATA[
var project_tasks_attributes_0_name_auto_completer =
  new Ajax.Autocompleter('project_tasks_attributes_0_name',
  'project_tasks_attributes_0_name_auto_complete',
  '/projects/auto_complete_for_task_name',
  {method:'get', paramName:'task[name]'})
//]]>
</script>

…

<input id="project_tasks_attributes_1_name"
  name="project[tasks_attributes][1][name]"
  size="30" type="text" value="Task two" />
<div class="auto_complete" id="project_tasks_attributes_1_name_auto_complete">
</div><script type="text/javascript">
//<![CDATA[
var project_tasks_attributes_1_name_auto_completer =
  new Ajax.Autocompleter('project_tasks_attributes_1_name',
  'project_tasks_attributes_1_name_auto_complete',
  '/projects/auto_complete_for_task_name',
  {method:'get', paramName:'task[name]'})
//]]>
</script>

This looks much better, and will actually work for the following reasons:

  • The <input> tags have the correct names, using the PARENT_OBJECT[CHILD_OBJECTS_attributes][INDEX][FIELD] pattern from fields_for. This means that the field values will be processed properly by ActiveRecord when the form is submitted.
  • My changes to the auto_complete plugin have picked up the child object index, 0 and 1 in this example, and included it in the <input> tag’s id, the <div> tag id and well as the associated Javascript code that calls Ajax.Autocompleter. Since all of the tag id’s are unique, the auto complete behavior works properly again for each text field.
  • The original “task” class name and “name” field name are passed unchanged into the Ajax calls to the server. This means that in your controller you can continue to use “auto_complete_for :task, :name” as usual, without worrying about the complex form and the fact that the task fields are repeated multiple times, etc.:
    Ajax.Autocompleter('project_tasks_attributes_1_name',     
      'project_tasks_attributes_1_name_auto_complete',
      '/projects/auto_complete_for_task_name',
      {method:'get', paramName:'task[name]'})
    Here the third parameter to Ajax.Autocompleter, "/projects/auto_complete_for_task_name", is the AJAX URL which you need to account for in routes.rb, and paramName:'task[name]' tells the auto_complete_for handler in your controller to get the task names as usual, and protects the server side code from all of the complexity around the tag id, names, child object index, etc.

Repeated auto complete plugin usage change

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

I’ve forked the auto_complete plugin to support repeated text fields in a complex form; see http://patshaughnessy.net/repeated_auto_complete for more details.

If you had downloaded my plugin in the past, I’ve just made a couple of changes that will require some simple code changes to your app:

  • You no longer need to or are able to use “auto_complete_form_for” or “auto_complete_fields_for.” I decided this was confusing and unnecessary. Now my plugin just mixes the text_field_with_auto_complete method right into the standard FormBuilder class. Just use form_for or fields_for as usual.
  • I also dropped the object name parameter from text_field_with_auto_complete. Since text_field_with_auto_complete is a method of the form builder, the target object is indicated by the surrounding call to fields_for or form_for and so doesn’t need to be repeated. Now using form.text_field_with_auto_complete is very similar to using form.text_field or the other form builder methods: you just need to specify the column/field name.

So if you are using my old plugin with a Rails 2.2 or earlier app like this:

<% for person in @group.people %>
  <% auto_complete_fields_for "group[person_attributes][]", person do |form| %>
    Person <%= person_form.label :name %><br />
    <%= form.text_field_with_auto_complete :person, :name, {},
                                           {:method => :get}  %>
  <% end %>
<% end %>

… you should drop “auto_complete_” and “:person” and just use code like this instead:

<% for person in @group.people %>
  <% fields_for "group[person_attributes][]", person do |form| %>
    Person <%= person_form.label :name %><br />
    <%= form.text_field_with_auto_complete :name, {},
                                           {:method => :get}  %>
  <% end %>
<% end %>

And if you have Rails 2.3 or later and are using nested attributes, this would become:

<% form_for @group do |group_form| -%>
  <% group_form.fields_for :people do |person_form| %>
    Person <%= person_form.label :name %><br />
    <%= person_form.text_field_with_auto_complete :name, {},
          { :method => :get, :skip_style => true } %>
  <% end %>
<% end %>

Me, pickled, with pickles.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

Wondering what to do with those ramps you pickled a few weeks ago? How about a Gibson?

A Gibson is a classic Martini, but with cocktail onions in place of the traditional olives. Since I'm one of those freak shows who doesn't really like olives (I'll drink a Martini, but I'll leave the olives behind in the glass - though offering them up is a good way to make friends.), Gibsons are, for me, the perfect solution.

Loyal readers of this here blog know about my aversion to dry and/or vodka Martinis; that said, I think everyone should drink that which he or she truly enjoys - so, if you must, feel free to substitute vodka for the gin in this recipe. But please don't leave out the vermouth - try a real Gibson at least once. I promise you'll love it.

Pretty please?

Gibson with Pickled Ramps
Serves one, or multiply to serve as many as you like.

4 parts gin (I like Plymouth these days.)
1 part dry vermouth
2 pickled ramps per cocktail (In the absence of ramps, cocktail onions work, too!)

Combine ingredients in a pitcher (or just a large glass, if only making one or two cocktails) filled with ice. Stir slowly and gently until the glass fogs, then strain the cocktails into chilled cocktail glasses. Garnish with onions and serve.

Thanks to Facebook, Nostalgia was in abundance

about 1 year ago | Binoy Shah: Binoy Thinks

Last week, I was going through my mails in Hotmail. I came across an invite to join a group. The name of the group was A.A.B.V.V. Something immediately struck me. Its actually the name of school. Amulakh Amichand Bhimji Vividhalakshi Vidyalaya. Big name huh??

Yes it is indeed a tongue twisting name… Coming back to facebook, it took me no time to join the group and start exploring it. Here I found a few friends who had been out of touch since I left my school which was like 10 years ago. A long time. Exploring the Photos, I found some group photographs uploaded from some of my friends.

The best part was everyone was trying to find oneself in each photo. I uploaded the ones which were there with me. One of them is the one below.

4 C

Something for Nostalgia. Thanks to the person starting this group and thanks to Facebook, a superb collaborative site, I could for a short while get back those wonderful memories of my schooling days..

Cognos8 automated documentation

about 1 year ago | Abhishek Dharga: Face The Truth

I have been hearing since the time I worked with cognos series 7 that there needs to be a way to automatically documents the Specifications of the Framework Model
Thanks to Cognos 8 now we have an automated framework model specification generation technique.

Create Model Documentation

After you model the metadata, you can create an HTML or XML representation of the model that can be customized and printed.

When you create model documentation, you can document the entire model or you can select a subset of the model.
















To document the entire model, you click the top-level namespace. The model documentation shows the selected object and all the properties and children of that object.

















You can view, save, or print the report in HTML or XML format.

Steps
1. Click the object that you want to document.
Tip: Click the top-level namespace to document the entire model.
2. From the Tools menu, click Model Report.
The model report appears.
You can save, print, or change the format of the report.


But what if some one still using cognos series 7,
Dont worry there is java code available on googlecode to generate model specification doc.
http://code.google.com/p/cognos-documentation/

I hope this will save some efforts for documentation.

Windows Live Writer: A simple Blog Writer Tool

about 1 year ago | Binoy Shah: Binoy Thinks

Exploring my laptop, I just came across a simple but an effective blog writing tool named Windows Live Writer. It came with the Windows Live installation. But it was there on my laptop without being noticed.

It has lots of features like adding Hyperlinks, pictures, Photo album, Tables and many more…

It connects online to a Blog site by a simple  configuration. Its saves Drafted Blogs locally as well as on the Site. The best is it allows blogging offline in the same format as you would on a Blog site..

A nice and an easy tool to make blogging even more easier.. Not that blogging was tough anyways!!

One Laptop Per Child - Lessons Learned for Innovators

about 1 year ago | Amy Grandov: Technology for Social Innovation

The One Laptop Per Child program is a high profile, ambitious effort to distribute 150 million laptops at $100 each to the world's disadvantaged children. By designing cheap, rugged, low-power laptops and making them available in poor communities, OLPC hopes to empower children to teach themselves and others. Despite several advantages - a worthy goal, the support of prominent business leaders and world governments, and significant press attention - OLPC has faced challenges. In practice, only a few hundred thousand laptops have been distributed, and goals have been scaled back. Communications magazine profiles some of the successes and challenges faced by this innovator. This is an important cautionary case study for innovation in general.

At a high level, here are some lessons learned for all innovators as explained in the article:

  1. Diffusing a new innovation requires understanding the local environment. Trying to implement globally at one time is risky, because conditions vary so widely from country to country. A preferred strategy is to pick one or two countries to use as peer models of success for future adopters to look to.

  2. Innovative technology can be disruptive and trigger a backlash from incumbents. Even with a well meaning social goal, a non-profit can trigger competition from the private sector. If you uncover a potential market, or threaten to serve an existing market in a new way and challenge incumbents, you can expect a response! The more visible the threat, the more likely it will be to trigger a backlash. In this case, the response came from Microsoft and Intel, and helped spur additional innovation around low cost laptops. Ultimately, this response may ultimately benefit the constituents you're trying to serve , however it is an immediate challenge to the original ambitions of the program.

  3. Innovative information technologies do not stand alone. Success often requires a partners to provide complementary value - content, training, support, etc.

  4. Understand the true costs and risks, as well as benefits, of innovation. This includes not just the technology but the web of supporting resources required.

  5. Adopting organizations need to develop internal capabilities and set priorities. Once the provider steps away, can the recipients continue to sustain the innovation and integrate it into their operations.

Ultimately, successful innovation requires more than good technology:

"Diffusion of IT innovation does not depend only on the nature of the innovation itself. Often, more important is the social and cultural environment in which it will operate. Information technologies are not standalone innovations but system innovations, the value of which depends largely on an ecosystem that includes hardware, applications, peripherals, network infrastructure, and services (such as installation, training, repair, and technical support). Deployment involves training teachers, creating software and digital content, delivering maintenance and support, and sustaining a long-term commitment. Such capabilities are in short supply in developing countries, and OLPC simply never had the resources to provide them."

The article contains many specifics for innovators focussed on developing countries. But the lessons learned can also apply to innovations within an enterprise. Understand your users and the existing context, and anticipate potential push back even when you have the best of intentions. How does your innovation affect them and challenge them to change? Building on small, early successes, and involving your recipients in the design of the innovation may smooth the way for adoption.

Late spring.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

A photo tour of the Union Square Greenmarket over the last few weekends...enjoy!







Changing history with git rebase: How to combine several commits into one

about 1 year ago | Alex Rothenberg: Common Sense Software

When I look at commits on github I'm always impressed at how concise they are. When I read a commit I can understand the intent of the change without getting distracted by the author's journey to get there. In contrast when I look at my commits they tend to be smaller and more incremental and meandering as I work my way down some false starts until I get to the solution I want. I'm guessing that I'm not alone in the way I work and recently discovered git rebase and an helpful tutorial showing how I can continue to work in my meandering style but package my changes to hide the journey before publishing to the world on github.

Let me show you what I mean with some changes I recently made to metric_fu. Over the course of a few days I made 6 small commits as you can see below.


> git log

commit d4b18b16e982ac57741f7a0a12cb085bb9b0e840
Author: Alex Rothenberg
Date: Mon Jun 1 09:55:37 2009 -0400

reverted rakefile

commit ebda1cb67a2f0f0a85e51469d70919fa7c27d318
Author: Alex Rothenberg
Date: Mon Jun 1 09:49:05 2009 -0400

refactoring of verify_dependencies

commit 3d45903b64a772fd09ec07bf69880bdb29ae4944
Author: Alex Rothenberg
Date: Fri May 29 20:40:49 2009 -0400

runtime dependency check for all gems

commit 36e269bf8f0edccfb39cc767182406cdaa16a559
Author: Alex Rothenberg
Date: Fri May 29 20:24:16 2009 -0400

logic for checking dependencies in generator base

commit bb2ee9a983c6adf54a8c95ee5851c6f8d3bffaba
Author: Alex Rothenberg
Date: Fri May 29 19:38:21 2009 -0400

made rcov dependency figure itself out when generating rcov metrics

commit 750b000e5563e917f21eb1b7837e8001fb53f688
Author: Alex Rothenberg
Date: Fri May 29 16:42:12 2009 -0400

removed gem dependency on rcov - to allow use of relevance-rcov or other github forks

commit d6af5089adce9eeed4916a155c3bdaeb4be6771a
Author: Randy Souza
Date: Sat May 16 08:47:37 2009 +0800

Added a simple fix for cases where Saikuro results with nested information
cause metrics:all to crash

Signed-off-by: Jake Scruggs

...


I am going to combine all of these into a single commit using the incredible power of git rebase. I find the last commit I do not want to change (the one made by Randy Souza on May 16th) and issue a git rebase command with that id.


> git rebase --interactive d6af5089adce9eeed4916a155c3bdaeb4be6771a


Now my editor comes up showing the 6 changes since then giving me options of what to do. Its very powerful, I can reorder commits, combine commits, eliminate commits. I'm going back in time to change the past!


pick 750b000 removed gem dependency on rcov - to allow use of relevance-rcov or other github forks
pick bb2ee9a made rcov dependency figure itself out when generating rcov metrics
pick 36e269b logic for checking dependencies in generator base
pick 3d45903 runtime dependency check for all gems
pick ebda1cb refactoring of verify_dependencies
pick d4b18b1 reverted rakefile

# Rebase d6af508..d4b18b1 onto d6af508
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#


In my case I want to combine these into a single commit so I change all but the first pick command to a squash and save.


pick 750b000 removed gem dependency on rcov - to allow use of relevance-rcov or other github forks
squash bb2ee9a made rcov dependency figure itself out when generating rcov metrics
squash 36e269b logic for checking dependencies in generator base
squash 3d45903 runtime dependency check for all gems
squash ebda1cb refactoring of verify_dependencies
squash d4b18b1 reverted rakefile

# Rebase d6af508..d4b18b1 onto d6af508
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#


It now gives me a chance to edit the new commit message which it defaults to the original messages concatenated together. This really is a single commit so if one of the original commits changed a file and a subsequent one undid the change that file will no longer appear in the list of modified files.



# This is a combination of 6 commits.
# The first commit's message is:
removed gem dependency on rcov - to allow use of relevance-rcov or other github forks

# This is the 2nd commit message:

made rcov dependency figure itself out when generating rcov metrics

# This is the 3rd commit message:

logic for checking dependencies in generator base

# This is the 4th commit message:

runtime dependency check for all gems

# This is the 5th commit message:

refactoring of verify_dependencies

# This is the 6th commit message:

reverted rakefile

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i nor -o; assuming --only paths...
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD ..." to unstage)
#
# modified: Rakefile
# modified: lib/base/generator.rb
# modified: lib/generators/flay.rb
# modified: lib/generators/flog.rb
# modified: lib/generators/rcov.rb
# modified: lib/generators/reek.rb
# modified: lib/generators/roodi.rb
# modified: lib/generators/saikuro.rb
# modified: metric_fu.gemspec
# modified: spec/base/generator_spec.rb
# modified: spec/generators/flay_spec.rb
# modified: spec/generators/flog_spec.rb
# modified: spec/generators/reek_spec.rb
#



Let's edit this commit message to read something like


Changed gem dependencies from install-time in gemspec to runtime when each
of the generators is loaded. This allows use of github gems (i.e.
relevance-rcov instead of rcov) and also allows you to install only the
gems for the metrics you plan on using.


# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i nor -o; assuming --only paths...
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD ..." to unstage)
#
# modified: Rakefile
# modified: lib/base/generator.rb
# modified: lib/generators/flay.rb
# modified: lib/generators/flog.rb
# modified: lib/generators/rcov.rb
# modified: lib/generators/reek.rb
# modified: lib/generators/roodi.rb
# modified: lib/generators/saikuro.rb
# modified: metric_fu.gemspec
# modified: spec/base/generator_spec.rb
# modified: spec/generators/flay_spec.rb
# modified: spec/generators/flog_spec.rb
# modified: spec/generators/reek_spec.rb
#


And that's it! Now when we check our history we see.


> git log

commit 6f389364eb972871867d3a71677b8eb7046541a2
Author: Alex Rothenberg
Date: Fri May 29 16:42:12 2009 -0400

Changed gem dependencies from install-time in gemspec to runtime when each
of the generators is loaded. This allows use of github gems (i.e.
relevance-rcov instead of rcov) and also allows you to install only the
gems for the metrics you plan on using.

commit d6af5089adce9eeed4916a155c3bdaeb4be6771a
Author: Randy Souza
Date: Sat May 16 08:47:37 2009 +0800

Added a simple fix for cases where Saikuro results with nested information
cause metrics:all to crash

Signed-off-by: Jake Scruggs

...


And this commit is how I pushed this patch to github for all the world to see.

For more than pies and compote.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

A couple of weeks ago, I decided to branch out beyond dessert when it came to rhubarb. I'd been thinking about rhubarb cocktails for a while, and decided to make my dream a reality.

A bit of casual Googling turned up this recipe for rhubarb simple syrup from The Greene Grape, a blog from the owners of a Fort Greene-based wine store. All it called for was boiling up some water, sugar and chopped rhubarb, reducing the mixture to a simmer, and letting things hang out for a bit.

I got to work, adding the rhuarb, water and sugar (I used turbinado sugar for my first batch) to the pot, and the result was a cup of goreous, dark-pink syrup. (I thought the turbinado sugar would add a nice molasses tone to the flavor, and it did. However, the heavier turbinado sugar fell out of syrup form pretty quickly once I refigerated it, so I'd recommend sticking with plain white sugar. For a second batch, I used refined, white sugar, and the syrup came out the promised bright pink.)

So far, I've been using the syrup in a simple cooler: syrup, gin, seltzer, and a squeeze of lime. Garnished with a strawberry (which gets nice and boozy while it waits for you at the bottom of the glass), it's pretty much the girliest-looking-but-not-tasting drink I've seen in a long while.

Queenie's Rhubarb Cooler
Multiplies to serve as many as you like

1 part rhubarb simple syrup
5 parts gin
2 parts seltzer
Squeeze of lime
1 hulled strawberry, for garnish

Place a few ice cubes in a glass (or lots of ice cubes in a pitcher, if you're making multiple cocktails). Add the rhubarb simple syrup and gin. Stir to combine. Add the seltzer and lime juice and stir again, more gently, until the mixture is just combined. Garnish with a strawberry (one to each glass) and enjoy!

Being pixel perfect - Part 13 (ensuring a high quality web app)

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

Here's an email I wrote to a dev team recently about ensuring high quality software release...

------------------------------------------------------

as we get closer to the release, lets make sure that we've dotted all the i's and crossed all the t's...

here's my mental checklist (anything else to consider?) for the site... can we pls discuss how we're addressing these areas soon? pls advise.
- prasoon

  • code quality
  • test coverage
  • valid markup
  • security testing
  • cross-browser testing
  • performance under load
  • low bandwidth optimization
  • character encoding (proper character entry/display/treatment)
  • error msgs
  • consistency in site visual and behavioral conventions
  • good yslow score

Making a difference !

about 1 year ago | Niranjan Sarade: InLoveWithNature

This is a very nice story which I liked the most !

A man was walking along a beach when he saw a woman picking up starfish off the sand and tossing them into the waves. Curious, he asked her what she was doing. The woman replied "When the tide goes out it leaves these starfish stranded on the beach. They will dry up and die before the tide comes back in, so I am throwing them back into the sea where they can live."

The man then asked her "But this beach is miles long and there are hundreds of stranded starfish, many will die before you reach them - do you really think throwing back a few starfish is really going to make a difference?"

The woman just smiled. She picked up a starfish and threw it into the waves. "It certainly makes a difference to this one" she said.

In our day to day life, we come across many things that we consider very difficult to tackle with. There are many poor people, many mentally and physically retarded people, very old people, really needy people, etc. How can we make a difference in their lives ? Is it practical ? Certainly not. There are definitely some limitations.

But can we take inspiration from the above starfish story and step into making difference to at least one really needy person? Don't you think that will certaily make a difference in his/her life ?

Can we donate our valuable eyes to blind person after our death ?
Can we donate our blood ?
Can we adopt one orphan child for his/her education ?
Can we adopt a child completely ?
Can we help someone to start with small business ?


Actually there are many things that we can do .... we need to start with at least one though !

Emotional Intelligence

about 1 year ago | Lalita Chandel: Emotional Intelligence

Just finished reading "Working with Emotional Intelligence" by Daniel Goleman. It was really nice to know that the single most important factor that distinguishes a star performer from others in every field is not just high IQ, advanced degrees or technical expertise, but there is something called as "Emotional Intelligence".


Emotinal Intelligence: It refers to the capacity for recognizing our own feelings and those of others, for motivating ourselves, and for managing emotions well in ourselves and in our relationships. It describes abilities distinct from, but complementary to, academic intelligence, the purely cognitive capacities measured by IQ.

Below are five basic emotional and social competencies, defined under Emotinal Intelligence: -

Self-awareness: Knowing what we are feeling at the moment, and using these preferences to guide our decision making; having a realistic assessment of our own abilities and a well-grounded sense of self-confidence.

Self-Regulation: Handling our emotions so that they facilitate rather than interfere with the task at hand; being conscientious and delaying gratification to pursue goals; recovering well from emotional distress.

Motivation: Using our deepest preferences to move and guide us towards our goals, to help us take initiative and strive to improve, and to persevere in the face of setbacks, and frustrations.

Empathy: Sensing what people are feeling, being able to take their perspective, and cultivating rapport and attunement with a broad diversity of people.

Social skills: Handling emotions in relationships well and accurately reading social situations and networks; interacting smoothly; using these skills to persuade and lead, negotiate and settle disputes, for cooperation and teamwork.

Supermarket Coupons for Your Cell Phone

about 1 year ago | Erika Santos: Santos on Technology and Life


nytimes.com

A mobile marketing company in Chicago called Samplesaint developed technology that allows supermarket scanners read the image of a coupon bar code from the display of any cell phone. Coupons are sent directly to consumers through text message. Once coupons are used, they are automatically removed from the cell phones.

This technology will be used this month in a joint trial with Unilever at a ShopRite supermarket in NJ.

I've never really used supermarket coupons before, but I would be willing to try this out. My only concern would be text spam from the supermarket. This is of course assuming that I would one day give up on Freshdirect.

Learning as an important part of the Project

about 1 year ago | Binoy Shah: Binoy Thinks

Since the day I joined the IT Industry, there has been one word that I have been hearing day in and day out.. “Learning”.  Especially in today’s situation, it forms an integral part of the Project.

The situation is such that we cant escape from learning saying that I have a hectic Project schedule and have no time to learn. We need to take out time from our schedule for this.

Or else, include learning as a part of the Project work. We recently had a pre project kick off and thanks to Erika, the Scrum Master of our project we decided that we would take up stories that are related to learning and also somehow inline with the Sponsors interest. But the main focus was to learn something by the end of the Project

Something that can be useful for both the Project as well personal development.

GitHub - growing Social Network for Programmers

about 1 year ago | Amit Kumar: RubyizednRailified

GitHub is Public Open Source Git repository that's being called "Social Network" for programmers. Lets understand Git first.

Git is a distributed version control system co-developed by Linus Torvalds that has speed and efficiency. Git does away with the idea of a central repository. In Git every user has a complete copy of the repository data stored locally which makes accessibility easy and fast even when the n/w is disconnected. This seems radical to the concept of Subversion or other VCS (Version Control Systems) we have been using where the central repo has complete history (which makes it slow and inefficient). Git users have to push and fetch changes with each other. If any repository is lost due to system failure only the changes which were unique to that repository are lost. Once that system comes up it does push/fetch to update/get the changes. Git is extermely fast for all operations (except push and fetch), perform a diff, view file history, commit changes, merge braches, obtain any other revision of file, switch branches etc.

GitHub uses Git as a core technology while extending its basic ideas into the direction of social networking and publication. Everything you do with your source code on GitHub becomes a Web resource, complete with its own URL. Github is a pay service but it also offers free package which are suitable for many open source projects. GitHub really comes together for most users when you start talking about the social features. Every user and project has a profile. For ex: Amit Kumar (its me) is my profile page and Ruby on Rails is project profile page. The project profile page keeps track of progress and participation. Both users and projects profile page also have public activity feeds which display activity on public projects such as commits, comments, forks, etc. Users can follow specific developers or projects to keep tabs on the activity.

Getting started with github is very easy. The screencasts and podcasts are wonderful resources. Getting git and github on windows is a little timetaking but with msysgit latest version has made life easy. Github provides a beautiful of the master code and all the forks.


It lets you see everyone else who’s cloned a particular repo, and what changes they have made. The big benefit is that this prevents you from re-inventing the wheel when you see that someone is already working on the same feature you’re trying to submit. Instead of going and doing your own thing, you fork off of them and work with them. You might even fork off of a grandchild of the original project just because it has some feature that you need. It’s like the long tail of open source..you no longer have to wait for the original author to implement your obscure changes. Just find what you want out there and work with it. The reciprocal benefit of this, of course, is that the original author can actually watch your changes as you’re making them. Instead of some disjointed patches, he sees your commits as you add them to your own line and can follow your progress visually. At some point, if the author likes your work he can merge your branch back into his code. And GitHub will show this on the network, so everyone else who is following the project can benefit. They’ve made it easy to notify the author that you have some good changes as well, with the pull request.

Github is growing everyday. Statistics say after being launched in Feb' 08, in one year of being online it accumulated 46, 000 public repos.

Enjoy collaborating your project on github !!

Chrome - My favourite browser these days

about 1 year ago | Rohan Daxini: Rohan Daxini

I am using Google Chrome a lot these days (apart from using Firefox & IE) for my browsing and testing needs. Chrome is amazingly fast and quick. Features that make Chrome distinguish itself from other browsers like Opera, Safari, IE, Firefox etc. are simple but truly amazing.

First, every tab is an independed process. Each tab is on its own - if one tab crashes there will be no impact on other tabs. This is very useful feature. Chrome has revolutionary JavaScript engine, which is made to work even faster than in the fastest browsers. Here are the speed test results http://news.cnet.com/8301-1001_3-10030888-92.html

Another feature I like about Chrome is its built-in task manager where you can see what tab eats more memory or CPU time than others, and effectively manage your tabs to reduce unneeded memory or CPU usage.

Here are few links casting comparison between Chrome and other browsers


Oh did i forgot to mention a very cool feature - visual sampling of most visited sites, search engines, recently bookmarked pages and closed tabs on its home page.

Bing.com- Microsoft's New Search Engine

about 1 year ago | Erika Santos: Santos on Technology and Life

I'm not ready to give up Google for Bing just yet. But it looks interesting.

Wanna test your website (and webpages) on 60 different browser in one shot ?

about 1 year ago | Rohan Daxini: Rohan Daxini

Today I just thought to test my website (Aggregator app) across different browsers to have preliminary results. I came across this cool website http://browsershots.org/ which tests webpages on roughly 60 browser (including browsers running on Linux, Mac, Windows, BSD etc) in one shot. It took around 27 mins to test my simple site on all 60 browsers and the results were astounding and really helpful. It provides first hand impression of UI issues (i.e. various formatting, colors, tables, tabs, button spacing etc etc.) for your web pages. I found it really useful. I was testing my app only on fewer versions of Firefox, IE, Chrome etc. but thanks to Nilesh for pointing me out to try and test my app on other version of various browsers as well. We together sat down to explore few open source tools and while exploring we came across this useful site.

Here is a link to 10 useful resources for Cross Browser Testing http://designm.ag/resources/cross-browser-testing/


I do recommend to use other open souce tools and websites to perform Cross Browser Testing, but these kind of resources are really handy.


Cognos 8 express authoring mode

about 1 year ago | Abhishek Dharga: Face The Truth

One of the best features of Cognos is adhoc reporting, users can get any data without the help of professional report developer using query studio.

There was a limitation with query studio, users were not able to use advance reporting features.

Now in Cognos 8 users are able to use advance features as well because Cognos 8 introduced Express authoring mode.

The Express authoring mode provides a simplified and focused Report Studio interface.
It is designed for non-technical users to create traditional financial and management statement reports.
Note :Express authoring mode allows access only to dimensionally-modeled data and uses a member-oriented data tree.This authoring mode allows you to see live data and supports only crosstab reports.
It contains a subset of the features available in the Professional authoring mode.When you are in the Express authoring mode, if you open a report that was authored in the Professional authoring mode, you can see but cannot modify objects that can be inserted only in the Professional authoring mode, such as charts, maps, and lists.
Then what are you waiting for? Just grant the access of Express authoring mode to your users and let them get benefit of using Cognos8 as their information management tool.

Cognos8 automated documentation

about 1 year ago | Abhishek Dharga: Face The Truth

I have been hearing since the time I worked with cognos series 7 that there needs to be a way to automatically documents the Specifications of the Framework Model
Thanks to Cognos 8 now we have an automated framework model specification generation technique.

Create Model Documentation

After you model the metadata, you can create an HTML or XML representation of the model that can be customized and printed.

When you create model documentation, you can document the entire model or you can select a subset of the model.
















To document the entire model, you click the top-level namespace. The model documentation shows the selected object and all the properties and children of that object.

















You can view, save, or print the report in HTML or XML format.

Steps
1. Click the object that you want to document.
Tip: Click the top-level namespace to document the entire model.
2. From the Tools menu, click Model Report.
The model report appears.
You can save, print, or change the format of the report.


But what if some one still using cognos series 7,
Dont worry there is java code available on googlecode to generate model specification doc.
http://code.google.com/p/cognos-documentation/

I hope this will save some efforts for documentation.

SVN Structure is it important?

about 1 year ago | Abhishek Dharga: Face The Truth

As we started a new phase in our project there was a discussion on whether to create a seprate SVN structure or continue using the old one for storing Project Artifacts. Finally we decided to create a seprate structure and kept both new svn and old one in a same directory folder with proper naming convention and contact information in comments feature of SVN.
Then we created a template of how we will keep our SVN folder structure.
For example whether to keep documents release specific or sprint specific.
Thanks to our scrum master we got certain valuable suggestions.
We uploaded that template as well in SVN folder. This template will help new team members know about the location of a specific document .
Are you following the same practice?

Being pixel perfect - Part 12 (overall plans)

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

I) Goal: Improve front-end quality of our applications

II) Measure: The number of applications that conform to Firm’s new brand guidelines

III) Areas to tackle

Learn
? Technical skills: HTML/CSS
? Web design skills: Best practices for web application design (e.g. when to use a list)
? Firm brand guidelines

Develop
? Use templates
? Export-to-web the design comp (xhtmlized.com, Allan)

Test
? Automated check for inclusion of common CSS* in application (during continuous integration build-test-deploy cycles)
? Manual check with design comps (or suggested design changes) with Pixel Perfect

IV) Execution strategy
Work with project teams to achieve the goal


* Common CSS refers is the stylesheet (part of template) to start building applications with to ensure compliance to Firm brand guideline

The big fire and the little water

about 1 year ago | Niranjan Sarade: InLoveWithNature

Long time ago there was a great fire in the forests that covered our Earth. People and animals started to run, trying to escape from the fire. One of the eagles, was flying away also when he noticed a small bird hurrying back and forth between the nearest river and the fire. He headed towards this small bird.

He noticed that it was a small sparrow, flyinging to the river, picking up small drops of water in his beak, then returning to the fire to throw that tiny bit of water on the flame. The eagle approached the sparrow and yelled at him: "What are you doing brother? Are you stupid? You are not going to achieve anything by doing this. What are you trying to do? You must run for your life!"

The sparrow stopped for a moment and looked at the big eagle, and then answered:
"I am doing the best I can with what I have."

Scrum Agile - Making Sprint Reviews interesting

about 1 year ago | Binoy Shah: Binoy Thinks

AGILILITY in software development is the industry BUZZ these days.We have been "Agile" in developing BI Solutions to the Clients since past 2 years. Scrum methodology is a tool we use to become more and more "Agile"

Sprint Review meeting form one of the most improtant part of Scrum Agile. This meeting is focussed to Demo "Working Sofware" to the Business and all the other Project Stakeholders. The invite of this meeting in our case is extended to the teams ranging from the Business users, Support Team, sponsors and all the top notch IT people from the Client side. Hence these meetings like all the other Agile meetings are precise in content. The development team uses this as a great platform to demo what they have achieved in the Sprint to the end users and Sponsors. During these demos, there is no PPT or document describing the product. It is working software. This way the sponsors know what their money is doing.


In Java and UI related projects, this is a great idea. Here the UI can be shown to the users and they can give their feedback on the Product. However in Data intensive projects like BI, we might end up just analyzing the data in some Sprints when the Project starts. What can be used to Demo then??

We used some interesting tools for this. In Sprint Zero, where we had to just understand certain applications so that the stories related to those applications could be estimated, we used an Animation. It was a brainchild of our Scrum Master and Product Owner. Showing animation really was an effective way of communicating what we have done in the Sprint. The animation used was simple and most improtantly, it clicked with the users.

Even in the most recent Sprint Review meeting, we used Screencasts to demo the Data analysis story. The screencasts were designed by our Scrum master onsite and it worked really well in the Demo. The only thing which is improtant to understand is that preparing these animations should not be too time consuming.

In BI Projects that requires data analysis, we might not have working software to demo every Sprint. So these kind of animations and screencasts or any other such techniques help keep the interest of all the parties in the Sprint review meetings.

CIOs: It's Strategy Time

about 1 year ago | Michael Idinopulos: Transparent Office

Most CIOs I talk to want to spend more time on strategy--not platform strategy or application strategy, but business strategy. The fun part of their job isn't about keeping the lights on or the servers cooled. It's about using technology...

My mom.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

I was listening to NPR's weekly food podcast today (subscribe here to enjoy the same geeky excitement), and this week's edition featured a conversation with Nigella Lawson, who was explaining the different ways she's involved her children in her cooking over the years.

Her descriptions of batter-stirring and bean-trimming sent me off into a reverie, thinking about the different ways my mom introduced me to the glories of the kitchen. Sometimes people ask me where my love of cooking came from - this seems, to me, to be such an odd question, but probably only because the answer seems so obvious to me.

I grew up in a house where the only food on hand for snacking was fruit, vegetables, or the kind you made yourself. As a result, I learned to bake chocolate chip cookies and how to arrange a cheese plate (complete with grapes, fancy crackers, and sliced saucisson) before I turned 10.

We were never forced to eat something we disliked (when the family had swordfish - which I still hate with a fiery, burning passion - Mom always grilled me some chicken), but we had to try everything once. As a result, I was the only first-grader who listed her favorite foods as strawberries and cucumbers.

On Parents' Night, our parents had to find our desks based on this information. While the other grown-ups wandered around, comparing endless worksheets that read "pizza" or "spaghetti," my parents were perched at my seat, patiently waiting for those with less cuinarily adventurous progeny to find the right desks.

My mom is an incredible woman - a successful, single (Well, not single anymore!) businesswoman who raised two (fantastic, funny, smart, kind, immodest) children, and she passed her love of good food, good wine and good cocktails down to me. In our house, dinner parties were the norm, and cocktail parties lasted long into the night. And, of course, we had to bake all our own sweets.

And so, in honor of my mother, I'm going to share one of her favorite recipes with you. These fudge brownies are incredibly simple to make, but have never failed to make people swoon on cue. I've tweaked the original recipe ever-so-slightly with the addition of a little espresso powder to bring out the flavor of the chocolate - but they remain, at heart, my mother's favorite brownies.

I hope you love them as much as we do.

Jane's Favorite Brownies
Based on a recipe from The Everyday Gourmet

4 oz. unsweetened chocolate
1 cup butter
4 eggs
2 cups sugar
1 1/2 cups flour
1 tbs. instant espresso powder
1 teaspoon baking powder
1/2 tsp. salt
6 oz. semisweet chocolate chips
2 tsp. vanilla extract


Pre-heat
the oven to 350°F. Grease a 13x9 baking pan and set aside.

Melt the butter and chocolate together in a double-boiler set over very low heat. Allow to cool slightly.

Beat the eggs and sugar together until pale yellow. Add the cooled chocolate mixture and beat until well-combined. Mix in the flour, espresso powder, baking powder and salt and stir until combined. Fold in the chocolate chips and vanilla.

Pour the batter into the prepared pan and back 25-30 minutes, until just set in the center. Allow to cool on a rack before cutting.

Makes 16-20 brownies.

Good is the enemy of great!

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

We have been in our Scrum/Agile adoption journey for more than two years now. Last year we rolled out Scrum across all teams. We may be able to call ourselves "good" at it. In the journey towards excellence, this is the time every application development organization has to worry about. As Jim Collins put it, good is the enemy of great! It feels like we may be getting a little lazy with Scrum as we think we know everything. Not all teams are showing the discipline that was there a few months back. For example, some teams are not doing release planning properly, some does not have burn down charts, and some are not using daily stand ups for what it is meant to be, and so on and so forth. We have to do something to take Scrum to next level.

But where should we start.... as it could be anywhere ... fixing daily stand-ups, review meeting, retrospective, release planning, so on and so forth. I would start at Retrospectives. Each team is at a different level. But each team can improve from where they are today, sprint after sprint. Retrospectives are a great tool to inspect and adapt and improve every sprint as a team.... as long as teams try to understand the root cause of the issues and consistently follow-up and fix them. If you want to try some new methods to conduct a retrospective, there are great tools available in the book Agile Retrospectives. Also, once in a while it would be great if someone external from the team can facilitate the retro for the teams. I recently did one for one of our project teams, and saw the value in having an external facilitator. I will share my experience in a subsequent blog.

Finally, it is not about getting the project done. Getting it done in such a way that each member in the team feels proud about it, is the key. Scrum gives us all the right tools for doing that. If we understand the value of each tool and use them properly, we could make all good teams great!

Good is the enemy of great!

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

We have been in our Scrum/Agile adoption journey for more than two years now. Last year we rolled out Scrum across all teams. We may be able to call ourselves "good" at it. In the journey towards excellence, this is the time every application development organization has to worry about. As Jim Collins put it, good is the enemy of great! It feels like we may be getting a little lazy with Scrum as we think we know everything. Not all teams are showing the discipline that was there a few months back. For example, some teams are not doing release planning properly, some does not have burn down charts, and some are not using daily stand ups for what it is meant to be, and so on and so forth. We have to do something to take Scrum to next level.

But where should we start.... as it could be anywhere ... fixing daily stand-ups, review meeting, retrospective, release planning, so on and so forth. I would start at Retrospectives. Each team is at a different level. But each team can improve from where they are today, sprint after sprint. Retrospectives are a great tool to inspect and adapt and improve every sprint as a team.... as long as teams try to understand the root cause of the issues and consistently follow-up and fix them. If you want to try some new methods to conduct a retrospective, there are great tools available in the book Agile Retrospectives. Also, once in a while it would be great if someone external from the team can facilitate the retro for the teams. I recently did one for one of our project teams, and saw the value in having an external facilitator. I will share my experience in a subsequent blog.

Finally, it is not about getting the project done. Getting it done in such a way that each member in the team feels proud about it, is the key. Scrum gives us all the right tools for doing that. If we understand the value of each tool and use them properly, we could make all good teams great!

Sunday morning sweets.

about 1 year ago | Megan Blocker: Queenie Takes Manhattan

Some days I crave a savory breakfast, complete with eggs, sausage, and Tabasco - but, this Sunday, it was all sweet, all the time.
Toasted focaccia (left over from a gorgeous, pillowy loaf my sister-in-law, Miriam, brought to our book club meeting on Thursday) spread with a little Nutella, strawberries from the Greenmarket, and a cup of steaming coffee, black, with turbinado sugar.

Took about five minutes to make, but it was one of the best meals I've had in a while. There's something magical about the homey, vital taste of toasted bread that surpasses even the fanciest dishes, isn't there?

Will you Bing it, or Google it ?

about 1 year ago | Rohan Daxini: Rohan Daxini

Recently I read an article on new search engine "Bing" by Microsoft and was quite impressed by its search capabilities (thanks to Nilesh for sharing this info on bing with me). Unlike Google who invented advertising-based search model which produces most popular items for each query, Microsoft is aiming to change the game by calling Bing - a decision engine which will offer more insights to users for helping them take decisions, and not necessarily throw the most popular and relevant items. Bing in Chinese language means a certain answer, or response to a query.

I tried few searches on www.bing.com and liked "Related Searches" section as well as opinion index (which rates the search results based on an algorithm developed by Microsoft.) Its quick and clean. Yeah its pretty early to say anything about its success, that the time will tell. But I think I would definitely be using bing along with google for my search and not just google alone :)