
The following gems and plugins are the most popular as of Nov 12th, 2008:
- Javascript Framework: jQuery (56%), Prototype (43%)
- Skeleton: Bort
- Mocking: Mocha
- Exception Notification: Hoptoad
- Full text search: Thinking Sphinx
- Uploading: Paperclip
- User authentication: Restful_authentication (keep an eye on Authlogic)
- HTML/XML Parsing: Hpricot
- View Templates: Haml
NewRelic has a good article on the state of the Rails stack.
 |  | BAC | GE | IBM | INTC | JNJ | KO | MCD | MMM | MRK | MSFT | PFE | PG | T | WMT | Return | StdDev |
Bk Of America Cp | BAC | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | -95.8% | 9.8% |
Gen Electric Co | GE | 0.63 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | -80.9% | 4.8% |
Intl Business Mac | IBM | 0.66 | 0.68 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | -48.1% | 3.0% |
Intel Corporation | INTC | 0.57 | 0.64 | 0.74 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | -66.9% | 4.1% |
Johnson And Johns | JNJ | 0.50 | 0.58 | 0.67 | 0.69 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | -28.4% | 2.5% |
Coca Cola Co The | KO | 0.39 | 0.45 | 0.56 | 0.66 | 0.72 | Â | Â | Â | Â | Â | Â | Â | Â | Â | -35.8% | 2.8% |
Mcdonalds Cp | MCD | 0.54 | 0.62 | 0.66 | 0.66 | 0.69 | 0.66 | Â | Â | Â | Â | Â | Â | Â | Â | -5.5% | 2.7% |
3 M Company | MMM | 0.56 | 0.66 | 0.68 | 0.68 | 0.77 | 0.66 | 0.75 | Â | Â | Â | Â | Â | Â | Â | -39.3% | 3.0% |
Merck Co Inc | MRK | 0.55 | 0.62 | 0.71 | 0.75 | 0.80 | 0.66 | 0.73 | 0.72 | Â | Â | Â | Â | Â | Â | -23.6% | 3.5% |
Microsoft Corpora | MSFT | 0.58 | 0.55 | 0.75 | 0.80 | 0.72 | 0.68 | 0.68 | 0.68 | 0.73 | Â | Â | Â | Â | Â | -54.0% | 4.0% |
Pfizer Inc | PFE | 0.61 | 0.60 | 0.66 | 0.70 | 0.76 | 0.64 | 0.67 | 0.71 | 0.80 | 0.70 | Â | Â | Â | Â | -37.5% | 3.2% |
Procter Gamble | PG | 0.53 | 0.62 | 0.68 | 0.69 | 0.84 | 0.70 | 0.73 | 0.78 | 0.82 | 0.72 | 0.77 | Â | Â | Â | -30.1% | 2.6% |
At&T Inc. | T | 0.60 | 0.57 | 0.72 | 0.72 | 0.77 | 0.64 | 0.69 | 0.69 | 0.79 | 0.75 | 0.75 | 0.76 | Â | Â | -29.7% | 3.6% |
Wal Mart Stores | WMT | 0.44 | 0.51 | 0.57 | 0.57 | 0.75 | 0.61 | 0.72 | 0.66 | 0.71 | 0.61 | 0.64 | 0.73 | 0.66 | Â | -34.4% | 2.7% |
Exxon Mobil Cp | XOM | 0.49 | 0.56 | 0.71 | 0.72 | 0.81 | 0.64 | 0.71 | 0.72 | 0.78 | 0.76 | 0.76 | 0.78 | 0.81 | 0.67 | 1.9% | 4.3% |
Portfolio | -44.6% | 3.1% |
Historically, the same portfolio has exhibited correlations between the various components which have been considerably lower. In fact, over the past twenty years (February 2nd, 1989 to Jan 30th, 2009), correlations have averaged 0.32, approximately half the correlation we have seen recently. The standard deviation of the daily returns was only 1.1%
Â
|
 | BAC | GE | IBM | INTC | JNJ | KO | MCD | MMM | MRK | MSFT | PFE | PG | T | WMT | Return | StdDev |
Bk Of America Cp | BAC | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | 3.2% | 2.5% |
Gen Electric Co | GE | 0.49 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | 8.4% | 1.8% |
Intl Business Mac | IBM | 0.31 | 0.41 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | 7.3% | 1.9% |
Intel Corporation | INTC | 0.31 | 0.40 | 0.45 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | 15.4% | 2.7% |
Johnson And Johns | JNJ | 0.27 | 0.39 | 0.23 | 0.22 | Â | Â | Â | Â | Â | Â | Â | Â | Â | Â | 14.5% | 1.5% |
Coca Cola Co The | KO | 0.28 | 0.38 | 0.21 | 0.22 | 0.41 | Â | Â | Â | Â | Â | Â | Â | Â | Â | 12.4% | 1.6% |
Mcdonalds Cp | MCD | 0.27 | 0.36 | 0.24 | 0.22 | 0.30 | 0.34 | Â | Â | Â | Â | Â | Â | Â | Â | 12.9% | 1.7% |
3 M Company | MMM | 0.35 | 0.45 | 0.28 | 0.29 | 0.31 | 0.34 | 0.28 | Â | Â | Â | Â | Â | Â | Â | 9.1% | 1.5% |
Merck Co Inc | MRK | 0.27 | 0.36 | 0.23 | 0.22 | 0.51 | 0.35 | 0.26 | 0.28 | Â | Â | Â | Â | Â | Â | 8.2% | 1.9% |
Microsoft Corpora | MSFT | 0.31 | 0.41 | 0.41 | 0.55 | 0.28 | 0.27 | 0.23 | 0.26 | 0.26 | Â | Â | Â | Â | Â | 21.5% | 2.3% |
Pfizer Inc | PFE | 0.30 | 0.40 | 0.25 | 0.23 | 0.52 | 0.35 | 0.27 | 0.29 | 0.54 | 0.29 | Â | Â | Â | Â | 12.0% | 1.8% |
Procter Gamble | PG | 0.27 | 0.37 | 0.19 | 0.20 | 0.41 | 0.43 | 0.33 | 0.34 | 0.35 | 0.21 | 0.36 | Â | Â | Â | 14.3% | 1.6% |
At&T Inc. | T | 0.32 | 0.37 | 0.26 | 0.25 | 0.32 | 0.32 | 0.27 | 0.29 | 0.29 | 0.28 | 0.29 | 0.30 | Â | Â | 8.4% | 1.8% |
Wal Mart Stores | WMT | 0.32 | 0.45 | 0.29 | 0.30 | 0.34 | 0.36 | 0.32 | 0.35 | 0.31 | 0.33 | 0.33 | 0.34 | 0.32 | Â | 13.8% | 1.8% |
Exxon Mobil Cp | XOM | 0.29 | 0.37 | 0.26 | 0.24 | 0.33 | 0.34 | 0.25 | 0.37 | 0.31 | 0.28 | 0.32 | 0.27 | 0.35 | 0.29 | 13.5% | 1.5% |
Portfolio | 13.2% | 1.1% |
 All these results were created using the tools at AssetCorrelation.com
The property that grounds the self in the post-modern age is visibility [link to original article]…Â
The End of Solitude
As everyone seeks more and broader connectivity, the still, small voice speaks only in silence
What does the contemporary self want? The camera has created a culture of celebrity; the computer is creating a culture of connectivity. As the two technologies converge — broadband tipping the Web from text to image, social-networking sites spreading the mesh of interconnection ever wider — the two cultures betray a common impulse. Celebrity and connectivity are both ways of becoming known. This is what the contemporary self wants. It wants to be recognized, wants to be connected: It wants to be visible. If not to the millions, on Survivor or Oprah, then to the hundreds, on Twitter or Facebook. This is the quality that validates us, this is how we become real to ourselves — by being seen by others. The great contemporary terror is anonymity. If Lionel Trilling was right, if the property that grounded the self, in Romanticism, was sincerity, and in modernism it was authenticity, then in postmodernism it is visibility.
So we live exclusively in relation to others, and what disappears from our lives is solitude. Technology is taking away our privacy and our concentration, but it is also taking away our ability to be alone. Though I shouldn’t say taking away. We are doing this to ourselves; we are discarding these riches as fast as we can. I was told by one of her older relatives that a teenager I know had sent 3,000 text messages one recent month. That’s 100 a day, or about one every 10 waking minutes, morning, noon, and night, weekdays and weekends, class time, lunch time, homework time, and toothbrushing time. So on average, she’s never alone for more than 10 minutes at once. Which means, she’s never alone.
I once asked my students about the place that solitude has in their lives. One of them admitted that she finds the prospect of being alone so unsettling that she’ll sit with a friend even when she has a paper to write. Another said, why would anyone want to be alone?
To that remarkable question, history offers a number of answers. Man may be a social animal, but solitude has traditionally been a societal value. In particular, the act of being alone has been understood as an essential dimension of religious experience, albeit one restricted to a self-selected few. Through the solitude of rare spirits, the collective renews its relationship with divinity. The prophet and the hermit, the sadhu and the yogi, pursue their vision quests, invite their trances, in desert or forest or cave. For the still, small voice speaks only in silence. Social life is a bustle of petty concerns, a jostle of quotidian interests, and religious institutions are no exception. You cannot hear God when people are chattering at you, and the divine word, their pretensions notwithstanding, demurs at descending on the monarch and the priest. Communal experience is the human norm, but the solitary encounter with God is the egregious act that refreshes that norm. (Egregious, for no man is a prophet in his own land. Tiresias was reviled before he was vindicated, Teresa interrogated before she was canonized.) Religious solitude is a kind of self-correcting social mechanism, a way of burning out the underbrush of moral habit and spiritual custom. The seer returns with new tablets or new dances, his face bright with the old truth.
H1-B visa holders are the Palestinians of American politics (with apologies to the Palestians). Each side uses them for their own interests. One side wants to protect them from being exploited and the other side wants to prevent them from exploiting. Neither side has their best interests at heart.
U.S. Senator Charles Grassley, an Iowa Republican, sent this letter to Microsoft [emphasis mine].
January 22, 2009
 Mr. Steve Ballmer
Microsoft Corporation
One Microsoft Way
Redmond , WA Â 98052-6399
Dear Mr. Ballmer:Â
I am writing to inquire about press reports that Microsoft will be cutting approximately 5,000 jobs over the next 18 months. I understand that the layoffs will affect workers in research and development, marketing, sales, finance, legal and corporate affairs, human resources, and information technology.Â
I am concerned that Microsoft will be retaining foreign guest workers rather than similarly qualified American employees when it implements its layoff plan. As you know, I want to make sure employers recruit qualified American workers first before hiring foreign guest workers. For example, I cosponsored legislation to overhaul the H-1B and L-1 visa programs to give priority to American workers and to crack down on unscrupulous employers who deprive qualified Americans of high-skilled jobs. Fraud and abuse is rampant in these programs, and we need more transparency to protect the integrity of our immigration system. I also support legislation that would strengthen educational opportunities for American students and workers so that Americans can compete successfully in this global economy.
Last year, Microsoft was here on Capitol Hill advocating for more H-1B visas. The purpose of the H-1B visa program is to assist companies in their employment needs where there is not a sufficient American workforce to meet their technology expertise requirements. However, H-1B and other work visa programs were never intended to replace qualified American workers. Certainly, these work visa programs were never intended to allow a company to retain foreign guest workers rather than similarly qualified American workers, when that company cuts jobs during an economic downturn.Â
It is imperative that in implementing its layoff plan, Microsoft ensures that American workers have priority in keeping their jobs over foreign workers on visa programs. To that effect, I would like you to respond to the following questions:
*         What is the breakdown in the jobs that are being eliminated? What kind of jobs are they? How many employees in each area will be cut?
*         Are any of these jobs being cut held by H-1B or other work visa program employees? If so, how many?
*         How many of the jobs being eliminated are filled by Americans? Of those positions, is Microsoft retaining similar ones filled by foreign guest workers? If so, how many?
*Â Â Â Â Â Â Â Â Â How many H-1B or other work visa program workers will Microsoft be retaining when the planned layoff is completed?
My point is that during a layoff, companies should not be retaining H-1B or other work visa program employees over qualified American workers. Our immigration policy is not intended to harm the American workforce. I encourage Microsoft to ensure that Americans are given priority in job retention. Microsoft has a moral obligation to protect these American workers by putting them first during these difficult economic times.
 Sincerely,
Charles E. Grassley
United States Senator
Of course, no mention of Microsoft’s moral obligation to its shareholders. And I don’t remember anyone caring about “the American workers” when we tied Microsoft up in court for years and drained their coffers. Maybe those laid off can dust themselves off and volunteer at Mozilla, the organization “dedicated not to making money”.
If US immigration policy is not intended to harm Americans then who is it intended to harm?Â
Â
Â
Â
Small, incremental change is hard to detect but accumulates over time:
From a distance, it looks like an apparition: a huge multi-colored hot-air balloon floating in the Baghdad sky, bearing a large poster of Jesus Christ. Below it, an Iraqi flag. Welcome to the first-ever public Christmas celebration in Baghdad.
[…]
Many of the people attending the Christmas celebration appear to be Muslims, with women wearing head scarves. Suad Mahmoud, holding her 16-month-old daughter, Sara, tells me she is indeed Muslim, but she’s very happy to be here. “My mother’s birthday also is this month, so we celebrate all occasions,” she says, “especially in this lovely month of Christmas and New Year.”
Stats from Howard Marks’ letter to Oaktree clients:
- Consumer credit outstanding grew 260 times from 1947 to 2008 (4% of GDP to 18%)
- Bank indebtedness: 21% of GDP in 1980, 116% in 2007
- Federal debt: $1 trillion in 1980, $11 trillion in 2008
- State debt: $1.2 trillion in 2000, $1.85 trillion on 2005 (9.2% CAGR)
- Solvency became contingent on the continuous availability of credit
- An upward sloping yield curve promotes short term borrowing to cover investing long.
Question: how should one invest in 2009? A global reflation seems the most likely path. Does the US have any option other than inflating its way out of its troubles…
Article on the trial of Sir Thomas More:
For instance, did you know that we have no copy of the oath which More famously refused to take? That no official transcript of the trial was made? That we are not certain whether there were one, three, or four formal charges? That, contrary to current legal practice, the more grave the case, the fewer the rights of the accused? That More’s civil rights, as defined by English law at the time, may have been more or less respected? In other words, there was nothing procedurally unusual about More spending years imprisoned in the Tower of London, undergoing several interrogations, being suddenly brought to court for trial, and hearing the charges against him (read in Latin) for the first and only time. And there was considered nothing untoward in having judges sitting on the bench with a vested interest (to put it mildly) in seeing More condemned, such as an uncle, a brother, and the father of Anne Boleyn.
- Upgrade to latest version of RubyGems (‘sudo gem update –system’)
- Add GitHub repository (‘gem sources -a http://gems.github.com’)
- Upgrade to latest version of Ziya (‘sudo gem install derailed-ziya’)
- Install Ziya in project directory (‘Ziyafy –charts’ in project home, note the double dash)
- Add ziya.rb to config/initializers directory
- Copy your themes into ../public/themes/
Some other thoughts: If you’re frustrated by the almost non-existent documentation and the fact that the gem is in constant flux, don’t despair. The best way to understand how to customize your graph is to look through the example themes (for some reason they didn’t install with my gem but I downloaded them from GitHub).
Note: You can not instantiate the Ziya object in the controller corresponding to the chart’s view. It needs to be in a separate controller. Otherwise, an XML file (instead of a chart) will be returned when that controller is invoked.
Also, the reference material at XML/SWF charts is very useful and Ziya seems to adhere quite closely to the naming conventions.
I also found that I needed user-defined functions fairly quickly to customize axes etc.
Here is an example of how to use Ziya to create a scatter chart:
== Chart Controller ==
01: def load_ef
02: Â Â # Create graph data object
03:   chart_data  = Array.new04:   # Pull portfolios out of database
05: Â @query = sessions[:period].to_i06: Â Â @portfolios = Portfolio.find(:all, :conditions => [“period = ?”, @query])
07: Â Â # Strip out risk and return
08: Â Â @portfolios.each { |x|
09:    chart_data  << x.std_dev
10:    chart_data  << x.port_ret
11: Â Â }12: Â Â title = “User-entered portfolios”
13: Â Â chart = Ziya::Charts::Scatter.new(‘LICENSE-KEY’)
14: Â Â chart.add( :axis_category_text, %w[x y]*(chart_data.length/2) )
15: Â Â chart.add( :series, title, chart_data )16: Â Â chart.add( :theme , “assetcorrelation” )
17: Â Â respond_to do |fmt|
18: Â Â Â fmt.xml { render : xml => chart.to_xml }
19: Â Â end
20: end== View ==
1: <div>
2: Â <%= ziya_chart load_ef_url, :size => “1200×800” – %>
3: </div>== Routes.rb ==
1: map.load_ef  ‘/chart/load_ef’,  :controller => ‘chart’, :action => ‘load_ef’
As far as I understand, Rails will first look for a method in your controller that matches the view, then, once it starts rendering the view, it hits the callback (line 2 in the view snippet above) and at that point calls the method in the chart_controller to render the chart data, using the routing information in Routes.rb.
Note that in this case, I am pulling the data for the chart out of my database.
[Welcome to our first-time guest blogger]
Â
It is a relief to many that Obama is in. Credit goes to those who feel that way for significant, i.e. policy, reasons, but public comments made it seem we were simply proud we have proven to the world that we’re not racist.
Â
Oddly enough, no one is eager to show we are not sexist. To the contrary, like bullies on the playground, we shouted at the female candidates: “She-goat!†“Dominatrix!†and my favorite, “Breeder!†(Thank you for that last one, Bigot Maher.)
Â
Reuters photographed Palin from behind and between her legs…ah, harkens back to the good-old-days when She-Ra’s legs framed the shots of He-Man in the 80’s. I say those were the good-old-days because that was a time when educated women called foul on things like that. But this time I heard crickets. Even my (former) hero Steinem held the coats for the ensuing mob.
Â
Especially mesmerizing was the “role of the vice president†discussion. Palin said the VP is in charge of the Senate. Article 1 Section 3 of the constitution says:
The Vice President of the United States shall be President of the Senate, but shall have no Vote, unless they be equally divided. The Senate shall choose their other Officers, and also a President pro tempore, in the absence of the Vice President.
This election was indeed about audacity — the audacity to take direction from the Constitution. If only legislators would treat Article I Section 8  with more reverence we would have a much simpler government. (I’ll give you a hint, establishing a post office and postal roads is 1 of the 18 things with which they are actually tasked.) But I digress. For this comment Palin was burnt at the ignoramus stake. I can’t bring myself to discuss the bikini characterizations, the dolls, and the frenzy on fashion. It is a confounding hatred for the very gender that promoted the abolition of slavery (to make no mention of the party.)
Â
And now to keep hope alive: history suggests we have only 50 more years before a woman is in the White House:
-
Voting rights: African American Men – 1870. Women – 1920.
-
US Senate:  AAM – 1870. Women – 1922*Â
-
US Congress: AAM – 1868. Women – 1917
If history repeats once more, Obama’s daughters will have to wait until they are nearly 60 years old for our great nation to consider their application on merit. Chelsea will be in her 70s, and, apparently, too old for the job.
Â
We’ve come a long way from slavery. But we’ve hardly come a long way from the Salem witch trials. In fact, some might say we just had one.Â
Â
*Rebecca Latimer Felton of Georgia, the first woman to serve in the United States Senate, took the oath of office on November 21, 1922. Having been appointed to fill the vacancy for her husband, Felton served for just 24 hours. The first woman elected to the Senate was Hattie Wyatt Caraway of Arkansas in 1932.