Shared posts

09 Oct 15:17

O Mar de Aral secou ao longo dos anos e agora praticamente não existe mais

by Daniel Junqueira

O Mar de Aral, na Ásia Central, secou. O que foi um dia o quarto maior lago do nosso planeta agora não é quase nada – e a culpa é de projetos desastrosos de irrigação.

Nos anos 1960, a União Soviética preparou um imenso projeto de desvio de águas do Mar de Aral para as planícies áridas do Cazaquistão, Uzbequistão e Turcomenistão. Por um lado, o projeto foi bem sucedido, e fez o deserto florescer. Mas seu efeito colateral supera qualquer benefício, e o mar praticamente não existe mais.

As imagens que abrem o post foram capturadas pelo satélite Terra da NASA e mostram o mar em 2000 (à esquerda) e em 2014 (à direita). Eis a explicação da NASA:

Em 2001, a conexão ao sul tinha sido cortada, e a parte oriental rasa recuou rapidamente nos anos seguintes. Recuos especialmente grandes na parte oriental do Mar do Sul parecem ter ocorrido entre 2005 e 2009, quando a seca limitou e então cortou o fluxo do Amu Darya. Níveis de água oscilaram anualmente entre 2009 e 2014 em anos alternadamente secos e com muita água. As condições secas de 2014 fizeram a parte leste do Mar do Sul secar completamente pela primeira vez em tempos modernos.

As consequências diretas disso são claras: comunidades da região não terão água, mas tem muito mais coisa além disso. A areia salgada do fundo do antigo lago voou para campos próximos e degradou o solo, e plantações na região precisaram receber água do rio. A ausência da água do antigo lago tornará os invernos mais gelados e os verões mais quentes e secos. [NASA via io9]

O post O Mar de Aral secou ao longo dos anos e agora praticamente não existe mais apareceu primeiro em Gizmodo Brasil.








07 Oct 19:09

Picadinho partidário em 2014

O Congresso eleito em 2014 é o mais esfarinhado desde a volta da democracia, como se previa. Desde a volta da democracia, é Congresso mais fragmentado por qualquer critério formal que se empregue para medir o picadinho.

No que diz respeito à formação de coalizões de apoio ao governo, talvez o esfarinhamento não cause problema maior. Ainda que a "governabilidade" não piore, no entanto, a gente pode perguntar se a legitimidade e a imagem de partidos e Parlamento não serão mais degradadas pelos métodos de aquisição de apoio político, dada a fragmentação crescente.

Uma medida que leva em conta tanto o número de partidos quanto o peso de cada um deles no Congresso Nacional, o "número efetivo de partidos", mostra que desde 2006 a fragmentação cresce a cada legislatura eleita.

Cresceu também o número de partidos necessário para formar maiorias simples ou de dois terços (isto é, desconsideradas aquelas alianças na prática impossíveis, como entre PT e PSDB). Decerto aumentou no Congresso o número de partidos irrelevantes, em termos de bancadas e "ideologia" (uma dúzia dos 28 que elegeram representantes), mas há mais partidos que podem ter peso na balança.

Pelo menos até a década passada, vários bons politólogos não se impressionavam com a fragmentação, que seria mais aparente do que real. Os governos conseguiam formar maiorias de partidos compostos de parlamentares que votavam, em grande parte, de acordo com a orientação partidária, de modo "disciplinado".

Ainda que assim seja, tornou-se escandalosamente importante o método de formação de coalizões, que aparece para o cidadão como compra de votos mais ou menos vexaminosa ou criminosa.

Há incentivos para criar um negócio partidário. Tanto que a decisão judicial de 2007 que proibiu o troca-troca partidário estimulou a criação de ainda mais partidos. Se não se pode mudar de partido sem perder o mandato, cria-se um novo. A disciplina partidária, aliás, esfarinhara-se antes, quando as vitórias federais do PT levaram parlamentares de direita ou conservadores amorfos de legendas maiores a migrar para partidinhos da direita satélite do petismo-lulismo, grandes personagens do mensalão, aliás.

O tempo de propaganda na TV e o fundo partidário são, óbvio, outro incentivo para a multiplicação de legendas, que alugam esses recursos em tempo de campanha, entre outros negócios da baixa temporada.

Tudo muito "racional", mas isso deu na compra de votos para a emenda da reeleição, no mensalão e provavelmente no Petrolão. Tem contribuído para o loteamento podre de cargos importantes, embora necessariamente não precise ser assim. Mas tem sido.

A desmoralização dos partidos pareceu ser um motivo forte dos protestos de junho de 2013 (indignação minoritária, como se vê pelos resultados da eleição de 2014, com vitórias de gente e partidos indizíveis). A desmoralização parlamentar pode dar em nada. Pode dar na procura maciça de um "outsider", de um líder "novo", "sem partido". Não dá para dizer que o nosso sistema seja especialmente desfuncional. Mas o risco de dar besteira parece ter aumentado.

07 Oct 18:55

A intervenção da coalizão dos EUA na Síria começou a fracassar?

by Gustavo Chacra

No Brasil, ninguém mais presta atenção na intervenção da coalizão comandada pelos EUA, com apoio de países árabes e ocidentais e da Turquia, contra o grupo ultra-extremista ISIS, também conhecido como Grupo Estado Islâmico, ISIL e Daesh. Mas vou explicar o caso da cidade de Kobani para mostrar como, até agora, tem sido um fracasso.

Kobani é curda, dentro da Síria, na fronteira com a Turquia. Na Guerra Civil, conseguiu autonomia do regime de Assad. Era praticamente a capital do Curdistão sírio.  Se há uma cidade que seria simples ser defendida é Kobani. Primeiro, eles não são aliados do regime de Assad, nem do ISIS e da Frente Nusrah. Não havia membros destas organizações radicais ou do regime de Assad até a semana passada. Eles viviam em relativa calma. Seriam os sonhados “moderados” pelo governo dos EUA. Além disso, por estar ao lado da fronteira da Turquia, poderia facilmente ser defendida pelo super poderoso Exército turco.

Mas, desde que os EUA começaram a intervenção, em vez da calma Kabani ficar segura, ela passou a ser alvo do ISIS. Hoje o grupo ultra radical praticamente controlou a cidade. Dezenas de milhares de curdos buscam abrigo na Turquia. Ironicamente, os bombardeios da coalizão dos EUA, se é que ocorreram (alguns opositores dizem que não), não serviram para nada. A Turquia, sempre ambígua na questão do ISIS, não interveio. Afinal, para o governo de Erdogan, os curdos são piores do que o ISIS.

No Brasil, claro, ninguém presta atenção. Impressionante. De Copa fomos para Gaza, de Gaza para o ISIS e agora, temporariamente, os brasileiros, com uma certa razão, estão focados nas eleições. Daqui a pouco, vai ressurgir o debate sobre o Irã e quem não tem acompanhado absolutamente nada das negociações nucleares entre o regime de Teerã e o Sexteto (EUA, Rússia, China, França, Reino Unido e França), que chegarão à sua data limite, começará a dar opinião.

 Não sei como faz para publicar comentários. Portanto pediria que comentem no meu Facebook (Guga Chacra)  e no Twitter (@gugachacra), aberto para seguidores

Guga Chacra, comentarista de política internacional do Estadão e do programa Globo News Em Pauta em Nova York, é mestre em Relações Internacionais pela Universidade Columbia. Já foi correspondente do jornal O Estado de S. Paulo no Oriente Médio e em NY. No passado, trabalhou como correspondente da Folha em Buenos Aires

Comentários islamofóbicos, antissemitas, anticristãos e antiárabes ou que coloquem um povo ou uma religião como superiores não serão publicados. Tampouco são permitidos ataques entre leitores ou contra o blogueiro. Pessoas que insistirem em ataques pessoais não terão mais seus comentários publicados. Não é permitido postar vídeo. Todos os posts devem ter relação com algum dos temas acima. O blog está aberto a discussões educadas e com pontos de vista diferentes. Os comentários dos leitores não refletem a opinião do jornalista

Acompanhe também meus comentários no Globo News Em Pauta, na Rádio Estadão, na TV Estadão, no Estadão Noite no tablet, no Twitter @gugachacra , no Facebook Guga Chacra (me adicionem como seguidor), no Instagram e no Google Plus. Escrevam para mim no gugacha

07 Oct 18:07

The Outing of Tinky Winky


“We're talking about a show for 1- to 4-year-olds; if we had homosexuals in it, they wouldn't even know it. Tinky Winky is simply a sweet, technological baby with a magic bag.”
Teletubbies producer, Kenn Viselman

When Teletubbies debuted on the BBC in March 1997, it almost immediately polarized viewers. Some thought the show was a work of genius -- an unprecedented effort to create educational content for one-year-olds; others found the plot repetitive and the characters horrifying (“These spacemen will frighten our children,” one concerned German toldThe Independent). 

But there was one thing everybody could agreed on: The series was incredibly strange.

Four rotund, baby-faced, asexual aliens -- Po, Laa-Laa, Dipsy, and Tinky Winky -- spent the vast majority of each 25-minute episode waddling about in a pristine country landscape, speaking in high-pitched gibberish and interacting with talking flowers. On occasion, they’d slide down into the “Tubbytronic Superdome” (a high-tech underground cavern) and carouse with an anthropomorphic vacuum cleaner. Other times, they’d awkwardly slurp on tubs of pink custard while reveling in their mutual buffoonery. Fitted with interactive screens on their stomachs and antenna-like communication devices, the characters would often broadcast the repetitive, mundane lives of human children, then applaud their efforts enthusiastically, as if they’d just cracked some age-old mathematical code.

The show’s producers (Ragdoll Productions) and distributors (BBC in the UK; PBS in the US) shared the characters’ elation: Teletubbies was a runaway financial success. After just one season on air, the show had attracted two million viewers per episode, grossed $800 million in merchandise sales, and launched a best-selling preschool book series. Even the program’s theme song, “Teletubbies say ‘Eh-Oh,’” saw explosive dividends -- it sold over a million copies and topped the UK Singles Chart for 32 weeks. BBC proudly touted the show as a “case study” for making money. “The potential on this one is limitless,” the network’s head of sales told a room full of international distributors; within two years, Teletubbies was being broadcast in 120 countries in 45 languages.

But all wasn’t well in Teletubbyland: With instant success came bountiful controversy: Did the meandering plot hold any educational value? Should children under the age of two even be watching television? Stranger, non-scientific accusations were also made: Did the colorful, repetitive nature of the show provide an ideal experience for college kids tripping on psychedelic drugs? 

And then, sparked by the grumbles of parents and pundits, the strangest accusation emerged: Tinky Winky, the purple teletubby, was gay. Despite the character’s asexuality, and the fact that he was fictional, the story snowballed into a media sensation. The “outing of Tinky Winky” would become, in the words of the show’s producers, the second biggest news story after “Monica Lewinsky and her blue dress.”

This is the true story of how Tinky Winky, the purple Teletubby, incited a decade-long homophobic panic.

The Rise and Fall of Tinky Winky

Dave Thompson, the original Tinky Winky actor, on the Teletubbies set (1996)

When a casting call for Teletubbies went out in the Spring of 1996, more than 600 actors auditioned for the role of Tinky Winky. Among the hopefuls was Dave Thompson, an English stand-up comedian and all-around “nutcase.”

Weeks earlier, a casting director for the show had come across Thompson on the set of another television program, Harry Hill’s Fruit Fancies, where he’d portrayed a fully-wrapped Egyptian mummy. “He was impressed that I wasn’t claustrophobic,” recalls the actor, “and he figured that was a good trait to have in the Teletubbyland, where you’re inside a costume all day.”

Despite being an hour and half late to his call-back, Thompson was given an opportunity to prove his worth: He was swiftly led into a small room, asked to perform an impromptu comedy sketch about childhood, then was paired off with other wanna-be ‘tubbies in a series of “unusual” group workshops. Miraculously, he landed the job. “There are a whole load of people who specialize in wearing costumes -- what they call in the trade ‘suit performing’,” he clarified in an English podcast, “but they wanted a person who had something else to offer. I guess I was the guy.”

Thompson, with the rest of the cast, was whisked away to a remote countryside farm in  Stratford-upon-Avon (the coincidental birthplace of Shakespeare), and filming for the series commenced. Though he towered above his fellow cast members at 6’3” -- nearly 8 feet tall with his costume on -- crafty camera angles made him appear much smaller, so as not the scare infantile viewers.

As temperatures rose through the summer, portraying the purple Teletubby soon became taxing for the big man. “It was very, very hot in the costume,” Thompson says. “By lunchtime, I could actually ring a pint and half of sweat from my clothes underneath.” The suits, which cost about $57,000 each, were as difficult to maneuver in as they were stifling; an intricate system of bicycle brake levers in the hands controlled the eye and hand movements, wriggling into the get-up required a small village of production assistants, and the head was nearly impossible to see out of:

“It was all, ‘this many steps this way, that many steps this way, turn your head this way.’ You couldn't actually see and you didn't actually know what was going on and what people were doing around you. We were all being sort of controlled.”

Despite these difficulties, Thompson’s rendition of Tinky Winky initially dazzled the show’s director. For the actor, it was a “dream Summer” -- full of praise, pats on the back, and positive encouragement. Then, things began to turn sour.

When it came to narrating the character’s giggles and squeals in the studio, Thompson’s voice was suddenly “too high-pitched;” a voice-over actor was swiftly brought in to do a “proper job,” giving the actor little chance to correct his tone. As production wrapped up for the first season, Thompson received a letter, seemingly out of the blue: “Your interpretation of the role of Tinky Winky” has not been accepted.” With that, he was terminated from the show’s cast before it even aired.

"I wasn't given any clues as to what I was doing wrong," he recalls. "I was officially asked to leave in a letter from an accountant just before everyone else went off to the end-of-shooting wrap party.”

Dave Thompson: The original Tinky Winky

"I am proud of my work for them,” the mustachioed actor later ceded. “I was always the one to test out the limitations of the costume. I was the first to fall off my chair and roll over. I took all the risks." It was likely these “risks” that resulted in his departure: According to a few of his old co-workers, Thompson had a penchant for “romping around naked” between takes -- a quirk that had once earned him the nickname “Kinky Winky” on set. 

The purple teletubby subsequently seemed plagued: Over the next five years, two more actors portrayed the role (the other three teletubbies each had only one actor for the duration of the entire series). Though “most of the program is made up of generic shots” which feature Thompson (even in later episodes), he sees no dividends. “When they brought the new guy in, that was just for a couple of the dances and for the little sketches,” he says. “So even in the ones with him, I am actually in the show more -- though I don't get paid a penny for it!”

Thompson eventually returned to comedy, and became known for his “naked balloon dancing” -- particularly the routines he acted out in public parks in Bath, Somerset. He also penned a book, “The Sex Life of a Comedian,” which tells a familiar story: A Stand-up comic gets a job wearing a furry costume on a kids’ television show and then gets fired.

Tubbygate: How Tinky Winky Incited a Homophobic Panic

On March 31, 1997, Teletubbies made it’s public debut on England’s BBC Television. Before long, the show’s purple character began to fall under scrutiny.

It began in July, with a letter to British popular culture magazine, The Face. “Tinky Winky,” wrote Sussex University lecturer Andy Medhurst, “may be the first queer role model for toddlers.” A few days later, The Guardian, trumpeted the purple Teletubby as “a gay icon who prances around in a particularly campy way” (“campy” being British slang for “blatantly homosexual”). The British media opened its floodgates: Over the ensuing months, dozens of talk shows, radio programs, and newspapers hotly debated the sexuality of the children’s show character. As Thompson’s firing became public information, the media gave it a sensational spin: The actor had been let go for “acting too gay.”

At the same time, the show’s popularity soared. By the end of the first season, nearly $800 million in merchandise -- pajamas, toys, and videos -- had been sold, garnering the interest of networks across the world. Distributor PBS recognized its potential, bought the American rights, and, in the Spring of 1998, began airing the program in the United States. Soon enough, the Tinky Winky controversy crossed international lines.

With news of the Teletubbies’ US arrival, The Washington Post swiftly declared that “the gay Tinky Winky” was the “new Ellen Degeneres” (implying that Degeneres’ time as the “chief national gay symbol” was over, and that the Teletubby was taking her place). “Tinky Winky comes across as a big fabulous fag,” declared LGBT magazine, The Advocate. “He’s become as gay icon…[and] the same fundamentalists that boycott Disney are going to flip when they see him.”

By the 1990s, Reverend Jerry Falwell was running out of people to pick on. The evangelical Southern Baptist pastor had spent his life championing the values of the extreme Christian right: He’d caroused with shady politicians, crusaded against secular curriculums in the classroom, and, most notably, established himself as "the founder of the anti-gay industry." 

When the news finally came around to him that a children’s show character was purportedly gay, he wasted no time opining. In the February 1998 issue of National Liberty Journal (a promotional publication for the university he’d founded), he wrote a scathing critique of “Teletubby culture.” The pundit’s one-paragraph diatribe, titled “Parents Alert: Tinky Winky Comes Out of the Closet,” fittingly began in all-caps -- “PARENT ALERT...PARENT ALERT” -- before expounding on the dangers of asexual fuzzy creatures.

"He is purple – the gay pride color; and his antenna is shaped like a triangle – the gay-pride symbol; he flaunts a red purse," the pundit furiously declared. "As a Christian, I feel that [Tinky Winky’s] role modelling of the gay lifestyle is damaging to the moral lives of children."

Anti-gay crusader Rev. Jerry Falwell clings to a Tinky Winky statue jokingly presented to him at a Baptist church in San Diego, CA (1999)

A few days later, he was given an opportunity to wax his theory on NBC’s “Today” show. “To have little boys running around with purses and acting effeminate, and leaving the idea that the masculine male, the feminine female is out, and gay is O.K. -- that’s something Christians do not agree with,” he gruffly told host Katie Couric.

“We're talking about a show for 1- to 4-year-olds,” countered Teletubbies producer Kenn Viselman, also on the show. “If we had homosexuals in it, they wouldn't even know it -- but for the record, we don't. Tinky Winky is simply a sweet, technological baby with a magic bag.”

Aired on national television, this “debate” catapulted Tinky Winky’s sexual status into the limelight. "This ridiculous question -- ‘Is Tinky Winky a heterosexual or a homosexual?’ -- became the second largest story in the world," the show’s producer later stated. "Literally the only story that got more global [attention] was Monica Lewinsky and her blue dress.” Similarly, the TInky Winky controversy became political: While ultra-conservative pundits sided with Falwell, and agreed that the show was “sexually edgy,” Democrats maintained that attacking a children’s show character was “simply mystifying.”

The more reasonable sector of the media pointed to the absurdity of the entire debacle: Teletubbies, as non-gendered, non-sexual creatures, could be neither gay nor straight. As one journalist commented, "The Teletubbies have no genitalia -- how could they have any sexuality?" Steve Rice, the show’s spokesman, was quick to share these viewpoints:

"The fact that he carries a magic bag (which isn’t a purse, by the way) doesn't make him gay. It's a children's show, folks. To think we would be putting sexual innuendo in a children's show is kind of outlandish. To out a Teletubby in a preschool show is kind of sad on his part. I really find it absurd and kind of offensive."

Meanwhile, at the New York Toy Fair, Tinky Winky plush dolls sold like hot cakes. “All [Falwell] has done is make a mockery of himself,” said Jim Silver, a toy industry insider, told the New York Times. “If anything, it put more attention on Teletubbies and increased sales.” The controversy also started a new trend among the city’s “gay hipsters:” Tinky Winky backpacks, t-shirts, and keychains became unofficial badges of solidarity in the community. 

Representatives of the gay community responded to the character’s outing, and the media storm surrounding it, with humor. "We haven't spoken to Tinky Winky directly, and so we don't presume to know what his orientation may be," a spokeswoman for the National Gay and Lesbian Task Force told the Chicago Tribune. "However, we think it's a great thing that the Teletubbies portray human diversity and that children love the Teletubbies and appreciate the diversity of expression that the Teletubbies represent."

Like most tittle-tattle, Tinky Winky’s perceived orientation didn’t die away: For years, what started out as mere speculation became an accepted truth.

Poland’s Anti-Tinky-Winky Crusade

By 2001, Tinky Winky rumors were still in circulation (the character’s sexuality became an everlasting topic of discussion at dinner tables and schoolyards), but Teletubbies controversy began to transition to a more pressing concern: Did the show actually have any educational merit? Though its creators -- a speech pathologist and a former schoolteacher -- seemed gung-ho about “stimulating toddlers’ imaginations and developing their motor skills,” experts pointed out the lack of evidence behind these claims. Susan Linn, a psychiatry chair at Harvard Medical School, voiced these concerns in a column for The American Prospect:

“There is no research showing that the program helps babies learn to talk. There's none to suggest that it facilitates motor development in 12-month-olds. There is no data to substantiate the claim that young children need to learn to become comfortable with technology. In fact, there is no documented evidence that Teletubbies has any educational value at all.”

With mounting pressure from education specialists, BBC discontinued the show in 2001; in the United States, new episodes were pulled in 2005 -- though reruns continued to air until 2008. By this time, the show had spread to 120 countries and was being aired in 45 languages: Right after the United States discontinued Teletubbies, government officials in Poland resurrected the ten-year-old Tinky Winky debate -- this time, with the mission to “scientifically prove” that the character was, indeed, a “homosexual.”

Ewa Sowinska, as the country’s child rights ombudsman, was tasked with investigating complaints against faulty administration. In lieu of the the many pressing issues awaiting her response, Sowinska instead decided to hone in on the purple Teletubby.

Sowinska following Jerry Falwell’s lead (it’s trendy for anti-gay political figures to do photo ops with Tinky Winky!); Fot. Bartosz Bobkowski / Agencja Gazeta

“I noticed [Tinky Winky] has a lady's purse -- but I didn't realize he's a boy," she told a local magazine. "At first I thought the purse would be a burden for this Teletubby...Later I learned that this may have a homosexual undertone."

Sowinska then embarked on a voyage to recruit the country’s “top child psychologists” to determine whether or not merely watching the program could encourage children to engage in homosexual acts. After pursuing the idea for a week, Sowinska announced her findings to the media, as if revealing some groundbreaking study: "The opinion of a leading sexologist, who maintained that this series has no negative effects on a child's psychology, is perfectly credible; as a result I have decided that it is no longer necessary to seek the opinion of other psychologists."

With these “findings,” Sowinska came under heavy criticism and began to backpedal. "They are fictional characters, they have nothing to do with reality,” she ceded days later. “The bag...and other props the fictional characters use are there to create a fictional world that speaks to children.” Concerned that the politician was “turning the department into a laughing stock,” Speaker Bronislaw Komorowski ordered her termination from office just months later.

Poland wasn’t the only country to reignite a stir over Tinky Winky: In Kazakhstan, the character -- and the show in its entirety -- was banned by personal order of the president on the grounds that “he was a sexual pervert.”

A Burden to Carry

Looking back, Dave Thompson isn’t exactly sure why the purple character’s sexuality was ever in question. “The mistake was that adults projected adult sexuality onto these pre-sexual creatures,” he reflects. “They’re aimed at children under 5, so they don’t want them to have sexuality for very obvious reasons.”

Nikki Smedley, the actress who played the yellow-hued Laa-Laa, finds the controversy equally absurd. "What kind of person can take the obvious innocence and turn it into something else?” she asks. “We were hardly sexual beings." When the 49-year-old was first exposed to the show, she thought it was a work a genius; she appreciated that it “came from a place of love,” and that it strived to wholesomely engage young children. “Somewhere in the world,” says the actress, “a child is looking at Laa-Laa and laughing -- that’s beautiful.”

For the better part of a decade, Tinky Winky also evoked laughter -- often under the wrong circumstances -- though, he’ll soon have a shot at redemption: Two months ago, the BBC announced a 60-episode renewal of Teletubbies -- the first new production in nearly a decade. The characters, says the network, will be “revamped” and modernized, though it’s unclear whether he will sport his trademark accessory.

It would be difficult to imagine the exuberant creature without his red magic handbag. Season after season, it brought him joy, excitement, friendship -- in many ways, it defined who he was. But a scenario in a later episode paints a sad picture.

Tinky Winky hobbles on screen and looks around: He’s alone. Gingerly, he removes the red handbag from his shoulder, places it on the ground, and stuffs it with everything he can find: a patterned hat, a scooter, a giant bouncy ball, a piece of toast -- it's soon full to the brim. He shuts the latches, and proudly shuffles a dance. He bends to pick up the bag, but is unable to lift its weight.

He pauses, as if uncertain how to proceed, his triangular aerial lightly flopping in the breeze. And then, with a defeated squeal, he voices his dilemma: “Uh-oh!”

His bag had become too big of a burden to carry.

This post was written by Zachary Crockett; you can follow him on Twitter here. To get occasional notifications when we write blog posts, please sign up for our email list.

07 Oct 14:40

A explicação mais sensata para a Microsoft não chamar seu próximo OS de “Windows 9″

by Felipe Ventura

Esta semana, o Windows 10 pegou todo mundo de surpresa: por que ele tem esse nome? Cadê o Windows 9? Terry Myerson, chefe do Windows, apenas disse misteriosamente que “quando você vir o produto em sua plenitude, eu acho que você vai concordar conosco que [Windows 10] é um nome mais apropriado”.

No entanto, há uma explicação não-oficial muito convincente para a Microsoft deixar o Windows 9 de lado: esse nome faria diversos programas pararem de funcionar.

O usuário cranbourne do Reddit diz:

Sou desenvolvedor Microsoft. Rumores internos dizem que os primeiros testes revelaram que muitos produtos de terceiros tinham código na forma

if (version.StartsWith (“Windows 9″))
{/ * 95 e 98 * /
} Else {

e que esta foi a solução pragmática para evitar isso.

Explicamos. Para verificar qual versão do Windows o usuário está rodando, uma maneira fácil – e ruim – é ler o nome do sistema operacional. O código acima lê “Windows 9″ e entende que o sistema operacional deve ser o Windows 95 ou o Windows 98.

A não ser, claro, que exista um Windows 9.

Parece que muitos programadores não acharam que existiria outra versão “Windows 9x”, ou não se importaram de preparar seu software para o futuro. Infelizmente, isso é muito comum, especialmente em código Java:

Reprodução

Quem tem alguma experiência em programação sabe que há um jeito melhor de fazer isso: detectando a versão do kernel. O Vista é 6.0; o Windows 7 é 6.1; o Windows 8 é 6.2; o Windows 8.1 é 6.3; e o Windows 10 é 6.4 – isso sem contar as versões para servidor. (Você pode checar a versão digitando “winver” no menu Iniciar e teclando Enter.)

Ou seja, se seu programa é compatível com Windows 7 ou superior, basta permitir que ele rode em kernel de versão 6.1 ou superior. No entanto, até isso causa problemas.

Em 2011, Uday Shivaswamy disse na conferência Build que a Microsoft testou seis mil programas para identificar o efeito de mudar a versão do kernel de 6.1 (Windows 7) para 6.2 (Windows 8). Dos programas testados, 400 deles (7%) “falhavam instantaneamente”, seja na hora de instalar, seja na hora de rodar. E a Microsoft não podia fazer nada: cada programa precisava de uma solução diferente.

Chamar o próximo sistema operacional de Windows 9, então, traria dois problemas: uma versão diferente do kernel, e um nome que poderia ser confundido com Windows 95/98 por causa de um código preguiçoso.

Esta teoria é bastante sólida, mas provavelmente nunca saberemos se ela é real. A Microsoft apenas diz em comunicado que o Windows 10 “não é uma mudança incremental, e sim um novo Windows que irá capacitar o próximo bilhão de usuários”.

O Windows 7 também causou uma polêmica por causa do nome. Como a Microsoft contou até sete? A empresa explicou na época que o “Windows 4″ são as versões 95/NT 4.0/98/Me. O “Windows 5″ é o Windows 2000/XP/Server 2003/Home Server. E o “Windows 6″ é o Vista e Server 2008. [Reddit via Extremetech]

O post A explicação mais sensata para a Microsoft não chamar seu próximo OS de “Windows 9″ apareceu primeiro em Gizmodo Brasil.








07 Oct 12:10

Mãe luta para salvar vida de filho baleado por policiais


Os dois amigos, moradores de Americanópolis, bairro pobre na periferia sul de São Paulo, estavam a caminho de uma festa que não sabiam direito onde era, na madrugada de 31 de agosto. Valter de Assis Rocha, 20 anos, dirigia a moto, levando Alexandre Barreto dos Anjos, 19, na garupa. Seguiam um carro onde estavam outros seis amigos. Na avenida Roque Petrônio Júnior, a moto acabou ficando para trás, após receber o “enquadro” de uma viatura da PM.

Os dois jovens de Americanópolis se perderam e foram parar na Rua Jayme de Almeida Paiva, uma via nobre do bairro do Morumbi, cheia de mansões protegidas atrás de muros altos com trepadeiras e cercas eletrificadas. Viram um Voyage prata estacionado, com os faróis acesos, e se aproximaram para pedir informações. Dentro do automóvel, estavam dois policiais militares de folga. Quando viram a moto se aproximando, os PMs, sem dizer nada, atiraram de dentro do carro na direção dos meninos.

Mesmo baleados, os rapazes correram, ouvindo os tiros explodindo às suas costas. Bateram nos portões das mansões e gritaram por socorro, mas ninguém abriu. Tombaram em uma viela. Caído no chão, Valter permaneceu imóvel, respiração presa, tentando se fingir de morto. Seu amigo morreu ao seu lado. Ouviu os PMs se aproximarem e comentarem se valia a pena tirar foto dos baleados para “postar no Whatsapp”. Percebendo que o menino estava vivo, cutucaram seu corpo e perguntaram se estava armado. “Vamos embora que o Resgate está chegando, deixa ele morrer”, um dos PMs falou, antes de se afastar.

Dez minutos depois, Valter ouviu alguém se aproximando. “Vocês ainda estão aqui? Para com isso, me mata logo”, pediu. “Por que te matar? Eu sou bombeiro”, ouviu uma voz responder. Abriu os olhos . “Não me deixa morrer, pelo amor de Deus”, pediu ao bombeiro. Alguém tirou um barato, dizendo que Valter não havia pensado em Deus na hora de assaltar. “Eu não assaltei ninguém”, respondeu. E apagou.

Valter mostra a bolsa de colostomia: “risco de infecção”, segundo a Defensoria

Foi essa a história que a cabeleireira Márcia Eulália, 38 anos, ouviu da boca de seu filho Valter. E acreditou nela. “Ele sempre foi trabalhador”, afirma. Faz um mês que essa mulher abandonou o emprego e passou a viver para provar a inocência do filho. Junto com amigos e parentes de Valter e Alexandre, organizou uma manifestação no vão livre do Masp, na avenida Paulista, uma semana após o crime. Passa seus dias conversando com policiais, defensores públicos, advogados, militantes de direitos humanos, políticos e jornalistas, andando de um lado para outro com a bolsa cheia de cópias de laudos médicos, petições e boletins de ocorrência. Em duas semanas, perdeu dez quilos. “Tudo o que quero é ter meu filho de volta em casa”, diz.

Valter responde na Justiça por tentativa de latrocínio.

A polícia e o Ministério Público contam uma história diferente. Os PMs Marcelo Querino de Souza, 35 anos, e Homero Eduardo Bueno Brito, 26, que mataram Alexandre e feriram Valter, disseram que reagiram à bala porque a dupla tentou assaltá-los. A versão foi aceita pelo delegado Daniel Aparecido Viudes, do 89º DP, que considerou o morto e o ferido como suspeitos do crime. O Ministério Público concordou com as conclusões do inquérito policial e ofereceu denúncia contra Valter por tentativa de latrocínio, aceita pela Justiça.

Parentes e amigos de Valter e Alexandre protestaram em 7 de setembro

Parentes e amigos de Valter e Alexandre protestaram em 7 de setembro. Crédito: Arquivo Pessoal

Nos últimos dias, Márcia se agarrou a uma nova luta. Mais do que brigar pela libertação do filho, ela vem lutando para garantir que Valter sobreviva ao sistema penitenciário paulista. Atingido por cinco tiros, ele foi submetido a uma cirurgia, no Hospital das Clínicas, que removeu seu reto e parte do seu intestino. Hoje, vive com uma bolsa de colostomia, que precisa ser trocada uma vez por semana. Após receber alta do hospital, em 15 de setembro, foi enviado para uma enfermaria do CDP (Centro de Detenção Provisória) Belém I, onde, segundo a mãe, passou a sofrer com a falta de estrutura local. “Eles não dão os remédios que meu filho precisa e não têm bolsas de colostomia para trocar. Tive que levar duas bolsas para ele”, conta. Após visitar o filho, no último final de semana, Márcia saiu do CDP preocupada: “Ele está abatido e sente dores”.

Policiais negam “bico” e disse que iam encontrar “algumas meninas”.

“Diante da falta de estrutura material e humana do CDP e também em virtude de Valter não ter sido conduzido ao Hospital das Clínicas para retorno pós-cirúrgico, o risco de infecção é grande”, afirma a defensora pública Isadora Brandão Araújo da Silva, no texto de uma petição enviada à Justiça em que pede a conversão da prisão preventiva do rapaz em domiciliar. Para a defensora, manter Valter no presídio “constitui uma afronta ao princípio da dignidade da pessoa humana”. O pedido foi recebido por um juiz da 12ª Vara Criminal de São Paulo, que pediu um posicionamento do Ministério Público antes de tomar uma decisão.

Procurada, a a assessoria de imprensa Secretaria da Administração Penitenciária informou que “a unidade está agendando o retorno do paciente Valter de Assis Rocha ao Hospital das Clínicas, aguardando apenas a definição de data para consulta”. A SAP não explicou por que o paciente não fez o retorno na data combinada, nem disse quando será a nova consulta. Mas afirmou que o preso está bem. “Observamos ainda que o reeducando se encontra clinicamente estável, com acompanhamento diário da equipe de saúde do CDP”, afirmou. A SAP também disse que os remédios para os presos na enfermaria são “distribuídos diariamente”.

Mentira

O pedido de prisão domiciliar para Valter, feito pela Defensora Público, é subsidiário. O pedido principal da defensora é pela revogação da prisão preventiva de Valter e pelo direito de responder ao processo em liberdade. “A polícia não apresentou provas materiais de que ele tenha tentado roubar os policiais”, afirmou a defensora. Além disso, há indícios de que os policiais mentiram em seu depoimento, ao negar que estivessem fazendo um “bico” como seguranças para os moradores do Morumbi no momento em que atiraram nos rapazes.

IMG-20141001-WA0007

Valter aguarda resposta da Justiça para seu pedido de revogação da prisão preventiva

Segundo o Boletim de Ocorrência, os PMs Marcelo e Homero, que trabalham na Força Tática do 33º Batalhão, em Carapicuíba, na Grande São Paulo, e estavam de folga na madrugada de 31 de agosto, disseram que foram à capital para encontrar “algumas meninas” que haviam conhecido na internet, mas não souberam dizer o nome de nenhuma. O mesmo boletim, contudo, afirma que o carro em que os policiais estavam pertence à GPS Serviços de Portaria. O site da Junta Comercial do Estado de São Paulo informa que a empresa pertence a dois sócios: Andrea Cristina Batista Bueno e Eduardo Bonifácio Bueno, que têm o mesmo sobrenome de Homero. Além disso, Eduardo (informa o Diário Oficial) é investigador da Polícia Civil. “Essas inconsistências nos depoimentos dos policiais colocam em xeque toda a versão apresentada por eles para a ocorrência”, afirma a defensora Isadora. Além do mais, ela sempre que uma das testemunhas do crime disse não ter visto armas nas mãos de Valter e Alexandre.

Segundo a versão dos policiais, eles teriam parado o carro na rua para consultar o GPS (o aparelho de localização, não a empresa). Nesse momento, foram abordados por Valter e Alexandre, que chegaram de moto dizendo “perdeu, perdeu, perdeu”. “Tanto o piloto da moto como o garupa portavam ostensivamente arma de fogo”, afirma o texto do boletim. Os PMs afirmam que “se não reagissem, teriam sido alvejados por disparos provenientes dos roubadores”. Alexandre morreu no local e Valter foi levado pelo Resgate ao Hospital das Clínicas.

A polícia apreendeu duas armas que seriam dos suspeitos: uma pistola 380, que estaria com Alexandre, e uma pistola de pressão, que seria de Valter. Ambas foram levadas até a delegacia pelos próprios PMs que atiraram na dupla.

A Ponte procurou a assessoria de imprensa da Secretaria da Segurança Pública e recebeu, como resposta, apenas isso: “A Polícia Civil informa que por se tratar de um flagrante o caso já foi encaminhado à Justiça no dia 03/09/2014″. As outras questões foram ignoradas.

Veja perguntas que a Secretaria da Segurança Pública não respondeu:

1. A Corregedoria da PM também abriu inquérito para investigar o crime?
2. A SSP já sabe dizer se, na hora do crime, os policiais estavam fazendo bico para a GPS Serviços de Portaria, pertencente ao investigador de 2ª classe Eduardo Bonifácio Bueno?
3. Os policiais usaram armas da corporação na ocorrência?

Expanded from Ponte by Feed Readabilitifier.
07 Oct 12:04

Pick a fund, any fund…

by Tim Harford
Undercover Economist

Most active managers do not manage to outperform passive funds – particularly not when their fees are deducted

The supermarket checkout poses a frustrating puzzle. Which line to choose? The one with fewest people? Pah! An amateur’s mistake. One must first look at the number of goods in each shopping trolley to get a sense of how long each person in the queue will take. Elevating the analysis a little further, consider awkward items such as crisps (hard to read the barcode), fruit and vegetables (which must be weighed), alcohol (requiring proof of age). A still higher form of thought is to evaluate the shoppers themselves. Will they fiddle for change? Pull out a cheque book or a wad of coupons and vouchers? If so, avoid.

Yet expending all this mental energy is the mark of a mediocre mind. The truly sophisticated thinker – an economist, for example – knows that there is no need to waste effort. Since others are keenly searching for the shortest queue, there won’t be a shortest queue at all. Each opportunity will immediately be filled, and each line will on average take the same amount of time. Pick a queue at random. Any will do, for they are all much the same.

This is also the case for passive investment. Why spend time carefully choosing assets to buy, or lavishly paying active fund managers to do the job for you, when every asset’s expected risk-adjusted return is the same?

All this assumes something rather important: that the risk-adjusted return (or the length of the queues) is indeed the same. Or at least that such returns look so similar to the trained eye that it is pointless to try to pick a winner. Another phrase to describe this idea is the “efficient markets hypothesis”. It is often viewed with suspicion because it sounds a bit Reaganite; in fact, it simply means you shouldn’t be too impressed by people who offer you stock tips.

We don’t know for sure that all financial assets have the same expected returns after appropriate adjustments for risk, partly because it is not clear what an appropriate adjustment for risk would be. It seems likely that they’re not far off.

One indicator of this is the performance of actively managed investment funds versus passive funds, which simply try to track some sector or market as a whole. Most active managers in most time periods do not manage to outperform passive funds – particularly not when their fees are deducted. As a matter of arithmetic, the average investor cannot beat the market because the market is the average of all the investors. But we might still expect that skilled active managers would consistently beat the average, and most of them cannot. Apparently skilled active managers often see their performance ebb over time, and for every Warren Buffett there are many one-hit wonders in the investment world.

What is more, active management is expensive. Even if you believe that an adviser could pick a faster-than-average supermarket queue to join, you might well be worse off pausing for a couple of minutes to take this advice, rather than choosing randomly without delay.

Active managers will have us believe otherwise, and occasional bunfights break out over whether actively managed funds are quite as bad as they seem but, for me, the logic in favour of passive investing is persuasive and the data even more so.

As this insight becomes better and better publicised, traditional fund managers are losing market share to low-cost exchange traded funds (ETFs) and, at the luxury end, to private equity groups. (The attraction of private equity is that you don’t shop in the supermarket at all. Whether the personal service at the delicatessen is actually worth what it costs is another question.)

I must confess, though, to a twinge of guilt – not a common emotion for the working economist. By passively investing or randomly choosing a supermarket queue, am I not taking advantage of the hard work of others? If everybody chose the first queue or investment that they came across, there would be no reason to expect a happy outcome. It is only because others are taking such pains to choose that I don’t have to bother.

This insight has become known as the Grossman-Stiglitz paradox, after Sanford Grossman and Nobel Memorial Prize winner Joseph Stiglitz, who back in 1980 published a paper pointing out that if financial markets were efficient, there was no benefit in paying for any sort of research or analysis; yet if nobody paid for any sort of research or analysis, why on earth would financial markets be efficient?

We passive investors like to congratulate ourselves on avoiding those parasites, the active fund managers, who charge high fees without delivering high returns. Yet we are parasites too, waiting for others to pay for research and then following the herd. Little fleas have lesser fleas, and so on, ad infinitum.

Passive investors shouldn’t feel too badly, though. This is a self-correcting problem. If most investors switched to passive funds, or picked supermarket queues at random, the market would be full of obvious errors and an active approach would pay off again.

I am beginning to make a study of supermarket queues already. It’s just a hobby – for now.

Also published at ft.com.

07 Oct 11:58

Karesansui (2014)

Here's a night version of my updated "Karesansui". I stuck with the original lighting scene (rather than adding visible lanterns) as I wanted to keep the focus on the foreground. Let me know what you think!!

07 Oct 11:57

Indian election win threatens biggest biometrics bank - tech - 20 May 2014 - New Scientist

A schoolgirl arriving for class presses her thumb against a fingerprint scanner, verifying her presence. Since April, this has been the scene at a handful of schools in the state of Jharkhand in eastern India. There, the attendance of students and teachers has been tracked using biometrics that are linked with India's huge national database, Aadhaar. It is the world's largest biometrics database, but now it is under threat.

Started in 2009, Aadhaar holds the fingerprints, iris and facial scans of 600 million Indians. Besides school attendance, the database is used to provide natural gas subsidies to India's rural poor, and to send wages directly to people's bank accounts. It is a way of providing identification to people who may not even have a birth certificate, and has been trumpeted by the national government as a way to stamp out fraud.

Aadhaar was the flagship programme of India's Congress Party, which lost to Narendra Modi's Bharatiya Janata Party (BJP) on 16 May in the country's general elections (see "A social election"). The BJP slammed Aadhaar in the run up to the election, calling it a failure and a waste of money. "They've been speaking out against it publicly," says Reetika Khera, an economist at the Indian Institute of Technology in Delhi. "They've been trashing it."

India isn't the only developing country with a national biometrics programme. There are more than 1 billion people enrolled in biometrics schemes across the developing world. Governments claim the systems are filling an "identification gap" left by a lack of official documentation, such as birth certificates, that citizens of rich countries take for granted.

Privacy advocates see such systems as causing a power imbalance between governments and citizens. In 2012, the Electronic Frontier Foundation criticised Argentina's SIBIOS system for "opening the door to widespread privacy violations".

Aadhaar's greatest promise was to reduce fraudulent claims of government welfare payments, says Khera. It aimed to cut corrupt middlemen out of India's right to work scheme, through which all residents are guaranteed 100 days' work a year, paid at minimum wage.

"In the old system someone would work 20 days, but the person at the work site who marks attendance would add another zero and make it look like they've worked 200 days," says Khera. "A higher official would make the payment and they'd share the booty, then he'd give a person 20 days' pay and make them sign for the whole 200."

Direct payments to bank accounts associated with Aadhaar do indeed fix the immediate problem of fraud, by preventing fraudsters from stealing someone's identity and setting up false accounts in their name. Without biometrics, "I don't even know that the bad guys are withdrawing my money", Khera says. "Now you need my fingerprint to authenticate."

But it hasn't worked out as planned, because new problems have sprung up. Corrupt administrators who inflate work claims can simply coerce a worker to withdraw the fraudulent payments from their account, or invite the worker to join them in the scheme.

Malavika Jayaram, a privacy researcher at Harvard University, says Aadhaar makes people who are vulnerable take responsibility for preventing fraud.

"You are shifting the burden of responsibility onto the person who is weakest in the chain, expecting the least sophisticated in the system to make sound technical decisions about when to use biometrics," she says. "It's insane."

There are other problems with relying on biometrics to deliver vital services. People's faces and irises change as they age, and some 15 per cent of people in India have had their fingerprints rubbed off through manual labor. As a result, the Unique Identity Authority (UID) of India, which runs Aadhaar, wants data to be entered into the database at birth, but then have people update their biometrics once they are older. This gives them an opportunity to create a fake identity.

"There are kids who have gone and registered three or four times," says Jayaram, adding that people have managed to get their dogs' faces, rather than their own, registered in the database, or pictures of zombies. These are just spoofs, but they show that the system is vulnerable to fakes that could be used fraudulently.

And if someone breaks into Aadhaar and steals biometric data, it's very hard to correct. "With other security systems, if someone gets your password you can change it," says Khera. But you can't make a quick change to your irises or fingerprints.

The Indian Supreme Court has taken a stand against Aadhaar too. In February, the court ruled that the government cannot make it compulsory to join the biometric database in order to use a government service. Aadhaar has always been advertised as a voluntary database, but the ruling took the wind out of the UID's sails, says Khera.

Jayaram is conflicted. In a country with no data protection laws, she says such a pervasive government-run system does not serve the people. Yet it could, if legislation were passed that guards the privacy of the citizens Aadhaar was designed to serve. "Two years ago I would have said I just want the project to die," she says. "Now I say, 'How can we make it better?'"

This article will appear in print under the headline "The eyes have it"

A social election

Narendra Modi's Bharatiya Janata Party won a historic victory last week. The planet's largest democracy cast 528 million votes, sweeping him to victory over the incumbent Congress Party by the largest margin in an Indian election since 1984.

Some 243 million Indians now have access to the internet, and with tens of millions of them on Facebook and Twitter, the candidates made heavy use of social media.

Modi is known for his active online presence – he has more than 4 million followers on Twitter, and in November 2012 he gave a speech concurrently in 26 locations across India using a holographic projection of himself.

If you would like to reuse any content from New Scientist, either in print or online, please contact the syndication department first for permission. New Scientist does not own rights to photos, but there are a variety of licensing options available for use of articles and graphics we own the copyright to.

Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
07 Oct 11:37

constantbullshitting: oilauren: "I looked at my hand and my...



constantbullshitting:

oilauren:

"I looked at my hand and my little finger was gone – the bone was sticking out. It’s the weirdest feeling; one second you’re fine and your little finger is there, and the next second it’s gone. It shoves reality up your backside. I was in so much pain and shock that the first thing that hit my head was the beat and the bass. The bass was hard, so I just ripped off my top, wrapped it around my finger and tied it up as tight as I could and skanked it out for half an hour. My mentality was, ‘I’ve only been here for an hour, I’ve paid £10 for this night, I’ve lost my little finger – am I seriously going to go? Nah, I’m going to skank until I can’t skank any more.’ After that, my mate dragged me down to the paramedics."

Friends later told him that a “bunch of stoners found [his] little finger and were playing catch with it.”

now THAT’S what i call a party

07 Oct 11:36

Photo



07 Oct 11:16

Congresso eleito é o mais conservador desde 1964, afirma Diap - Política - Estadão

Eleições 2014

Nivaldo Souza e Bernardo Caram - O Estado de S. Paulo

06 Outubro 2014 | 19h 46

Políticos conservadores se consolidaram como maioria, de acordo com o Departamento Intersindical de Assessoria Parlamentar (Diap)

BRASÍLIA - Apesar das manifestações de junho de 2013 - carregadas com o simbolismo de um movimento popular por renovação política e avanço nos direitos sociais - o resultado das eleições do último domingo, 5, revelou uma guinada em outra direção. Parlamentares conservadores se consolidaram como maioria na eleição da Câmara, de acordo com levantamento do Departamento Intersindical de Assessoria Parlamentar (Diap). 

O aumento de militares, religiosos, ruralistas e outros segmentos mais identificados com o conservadorismo refletem, segundo o diretor do Diap, Antônio Augusto Queiroz, esse novo status. "O novo Congresso é, seguramente, o mais conservador do período pós-1964", afirma. "As pessoas não sabem o que fazem as instituições e se você não tem esse domínio, é trágico", avalia.

Ele acredita que a tensão criada pelo debate de pautas como a legalização do casamento gay e a descriminalização do aborto deve se acirrar no Congresso, agora com menos influência de mediadores tradicionais, que não conseguiram de reeleger. "No caso da Câmara, muitos dos parlamentares que cuidavam da articulação (para evitar tensões) não estarão na próxima legislatura. Algo como 40% da 'elite' do Congresso não estará na próxima legislatura, seja porque não conseguiram se reeleger ou disputaram outros cargos. Houve uma guinada muito grande na direção do conservadorismo", diz.

O levantamento do Diap mostra que o número de deputados ligados a causas sociais caiu, drasticamente, embora os números totais ainda estejam sendo calculados. A proporção da frente sindical também foi reduzida quase à metade: de 83 para 46 parlamentares. Junto com a redução desses grupos, o aborto, o casamento entre pessoas do mesmo sexo e a descriminalização das drogas - temas que permearam os debates no primeiro turno da disputa presidencial - têm poucas chances de serem abordados pelo Congresso eleito, que tomará posse em fevereiro de 2015.

"Posso afirmar com segurança que houve retrocesso em relação a essas pautas. Se no atual Congresso houve dificuldade para que elas prosperassem, no próximo isso será muito mais ampliado. Houve uma redução de quem defendia essa pauta no Parlamento e praticamente dobrou (o número de) quem é contra", diz. 

Parte consistente do conservadorismo, segundo Queiroz, virá da bancada evangélica. Ele estima que o número de religiosos desta corrente deve crescer em relação aos 70 deputados eleitos em 2010. "A bancada evangélica vai ficar um pouquinho maior, mas com uma diferença: nomes de maior peso dentro das igrejas para melhor coordenar e articular os interesses desse segmento junto ao Congresso", diz. Entre essas lideranças, o Diap já identificou 40 bispos e pastores.

Militares. O Diap também estima um aumento consistente de policiais e militares eleitos. Queiroz prevê que o aumento de parlamentares com este perfil deve chegar a 30%. "Esse grupo, necessariamente, vai fazer parte da 'bancada da bala', porque defende a defesa individual", diz, referindo-se ao lobby da indústria armamentista.

A ampliação desse grupo é uma onda que veio na contramão das manifestações populares de 2013. "Isso é produto da alienação. Quem foi para rua, em grande medida, foi pedindo mudanças. Mas sem ter uma liderança capaz direcionar e coordenar (o movimento). Era 'contra tudo o que está aí'."

Queiroz considera que, caso o candidato do PSDB, Aécio Neves, seja eleito, temas como a redução da maioridade penal, considerada uma proposta conservadora, podem avançar facilmente no Congresso. "O PSDB perdeu em quantidade (reduziu de 12 para 10 o número de senadores), mas é uma bancada que se renova do ponto de vista qualitativo. Só que com viés conservador", diz.

Eleições 2014
Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
07 Oct 04:42

Latin America’s Korean dream

Adam Victor Brandizzi

Não ficou inline mas é um ótimo artigo.

Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
07 Oct 03:22

Refactoring Ruby with Monads

Okay, that’s enough priming of your brain. Let’s do some refactoring.

Handling nil

First, I’d like to look at some code that has to deal with nils.

Imagine that we have a project management application with different kinds of models:

Project = Struct.new(:creator)
Person  = Struct.new(:address)
Address = Struct.new(:country)
Country = Struct.new(:capital)
City    = Struct.new(:weather)

Each Project has a Person who created it; each Person has an Address; each Address has a Country; each Country has a capital City; and each City has weather information, which, for the sake of simplicity, is just a string.

Let’s say that we want to display the weather next to each project in our user interface (for some reason). That involves traversing all these associations. Here’s a method that does that:

def weather_for(project)
  project.creator.address.
    country.capital.weather
end

(Maybe you’ve written similar Rails view helpers before. There are lots of reasons not to write code like this, but there are also perfectly good reasons to do it, and anyway, people will always write code like this no matter what we say.)

If we make a city which has sunny weather, and a country which has that city as its capital, and an address in that country, and a person with that address, and a project created by that person…

>> city = City.new('sunny')
=> #<struct City …>

>> country = Country.new(city)
=> #<struct Country …>

>> address = Address.new(country)
=> #<struct Address …>

>> person = Person.new(address)
=> #<struct Person …>

>> project = Project.new(person)
=> #<struct Project …>

…then we can pass that project into #weather_for and it works fine:

>> weather_for(project)
=> "sunny"

But if we make a bad project, for example by providing an address that has no country, #weather_for blows up:

>> bad_project = Project.new(Person.new(Address.new(nil)))
=> #<struct Project …>

>> weather_for(bad_project)
NoMethodError: undefined method `capital' for nil:NilClass

Tony Hoare invented nil in 1965; he now calls it his “billion-dollar mistake”, which has “probably caused a billion dollars of pain and damage”. This is exactly the sort of thing he’s talking about.

Well, they may be a mistake, but Ruby has nils, so we’re stuck with them. To make #weather_for tolerate nils, we’re going to have to explicitly check for them.

First we need to introduce local variables to hold every intermediate result…

def weather_for(project)
  creator = project.creator
  address = creator.address
  country = address.country
  capital = country.capital
  weather = capital.weather
end

…and then check each intermediate result before we try to call a method on it:

def weather_for(project)
  unless project.nil?
    creator = project.creator
    unless creator.nil?
      address = creator.address
      unless address.nil?
        country = address.country
        unless country.nil?
          capital = country.capital
          unless capital.nil?
            weather = capital.weather
          end
        end
      end
    end
  end
end

(While we’re at it, we might as well include the possibility that the project itself is nil.)

The method body is starting to drift right and become a pyramid of doom, but luckily it works the same if we flatten it:

def weather_for(project)
  unless project.nil?
    creator = project.creator
  end

  unless creator.nil?
    address = creator.address
  end

  unless address.nil?
    country = address.country
  end

  unless country.nil?
    capital = country.capital
  end

  unless capital.nil?
    weather = capital.weather
  end
end

This code works, but it’s pretty clumsy, and it’s hard to remember to do something like this every time we might possibly have nils to deal with.

Fortunately, Ruby on Rails has a solution to this problem. Rails (actually Active Support) monkey patches Object and NilClass with a method called #try, which delegates to #public_send if the object’s not nil, and returns nil otherwise:

class Object
  def try(*a, &b)
    if a.empty? && block_given?
      yield self
    else
      public_send(*a, &b) if respond_to?(a.first)
    end
  end
end

class NilClass
  def try(*args)
    nil
  end
end

When every object has a #try method, instead of doing these nil checks ourselves, we can let #try do it for us:

def weather_for(project)
  creator = project.try(:creator)
  address = creator.try(:address)
  country = address.try(:country)
  capital = country.try(:capital)
  weather = capital.try(:weather)
end

Now we’re back to just chaining method calls together, so we can take the local variables out again:

def weather_for(project)
  project.
    try(:creator).
    try(:address).
    try(:country).
    try(:capital).
    try(:weather)
end

This is good as it gets right now — better than the version with “unless nil?” all over the place, at least. Can we do any better?

Well, monkey patching has its place, but monkey patching every single object in the system isn’t great. It’s kind of a code smell, so let’s not do it.

When we want to add a method to an object, the good object-oriented programming solution is to use decoration, where we non-invasively add functionality to one object by wrapping it up inside another object.

Let’s make a decorator class, Optional, whose instances have a single attribute called value:

Optional = Struct.new(:value)

Instances of this class just wrap up another value. We can wrap a value like 'hello', then take 'hello' out again later:

>> optional_string = Optional.new('hello')
=> #<struct Optional value="hello">

>> optional_string.value
=> "hello"

If the value we put in happens to be nil, we get nil out later:

>> optional_string = Optional.new(nil)
=> #<struct Optional value=nil>

>> optional_string.value
=> nil

So now, instead of putting the #try method on Object, let’s put it on Optional:

class Optional
  def try(*args, &block)
    if value.nil?
      nil
    else
      value.public_send(*args, &block)
    end
  end
end

If the value attribute is nil, #try just returns nil, otherwise it sends the appropriate message to the underlying object.

Now we can call #try on the decorator and it’ll call the method on the underlying object as long as it’s not nil:

>> optional_string = Optional.new('hello')
=> #<struct Optional value="hello">

>> length = optional_string.try(:length)
=> 5

If the value inside the Optional is nil, #try will just return nil:

>> optional_string = Optional.new(nil)
=> #<struct Optional value=nil>

>> length = optional_string.try(:length)
=> nil

So instead of calling #try on the actual project object, and then on the actual person object, and so on…

def weather_for(project)
  creator = project.try(:creator)
  address = creator.try(:address)
  country = address.try(:country)
  capital = country.try(:capital)
  weather = capital.try(:weather)
end

…we can write the method like this:

def weather_for(project)
  optional_project = Optional.new(project)
  optional_creator = Optional.new(optional_project.try(:creator))
  optional_address = Optional.new(optional_creator.try(:address))
  optional_country = Optional.new(optional_address.try(:country))
  optional_capital = Optional.new(optional_country.try(:capital))
  optional_weather = Optional.new(optional_capital.try(:weather))
  weather          = optional_weather.value
end

First we decorate project with an Optional object, and call #try on that. Then we decorate the result, which might be nil, and call #try again. Then we decorate the next result, and call #try on that, and so on. At the end, we pull out the value and return it.

It’s unwieldy, but hey, at least we’re not monkey patching every object in the system.

There’s another code smell here: #try does too much. We actually just wanted to refactor away the nil check, but #try also sends the value a message. What if we want to use the value in some other way when it’s not nil? Our #try method is overspecialised; it has too much responsibility.

Instead of hard-coding the else clause inside #try, let’s allow its caller to supply a block that controls what happens next:

class Optional
  def try( &block )
    if value.nil?
      nil
    else
      block.call(value) 
    end
  end
end

Now we can pass a block to #try, and do whatever we want with the underlying value: send it a message, or use it as an argument in a method call, or print it out, or whatever. (This ability to supply a block is actually a little-used feature of Active Support’s #try too.)

So now, instead of calling #try with a message name, and having to remember that it’s going to send that message to the underlying object, we call it with a block, and in the block we send the message ourselves and decorate the result in an Optional:

def weather_for(project)
  optional_project = Optional.new(project)
  optional_creator = optional_project.try { |project| Optional.new(project.creator) }
  optional_address = optional_creator.try { |creator| Optional.new(creator.address) }
  optional_country = optional_address.try { |address| Optional.new(address.country) }
  optional_capital = optional_country.try { |country| Optional.new(country.capital) }
  optional_weather = optional_capital.try { |capital| Optional.new(capital.weather) }
  weather          = optional_weather.value
end

And we’re now able to do whatever we want with the value, like print it out in a log message.

That works fine when there aren’t any nils, but unfortunately we’ve broken it when nils are involved, because we’re returning nil when the block doesn’t run:

>> weather_for(project)
=> "sunny"

>> weather_for(bad_project)
NoMethodError: undefined method `capital' for nil:NilClass

That’s easy to fix. Instead of returning a raw nil, we’ll decorate it with an Optional first:

class Optional
  def try(&block)
    if value.nil?
      Optional.new(nil) 
    else
      block.call(value)
    end
  end
end

And now it works in both cases:

>> weather_for(project)
=> "sunny"

>> weather_for(bad_project)
=> nil

But there’s a new code smell: I don’t think #try is a great name any more, because we’ve changed it to do something more general than, or at least something different from, the main use case of its Active Support namesake.

Let‘s rename it to #and_then:

class Optional
  def and_then (&block)
    if value.nil?
      Optional.new(nil)
    else
      block.call(value)
    end
  end
end

Because it really just says, “start with this decorated value, and then do some arbitrary thing with it, as long as it’s not nil”.

Here’s the new version of #weather_for, which calls #and_then instead of #try:

def weather_for(project)
  optional_project = Optional.new(project)
  optional_creator = optional_project. and_then { |project| Optional.new(project.creator) }
  optional_address = optional_creator. and_then { |creator| Optional.new(creator.address) }
  optional_country = optional_address. and_then { |address| Optional.new(address.country) }
  optional_capital = optional_country. and_then { |country| Optional.new(country.capital) }
  optional_weather = optional_capital. and_then { |capital| Optional.new(capital.weather) }
  weather          = optional_weather.value
end

And because we’re just chaining #and_then calls, we can get rid of the local variables again:

def weather_for(project)
  Optional.new(project).
    and_then { |project| Optional.new(project.creator) }.
    and_then { |creator| Optional.new(creator.address) }.
    and_then { |address| Optional.new(address.country) }.
    and_then { |country| Optional.new(country.capital) }.
    and_then { |capital| Optional.new(capital.weather) }.
    value
end

This is verbose but nice: we decorate the (possibly nil) project in an Optional object, then safely traverse all the associations, then pull the (possibly nil) value out again at the end.

Phew, okay. How’s our refactoring going?

Well, we might not be monkey patching anything, and it’s conceptually clean, but there’s a huge final smell: nobody wants to write code like this! In theory it might be better than Active Support’s #try method, but in practice it’s worse.

But we can add some syntactic sugar to fix that. Here’s a definition of #method_missing for Optional:

class Optional
  def method_missing(*args, &block)
    and_then do |value|
      Optional.new(value.public_send(*args, &block))
    end
  end
end

It uses #and_then to delegate any message to the underlying value whenever it’s not nil. Now we can replace all of the “and_then … Optional.new” stuff with just normal message sends, and let #method_missing take care of the details:

def weather_for(project)
  Optional.new(project).
    creator.address.country.capital.weather.
    value
end

This is actually really good! You can see very clearly that we wrap up the possibly-nil project into an Optional, then safely perform our chain of method calls, then pull the possibly-nil weather out of an Optional at the end.

To recap, here’s the full definition of Optional:

Optional = Struct.new(:value) do
  def and_then(&block)
    if value.nil?
      Optional.new(nil)
    else
      block.call(value)
    end
  end

  def method_missing(*args, &block)
    and_then do |value|
      Optional.new(value.public_send(*args, &block))
    end
  end
end

We designed an object which stores a value that might be nil, and a method called #and_then which encapsulates the nil-check logic. We added some sugar on top by writing #method_missing. (If this was production code, we should remember to implement #respond_to? as well.)

I’d like to very briefly point out that we only need to do the decorating and undecorating for compatibility with the rest of the system. If the rest of the system passed in an Optional and expected us to return one, we wouldn’t even need to do that:

def weather_for(project)
  project.creator.address.
    country.capital.weather
end

And then we wouldn’t have to remember to check for nil at all! We could write the method the way we did in the first place and it would just work. Imagine that.

Multiple results

Alright, that refactoring was very detailed. We’re going to do two more, but we’ll skip the detail to keep things manageable. Let’s refactor some code that has to handle multiple results.

Imagine we have a content management application with different kinds of models:

Blog     = Struct.new(:categories)
Category = Struct.new(:posts)
Post     = Struct.new(:comments)

There are several Blogs; each Blog has many Categorys; each Category has many Posts; and each Post has many comments, which, for the sake of simplicity, are just strings.

Let’s say that we want to fetch all the words from all the comments within certain blogs (for some reason). That involves traversing all these associations.

Here’s a method that does that:

def words_in(blogs)
  blogs.flat_map { |blog|
    blog.categories.flat_map { |category|
      category.posts.flat_map { |post|
        post.comments.flat_map { |comment|
          comment.split(/\s+/)
        }
      }
    }
  }
end

At each level we map over a collection and traverse the association for each object inside it. When we reach each comment, we split it on whitespace to get its words. We have to use #flat_map because we want a flattened array of words instead of a nested one.

If we make a couple of blogs, which each have a couple of categories, which contain some posts, which have some comments, which contain some words…

blogs = [
  Blog.new([
    Category.new([
      Post.new(['I love cats', 'I love dogs']),
      Post.new(['I love mice', 'I love pigs'])
    ]),
    Category.new([
      Post.new(['I hate cats', 'I hate dogs']),
      Post.new(['I hate mice', 'I hate pigs'])
    ])
  ]),
  Blog.new([
    Category.new([
      Post.new(['Red is better than blue'])
    ]),
    Category.new([
      Post.new(['Blue is better than red'])
    ])
  ])
]

…then #words_in can extract all of the words:

>> words_in(blogs)
=> ["I", "love", "cats", "I", "love", "dogs", "I",
    "love", "mice", "I", "love", "pigs", "I",
    "hate", "cats", "I", "hate", "dogs", "I",
    "hate", "mice", "I", "hate", "pigs", "Red",
    "is", "better", "than", "blue", "Blue", "is",
    "better", "than", "red"]

But #words_in has a bit of a pyramid of doom going on, plus it’s hard to distinguish between the code doing actual work and the boilerplate of dealing with multiple values.

We can clean it up by introducing a class, Many, whose instances decorate a collection of values:

Many = Struct.new(:values) do
  def and_then(&block)
    Many.new(values.map(&block).flat_map(&:values))
  end
end

Like Optional, Many has an #and_then method that takes a block, but this time it calls the block for every value in the collection and flattens the results together.

Now we can replace all of #words_in’s calls to #flat_map with instances of Many and calls to #and_then:

def words_in(blogs)
  Many.new(blogs).and_then do |blog|
    Many.new(blog.categories).and_then do |category|
      Many.new(category.posts).and_then do |post|
        Many.new(post.comments).and_then do |comment|
          Many.new(comment.split(/\s+/)) 
        end
      end
    end
  end.values
end

Now we can flatten the pyramid…

def words_in(blogs)
  Many.new(blogs).and_then do |blog|
    Many.new(blog.categories)
  end.and_then do |category|
    Many.new(category.posts)
  end.and_then do |post|
    Many.new(post.comments)
  end.and_then do |comment|
    Many.new(comment.split(/\s+/))
  end.values
end

…and reformat the code a little to get this:

def words_in(blogs)
  Many.new(blogs).
    and_then { |blog    | Many.new(blog.categories)      }.
    and_then { |category| Many.new(category.posts)       }.
    and_then { |post    | Many.new(post.comments)        }.
    and_then { |comment | Many.new(comment.split(/\s+/)) }.
    values
end

Again, this is pretty clear, but we can add some syntactic sugar by defining #method_missing:

class Many
  def method_missing(*args, &block)
    and_then do |value|
      Many.new(value.public_send(*args, &block))
    end
  end
end

This is exactly the same as the Optional#method_missing, except it calls Many.new instead of Optional.new.

Now we can replace all of the “and_then … Many.new” calls with simple message sends:

def words_in(blogs)
  Many.new(blogs).
    categories.posts.comments.split(/\s+/).
    values
end

This is very nice! We put the blog posts into a Many object, traverse all the associations, then take the values out at the end.

And again, if the rest of the system could deal with instances of Many, we could just expect one and return one:

def words_in(blogs)
  blogs.categories.posts.comments.split(/\s+/)
end

To recap, here’s the class we just made:

Many = Struct.new(:values) do
  def and_then(&block)
    Many.new(values.map(&block).flat_map(&:values))
  end

  def method_missing(*args, &block)
    and_then do |value|
      Many.new(value.public_send(*args, &block))
    end
  end
end

Asynchronous code

For our third quick refactoring, we’re going to tackle writing asynchronous code.

I’ve often wondered who the most influential Rubyist is. Let’s find out once and for all, by using the GitHub API to find the person who’s made the most commits on the most popular Ruby project.

When you make an HTTP GET request to the GitHub API root, you get back some JSON that looks more or less like this:

GET https://api.github.com/
{
  "current_user_url":      "https://api.github.com/user",
  "authorizations_url":    "https://api.github.com/authorizations",
  "emails_url":            "https://api.github.com/user/emails",
  "emojis_url":            "https://api.github.com/emojis",
  "events_url":            "https://api.github.com/events",
  "feeds_url":             "https://api.github.com/feeds",
  "following_url":         "https://api.github.com/user/following{/target}",
  "gists_url":             "https://api.github.com/gists{/gist_id}",
  "hub_url":               "https://api.github.com/hub",
  "issues_url":            "https://api.github.com/issues",
  "keys_url":              "https://api.github.com/user/keys",
  "notifications_url":     "https://api.github.com/notifications",
  "organization_url":      "https://api.github.com/orgs/{org}",
  "public_gists_url":      "https://api.github.com/gists/public",
  "rate_limit_url":        "https://api.github.com/rate_limit",
  "repository_url":        "https://api.github.com/repos/{owner}/{repo}",
  "starred_url":           "https://api.github.com/user/starred{/owner}{/repo}",
  "starred_gists_url":     "https://api.github.com/gists/starred",
  "team_url":              "https://api.github.com/teams",
  "user_url":              "https://api.github.com/users/{user}"
}

Among other things, this gives us a URI template for finding out information about any organisation. Now we know what URL to use to get info about the Ruby organisation:

GET https://api.github.com/orgs/ruby

When we make a request to this URL, we get some JSON that contains a URL we can use to get a list of all the Ruby organisation’s repositories. So we fetch the list of repositories, which includes information about how many watchers each one has:

GET https://api.github.com/orgs/ruby/repos

From that we can see which repo has the most watchers (the main Ruby repo) and the URL for that repo’s representation in the API:

GET https://api.github.com/repos/ruby/ruby

When we fetch that repository’s information, we get another URL that tells us where to get its list of contributors:

GET https://api.github.com/repos/ruby/ruby/contributors

So then we can load the list of contributors to the main Ruby repo, which includes information about how many commits each contributor has made. We pick the one with the most commits, a user called “nobu”, and finally fetch information about “nobu” from the URL in the contributor list:

GET https://api.github.com/users/nobu
{
  "login": "nobu",
  …
  "name": "Nobuyoshi Nakada",
  …
}

It turns out that Nobuyoshi Nakada has made the most commits on the most popular Ruby project. Thanks Nobuyoshi!

Okay, that was exhausting, so let’s write some code to do it for us.

Assume we already have this #get_json method:

def get_json(url, &success)
  Thread.new do
    uri   = URI.parse(url)
    json  = Net::HTTP.get(uri)
    value = JSON.parse(json)
    success.call(value)
  end
end

#get_json asynchronously makes an HTTP GET request, parses the JSON response into a Ruby hash or array, then calls a callback with the data. (Alternatively, you can imagine the single-threaded non-blocking EventMachine equivalent if you like.)

To do what we just did, we have to:

  • get the URI templates from the GitHub API root;
  • fill in the template with the name of the Ruby organisation;
  • get the organisation data;
  • find the URL for the list of its repositories;
  • get the list of its repositories;
  • find the URL of the repository with the most watchers;
  • get the information on that repository;
  • find the URL for the list of its contributors;
  • get the list of its contributors;
  • find the URL of the contributor with the most commits;
  • get the information on that user; and finally
  • print out their real name and username.

Here’s the code:

require 'uri_template'

get_json('https://api.github.com/') do |urls|
  org_url_template = URITemplate.new(urls['organization_url'])
  org_url = org_url_template.expand(org: 'ruby')

  get_json(org_url) do |org|
    repos_url = org['repos_url']

    get_json(repos_url) do |repos|
      most_popular_repo = repos.max_by { |repo| repo['watchers_count'] }
      repo_url = most_popular_repo['url']

      get_json(repo_url) do |repo|
        contributors_url = repo['contributors_url']

        get_json(contributors_url) do |users|
          most_prolific_user = users.max_by { |user| user['contributions'] }
          user_url = most_prolific_user['url']

          get_json(user_url) do |user|
            puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
          end
        end
      end
    end
  end
end

This works, but it’s drifting right again. It’s hard to understand and maintain deeply nested code like this, but we can’t flatten it because of the nested callbacks.

Very briefly, the solution is to make an Eventually class that decorates a block:

Eventually = Struct.new(:block) do
  def initialize(&block)
    super(block)
  end

  def run(&success)
    block.call(success)
  end
end

The idea is that the block computes a value that might take a while to produce. Eventually#run runs the block with a callback for it to call when the value becomes available.

The gory details aren’t important, but here’s an #and_then method that we can use to add extra asynchronous processing to the value produced by an Eventually:

class Eventually
  def and_then(&block)
    Eventually.new do |success|
      run do |value|
        block.call(value).run(&success)
      end
    end
  end
end

This is more complicated than the other implementations of #and_then we’ve seen, but it achieves the same thing. (The difficult part is getting the callbacks wired up correctly.)

Now we can rewrite our code by putting each asynchronous #get_json call inside a block that we decorate with an Eventually object:

 Eventually.new { |s| get_json('https://api.github.com/', &s) }.and_then do |urls|
  org_url_template = URITemplate.new(urls['organization_url'])
  org_url = org_url_template.expand(org: 'ruby')

  Eventually.new { |s| get_json(org_url, &s) }.and_then do |org|
    repos_url = org['repos_url']

    Eventually.new { |s| get_json(repos_url, &s) }.and_then do |repos|
      most_popular_repo = repos.max_by { |repo| repo['watchers_count'] }
      repo_url = most_popular_repo['url']

      Eventually.new { |s| get_json(repo_url, &s) }.and_then do |repo|
        contributors_url = repo['contributors_url']

        Eventually.new { |s| get_json(contributors_url, &s) }.and_then do |users|
          most_prolific_user = users.max_by { |user| user['contributions'] }
          user_url = most_prolific_user['url']

          Eventually.new { |s| get_json(user_url, &s) } 
        end
      end
    end
  end
end.run do |user|
  puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
end

We connect all the Eventuallys with #and_then, then #run them. This isn’t super readable either, but now we can pull out each logical part into its own method. The code that gets all the URL templates from GitHub can go into a method called #get_github_api_urls:

def get_github_api_urls
  github_root_url = 'https://api.github.com/'

  Eventually.new { |success| get_json(github_root_url, &success) }
end

This returns an Eventually which decorates a block that’ll eventually call its callback with the result of fetching and parsing the JSON.

So we can replace the line at the top of our code with “get_github_api_urls.and_then”:

 get_github_api_urls.and_then do |urls|
  org_url_template = URITemplate.new(urls['organization_url'])
  org_url = org_url_template.expand(org: 'ruby')

  Eventually.new { |s| get_json(org_url, &s) }.and_then do |org|
    repos_url = org['repos_url']

    Eventually.new { |s| get_json(repos_url, &s) }.and_then do |repos|
      most_popular_repo = repos.max_by { |repo| repo['watchers_count'] }
      repo_url = most_popular_repo['url']

      Eventually.new { |s| get_json(repo_url, &s) }.and_then do |repo|
        contributors_url = repo['contributors_url']

        Eventually.new { |s| get_json(contributors_url, &s) }.and_then do |users|
          most_prolific_user = users.max_by { |user| user['contributions'] }
          user_url = most_prolific_user['url']

          Eventually.new { |s| get_json(user_url, &s) }
        end
      end
    end
  end
end.run do |user|
  puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
end

This next bit of code that fetches the data for the Ruby organisation can go into a method called #get_org:

def get_org(urls, name)
  org_url_template = URITemplate.new(urls['organization_url'])
  org_url = org_url_template.expand(org: name)

  Eventually.new { |success| get_json(org_url, &success) }
end

This returns an Eventually object too.

So we can replace the next bit of code with a call to #get_org:

get_github_api_urls.and_then do |urls|
  get_org(urls, 'ruby').and_then do |org|
    repos_url = org['repos_url']

    Eventually.new { |s| get_json(repos_url, &s) }.and_then do |repos|
      most_popular_repo = repos.max_by { |repo| repo['watchers_count'] }
      repo_url = most_popular_repo['url']

      Eventually.new { |s| get_json(repo_url, &s) }.and_then do |repo|
        contributors_url = repo['contributors_url']

        Eventually.new { |s| get_json(contributors_url, &s) }.and_then do |users|
          most_prolific_user = users.max_by { |user| user['contributions'] }
          user_url = most_prolific_user['url']

          Eventually.new { |s| get_json(user_url, &s) }
        end
      end
    end
  end
end.run do |user|
  puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
end

The code that gets all of the Ruby organisation’s repositories can go into a #get_repos method:

def get_repos(org)
  repos_url = org['repos_url']

  Eventually.new { |success| get_json(repos_url, &success) }
end

And then we can call it:

get_github_api_urls.and_then do |urls|
  get_org(urls, 'ruby').and_then do |org|
    get_repos(org).and_then do |repos|
      most_popular_repo = repos.max_by { |repo| repo['watchers_count'] }
      repo_url = most_popular_repo['url']

      Eventually.new { |s| get_json(repo_url, &s) }.and_then do |repo|
        contributors_url = repo['contributors_url']

        Eventually.new { |s| get_json(contributors_url, &s) }.and_then do |users|
          most_prolific_user = users.max_by { |user| user['contributions'] }
          user_url = most_prolific_user['url']

          Eventually.new { |s| get_json(user_url, &s) }
        end
      end
    end
  end
end.run do |user|
  puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
end

And so on for the rest of it:

get_github_api_urls.and_then do |urls|
  get_org(urls, 'ruby').and_then do |org|
    get_repos(org).and_then do |repos|
      get_most_popular_repo(repos).and_then do |repo|
        get_contributors(repo).and_then do |users|
          get_most_prolific_user(users) 
        end
      end
    end
  end
end.run do |user|
  puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
end

Now that we’re just creating Eventually objects at each step, we don’t need to call #and_then on each one immediately. We can let each object be returned from its enclosing block before we call #and_then on it.

In other words, we can flatten the nested blocks to get this:

get_github_api_urls.and_then do |urls|
  get_org(urls, 'ruby')
end.and_then do |org|
  get_repos(org)
end.and_then do |repos|
  get_most_popular_repo(repos)
end.and_then do |repo|
  get_contributors(repo)
end.and_then do |users|
  get_most_prolific_user(users)
end.run do |user|
  puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
end

I’ll just reformat that:

get_github_api_urls.
  and_then { |urls | get_org(urls, 'ruby')         }.
  and_then { |org  | get_repos(org)                }.
  and_then { |repos| get_most_popular_repo(repos)  }.
  and_then { |repo | get_contributors(repo)        }.
  and_then { |users| get_most_prolific_user(users) }.
  run do |user|
    puts "The most influential Rubyist is #{user['name']} (#{user['login']})"
  end

This is much nicer than what we had before. Each part is nicely encapsulated in its own method, and the parts are connected together in a clean way. This might be a familiar pattern: it’s similar to deferrables, promises and futures, which you may have seen in EventMachine, JavaScript or Clojure.

To recap, here’s the whole Eventually class:

Eventually = Struct.new(:block) do
  def initialize(&block)
    super(block)
  end

  def run(&success)
    block.call(success)
  end

  def and_then(&block)
    Eventually.new do |success|
      run do |value|
        block.call(value).run(&success)
      end
    end
  end
end
Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
07 Oct 02:39

First Ebola, now Marburg. Here’s why deadly viruses are on the rise in Africa

As the Ebola virus ravages western and central Africa, one of its virulent cousins has turned up in the opposite corner of the continent. Ugandan authorities report that a healthcare worker in Kampala, the country’s capital, died on Sep. 28 of Marburg virus, a hemorrhagic fever with similar symptoms to Ebola. The 30-year-old radiographer had come down with symptoms about 10 days earlier, said the health ministry.

Does this augur another terrifying outbreak like the one that’s killed more than 3,400 in western Africa?

Probably not. One of the reasons the Ebola virus has killed so many is that this is the first time it’s turned up in western Africa, and the region’s governments have lacked the expertise and infrastructure to contain the virus’ spread.

Not so in Uganda. Since both Marburg and Ebola crop up periodically there, the health ministry is practiced at containment in a way that Liberia, Sierra Leone and Guinea simply aren’t. Ugandan authorities say they’ve already quarantined the 80 people who came in contact with the patient.

In addition, Marburg’s incubation period is only 14 days, compared with Ebola’s 21, making it relatively easier to limit the virus’ spread.

Why do these viruses seem to be flaring up more often? While it’s not yet clear where the Ugandan patient contracted Marburg, in general, this is likely happening because, as mining and agricultural industry push further into tropical forests, humans are coming into contact with infected animals much more frequently. Several Marburg outbreaks, for instance, have begun by infecting miners.

Forests are home to what are called the viruses’ “reservoir hosts,” the animal populations that harbor a virus in between human outbreaks but are immune to its symptoms. While Marburg hides out in fruit bats, other similar viruses thrive in rodent populations.

No one knows for certain where Ebola lies low in between epidemics, which makes it hard to anticipate where future outbreaks will occur. However, some research suggests that, like Marburg, fruit bats also incubate Ebola.

Bats are excellent at this because they hang out in huge colonies, packed tightly into caves, which makes it easy for the virus to spread among them. And the more a virus leaps from host to host, the greater the chance for it to mutate into a form even deadlier to humans. Scientists suspect that primates or monkeys are first infected with the virus after eating fruit tainted with urine or other bat fluids. They then pass the virus on to humans.

Oddly enough, the first documented outbreak of Marburg wasn’t in Africa at all—but in Europe. In 1967, the then-unnamed virus killed seven and sickened 24 others in Germany and Yugoslavia. The first to fall ill with the strange virus were pharmaceutical factory workers in the German town of Marburg (hence the virus’ name), followed by lab pathologists and veterinary researchers in Frankfurt and Belgrade.

The virus also spread among the patients’ wives and hospital staff caring for the infected. It turned out that all of the original patients had worked with wild monkeys shipped from Uganda to Yugoslavia, and then on to Germany.

Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
06 Oct 21:58

This guy’s a keeper. #9gag



This guy’s a keeper. #9gag

06 Oct 21:29

Proteins

Check it out--when I tug the C-terminal tail, the binding tunnel squeezes!
06 Oct 11:23

Photo











06 Oct 01:00

130186: Dolce & Gabbana S/S 2015



130186:

Dolce & Gabbana S/S 2015

06 Oct 00:51

Chart Of The Day

by Andrew Sullivan

dish_butterfliesgif2

Kottke points to a new blog by Eleanor Lutz, who combines her backgrounds in design and molecular biology to beautiful effect, as in the above animation of North American butterflies. Explore more of her work here.


06 Oct 00:48

deerhoof: This is so true









deerhoof:

This is so true

06 Oct 00:47

Ferrorfluid - The Magnetic Liquid

06 Oct 00:42

A Short Film For Sunday

by Andrew Sullivan

The Missing Scarf, the above short film by Eoin Duffy, is “a virtuosic piece of motion design, character animation, and above all, storytelling”:

The Missing Scarf becomes an analytical examination of the aftermath of loss. How do we deal with fear of the unknown, of failure, and rejection? Moreover, how do we process? What’s the point of living if we’re all just molecules floating through the universe, slowly counting the clock ticks until our eventual demise? The existential concepts may not be new, but Eoin’s approach to the subject certainly is. Using the tone of a child’s storybook reading, the film lulls the viewer into a certain sense of complacency. So, when the more philosophical topics hit, the change in dynamic is a punch in the metaphorical nards. It’s cute, dark, and even a little bit cheeky.

As for the narration, well, if the voice sounds familiar that’s because it belongs to none other than George Takei. In his search for famous vocals, Duffy presented Takei with polished animatics of the film. The actor loved the look and story and agreed to take part in the project.


06 Oct 00:39

Mesário de Fortaleza recebe eleitores com café da manhã em seção

Presidente de seção eleitoral recebe eleitores com café da manhã (Foto: Carlos Careca/Arquivo pessoal)Presidente de seção eleitoral recebe eleitores com café da manhã (Foto: Carlos Careca/Arquivo pessoal)

Uma farta mesa de café da manhã é o que aguarda o eleitor que vota na seção localizada Escola de Ensino Fundamental São Rafael, na Praia de Iracema, em Fortaleza. “Recebo as pessoas com alegria e festa em minha seção. Recebendo a todos com respeito e dignidade, tento mostrar a importância do voto e incentivar outros mesários a realizar a festa que o dia merece”, explica Carlos Careca, mesário e presidente da seção.

Taxista, desde que começou a trabalhar nas eleições há 10 anos, a rotina do mesário é a mesma. “Começo a trabalhar para o dia do voto duas semanas antes, arrecadando donativos com meus amigos e vizinhos. Os quitutes, como bolos, tapiocas, cuscuz e tortas, faço em casa, no dia anterior, com a ajuda da família inteira”, diz.

Sucos, leite, achocolatado, capuchino, iogurtes, pães, bolos, salada de frutas, biscoitos e pizzas são alguns dos itens oferecidos aos eleitores no dia 5 de outubro. Mas a festa não se restringe ao café da manhã, a seção também recebe uma decoração especial, com direito a tapede vermelho. “A decoração da seção é toda feita no sábado”, diz.

Além disso, tem sempre um agradinho para aqueles que estão só de passagem pela seção. “Quando o votante vai com criança, ela ganha um presentinho surpresa. Quem vai apenas justificar o voto, também não sai de mãos abanando”, revela o mesário.

Presidente de seção eleitoral recebe eleitores com café da manhã (Foto: Carlos Careca/Arquivo pessoal)Presidente de seção eleitoral recebe eleitores
(Foto: Carlos Careca/Arquivo pessoal)

Carlos conta que desde pequeno acompanhava a mãe no dia da votação. “Quase analfabeta, a minha mãe fazia questão de votar. As dificuldades para cumprir esse dever eram muitas, começando pelo atendimento nas zona eleitoral. Para não esquecer os nomes do candidatos, ela guradava a “cola” por baixo da blusa, dentro do corpete. Mesmo assim precisava da minha ajuda para escrever os nomes e a demora quase sempre era algo de reclamação por parte dos mesários”, conta.

Além disso, Carlos conta que inúmeras vezes viu seções com funcionamento deficiente por falta de algum membro, atrasando todo o andamento do trabalho. “Vi muita gente mal-humorada, destratando as pessaoas que iam votar e prometi a mim mesmo que se um dia eu estivesse naquela posição, ia fazer a diferença”, diz. Para ele, o dia é um dos mais importantes. “Me visto com orgulho e a caráter para atender o personagem mais importante do dia: o eleitor”.

Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
06 Oct 00:38

'In 1976 I discovered Ebola, now I fear an unimaginable tragedy'

Professor Piot, as a young scientist in Antwerp, you were part of the team that discovered the Ebola virus in 1976. How did it happen?

I still remember exactly. One day in September, a pilot from Sabena Airlines brought us a shiny blue Thermos and a letter from a doctor in Kinshasa in what was then Zaire. In the Thermos, he wrote, there was a blood sample from a Belgian nun who had recently fallen ill from a mysterious sickness in Yambuku, a remote village in the northern part of the country. He asked us to test the sample for yellow fever.

These days, Ebola may only be researched in high-security laboratories. How did you protect yourself back then?

We had no idea how dangerous the virus was. And there were no high-security labs in Belgium. We just wore our white lab coats and protective gloves. When we opened the Thermos, the ice inside had largely melted and one of the vials had broken. Blood and glass shards were floating in the ice water. We fished the other, intact, test tube out of the slop and began examining the blood for pathogens, using the methods that were standard at the time.

But the yellow fever virus apparently had nothing to do with the nun's illness.

No. And the tests for Lassa fever and typhoid were also negative. What, then, could it be? Our hopes were dependent on being able to isolate the virus from the sample. To do so, we injected it into mice and other lab animals. At first nothing happened for several days. We thought that perhaps the pathogen had been damaged from insufficient refrigeration in the Thermos. But then one animal after the next began to die. We began to realise that the sample contained something quite deadly.

But you continued?

Other samples from the nun, who had since died, arrived from Kinshasa. When we were just about able to begin examining the virus under an electron microscope, the World Health Organisation instructed us to send all of our samples to a high-security lab in England. But my boss at the time wanted to bring our work to conclusion no matter what. He grabbed a vial containing virus material to examine it, but his hand was shaking and he dropped it on a colleague's foot. The vial shattered. My only thought was: "Oh, shit!" We immediately disinfected everything, and luckily our colleague was wearing thick leather shoes. Nothing happened to any of us.

In the end, you were finally able to create an image of the virus using the electron microscope.

Yes, and our first thought was: "What the hell is that?" The virus that we had spent so much time searching for was very big, very long and worm-like. It had no similarities with yellow fever. Rather, it looked like the extremely dangerous Marburg virus which, like ebola, causes a haemorrhagic fever. In the 1960s the virus killed several laboratory workers in Marburg, Germany.

Were you afraid at that point?

I knew almost nothing about the Marburg virus at the time. When I tell my students about it today, they think I must come from the stone age. But I actually had to go the library and look it up in an atlas of virology. It was the American Centres for Disease Control which determined a short time later that it wasn't the Marburg virus, but a related, unknown virus. We had also learned in the meantime that hundreds of people had already succumbed to the virus in Yambuku and the area around it.

A few days later, you became one of the first scientists to fly to Zaire.

Yes. The nun who had died and her fellow sisters were all from Belgium. In Yambuku, which had been part of the Belgian Congo, they operated a small mission hospital. When the Belgian government decided to send someone, I volunteered immediately. I was 27 and felt a bit like my childhood hero, Tintin. And, I have to admit, I was intoxicated by the chance to track down something totally new.

Suspected Ebola patient in Monrovia A girl is led to an ambulance after showing signs of Ebola infection in the village of Freeman Reserve, 30 miles north of the Liberian capital, Monrovia. Photograph: Jerome Delay/AP

Was there any room for fear, or at least worry?

Of course it was clear to us that we were dealing with one of the deadliest infectious diseases the world had ever seen – and we had no idea that it was transmitted via bodily fluids! It could also have been mosquitoes. We wore protective suits and latex gloves and I even borrowed a pair of motorcycle goggles to cover my eyes. But in the jungle heat it was impossible to use the gas masks that we bought in Kinshasa. Even so, the Ebola patients I treated were probably just as shocked by my appearance as they were about their intense suffering. I took blood from around 10 of these patients. I was most worried about accidentally poking myself with the needle and infecting myself that way.

But you apparently managed to avoid becoming infected.

Well, at some point I did actually develop a high fever, a headache and diarrhoea …

... similar to Ebola symptoms?

Exactly. I immediately thought: "Damn, this is it!" But then I tried to keep my cool. I knew the symptoms I had could be from something completely different and harmless. And it really would have been stupid to spend two weeks in the horrible isolation tent that had been set up for us scientists for the worst case. So I just stayed alone in my room and waited. Of course, I didn't get a wink of sleep, but luckily I began feeling better by the next day. It was just a gastrointestinal infection. Actually, that is the best thing that can happen in your life: you look death in the eye but survive. It changed my whole approach, my whole outlook on life at the time.

You were also the one who gave the virus its name. Why Ebola?

On that day our team sat together late into the night – we had also had a couple of drinks – discussing the question. We definitely didn't want to name the new pathogen "Yambuku virus", because that would have stigmatised the place forever. There was a map hanging on the wall and our American team leader suggested looking for the nearest river and giving the virus its name. It was the Ebola river. So by around three or four in the morning we had found a name. But the map was small and inexact. We only learned later that the nearest river was actually a different one. But Ebola is a nice name, isn't it?

In the end, you discovered that the Belgian nuns had unwittingly spread the virus. How did that happen?

In their hospital they regularly gave pregnant women vitamin injections using unsterilised needles. By doing so, they infected many young women in Yambuku with the virus. We told the nuns about the terrible mistake they had made, but looking back I would say that we were much too careful in our choice of words. Clinics that failed to observe this and other rules of hygiene functioned as catalysts in all additional Ebola outbreaks. They drastically sped up the spread of the virus or made the spread possible in the first place. Even in the current Ebola outbreak in west Africa, hospitals unfortunately played this ignominious role in the beginning.

After Yambuku, you spent the next 30 years of your professional life devoted to combating Aids. But now Ebola has caught up to you again. American scientists fear that hundreds of thousands of people could ultimately become infected. Was such an epidemic to be expected?

No, not at all. On the contrary, I always thought that Ebola, in comparison to Aids or malaria, didn't present much of a problem because the outbreaks were always brief and local. Around June it became clear to me that there was something fundamentally different about this outbreak. At about the same time, the aid organisation Médecins Sans Frontières sounded the alarm. We Flemish tend to be rather unemotional, but it was at that point that I began to get really worried.

Why did WHO react so late?

On the one hand, it was because their African regional office isn't staffed with the most capable people but with political appointees. And the headquarters in Geneva suffered large budget cuts that had been agreed to by member states. The department for haemorrhagic fever and the one responsible for the management of epidemic emergencies were hit hard. But since August WHO has regained a leadership role.

There is actually a well-established procedure for curtailing Ebola outbreaks: isolating those infected and closely monitoring those who had contact with them. How could a catastrophe such as the one we are now seeing even happen?

I think it is what people call a perfect storm: when every individual circumstance is a bit worse than normal and they then combine to create a disaster. And with this epidemic there were many factors that were disadvantageous from the very beginning. Some of the countries involved were just emerging from terrible civil wars, many of their doctors had fled and their healthcare systems had collapsed. In all of Liberia, for example, there were only 51 doctors in 2010, and many of them have since died of Ebola.

The fact that the outbreak began in the densely populated border region between Guinea, Sierra Leone and Liberia ...

… also contributed to the catastrophe. Because the people there are extremely mobile, it was much more difficult than usual to track down those who had had contact with the infected people. Because the dead in this region are traditionally buried in the towns and villages they were born in, there were highly contagious Ebola corpses travelling back and forth across the borders in pickups and taxis. The result was that the epidemic kept flaring up in different places.

For the first time in its history, the virus also reached metropolises such as Monrovia and Freetown. Is that the worst thing that can happen?

In large cities – particularly in chaotic slums – it is virtually impossible to find those who had contact with patients, no matter how great the effort. That is why I am so worried about Nigeria as well. The country is home to mega-cities like Lagos and Port Harcourt, and if the Ebola virus lodges there and begins to spread, it would be an unimaginable catastrophe.

Have we completely lost control of the epidemic?

I have always been an optimist and I think that we now have no other choice than to try everything, really everything. It's good that the United States and some other countries are finally beginning to help. But Germany or even Belgium, for example, must do a lot more. And it should be clear to all of us: This isn't just an epidemic any more. This is a humanitarian catastrophe. We don't just need care personnel, but also logistics experts, trucks, jeeps and foodstuffs. Such an epidemic can destabilise entire regions. I can only hope that we will be able to get it under control. I really never thought that it could get this bad.

What can really be done in a situation when anyone can become infected on the streets and, like in Monrovia, even the taxis are contaminated?

We urgently need to come up with new strategies. Currently, helpers are no longer able to care for all the patients in treatment centres. So caregivers need to teach family members who are providing care to patients how to protect themselves from infection to the extent possible. This on-site educational work is currently the greatest challenge. Sierra Leone experimented with a three-day curfew in an attempt to at least flatten out the infection curve a bit. At first I thought: "That is totally crazy." But now I wonder, "why not?" At least, as long as these measures aren't imposed with military power.

A three-day curfew sounds a bit desperate.

Yes, it is rather medieval. But what can you do? Even in 2014, we hardly have any way to combat this virus.

Do you think we might be facing the beginnings of a pandemic?

There will certainly be Ebola patients from Africa who come to us in the hopes of receiving treatment. And they might even infect a few people here who may then die. But an outbreak in Europe or North America would quickly be brought under control. I am more worried about the many people from India who work in trade or industry in west Africa. It would only take one of them to become infected, travel to India to visit relatives during the virus's incubation period, and then, once he becomes sick, go to a public hospital there. Doctors and nurses in India, too, often don't wear protective gloves. They would immediately become infected and spread the virus.

The virus is continually changing its genetic makeup. The more people who become infected, the greater the chance becomes that it will mutate ...

... which might speed its spread. Yes, that really is the apocalyptic scenario. Humans are actually just an accidental host for the virus, and not a good one. From the perspective of a virus, it isn't desirable for its host, within which the pathogen hopes to multiply, to die so quickly. It would be much better for the virus to allow us to stay alive longer.

Could the virus suddenly change itself such that it could be spread through the air?

Like measles, you mean? Luckily that is extremely unlikely. But a mutation that would allow Ebola patients to live a couple of weeks longer is certainly possible and would be advantageous for the virus. But that would allow Ebola patients to infect many, many more people than is currently the case.

But that is just speculation, isn't it?

Certainly. But it is just one of many possible ways the virus could change to spread itself more easily. And it is clear that the virus is mutating.

You and two colleagues wrote a piece for the Wall Street Journal supporting the testing of experimental drugs. Do you think that could be the solution?

Patients could probably be treated most quickly with blood serum from Ebola survivors, even if that would likely be extremely difficult given the chaotic local conditions. We need to find out now if these methods, or if experimental drugs like ZMapp, really help. But we should definitely not rely entirely on new treatments. For most people, they will come too late in this epidemic. But if they help, they should be made available for the next outbreak.

Testing of two vaccines is also beginning. It will take a while, of course, but could it be that only a vaccine can stop the epidemic?

I hope that's not the case. But who knows? Maybe.

In Zaire during that first outbreak, a hospital with poor hygiene was responsible for spreading the illness. Today almost the same thing is happening. Was Louis Pasteur right when he said: "It is the microbes who will have the last word"?

Of course, we are a long way away from declaring victory over bacteria and viruses. HIV is still here; in London alone, five gay men become infected daily. An increasing number of bacteria are becoming resistant to antibiotics. And I can still see the Ebola patients in Yambuku, how they died in their shacks and we couldn't do anything except let them die. In principle, it's still the same today. That is very depressing. But it also provides me with a strong motivation to do something. I love life. That is why I am doing everything I can to convince the powerful in this world to finally send sufficient help to west Africa. Now!

Der Spiegel

Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
06 Oct 00:37

Herbert James Draper - The Lament for Icarus (1898)





Herbert James Draper - The Lament for Icarus (1898)

06 Oct 00:36

Vota, Brasil!

by Drunkeynesian
Concordei com meu ex-chefe em uma discussão, há alguns dias: a democracia no Brasil nunca esteve tão forte e vibrante (se ainda assim parece problemática, lembremos da base de comparação— coroneis, populistas, militares, malucos—e de que dá pra afirmar sem parecer maluco que a democracia representativa minimamente decente começou há não muito mais que 20 anos).

Perdi a data de registro no consulado e não vou poder votar; este seria meu voto. Que nossos representantes, quaisquer que sejam, continuem a ampliar a democracia e as possibilidades de escolha dos que os elegeram.
06 Oct 00:30

Satellites detect 'thousands' of new ocean-bottom mountains - BBC News

By Jonathan Amos Science correspondent, BBC News
Ocean floor The new gravity data gives us our clearest view yet of the shape of the ocean floor

It is not every day you can announce the discovery of thousands of new mountains on Earth, but that is what a US-European research team has done.

What is more, these peaks are all at least 1.5km high.

The reason they have gone unrecognised until now is because they are at the bottom of the ocean.

Dave Sandwell and colleagues used radar satellites to discern the mountains' presence under water and report their findings in Science Magazine.

Sonar gondola Using ship-borne echosounders is expensive and time-consuming

"In the previous radar dataset we could see everything taller than 2km, and there were 5,000 seamounts," Prof Sandwell told BBC News.

"With our new dataset - and we haven't fully done the work yet - I'm guessing we can see things that are 1.5km tall.

"That might not sound like a huge improvement but the number of seamounts goes up exponentially with decreasing size.

"So, we may be able to detect another 25,000 on top of the 5,000 already known," the Scripps Institution of Oceanography researcher explained.

Knowing where the seamounts are is important for fisheries management and conservation, because it is around these topographic highs that wildlife tends to congregate.

The roughness of the seafloor is important also as it steers currents and promotes mixing - behaviours that are critical to understanding how the oceans transport heat and influence the climate.

But our knowledge of the seafloor is poor; witness the problems they have had searching for the missing Malaysia Airlines jet MH370, which is believed to have crashed west of Australia.

Indian Ocean Seeing fracture zones tells scientists about the movement of the continents

The problem is that saltwater is opaque to all the standard techniques that are used to map mountains on land.

Ship-borne echosounders can gather very high-resolution information by bouncing sound off bottom structures, but less than 10% of the global oceans have been properly surveyed in this way because of the effort it involves.

Dietmar Müller from the University of Sydney said: "You may generally think that the great age of exploration is truly over; we've been to all the remotest corners of continents, and perhaps one might think also of the ocean basins. But sadly this is not true - we know much more about the topography of Mars than we know about the seafloor."

Satellite observations

The alternative is an indirect method that uses satellites fitted with radar altimeters.

These spacecraft can infer the shape of the ocean bottom from the shape of the water surface above.

Because water follows gravity, it is pulled into highs above the mass of tall seamounts, and slumps into depressions over deep trenches.

Most of our maps of the gross outlines of mountains on the seafloor have relied on this approach.

Key advances were made using US Navy and European Space Agency satellites in the 80s and 90s.

Gulf of Mexico Gulf of Mexico: The jagged outline of an extinct spreading ridge is discernable

Now, Sandwell and his team have gathered new, improved datasets from more recent spacecraft - Jason 1, which was recently taken out of service, and CryoSat, which continues to orbit the Earth today.

Their denser coverage and better radar technologies have brought a two-fold improvement in the gravity model used to describe the ocean floor.

This richer information trove has barely been investigated yet, but already new discoveries are jumping out.

These include an extinct ridge where the seafloor spread apart to help open up the Gulf of Mexico about 180 million years ago.

And in the South Atlantic, the team sees the two halves of a different type of ridge feature that became separated roughly 85 million years ago when Africa rifted away from South America.

Octopus Biodiversity and Conservation: It is around seamounts that wildlife tends to congregate

The striking thing is that many such structures are often covered by deep sediments and only become visible in the new gravity data.

Seeing all the major fracture zones in greater detail is sure to be a boon to those who study the history of Earth's shifting continents.

The team hopes to improve still the resolution of its model.

This will come as Cryosat continues to take more measurements in the years ahead.

The irony here is that the European Space Agency mission is really dedicated to tracing the shape and thickness of polar ice fields - not the shape of the seafloor.

CryoSat (Esa) CryoSat's primary role is to measure the shape of polar ice surfaces - not the shape of the seafloor

"CryoSat's orbit and payload were designed to meet its primary ice mission goals, and extending its coverage to the ocean was on a 'let's see what we get' basis," said principal investigator Duncan Wingham. "As it has turned out, we now have a marvellous new view of the ocean floor."

For its ice work, CryoSat works in a specific high-resolution mode, which could be extended to more areas of the ocean to garner improved seafloor data - if mission time allows.

Ultimately, though, researchers would like to see a dedicated mapper that was specifically tuned to the task.

Walter Smith, a co-author on Thursday's Science paper, proposed just such a mission in 2001 called ABySS.

It was not accepted then, but the National Oceanic and Atmospheric Administration scientist believes the case is still a compelling one.

"The miniaturization of computer chips and the increase in CPU processing speed and data storage in the last 13 years has made it easy and cheap to do amazing things with radar," he told BBC News.

"There is still a lot we could do with a dedicated mission. It could be done - everything, 'soup to nuts' - for 100 million Euros (£80m), and the necessary technological innovations are well known to radar engineers in England, France and elsewhere. It is just a question of political will to find the budget."

Measuring the seafloor graphic
  • Most ocean maps are derived from satellite altimeter measurements
  • Satellites infer ocean-floor features from the shape of the sea surface
  • They detect surface height anomalies driven by variations in local gravity
  • The gravity from the extra mass of mountains makes the water pile up
  • In lower-mass regions, such as over trenches, the sea-surface will dip
  • Limited high-resolution ship data has calibrated the satellites' maps

Jonathan.Amos-INTERNET@bbc.co.uk and follow me on Twitter: @BBCAmos

Bookmarked at brandizzi Delicious' sharing tag and expanded by Delicious sharing tag expander.
06 Oct 00:30

wtfisthinprivilege: flyingcuttlefish: carnivaldog: gifak-net: ...



wtfisthinprivilege:

flyingcuttlefish:

carnivaldog:

gifak-net:

video

PUPPY NO

LAUNCH

The more I watch this, the funnier it gets. Look at the worried dog behind them. Ahahaha “son!”

04 Oct 02:19

The Sexual (and Racial) Politics of Nerd Culture: A Dialogue*

by Priya Alika Elias and Ezekiel Kweku

*”A Dialogue” sounds really official like we sat across from each other in our best finery while sipping from mugs of coffee inscribed with our logo but really it was a gchat conversation. It has been lightly edited for clarity.

Ezekiel Kweku (Shrill): Hi, Priya.

Priya Alika Elias (Wordy): Hi!

S: Against my better judgment, and because I wanted to understand nerds better, I revisited an ancient and seminal nerd text: the 1984 teen comedy Revenge of the Nerds. And it was...uncomfortable.

W:  That movie is the Ur-text: it still informs the way that we think about nerds today.  The funny thing is, I thought it was about the persecution of nerds until I went back and watched it again. Then it didn't seem so much like a cool revenge comedy.

Read more The Sexual (and Racial) Politics of Nerd Culture: A Dialogue* at The Toast.