text:
In the future, everyplace will be "the next Napa" for 15 minutes
It's a slow news day, it's been a long week, so you'll have to cut me some slack here with this rather tongue-in-cheek post that actually does contain a kernel of observational sanity. An online news site, Uncover California, has a story today that claims "Many people believe the promising wine region of the Valle de Guadalupe in Baja California, Mexico, has the potential to become 'the next Napa Valley'…".
I did a quick Google search on "the next Napa" and it resulted in 9,170 hits. The first was called "5 Reasons why Lodi, California is the Next Napa Valley."
Another is headlined "Texas Hill Country: The Next Napa?" (I like the way it hedges its bets with that strategic little question mark, rather like the fig leaf that Renaissance painters used to discretely place over Adam's private parts.)
Then there's good ole Fox News, which doesn't exactly call New Mexico, Virginia and Ohio "the next Napa" but but implies they could be: "Look out Napa: 5 up and coming wine regions." (Hey Rupert Murdoch, tell your writers not to forget the proper use of the hyphen.)
Finally, "Is the North Fork the Next Napa Valley?" asks Hamptons, an online zine.
Some of this is crass promotional over-zeal. Some of it may actually be believed by the people claiming it. But it's an interesting angle on the hold that Napa Valley has on our collective imagination.
That there currently is only one Napa Valley is indisputable, the way there is only one Pope or one World Series champ. But speculation over who the next one will be is one of the delights of the media, and especially of headline writers, a breed unto themselves whose role in formulating the template of the day has never been properly analyzed. (My favorite headline of all time goes all the way back to 1975: FORD TO CITY: DROP DEAD." That would be President Gerald Ford and New York City, respectively.)
Sorry to end the fun, kids, but there won't be a "next Napa Valley." The time is gone when an American wine region can leap to the top of the charts and fire everybody up. That train left the station in the 1990s and isn't coming back. The public is too smart to fall again for such an anointing by the media, especially the wine media, whom it doesn't much trust these days.
Have a great weekend!
A family winery bites the dust
It's always sad when an old, little family winery shuts its doors, as Milat Vineyards & Winery is set to do by the end of this month.
I never formally reviewed any of their wines, because they never sent me tasting samples. They didn't have a high profile in Napa Valley, and perhaps didn't want one; as the Napa Valley Register, which reported the story, observes, "Unlike wealthy people who start wineries to enjoy the lifestyle, the Milats started the winery to make a living." Playing the publicity game, with all the related frou-frou and social obligations, doesn't seem to have been the Milats' style.
Should it have been? There can be little argument that being skilled at marketing and promotion can increase a winery's prospects. I've long been fascinated at how and why some small wineries make it big, while others get lost in the shuffle of history. Sometimes, fate, or destiny, plays a role that can't be foreseen or managed.
Take a winery like Failla or Saxum. Neither Ehren Jordan nor Justin Smith had much money, connections or P.R. savvy when he started out. What "made" their reputations was a combination of interesting wines made from interesting vineyards, and a personal style that knew how to connect with the wine press. (In both cases, I was "present at the creation," so to speak, and reviewed them early, so I know what I'm talking about.) They had, to use the current parlance, "stories" to tell, and both told them well.
Writers like me visit hundreds of vineyards and meet thousands of winemakers over our lengthy careers, so it is indeed saying something when we can recall individual visits, that occurred years ago, with crystal clarity. That's the case with my first visits to both Failla and Saxum. Well do I remember roaming Ehren Jordan's vineyard in the remote hinterlands high above the Fort Ross beaches. Equally vivid are my memories of Justin Smith guiding me along the terraced tracks of his James Berry Vineyard, where on a blazing summer afternoon he picked out the bleached fossils of whale bones from the white earth. This is not to say that either Failla or Saxum made the greatest wines of their generation. Both make very good, very specific "wines of a place," although I would fault Saxum to the degree that the alcohol levels were immodest (but, oh, the wines! Amazing. Some of these West Side Paso Robles red blends are stunning.). But what both Jordan and Smith managed to do was impress themselves upon the thoughts of a writer (me, as well as, obviously, others), who then was in a position to afford them some publicity. And they did it without a P.R. department.
One could mention others in California's long winemaking history who similarly succeeded based on the power of their personalities and the quality of their wines: Agoston Harazsthy, Robert Mondavi, Gary Pisoni, Jim Clendenen. They realized that the renown of a winery is tied to the acclaim its proprietor arouses in the media. This is not to say that such acclaim is the only thing factoring into the renown of a winery: Caymus achieved theirs without any ornate personalities at the helm; so did Ridge; so has Foxen (with the notoriously un-spinny, un-quoteworthy Bill Wathan), and so have many others who went about their work unostentatiously.
So there are different paths to success, but I have to wonder if Milat would have "made it" in the long run had they played the game with a little more perspicacity. But then, that would not have been them; it would have been inauthentic. This question of "authenticity" is, of course, currently much in vogue in wine country. Every winery and every winemaker wants to be seen as staunchly independent and free of the hyperbolic control of spin doctors and P.R. agents. It's reached the point where hired P.R. personnel advise their clients on how to present the appearance of authenticity! Can a winemaker or winery be "authentic" while paying for professional public relations advice on how to be authentic? It's a good question and I don't claim to have the answer.
"Authenticity" is hard to define anyway. A strong, colorful personality can seem authentic simply because it is irreverent and impinges itself strongly upon an audience; but until we master the science of mind-reading, we cannot know to what degree a strong personality is "natural" to its holder, or to what degree it is a conscious construct, if not a fabrication, designed to attract attention (or if it is in fact a combination of both). What we can know—"we" being writers, reporters and journalists—is that some winemakers are more interesting and fun to write about than others; they get the press while the quieter ones often don't. You have to wonder how much this gets factored into a winery's success.
Anyhow, I wish the Milat family well. As the Chinese increasingly buy ownership of Napa Valley, which years ago began losing its identity as a tight, indigenous culture, we must mourn the loss of each of these little family wineries, which are the bedrock foundation of any wine region. Any winery's death diminishes me (to misquote John Donne) and the industry as well. And I always have a special place in my heart for winemaking families who just work hard, year after year, against the odds but armed with great integrity, and who do so without resorting to flashy pretention.
Thursday throwaway: Rutherford dust, Bordeaux prices and Parker, Parker, Parker!
Went up to Napa yesterday for the annual "Day in the Dust" tasting of the Rutherford Dust Society. I wanted to see if I could discern a "Rutherford dust" characteristic to the wines. If there was one, it was pretty well disguised. All the wines were very fine, as you'd expect, but they were different: Some more tannic, some less, some rustic, some refined. Some wines were oakier than others. The fruits tended toward reds: cherries, sometimes sour candy, sometimes freshly sweet, but there was plenty of blackberry and cassis and also, some pleasant herbaceousness. (The vintage was mostly the cool 2011.) Most of the wines were ageable. But Rutherford dust? I don't think so. Andre Tchelistcheff's phrase was pure marketing genius (or was made so after others latched onto it), but I defy anyone to consistently tell the difference between a Rutherford Cabernet and one from St. Helena, to use but one example.
* * *
The drinks business has a nice little article where they went back to something Parker said ten years ago, and it has proven to be right. "If my instincts are correct," he predicted, "10 years from now a great vintage of these [Bordeaux] first growths will cost over US$10,000 a case…at the minimum."
Well, that's exactly what happened in some instances. Now I'm seeing certain recent Napa Valley Cabernets that cost close to $1,000 per bottle, which would put them well over $10,000 a case. I always have to rub my eyes at these nosebleed prices, but nothing seems to be slowing them down. Not the Great Recession, nor the incessant bashing Napa Cabernet has come under in recent years has changed wealthy people's inclination to buy them at any price.
* * *
I've always held that wine tasting is both objective and subjective, even in the supposedly "greatest palates" in the world. How could it not be, when the proof lies in the prices I just referred to. Is any wine "worth" $1,000 a bottle? Not objectively. Instead, "emotional associations…affect what we taste," says a scientist whose work was reported this month in The New Yorker.
By "emotional," he means the "expectations" people have when they see a bottle of a wine they know to be rare, esteemed and expensive. "Every time we have a wine," the article says, "we taste everything we know about it and other related wines."
Fascinating statement. Think about it. I taste, let's say, a Parker perfect 100-pointer and I know a lot about the history of the estate and the vineyard, the winemaker, the fact that the wine has been celebrated throughout the vintages as one of the world's greatest. I know that it costs $1,000 a bottle or more on the wine lists of the world's greatest restaurants. I know that it sells for multiples of that on eBay. I know that there are people who have been waiting for years to get on the waiting list for the mailing list. I know that the wine is so celebrated across the globe that counterfeiting it in China has become big business. I know that people buy it and put it in their cellars for their grandkids to drink (or sell). And that's only the beginning: not only do I know stuff about that wine, I feel things about it that stir my emotions—that cannot be put into words, but are perhaps all the stronger for that very reason: they tap into my dreams, my fantasies, my hopes and aspirations. These are truths about wine as powerful as the objective truths of alcohol level, varietal composition or pH, and we should keep them in mind always when we ask the (now answered) question: Is the evaluation of wine objective or subjective?
* * *
Speaking of all the above, a bearded and hairy Robert Parker—looking more and more like Orson Welles in his Paul Masson days—has been on what looks like a P.R. fix-it campaign lately. First he gave a rare and unusual interview, published on the Hawk Wakawaka blog, that wasn't so much about wine as RMP's views on film, spirituality, raising kids, the 24-hour news cycle and lots more. It's a compelling peek inside the head of the most famous wine critic in the world.
And now, today's Wall Street Journal has yet another exclusive interview with Parker, not particularly interesting because it's predictable and says the same-old, same-old things. So why is Parker on the mashed potato circuit?
My guess is that after all the bashing, he's decided it's time to rehabilitate himself in the public's eye (and also to publicize his new magazine). And you know what? There's nothing wrong with either of those motives.
That's it for now! Have a nice day.
What is a "crown jewel"? Can there be more than one?
In the mid-1970s, writer David Darlington tells us in the June issue of Wine & Spirits, "Robert Mondavi defined [the Inglenook Estate vineyard] for [Francis Ford Coppola] as the crown jewel of Napa Valley."
The wine world loves crown jewels. Petrus has been called the crown jewel of Pomerol; ditto the DRC in Burgundy. The concept stems, of course, from Old Europe, which bequeathed to us not only the idea of an aristocratic hierarchy of vineyards, with one or a few at the top and all the rest clustered below, but of a human aristocracy itself, whose royal heads were crowned with gemstones. It was as natural for 19th century France to elevate four vineyards in Bordeaux to First Growth status as it was to celebrate its Kings as les seigneurs grands plus among lesser royals.
If Robert Mondavi did indeed tell that to Mr Coppola (and we must assume he did, for Darlington, the author of Angel's Visits, is a great historian of wine), his claim must be put into context. Inglenook's Rutherford vineyard, on the bench just northwest of the Oakville border, was already 100 years old in 1970, and always had produced acclaimed Bordeaux-style wines. There were few, if any, contenders to the throne in Napa Valley that could boast that legacy (Martha's Vineyard was a mere infant, Harlan a gleam in Bill Harlan's eye). Napa's mountains—Spring, Veeder, Diamond, Howell, Atlas Peak, Pritchard Hill—were completely undeveloped, or very nearly so. Thus Mr. Mondavi was on firm historical and qualitative grounds when he praised Inglenook to Mr. Coppola, who must have listened with wide-eyed alacrity.
Today, does anyone think Inglenook is Napa Valley's crown jewel? I don't think so. This is not to diss Inglenook as simply to point out that it now has plenty of competitors—so many, in fact, that it would be fatuous for me to try and list them. Let's just agree that we can no longer identify a "crown jewel" in Napa Valley, or indeed in most of the world's greatest wine regions. Instead of an aristocratic "crown jewel" we now have galaxies of jewels, glittering and precious and giving us incredible wine.
California, in other words, is a meritocracy, not an aristocracy. Inglenook, for all its past glory, has yet to prove its modern relevance; Mr. Coppola has his work cut out for him (and I wish him luck). Yesterday's crown jewel may be today's déclassé property. By contrast, yesterday's underperforming (or even non-existent) vineyard may be elevated to glorification today, provided (a) it possesses inherently great terroir to begin with, and (b) is given the necessary nourishment (talent + money) to allow the winemaker to express that terroir to the highest degree of international reclaim.
There are not that many wineries with the wherewithal to pull off this feat. Even among those that are owned by the very rich, you'd be surprised how many stint on the required financial investment. Some proprietors, it is rumored, are not even in the game for the long haul, but only for investment or lifestyle purposes. Why invest tens of millions into a property you may not be able to make a profit on when you sell it off? Then too, some proprietors who spend millions on improving their vineyards, ill-advised from the start, may unfortunately own land that is not inherently capable of producing the greatest wine.
Others, a fortunate few, have the twin blessings of wealth and a discerning eye for land. It is with them that California wine's future lies, and always will. This is the brilliance of our Western-style meritocracy: passion and generational commitment, and not the mere lucky sperm of heredity, now transform vineyards, old and new, into crown jewels.
I support Beckstoffer's idea to bring more tasting rooms to Napa city
The most interesting thing about the Beckstoffer family's purchase of the old [1905] historic building in downtown Napa was Andy Beckstoffer's statement (paraphrased in the Napa Valley Registry's article) "that Upvalley wine interests should invest in Napa city and build their hospitality facilities there."
"Upvalley" traditionally refers to the northern parts of Napa Valley—St. Helena and Calistoga, although I imagine you could roll Rutherford into there, and by some stretches of the imagination (and I think this was Andy's intention) you could even include Oakville and Yountville. For, reading between the lines, Andy is encouraging all wineries to "use Napa city facilities as a major part of their hospitality function."
This makes sense from multiple points of view. The first, expressly cited by Andy, is that having wineries locate or relocate their tasting rooms, etc. in Napa city will "protect the integrity of the Ag Preserve," referring to the 1967 act to protect Napa Valley's agricultural heritage from the threats of population and development. Andy has long been active in supporting the Preserve, for instance in maintaining the lands bordering his Napa Valley vineyards.
There's another reason why it makes sense for wineries to establish their hospitality centers in downtown Napa. For all the redevelopment that Napa city has undergone the last ten years or so—and it's been nothing short of amazing to those of us who have watched it—there's still a weird disconnect between the city and the valley that bears its name. For a long time, there was no reason for visitors to Napa Valley to even bother going to Napa city. There was no there there, aside, perhaps, from COPIA (which proved not to be so good a draw after all.) After the explosion of fine restaurants, hotels and other amenities since 2000 or so, there suddenly was, especially along the waterfront. But Napa city, despite its allures, still feels a little sleepy and rural, with entire blocks of downtown that seem to have hardly changed since the 1950s, and offer little of interest to the casual visitor. Bringing tasting rooms and other tourist draws will help build a bridge between Napa, the city, and Napa, the valley, and make Napa city a more thriving and interesting place.
There's one other advantage to bringing tasting rooms to Napa: it will mean fewer cars on Highway 29 and the Silverado Trail, including fewer drivers who are drinking. If people can stay in Napa city and do most of their tasting there, Napa Valley will be a safer place for us all.
Not everyone, of course, is happy with Andy's proposal. Some want to keep Napa city "local" meaning, I suppose, a town of furniture shops and dress stores. Others have pointed out the irony (they would say hypocrisy) of Andy Beckstoffer being for development in the city but against Napa Valley wineries hosting weddings—a distinction so fine I fail to perceive it. And this all occurs against the greater backdrop of where to draw the line between too much development in Napa and not enough; this fast-growth vs. slow-growth battle that's actually been going on for decades. For instance, in 1960, a city master plan called on expanding Napa's population to 1.1 million people. (The population currently stands at about 79,000.)
I don't think uncontrolled development is a good thing, but nothing comes without a cost. Leaving Napa "local" risks losing precious tourist dollars; over-developing it could make it into a wine version of Disneyland. But I think that Napans are smart enough to figure out a balanced approach, which is why I support Andy Beckstoffer's idea.
On "flying winemakers": Are they good or bad for wine?
One of the most interesting and controversial topics of the modern wine industry is the phenomenon of the "flying winemaker." This is the term, which I first heard in the 1990s, that refers to a class of men and women who hire themselves out to wineries as consultants; they are "flying" because their preferred mode of transportation is of course the jet plane.
But they are much more than mere consultants. Their name, attached to a wine on a press release, automatically confers prestige, the way, say, Steven Spielberg's name as producer of a movie is a sort of guarantee of the film's pedigree.
The name most often conjured up by "flying winemaker" is that of Michel Rolland. I knew he consults for a lot of wineries around the world, but I never knew that the number was up to two hundred, according to this article in Harpers. Among his Napa Valley clients, current and/or previous, I'm aware of are Harlan, Screaming Eagle, Alpha Omega, Dancing Hares, Staglin, Dalla Valle and Sloan—in other words, absolutely the peak of Napa Valley (if not the New World) in terms of price and quality (at least, as judged by the top critics). These are the famous "cult wines" that define a region's reputation and in fact establish its upper or outer limits of quality and perception by the wine world's cognoscenti.
This would be all well and good, except that over the last fifteen years or so—let's say, roughly from the start of the new century—a certain drumbeat of criticism has arisen among some critics, to the effect that an increase in the activities of these flying winemakers has resulted in a standardization or sameness in all the wines with which the consultant is associated. In fact, this critique goes even further: it says that all flying winemakers bring a similar approach to all their client wines, making these wines all taste similarly to each other, regardless of who made them or whether they are from Napa Valley or Pomerol or Chile. This sameness has been referred to as the "globalization of wine" or "the international style," terms meant to suggest that all wines of the same varietal type—most usually, Cabernet Sauvignon and its allied varieties—smell and taste alike. In the eyes of the critics of such globalization, this is tantamount to a crime, since it obliterates the notion of terroir.
This is a serious debate and a good one to have. I've never been one to take an extremist position one way or the other, as some American critics and newspaper columnists do in utterly condemning these "international" wines. Their criticisms usually also have to do with what they perceive as excessive ripeness, over-oakiness and an alcohol level (often approaching if not exceeding 15%) which, they claim, elevates technique over terroir.
My reluctance to join these reporters has been based on the simple fact that many of the Cabernets associated with Michel Rolland and other flying winemakers are, in fact, gorgeous. They are among the richest, most sumptuous wines ever produced in the history of the world, and it is churlish, if not somewhat childish, to object to them based on some philosophical or ideological notion. This deliciousness seems to be what Rolland himself referred to when he told Harpers that all he strives to do is to produce wines that are "intense, full bodied, balanced, harmonious, with delicate tannins and a long finish." This description certainly fits the Napa Valley wines I'm familiar with that Rolland consults for, but the problem, which you see is obvious by now, is that the same description fits all of them, which seems to hoist Rolland on his own petard. He has provided us with the template for an international style of Cabernet Sauvignon. And here, I must say that, in California at least, there is an ersatz style that mimics the international style on the surface, but that on closer examination results in lazy, flamboyant but eventually tiring wines. One has to be very careful in approaching the international style, lest he throw the baby out with the bathwater!
Harpers headlines their article "Michel Rolland defends his ability to manage wines on up to 200 wineries around the world," and while the word "defends" is perhaps hyperbolic on Harper's part, Rolland no doubt feels a little beleaguered. He must be aware of the criticism (although one suspects he cries all the way to the bank). Supporting the critics is the commonsense notion that one can only be in one place at a time, and even in this age of the jet plane, to have to be in so many places all over the world, having to apply one's conscientious attention to so many properties, especially at the harvest, must be challenging to say the least. Heidi Barrett, herself one of California's most famous flying winemakers (although she more properly might be called a "driving winemaker," for she only accepts clients that are "within a half hour" drive of her Calistoga home), notes that she limits her number of clients for the most pragmatic of reasons. "Realistically, when things are fermenting I must taste every tank, every day, and so I'm going to four locations, and that maxes me out. Some days I barely get everywhere." (These quotes are from my 2008 book, "New Classic Winemakers of California: Conversations with Steve Heimoff.")
Historically, we are at a point now where there is more or less an equilibrium between the international or global style, which admittedly is a ripe, expressive one, and a more restrained (one could almost say timid) approach, encouraged if not caused by the critics of the international style, who tend to have big platforms and the egos to fill them. I said we're at "a point," not "a tipping point." I don't think the balance will alter anytime soon, one way or the other. The wine market is simply too big and fractured for any large-scale revolutions to happen, despite alleged claims from some quarters that one is underway now. In the midst of such a complex market, winemakers hedge their bets; better to stick with a style that's worked for you up to now, than to throw the dice and risk unnecessary changes that might alienate your customers. Finally, we come to the cases of new entrants to the production game, a younger generation that's decided to live the wine life. They have, it seems to me, two choices, in the widest sense: to appeal to the international style, or to make wines more severe and that will, they hope, win the praises of the newspaper columnists who like that streamlined approach. They might as well flip a coin, given the standoff, and follow their hearts—always the best thing to do.


text:
Esmeralda Santiago - This person is called "Negi" by his/her family so frequently that he/she does not realize this is a nickname for many years.
Ramona - This person is mother to eight children.
Pablito - This person is very strong-willed and has a volatile relationship with his/her spouse.
Delsa - This person is left in charge of his/her younger siblings on their journey to join the rest of the family in New York.
Raymond - This person's foot is mangled in a bicycle accident and must eventually be treated in New York.
Francisco - This person is diagnosed with cancer and dies shortly after the birth of his/her son.
Tata - This person greets the family at the airport when they arrive in New York.
Margie - This person never meets his/her father's other family because he/she moves to...
(read more Character Descriptions)
This section contains 225 words
(approx. 1 page at 300 words per page)

subset: commoncrawl


text:
Meet the newest member of The Beer Soap Company Family!
We welcomed our third child and second son Theodore Alexander on October 31st, 2014!
We welcomed our third child and second son Theodore Alexander on October 31st, 2014!
The holiday season is here! Cutoff order dates for receiving your order before Christmas: USA: December 8th if you pick First Class Shipping. December 15th if you pick Priority Mail. December 20th for Priority Mail Express. Canada and International: November 25th for all orders regardless of shipping speed. Please note that times in transit are […]
Nov. 6th: Rachel Griesmer is the winner of this giveaway! Congratulations! We are pretty excited to share the great news! We added eight new beer soaps today, including one made with a beer soap that honors the popular TV show and book series The Game of Thrones. Ommegang Brewery released a limited edition beer earlier […]
We are counting down the weeks until Christmas with a giveaway each week. Enter below. Winner will be notified via email. Please visit our online store and receive 10% off any order of $20 or more. USe code 10%off$20 at The Beer Soap Company. a Rafflecopter giveaway
Enter below to win 3 full sized bars of our beer soap. Giveaway ends 7/13/2014. Winner will be chosen randomly and notifed by email. Can't wait for the end of the giveaway? Order and receive 10% off any order of $20 or more with code 10%off$20. a Rafflecopter giveaway


text:
Posted by Crystal
I'm not sure who is funnier in this video, but it is certainly entertaining.
How many ways can this Macaw say "hello"?
I am wondering what the Macaw was thinking…
What do you think?
You can be the first one to leave a comment.
Click here to cancel reply.
Copyright © 2015 Best Parrot Videos. All Rights Reserved.


text:
It would be easier to drink water with a straw at the foot of Mt. Everest because the atmospheric pressure is greater there, which helps to push the water up the straw.
Chegg is one of the leading providers of homework help for college and high school students. Get homework help and answers to your toughest questions in math, calculus, algebra, physics, chemistry, science, accounting, English and more. Master your homework assignments with our step-by-step solutions to more than 3000 textbooks. If we don't support your textbook, don't worry! You can ask a homework question and get an answer in as little as two hours. With Chegg, homework help is just a few clicks away.


text:
The other day I stumbled on a first draft on a new book on algorithms (Data Structure and Algorithms). After taking a peak at the draft, I found some (hidden) motivation to finally write a decent binary heap for QuickGraph. A heap is a critical data structure for Dijkstra shortest path or Prim's minimum spanning tree algorithm, since it is used to build efficient priority queues.
In this post, we'll start building a binary heap using Test-Driven Development (write the tests first, etc...) and parameterized unit tests.
The heap is a tree where each parent node has a value smaller or equal to the child nodes. The binary heap is a heap implemented through a binary tree, and to make things more interesting (and fast), the tree is usually mapped to an array using indexing magic:
The indexing magic is typically the kind of things that introduce bugs.
Let's write that first test
We start by writing a test that simply fills any binary heap with a number of entries. A possible test for this is written as follows:
public void Insert<TPriority, TValue>(
[PexAssumeUnderTest]BinaryHeap<TPriority, TValue> target,
[PexAssumeNotNull] KeyValuePair<TPriority, TValue>[] kvs)
var count = target.Count;
foreach (var kv in kvs) {
target.Add(kv.Key, kv.Value);
AssertInvariant<TPriority, TValue>(target);
Assert.IsTrue(count + kvs.Length == target.Count);
There are a number of unusual annotations in this test. Let's review all of them:
There are also two assertions in the test. Inlined in the loop, we check the invariant of the heap (AssertInvariant). We'll fill up this method as we go. At the end of the test, we check that the Count property.
BinaryHeap version #0
We start with a simple (broken) implementation that does nothing:
public class BinaryHeap<TPriority, TValue> {
public void Add(TPriority priority, TValue value) { }
public int Count { returnt 0; }}
Now that the code compiles, we run Pex which quickly finds that a non-empty array breaks the count assertion.
BinaryHeap version #1
We have a failing test so let's fix the code by storing the items in a list:
public class BinaryHeap<TPriority, TValue> {
List<KeyValuePair<TPriority, TValue>> items = new List<KeyValuePair<TPriority, TValue>>();
public void Add(TPriority priority, TValue value) {
this.items.Add(new KeyValuePair<TPriority, TValue>(priority, value));
public int Count {
get { return this.items.Count; }
We run Pex again and all the previous failing tests are now passing :)
There's a new object creation event that happened (bold events should be looked at). Remember that the test takes a binary heap as argument, well we probably need to tell Pex how to instantiate that class. In fact, this is exactly what happens when I click on the object creation button:
Pex tells me that it guessed how to create the binary heap instance and gives me the opportunity to save and edit the factory. The factory looks like this and get included automatically in the test project:
public partial class BinaryHeapFactory {
[PexFactoryMethod(typeof(BinaryHeap<int, int>))]
public static BinaryHeap<int, int> Create() {
BinaryHeap<int, int> binaryHeap = new BinaryHeap<int, int>();
return binaryHeap;
All our tests are passing, we can write the next test... but wait!
We have an invariant!
The nice thing about data structures is that they have fairly well defined invariants. These are very useful for testing!
In the case of the heap, we know that the parent node priority should always be less or equal to the priorities of both of his left and right children. Therefore, we can add a method to BinaryHeap that walks the array and checks this property on each node:
public void ObjectInvariant() {
for (int index = 0; index < this.count; ++index) {
var left = 2 * index + 1;
Debug.Assert(left >= count || this.Less(index, left));
var right = 2 * index + 2;
Debug.Assert(right >= count || this.Less(index, right));
}private bool Less(int i, int j) {
return false;
Remember that AssertInvariant method, let's call ObjectInvariant in that method and run Pex again.
void AssertInvariant<TPriority,TValue>(BinaryHeap<TPriority,TValue> target) {
Pex immediately finds an issue:
This assertion is due to our overly simplified implementation of Less, which always return false.
Fixing tests, and finding new failing tests
We have failing tests so it's time to fix the code again. Let's start fixing on the Less method by using a comparer:
readonly Comparison<TPriority> comparison =
private bool Less(int i, int j)
return this.comparison(this.items[i].Key, this.items[j].Key) >= 0;
We run Pex and it comes back with the following tests:
Two interesting things happened here:
The coolest part is we did not have to write any additional line of code to get to this point: Pex updated the previous tests and generated the new failure for us.
This is a new kind of flow that occurs when using Pex in TDD: a code update has fixed some issues but created new ones. We are still moving towards our goal but we did not have to pay the price of writing a new unit test.
In fact, to fulfill the invariant and make this test pass we will have to write a correct implementation of the Add method.... without writing a single additional line of test code :)
to be continued...
Update: renamed project to YUnit to avoid clashing with other frameworks.
I've been playing with custom test types for team test lately and the result of this experiment is YUnit. A microscopic test framework that lets you write tests anywhere since it only uses the Conditional attribute. That's right, any public static parameterless method tagged with [Conditional("TEST")] becomes a test :)
If you've always dreamed of implementing your own custom test type, this sample could be helpful to you. Remember that this is only a sample and comes with no guarantees of support.
Sources and installer available at: http://code.msdn.microsoft.com/yunit.
It's that time of the year where a little refresh of QuickGraph (http://www.codeplex.com/quickgraph) is needed.
What's new?
Read on Nikolai's announcement on the latest drop of Pex.
Alexander Nowak has started a blog post chronicle on Pex and already has 6 episodes to it!
The posts give a nice point of view of Pex from a user perspective, and against classic testing techniques such as equivalence classes.
Linear programming problems are usually solved using the simplex algorithm. While it is easy to encode a constraint system of linear equalities and inequalities as a Parameterized Unit Test for Pex, there is currently no way to tell Pex that we want test inputs that are "minimal" according to a custom objective function. However, Pex can still generate *surprising* feasible solutions.
Let's start with a simple set of linear inequalities that define our problem.
public int Test(int x, int y)
{ // PexAssume is used to add 'constraints' on the input // in this case, we simply encode the inequalities in a boolean formula
x + y < 10 & // using bitwise & to avoid introducing branches
5 * x + 2 * y > 20 &
-x + 2 * y > 0 &
x > 0 & y > 0); // the profit is returned so that it is automatically logged by Pex
return x + 4 * y;
After running Pex, we get one feasible solution. It is not optimal as expected since we don't apply the simplex algorithm.
Enter overflows
Remember that .Net arithmetic operations will silently overflow unless you execute them in a checked context? Let's push our luck and try to force an overflow by changing x > 0 constraint to x > 1000:
public int Test(int x, int y)
x + y < 10 &
5 * x + 2 * y > 20 &
-x + 2 * y > 0 &
x > 1000 & y > 0
return x + 4 * y;
Z3, the constraint solver that Pex uses to compute new test inputs, uses bitvector arithmetic to find a surprising solution that fulfills all the inequalities (our profit has just gone of the roof :)).
Z3 is truly an astonishing tool!
Checked context
In order to avoid overflow, one should use a checked context. Let's update the parameterized unit test:
public int Test(int x, int y)
x + y < 10 &
5 * x + 2 * y > 20 &
-x + 2 * y > 0 &
x > 0 & y > 0
return x + 4 * y;
In fact, in that case, Pex generates 2 test cases. One test that passes and the other test that triggers an OverflowException (implicit branch).
Stay tuned for more surprising discoveries using Pex.
Brian Keller dropped by our offices to record a movie on Pex. A good old white board session to explain how pex works:
We've added a little filter to Pex that flags potential testability issues in your source code (at least in the context of unit testing). The idea is simple: if your code logic branches over API that depends on the environment (file system, UI, network, time, etc...), you're not doing 'pure' unit testing anymore and it could be flagged as a testability issue.
Why do we do this anyway?
The problem is that Pex is very sensitive to those issues: it cannot control the environment. Let's take a look at a simple example where we write a custom stream class with a testability issue in one of the constructor:
The constructor checks that the file exists. In order to pass that point in the program, you would actually need to create or find an actual file in the file system. You're talking to the file system, this is already integration testing.
Parameterized drama
Let's be optimistic and write a parameterized unit test that reads a file:
Pex comes back with a single test, passing null as fileName (i.e. default(string)). Since Pex does not know how the file system works, it cannot create a valid file name, and that's where the story ends.
Help is on the way
To help you diagnose these issues, we've added specialized logging flags. Pex shows hints in the issue notification area:
Clicking on that event will give you additional important data: which API was called and the stacktrace at the time of the call :)
Ever wonder what was happening inside the ResourceReader (where do those resources come from anyway!).... Check out Nikolai's post on using Pex to test this (complicated) class...
If you're interrested on reading more about Pex, here are some online document that should get you satisfied:
The tutorial contains hands-on labs and exercises to understand how Pex generates new test cases. Highly recommend if you're interrested on Pex.
Happy reading!
Page rendered at Sunday, May 24, 2015 7:54:24 AM (Pacific Daylight Time, UTC-07:00)
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in anyway.


text:
*+-Dave Zirin: Like LaPierre, Goodell enforces a disciplined message that presents his harmful industry as American as apple pie in the name of profit.
Progressive Media Advocates
By Dave Zirin
-+*Treva Brandon Scharf: Can't afford a gym membership? Get bored easily by exercise? Don't want to run into your ex at Equinox? No problem! There's always the great outdoors – otherwise known as your local park.
-+*Walter Moss: There is little chance that any Republican nominee will put dealing with climate change at the center of his/her agenda, but we progressives should insure that at least the Democratic nominee does.
-+*Annette Bernhardt: The inequality debate often focuses on globalization and new technology, but we know that the decline of unions and the falling real value of the minimum wage have also played critical roles.


text:
|neighbor's son
|Submitted By
|Story Date
|Jul 7, 2011, 5:00 am
I'm not sure how this all got started but my story begins last summer. My husband and I live in the Ontario area. We are both 40 and have two great kids. We love each other very much and have a great life. However last summer a new family moved next door. They have one son who is 20 and has been in and out of trouble. We have been nice to them but kept our distance.
We have a great back yard with a pool and an outdoor shower. My husband and our boys went camping one weekend but I decided to stay home and get some yard work done. After a long day of planting I was hot and tired so I jumped in our pool and then headed for the outdoor shower. Our yard is very private so I took off my bathing suit and began to shower off. I must have been very tired and did not hear footsteps approaching the shower. When I turned off the shower and turned around there stood Dave the neighbor's son holding my towel. I was shocked and tried to cover my wet body with my arms and hands. I asked him what the hell he was doing there and he just laughed and said he came over to "help". I asked him to give me the towel but he just laughed and said he had a surprise for me. I tried to walk around him but he is 6'2" and muscular so I was stuck. Dave dropped my towel and then stripped off his shirt and shorts. His cock was fully hard and about 9" long with a big head.
I was in total shock. He backed me into the shower and sat down on the bench and grabbed my hips and pulled me to him. I tried to break free but he held me tight and kept grinning at me. He ran his hands all over my body and began sucking on my nipples. At this point I could not control him or myself as he started to finger my pussy. He eventually walked me out of the shower to a lounge chair, laid me down and ate my pussy for what seemed like an eternity. As much as I tried to think about my husband I was having orgasm after orgasm. Dave got on top of me and pushed his huge cock into me. I couldn't believe how big he was. I came four or five times while he fucked me in several positions.
I was so out of control I didn't even realize that he was not wearing a condom when he came inside me. When he was done he rolled off and lay next to me sucking on my tits and playing with my pussy. I told him he was a piece of shit for doing this to me but he just laughed and said he he would be back for more later. I told him that he was never to come back but again he just laughed and pointed to his fence showing me a video camera which recorded the whole fuck session. He told me that no one would see it but he would fuck me whenever he wanted to.
He has been fucking me since then and I have become addicted to his cock. My husband's 6" cock no longer satisfies me and I have to pretend to come when we fuck. When no one is home he comes over and does what he wants to me including anal sex and the use of vibrators. He is an obnoxious asshole but he is a great fuck and has me whenever he wants to.
Avg vote: 9.67
No. of votes: 3
No. of views: 10805
Avg. views/day: 7


text:
Karnataka Governor H.R. Bhardwaj said on Wednesday he is not asking the Lokayukta Justice Santosh Hegde, to submit to him his final report on illegal mining in the State.
Mr. Bhardwaj said since the matter was referred to Mr. Hegde by the Government, he has to give his report to it along with his recommendations.
"There is one eventuality...that is… anything is to be done on the part of the Governor...then he can definitely send it (to the Governor).Otherwise, this report he has to send it to the Government, not me", the Governor told reporters in the district headquarters town of Mysore in response to questions.
Explaining the "legal position", Mr. Bhardwaj, who shared an uneasy relation with Chief Minister B.S. Yeddyurappa and has been at loggerheads at times, said once the report is given to the Government, "there will be period given to the Government to accept or reject those recommendations".
Noting that since he (Bhardwaj) has not referred the matter to the Lokayukta, he is "not a party to this whole thing...it relates to mining and related matters".
"So, there have been comments from Hegde from time to time that he may send (the report to the Governor), may not send. I am not asking (him) to send", Mr. Bhardwaj, who had twice recommended President's Rule in the State in the past but without success, said.
On Sunday, the Governor, perceived in some quarters of BJP as being hostile to the government, said he would send a report to President Pratibha Patil once the mining report "comes on record".
Mr. Hegde's leaked report on illegal mining has indicted Mr. Yeddyurappa, triggering a political storm.