Shared posts

05 Jul 13:03

Famous last words (SIGAVDI #19)

by brandizzi

View to the West from Look Rock Tower

It’s been a busy month and a half here at Fair Pavilion.

As usual, I’ve collected some notable links to share with you. But I don’t feel like talking about them today.

I want to talk about bad ideas.

Famous last words: We just need to replace this whole system and then everything will be better.

Famous last words: This is clearly a technology problem.

Famous last words: All we need to do is add more features, and business will improve.

These are signs of bad ideas. I’ve spent my whole career learning that these statements are red flags. These are things that people say six months before the the mass email that begins “What an incredible journey it’s been…”

But two months ago, I decided I had a technology problem. I decided the best way to address it was to replace the whole system, with a new one that added a lot more features. And that’s exactly what I did.

And it worked out. And it feels great. And I’ve been thinking a lot about why this should be.

Let me back up a little bit.

enter image description here

As you may already know, I make my living from my screencast series, RubyTapas. Four years ago, I launched the show using a third-party storefront hosting service, and it has been hosted there ever since.

The upside of this arrangement was that enabled me to focus exclusively on creating content, and not think about payment processing, subscription management, delivery, or anything else technical. The downside was that it meant I was limited to the features the hosting service chose to develop, at whatever pace they chose to deliver them at.

Unfortunately, this pace turned out to be that of Flash, the Zootopia sloth.

Years went by. I made do. Customers complained of the ugly site, poor user experience and lack of basic features like search, categories, or streaming video. But they put up with it.

But then subscriptions started to slowly flag. Not as a direct result of the lack of features, and not because of the content. More because of the inevitable, slow migration of developers towards different technologies and other sources of training. And I wasn’t doing a good enough job of drawing in new developers to replace the subscriptions I’d lost.

I knew what I needed to do. I had lots of concrete, practical plans for picking up on the marketing efforts that I had totally let slide.

There was just one problem: I hated what I was marketing. Not the content, but the medium.

Yes, there were also a lot of technical ways that the platform made marketing harder: it forced me to have separate marketing and subscriber sites. It gave me no way to show “teasers” of the content. It limited the information I could discover about how people used the site. It didn’t even let me issue coupons for sales.

But all that pales in comparison with the ugly fact that every time I set out to start some new marketing initiative, I’d slow down and stop because I was embarrassed of the thing I was selling. I knew that if I was a new subscriber to RubyTapas, as soon as I saw the subscriber-side site I’d be saying: “seriously?!”.

This sense of shame completely took the wind out of my sails when it came to selling myself and my product.

enter image description here

Of course, I’d made stabs at changing the situation over the years. I had been slowly—very slowly—trying to build out the part of the site that I controlled into something more featureful. I had big plans for the experience I wanted to provide.

But I didn’t have the time to create content on a weekly basis and build a full-featured subscription website. Or the extra cash to pay someone else to do it. I’d work for an hour here, and an hour there. Then there’d be a lull when other things would get in the way. And then I’d spend a couple of days just trying to remember where I’d left off.

Then, last May, I changed course. I threw out all of my plans of building a new site by hand, from scratch. In fact, I threw out the idea of “building” anything at all.

Instead, I created a new version of the site on off-the-shelf software: self-hosted WordPress, a store-bought premium theme, and a handful of carefully selected plugins.

It took me a few days to have the initial proof of concept up and running. A couple more weeks before I was ready to announce it and start accepting new subscriptions. As of today, a little over two months after I first considered going down this route, I’m in the process of migrating users over from the old system. If all goes well the transition will be complete by the end of July.

Users, new and old, are thrilled with new site. And I’m breathing a giant sigh of relief. Because for the first time in long time, I’m selling something I can be proud of. Which means I can do all that marketing stuff I’d been avoiding.

Which brings me back to the beginning of this letter, and bad ideas.

I’ve learned the very hard lesson over the years, never to put my faith in technical solutions to business problems. Or in “the new system” that will fix all the problems of the old system. And yet, in a way that’s exactly what I’ve done… and it’s working out beautifully.

enter image description here

I’ve been thinking a lot about what makes this situation different. Here’s what I’ve come up with so far:

A boring technical solution.

I could have decided that the direction I needed to go was to set aside three months to do nothing but write an app from scratch, using all of my web development experience. I can virtually guarantee you that the result of that decision would have been disaster, as more and more unconsidered edge cases turned up.

Or, I could have found a new, better third-party subscription hosting service. And tied myself to a whole new set of velvet handcuffs.

Instead, I went with a known quantity. A boring quantity. WordPress, a commodity workhorse which is as often as not used as the butt of jokes by Rails developers. And by going with something known, and unexciting, and old, I was able to leverage the full power of an incredibly rich ecosystem: everything from themes and plugins, to specialized hosting services, backup solutions, security, and maintenance-as-a-service providers.

A big part of the risk in looking for a technical solution is the fact that 80% of the problem is usually social, not technical. But I think another factor may be that “technical solution” is often treated as synonymous with “shiny new technical solution”.

No, choosing boring tech won’t help you if you’re solving the wrong problem. But if you know exactly what you need, established tools can offer powerful network effects that go above and beyond their simple technical merits.

Some problems are not beautiful snowflakes.

Programmers love solving problems. The corollary is that we also love making problems.

When we’re faced with something which is obviously an old and oft-solved problem, our usual tactic for making new problems is to proclaim the existing solutions “too complicated”.

I just need to sell subscriptions, and only show content to subscribers. Simple! I don’t need one of these bloated, over-complicated pre-built systems.

Well, and let them upgrade and downgrade to different plans.

With proration, so they don’t get overcharged when they upgrade.

And dunning, so they don’t just get cut off when their credit card expires.

And I need to enable downloads for some users but not for others.

And I need to provide a way for users in countries with strict tax laws to put their VAT IDs on their receipts.

Which means I need proper receipts.

And I need categories. And tags. And series.

And an easy way to make some episodes into freebies.

And the episodes should show a nicely formatted social card when posted to Twitter or Facebook.

And… and… and…

Some people will gamely power through all of these feature adds and gotchas, one by one. And then one day, they’ll find themselves scaling up, and wanting to hire someone to do copy-editing on 400 archive posts. That exist in the form of Markdown files in a Github repo. And then they have to teach this new person to work within the constraints of a home-grown, cobbled-together system. And how to commit and re-deploy the site after each page is done.

Guess how long it takes me to find someone who can copy-edit articles on a WordPress site, with zero advance training?

Or. for that matter, to do any number of other WordPress maintenance tasks?

For a lot of developers—including younger iterations of myself—“simplicity” is defined in the implicit context of being the sole person working on a project. Forever.

In evaluating solutions for my technical problem, I acknowledged the fact that my problem was a solved one. Very solved: Check out this review of 30(!) different membership plugins for WordPress, and the level of attention to nitpicky details that goes into rising to the top of such a list.

enter image description here

I think that acknowledging this truth about the mundanity of my problem saved me from going down a very hard (and unnecessary) road.

A prototype is not a proof of concept.

This change in technology was a big and risky decision for my company. When I made the choice to go full-speed ahead on it, I made it based on a working proof of concept: a beta site that could accept payments, show videos, and differentiate access based on subscription levels. It had a production-ready UI including a full-featured admin UI. And I had proved that I could import posts via HTTP APIs in an automated fashion.

In other words, it was a real application, not a prototype.

Too often I’ve seen just how wide the distance grows between prototype and production, padded out with assumptions and hand-waves. Not every problem will be amenable to putting together a proof-of-concept in a matter of days, like I did. But this experience has solidified my sense that, when it comes to big, make-or-break business decisions, a prototype is not enough.

Who ya gonna call?

One of the undersea rocks that systems built on a new-to-us technology often founder upon is lack of support. The initial roll-out goes well. But then an issue crops up that nobody knows how to solve.

This was a real danger for me. Instead of building on a stack I have a lot of competency in (Ruby, Rails, Heroku, etc.), I was introducing a stack with which I have relatively little in-depth experience.

In years past, I might have barrelled ahead regardless. This time around, I took careful stock, not just of my own competency, but of the resources I could draw on. It was true I had no mastery of WordPress development. But:

  • I knew an expert I could talk to when I got out of my depth. Someone who could either help directly, or (more often) point me in the direction of the right people to talk to.
  • Via my WordPress guru, I had a shortlist of reliable resources: sites, forums, people, and books.
  • I knew of a well-recommended agency that specializes in WordPress maintenance: updates, security, and troubleshooting, whose job it is to be on-call if something goes wrong.
  • By the time I had my proof-of-concept in place, I had alread been in correspondence with support for the membership plugin I had decided to use, and confirmed that they were responsive, competent, and professional.

If these elements had not been in place, I almost certainly wouldn’t have gone ahead with the switch.

Avoiding featuritis

“We’ll solve our business problems with new features!”—Changes that start with this statement rarely end well.

In my case, when it came to the question of whether new features would actually address user needs, I wasn’t stabbing in the dark. I had data. I had survey results, and years of user feedback.

But I also knew that I wasn’t switching out my tech stack for any specific feature. It was more about drastically shortening the time needed to implement any feature, or at least to do an acceptable first cut. And from my years of using it as a blogging platform, I knew that’s an area WordPress excels at, due to its extensive plugin ecosystem.

And finally, I was under no illusions that features alone would make a big difference in my business. I knew that ultimately, I wasn’t addressing a feature gap—I was addressing a morale gap. I needed to be working on a system that I could get excited about. I needed to feel like I could quickly give users what they asked for. And I needed to enjoy the experience of working on the admin side, instead of avoiding it.

enter image description here

Final thoughts

Of course, it’s early days to be writing about this. I suppose it could all fall apart, but I’m not seeing any of the usual warning signs.

I know this was long, and very focused on my own situation. My hope in writing all this down is that something here might help you, the next time you are evaluating a big technical shift. Some questions you might ask yourself or your team:

  • Is there a boring, established way to do this? Is there a reason we’re not using it, other than “cool factor”?
  • Are we making decisions about building our own stuff based on vague appeals to “flexibility”, or to “simplicity”?
  • Do we have the slack time to do a real proof-of-concept before moving forward? Or only time for a prototype? If the latter, is there a smaller chunk we could bite off instead?
  • Do we have support lined up for when problems with the new tech exceed our in-house competency?
  • Are we hiding a deeper reason for a change—such as developer morale—behind the excuse of “features”? And if we are honest about the real reasons, how will we measure success?

Did this letter bring to mind any past technology shifts you’ve implemented? Inspire any further thoughts or debate? As always, I would love to hear back from you.

Happy hacking,

Avdi

P.S. Check out the new RubyTapas if you haven’t already!

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.
Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting.

04 Jul 21:07

Pre-roll video ads

by CommitStrip

Strip-Les-Prerolls-(650-final)(english)

Note : we removed the “ads” keyword from the URL of this strip because it was triggering some adblockers. It was not our intention: we’ll never ask our readers to not use adblockers because we use them too 🙂 BTW, comments and likes has been reset due to the URL change.
04 Jul 20:19

Have it All

by Reza

have-it-all

04 Jul 15:24

A perigosa nostalgia dos idosos

Imagine dois projetos de lei. Um propõe que cada um adquira seu jazigo em dez anos sem juros (ou seja, com juros financiados pelo governo). O outro propõe que cada um adquira seu primeiro carro pagando em dez anos, também sem juros (ou seja, com juros financiados pelo governo).

São tempos de vacas magras. Não há dinheiro para os dois projetos. Um referendo deve decidir qual dos dois será adotado. É possível imaginar que os jovens preferirão o projeto do carro, e os idosos, o do jazigo.

Um plebiscito sobre a reforma da Previdência daria uma oposição análoga. Os idosos pensarão em garantir seus "direitos", ou seja, a melhor aposentadoria possível, e, se isso implica que cada jovem pague a metade do que ele ganha em INSS ou que o Estado quebre em 20 anos, pois bem, dane-se.

E os jovens? Bom, fale com um jovem de 18 anos sobre a aposentadoria dele, tente interessá-lo: ele é capaz de responder que, de qualquer forma, ele não pretende viver tanto tempo assim.

O voto do "Brexit", que decidiu que o Reino Unido sairá da União Europeia, manifestou um duplo conflito (que não é só inglês). O primeiro é ao redor da imigração: enfrentam-se os que defendem os valores do território e os cosmopolitas das grandes cidades –sobre essa oposição voltarei na semana que vem. O outro é o conflito entre jovens e idosos.

Setenta e cinco por cento dos jovens entre 18 e 24 anos votaram para continuar na União Europeia. Quase a mesma porcentagem de aposentados, acima de 65 anos, votou para sair da Europa. Só para confirmar: na Escócia, onde se vota a partir dos 16 anos (e não dos 18), o "Brexit" perdeu feio.

O atraso no desenvolvimento do córtex pré-frontal dos adolescentes é a causa provável de sua impulsividade, sua dificuldade em ponderar as consequências de seus atos etc. Esse traço da juventude é socialmente útil: num exército, os soldados devem ser capazes de se arriscar sem pensar duas vezes.

A prudência trazida pela idade é também útil: no mesmo exército, os oficiais superiores não devem arriscar levianamente a vida de seus homens. Ou seja, um exército só de jovens ou só de idosos seria uma catástrofe.

Agora, uma observação, que me sinto livre para expressar por fazer parte dos idosos. À vista da utilidade social de jovens e idosos, é curioso que todos achemos normal que exista uma idade mínima para votar, mas ninguém pense seriamente na possibilidade de uma idade máxima para votar, sobretudo nos casos em que o voto tem consequências radicais para o futuro da comunidade –ou seja, muito mais para os jovens do que para os aposentados.

Não estou pensando na senilidade e na demência (para isso existe a interdição), mas em traços frequentes em nós, idosos, que talvez nos tornem eleitores perigosos para todos. Dois em particular:

1) Uma avareza mesquinha (e generalizada –não só financeira), que consiste em tentar preservar e conservar qualquer coisa, como metáfora da preservação (impossível) da nossa vida que se vai;

2) Uma idealização fantasiosa de passados que nunca existiram. Os idosos parecem sempre evocar o "tempo feliz" de sua infância, quando os pais eram severos e por isso educavam bem, quando dava para brincar na rua e a escola pública era muito boa. Mas, se a escola era tão boa, por que o cara é ignorante? E, se os pais eram grandes pedagogos, por que ele é bruto e mal-educado?

Cuidado: quase sempre, nós idosos nos servimos da saudade para "viver", numa lembrança inventada, algo que, de fato, não conhecemos –e agora é tarde. Nossa vida não foi o que queríamos, e ela não vai mudar mais, no entanto "tivemos"(na lembrança) uma infância de conto de fadas, não é?

Também nos servimos da saudade para amenizar nossa inveja (filhos e netos vão viver mais tempo, mas não terão uma infância incrível, como a nossa) e para mendigar algumas migalhas da inveja dos jovens. Se não tivéssemos vivido na Idade de Ouro, quem nos invejaria, sabendo que nossa morte é próxima e o corpo já falha?

Os mais saudosos, aliás, são os idosos das classes menos favorecidas; eles, literalmente, têm saudade do que nunca tiveram. Domingo, nas entrevistas da BBC, gritavam: "Vamos pegar nosso país de volta!". Como assim, "de volta"? Meu amigo, "seu" país nunca foi seu, nem de longe.

"Nós não ficamos mais sábios com a idade, nem sempre os velhos sabem o que é certo" (Jó 32:9).

Let's block ads! (Why?)

03 Jul 23:59

A esquerda encontra a direita

No último mês, dois garotos, de 10 e 11 anos, foram mortos em confronto com a polícia. As duas crianças vinham de famílias carentes, com muitos irmãos.

Segunda esta Folha, pesquisa recente do Ministério Público de São Paulo sugere que a falta da figura paterna, caso de uma das famílias, pode explicar parte do problema do envolvimento de crianças e adolescentes com a criminalidade. Essa constatação, claro, não exime a polícia pelo uso de força desproporcional, resultando em mortes desnecessárias.

O sociólogo Jessé Souza, até recentemente presidente do Ipea (Instituto de Pesquisa Econômica Aplicada), sugere, em dois volumes escritos com diversos colaboradores –"A Ralé Brasileira: Quem É e Como Vive" e "Os Batalhadores Brasileiros"–, que o ambiente doméstico representa fortíssimo fator perpetuador da pobreza.

Segundo Jessé, "a família típica da 'ralé' é monoparental, com mudanças frequentes do membro masculino, enfrenta problemas sérios de alcoolismo e de abuso sexual sistemático e é caracterizada por uma cisão que corta essa classe ao meio entre pobres honestos e pobres delinquentes".

Já os batalhadores, que conseguiram melhorar de vida, internalizaram as "disposições nada óbvias do mundo do trabalho moderno: disciplina, autocontrole e comportamento e pensamento prospectivo".

Diferentemente do que se imagina, "essas disposições têm que ser aprendidas, embora seu aprendizado seja difícil e desafiador e não esteja ao alcance de todas as classes" (citações de "Os Batalhadores", páginas 50 e 51).

Pensadores liberais, como Eugênio Gudin e Carlos Langoni, sempre identificaram a enorme importância que a educação tem para o desenvolvimento econômico.

Diferentemente deles, os economistas heterodoxos ou estruturalistas nunca conseguiram enxergar nenhum papel da educação para o desenvolvimento econômico. Celso Furtado, por exemplo, apesar de ter se dedicado ao tema por 40 anos e em 30 livros, em nenhum momento associou desenvolvimento à educação.

Nos últimos anos, consolidou-se o entendimento de que um sistema público de educação de qualidade é um dos elementos principais para o desenvolvimento econômico e a equidade.

Mais recentemente, a economia acadêmica vem reconhecendo a enorme importância dos primeiros anos de vida e de um ambiente doméstico estruturado para preparar a criança para a escola formal.

James Heckman, Prêmio Nobel de Economia e professor da Universidade de Chicago, tem acumulado conjunto impressionante de evidências nessa direção. O leitor interessado pode consultar o link heckmanequation.org/blog ou a página do economista brasileiro Flávio Cunha (flaviocunha.com).

Sabe-se que, nos primeiros anos de vida, as habilidades cognitivas, essencialmente pensamento analítico, e as não cognitivas, esforço e persistência, capacidade de suportar frustração, autoestima etc., são desenvolvidas. Se o ambiente doméstico nos primeiros anos de vida não for propício para o desenvolvimento desse conjunto de capacidades, o desempenho escolar será comprometido.

Assim, o maior desafio de nossa sociedade será desenhar políticas públicas que retirem a "ralé", 1/3 da população aproximadamente, segundo Jessé, da armadilha de pobreza em que se encontra.

Sinal auspicioso é que a esquerda parece ter descoberto algo que a direita já sabia há muito tempo.

Let's block ads! (Why?)

01 Jul 11:06

How Children Went from Worthless to Priceless

How Children Went from Worthless to Priceless

Pricing a product can be a thorny issue. Will customers interpret a low price as a bargain, or as a sign of a low quality? Is allowing people to pay what they want for a product a profitable strategy? 

Despite Econ 101’s promise of finding the perfect price at the intersection of a supply and a demand curve, pricing advice accounts for countless books, management consulting projects, and Harvard case studies. 

But the most fascinating case study about pricing does not have to do with iPhones, cable TV packages, or Uber rides. It concerns the price of a very special commodity: a human child.  

Typically individuals only talk about a person’s “worth” in abstract terms. Yet there are situations that demand an exact financial figure. In wrongful death lawsuits, parents of a child who died in an accident will demand compensation from the negligent party. This puts a judge in the unenviable position of having to put a price on the parent’s loss. 

Looking back at wrongful death cases in the United States reveals a startling fact: the financial value of a child has changed dramatically. 

In 1896, for example, the parents of a two-year-old killed due to the negligence of the Southern Railroad Company of Georgia asked a judge for compensation. They argued that their child performed errands worth two dollars per month, but they received nothing beyond the cost of a burial. The judge concluded “that the child was ‘of such tender years as to be unable to have any earning capacity, and hence the defendant could not be held liable in damages.’”

Today, however, parents do not need to prove the economic value of a lost child to receive compensation. Instead they refer to their emotional pain. On this basis, a judge in a 1979 case awarded the parents of a three-year-old who died from fluoride poisoning at the dentist $750,000.

So why did the value of a child change from worthless to nearly priceless?

The Changing Meaning of Childhood

Both of the above cases are described in Pricing the Priceless Child by Viviana Zelizer. In the book, Zelizer, a sociologist, traces the evolution in Americans’ and Europeans’ treatment of young children.

Her descriptions of the ambivalence with which parents once treated young children can make for shocking reading. Zelizer writes that in 18th century Europe, “The death of an infant or a young child was a minor event, met with a mixture of indifference and resignation.” A French philosopher of the time wrote, “I have lost two or three children in infancy, not without regret, but without great sorrow.” 

Historians, Zelizer notes, found no evidence that the English wore or displayed symbols of mourning when young children died during this period. The French commonly buried young children in the backyard like Americans bury pets today. Colonial Americans called newborns “it” or “little stranger.” While the death of a child was greeted with sorrow, the next born child often took the name of its departed sibling. 

For Zelizer, the difference between this ambivalence and our reverence for young life is exactly the point. She argues that children became “sacralized” in the late 1800s and early 1900s—a process that transformed children from un-sentimentalized but economically useful little people to economically useless yet emotionally priceless treasures. 

This process is evident in a variety of domains. Middle class reformers led a movement against child labor, successfully passing legislation despite the objections of working class parents who relied on their children’s contributions to the family finances. Reducing infant mortality became a primary public health concern. Car accidents that killed children incited previously incomprehensible expressions of sorrow and outrage that manifested in public memorials. 

As childhood became “sacralized,” economic reality adjusted. Children stopped working at factories and instead took paper routes or received allowances. Whereas foster parents once preferred to adopt adolescents (whose labor they could benefit from), legal adoption became more common, and foster parents overwhelmingly chose useless but adorable babies over teenagers. In wrongful death and insurance cases involving children, courts no longer compensated parents on the basis of a child’s ability to earn money, but on the basis of their sentimental value and the suffering caused by their death. 

Colonial Americans buried infants without fuss, but in the 20th century, parents read books that advised them on how to cope with the unbearable loss of a child.

Pricing the Priceless Child was first published in 1985, and it has become a signature work for its record of how the meaning of childhood changed over time, similar to descriptions of how the idea of “teen-age” boys and girls was born in the 1940s. 

But Zelizer also saw herself as critiquing writers “from Karl Marx to Gary Becker, whose explanatory models assume the primacy of economic motivation." Just as economics can influence culture (paying for sex changes its meaning, and the level of inequality in a country can shape its values), Zelizer wanted people to appreciate that culture can influence economics (making children sacred removes them from the labor pool, among other changes). 

As Zelizer acknowledges, economic factors played a role in the changing conceptualization of childhood. Some workers supported child labor laws to reduce wage competition, and the need for a long period of education before entering the workforce changed the economic life of middle class children. According to Zelizer, however, economics alone cannot account for why childhood so quickly became seen as a precious, protected period—especially among working class parents who had benefitted from their children’s wages. 

In other words, culture rather than economics was in the driver’s seat. 

The dramatic changes in how we conceive of childhood remind us that ascribing outcomes to “the market” can easily obscure how the inputs of supply and demand are coloured by changing social and cultural factors. A cost-benefit analysis of national parks will yield very different answers to a nation of couch potatoes compared to a nation of John Muir outdoorsmen. Space tourism will be viable if people value the experience—and untenable if risk-aversion wins out. 

Children are our future, but it’s only recently that they’ve been valued as such.

Our next article explores why some athletes say they use cannabis for athletic purposes. To get notified when we post it    join our email list.

An earlier version of this article was published on August 29, 2013.

Want to write for Priceonomics? We are hiring a full-time staff writer and looking for freelance contributors.



This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.
Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting.

01 Jul 10:59

How AOL kept its free disk campaign to itself - parker higgins dot net

by brandizzi

AOL’s “carpet-bombing” free disk campaign in the 90s and 2000s worked incredibly well. But the woman responsible for it, Jan Brandt, wouldn’t let anyone acknowledge that, for fear of encouraging copycats. And while she didn’t speak much to the press at the time, she let loose in an interview with the Internet History Podcast in 2014. (Side note: I’ve been listening non-stop to episodes of this show, and they’re amazing.)

This is my favorite anecdote from her interview, where she explains how nervous she was that AOL’s competitors would follow their strategy.

http://parkerhiggins.net/wp-content/uploads/2016/06/brandt-aol-cds.mp3

I say I wake up every morning worried that I’m going to see Prodigy or CompuServe using the disks the way that we’re using them. That I’m going to see it stuck onto the front of a magazine, or that I’m going to see it in the mail.

And the thing that was really interesting about that point, and one of the reasons—you know, I gave very few interviews. In fact, it’s noted somewhere that I really wouldn’t talk to the press at that point, and the reason I wouldn’t—and I would never have talked to them then the way that I’m talking to you about it now—is because I felt like I was sitting there with the secret sauce, and everyone was going to want to know what were the responses? What were the costs? And I wasn’t going to tell them. So I didn’t think I’d make for a good story.

But Ted Leonsis was once on a panel with someone from CompuServe. And the guy from CompuServe, I don’t remember who it was at the time, said to Ted, “You guys are crazy, and the person running marketing has got to be a nutcase with the amount of money that you’re spending on these disks.”

Ted comes back and reports this to me, and I said, “Next time someone says that, agree that I’m a dumb broad, and that you’ve been trying to get me fired from the company for a long time and you haven’t been able to figure out why you haven’t been able to do that.” And the reason for that, really, is that I couldn’t believe that they weren’t trying it! And it’s because they were making a really common, frightfully common mistake about not understanding the economics of the business.

Listen to the whole episode and, really, the whole podcast.

Let's block ads! (Why?)

01 Jul 10:56

GUEST COMIC: Real Treasure.

itsthetie.com" alt="This wonderful guest comic brought to you by itsthetie.com" alt="" />
01 Jul 10:51

Click HERE for more Cluster Fudge



Click HERE for more Cluster Fudge

01 Jul 10:49

pride

by Lunarbaboon

30 Jun 10:53

Raindrops on windowwww.simonstalenhag.se









Raindrops on window

www.simonstalenhag.se

30 Jun 10:53

Catnap

by Doug
30 Jun 01:57

27-01-2016

by Laerte Coutinho

30 Jun 01:57

chmod what?

by CommitStrip

Strip-Chmod-(english)(650-final)

30 Jun 01:53

The Languages Which Almost Became CSS - Eager Blog

by brandizzi

In fact, it has been a constant source of delight for me over the past year to get to continually tell hordes (literally) of people who want to – strap yourselves in, here it comes – control what their documents look like in ways that would be trivial in TeX, Microsoft Word, and every other common text processing environment: “Sorry, you’re screwed.

— Marc Andreessen 1994

When HTML was announced by Tim Berners-Lee in 1991 there was no method of styling pages. How given HTML tags were rendered was determined by the browser, often with significant input from the user’s preferences. It seemed, however, like a good idea to create a standard way for pages to ‘suggest’ how they might prefer to be rendered stylistically.

But CSS wouldn’t be introduced for five years, and wouldn’t be fully implemented for ten. This was a period of intense work and innovation which resulted in more than a few competing styling methods which just as easily could have become the standard.

While these languages are obviously not in common use today, I find it fascinating to think about the world that might have been. Even more surprisingly, it happens that many of these other options include features which developers would love to see appear in CSS even today.

The First Proposal

In early 1993 the Mosaic browser had not yet reached 1.0 and those browsers that did exist dealt solely with HTML. There was no method of specifying the style of HTML whatsoever, meaning whatever the browser decided an <h1> should look like, that’s what you got.

In June of that year, Robert Raisch made a proposal to the www-talk mailing list to create a “an easily parsable format to deliver stylistic information along with Web documents” which would be called RRP.

@BODY fo(fa=he,si=18)

You would be forgiven for having no idea what this code is doing. In the era before gzipping, and with connection speeds hovering around 14.4k, it made sense to make the content of this new format as terse as was possible. This particular rule is setting the font family (fa) to helvetica (he), and the font size (si) to 18 points.

Some interesting things missing from this proposal were any mention of units, all numbers being interpreted based on their context (font sizes were always in points for example). This could be attributed to RRP being designed more as a “set of HINTS or SUGGESTIONS to the renderer” rather than a specification. This was considered necessary because the same stylesheet needed to function for both the common line-mode browsers (like Lynx), and the graphical browsers which were becoming increasingly popular.

Lynx browser screenshot

Interestingly, RRP did include a method of specifying a columnar layout, a feature which wouldn’t make it to CSS until 2011. For example, three columns, each of width ‘80 units’ would look like this:

@P co(nu=3,wi=80)

It’s a little hard to parse, but not much worse than white-space: nowrap perhaps.

It’s worth noting that RRP did not support any of the ‘cascading’ we associate with stylesheets today. A given document could only have one active stylesheet at a time, which is a logical way to think about styling a document, even if it’s foreign to us today.

Marc Andreessen (the creator of Mosaic, which would become the most popular browser) was aware of the RRP proposal, but it was never implemented by Mosaic. Instead, Mosaic quickly moved (somewhat tragically) down the path of using HTML tags to define style, introducing tags like <FONT> and <CENTER>.

Viola and the Proto-Browser Wars

Then why don't you just implement one of the many style sheet proposals that are on the table. This would pretty much solve the problem if done correctly.

So then I get to tell people, "Well, you get to learn this language to write your document, and then you get to learn that language for actually making your document look like you want it to." Oh, they'll love that.

— Marc Andreessen 1994

Contrary to popular perception, Mosaic was not the first graphical browser. It was predated by ViolaWWW, a graphical browser originally written by Pei-Yuan Wei in just four days.

Viola browser screenshot

Pei-Yuan created a stylesheet language which supports a form of the nested structure we are used to in CSS today:

(BODY fontSize=normal
      BGColor=white
      FGColor=black
  (H1   fontSize=largest
        BGColor=red
        FGColor=white)
)

In this case we are applying color selections to the body and specifically styling H1s which appear within the body. Rather than using repeated selectors to handle the nesting, PWP used a parenthesis system which is evocative of the indentation systems used by languages like Stylus and SASS which are preferred by some developers to CSS today. This makes PWP’s syntax potentially better in at least one way than the CSS language which would eventually become the lingua franca of the web.

PWP is also notable for introducing the method of referring to external stylesheets we still use today:

<LINK REL="STYLE" HREF="URL_to_a_stylesheet">

ViolaWWW was unfortunately written to work chiefly with the X Windowing System which was only popular on Unix systems. When Mosaic was ported to Windows it quickly left Viola in the dust.

Stylesheets Before the Web

HTML is the kind of thing that can only be loved by a computer scientist. Yes, it expresses the underlying structure of a document, but documents are more than just structured text databases; they have visual impact. HTML totally eliminates any visual creativity that a document’s designer might have.

— Roy Smith 1993

The need for a language to express the style of documents long predates the Internet.

As you may know, HTML as we know it was originally based on a pre-Internet language called SGML. In 1987 the US Department of Defense decided to study if SGML could be used to make it easier to store and transmit the huge volume of documentation they deal with. Like any good government project, they wasted no time coming up with a name. The team was originally called the Computer-Aided Logistics Support team, then the Computer-aided Acquisition and Logistics Support team, then finally the Continuous Acquisition and Life-cycle Support initiative. In any case, the initials were CALS.

The CALS team created a language for styling SGML documents called FOSI which is an initialism which undoubtedly stands for some combination of four words. They published a specification for the language which is as comprehensive as it is incomprehensible. It does include one of my favorite nonsensical infographics to ever exist on the web.

One inviolate rule of the Internet is: more will always get done if you can prove someone wrong in the process. In 1993, just four days after Pei-Yuan’s proposal, Steven Heaney proposed that rather than “re-inventing the wheel,” it was best to use a variant of FOSI to style the web.

A FOSI document is itself written in SGML, which is actually a somewhat logical move given web developers existing familiarity with the SGML variant HTML. An example document looks like this:

<outspec>
  <docdesc>
    <charlist>
      <font size="12pt" bckcol="white" fontcol="black">
    </charlist>
  </docdesc>
  <e-i-c gi="h1"><font size="24pt" bckcol="red", fontcol="white"></e-i-c>
  <e-i-c gi="h2"><font size="20pt" bckcol="red", fgcol="white"></e-i-c>
  <e-i-c gi="a"><font fgcol="red"></e-i-c>
  <e-i-c gi="cmd kbd screen listing example"><font style="monoser"></e-i-c>
</outspec>

If you’re a bit confused what a docdesc or charlist are, so were the members of www-talk. The only contextual information given was that e-i-c means ‘element in context’. FOSI is notable however for introducing the em unit which has now become the preferred method for people who know more about CSS than you to style things.

The language conflict which was playing out was actually as old as programming itself. It was the battle of functional ‘lisp-style’ syntax vs the syntax of more declarative languages. Pei-Yuan himself described his syntax as “LISP’ish,” but it was only a matter of time until a true LISP variant entered the stage.

The Turing-Complete Stylesheet

For all its complexity, FOSI was actually perceived to be an interim solution to the problem of formatting documents. The long-term plan was to create a language based on the functional programming language Scheme which could enable the most powerful document transformations you could imagine. This language was called DSSSL. In the words of contributor Jon Bosak:

It’s a mistake to put DSSSL into the same bag as scripting languages. Yes, DSSSL is Turing-complete; yes, it’s a programming language. But a script language (at least the way I use the term) is procedural; DSSSL very definitely is not. DSSSL is entirely functional and entirely side-effect-free. Nothing ever happens in a DSSSL stylesheet. The stylesheet is one giant function whose value is an abstract, device-independent, nonprocedural description of the formatted document that gets fed as a specification (a declaration, if you will) of display areas to downstream rendering processes.

At its simplest, DSSSL is actually a pretty reasonable styling language:

(element H1
  (make paragraph
    font-size: 14pt
    font-weight: 'bold))

As it was a programming language, you could even define functions:

(define (create-heading heading-font-size)
  (make paragraph
    font-size: heading-font-size
    font-weight: 'bold))

(element h1 (create-heading 24pt))
(element h2 (create-heading 18pt))

And use mathematical constructs in your styling, for example to ‘stripe’ the rows of a table:

(element TR
  (if (= (modulo (child-number) 2)
        0)
    ...   ;even-row
    ...)) ;odd-row

As a final way of kindling your jealousy, DSSSL could treat inherited values as variables, and do math on them:

(element H1
  (make paragraph
    font-size: (+ 4pt (inherited-font-size))))

DSSSL did, unfortunately, have the fatal flaw which would plague all Scheme-like languages: too many parenthesis. Additionally, it was arguably too complete of a spec when it was finally published, making it intimidating to browser developers. The DSSSL spec included over 210 separate styleable properties.

The team did go on to create XSL, a language for document transformation which is no less confusing, but which would be decidedly more popular.

Why Did The Stylesheet Cross The Wire

CSS does not include parent selectors (a method of styling a parent based on what children it contains). This fact has been long bemoaned by Stack Overflow posters, but it turns out there is a very good reason for its absence. Particularly in the early days of the Internet, it was considered critically important that the page be renderable before the document has been fully loaded. In other words, we want to be able to render the beginning of the HTML to the page before the HTML which will form the bottom of the page has been fully downloaded.

A parent selector would mean that styles would have to be updated as the HTML document loads. Languages like DSSSL were completely out, as they could perform operations on the document itself, which would not be entirely available when the rendering is to begin.

The first contributor to bring up this issue and propose a workable language was Bert Bos in March of 1995. His proposal also contains an early edition of the ‘smiley’ emoticon :-).

The language itself was somewhat ‘object-oriented’ in syntax:

*LI.prebreak: 0.5
*LI.postbreak: 0.5
*OL.LI.label: 1
*OL*OL.LI.label: A

Using . to signify direct children, and * to specify ancestors.

His language also has the cool property of defining how features like links work in the stylesheet itself:

*A.anchor: !HREF

In this case we specified that the destination of the link element is the value of its HREF attribute. This idea, that the behavior of elements like links should be controllable, was popular in several proposals. In the era pre-JavaScript, there was not an existing way of controlling such things, so it seemed logical to include it in these new proposals.

One functional proposal, introduced in 1994 by a gentleman with the name ‘C.M. Sperberg-McQueen’, includes the same behavior functionally:

(style a
  (block #f)     ; format as inline phrase
  (color blue)   ; in blue if you’ve got it
  (click (follow (attval 'href)))  ; and on click, follow url

His language also introduced the content keyword as a way of controlling the content of an HTML element from the stylesheet, a concept which was later introduced into CSS 2.1.

What Might Have Been

Before I talk about the language which actually became CSS, it’s worth mentioning one other language proposal if only because it is in some ways the thing of an early web developer’s dreams.

PSL96 was, in the naming convention of the time, the 1996 edition of the “Presentation Specification Language.” At its core, PSL looks like CSS:

H1 {
  fontSize: 20;
}

It quickly gets more interesting however. For example, you could express element position based on not just the sizes specified for them (Width), but the actual (Actual Width) sizes the browser rendered them as:

LI {
  VertPos: Top = LeftSib . Actual Bottom;
}

You’ll also notice you can use the elements left sibling as a constraint.

You can also add logical expressions to your styles. For example to style only anchor elements which have hrefs:

A {
  if (getAttribute(self, "href") != "") then
    fgColor = "blue";
    underlineNumber = 1;
  endif
}

That styling could be extended to do all manner of things we resort to classes today to accomplish:

LI {
  if (ChildNum(Self) == round(NumChildren(Parent) / 2 + 1)) then
    VertPos: Top = Parent.Top;
    HorizPos: Left = LeftSib.Left + Self.Width;
  else
    VertPos: Top = LeftSib.Actual Bottom;
    HorizPos: Left = LeftSib.Left;
  endif
}

Support for functionality like this could have perhaps truly enabled the dream of separating content from style. Unfortunately this language was plagued by being a bit too extensible, meaning it would have been very possible for its implementation to vary considerably from browser to browser. Additionally, it was published in a series of papers in the academic world, rather than on the www-talk mailing list where most of the functional work was being done. It was never integrated into a mainstream browser.

The Ghost of CSS Past

The language which, at least in name, would directly lead to CSS was called CHSS (Cascading HTML Style Sheets), proposed in 1994 by Håkon W Lie.

Like most good ideas, the original proposal was pretty nutty.

h1.font.size = 24pt 100%
h2.font.size = 20pt 40%

Note the percentages at the end of rules. This percentage referred to how much ‘ownership’ the current stylesheet was taking over this value. For example, if a previous stylesheet had defined the h2 font size as 30pt, with 60% ownership, and this stylesheet styled h2s as 20px 40%, the two values would be combined based on their ownership percentage to get some value around 26pt.

It is pretty clear how this proposal was made in the era of document-based HTML pages, as there is no way compromise-based design would work in our app-oriented world. Nevertheless, it did include the fundamental idea that stylesheets should cascade. In other words, it should be possible for multiple stylesheets to be applied to the same page.

It its original formulation, this idea was generally considered important because it gave the end user control over what they saw. The original page would have one stylesheet, and the web user would have his or her own stylesheet, and the two would be combined to render the page. Supporting multiple stylesheets was viewed as a method of maintaining the personal-freedom of the web, not as a way of supporting developers (who were still coding individual HTML pages by hand).

The user would even be able to control how much control they gave to the suggestions of the page’s author, as expressed in an ASCII diagram in the proposal:

       User                   Author
Font   o-----x--------------o 64%
Color  o-x------------------o 90%
Margin o-------------x------o 37%
Volume o---------x----------o 50%

Like many of these proposals, it included features which would not make it into CSS for decades, if ever. For example, it was possible to write logical expressions based on the user’s environment:

AGE > 3d ? background.color = pale_yellow : background.color = white
DISPLAY_HEIGHT > 30cm ? http://NYT.com/style : http://LeMonde.fr/style

In a somewhat optimistic sci-fi vision of the future, it was believed your browser would know how relevant a given piece of content was to you, allowing it to show it to you at a larger size:

RELEVANCE > 80 ? h1.font.size *= 1.5

You Know What Happened Next

Microsoft is absolutely committed to open standards, especially on the Internet.

— John Ludeman 1994

Håkon Lie went on to simplify his proposal and, working with Bert Bos, published the first version of the CSS spec in December of 1996. Ultimately he would write his doctoral thesis on the creation of CSS, a document which was heroically helpful to me in writing this.

Compared to many of the other proposals, one notable fact of CSS is its simplicity. It can be easily parsed, easily written, and easily read. As with many other examples over the history of the Internet, it was the technology which was easiest for a beginner to pick up which won, rather than those which were most powerful for an expert.

It is itself a reminder of how incidental much of this innovation can be. For example, support for contextual selectors (body ol li) was only added because Netscape already had a method for removing borders from images that were hyperlinks, and it seemed necessary to implement everything the popular browser could do. The functionality itself added a significant delay to the implementation of CSS, as at the time most browsers didn’t keep a ‘stack’ of tags as they parsed HTML. This meant the parsers had to be redesigned to support CSS fully.

Challenges like this (and the widespread use of non-standard HTML tags to define style) meant CSS was not usable until 1997, and was not fully supported by any single browser until March of 2000. As any developer can tell you, browser support wasn’t anywhere close to standards compliant until just a few years ago, more than fifteen years after CSS’ release.

The Final Boss

If Netscape 4 ignored CSS rules applied to the <body> element and added random amounts of whitespace to every structural element on your page, and if IE4 got <body> right but bungled padding, what kind of CSS was safe to write? Some developers chose not to write CSS at all. Others wrote one style sheet to compensate for IE4’s flaws and a different style sheet to compensate for the blunders of Netscape 4.

— Jeffrey Zeldman

Internet Explorer 3 famously launched with (somewhat terrible) CSS support. To compete, it was decided that Netscape 4 should also have support for the language. Rather than doubling down on this third (considering HTML and JavaScript) language though, it was decided it should be implemented by converting the CSS into JavaScript, and executing it. Even better, it was decided this ‘JavaScript Style Sheet’ intermediary language should be accessible to web developers.

The syntax is straight JavaScript, with the addition of some styling-specific APIs:

tags.H1.color = "blue";
tags.p.fontSize = "14pt";
with (tags.H3) {
  color = "green";
}

classes.punk.all.color = "#00FF00"
ids.z098y.letterSpacing = "0.3em"

You could even define functions which would be evaluated every time the tag was encountered:

evaluate_style() {
  if (color == "red"){
    fontStyle = "italic";
  } else {
    fontWeight = "bold";
  }
}

tag.UL.apply = evaluate_style();

The idea that we should simplify the dividing line between styles and scripts is certainly reasonable, and is now even experiencing a resurgance of sorts in the React community.

JavaScript was itself a very new language at this time, but via some reverse engineering Internet Explorer had already added support for it into IE3 (as “JScript”). The bigger issue was the community had already rallied around CSS, and Netscape was, at this time, viewed as bullies by much of the standards community. When Netscape did submit JSSS to the standards committee, it fell on deaf ears. Three years later, Netscape 6 dropped support for JSSS and it died a (mostly) quiet death.

What Might Have Been

Thanks to some public shaming by the W3C , Internet Explorer 5.5 launched with nearly complete CSS1 support in the year 2000. Of course, as we now know, browser CSS implementations were heroically buggy and difficult to work with for at least another decade. Today the situation has fortunately improved dramatically, allowing developers to finally realize the dream of writing code once and trusting it will function (almost) the same from browser to browser.

My personal conclusion from all of this is the realization of just how arbitrary and contextual many of the decisions which govern our current tools were. If CSS was designed the way it is just to satisfy the constraints of 1996, then maybe that gives us permission 20 years later to do things a little differently.


In our next blog post we expose the tremendous innovation that allowed a copper wire to evolve from morse code to 10 Gbps Cat6 ethernet. Subscribe below to be notified when it’s released.

Like this post? Share it with your followers.

Let's block ads! (Why?)

29 Jun 11:26

How do you make the Olympics pay? Fudge the figures

by Tim Harford
Adam Victor Brandizzi

Nice tricks :)

Undercover Economist

‘Hosting the games is not unlike building a church for one single, glorious wedding celebration’

Rio de Janeiro is about to host the Olympic Games. Good luck to it. Brazil is burdened by a political struggle that has seen President Dilma Rousseff impeached, a sharp economic downturn and a public health crisis in the form of the Zika virus. On top of that, Rio has to stage the Olympics.

Don’t get me wrong: I loved the London 2012 Olympics. It was a superb spectacle in its own right and there’s an impressive legacy — some great sporting facilities, a lovely park and new housing in a city that desperately needs it. I just doubt that it was worth what it cost. Very few Olympic Games are.

This shouldn’t really be a surprise: hosting the games is not unlike building a church for one single, glorious wedding celebration. The expensive facilities will only be fully used for a short time. They will then either be underutilised or, at best, cleverly reworked at some expense. It’s possible to adjust and dye a wedding dress so that it can be worn again but this is a pricey way to get a posh frock.

A new survey by economists Robert Baade and Victor Matheson provides a good starting point to understand the problem. Every host of the summer Olympics from Seoul in 1988 to Rio in 2016 has spent many billions of dollars on the games. The cheapest by some margin was Atlanta in 1996, which cost the equivalent of $3.6bn in today’s money; the most expensive was Beijing in 2008, a national vanity project that cost an astonishing $45bn. A reasonable assumption is that today it costs at least $10bn to host a summer Olympics — the last to be cheaper was Sydney in 2000. (These numbers are collated by Baade and Matheson.)

Given likely costs of more than $10bn, an Olympic Games is all but guaranteed to lose money. A host city might expect roughly $4bn in revenue: $1bn from ticket sales, $1bn from sponsors, $1bn from local broadcast rights and $1bn as a share of the International Olympic Committee’s global broadcast deals.

How on earth to make the numbers stack up, then?

The answer is simple: fudge them. The London Olympics and Paralympics provide a shining example. Afterwards, the government reported that the final cost of £8.77bn (around $13bn) was more than £500m “under budget”, which is true after a fashion, since the budget had been revised to £9bn several years before. But the original estimate for the games, back in 2005, was £2.4bn. If you can say that an event that cost almost four times the original estimate was “under budget”, you can say anything you like. At least the London organising committee didn’t emulate its counterpart at Nagano, the host of the 1998 Winter Olympics, and burn its financial records after the event.

Organising committees are always sure to hire consultants to produce enormous estimates of the spillover benefits of hosting the games. These consultant reports generally ignore substitution effects — for example, that a dollar spent on an Olympic ticket might well be a dollar not spent on some other local attraction. They also gloss over the risk of “crowding out”, where, fearing crowds and high prices, some tourists avoid Olympic cities. The UK had fewer visitors during July and August in 2012 than in the same months in 2011; Beijing’s hotels suffered a fall in occupancy during the 2008 Olympics.

Faced with PR fluff, the rule of thumb among serious economists is to divide all such benefits by 10 to get a more realistic figure. Most rigorous studies have found very modest spillover benefits at best.

In the case of the Sydney Olympics, researchers concluded that the wider Australian economy had actually been damaged by hosting the games.

But what if it’s not enough just to claim that hosting the games makes sense? What if the host city actually hopes to turn a profit, rather than merely forecast one — or, at least, to produce broader benefits that justify the expense? That’s a tall order, but here are three suggestions.

First, make sure the games take place during a recession, so that the spending can boost aggregate demand. Rio did get this one right but, of course, nobody can forecast recessions eight months ahead of time, let alone eight years.

Second, be a hidden gem, so the games serve to spotlight your qualities and boost tourism for many years afterwards. Rio, London, Beijing, Athens and Sydney hardly qualify here but Barcelona did: in 1990 the city was half as popular as Madrid with tourists but, by 2010, it had outstripped its rival. The Olympics can perhaps take some credit. Utah, similarly, enjoyed greater success as a destination for skiers after the Salt Lake City winter games. (Candidates for the 2024 games include Paris and Rome, not exactly well-kept secrets — and Budapest, which is a more plausible candidate to earn a lasting boost from tourism.)

Third, and most importantly, launch a cut-price bid in the wake of a disastrous games. Los Angeles in 1984 achieved the near-impossible and turned a profit because, after the ruinously expensive Montreal event of 1976, LA was the sole bidder for the games. They were hosted in the Los Angeles Coliseum, an ageing stadium that had been second-hand even when it first hosted the Olympics in 1932.

The best way to host a profitable Olympics is to do it twice, both times on the cheap.

Written for and first published at ft.com.

Free email updates

(You can unsubscribe at any time)

Email Address

29 Jun 01:41

Capitalismo de compadrio não é um problema cultural

by Leonardo Monasterio
Eu costumo dizer -  um pouco brincando- que "cultura não importa". No caso da discussão sobre o crony capitalism, no entanto, eu falo a sério: a chave está nos incentivos econômicos.
O historiador econômico Stephen Haber resume isso bem na introdução de um livro jóia sobre o assunto. A lógica é a seguinte: em termos ideais, quando há boas instituições, os empresários sabem que não serão expropriados pelo governo. Este taxa todo mundo, ganha o seu, mas não distribui privilégios. Logo, não há sentido em ser amigo do governo,  nem financiar campanhas.
Agora, quando as instituições são ruins e o poder discricionário do governo é grande, surge um dilema. Como o empresário vai investir se sabe que uma hora qualquer as regras podem mudar contra si? Sem investimento, não há o que tributar.  A solução mútua é transformar o governo em sócio de alguns empresários. Assim, cria-se um compromisso crível: o governo não vai passar a perna nas empresas de quem é "amigo" pois tem uma parcela no negócio. É uma solução institucional quebra-galho, que beneficia uns, mas é ruim para a economia como um todo,
No Brasil, os órgãos de controle e a Polícia Federal estão fazendo o melhor para coibir o capitalismo de compadrio, mas eles continuarão a ter muito trabalho se o Estado preservar seu poder discricionário. Quanto maior este for, maior será a pressão para "amizades" governo-empresas. Isso acontece em todo canto, em toda época.
Então esqueçam a explicação culturalista que culpa a mentalidade ibérica- ou a algo no ar do Brasil-  pelo crony capitalism. Reformas que reduzam a possibilidade de arbítrio estatal seriam a maior arma contra o compadrio.
29 Jun 01:35

30 Behaviors That Will Make You Unstoppable — The Mission — Medium

by brandizzi

30 Behaviors That Will Make You Unstoppable

This article originally appeared at SUCCESS.

A lot of people are good at what they do. Some are even elite. A select few are completely unstoppable.

Those who are unstoppable are in their own world. They don’t compete with anyone but themselves. You never know what they will do — only that you will be forced to respond. Even though they don’t compete with you, they make you compete with them.

Are you unstoppable? By the end of this blog you will be.

Let’s get started:

1. Don’t think — know and act.

“Don’t think. You already know what you have to do, and you know how to do it. What’s stopping you?” — Tim Grover

Rather than analyzing and thinking, act. Attuned to your senses, and with complete trust in yourself, do what you instinctively feel you should. As Oprah has said, “Every right decision I have ever made has come from my gut. Every wrong decision I’ve made was the result of me not listening to the greater voice of myself.”

The moment you start thinking, you’ve already lost. Thinking swiftly pulls you out of the zone.

2. Always be prepared so you have the freedom to act on instinct.

“Just as the yin-yang symbol possesses a kernel of light in the dark, and of dark in the light, creative leaps are grounded in a technical foundation.” — Josh Waitzkin

Become a master of your craft. While everyone else is relaxing, you’re practicing and perfecting. Learn the left-brained rules in and out so your right brain can have limitless freedom to break the rules and create.

With enhanced consciousness, time will slow down for you. You’ll see things in several more frames than others. While they’re trying to react to the situation, you’ll be able to manipulate and tweak the situation to your liking.

3. Don’t be motivated by money or anything external.

Having nice things is, well, nice. But for you, it’s never been about the money, prestige or anything else outside of you. Take these things away and nothing changes for you. You’re still going to be pushing your personal limits and giving it your all. Give these things to you and they won’t destroy you like they do most people.

4. Never be satisfied.

“The drive to close the gap between near-perfect and perfect is the difference between great and unstoppable.” — Tim Grover

Even after you achieve a goal, you’re not content. For you, it’s not even about the goal. It’s about the climb to see how far you can push yourself.

Does this make you ungrateful? Absolutely not. You’re entirely humbled and grateful for everything in your life. Which is why you will never get complacent or lazy.

To quote Jim Rohn, “the way to enjoy life best is to wrap up one goal and start right on the next one. Don’t linger too long at the table of success, the only way to enjoy another meal is to get hungry.”

5. Always be in control.

Unlike most people, who are dependent on substances or other external factors, you are in control of what you put in your body, how you spend your time and how long you stay in the zone.

Act based on instinct, not impulse. Just because you could doesn’t mean you do. And when you do, it’s because you want to, not because you have to.

6. Be true to yourself.

Although 70 percent of US employees hate their jobs and only one in three Americans report being happy, relentless and unstoppable people purge everything from their life they hate.

Have the self-respect and confidence to live life on your terms. When something isn’t right in your life, change it. Immediately.

7. Never let off the pressure.

“Pressure can bust pipes, but it also can make diamonds.” — Tim Grover

Most people can handle pressure in small doses. But when left to their own devices, they let off the pressure and relax.

Not you. You never take the pressure off yourself. Instead, you continuously turn-up the pressure. It’s what keeps you alert and active.

8. Don’t be afraid of the consequences of failure.

Most people stay close to the ground, where it’s safe. If they fall, it won’t hurt that bad. But when you choose to fly high, the fall may kill you. And you’re OK with that. To you, there is no ceiling and there is no floor. It’s all in your head. If something goes wrong — if you “fail” — you adjust and keep going.

9. Don’t compete with others. Make them compete with you.

Most people are competing with other people. They continuously check-in to see what others in their space (their “competition”) are doing. As a result, they mimic and copy what’s “working.”

Conversely, you’ve left all competition behind. Competing with others makes absolutely zero sense to you. It pulls you from your authentic zone. So you zone out all the external noise and instead zone in to your internal pressure to produce.

10. Never stop learning.

Ordinary people seek entertainment. Extraordinary people seek education and learning. When you want to become the best at what you do, you never stop learning. You never stop improving and honing your skills and knowledge.

Your unparalleled preparation is what gives you power. No one else is willing to pay the price you’ve paid.

11. Success isn’t enough — it only increases the pressure.

For most people, becoming “successful” is enough. However, when you’re relentless, success only increases the pressure to do more. Immediately following the achievement of a goal, you’re focused on your next challenge.

12. Don’t get crushed by success.

“Success can become a catalyst for failure.” — Greg McKeown

Most people can’t handle success, authority or privilege. It destroys them. It makes them lazy. When they get what they want, they stop doing the very things that got them there. The external noise becomes too intense.

But for you, no external noise can push harder than your own internal pressure. It’s not about thisachievement, but the one after, and the one after that. There is no destination. Only when you’re finished.

13. Completely own it when you screw up.

“Implementing extreme ownership requires checking your ego and operating with a high degree of humility. Admitting mistakes, taking ownership and developing a plan to overcome challenges are integral to any successful team.”―Jocko Willink

No blame. No deception or illusion. Just the cold hard truth. When you mess up, you own it. And as the leader, you own it when your team fails. Only with extreme ownership can you have complete freedom and control.

14. Let your work speak for itself.

“Well done, is well said.” — Anthony Liccione

Cal Newport’s recent book, Deep Work, distinguishes “deep work” from “shallow work.” Here’s the difference:

Deep work is:

  • Rare
  • High value
  • And non-replicable (i.e., not easy to copy/outsource)

Shallow work is:

  • Common
  • Low value
  • Replicable (i.e., anyone can do it)

Talking is shallow. Anyone can do it. It’s easily replicated. It’s low value. Conversely, deep work is rare. It’s done by people who are focused and working while everyone else is talking. Deep work is so good it can’t be ignored. It doesn’t need words. It speaks for itself.

15. Always work on your mental strength.

“Mental resilience is arguably the most critical trait of a world-class performer, and it should be nurtured continuously. Left to my own devices, I am always looking for ways to become more and more psychologically impregnable. When uncomfortable, my instinct is not to avoid the discomfort but to become at peace with it. My instinct is always to seek out challenges as opposed to avoiding them.” — Josh Waitzkin

The better you can be under pressure, the further you’ll go than anyone else. Because they’ll crumble under pressure.

The best training you will ever do is mental training. Wherever your mind goes, your body follows. Wherever your thoughts go, your life follows.

16. Confidence is your greatest asset.

You’ve heard it before: Running a marathon is far more mental than physical. A person’s ability to run a marathon — or do anything hard — is more a reflection of their level of confidence than their actual ability.

Your confidence determines:

  • The size of challenges/goals you undertake
  • How likely you will achieve those goals
  • How well you bounce back from failures

If you’re not confident, you will never put yourself out there in the first place. When you’re confident, you don’t care how many times you fail, you’re going to succeed. And it doesn’t matter how stacked the odds seem against you.

17. Surround yourself with people who remind you of the future, not the past.

When you surround yourself with people who remind you of your past, you’ll have a hard time progressing. This is why we get stuck in certain roles, which we can’t break free from (e.g., the fat kid or shy girl).

Surrounding yourself with people who you want to be like allows you a fresh slate. You’re no longer defined by your past, only the future you are creating.

18. Let things go, but never forget.

Being unstoppable requires carrying no unnecessary mental or emotional baggage. Consequently, you’ll need to immediately and completely forgive anyone who has wronged you. However, forgiveness doesn’t mean you forget. And it doesn’t mean you have to do further business with those who have wronged you.

19. Have clear goals.

“While a fixation on results is certainly unhealthy, short-term goals can be useful developmental tools if they are balanced within a nurturing long-term philosophy.” — Josh Waitzkin

According to loads of psychology research, the most motivating goals are clearly defined and time-bound.

Your goals can either be focused on your behaviors (e.g., I’m going to write 500 words per day) or on the outcomes you’re seeking (e.g., I’m going to get published on The New York Times by June 1, 2016).

For most people, behaviorally-focused goals are the better and more motivating option. But when you crave the results so much that the work is irrelevant, your aim should be directed straight at the outcomes you want. However, results-focused goals are better when short-term and grounded in your long-term vision and philosophy. When your why is strong enough, the how will take care of itself.

20. Respond immediately, rather than analyzing or stalling.

“He who hesitates is lost.” — Cato

Anticipation of an event is always more extreme than the event itself — both for positive and negative events.

Just do it. Train yourself to respond immediately when you feel you should do something. Stop questioning yourself. Don’t analyze it. Don’t question if it came from God or from yourself. Just act.

You’ll figure out what to do after you’ve taken action. Until you take action, it will all be hypothetical. But once you act, it becomes practical.

21. Choose simplicity over complication.

“If you can’t explain it simply, you don’t understand it well enough.” — Albert Einstein

It’s easy to be complicated. Most of the research and jargon in academia and business is over-complicated.

Cutting to the core and hitting the truth is hard, because it’s simple. As Leonardo da Vinci has said, “Simplicity is the ultimate sophistication.”

Very few people will give you the truth. When you ask them a question, it gets mighty complicated. “There are so many variables” or “It depends” they say.

T. S. Eliot said it best, “Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?”

Wisdom is timeless and simple. Learn wisdom and choose it.

22. Never be jealous or envious of someone else’s accomplishments.

Being unstoppable means you genuinely want what’s best for everyone — even those you would consider your competitors. Jealousy and envy are the ego — which operates out of fear.

The reason you are happy for other people’s success is because their success has nothing to do with you.

You are in control of you. And you are different from every other person. There is no one who can do exactly what you can do. You have your own superpower with your own unique ability to contribute. And that’s what you’re going to do.

23. Take the shot every time.

“If I fail more than you, I win.” — Seth Godin

You miss every shot you don’t take. And most people don’t want to take the shot. Fear of failure paralyzes them.

The only way you can become unstoppable is if you stop thinking about it. Just take the shot. Don’t do it only when it’s convenient or when you feel ready. Just go and make whatever adjustments you need after the fact.

24. Don’t get caught up in the results of your success. Always remain focused on what got you those results: the work.

When you start doing noteworthy stuff, there are benefits that can become distractions. It can get easy to “ride the wave” of your previous work. Keep practicing. Perfect your craft. Never forget what got you here.

25. Think and act 10X.

“When 10X is your measuring stick, you immediately see how you can bypass what everyone else is doing.”— Dan Sullivan

Most people — even those you deem to be “world class” — are not operating at 10X. In truth, you could surpass anyone if you radically stretch your thinking and belief system.

Going 10X changes everything. As Dan Sullivan has said, “10X thinking automatically takes you ‘outside the box’ of your present obstacles and limitations.” It pulls you out of the problems most people are dealing with and opens you to an entirely new field of possibilities.

When you take your goal of earning $100,000 this year and change it to $1,000,000, you’re forced to operate at a different level. The logical and traditional approach doesn’t work with 10X. As Shane Snow, author of Smartcuts: How Hackers, Innovators, and Icons Accelerate Success,has said, “10x progress is built on bravery and creativity instead. Working smarter.”

The question is: Are you willing to go there? Not just entertain the thought for a second or two and then revert back to common thinking. No. Are you willing to sit with 10X thinking? Are you willing to question your own thought processes and open yourself to believing an entirely different set of possibilities?

Could you convince yourself to believe in your 10X potential? Are you willing to undertake goals that seems lunacy, to you and everyone else? Are you willing to take the mental leap, trusting “the universe will conspire to make it happen”?

26. Set goals that far exceed your current capabilities.

“You need to aim beyond what you are capable of. You need to develop a complete disregard for where your abilities end. If you think you’re unable to work for the best company in its sphere, make that your aim. If you think you’re unable to be on the cover of TIME magazine, make it your business to be there. Make your vision of where you want to be a reality. Nothing is impossible.” — Paul Arden

If your goals are logical, they won’t force you to create luck. Being unstoppable means your goals challenge you to be someone more than you currently are. As Jim Rohn has said, “Don’t wish it was easier, wish you were better.”

27. Make time for recovery and rejuvenation.

“Wherever you are, make sure you’re there.” — Dan Sullivan

When you focus on results, rather than being busy, you’re 100 percent on when you’re working and 100 percent off when you’re not. This not only allows you to be present in the moment, but it allows you the needed time to rest and recover.

Your ability to work at a high level is like fitness. If you never take a break between sets, you won’t be able to build strength, stamina and endurance. However, not all “rest” produces recovery. Certain things are more soothing than others.

Recovering from my work generally consists of writing in my journal, listening to music, spending time with my wife and kids, preparing and eating delicious food, or serving other people. These things rejuvenate me. They make my work possible, but also meaningful.

28. Start before you’re ready.

“The best time to plant a tree was 20 years ago. The second best time is now.” — Chinese Proverb

Most people wait. They believe they can start after they have enough time, money, connections and credentials. They wait until they feel “secure.” Not people who are unstoppable.

Unstoppable people started last year. They started five years ago before they even knew what they were doing. They started before they had any money. They started before they had all the answers. They started when no one else believed in them. The only permission they needed was the voice inside them prompting them to move forward. And they moved.

29. If you need permission, you probably shouldn’t do it.

A mentor of mine is a highly successful real estate investor. Throughout his career, he’s had hundreds of people ask him if they should “go into real-estate.”

He tells every one of them the same thing: that they shouldn’t do it. In fact, he actually tries talking most of them out of it. And in most cases he succeeds.

Why would he do that? “Those who are going to succeed will do so regardless of what I say,” he told me.

I know so many people who chase whatever worked for other people. They never truly decide what they want to do, and end up jumping from one thing to the next — trying to strike quick gold. And repetitively, they stop digging just a few feet from the gold after resigning the spot is barren.

No one will ever give you permission to live your dreams.

30. Don’t make exceptions.

Zig Ziglar used to tell a story of traveling one day and not getting in bed until 4 a.m. An hour and a half later (5:30), his alarm went off. He said, “Every fiber of my being was telling me to stay in bed.” But he had made a commitment, so he got up anyway. Admittedly, he had a horrible day and wasn’t productive at all.

Yet, he says that decision changed his life. As he explains:

“Had I bowed to my human, physical, emotional and mental desire to sleep in, I would have made that exception. A week later, I might have made an exception if I only got four hours of sleep. A week later, maybe I only got seven hours of sleep. The exception so many times becomes the rule. Had I slept in, I would’ve faced that danger. Watch those exceptions!”

Hence, Zig was unstoppable.

Conclusion

“From this point, your strategy is to make everyone else get on your level, you’re not going down to theirs. You’re not competing with anyone else, ever again. They’re going to have to compete with you. From now on, the end result is all that matters.” — Tim Grover

When you’re unstoppable, you will make sure to get what you want. Everything you need to know is already within you. All you need to do is trust yourself and act.

Are you unstoppable?

Did this article inspire you?

If so, I challenge you to sign up for my free newsletter. You’ll immediately receive a list of my most powerful articles. You will also receive my free eBook that will change your life.

This is your time. You can be, do, and have anything you want in life. The future is in your hands.

Have an amazing day!

Let's block ads! (Why?)

29 Jun 01:31

Defensive BASH programming - Say what?

by brandizzi

Here is my Katas for creating BASH programs that work. Nothing is new here, but from my experience pepole like to abuse BASH, forget computer science and create a Big ball of mud from their programs.
Here I provide methods to defend your programs from braking, and keep the code tidy and clean.

Immutable global variables

  • Try to keep globals to minimum
  • UPPER_CASE naming
  • readonly decleration
  • Use globals to replace cryptic $0, $1, etc.
  • Globals I allways use in my programs:
1
2
3
readonly PROGNAME=$(basename $0)
readonly PROGDIR=$(readlink -m $(dirname $0))
readonly ARGS="$@"

Everything is local

All variable should be local.

1
2
3
4
5
6
7
change_owner_of_file() {
    local filename=$1
    local user=$2
    local group=$3

    chown $user:$group $filename
}

1
2
3
4
5
6
7
8
9
10
11
change_owner_of_files() {
    local user=$1; shift
    local group=$1; shift
    local files=$@
    local i

    for i in $files
    do
        chown $user:$group $i
    done
}

  • self documenting parameters
  • Usually for loop use i variable, so it is very important that you declare it as local.
  • local does not work on global scope.
1
2
kfir@goofy ~ $ local a
bash: local: can only be used in a function

main()

  • Help keep all variables local
  • Intuitive for functional programming
  • The only global command in the code is: main
1
2
3
4
5
6
7
8
9
10
main() {
    local files="/tmp/a /tmp/b"
    local i

    for i in $files
    do
        change_owner_of_file kfir users $i
    done
}
main

Everything is a function

  • The only code that is running globaly is:
    • Global declerations that are immutable.
    • main
  • Keep code clean
  • procedures become descriptive
1
2
3
main() {
    local files=$(ls /tmp | grep pid | grep -v daemon)
}

1
2
3
4
5
6
7
8
9
10
11
temporary_files() {
    local dir=$1

    ls $dir \
        | grep pid \
        | grep -v daemon
}

main() {
    local files=$(temporary_files /tmp)
}

  • Second example is much better. Finding files is the problem of temporary_files() and not of main()’s. This code is also testable, by unit testing of temporary_files().
  • If you try to test the first example, you will mish mash finding temporary files with main algorithm.
1
2
3
4
5
6
7
8
9
10
11
12
test_temporary_files() {
    local dir=/tmp

    touch $dir/a-pid1232.tmp
    touch $dir/a-pid1232-daemon.tmp

    returns "$dir/a-pid1232.tmp" temporary_files $dir

    touch $dir/b-pid1534.tmp

    returns "$dir/a-pid1232.tmp $dir/b-pid1534.tmp" temporary_files $dir
}

As we see, this test does not concern main().

Debugging functions

  • Run program with -x flag:
1
bash -x my_prog.sh

  • debug just a small section of code using set -x and set +x, which will print debug info just for the current code wrapped with set -x … set +x.
1
2
3
4
5
6
7
8
9
temporary_files() {
    local dir=$1

    set -x
    ls $dir \
        | grep pid \
        | grep -v daemon
    set +x
}

  • Printing function name and its arguments:
1
2
3
4
5
6
7
8
temporary_files() {
    echo $FUNCNAME $@
    local dir=$1

    ls $dir \
        | grep pid \
        | grep -v daemon
}

So calling the function:

1
temporary_files /tmp

will print to the standard output:

1
temporary_files /tmp

Code clarity

What this code do?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
main() {
    local dir=/tmp

    [[ -z $dir ]] \
        && do_something...

    [[ -n $dir ]] \
        && do_something...

    [[ -f $dir ]] \
        && do_something...

    [[ -d $dir ]] \
        && do_something...
}
main

Let your code speak:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
is_empty() {
    local var=$1

    [[ -z $var ]]
}

is_not_empty() {
    local var=$1

    [[ -n $var ]]
}

is_file() {
    local file=$1

    [[ -f $file ]]
}

is_dir() {
    local dir=$1

    [[ -d $dir ]]
}

main() {
    local dir=/tmp

    is_empty $dir \
        && do_something...

    is_not_empty $dir \
        && do_something...

    is_file $dir \
        && do_something...

    is_dir $dir \
        && do_something...
}
main

Each line does just one thing

  • Break expression with back slash \
    For example:
1
2
3
4
5
temporary_files() {
    local dir=$1

    ls $dir | grep pid | grep -v daemon
}

Can be written much cleaner:

1
2
3
4
5
6
7
temporary_files() {
    local dir=$1

    ls $dir \
        | grep pid \
        | grep -v daemon
}

  • Symbols at the start of the line indented
    Bad example of symbols at the end:
1
2
3
4
5
6
7
temporary_files() {
    local dir=$1

    ls $dir | \
        grep pid | \
        grep -v daemon
}

Good example where we clearly see the connection between lines and the connecting rods:

1
2
3
4
5
6
7
print_dir_if_not_empty() {
    local dir=$1

    is_empty $dir \
        && echo "dir is empty" \
        || echo "dir=$dir"
}

Printing usage

Don’t do this:

1
2
3
echo "this prog does:..."
echo "flags:"
echo "-h print help"

It should be a function:

1
2
3
4
5
usage() {
    echo "this prog does:..."
    echo "flags:"
    echo "-h print help"
}

echo is repeated in each line. For that we have Here Document:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
usage() {
    cat <<- EOF
    usage: $PROGNAME options
    
    Program deletes files from filesystems to release space. 
    It gets config file that define fileystem paths to work on, and whitelist rules to 
    keep certain files.

    OPTIONS:
       -c --config              configuration file containing the rules. use --help-config to see the syntax.
       -n --pretend             do not really delete, just how what you are going to do.
       -t --test                run unit test to check the program
       -v --verbose             Verbose. You can specify more then one -v to have more verbose
       -x --debug               debug
       -h --help                show this help
          --help-config         configuration help

    
    Examples:
       Run all tests:
       $PROGNAME --test all

       Run specific test:
       $PROGNAME --test test_string.sh

       Run:
       $PROGNAME --config /path/to/config/$PROGNAME.conf

       Just show what you are going to do:
       $PROGNAME -vn -c /path/to/config/$PROGNAME.conf
    EOF
}

Pay attention that there should be real tab ‘\t’ in the start of the line for each line.
In vim you can use this replace command if your tab is 4 spaces:

1
:s/^    /\t/

Command line arguments

Here is an example to complement the usage function above. I got this code from Kirk’s blog post - bash shell script to use getopts with gnu style long positional parameters:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
cmdline() {
    # got this idea from here:
    # http://kirk.webfinish.com/2009/10/bash-shell-script-to-use-getopts-with-gnu-style-long-positional-parameters/
    local arg=
    for arg
    do
        local delim=""
        case "$arg" in
            #translate --gnu-long-options to -g (short options)
            --config)         args="${args}-c ";;
            --pretend)        args="${args}-n ";;
            --test)           args="${args}-t ";;
            --help-config)    usage_config && exit 0;;
            --help)           args="${args}-h ";;
            --verbose)        args="${args}-v ";;
            --debug)          args="${args}-x ";;
            #pass through anything else
            *) [[ "${arg:0:1}" == "-" ]] || delim="\""
                args="${args}${delim}${arg}${delim} ";;
        esac
    done

    #Reset the positional parameters to the short options
    eval set -- $args

    while getopts "nvhxt:c:" OPTION
    do
         case $OPTION in
         v)
             readonly VERBOSE=1
             ;;
         h)
             usage
             exit 0
             ;;
         x)
             readonly DEBUG='-x'
             set -x
             ;;
         t)
             RUN_TESTS=$OPTARG
             verbose VINFO "Running tests"
             ;;
         c)
             readonly CONFIG_FILE=$OPTARG
             ;;
         n)
             readonly PRETEND=1
             ;;
        esac
    done

    if [[ $recursive_testing || -z $RUN_TESTS ]]; then
        [[ ! -f $CONFIG_FILE ]] \
            && eexit "You must provide --config file"
    fi
    return 0
}

You use it like this, using the immutable ARGS variable we defined at the top:

1
2
3
4
main() {
    cmdline $ARGS
}
main

Unit Testing

  • very important in higher level languages
  • Use shunit2 for unit testing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
test_config_line_paths() {
    local s='partition cpm-all, 80-90,'

    returns "/a" "config_line_paths '$s /a, '"
    returns "/a /b/c" "config_line_paths '$s /a:/b/c, '"
    returns "/a /b /c" "config_line_paths '$s   /a  :    /b : /c, '"
}

config_line_paths() {
    local partition_line="$@"

    echo $partition_line \
        | csv_column 3 \
        | delete_spaces \
        | column 1 \
        | colons_to_spaces
}

source /usr/bin/shunit2

Here is another example using df command:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DF=df

mock_df_with_eols() {
    cat <<- EOF
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /very/long/device/path
                         124628916  23063572 100299192  19% /
    EOF
}

test_disk_size() {
    returns 1000 "disk_size /dev/sda1"

    DF=mock_df_with_eols
    returns 124628916 "disk_size /very/long/device/path"
}

df_column() {
    local disk_device=$1
    local column=$2

    $DF $disk_device \
        | grep -v 'Use%' \
        | tr '\n' ' ' \
        | awk "{print \$$column}"
}

disk_size() {
    local disk_device=$1

    df_column $disk_device 2
}

Here I have exception, for testing, I declare DF in the global scope not readonly. This is because of shunit2 not allowing to change global scope functions.

Let's block ads! (Why?)

29 Jun 01:20

Best CMS 2016

by CommitStrip
Adam Victor Brandizzi

Mas é claro, são os melhores mesmo. (Mas Liferay é melhor para grandes sites ;) )

29 Jun 01:18

The problem of peer review

by noreply@blogger.com (VD)
Peer review simply isn't what it is advertised to be; it is not only little more than editing, most of the time it is not even competent editing:
As a scientist with a 15 year career behind me so far, I am afraid that my experiences reflect this. Peer review is excellent in theory but not in practice. Much of the time, the only vetting the papers get are two relatively junior people in a field (often grad students or postdocs) giving it a thumbs up or thumbs down. That is absolutely it. In theory, the editors should make the decisions with the recommendations of the reviewers, but the editors rarely have the time or the expertise to judge the papers and often automatically defer to reviewers. Also, the papers should be reviewed by luminaries of the field, but these folks rarely have the time, and either decline invitations or bounce the work to a student or another trainee. It's not just bad papers that get through, but also good, rigorous, papers that are bounced by this system.

Many if not most of the people in academic science today, at least in biology (my field), are overwhelmed with the need to publish in such high volumes, few people with the needed expertise can afford the time to go over the results in detail. All this while, at the same time and for the same reason, the volume of papers that needs to be reviewed goes up. I've heard of (and had myself) papers havve lingered for 4+ months before they even went out for review.

And, in our rush to publish, we often don't read this literature carefully ourselves but start citing papers anyway, which weaves these potentially weak or erroneous papers even more tightly into the fabric of their field.

It's difficult to care a lot about the quality of your work when you know the extra effort often doesn't help something go through this fickle review process, and when you know people will cite it without really reading it closely. There is little incentive to spend longer on a paper to make sure everything is right and the results are reproducible because there is very little accountability for errors and huge rewards for being prolific.
The ironic thing is that True Believers and the I Fucking Love Science crowd genuinely believe that "peer reviewed science" is the gold standard for evidence. But there is a reason scientific evidence is not automatically allowed in a court of law, let alone considered conclusive, and the more we learn about the defects of peer review, the better we understand that science's credibility is limited.

We have a word for science that is trustworthy, and that word is engineering. Until science can be applied, it cannot be fully trusted to be correct.

All peer review is really designed to do is to reassure the reader that the information presented fits safely within the confines of the consensus status quo.

Posted by Vox Day.
28 Jun 10:17

Recent events.image / twitter / facebook / patreon













Recent events.

image / twitter / facebook / patreon

28 Jun 10:17

The Flave

by Reza

flave

28 Jun 10:16

Photo



27 Jun 16:36

No. 1174: An Intellectual Legacy

by brandizzi
Adam Victor Brandizzi

História da família de George Boole.

Today, more on the matter of heredity or environment. The University of Houston's College of Engineering presents this series about the machines that make our civilization run, and the people whose ingenuity created them.

We hear a lot about nature vs. nurture. Are we formed genetically or by surroundings? Many families offer grist for that mill. Did Bach's children inherit their father's ability or were they just raised with the sound of music? Four generations of Bernoullis touched all of science and math. John and Abigail Adams's legacy included two presidents, an ambassador, and a great writer.

Let's follow one such family through four generations. We begin with an 18th-century English cobbler, John Boole -- an unschooled tradesman who loved to think. He taught himself Greek and read the classics in his spare time. He also built telescopes. At one point he hung a sign in his shop window:

Anyone who wishes to view the works of God in a spirit of reverence is invited to come in and look through my telescope.

John's son George was a prodigy. At 14 he published a translation of a Greek poem. He learned math on his own and, in 1844, won the Royal Society's gold medal in math. He's famous for his work on what we call Boolean logic -- the logic of your computer today.

In 1855 Boole married Mary Everest, an extremely bright woman and niece of the geographer that Mt. Everest was named for. George died early of pneumonia and left 32-year-old Mary with five daughters and no income. She managed to land a post as a librarian and occasional teacher of mathematics at Queen's College in London.

Mary diligently saw to the nurture of her daughters. She sold George's gold medal to buy a harmonium so they could have music. That act honored everything George had stood for, and it worked. One daughter became a chemistry teacher in a medical college. Another was a noted novelist. A third daughter was a homemaker who studied the geometry of hyperspace in her spare time. She ultimately won an honorary degree at the University of Gronigen.

Another daughter gave birth to a son who has been a presence in every aspect of my own work. He was Geoffrey Ingram Taylor, better known as G.I. Taylor. No one works long with fluid flow, turbulence, applied mechanics, the action of micro-organisms, or stability theory without reading fundamentals written by Taylor.

Yet Taylor, like everyone in that remarkable family, did nothing to aggrandize himself. His work was his pleasure. Long ago a graduate student of mine nerved himself up to write Taylor for advice on his problem. He got back a handwritten letter in which Taylor expressed his simple joy in the beauty of the phenomenon.

Finally, for all his fine work, Taylor was given that very same gold medal his grandmother had once sold. And we suddenly realize: Mary Boole hadn't really given up the medal at all. She'd simply reinvested it. Where genetics rides in all this, who can say? But the powerful presence of nurture is unmistakable.

I'm John Lienhard, at the University of Houston, where we're interested in the way inventive minds work.

(Theme music)

Let's block ads! (Why?)

26 Jun 12:07

Comic for 2016.06.26

by Rob DenBleyker
24 Jun 23:59

Don’t scar on the first cut

by Jason Fried

Many policies are organizational scar tissue — codified overreactions to situations that are unlikely to happen again.

The second something goes wrong, the natural tendency is to create a policy. “Someone’s wearing shorts!? We need a dress code!” No, you don’t. You just need to tell John not to wear shorts again.

Policies are organizational scar tissue. They are codified overreactions to situations that are unlikely to happen again. They are collective punishment for the misdeeds of an individual.

This is how bureaucracies are born. No one sets out to create a bureaucracy. They sneak up on companies slowly. They are created one policy — one scar — at a time.

So don’t scar on the first cut. Don’t create a policy because one person did something wrong once. Policies are only meant for situations that come up over and over again.

This essay first appeared in REWORK, our New York Times Bestselling book about how grow a right-sized company.


Don’t scar on the first cut was originally published in Signal v. Noise on Medium, where people are continuing the conversation by highlighting and responding to this story.

 

Read the responses to this story on Medium.

24 Jun 19:22

Why Does a Tire Company Publish the Michelin Guide?

Why Does a Tire Company Publish the Michelin Guide?

When the Michelin Guide comes out each year, foodies freak out. 

Michelin’s food critics, known as “inspectors” by the company, only awarded a top ranking of three Michelin Stars to around 100 restaurants in 2016. Restaurants that receive a Michelin Star for the first time can expect a flood of food tourists; losing a Michelin Star devastates restaurateurs. Gordon Ramsay, the celebrity chef who makes young chefs weep on his show Hell’s Kitchen, cried when he lost two Michelin Stars in 2013. 

Which is a bit weird, because Michelin is a tire company whose annual reports highlight the cost of rubber and growth in the passenger car market. 

Michelin began publishing its “Red Guide” in 1900, when both cars and food tourism were novel luxuries. Its creators hoped that a guidebook offering information about hotels, restaurants, and roadways would lead people to drive more—and buy more Michelin tires.

Today, Michelin continues to authoritatively judge restaurants in order to promote the company name. It’s a bit like if the Coca-Cola Company ran the Oscars, having created the ceremony in the 1920s so that people would go to the movies and drink more soda. It’s debatable whether the guide still helps Michelin sell tires, but Michelin’s ownership has been instrumental to the renown and authority of its restaurant guides. 

If the Michelin Guide wasn’t a marketing expense for an unrelated, major corporation, it may never have become the final word on culinary perfection.

Creating a Market

There once was a time when people had to be convinced that a car was useful. That was the situation in 1895, when brothers Edouard and Andre Michelin developed a new design for a car tire at their rubber company in Clermont-Ferrand, France. 

The brothers had a superior product: one of the first air-filled tires, which could be quickly replaced since it was not glued to the wheel. To prove its value, the brothers sponsored car races, which drivers with Michelin tires often won handedly

But France had only around 350 cars in 1895. Automobiles “remained rich men's toys... unable to stray very far from the vicinity of a reliable repair show," Herbert Lottman writes in The Michelin Men. “The nascent motorcar could easily be dismissed by seasoned entrepreneurs on the lookout for realistic investments."

In this environment, increasing the number of drivers—the motivation for the Michelin Guide—was more important than gaining an advantage over other tire manufacturers. 

First published in 1900, the guide’s 399 pages contained all the information drivers needed to “go touring” through French towns and cities. Only restaurants attached to hotels were included, and they were listed rather than carefully rated. Information about installing and caring for Michelin tires occupied the first 33 pages, and ads for car part manufacturers occupied another 50 pages. Maps and basic information about dozens of towns made up the bulk of the guide. 

A legend for a map in an early Michelin Guide, with the Michelin Man smoking in the corner. (It was a different time.) Image via "Maps for a New Kind of Tourist: The First Guides Michelin France" by Kory Olson in Imago Mundi. 

For drivers, that information was essential. Gas stations did not yet exist, so drivers needed to know which pharmacies sold gasoline in several-liter containers. Motorists needed the timetables that listed when the sun set during the year, because highways did not yet have lights. Only a fraction of auto repair shops stayed open all year, which made it crucial to know which closed at the end of summer. Details like this distinguished the Michelin Guide from the tour books of the time, which assumed that people traveled by rail. 

The Michelin brothers’ efforts to make driving easier extended beyond the guide. Once company employees began rating hotels, they made clear to hoteliers that they should offer free parking. They also lobbied the government to put up road signs for motorists—Edouard Michelin is sometimes credited with inventing road numbers, because he convinced the government to enlarge the numbers it painted on highway posts. At times, company men put up road signs themselves.

Similarly, a major aim of Michelin marketing was to promote the car as a way of life. "With a car, no more 5 a.m trains," a Michelin ad in 1924 declared. "With a car, there is more opportunity for the pleasant things in family life."

“Our industry is directly interested in the continual progress of automobiles, on which it depends,” Michelin once wrote in an article. In creating the guide, the brothers hoped to provide the information and infrastructure that would convince rich people to buy cars, drive throughout France, and buy Michelin tires. 

Even if that meant creating an entire guidebook side-business to do it. 

“Worth the Trip”

The Michelin brothers were not modest men. In 1900, in the introduction to the first Michelin Guide, Andre proclaimed, “This work comes out with the century; it will last as long.” 

Predicting that its promotional guidebook would endure for 100 years was bold. Yet, remarkably, it was an underestimate. 

Michelin distributed tens of thousands of complimentary copies in 1900. But when the company began charging around $2 for the guide in 1920, it still sold nearly 100,000 copies a year. As of 1953, its loyal readership submitted 50,000 comments to improve the guide’s accuracy. Some wrote every week.

During this period, the focus on tire maintenance gave way to classic guidebook fare. In 1926, Michelin created regional guides, later known as Green Guides, which resemble Lonely Planet and traditional travel guides. Meanwhile, the Red Guide, in response to reader interest, focused on reviews of hotels and restaurants, with separate guides for different areas and cities. The company hired full-time critics, known as inspectors, to spend months on the road judging the best restaurants. Good restaurants received recognition in the guide; exemplary ones received from one Michelin Star (“a very good restaurant in its category”) to three Michelin Stars (“one of the best, worth the trip”). 

By the 1930s, the Red Guides enjoyed international renown. The New Yorker sang its praises, and forgave the tire ads sprinkled throughout because they were done “gaily and unobtrusively!” In 1952, TIME Magazine called it the “tourist’s Bible”, and a celebrated French chef stated that "there is only one guide in France, the Michelin." Today, 116 years after the first edition, Michelin still publishes the Red Guide to great fanfare. 

So how did a tire company become—and why does it remain—the arbiter of culinary greatness?

One prerequisite is the longevity of the Michelin tire company, which is a remarkable story in itself. The family company weathered world wars and a century of booms and busts to become one of the world’s largest tire companies. (The 1945 guide lamented how many "good [French] cooks sit in German prison camps waiting for return to their ovens.") 

The 30-year tenure of the Michelin brothers was a partnership between Edouard, an engineer credited with important advances in tire technology, and Andre, a marketing genius. In addition to the guide, Andre paid newspapers to run columns describing the spread of his magnificent pneumatic tires, deftly played to French nationalism (Michelin competed in a promotional road race in Germany, the company reassured French readers, to beat the Germans), created a community by positioning Michelin as in the service of motorists and their cause, and invented the Michelin Man, the instantly-recognizable stack-of-tires mascot that is now on the Madison Avenue Advertising Walk of Fame. 

Andre’s background as a government cartographer also helped: He spent seven years developing some of the world’s best maps, and on D-Day, Allied troops famously arrived in Normandy with Michelin Guides because of their quality. And so did the fact that Michelin is a French company.

More importantly, the Michelin Guide restaurant reviews could be shamelessly elitist because the tire customers targeted by Michelin in 1900 were the elite. The Michelin Man looks like a marshmallow today, but when he was created, cars were toys for the rich, and he looked like Michelin customers: He chomped on a cigar, held a champagne flute, and wore a pince-nez. 

A normal restaurant guide could never have maintained such selective standards that it only awarded stars to a few dozen (or just a few) restaurants in an entire country. The market of interested people would be too small to cover its costs. The Michelin Guide, however, initially only cared about an elite who’d want to know about the 12 best restaurants in France, and its editors could count on the Michelin marketing department covering its costs. 

A 1898 poster for the Michelin Man in his original incarnation as an upper class man. His champagne flute contains broken glass to represent how Michelin's air-filled tires "drink up obstacles." Photograph via TM: The Untold Story Behind 29 Classic Logos. 

The Michelin Guide "is unique among commercial guidebooks,” a journalist observed in 1954, “in that it makes a virtue of losing money, and by doing so at the rate of some tens of thousands of dollars a year, it has achieved a reputation for thoroughness, discrimination, and incorruptibility that is also unique." This is especially true now that no one needs to buy the Michelin Guide, since they can read the list of Michelin Star restaurants on a food blog.

The Michelin Guide has been criticized for not employing enough inspectors to authoritatively judge the areas it covers. But when a typical travel guide awards a restaurant four stars, that usually means an employee quickly visited several years ago, and someone recently spent five minutes making sure it still exists. Or, as is the case with Zagat, it relies on customer reviews and surveys. 

You may believe in the Yelp model, but most millionaires and world renowned chefs do not. Only Michelin can afford to send eight inspectors to a restaurant in a year when deciding whether to give it a third star—inspectors who remain secret rather than ask for free meals, and who (the few accounts of journalists accompanying inspectors make clear) identify each ingredient and do things like furrow their brow and say, "It is a question of grave importance whether it deserves its three stars.” 

Expending resources like that is a foodie’s dream. But only a company indifferent to monetization could achieve it. 

Does the Michelin Guide Help Michelin?

The Michelin brothers’ goal with the Michelin Guide—securing the future of the automobile—was achieved decades ago. Yet the tire company keeps printing its Red and Green guides.

That is partly because selling Michelin maps and travel guidebooks—although not its red restaurant guides—became quite profitable. Travel guidebooks were good businesses throughout the 20th century, and in 2007, the BBC bought the Lonely Planet for $207 million. It wasn’t until 2008 that the twin blows of the Great Recession and online competition hammered the guidebook’s business model. In 2012, Michelin’s Senior Vice President for Communication and Brands told Ad Age, “We are trying to adapt to this new digital and free-content environment." A spokesperson for Michelin North America says the company, like its competitors, is releasing travel apps and doing better than you might expect. 

But Michelin is a tire company. If the only reason for the guide’s continued existence was profits, Michelin likely would have sold the guidebook business, and it wouldn’t keep subsidizing the restaurant guides.

Instead Michelin’s maps, guidebooks, and restaurant reviews are promotional—as evidenced by the company’s head marketer retaining responsibility for them. Tourism and Michelin Stars are rarely mentioned in the company’s financial documents or investor presentations. We could not confirm with Michelin whether its maps and guides are profitable, but Tony Fouladpour, a spokesperson for Michelin Travel and Leisure in North America, tellingly did not know if his division’s products made money. “It’s considered an investment really,” he says.

So is it a good investment? 

According to Natalie Mizik, Professor of Marketing at the University of Washington, the value in running a promotional effort lies in connecting the core business to “the perception that this is what the company is about.” It’s generally a good strategy, as customers transfer associations from the promotional efforts to the brand. This is why Red Bull, the makers of an energy drink, sponsor extreme sports and host live events on Red Bull TV. And it’s why Michelin’s travel guidebooks, as well as its newer GPS services, have an important promotional value for Michelin, a company associated with travel know-how. 

"Maps and guides are a way to have proximity to the consumer," Michelin’s head marketer told Ad Age in 2012. "You buy a tire every two years, so your proximity with the brand isn't so frequent. But these guides come out once a year, and they can be used regularly. It's a very agreeable way to interact with the brand." Dr. Vicky Lane, an Associate Professor of Marketing at University of Colorado Denver, sees Michelin’s guides as a pioneering example of content marketing, a contemporary buzzword among businesses hoping to attract customers and promote their brand with popular articles, videos, or other media. 

Yet it’s less clear whether this is true of the renowned restaurant guide. “I think this is one of the more unusual cases,” says Dr. Mizik. “If there is no perceived link, there would be no effect.” 

Michelin executives clearly believe the association between the company and Michelin Stars is helpful; this year, the company acquired Book a Table, the European equivalent of OpenTable, to complement its online restaurant search service. Michelin tires are a premium brand; perhaps being an authority of fine dining helps legitimize the higher price point of its tires. 

Dr. Lane says her research shows that even unrelated content can help a brand’s core business, and that Michelin is a fantastic example of this. But she concedes that conclusions on this point are more ambiguous, with most experts advising against producing unrelated services or content to promote a brand. 

It’s easy to see why. Dr. Mizik is a marketing professional, and she confessed to not knowing the connection between Michelin tires and the restaurant guides. Spokesperson Tony Fouladpour says this is common. “You’d be surprised how many people don’t know,” he says. “All the time, people tell us, ‘We didn’t know it’s the same company!’”

This is not the debate people usually have over the Michelin restaurant guide. Instead people either follow its recommendations and greet its publication with excitement—or attack the guide for its stuffy, French standards and the crowds of food snobs it unleashes. 

Yet it’s this debate over brand promotion and content marketing that will ultimately decide the fate of Michelin Stars and the world’s most celebrated culinary guide. Because if a group of marketers and executives decide that it no longer helps Michelin sell tires, the Michelin Guide—or the unusual circumstances that have allowed it to thrive—could disappear.  

Our next article is a data-driven look at the connection between a city's African-American population and the use of fines as a government revenue source. To get notified when we post it    join our email list.

Want to write for Priceonomics? We are hiring a full-time staff writer and looking for freelance contributors.



Let's block ads! (Why?)

22 Jun 23:43

Comic for June 22, 2016

by Scott Adams
21 Jun 09:46

More Clu Fu HERE



More Clu Fu HERE