I was shocked to discover this week that my “htmls_to_pdf” Ruby gem had been downloaded 300 times. I released it just to practice releasing a ruby gem. I hadn’t expected anyone to find/use it.
Since it has been downloaded so many times, I figure others share my interest in wrapping multiple HTML pages into a single PDF file.
So I made some improvements this week (and fixed a bug that broke some of my sample code — caused by me changing the public interface… for shame!) and began adding tests. I also added more example files for downloading documentation and tutorials for Ruby, RSpec, Rails, Python, Coffeescript, Bash, and Backbone.js.
Since some would prefer to download the PDF files than install and run my gem, I will try placing a subset of the PDFs I’ve created on my website.
Please download once and save the files. Please don’t bookmark and download repeatedly.
Also, this is running on a small server slice, and some of these files are huge, so please be patient.
Posted by James on Mar 29, 2012
“Paleoclimate Record Points Toward Potential Rapid Climate Changes”:
New research into Earth’s paleoclimate history by NASA’s Goddard Institute for Space Studies director James E. Hansen suggests the potential for rapid climate changes this century…
Hansen found that global mean temperatures during the Eemian period, which began about 130,000 years ago and lasted about 15,000 years, were less than 1 degree Celsius warmer than today. If temperatures were to rise 2 degrees Celsius over pre-industrial times, global mean temperature would far exceed that of the Eemian, when sea level was four to six meters higher than today, Hansen said.
“The paleoclimate record reveals a more sensitive climate than thought, even as of a few years ago. Limiting human-caused warming to 2 degrees is not sufficient,” Hansen said. “It would be a prescription for disaster.” …
“We don’t have a substantial cushion between today’s climate and dangerous warming,” Hansen said. “Earth is poised to experience strong amplifying feedbacks in response to moderate additional global warming.”
…this research is consistent with Hansen’s earlier findings that carbon dioxide in the atmosphere would need to be rolled back from about 390 parts per million in the atmosphere today to 350 parts per million in order to stabilize the climate in the long term.
Posted by James on Dec 15, 2011
My mom ordered me to read this thoughtful article on school reform:
The deck is stacked against kids who live in poverty not just because their schools are on average worse than others, but also because of the circumstances of their lives when they leave campus.
It’s time that we admit that it isn’t just teachers holding back poor and minority students back. The problems are societal…
Let the 50 states disaggregate equality-related data by ethnicity, gender, and socioeconomic status, and let us rank the states and reward them for closing all the societal inequalities that are truly at the heart of our achievement gap….
Let’s have national benchmarks for equality in incarceration, equality in college enrollment, equality in health coverage, equality in income levels, employment rates, rates of drug addiction and child abuse.
My initial reaction was that reducing inequality — though a noble objective — is impractical because those who control America love inequality:
Our entire political economy has been systematically structured over the past 30+ years to maximize — not minimize — inequality. And now that the 1% (really the 0.1%) owns everything — the Supreme Court, Congress, the presidency, the corporations, the media, the cash — they’re grabbing everything they can, and there’s no way they’re giving a penny back without a fight.
When Warren Buffett said a few years back that there’s a class war and that his class is winning, he meant it metaphorically, based on massive tax cuts for the wealthiest Americans.
But now there’s literally blood on the Occupy movement who were systematically crushed nationwide for exercising their Constitutional right to peacefully protest. And journalists have been arrested for doing their Constitutionally protected jobs. New York City police (not to mention the feds and the military) have been running a nationwide J. Edgar Hoover-esque domestic spy operation since 9/11 and operate a many-tens-of-millions-of-dollars surveillance network in Manhattan jointly with the major banks (police sit side-by-side with bank personnel). They used it to spy on the Occupy movement. Our tax dollars are being used to spy on us to repress small-“d” democracy and efforts to shift the tax burden more toward the wealthiest Americans.
The rich and powerful — on their private jets and yachts — don’t care about educating ordinary Americans, let alone poor/minority Americans. The essay suggests a clever way to pursue a noble, wonderful ideal. But it’s diametrically opposed to everything America has stood for these past three decades.
But I then realized that even eliminating inequality would be only a small step in the right direction. The biggest problem with American education is anti-intellectualism:
That teachers can single-handedly teach our kids — regardless of their pre-school experiences or their lives outside the classroom — everything they need to know is absurd. So, too, is the corollary that teachers should be punished when kids from screwed up families and communities struggle and fail.
Consequently, factoring in socio-economic data would be a big improvement.
But there’s a far more important factor than class and income: motivation. Much of America has an anti-intellectual bias. Whereas students in countries like China look up to their successful, hard-working classmates, American students tease and bully “nerds,” “geeks,” “dorks,” and “teachers' pets.” We admire successful student-athletes but mock successful student-students. Many parents either don’t care about learning or don’t know how to encourage and support their children’s learning (as opposed to pushing them to get good grades, even by cheating and/or pressuring/threatening teachers).
Studies consistently find that a superb predictor of a child’s school success is the number of books in that child’s house. (We’re well over 1,000 books in our house, and I’m hoping the boxes of books stacked in my garage also count toward our total!) Number of books in the home is an even more powerful statistical factor than parental education. It serves as a good proxy for the importance parents place on education. And 27% of American adults tell pollsters they didn’t read a single book last year! (Since the data’s self-reported, the real percentage is probably even higher.) ¼ to 1/3 of American parents are effectively telling their kids that learning doesn’t matter.
So, even eliminating economic and social inequality in America would not solve American schools' critical motivation deficiency. I know because I’ve seen the children of extremely poor, illiterate migrant workers in Shanghai do exceptionally well in school. Shanghai’s school system scores even higher than Finland’s (and every other participating nation’s) on the PISA tests. Tavis Smiley and Cornell West visited quite a few children of migrant workers who live in dirty one-room shacks. Their children embraced and excelled in school because their parents and they placed such value on learning and because Chinese culture respects teachers. The walls of these children’s tiny “homes” were covered with school achievement certificates like wallpaper.
I suspect this “motivation gap” may explain the apparent success of early charter schools and their subsequent disappointing results. Early charter schools may have attracted the most pro-education parents, whose kids were most likely to embrace school and learning. As charter schools spread, their populations increasingly resembled those of ordinary public schools.
School should be about joyous learning, exploring, singing, painting, reading, dancing, and creating. Instead, most American schools are focused on filling in the right bubbles. Focusing on tests is a great way to suck the natural joy out of learning. And that’s toxic when combined with our society’s existing anti-intellectual bias.
The education gap in a nutshell: “In 2004, a National Endowment for the Arts report titled ‘Reading at Risk’ found only 57% of American adults had read a book in 2002… Many in the survey reported reading dozens of books and said they couldn’t do without them” USA Today.
Being raised by parents who read voraciously must feel completely different than being raised by parents who never read. Beyond the implicit message children receive watching their parents read (or not read), parents who read (rather than golf or watch TV) likely communicate better (thus building their children’s vocabularies) and read to/with their children, equipping them with valuable knowledge that helps them read.
Posted by James on Dec 14, 2011
Following up my blog post from yesterday on Bank of America’s criminal shift of gambling losses into its FDIC-insured bank subsidiary, here are additional insights from Yves Smith:
This move reflects either criminal incompetence or abject corruption by the Fed. Even though I’ve expressed my doubts as to whether Dodd Frank resolutions will work, dumping derivatives into depositaries pretty much guarantees a Dodd Frank resolution will fail. Remember the effect of the 2005 bankruptcy law revisions: derivatives counterparties are first in line, they get to grab assets first and leave everyone else to scramble for crumbs. So this move amounts to a direct transfer from derivatives counterparties of Merrill to the taxpayer, via the FDIC, which would have to make depositors whole after derivatives counterparties grabbed collateral….
During the savings & loan crisis, the FDIC did not have enough in deposit insurance receipts to pay for the Resolution Trust Corporation wind-down vehicle. It had to get more funding from Congress. This move paves the way for another TARP-style shakedown of taxpayers, this time to save depositors. No Congressman would dare vote against that. This move is Machiavellian, and just plain evil….
Bill Black said that the Bloomberg editors toned down his remarks considerably. He said, “Any competent regulator would respond: “No, Hell NO!” It’s time that the public also say no, and loudly, to yet another route for running a drip feed from taxpayers to banksters.
Posted by James on Oct 19, 2011
If you have money in Bank of America, I would take it out tomorrow and move it to your local bank because BoA appears to have potentially trillions of dollars in gambling losses it has just moved to the same subsidiary that holds your bank account.
(Some, including U.S. Senator Bernie Sanders (I-VT), advocate moving money out of major banks for a different reason: to punish them for their predatory behavior. That’s a totally separate issue.)
The 2008 financial crisis could look like a hiccup if European defaults trigger massive credit default swap (CDS) payouts from major US banks.
The riskiest major US bank is Bank of America, which has $75 TRILLION in derivatives:
Bank of America’s holding company — the parent of both the retail bank and the Merrill Lynch securities unit — held almost $75 trillion of derivatives at the end of June, according to data compiled by the OCC. About $53 trillion, or 71 percent, were within Bank of America NA.
What SHOULD happen if Bank of America suffers a multi-trillion-dollar gambling loss? The FDIC-insured portion of the bank should remain intact and regular depositors' accounts should remain untouched while the rest of the bank goes bankrupt, shareholders are wiped out, and other creditors fight for scraps in bankruptcy court. Those who placed winning bets with BoA would likely receive pennies on the dollar. And taxpayers would not contribute a nickel.
But Bank of America today did something that potentially puts taxpayers on the hook to bail out tens of trillions of dollars in idiotic BoA gambling losses. BoA moved tens of trillions of dollars of potential gambling losses into the same BoA subsidiary that holds massive quantities of FDIC-insured bank deposits.
This is supposed to be illegal. Banks holding companies are not supposed to shift high-risk assets and liabilities into the FDIC-insured bank. This is a fundamental protection of taxpayers against banks gambling with taxpayers' money:
Bank of America Corp. (BAC), hit by a credit downgrade last month, has moved derivatives from its Merrill Lynch unit to a subsidiary flush with insured deposits…
Moving derivatives contracts between units of a bank holding company is limited under Section 23A of the Federal Reserve Act, which is designed to prevent a lender’s affiliates from benefiting from its federal subsidy and to protect the bank from excessive risk originating at the non-bank affiliate, said Saule T. Omarova, a law professor at the University of North Carolina at Chapel Hill School of Law.
“Congress doesn’t want a bank’s FDIC insurance and access to the Fed discount window to somehow benefit an affiliate, so they created a firewall,” Omarova said.
The FDIC is fighting this, but lackies of the mega-banks the Federal Reserve is allowing BoA to break the law:
The Federal Reserve and Federal Deposit Insurance Corp. disagree over the transfers, which are being requested by counterparties, said the people, who asked to remain anonymous because they weren’t authorized to speak publicly. The Fed has signaled that it favors moving the derivatives to give relief to the bank holding company, while the FDIC, which would have to pay off depositors in the event of a bank failure, is objecting, said the people.
I’m going to go out on a very short limb and presume one of Bank of America’s counterparties is Goldman Sachs. Years ago, Goldman helped cook Greece’s books to get Greece loans it had no business getting. Based on Goldman’s behavior, I would be shocked if Goldman didn’t then turn around and use its inside information to place massive bets (through credit default swap derivatives) against Greece’s debt. Merrill Lynch (now part of Bank of America) apparently was the stooge for many such stupid CDS bets that Bank of America is now on the hook for. If so, then Bank of America is on the hook to Goldman for tens of trillions of dollars if the European debt crisis explodes. And Goldman — worried BoA wouldn’t be able to pay off its gambling debt — has now forced Bank of America to taxpayers on the hook for the gambling debt.
If taxpayers are stuck with tens of trillions in derivative contract (gambling) losses, we’ll all soon look back at the 2008 banking crisis as “the good old days.”
Posted by James on Oct 19, 2011
Long-time Wall Street insider Pam Martens reports:
Wall Street’s audacity to corrupt knows no bounds and the cooptation of government by the 1 per cent knows no limits. How else to explain $150 million of taxpayer money going to equip a government facility in lower Manhattan where Wall Street firms, serially charged with corruption, get to sit alongside the New York Police Department and spy on law abiding citizens….
The surveillance plan became known as the Lower Manhattan Security Initiative and the facility was eventually dubbed the Lower Manhattan Security Coordination Center. It operates round-the-clock. Under the imprimatur of the largest police department in the United States, 2,000 private spy cameras owned by Wall Street firms, together with approximately 1,000 more owned by the NYPD, are relaying live video feeds of people on the streets in lower Manhattan to the center. Once at the center, they can be integrated for analysis. At least 700 cameras scour the midtown area and also relay their live feeds into the downtown center where low-wage NYPD, MTA and Port Authority crime stoppers sit alongside high-wage personnel from Wall Street firms that are currently under at least 51 Federal and state corruption probes for mortgage securitization fraud and other matters.
In addition to video analytics which can, for example, track a person based on the color of their hat or jacket, insiders say the NYPD either has or is working on face recognition software which could track individuals based on facial features. The center is also equipped with live feeds from license plate readers.
According to one person who has toured the center, there are three rows of computer workstations, with approximately two-thirds operated by non-NYPD personnel. The Chief-Leader, the weekly civil service newspaper, identified some of the outside entities that share the space: Goldman Sachs, Citigroup, the Federal Reserve, the New York Stock Exchange. Others say most of the major Wall Street firms have an on-site representative….
The project has been funded by New York City taxpayers as well as all U.S. taxpayers through grants from the Federal Department of Homeland Security. On March 26, 2009, the New York Civil Liberties Union (NYCLU) wrote a letter to Commissioner Kelly, noting that even though the system involves “massive expenditures of public money, there have been no public hearings about any aspect of the system.”
Posted by James on Oct 19, 2011
USA Today reviews “Retirement Heist”:
Over and over, loyal, deserving employees with modest incomes have watched their planned retirement savings disappear because of corporate managers and pension industry consultants. Journalist Ellen Schultz has been writing about such shameful behavior for a long time, mostly in The Wall Street Journal. Now she has pulled together the copious, irrefutable evidence between the covers of a book. It is shocking, and demoralizing….
The book is crammed with heartbreaking anecdotes of retirees suffering (and in some cases probably dying) because of pension-related corporate greed. But the perpetrators have not been charged with any crimes.
…she writes, “What [GE CEO] Immelt didn’t mention was that, far from being a burden, GE’s pension and retiree plans had contributed billions of dollars to the company’s bottom line over the past decade and a half, and were responsible for a chunk of the earnings that the executives had taken credit for. Nor were these retirement programs — even with GE’s 230,000 retirees — bleeding the company of cash. In fact, GE hadn’t contributed a cent to the workers' pension plans since 1987 but still had enough money to cover all the current and future retirees.”
Then Schultz delivers the clincher: GE was indeed burdened by a pension plan — the plan for top executives. The obligations of that plan, for a minuscule number of individuals compared with the 230,000 lower-level retirees, totaled $4.4 billion and had drained about $573 million from the corporate treasury over the past three years.
Posted by James on Oct 19, 2011
I (finally) started Tweeting in August and have found Twitter to be a superb tool for keeping up with the ever-changing tech world. But Tweets seem pretty ephemeral, so I decided to write a script to archive my Tweets. Thanks to the “twitter” Ruby gem, it’s quite easy to save the past week’s worth of Tweets. But going back in time required a lot of annoying copy-and-paste (and translating quotation marks to “"” and back again to make JSON happy). Anyhow, I’ve now collected here all my Tweets, some of which (esp. retweets) I think are very funny:
- It’s only Round 2, but #coffeescript has #dart on the ropes (14 Oct)
- RT @charlielapin: My dad pointed out I’m dressed like Bill Belichick today. Worst part is, he’s right. #Patriots (14 Oct)
- When Rodney Harrison calls you out for playing too violently, it’s time to stop trying to kill other players! http://t.co/hI365fji (14 Oct)
- RT @Pinboard: dennis ritchie is gone but the memory we’ve allocated to him will live on forever (14 Oct)
- I’m going to bid $1 and hope no one else shows up! http://t.co/ixBO8kfE (14 Oct)
- Just noticed a directory from 2009 that I titled “Screwing_Around.” Hope my wife doesn’t see it. (14 Oct)
- Laptop shut off overnight. Thought “WTF?” Syslog said “Critical temperature reached (127 C), shutting down.” Wow! I would have quit by 100! (14 Oct)
- RT @markbates: Contagion has to be the worse romantic comedy ever. I didn’t laugh once and no one ended up with the girl. #fail (14 Oct)
- I’ve used Ubuntu for years; love it! @headius I think my Apple fanboi days are fading. I could be 100% happy with Linux (Ubuntu) and Android (14 Oct)
- “Language 50,000 BC: Our ancestors like Yoda spoke” http://t.co/OSHqJ5rl Not convinced, but interesting argument (14 Oct)
- I’d rather stick a pencil in my eye for free. Thanks anyhow. @guardiantech Want some cheap Microsoft software? (14 Oct)
- RT @qrush: What I’ll miss about my first gen Droid: dust getting into the screen, not being able to pick up phone calls, home screen freezing, … (14 Oct)
- Markus Gattol also shares good info on dm-crypt & LUKS: http://t.co/kQDZzKky (14 Oct)
- I’m loving Markus Gattol’s fabulous, detailed tutorial on LVM (Logical Volume Manager): http://t.co/cSzlOier (14 Oct)
- RT @wadhwa: Listening to a bunch of politicians discuss their vision of education. Never missed my dentist so much. Boring, propaganda. :) (14 Oct)
- Materialist marriages suffer http://t.co/YDVh7ewo I’m glad my wife and I are both pretty frugal. (13 Oct)
- RT @coreyhaines: Recruiter: How many years of rails experience do you have; @dhh: ALL OF THEM (favorite comment: http://t.co/zUE34t9Y) (13 Oct)
- RT @ruby_news: Gitlab released. A similar to github application but for your servers with private repositories only. http://t.co/pJUyzt6P (13 Oct)
- RT @avdi: And the brilliant hack used to break into celebrity email accounts was? Guessing their stupid, stupid passwords. http://t.co/LDCsEf4P (13 Oct)
- RT @doctorow: Upgrading to Oneric Ocelot while on battery using free WiFi at NY Comic-Con #livingdangerously (13 Oct)
- I wonder what the world record is for # of browser tabs open at same time. Only thing keeping me from Guinness: my browser crashes too often (13 Oct)
- IBM spent decades & big $$$ building machines that read & translate English/Mandarin. Wife and I built one in 5 yrs w PB&J and mac&cheese. (13 Oct)
- Character of Death: Copy/pasted “sudo dd if=/dev/urandom of=/dev/sda6” && changed 6 to 1. Paused and realized “a” needed to be “b”! Check 4x (13 Oct)
- I’m resizing an encrypted partition: http://t.co/JiTv75Xi Feels dangerous, kind of like I imagine bungee jumping would feel. (13 Oct)
- If someone tortures me to death, password protection will be one of my lesser concerns. “Your data or your life!” I’m ratting out my laptop! (13 Oct)
- “Encrypting… won’t protect you [if] Someone tortures you to death for the passphrase (More on this in next section)” http://t.co/89vzXLs4 (13 Oct)
- RT @thoughtbot: Backbone.js on Rails talk by @jayunit at @bostonrb – http://t.co/652w05ne (updated link) (13 Oct)
- When did Red Sox become the anti-Patriots? Drinking in locker rm! Org has no more fingers to point at one another for historic Sept collapse (13 Oct)
- In dishwasher tweet, I wanted to type “Not much H20 & MC2 saving if you wash everything twice” but unsure how many would get E=MC2 reference (13 Oct)
- Don’t become too skilled at hiding backup hard drives from thieves or YOU’LL never find them again either. #moan #sigh (13 Oct)
- I’d like my dishwasher better if I didn’t have to pre-wash or re-wash everything. Not much H20 & energy saving if you wash everything twice. (13 Oct)
- Michael Lewis: “California and Bust” http://t.co/bO8YAqdB (13 Oct)
- Profile of Elizabeth Warren, heroic defender of the 99%: http://t.co/1PqCWpHb (13 Oct)
- As Seinfeld (stolen from Carlin, I believe) joked, “Anybody driving slower than you is an idiot, and anyone… faster than you is a maniac.” (13 Oct)
- Yesterday, I took a detour to avoid driving behind a super-slow car, even though the detour took longer. Got stuck behind another slow car! (13 Oct)
- RT @drnic: My only skill around the house is “computer things”. My marriage could be in trouble here. (13 Oct)
- RT @drnic: Ah fuck. I changed the RAM in my wife’s laptop. I power it on. It just beeps at me, in a mean way. How could I have screwed that up?! … (13 Oct)
- I long ago trained myself to re-read email before hitting “Send.” Must do the same with Twitter. (13 Oct)
- After complaining about “its” and “it’s,” I put a typo in my last Tweet! I NEVER make that mistake! #so_embarrassed (13 Oct)
- “The Daily Show” is fake news… so fake even it’s name is fake. TDS (and Colbert) seem to be on vacation every third week. #i_still_love_em (13 Oct)
- RT @didip: Dennis Ritchie has passed away. RIP dmr. Thank you for C and Unix. http://t.co/Wdosar2d (13 Oct)
- Great article: Bezos == brilliant, hardass micromanager who 9 yrs ago imposed Service Oriented Architecture on Amazon: http://t.co/2muZbnhC (13 Oct)
- Nobel Prize-win economist Joe Stiglitz: “We have too many regulations stopping democracy & not enough stopping Wall Street from misbehaving” (13 Oct)
- An astonishing 11-year-old mind http://t.co/6SamKrLD (13 Oct)
- RT @mperham: Java’s core design philosophy: “Make the common case hard” (12 Oct)
- RT @pkedrosky: QotD: “Bezos is super smart; don’t get me wrong. He just makes ordinary control freaks look like stoned hippies.” http://t.co/rkyfXgR0 (12 Oct)
- I enjoyed this interactive programming tutorial titled “The Ladder of Abstraction” http://t.co/DmeBUb8A (12 Oct)
- RT @jeresig: Why is Google putting time and effort into changing JavaScript when the DOM is what needs fixing? (12 Oct)
- RT @drnic: “Had my vasectomy yet?! I can’t even find time for a haircut!” (12 Oct)
- RT @nicksieger: SJ: “You’ve got to start with the customer exp. and work backwards to the technology.” (12 Oct)
- RT @avdi: I agree with the “tests are a waste of time” crowd. Their tests are a waste of time. (12 Oct)
- RT @henrylearn2rock: #GoogleDart compiles ~10 lines to 17259 lines of #JavaScript http://t.co/JrLku4Zd #fail #coffeeScript won http://t.co/LUoeth6w (12 Oct)
- Computer warned me I have “only” 2GB free on 500GB drive. “[In] mid-1990s the typical hard disk drive for a PC had a capacity of about 1 GB” (12 Oct)
- Who said books are dead? My wife’s already deep on the library’s waiting list for multiple not-yet-published books. (11 Oct)
- “Unless we take dramatic steps, [USA] will be Japan… deflation, no economic growth… recessions…high unemployment” http://t.co/4izzJkc7 (11 Oct)
- RT @tehawesome: If you love creating elaborate puzzles to torture innocent people, you have 2 career options: Bad Guy from Saw or Hotel Shower Tap Designer. (11 Oct)
- RT @guardiantech: How the US government secretly reads your email | Heather Brooke http://t.co/SetUdlt9 (11 Oct)
- RT @makower: Someone just sent this: 10 years ago we had Steve Jobs, Johnny Cash & Bob Hope. Today we have no Jobs, Cash, or Hope. (11 Oct)
- RT @headius: I don’t know what I did before I could simply talk to my phone. Do you all still type with your thumbs like neanderthals? (11 Oct)
- RT @pkedrosky: Another presenter tells me they’re telling me 3 things, tells me, & then tells me what they told me, I’m leaping on stage & throttling them. (11 Oct)
- RT @tenderlove: Current Status: applying for job that requires 5 years of production DART experience. (11 Oct)
- RT @jasonfried: My “Why Work Doesn’t Happen at Work” TEDx talk just cracked 1,000,000 views: http://t.co/yicgTDnX (11 Oct)
- Work’s a holiday compared w watching a 2- and a 5-year-old (who refuse to nap) 11 hours without any help. “Daddy! Daddy!” #head_still_hurts (11 Oct)
- Finally visited Wegmans. Fabulous sub. And saved our vacation. My girl’s beloved duck fell out of car. Waiting at customer service next day. (11 Oct)
- IHOP: I guess I must trust you that the coffee is regular, but why did you put it in a carafe labeled “Decaf”? How do YOU know what’s in it? (11 Oct)
- Police: First Amendment protects “the right of the people peaceably to assemble, and to petition the Government for a redress of grievances” (11 Oct)
- I’ve got both kids all day because, apparently, Columbus achieved enough to cancel schools but not enough to cancel my wife’s work (10 Oct)
- You’re over-optimistic, but you’ll probably disbelieve this because you systematically ignore evidence to the contrary http://t.co/eaQ7HS9L (10 Oct)
- How hard is it to learn “its” and “it’s”? And who stole all the editors? “it’s first release” “its a marked change” http://t.co/BX43zFJA (10 Oct)
- If you like Ruby, algorithms, or AI, you’ll want Jason Brownlee’s free “Clever Algorithms” book! http://t.co/3MVbohJq & http://t.co/K4hOyq2o (10 Oct)
- But US system IS corrupt, rigged & broken @avdi “fix the system” is an eternally handy excuse for not making yourself useful here and now (10 Oct)
- “Rush hour is six hours of not rushing anywhere,” said Tim Lomax http://t.co/6QAWK4j0 (09 Oct)
- Computers may take over our lives, but they’ll never dominate Twitter. Can’t say much in 140 “1"s and "0"s. (08 Oct)
- Scene in 2031: “There’s grandpa using his KEYBOARD!” (eyes roll). Reminds me of Star Trek scene where Spock & Kirk try talking into mouse. (08 Oct)
- Considered teaching my kids Dvorak http://t.co/bWgbseNO rather than Qwerty keyboard, but why bother? In 20 yrs, no one will use keyboards! (08 Oct)
- RT @igrigorik: always reassuring to know that the US drone fleet is malware infested: http://t.co/pSNSwUw7 – this can’t end well. (08 Oct)
- RT @objo: When traveling, I often wish everyone felt the need to use deodorant. #twitterisfortraveling (08 Oct)
- RT @tirsen: The biggest legacy of Steve is that you shouldn’t just listen to your customer, you should UNDERSTAND your customer. (08 Oct)
- @msuster wrote: “Everything I learned about being an entrepreneur I learned by F’ing up at my first company” http://t.co/imm1K3Tr (08 Oct)
- RT @danmartell: Master list of startup tools http://t.co/UyyBE4Mw (08 Oct)
- RT @BCAppelbaum: Your monthly reminder that 25 million Americans still can’t find full-time work. A number this report does not budge. (07 Oct)
- RT @Nouriel: U6 definition of unemployment rate – incl discouraged workers & partially employed ones) up to 16.5%. Many new jobs are partially emply ones (07 Oct)
- RT @AngelaBishop: Pixar, which #stevejobs helped build, has a staff policy.Leave on time every day cos you can’t make family movies if you never see your own. (07 Oct)
- Chris Christie lobbied for a Bernie Madoff-led finance association to remove securities fraud from a consumer fraud act dailykos.com/story/2011/10/03/1022317/-Christie-has-a-Bernie-Madoff-Problem/ (06 Oct)
- In bizarre tribute to Jobs(?), my iPad played dead this morning. It somehow drained its battery overnight and refused to start. In mourning? (06 Oct)
- Ellison should know because he’s the roach motel king! RT @TechCrunch Ellison… Calls Salesforce The ‘Roach Motel’ Of Cloud Services (06 Oct)
- RT @KentBeck: my favorite idea from steve jobs is it’s the programmer’s job to adapt the computer to the user, not the user’s job to adapt to the computer (06 Oct)
- Hank Williams Jr accuses ESPN of stomping on Free Speech, but that protects against govt. Compare Obama to Hitler and people can ignore you! (06 Oct)
- Cucumber scenarios should not be a series of steps [saying] what a user clicks [but] should express what a user does github.com/cucumber/cucumber-rails/commit/f027440965b96b780e84e50dd47203a2838e8d7d/ (06 Oct)
- I’ve done functional programming in R without realizing it. Now I know why R programmers should resist the urge to create explicit loops. (06 Oct)
- Neal Ford’s 3-article intro to functional thinking (ibm.com/developerworks…) taught me why functional programming != procedural programming (06 Oct)
- RT @bbaxley: Don’t be sad because it’s over. Smile because it happened. — Dr. Seuss (05 Oct)
- RT @tehviking: “Daddy, don’t be sad, be happy! Here, take my Teddy, it will make you happy!” #cry (05 Oct)
- RT @michaelskolnik: “Your time on this earth is limited, don’t live someone else’s life, live by your vision.” ~Steve Jobs (05 Oct)
- RT @christinelu: “Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life.” ~Steve Jobs (05 Oct)
- RT @500startups: “Have the courage to follow your heart and intuition. They somehow already know what you truly want to become.” Thank you Steve Jobs. (05 Oct)
- RT @objo: I wonder if this is what my parents felt when they heard about John Lennon. (05 Oct)
- RT @pkedrosky: Previous quote from this good interview with writer Michael Lewis – bloomberg.com/news/2011-10-05/michael-lewis-slams-wall-street-leadership-deficit-interview.html/ (05 Oct)
- RT @StephenAtHome: NASA is accepting applications to be an astronaut! AAAGGGHHH!!! Ok, I just put in my own catheter. What’s step two? (05 Oct)
- RT @qrush: Hope you guys feel like assholes for complaining about the iPhone 4S now. (05 Oct)
- RT @Nouriel: Obama told bankers in ‘09:I’m the only 1 standing btw you & the pitchforks. Bankers got a bailout & didnt change habits.Now pitchforks on WS (05 Oct)
- RT @kjirs: Today’s news: “There’s a phone- a PHONE- that shoots 1080p video and has ARTIFICIAL FREAKING INTELLIGENCE! I’m disappointed.” -Everyone. (05 Oct)
- Best slime mold article I’ve read in a long time! nytimes.com/2011/10/04/science/04slime.html (05 Oct)
- World-class collaborative filtering? @david_a_black I wonder why Twitter thinks I should follow The Rock. (05 Oct)
- I loved Charlie Rose’s interview of Michael Lewis: charlierose.com/view/interview/11924/ (05 Oct)
- Those of us using #NoScript (love it! thanks!) would love it even more if it knew bbc.co.uk, bbcimg.co.uk, bbci.co.uk, etc. are all related (05 Oct)
- Excited to bequeath my massive Tintin collection to my kids, but my parents tossed them all… but kept the baseball card collection #bummer (05 Oct)
- RT @michaelkbusch: Truly outrageous that 99% of the cookies are consumed by 1% of the monsters on PBS. #occupysesamestreet (04 Oct)
- “CapitalistPig” hedge fund mgr (capitalistpig.com) who cries about rabble making noise smartmoney.com/invest/markets… is crazy mediamatters.org/search/tag/jonathan_hoenig/ (04 Oct)
- The Milwaukee Brewers are in the NATIONAL League playoffs? When did they switch leagues? 1998!?!? I’m old… and out of touch with baseball. (04 Oct)
- By “eliminated,” I mean from playoff contention, not the “Suck for [Andrew] Luck” (364 Google News references!) competition the Colts lead. (04 Oct)
- RT @TheDailyShow: #TDSBreakingNews iPhone 4 users one hour away from looking at their phones in shameful disgust. (04 Oct)
- RT @drnic: Big FUD week for nodejs – first its a cancer, but now its got really bad: its jumped the shark. unlimitednovelty.com/2011/10/nodejs-has-jumped-shark.html/ (04 Oct)
- Could the 0-4 Indianapolis Colts be mathematically eliminated Oct 23? (04 Oct)
- RT @hunterwalk: So @parislemon deciding to not answer email for a mth was just a dry run for a VC role ;–) (04 Oct)
- “Spoiled by parents… young Chinese have been taught to take it easy, unable to overcome criticism & face challenges” cnbc.com/id/44752529 (04 Oct)
- Computers have taken middle-skilled jobs. Low-skilled workers aren’t a [profitable] target. Who’s left? Professionals slate.com/articles/technology/robot_invasion/2011/09/will_robots_steal_your_job.html/ (04 Oct)
- Sen. Sanders asks whether Fed will help small businesses as they helped giant banks. Bernanke: “No” (04 Oct)
- Sen. Sanders expresses concern top 6 banks much bigger than in 2008. Bernanke’s lame response: “We’ll never again have to bail anyone out.” (04 Oct)
- My new blog post: “Using proprietary database features in Rails via progressive enhancement” jameslavin.com/articles/2011/10/04/using-proprietary-database-features-in-rails-via-progressive-enhancement/ (04 Oct)
- Nobel winner: “There was a Swedish voice on the phone. I knew it wasn’t Ikea. I quickly realized the magnitude of it.” businessweek.com/news/2011-10-04/scientists-win-physics-nobel-for-dark-universe-discovery.html/ (04 Oct)
- After installing 500GB HD, I figured I was set. But that encouraged me to download video and now I’m constantly struggling to free up space. (04 Oct)
- “Raising VC is like adding rocket fuel and for most businesses this a) isn’t warranted b) creates [bad] incentives” bothsidesofthetable.com/2009/07/22/do-you-really-even-need-vc/ (04 Oct)
- If I pay my cable (and Internet) provider $150/month, why can’t I watch TV without being bombarded with ads? Commercial TV used to be free. (04 Oct)
- RT @paul_irish: More on CSS shaders: adobe.com/devnet/html5/articles/css-shaders.html/ between this and CSS Filters (dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html/), the web is about to get so so so hot. (04 Oct)
- RT @webtonull: A DBA walks into a NOSQL bar, but turns and leaves because he couldn’t find a table (04 Oct)
- iOS5 synching / cloud / social integration == lock-in == hard to switch. Ironic so many developers who love pipes & loose coupling buy Apple (03 Oct)
- Fox brags about putting protester on air but reneges because he’s so articulate/funny that viewers' heads might explode youtube.com/watch?v=6yrT-0Xbrn4 (03 Oct)
- RT @headius: The #1 feature JavaEE needs is a new name. No matter how cool/agile/lightweight it gets, EE means “sucks” to developers. (03 Oct)
- RT @dcancel: 10 things I’ve never heard a successful startup founder say – blog.asmartbear.com/quotes-startup-founders.html/ (03 Oct)
- “New York” magazine has an excellent article on Michael Lewis: nymag.com/print/?/news/features/michael-lewis-2011-10/index4.html (03 Oct)
- Obama: I can assassinate Americans but won’t say why: theatlantic.com/politics/archive/2011/10/the-secret-memo-that-explains-why-obama-can-kill-americans/246004/ What happened to transparency? Should presidents assassinate? (03 Oct)
- “Brady said Seymour didn’t deserve the flag because he was trying to get the quarterback onto the grass gently.” He means: Seymour’s a pussy (03 Oct)
- RT @peat: “MineConf” may not be the best name for a Minecraft conference. (03 Oct)
- RT @LOLGOP: Rick Perry’s hunting camp is called “N*ggerhead”? And you thought he’d never find a way to win back the GOP’s base. (02 Oct)
- RT @mfeathers: ‘Node.js is cancer’ bit.ly/X02l1 :–) (02 Oct)
- RT @objo: Listening to kids free play can be both fascinating and heartbreaking as they incorporate real life into their world. (02 Oct)
- RT @qrush: Seriously, which would you want to maintain? gist.github.com/1257579 (coffee vs js) (02 Oct)
- My son plays in a kindergarten soccer league. Coaches carefully position players around the field, then everyone chases the ball. #too_cute (02 Oct)
- “Money is like manure: Spread around, it helps things grow. Piled up in one place, it just stinks” (I’m not sure who first said this) (02 Oct)
- Hit 30,000 miles on my 5-year-old Sienna today. So, I drive the equivalent of across America and back each year. (01 Oct)
- RT @rickygervais: My tweets are now displayed on rickygervais.com to prove it’s me. Tell your friends. Not your real friends obviously. Your virtual ones. (01 Oct)
- RT @igrigorik: “modularize your code! build everything as if you were going to open source it, even if you’re not…” – @mojombo #rubyconf (01 Oct)
- RT @drbrain: “Who doesn’t know what sinatra is? … Ok, Leave” #RubyConf (30 Sep)
- RT @ryanqnorth: “That book open on my bed? Oh. That’s the Enterprise D tech manual. I – I wasn’t expecting to have women over today.” #sentencesihavesaid (30 Sep)
- S Korea on mission “to find children who are studying after 10 p.m. And stop them”; “culture of educational masochism” time.com/time/printout/0,8816,2094427,00.html/ (30 Sep)
- Built this server on Hardy; earlier upgraded to Intrepid. Today: Jaunty, Karmic and Lucid! Will stop here till next LTS (“Pouty Penguin”???) (30 Sep)
- I wish I were Jewish! @bussgang Just getting back online after 2 days of “Rosh Hashanna black out”… Can anyone update me on the Red Sox?? (30 Sep)
- RT @DEVOPS_BORAT: One of last unsolve problem in Computer Science is decent wifi network at conference. (30 Sep)
- RT @jimweirich: OH: “Why didn’t write tests, so maybe we shouldn’t either” — Arrrrrg!!! #RubyConf (30 Sep)
- RT @pkedrosky: It’s so unsettling to be long all these things I don’t like, from the US dollar to the 30-year. Huge cognitive dissonance. (30 Sep)
- RT @andrewjskatz: @doctorow people thanking drivers for obeying law by stopping means drivers think it’s optional: cf. ppl asking to use cc licensed stuff. (30 Sep)
- Good news: I set up the server to auto-install security updates. Bad news: I forgot how quickly Ubuntu stops supporting non-LTS releases! (30 Sep)
- Upgrading cloud server OS feels like Russian roulette because you must keep the Ubuntu release and slice’s kernel in sync. #feeling_lucky (30 Sep)
- “biannual”: event occurring twice a year; “biennial”: event lasting two years or occurring every two years. Did not know that. (30 Sep)
- If you hate biannual Ubuntu upgrades, try forgetting a server and upgrading from EOLUpgrades (help.ubuntu.com/community/EOLUpgrades/). Waiting saves no time! (30 Sep)
- RT @doctorow: Dear London drivers: blinking yellow means ‘proceed if safe’ NOT ‘run down pedestrians’ (30 Sep)
- Had I known “sudo rm -rf /var/lib/amavis” would free up 10GB, I would have run it ages ago! Is amavisd a cloud provider plot to make more $? (30 Sep)
- Planned to wear programming hat today. Old, neglected server had other plans. #wearing_sysadmin_hat (30 Sep)
- A server I administer ran out of disk space. (Doh!) My mom can’t send email, so she EMAILS me, instead of calling. Fix delayed 12 hours! (30 Sep)
- Firefox 7!?!?! I’m on Ubuntu 10.10 (“supported until April 2012”), and it’s running Firefox 3.6! (29 Sep)
- Must warn my kids not to wear their Red Sox hats for a while. They’re young and living in Yankees country. Could leave scars. #in_great_pain (29 Sep)
- Readme’s “Install – Usage – Configuration” should be “Install – Configuration – Usage”! #aargh github.com/jdpace/PDFKit (29 Sep)
- VC Mark Suster on entrepreneur vs. “wantrepreneur” – bothsidesofthetable.com/2011/01/31/should-you-really-be-a-startup-entrepreneur/ (29 Sep)
- RT @aslak_hellesoy: If I can’t cURL it it doesn’t exist (29 Sep)
- RT @dcancel: I’m tired of interviewing “smart” people. I want to interview people who GET SHIT DONE. #smartisoverrated (29 Sep)
- RT @objo: What the hell is it with people who feel the need to drift right before turning left (and vice versa) while driving a vehicle? #fb (29 Sep)
- Entrepreneurship in China – similar but different: washingtonpost.com/national/on-in… (29 Sep)
- Wife moved external monitor to the left of my laptop. Must move mouse right/left to get to left/right monitor. Wasting scarce brain cycles. (29 Sep)
- RT @StephenMelrose: When is the penny going to drop that the last few percent of IE6 users are actually developers doing browser testing. (28 Sep)
- RT @josevalim: So, who wants to start Clojure4Kids with me? Oh… right… (28 Sep)
- RT @Nouriel: This is Greek to me!!! @ckoutras: @THOMASDIMITRIS ωραίο βίντεο δημήτρη έχεις ωραία φωνή…αλλά είσαι φίλος του κόρακα @Nouriel (28 Sep)
- OK. I’m in position! – RT @TechCrunch Video: Anonymous Calls On Protestors To “Occupy The Planet” (28 Sep)
- RT @StephenAtHome: 100 people were bitten by piranhas last weekend in a lake in Brazil. Proving what I always suspected, piranhas love round numbers. (28 Sep)
- RT @quamen: “Process is an embedded reaction to prior stupidity” – Clay Shirky #fb (27 Sep)
- RT @avdi: Ever run
git blame on code you know you wrote because you can’t believe you were so dumb? (27 Sep)
- RT @danfrakes: The 500 laid-off WebOS folks combined got less severance than Apotheker. Shameful. (via @blankbaby @chuq bit.ly/oCNBRW) (27 Sep)
- RT @StephenAtHome: The inventor of Doritos has died. Ashes to ashes, cheese dust to cheese dust… (27 Sep)
- RT @bussgang: Truth. RT @witheiler: Correlation between startups closing a round and founders getting a MacBook Air: near 100% (27 Sep)
- RT @yishan: Oh awesome, I just got my first Cityville spam on Google+. It’s even better than FB, because apparently you can get them from strangers. (27 Sep)
- JavaScript’s the new Rails. Best practice in constant flux: #coffeescript, #backbonejs, #jquery, #dojo, #extjs, #sproutcore, #batmanjs, #yui (27 Sep)
- RT @DannyPage: The @RNC just used “pivoting” in a tweet. This is your fault @ericries. The word is officially dead. #LeanStartup #Startups #RIPivoting (26 Sep)
- RT @markbates: i don’t think my bank believed me when i said the $100 in singles i needed was for lunch money and not strippers. (26 Sep)
- RT @fredwilson: Patents are like plaque that builds up in arteries. They restrict the flow of innovation in our econonomy. I’m worried abt a heart attack (26 Sep)
- RT @nzkoz: I’ve got a great strategy for Yahoo to earn $25B, go back in time and don’t turn down the $44.6B Microsoft offered searchengineworld.com/microsoft/3456… (26 Sep)
- $6.59 burrito + $.42 tax = $7.01… and 99¢ change. Next time, I’ll use credit. After merchant fees, store’s better off gifting me a penny. (26 Sep)
- @igrigorik It’s like: Probability I win the lottery: 0.0000000000000000000000001%. Probability SOMEONE wins the lottery: 100% (25 Sep)
- @igrigorik I JUST watched the SAME talk (loved it)! What are the odds? Read enough tweets and eventually you’ll experience something bizarre (25 Sep)
- RT @jneira: #coffeescript in #firebug console with Acebug bit.ly/oDYvd5 (23 Sep)
- RT @eddedmondson: This is the second time the LHC has violated causality this year. The first time is coming up in December. (23 Sep)
- RT @justinfrench: Me: “That’s a ‘sometimes’ treat” 2yr old daughter: “Is it ‘some time’ now?” (23 Sep)
- RT @rationalists: A Christian asked what it was like to be an atheist. I asked him if he believed in Islam. He said, “no.” I said, “Like that” (22 Sep)
- RT @pbrane: I keep talking about moving to France, but the startup scene… it’s like they don’t even have a word for “entrepreneur” in their language! (22 Sep)
- RT @Nouriel: Find me 1 banker/trader/professional who worked less days/hours in the 1990s when Clinton increased highest marginal tax rate from 35 to 39% (22 Sep)
- RT @tdreyno: You know, a system that tracks your every movement for your whole life used to be called “Orwellian.” (22 Sep)
- If Fall arrives and you switch HVAC to heating, don’t expect A/C to turn on magically just because your house hits > 80 degrees on a hot day (22 Sep)
- Don’t run “sudo dd if=/dev/zero of=/dev/sdb1 bs=4K” on a 2.5TB drive from your laptop if you’re hoping to go anywhere in the next few hours! (22 Sep)
- RT @Harri8t: Developer conferences 99.9% male… @CrisValerio says “The only place where there’s a line for the Men’s bathroom” #F8 yfrog.com/nu8uyinj (22 Sep)
- RT @StephenAtHome: How could Greece be so short on cash? They’re making $20/day off me in yogurt revenue alone! (21 Sep)
- RT @StephenAtHome: If Europe collapses, I’ll lose the 200 Lira I still have on my Eurail pass from 1986. Now I’ll never see Czechoslovakia! (21 Sep)
- RT @wadhwa: Sickens me when my best engineering students become investment bankers. Instead of solving problems, their talent goes into creating them. (19 Sep)
- Yehuda does it again! And the comments are inspired too! gist.github.com/313496e6ba9160dc6eb5 (16 Sep)
- RT @jaw6: RT @Nobilis I just got an idea. Instead of calling it “Marriage Equality” let’s call it “Marriage Deregulation.” (15 Sep)
- RT @petemiron: this fad won’t last. RT @stevecheney: Seeing an increasing # of startup founders pursuing monetizable, revenue-generating ideas. (14 Sep)
- RT @JudiCogen: There is great need for a sarcasm font. (14 Sep)
- RT @JoshHarcus: “Today I went on thesaurus.com and searched ‘ninjas’. The computer told me ‘ninjas cannot be found’ Well played, ninjas, well played.” (14 Sep)
- RT @joestiglitz: “Ricardian equivalence is taught in every graduate school in the country. It is also sheer nonsense.” #stiglitz is.gd/3TpJ8a (14 Sep)
- RT @StephenAtHome: If people don’t take off their shoes, how will TSA know if they’re evil? You need to get a good look at their “sole.” Twitter-Emmy please! (07 Sep)
- RT @Nouriel: Golden Cyberfetters by Krugman nyti.ms/qxwxVX Or why any gold standard, like Bitcoin, subject to money-hoarding, deflation & depression (07 Sep)
- RT @danlucraft: “Monetary union break-ups in history are nearly always accompanied by extremes of civil disorder or civil war.” scribd.com/doc/64020390/xrm45126 (07 Sep)
- RT @DavidSacks: TSA patted down my 2-year-old and swabbed her hands for bomb residue. Our country has lost its mind. (07 Sep)
- RT @gruber: Shorter Mike Arrington: “I sold my company (to a bunch of idiots) and expected to still maintain control over it.” (06 Sep)
- RT @Nouriel: Berlusconi defense: I screwed the entire country for 10 yrs for free & no one cared. Now I screwed a few for money and they give me hell (04 Sep)
- BN.com canceled my TouchPad order 2 ½ days after I placed it. Thanks for getting my hopes up and preventing me from buying elsewhere! (24 Aug)
- Oops. That’s “classy family.” Note to self: Never squeeze in a last-second Tweet while running out door to take daughter to doctor’s office. (24 Aug)
- Quiz: Your son plays for the NY Jets. Who do you cheer for? The Patriots, of course! Classfy family! nesn.com/2011/08/james-ihedigbos-family-still-rooted-for-patriots-when-he-played-for-jets.html (24 Aug)
- RT @Nouriel: Last 3 US recessions (1990, 2001, 2007-09) caused by boom/busts caused by PRIVATE sector’s manias/panics: S&L, tech bubble, housing bubble (22 Aug)
- If you’re a programmer and haven’t watched this GoogleTechTalk by Josh Bloch, you’re in for a treat! youtube.com/watch?v=aAb7hSCtvGw (22 Aug)
- After Patriots' two dominant preseason games, I tried to register 23-0.com, but someone in China owns it! Any industry China won’t dominate? (19 Aug)
- RT @Nouriel: US has crumbling infrastructure & tons of laid off workers in construction. So we need a new fiscal stimulus to build infrastr & create jobs (19 Aug)
- Alcohol’s good for my brain! Good thing I drank two beers while watching the (unstoppable) Patriots last night! ibtimes.com/articles/200678/20110819/moderate-drinking-alcohol-consumption-reduce-dementia-alzheimer-s-risk-study.htm (19 Aug)
- RT @Nouriel: Thus gold, like US Treas yields, is pricing risk that we go into another deflationary depression & global financial meltdown, not inflation (18 Aug)
- RT @Nouriel: Double Dip is ahead for US & Europe: Philly Fed plunges after NY survey; Home Sales are collapsing; EU bank shares plunging & sov spreads up (18 Aug)
- RT @pulletsforever: “I am going to extend the staff meeting so we can figure out why the team is falling behind” -My Manager (17 Aug)
- RT @quackingduck: “The best way to manage a fledgling business is for managers to be impatient for profit but patient for growth.” blogs.hbr.org/cs/2011/08/groupon_doomed_by_too_much_of.html (17 Aug)
- RT @Nouriel: In last 20yrs Chinese consumption has fallen from 50% to 33% of GDP while fixed investment has gone from 35% to 47% of GDP. Not sustainable (17 Aug)
- RT @nzkoz: “would you like a cuddle with daddy?” “No. iPad please” (16 Aug)
- @pragdave I dust off my Windows laptop once/year, for taxes. Hours of service packs, security patches. Then their stupid sw & $$ for states. (16 Aug)
- RT @Nouriel: The Second Gilded Age: share of income earned by top 1% is now back to 1929 level at the onset of the Great Depression (15 Aug)
- RT @Nouriel: Tax rate on capital gains, dividends, carried interest:15%.On estates = 0%. Tax rate on workers with income above $34.5k is 25%. Regressive! (15 Aug)
- @nzkoz Try an allergy pill. Since taking a daily allergy pill – cetirizine (Zyrtec) is great – I almost never use asthma medicine any more. (12 Aug)
- RT @ChinesePod: Adorable look at how Mandarin immersion kindergarten programs actually work, at a school in Pasadena, California http://fb.me/Bl4rxRLF (10 Aug)
- RT @TechScruggs: Every OS has its purpose. OSX, building webapps. Linux, running web apps. Windows, testing IE. (10 Aug)
Posted by James on Oct 15, 2011
In theory, I’ve always liked the database agnosticism of Rails migrations. But, in practice, my migrations are PostgreSQL-specific because I usually fall back to writing SQL DDL statements since standard migrations can’t create essential database features like foreign key constraints and uniqueness constraints (which must exist in the db layer as well as the model layer or you’ll eventually have problems).
I thought of a solution that probably seems obvious to many developers, but I didn’t realize it till now.
From now on, I’ll write as much as I can using standard Rails migrations and then tack on Postgres-specific enhancements wrapped in a test that returns true if-and-only-if the database is Postgres. ActiveRecord makes it easy to test for the database adapter:
if ActiveRecord::Base.connection.adapter_name == ‘MySQL’
This embraces the same progressive enhancement principle advocated for adding JavaScript to web pages, for example.
This way, Rails migrations remain database agnostic yet also can add use proprietary database extensions. An added bonus: future developers can see the conditional code and adapt it for other databases if they wish.
Posted by James on Oct 04, 2011
I encourage parents to read these two articles: The end of innocence: The cost of sexualizing kids and Sexualizing kids: No child left behind — and fighting back.
Sadly, this is not just a teen problem:
Even toddlers in promotional posters wear skimpy clothes, vampy looks and makeup. At home later, the children will likely watch TV. Little ones, 2 to 11, average 32 hours a week…. During those hours, they’ll drink in ads for hair products and teen-siren TV shows, makeup and technology, much of it couched as “hot” or “sexy.” …[Other examples include] Vogue covers featuring small girls made up and posed like grown women, thongs and push-up padded bras for children as young as 6, Walmart’s line of 70 make-up products for girls 6 to 12 [and] skinnier-than-life Barbies targeted toward 3-year-olds. …[N]early a third of girls' clothing sizes 6 to 14 is “sexy.”
This angers me, but kids are being exposed to it, so parents need to understand and help their kids develop healthy attitudes.
Beyond highlighting the problem, the articles offer excellent info and advice, e.g.:
- “While saying no is a natural parental instincts, he says the optimal approach is to help their child understand why a certain TV show or piece of clothing is not OK. ‘You’d be surprised at how reasonable children can be when rules are accompanied by an explanation,’ he says. ‘Children are always learning. If they’re not learning from their mothers or fathers, they are going to learn from other sources.’”
- “Thomsen thinks it’s vital that a young girl hears that their fathers think she’s a lovely, wonderful person. ‘That’s feedback that will maybe make her feel strong and resistant to other influences.’”
- “she’s also guiding them through a process of analyzing things critically. "What do you think they’re trying to sell?” she asks when a model runs her fingers through her luxurious hair for a shampoo commercial. ‘Is it just shampoo?’"
- “What receives praise matters, too. Instead of telling a child she’s smart or beautiful, he recommends praising traits like how nurturing she was to her doll or how hard she worked on her term paper.”
Posted by James on Sep 22, 2011
Sharks have been swimming the oceans for close to a billion years. One reason for their success is “squalamine,” a unique chemical that protects sharks from all viruses and appears a possible cure for many human diseases:
the compound is already in human clinical trials for cancer and eye disorders, and several hundred people have been exposed without major side effects. The new study revealed that squalamine can also disrupt a virus’s life cycle and prevent it from replicating in both tissue cultures and live animals.
The story of how it works is fascinating:
Squalamine is a positively charged molecule, so when it enters a cell, the molecule immediately sticks “like Velcro” to the cell’s inner membranes, which have negative charges, Zasloff said.
By doing so, squalamine “pops off” any positively charged proteins that were attached to the cell membrane—an action that does no harm to the cell, Zasloff noted.
When a virus invades a cell, it expects those proteins to be present on the cell membrane. Without them, the virus can’t reproduce.
“There is no other compound known to science that does this—this is a remarkable property,” Zasloff said.
Humanity’s rapidly improving ability to study molecular biology could possibly trigger an incredible human health revolution in which studying other animals' evolutionary adaptations and mixing-and-matching them to improve our health lets us live remarkably longer, healthier lives.
Posted by James on Sep 22, 2011
As expensive as work chairs are, the ROI on a properly adjusted, quality chair is huge:
Improving the ergonomics of chairs and other equipment increases productivity by an average 17%, based on a review of 40 studies of office workers published in 2008 in the Journal of Safety Research. Workers tended to have fewer musculoskeletal problems and a lower rate of absences and errors, the studies found.
The ROI on a large monitor is even greater (according to university research funded by a monitor company):
Organizations that upgrade their employees' standard-format monitors to widescreen displays can realize productivity gains equivalent to 76 extra work days a year per worker.
They also can realize annual cost savings of more than $8,600 per staff member, according to a recent survey. (That math assumes a staffer who makes $32,500 annually.)
But even a monitor-size skeptic concedes empirical evidence demonstrates productivity gains from larger monitors.
Posted by James on Sep 21, 2011
I’ve long admired Professor Elizabeth Warren. I hope she’ll soon become the junior Senator from the great state Commonwealth of Massachusetts because she cares about ordinary Americans and fights for ordinary Americans:
I hear all this, “Oh! This is class warfare.” No! There is nobody in this country who got rich on his own. Nobody. You built a factory out there — good for you. But I want to be clear. You moved your goods to market on the roads the rest of us paid for. You hired workers the rest of us paid to educate. You were safe in your factory because of police forces and fire forces that the rest of us paid for. You didn’t have to worry that marauding bands would come and seize everything at your factory… Now look. You built a factory and it turned into something terrific or a great idea — God Bless! Keep a Big Hunk of it. But part of the underlying social contract is you take a hunk of that and pay forward for the next kid who comes along.
Posted by James on Sep 21, 2011
Stanford University Professor Bob Sutton advises companies to hire “outliers” but says few do: “The fact is, Steve Jobs couldn’t get hired in most American companies, much less be the CEO. He couldn’t pass through the interview screens.”
Steve Jobs is today considered perhaps the greatest CEO in many decades, but he was once fired by Apple, the company he founded!
Like Jobs and many other unconventional geniuses, Bill Belichick was fired. Belichick had the Cleveland Browns moving in the right direction till owner Art Modell announced he would move the team to Baltimore. Belichick inherited a 3-13 Browns team and, over four seasons, coached them to continually improving records of 6-10, 7-9, 7-9, and 11-5 (plus a playoff win). The following season, things started well, but Belichick’s Browns collapsed after news of the move to Baltimore leaked, and he lost his job. The renamed Ravens suffered three consecutive losing seasons after Belichick left. Even ignoring Belichick’s amazing post-Browns success, Belichick’s Browns record looks pretty good. But Art Modell (and most sports journalists) failed to appreciate Belichick’s football genius.
Many pay lip service to “thinking outside the box” but few firms actually behave as if they value and reward innovative, creative, multi-disciplinary people. Radical innovators often must build their own firms from scratch to breathe life into the wild visions in their minds.
Posted by James on Sep 19, 2011
Apple doesn’t want to look great or seem great, Apple wants to BE great:
“I’m not sure Apple even thinks about the competition,” Yamashita says. “They’re uniquely themselves without worrying about anyone else. When I worked for Steve there was little discussion about the competition. The aim was for us to be the most extreme version of ourselves.” …
“Apple is obsessiveness to the power of 10,” he says. “And you see it everywhere. It’s in things that are immediately visible, like the retail stores. They spend more on tenant improvements than anyone: stone floors, not wood floors; glass tables, not plexiglass. But it’s also in things you don’t ordinarily see: Apple has the most symmetrically laid out motherboard in the industry. They’re obsessive about the supply chain, obsessive about the design of the product, the packaging.”
Yamashita tells the story of Jobs’s walk-through before the opening of the first Apple Store. At the time, Apple was selling iMacs, the candy-colored computers that came in different “flavors.” Jobs walked into the store where the computers were lined up flawlessly on a table, took one look at the display, then ordered the computers taken off and the table turned upside down. Then he pointed at a seam on the bottom of the table and pronounced it “unacceptable.” Of course, customers would never see it. That wasn’t the point. The point was it was there. The point was not to allow an imperfection. The point was not to give up on the Apple dream.
“Apple has always been on an ongoing journey to be its best self,” Yamashita says. “Its marketing mission is to help Apple customers get the most out of their Apple products, to equip and enable their customers to be their best self, too. That kind of thinking has led to online tutorials, lessons at the Apple Stores, ‘genius bars.’ What other company would hire 12,000 experts and then not charge customers a penny to talk with them?”
The same formula — relentless determination to improve continually — works for students too:
As Levin watched the progress of those KIPP alumni, he noticed something curious: the students who persisted in college were not necessarily the ones who had excelled academically at KIPP; they were the ones with exceptional character strengths, like optimism and persistence and social intelligence. They were the ones who were able to recover from a bad grade and resolve to do better next time; to bounce back from a fight with their parents; to resist the urge to go out to the movies and stay home and study instead; to persuade professors to give them extra help after class.
Posted by James on Sep 19, 2011
(I’m uncomfortable calling anyone “dumb,” but Tony Romo makes tens of millions of dollars to play a game and single-handedly threw away — through repeated acts of stupidity — a game his team had already won. All Romo had to do to seal the victory was not hand the ball back to the Jets. Instead, he gifted the ball to the Jets TWICE in the final quarter. He deserves to be called “dumb.”)
As a Patriots fan, I was thoroughly enjoying tonight’s Dallas Cowboys thumping of the Jets. Dallas was up by 14 points and had 1st-and-goal at the Jets' 2 yard line. Soon to be at least a 17-point 4th quarter lead. The Cowboys franchise had NEVER lost a 14-or-more-point 4th quarter lead. And Dallas is about to tack on at least 3 more. Game over.
Except I hadn’t accounted for the world’s dumbest man, Dallas quarterback Tony Romo, throwing the game away. When you’re up by two touchdowns in the 4th quarter and have an automatic chip-shot field goal — even if you’re sacked — 99% of your focus should be on not turning the ball over. Don’t worry about scoring a touchdown if there’s any risk involved. Throw the ball at the hot dog vendor or curl up in the fetal position. Just don’t turn it over. Instead, Romo decides he’s a running back and dives straight into the teeth of the Jets defense, immediately coughing the ball up at the 1-yard line. Jets get the ball back and score, making it a 7-point game. Then, after the Cowboys fail to move the ball, they try to punt and somehow forget to block the Jets defender in the very middle of the field… with the shortest path to their punter. It’s like Moses parted the Red Sea for the Jets guy to put his hand on the ball before the punter could kick it. Punt blocked and run back for an easy touchdown. Tie game.
OK, so you’ve blown a two-touchdown lead. But it’s still a coin flip. Dallas has a 4th-and-1 and punts it. I would have gambled on 4th down because Dallas had lost its top three cornerbacks and the Jets were driving easily on their replacements. Going for it on 4th seemed a worthwhile gamble. But Dallas punts and eventually gets the ball back. But then Romo throws a short completion… to the Jets' Darelle Revis! Romo throws the ball to a double-covered receiver while the league’s best cornerback stands between Romo and his receiver. Are you kidding me, Tony? Have the bookies threatened your family or something? Or are you just the world’s stupidest person?
And I haven’t even mentioned the foolish delay-of-game penalties. Or the critical second-to-last play where the Cowboys needed about 30 yards but Tony wasn’t even paying attention when his center snapped the ball to him. While Romo was looking elsewhere, the ball clanged off his chest, killing whatever hope Dallas still had of kicking a tying field goal. And this was, I believe, after a Jets timeout! How does a quarterback not know the snap count after a timeout? Amazing. The Jets had no business winning that game. Romo served it on a platter.
Posted by James on Sep 12, 2011
Humans generally think of ourselves as qualitatively more intelligent than all other animals… so much more intelligent, in fact, that many humans refuse to accept that we are animals.
And one of the most commonly cited “proofs” of our intellectual superiority is our rich, complex language.
Ironically, our arrogance about our language dominance may actually reflect our intellectual inability to grasp other animals' languages.
This article reports fascinating research analyzing dolphin communication (using “information theory”) to prove dolphins communicate in sophisticated ways humans — despite decades of trying — still cannot comprehend. Scientists haven’t yet collected enough data to determine exactly how rich dolphin communication is, but we already know dolphins communicate using quite expressive language:
As Carl Sagan once famously said, “It is of interest to note that while some dolphins are reported to have learned English – up to 50 words used in correct context – no human being has been reported to have learned dolphinese.”
…[A]ccording to information theory, dolphin communication is highly complex with many similarities with human languages, even if we don’t understand the words they are saying to one another.
Information theory was developed in the 1940s by the mathematician and cryptologist Claude Shannon, mainly to be applied to the then-burgeoning technology of telecommunications. It operates on the knowledge that all information can be broken down into ‘bits’ of data that can be rearranged in myriad ways. George Zipf, a linguist at Harvard, realized that language is just the conveyance of information, and therefore could be broken down too.
Think of all the different sounds human beings make as they speak to each other, the different letters and pronunciations. Some, such as the letters ‘e’ and ’t' or words such as ‘and’ or ‘the’ will occur far more frequently than ‘q’ or ‘z’ or longer words such as ‘astrobiology’. Plot these on a graph, in order of the most frequently occurring letters or sounds, and the points form a slope with a –1 gradient.
A toddler learning to speak will have a steeper slope – as they experiment with words they use fewer sounds but say them more often. At the most extreme a baby’s babble is completely random, and so any slope will be nearly level with all sounds occurring fairly evenly. It doesn’t matter which human language is put through the information theory test – be it English, Russian, Arabic or Mandarin – the same result follows.
What is remarkable is that putting dolphin whistles through the information theory blender renders exactly the same result: a –1 slope, with a steeper slope for younger dolphins still being taught how to communicate by their mothers, and a horizontal slope for baby dolphins babbling. This tells us that dolphins have structure to how they communicate.
Meanwhile, another feature of information theory, called Shannon entropy, can tell us how complex that communication is…. Write down 100 words on one hundred pieces of paper and throw them into the air and they can be arranged in myriad ways. Impose rules on them, such as sentence structure, and your choices automatically narrow. It is a bit like playing hangman; you have a five-letter word where the first letter is ‘q’, so the rule structure of English necessitates that the second letter is ‘u’. From thereon there is a limited number of letters that can follow ‘qu’ and so you may have ‘que’ or ‘qui’ or ‘qua’ and you can predict that the word is ‘quest’ or ‘quick’ or ‘quack’. Shannon entropy is defined as this application of order over data and the resulting predictability of that order.
“It turns out that humans go up to about ninth order Shannon entropy,” said Doyle. “What that means is, if you are missing more than nine words then there is no longer a conditional relationship between them – they become random and pretty much any word will do.” In other words, there are conditional probabilities, imposed by the rule structures of human languages, up to nine words away.
Doyle has analyzed many forms of communication with information theory, from the chemical signals of plants to the rapid-fire radio transmissions of air traffic control. How do dolphins fare? “They have a conditional probability between signals that goes up to fourth order and probably higher, although we need more data,” said Doyle.
Posted by James on Sep 11, 2011
In test-driven development (TDD), we make each test fail before we write the code that makes it pass. It’s a great practice because it helps you spot bugs almost instantly (esp. if you use “autotest” or a similar program to automatically run your tests every time you modify any code or test).
A few minutes ago, I wrote the following “failing test”:
it "won't overwrite an existing file" do
FakeFS do
File.open(house_appraisal_downloader.appraisal_dir + '/test_record.html', 'w') { |outf| outf.write("abcde") }
expect {house_appraisal_downloader.save_as('test_record.html')}.to raise_error
end
end
I expected my test to fail by overwriting the existing file and not raising an error. Instead, it passed — by raising an error when I hadn’t expected one since I hadn’t yet written the code to prevent overwriting existing files.)
To see the error, I ran:
it "won't overwrite an existing file" do
FakeFS do
File.open(house_appraisal_downloader.appraisal_dir + '/test_record.html', 'w') { |outf| outf.write("abcde") }
house_appraisal_downloader.save_as('test_record.html')
end
end
The error message pointed me straight to my goof. My code should have been:
def save_as(filename)
File.open(@appraisal_dir + '/' + filename, 'w') { |outf| outf.write("12345") }
end
But I had forgotten to add , 'w' as the second parameter of File.open!
So thank you yet again, TDD. Writing failing tests before writing the code to make them pass is a brilliant way to catch errors immediately. It simultaneously builds a large test suite that documents your code and immediately identifies future code regressions.
Posted by James on Sep 09, 2011
From the obvious-but-seldom-applied management advice category comes more evidence on the central importance of worker engagement:
In a 2010 study, James K. Harter and colleagues found that lower job satisfaction foreshadowed poorer bottom-line performance. Gallup estimates the cost of America’s disengagement crisis at a staggering $300 billion in lost productivity annually….
In one-third of the 12,000 diary entries [we collected], the diarist was unhappy, unmotivated or both. In fact, workers often expressed frustration, disdain or disgust. Our research shows that inner work life has a profound impact on workers’ creativity, productivity, commitment and collegiality. Employees are far more likely to have new ideas on days when they feel happier. Conventional wisdom suggests that pressure enhances performance; our real-time data, however, shows that workers perform better when they are happily engaged in what they do….
Workers’ well-being depends, in large part, on managers’ ability and willingness to facilitate workers’ accomplishments — by removing obstacles, providing help and acknowledging strong effort. A clear pattern emerged when we analyzed the 64,000 specific workday events reported in the diaries: of all the events that engage people at work, the single most important — by far — is simply making progress in meaningful work.
As long as workers experience their labor as meaningful, progress is often followed by joy and excitement about the work. “This time it looks good! I feel more positive about this project and my work than I’ve felt in a long time,” one programmer wrote after she’d completed a small but difficult task. This kind of rich inner work life improves performance, which further supports inner work life — a positive spiral.
…Of the seven companies we studied, just one had managers who consistently supplied the catalysts — worker autonomy, sufficient resources and learning from problems — that enabled progress. Not coincidentally, that company was the only one to achieve a technological breakthrough in the months we studied it.
Posted by James on Sep 08, 2011
The vending company at Rye Playland robbed me a few weeks back. Our son wanted cold water, so we shelled out $3 for bottled water, but a Pepsi bottle rolled out. No one in our house drinks soda, so the $3 was wasted and our son didn’t get any water. (We weren’t going to waste another $3 playing vending machine roulette!) I called the vending company and left a complaint. Never heard back.
And a few days ago, I shopped at a Stop & Shop (in Meriden, CT while returning from a vacation in Boston) and found $18 lying on the floor. I picked it up, held it aloft, and immediately shouted as loudly as I could, “Did anyone lose this money?” No one claimed it. But then a clerk grabbed the money out of my hands and handed it to Customer Service without asking my permission.
My guess is that one of two things will happen. Most likely, no one will claim the money and the store will keep it. Alternatively, one of the many people who heard me shout about the lost money may go falsely claim it. I doubt the person who lost it will realize they lost it, know where they lost it, return there, not find it, and then go to Customer Service. Even if they do, some fraud may have already claimed it or whoever is working at the customer service desk when the rightful owner returns might not know about the money or believe them.
Given the very low probability the money will be returned to its rightful owner, don’t I have a stronger claim on that money than the Stop & Shop? Shouldn’t they have taken my name and address and mailed it to me if no one claimed it? What ever happened to the “finders keepers” rule we all learned on the playground? $18 won’t pay the mortgage (or even the groceries we bought that day), but I feel like the Meriden Stop & Shop robbed me.
Posted by James on Aug 31, 2011
Really interesting article on how the medical community is beginning to use its new ability to rapidly and cheaply sequence viral and bacterial DNA:
There are far more bacterial genes than human genes in the body, he notes. One study that looked at stool samples from 124 healthy Europeans found an average of 536,122 unique genes in each sample, and 99.1 percent were from bacteria.
Bacterial genes help with digestion, sometimes in unexpected ways. One recent study found that bacteria in the guts of many Japanese people — but not in the North Americans tested as control — have a gene for an enzyme to break down a type of seaweed that wraps sushi. The gut bacteria apparently picked up the gene from marine bacteria that live on this red algae seaweed in the ocean.
I hate taking antibiotics because I don’t want to kill off all the healthy bacteria that digest my food and protect me against harmful bacteria. Early studies are proving my concerns valid:
[A body’s bacteria] did return [after antibiotics], but… the microbial community was not exactly as it was before antibiotics disturbed it. And if a person takes the same antibiotic a second time, as late as six months after the first dose, the microbes take longer to come back and the community is deranged even more.
Here’s the most useful info:
the company analyzed the genomes of microbes on surfaces, like desks and computers and handles on toilets. As the flu season began, the surfaces began containing more and more of the predominant flu strain until, at the height of the flu season, every surface had the flu viruses. The most contaminated surface? The control switches for projectors in the conference rooms. “Everybody touches them and they never get cleaned,” Dr. Schadt said.
He also swabbed his own house and discovered, to his dismay, that his refrigerator handle was always contaminated with microbes that live on poultry and pork. The reason, he realized, is that people take meats out of the refrigerator, make sandwiches, and then open the refrigerator door to return the meat without washing their hands.
“I’ve been washing my hands a lot more now,” Dr. Schadt said.
I’m going to wipe our refrigerator handle right now!
Posted by James on Aug 31, 2011
I love these quotations
[Jobs] said to John Sculley, CEO of Pepsi, when he was trying to persuade him to run Apple. “Do you want to spend the rest of your life selling sugar water,” he asked, “or do you want to change the world?” …
“The cure for Apple is not cost-cutting,” he said in 1996, when the company was on the rocks. “The cure for Apple is to innovate its way out of its current predicament.” At another point he said: “When you’re a carpenter making a beautiful chest of drawers, you’re not going to use a piece of plywood on the back, even though it faces the wall and nobody will ever see it.”
Posted by James on Aug 30, 2011
If you’re interested in simultaneous translation, Mandarin, or fascinating biographies, you’ll love this article about a “fair-skinned, balding, bespectacled and slightly paunchy” 40-year-old Canadian “widely considered the top Chinese-English language interpreter working in China”:
[Dawrant] spent much of his university years at a dim-sum restaurant. He first had to push the cart of a “dim-sum girl” around the sprawling restaurant hawking siu mai and har gao dumplings. He soon graduated to busboy and eventually to a full-fledged waiter. He became a minor celebrity in Edmonton’s Chinese community for his ability to converse in Cantonese with customers.
“My entire social life in university was based around the dim-sum restaurant,” he says….
Jean Duval was Canada’s top Chinese-language interpreter in the 1980s and 1990s. A large man with a handlebar mustache and a booming voice, he was born in France but was employed by the government of Canada. Some say this intellectual and gregarious character did as much to strengthen Canada’s ties with China as any diplomat – when he visited the country with Jean Chrétien, he would receive just as warm a personal welcome from Chinese president Jiang Zemin as the prime minister did.
Mr. Dawrant met Mr. Duval on a plane headed to China in 1989. The interpreter was reading a book in a language Mr. Dawrant couldn’t recognize (it was Uighur – Mr. Duval was compiling a dictionary). They spoke Mandarin to each other and Mr. Dawrant then switched to Cantonese. Mr. Duval couldn’t converse as well in that language so he retaliated with Shanghainese. They called it a draw, and Mr. Duval talked about his career as an interpreter.
“It was absolutely fascinating to me. It was something I had never really thought about before. I’d been learning Chinese very seriously, but with no end game,” Mr. Dawrant says.
The next stop was a brutal interpreting school in Taiwan where, like a U.S. Marine, Dawrant was physically and mentally dismantled to be built back up as an interpreter.
“It was class, practice and then more class and more practice. We never went anywhere. It was like special forces training for two years,” he says. “They completely reconfigured the way your brain works – the way you deal with language and memory. Constructing a discourse model. Getting inside the speakers head and becoming very flexible with all your languages. It is kind of like torture, basically.”
Posted by James on Aug 30, 2011
For months, I’ve been stunned by Sony’s apparent complete ignorance of — or inexplicable disregard for — even the most basic security concepts.
But HP may have leapfrogged Sony with its sudden dumping of WebOS and TouchPad, for which it bought Palm for $1.2 billion just last year. Experts praised the Palm purchase because it enabled HP to use its marketing muscle to build an Apple-like tablet and smartphone experience:
HP can offer a complete hardware, software, and service solution for mobile computing. Now HP can control its own mobile future.
I think it will be a successful marriage, with HP becoming a mobile powerhouse over time.
But HP has given up after scarcely a year!
Building a successful platform and ecosystem (think Facebook, XBox, PlayStation, iPad/iPhone, etc.) takes years, and early losses are normal. You sell at a loss to build a community, which increases interest in and demand for your platform, and the excitement keeps building on itself till you’re printing money, like Steve Jobs Tim Cook.
Some experts applaud HP’s decision: “According to Wharton faculty, leaving the PC business is a good move in the long run; it is marred by intense competition, low profit margins and the popularity of tablets such as Apple’s iPad.”
But HP-Palm was pursuing an Apple-like marriage of hardware and software, and Apple’s profit margins are anything but low. Apple’s market capitalization is tied with Exxon Mobil’s for #1 in the world.
HP was either stupid last year to pursue the strategy or stupid this year because it did not give its strategy sufficient time to succeed or fail. HP also failed to price its product at a discount to the market leader (iPad) that would entice people to try it and write apps for it.
HP’s schizophrenic management believed last year that HP could carve out a sizable niche alongside Apple but — just a year later — decided Apple is a black hole against which HP could not compete.
It’s as if HP didn’t understand the business logic of its calculated gamble a year earlier when it purchased Palm. Palm/WebOS wasn’t a magic elixir that would instantly boost quarterly profits. It was a lottery ticket that cost cash upfront but gave HP a chance to win big.
There’s little evidence HP’s bet was losing. In fact, evidence suggests it’s still possible HP could win:
HP has a clear and present opportunity to leverage this glut of TouchPad sales into legitimate relevance for webOS — the only question is whether it cares to do so….
Most respondents were frank about the fact that the TouchPad’s clearance $99.99 / $149.99 price structure actually fell below the maximum price that they would’ve paid. The median price buyers gave me worked out to $224.50, which splits nicely between $199.99 for the 16GB model and $249.99 for the 32GB. Some said it would be worth more to them — as high as $400, for a couple folks — with the knowledge that the platform would continue to be actively supported….
So, did HP leave money on the table? My best guess is that they did, yes — at least $50 per unit, if not more. At $150 to $250, they may not have caused the same level of mass hysteria over a 48-hour period, but I have little doubt they still would’ve been able to sell through inventory in a reasonable amount of time….
Should (and could) the TouchPad have launched at a too-good-to-pass-up price? As I mentioned before, the idea is right out of the game console manufacturers’ playbooks: for the first year or two, HP would eat some extraordinary cost per unit — several hundred dollars, perhaps — in an effort to build and lock in a legitimate webOS ecosystem by any means necessary. A brutal game, yes, but a game that a select few (HP included) could likely afford to play….
Three-quarters of buyers I spoke to said they would’ve bought a TouchPad just as quickly if it had launched for $99.99/$149.99 — in other words, if this was a permanent price, not a clearance — and another one in five said they would’ve eventually bought one….
And thus would begin the virtuous cycle: users lead to developers, which lead to apps, which lead to users. The tablet market would presumably be larger overall, and HP would’ve owned a chunk of it. Granted, that chunk would’ve come at a monumental operating cost, but right now, tablet vendors urgently need to be thinking in terms of generational platform leadership — just as Windows’ dominance today grew out of a seed planted by MS-DOS, PCs, and PC clones over a quarter century ago…
webOS is on that very, very short list of platforms with enough promise to deserve that kind of no-holds-barred approach to building market share. Most of my respondents were of the opinion that the TouchPad is worth $99.99 on its hardware merits alone, but — in a market utterly dominated by iOS — nearly half still want to give webOS a shot.
By flooding the market with TouchPads, HP has planted plenty of seeds to grow a vibrant ecosystem around WebOS. The question now: “Will HP water the seeds or let them wither?”
Ironically, HP wants to move into consulting services. Instead, HP should have paid McKinsey a fortune to show them the PowerPoint slides on sunk costs creating barriers to entry, increasing returns to scale, and network effects. I’m sure every McKinsey junior associate straight out of college has those slides on their laptop.
Faced with an entrenched market leader like Apple, HP needed to either go big or go home. Buying Palm and building the TouchPad was swinging for the fences. But, halfway through their big swing, they suddenly quit and walked home.
My hunch: HP CEO Leo Apotheker is a Steve Jobs plant on a secret mission to destroy WebOS. ;–)
Posted by James on Aug 23, 2011
If you’re a programmer and haven’t watched this GoogleTechTalk by Joshua Bloch, you’re in for a treat! He crams an incredible amount of great advice into an hour.
All the examples are in Java. But that’s actually helpful because Java is full of anti-patterns for Bloch to illustrate bad programming practices.
Posted by James on Aug 22, 2011
In 2005, I had several rounds of interviews at Google. In interviews, I pushed my vision for what I called “Google Muse,” basically a Google-branded smart phone running lots of Google and open source software on a stripped-down version of Linux.
This was before Apple released the iPhone and just before Google bought Android. The most exciting device at the time was Nokia’s 770 Internet Tablet.
I didn’t get the job (which had nothing to do with “Google Muse” …so they probably — and with some justification — thought me nuts).
And I didn’t sell Google on my vision. Their response: “We’re a SOFTWARE company! We don’t do hardware.”
Well, even then, Google had a massive custom hardware infrastructure. So they could have done hardware. But they saw themselves as selling software services.
Five years later, Google hopes to spend $12.5 billion buying Motorola Mobility. As my wife told me after hearing the news, “You were WAY ahead of your time.”
Posted by James on Aug 17, 2011
I today wiped out rvm and installed rbenv. My problems have vanished. Autotest started working immediately.
Thank you, rbenv.
Again, RVM is a great concept. I’m sure rbenv wouldn’t exist today if not for RVM. But RVM caused me headaches, and rbenv — so far — just works!
Posted by James on Aug 17, 2011
Though I was turned off by rbenv’s creators' “we’re-so-much-better-than-RVM” attitude, I’ve grown frustrated with RVM and am going to give rbenv a try. RVM just didn’t work right with the various tools I’m using (ack-grep, RSpec2, autotest, FakeFS, etc.). I’m not sure where the problem is, but it’s likely because RVM overrides shell commands.
I’m still impressed by RVM and thank its creator for blazing a path to enable us to run multiple versions of Ruby. But I hope rbenv works better with my toolset.
Posted by James on Aug 16, 2011
On reading the title of “The moral decay of our [U.K.] society is as bad at the top as the bottom”, I thought “no, it’s worse, you right-wing rag!” But it’s actually an excellent article:
A great deal has been made over the past few days of the greed of the rioters for consumer goods, not least by Rotherham MP Denis MacShane who accurately remarked, “What the looters wanted was for a few minutes to enter the world of Sloane Street consumption.” This from a man who notoriously claimed £5,900 for eight laptops. Of course, as an MP he obtained these laptops legally through his expenses.
Yesterday, the veteran Labour MP Gerald Kaufman asked the Prime Minister to consider how these rioters can be “reclaimed” by society. Yes, this is indeed the same Gerald Kaufman who submitted a claim for three months’ expenses totalling £14,301.60, which included £8,865 for a Bang & Olufsen television.
Or take the Salford MP Hazel Blears, who has been loudly calling for draconian action against the looters. I find it very hard to make any kind of ethical distinction between Blears’s expense cheating and tax avoidance, and the straight robbery carried out by the looters.
…Mr Cameron is himself guilty of failing this test. It is scarcely six weeks since he jauntily turned up at the News International summer party, even though the media group was at the time subject to not one but two police investigations. Even more notoriously, he awarded a senior Downing Street job to the former News of the World editor Andy Coulson, even though he knew at the time that Coulson had resigned after criminal acts were committed under his editorship. The Prime Minister excused his wretched judgment by proclaiming that “everybody deserves a second chance”. It was very telling yesterday that he did not talk of second chances as he pledged exemplary punishment for the rioters and looters.
Posted by James on Aug 15, 2011
On a day when Warren Buffett pleaded with America to raise his taxes — because they’re absurdly low compared with his staffers, let alone ordinary working-stiff Americans — I was jolted by a struggling 70-year-old American’s rant. I’m posting the entire unedited rant below to remind us lucky Americans that millions of Americans are REALLY suffering under our callous political-economic system:
I’m 70 years old, work two jobs at $10 per hr (no benes) to pay the living expenses. I have diabetes and cardiovascular problems along with fighting depression almost every week. $100 is taken from my monthly $803.00 and $100 is taken from Mr’s 940 social security. Rent is $890.00 and we live with broken windows,rotting tile,rotting deck. The city of Puyallup charges us $100 per month for its services, garbage $80 and electricity varies from $100 to $400 in the winter. You brilliant conservative jerks are perfectly happy with cutting heating assistance. Mr is ill with heart problems and freezes in the winter. I do not know how I’m going to pay for the heat/electricity this winter. Now why in the hell do you think I would become depressed? Must be a chemical imbalance right?
Last year the mattress sprung a spring. We slept on it until it was totally unbearable. I bought a used matteress and had a neighbor deliver it to the house. Guess what, it had bed bugs! there is not enough money to have someone come and haul it away nor is there enough money to buy a new mattress that would be sure not to have bed bugs. That is only one reason I detest this country.
Mr. crawled under houses doing plumbing work most of his life at low wages with no retirement. Why didn’t we save for retirement you say? Just how clueless are you. After paying the rent,utilities, car repairs, food, doctor bills you REALLY think there is some left over for the luxury of saving for retirement? Much less doctor and dentist bills! Just how clueless can you get?
Two years ago my daughter died from a condition that is preventable from death by proper medical attention. Do you have any idea how I resent having to work with and pay rent/utilites to those who have medical care? What makes you more valuable than her life? Money? Oh I see you had money or health insurance for which you got a tax deduction. I get a tax deduction for nothing and yes I so pay taxes. My land lord gets the tax deduction while I pay for it.
I kindest thing the poor can do for its children is not to have any. That way their soul and spirit would not be damaged. You anti abortionist are damned liars, you think life is so precious, you’re not kidding the poor. The well to do can go to Canada or Europe and get an abortion, but not the poor. I think it is because you asshats need cannon fodder for your wars. We know the well to do and powerful do not put their children on the front line to die, but you put our children in the front lines to die protecting your damned corporations.
Do I sound a little angry? Geeze I wonder why. I’m sick of this country, especially when I see the medical needs of developed Europe do not let people needlessly die. doctors and dentist will not let the government train others in these skills in our government to serve the low income people because they might not get every nickel out of those needing their services.
Don’t give me this crap about emergency rooms and state dental care. After the emergency room gets through taking you to a collection agency and the state is willing to pull your teeth but not repair the damage done by years of dental damage. Wonderful choices!
Capitalism works? For who? just like slavery worked fine except for the slaves. The poor are one of the most hated groups in this country. Pledge of Allegiance? Forget it, its your country not mine, I just live here. Wait until more jobs are lost. I guess that is what its going to take before we start looking like England and of course we know only the “criminally minded” riot? Just how stupid, compassionless and ignorant can a nation get?
Posted by James on Aug 15, 2011
I feel very guilty eating meat because most meat comes from animals raised in atrocious conditions and living lives of suffering.
But Chinese bear bile farms are beyond abominable:
The bears were kept in a farm located in a remote area in the North-West of China. The bears on the farm had their gall bladders milked daily for ‘bear bile,’ which is used as a remedy in Traditional Chinese Medicine (TCM).
It was reported that the bears are kept in tiny cages known as ‘crush cages’, as the bears have no room to manoeuvre and are literally crushed.
The bile is harvested by making a permanent hole or fistula in the bears' abdomen and gall bladder.
As the hole is never closed, the animals are suspect to various infections and diseases including tumours, cancers and death from peritonitis.
The bears are fitted with an iron vest, as they often try to kill themselves by hitting their stomach as they are unable to bear the pain.
I knew about this horrifying practice but did not know bears tortured by it often try to kill themselves. And I’m powerfully moved by the intelligence and love purportedly displayed by one bear mother:
a mother bear broke out its cage when it heard its cub howl in fear before a worker punctured its stomach to milk the bile…
Unable to free the cub from its restraints, the mother hugged the cub and eventually strangled it.
It then dropped the cub and ran head-first into a wall, killing itself.
How can we humans conflate ourselves with “humane” and “humanity” when we regularly torture other animals and, sometimes, even other human beings?
Posted by James on Aug 12, 2011
I don’t like proprietary software. So I use Linux. But I want my new program — if you use Ruby: “gem install jimmy_jukebox”; code at https://github.com/JamesLavin/jimmy_jukebox — to work on Macs, and my wife has a Mac.
So, I figured, I’ll install it on her machine and see whether it works.
The gem installed fine. And “load_jukebox” worked fine. But “play_jukebox” isn’t detecting that the OS is a Mac (which is necessary because I must use a different program to play MP3 and OGG files on Macs). Investigation revealed that my wife’s machine was choking when my program asked it to “require ‘rbconfig’”. (There’s something strange about Ruby installations on Macs.)
I figured the easiest solution is to install RVM. So I install and configure RVM. But that chokes because Macs don’t come with GCC (a standard, open-source C/C++/Objective-C/Java compiler), though they definitely should.
Worse still, you can’t just install GCC on a Mac. You must first install XCode. And Apple won’t let you download XCode from its developer website without a username and password.
And, then, when you start downloading XCode, you discover it’s more than 4GB! An entire DVD.
It’s downloading now, but my efforts to test “jimmy_jukebox” on my wife’s Mac are delayed by three hours because of Apple’s fetish for all things proprietary.
Posted by James on Aug 11, 2011
(Update: I use “NoScript” to block webpages' JavaScript by default. After writing the rant below, I turned JavaScript on, and a semi-transparent box appeared behind the yellow text, making it readable, though less easily readable than it should be. However, a key principle of web design is that designs — especially homepages — should work in any browser, with or without JavaScript. So I’m still going to post this rant.)
While reading this article on the New York City tech scene and what NYC needs to compete with Silicon Valley, I was intrigued by ITP Tisch after reading “Most of the good design schools don’t emphasize web product design… NYU’s ITP stands out as a program that focuses on the intersection of design and technology (e.g. the Foursquare team went to school there).”
Eager to see what these web design gurus are doing, I clicked to learn about ITP. I was startled to discover that most of its homepage text is completely illegible because it’s yellow on a white background! The background image on ITP’s homepage is a photo, the middle third of which is bright white… exactly where most of the text is! I could read it only after highlighting it.
Never put yellow text on a white background! That’s not fancy web design. That’s simple common sense! Did anyone even look at their website’s homepage after they completed it?
What a lousy first impression ITP is giving about their competence in their field of claimed expertise!
Posted by James on Aug 11, 2011
Since The New York Times erected its pay wall, I’ve dramatically curtailed my reading, so I apparently overlooked “Charter School Battle Shifts to Affluent Suburbs” on suburban battles over charter schools, esp. charter schools seeking to offer bilingual immersion in English and Mandarin Chinese:
Jutta Gassner-Snyder, Hua Mei’s lead applicant, said some of the school’s 12 founders had received threatening e-mails.
“This is not just about the education of my child,” said Ms. Gassner-Snyder, who sends her daughter, Kayla, 4, to a private Mandarin-immersion preschool. “If we just sit back and let school districts decide what they want to do without taking into account global economic trends, as a nation, we all lose.”
Millburn’s superintendent, James Crisfield, said he was caught off guard by the plan for charters because “most of us thought of it as another idea to help students in districts where achievement is not what it should be.” He said the district could lose $270,000 — or $13,500 for each of 20 charter students — and that would most likely increase as the schools added a grade each year.
“We don’t have enough money to run the schools as it is,” Mr. Crisfield said, adding that the district eliminated 18 positions and reduced bus services this year.
Millburn offers Mandarin only in high school, fueling the arguments of those seeking the new charters. “Kids are like sponges,” said Yanbin Ma, a Hanyu founder. “There are so many things they can absorb and become good at, and I feel that our public schools haven’t done enough to take advantage of that.”
But to Mr. Stewart, a leader in a growing opposition that includes Livingston mothers who have helped collect more than 800 petition signatures, this sounds “selfish.”
“Public education is basically a social contract — we all pool our money, so I don’t think I should be able to custom-design it to my needs,” he said, noting that he pays $15,000 a year in property taxes. “With these charter schools, people are trying to say, ‘I want a custom-tailored education for my children, and I want you, as my neighbor, to pay for it.’ ”
I know enough about globalization, the benefits of bilingualism, and the special window of opportunity kids have to easily acquire new languages to feel that any elementary school that doesn’t teach a second language is defective. I sympathize with Millburn’s budget problems, but if they’re not teaching a foreign language — whether Spanish or Mandarin — in elementary school, they’re doing their kids a grave disservice. Every 21st Century American kid should view the world through multiple cultural and linguistic frameworks. And in overwhelmingly rich, white towns, like Millburn, exposing kids to other cultures and languages is especially important.
Bilingual immersion programs are fabulous. Deep knowledge of a second language is an enriching and empowering life-long communication tool. And thinking in multiple languages exercises brains in very healthy ways.
Millburn superintendent James Crisfield — who feels his budget is threatened — should ask himself why so many parents want to yank their kids out of Millburn’s “great” schools and enroll them in a not-even-functioning charter school with no track record. It’s (long since) time for Millburn’s school system to re-think its definition of a “great” education. Why do so many private schools offer foreign languages? Bilingualism is the main theme of Manhattan’s newest private school, Avenues: The World School, which when “still over a year until its first campus opens” had received “More than 1,200 applications for its early admissions program… by the June 15 deadline.”
Many enlightened parents consider any monolingual school inherently flawed, no matter how well its students add fractions or read English. Any superintendent at a “top” school district (like Millburn’s) who doesn’t appreciate the great value of teaching 21st Century kids foreign languages isn’t doing their job. If you refuse to teach kids foreign languages, don’t cry when someone else fights to offer kids an invaluable educational experience you insist on denying them.
Faced with strong parental interest in a bilingual Mandarin program, a town like Millburn should respond not by fighting a charter school but by creating one or two bilingual immersion classrooms at one of its elementary schools, as Palo Alto’s top school system has. Give parents choice. It’s something many parents feel so strongly about that they’ll move to Millburn just to enroll their child in your bilingual program: “We tried to enroll our son in the Ohlone Mandarin immersion program in Palo Alto but found it was massively oversubscribed. We ended up moving to San Francisco and my son now attends Jose Ortega.”
Posted by James on Aug 10, 2011
The housing bubble could never have happened if the three ratings agencies — Moody’s, Standard & Poor’s, and Fitch — hadn’t slapped “AAA” seals-of-approval on thousands of bundles of junk subprime mortgages. The ratings agencies similarly failed to detect many fraudulent firms, including Enron. The problem is not an inability to assess risk but a greed-driven allergy to issuing honest ratings:
Internal e-mails from the various firms show that warning bells were repeatedly ignored. A 2006 email from an S&P employee cited in the report said the rating agencies “have all developed a kind of Stockholm syndrome,” held captive by banks. Another e-mail cites an employee openly fretting about the agencies facing their “Nixon moment,” when the housing bubble finally burst.
In the bond rating business, market competition fails spectacularly because market competition drives ratings agencies to inflate ratings to please customers:
Levin’s report includes testimony from an endless stream of former employees who say they felt pressure to grant top ratings to new bond issues, lest they lose deals to competitors.
…[After Enron], lawmakers blamed the virtual duopoly that Moody’s and S&P held on the ratings market, and the law made it easier for competitors to join the industry.
That didn’t work. Instead, newcomers simply accelerated the “race to the bottom,” and made a nefarious strategy called “ratings shopping” even easier. If a bank wanted to issue a mortgage-backed security, it could shop it to various agencies and pick whichever firm offered the highest rating. The temptation for competitive forces to overwhelm good accounting was enormous.
Government efforts to regulate the firms haven’t worked well either:
[R]egulating the credit agencies has proven to be a near-impossible task. Not only are they intertwined in almost every corner of the market, they are intertwined with government agencies, too. Most state pension funds, for example, require that their managers only invest in funds with high ratings, which acts as a de facto endorsement of the agencies' work.
And the agencies have such a strong role in the markets that they can bully regulators into backing off.
In July 2010, with the increased liability provision of Dodd-Frank set to kick in, ratings agencies scored a victory by telling bond issuers they could no longer include the ratings on marketing materials. Because SEC rules require credit ratings to appear, the ratings agencies effectively created a Catch-22, threatening to shut down the entire asset-backed bond market. Regulators, faced with that potential calamity, backed off, and said issuers could temporarily issue bonds without the ratings. In December, the SEC made the change permanent, “effectively exempting companies from part of the U.S. Dodd-Frank Financial Reform Act,” according to a Bloomberg News report at the time.
Here’s a possible solution. We must separate the search for ratings business from the process of assigning a rating. I propose setting a standard price scale for those seeking bond ratings. The government could require (or coerce) every eligible ratings agency to either get out of the business entirely or commit to rating every bond and receiving 1/N of the rating fee bond issuers pay (where N is the number of ratings agencies; currently, N = 3).
Each rating agency would be assured an equal cut of every bond rating fee and would not benefit from manipulating ratings. Because firms' reputations would be built on the accuracy of their ratings, each firm would have an incentive to be accurate. And this incentive could be greatly enhanced if a periodic evaluation of existing ratings agencies were made. New ratings agencies could be granted eligibility, and agencies that had performed very poorly (on some objective, public metric) could be excluded. This would likely increase the quantity and quality of ratings each issuance receives, benefiting all who rely on those ratings.
Posted by James on Aug 09, 2011
This Atlantic article very nicely dissects America’s economy and the global technology and trade forces that are destroying the American middle class.
Workers atop the skills pyramid are doing very well. And those who own the companies profiting from technology and trade are getting filthy rich. Everyone else is suffering badly.
Posted by James on Aug 09, 2011
This looks great for anyone (like me) who uses Git and RVM:
export PS1="\[\033[01;34m\]\$(~/.rvm/bin/rvm-prompt) \[\033[01;32m\]\w\[\033[00;33m\]\$(__git_ps1 \" (%s)\") \[\033[01;36m\]\$\[\033[00m\] "
Posted by James on Aug 04, 2011
I’m scared humanity will place too much control of societal infrastructure in the “hands” of computers and robots and grow too dependent on them, but there is one area I can’t wait for robotics to dominate: driving. I’d love to be able to read while “driving.” But I’m far more interested in making the roads safer. I’m astonished daily by how inept, incompetent, reckless, law-breaking, rude, and distracted many of my fellow drivers are. I’ve nearly been hit by cars driving full speed through red lights and stop signs. Some drivers seem blind to lane dividing lines. People can’t park properly. Many are obviously inebriated or on drugs. Many more are — I still can’t believe this — too busy texting or chatting away on their cell phones or putting on makeup to bother to drive properly.
So I enjoyed Marc Andreessen’s comment and hope it proves prescient:
Google is working on self-driving cars, and they seem to work. People are so bad at driving cars that computers don’t have to be that good to be much better. Any time you stand in line at the D.M.V. and look around, you’re like, Oh, my God, I wish all these people were replaced by computer drivers. Ten to 20 years out, driving your car will be viewed as equivalently immoral as smoking cigarettes around other people is today.
Posted by James on Jul 30, 2011
Yesterday, someone Tweeted that a random test run of his code had produced a rare ordering-related bug that he couldn’t replicate because he didn’t know the seed value.
This suggests an interesting dilemma. Randomness is good because it exercises your code more rigorously, enabling you to identify more bugs. On the proverbial other hand, random bugs are tough to fix because they can’t be replicated.
The “obvious” solution — recording the seed when you generate a random one — is infeasible in Ruby because srand()’s return value is not the new seed but the previous seed.
Here are two solutions, both involving recording the seed to enable you to replicate any bug. Whenever you find your code making random calls — and don’t forget things like looping through hashes, whose ordering is not guaranteed — you’ll want to record your seed value:
1) Wrap random calls in begin... rescue... end blocks and make sure your rescue section prints the seed value or saves it to a temp file. I suspect the strange behavior of srand() — its return value is not the new seed but the previous seed — is presumably designed to make this possible:
irb> srand(1)
=> 9664034031542159759956844050608130405
irb> srand(2)
=> 1
irb> srand(3)
=> 2
This seemingly odd behavior enables you to grab the seed that produced the exception just by calling srand() again. This spares you the hassle of saving the seed when you initially call srand() and have not yet hit an exception.
2) An alternative approach — which I prefer because the seed value is really a global variable that should not be entangled with your code — is to set and save a random seed value. This seems impossible, since srand() returns the previous value and randomly selects a new value, which it does not return. But you can call srand() three times, first to generate a seed, second to save the seed in a variable, and third to set the seed. This lets you set and record a random value each time you run your test code:
irb> srand() # generates random seed
=> 230484092778069480813792111804730187148
irb> rand_seed = srand() # stores random seed in variable
=> 286682958024894595375678230594990984042
irb> srand(rand_seed) # sets seed
=> 185843738191625995823601334214935582043
irb> srand(rand_seed) # test: it works!
=> 286682958024894595375678230594990984042
irb> srand(rand_seed) # test again: still working!
=> 286682958024894595375678230594990984042
The first solution is arguably cleaner (aside from its entanglement in your code). But the three calls to srand() can be encapsulated in a function that sets a random seed and returns its value, as follows:
def srand_and_return_seed
srand()
rand_seed = srand()
srand(rand_seed)
rand_seed
end
seed = srand_and_return_seed
This works well:
irb> seed = srand_and_return_seed
=> 199008925976592588622036659089197447054
irb> seed
=> 199008925976592588622036659089197447054
irb> srand()
=> 199008925976592588622036659089197447054
Either way, you get the benefits of randomness while retaining the ability to replicate even the most obscure bugs.
Posted by James on Jul 26, 2011
Few products or services are truly “great” in the sense of being ideal for everyone. Whether a product is great for you depends on your budget, your feature preferences, your sense of style, your tolerance for complexity, your intended use of the product, etc. That’s true of movies, books, furniture, cars, computers, hotels, cell phones, lawn mowers… just about everything.
The greatest horror film ever may be “great,” but I would hate it because I dislike horror films.
Unfortunately, many product reviews say “this is awesome!” or “this sucks!” and leave it at that. Reviews by people with quite different needs/wants than us — even ignoring “reviews” by interested parties — not only waste our time but contaminate our decision-making process: “Well, this book looks like what I need but has only 3.5 stars while that book has 5 stars.”
So I love this review because Cory Doctorow begins by stating his biases and desires (which, even better, happen to coincide exactly with mine):
Ever since the iPad shipped, I’ve been waiting impatiently for a comparable Android device to emerge – something of like shape, size and capacity, but from a more open ecosystem than the one Apple offers.
Like Apple, Google operates an Android App Store that it controls – if your app doesn’t please Google, it doesn’t go in the store. But unlike Apple, Google allows you to install apps from unofficial sources, meaning that you can download apps directly from their authors or buy them from stores that compete with (or complement) Google’s store.
This is the kind of thing that’s important to me. After all, a tablet without software is just an inconveniently fragile and poorly reflective mirror, so the thing I want to be sure of when I buy a device is that I don’t have to implicitly trust one corporation’s judgment about what software I should and shouldn’t be using.
Because the author states his criteria up front, the reader can choose whether to continue reading or not waste her time. My family has had an iPad for the past year that four of us use quite often, so we’re toying with buying a second device. I hate proprietary systems — and find the iPad’s closed nature especially frustrating, so I’m curious what more open alternatives exist and couldn’t wait to read this review, since the author had done my work for me.
Samsung’s tablets – for no discernible reason – use a custom tip that isn’t any of the standard mini- or micro-USB ends. Instead, it’s a wide, flat connector, like the one Apple uses, but of course, it’s not compatible with Apple’s cables, either. I’ve already lost mine, run down the battery and now I can’t use the tablet again until I find another one. I passed through three airports recently, and none of them had a store that stocked them.
I have phone charger cables in my office, my travel bag, my backpack and beside the bed. The very last thing in the entire world that I need right now is to have to add another kind of USB cable to all those places. The decision to use a proprietary connector in a device whose major selling point is that it is non-proprietary is the stupidest thing about the Galaxy Tab 10.1 – even stupider than calling it the “Galaxy Tab 10.1.”
Likewise disappointing was the decision to omit the microSD card slot on the Wi-Fi-only version…. [and] They’ve preloaded the device with several Samsung apps that, insultingly, can’t be deleted without “rooting” the device, a process that voids your warranty.
I had already ruled out a Galaxy Tab for its lack of a USB port, but what I read next soured me on Android (for now):
[U]ntil now, Android devices showed up on your desktop as standard USB storage, and you could move files off or onto them by dragging them around in your file-browser. This was straightfoward, fast and easy…. [T]he adoption of MTP means that Android now requires a proprietary desktop app to effect simple file transfers – an app that is, if possible, even worse than iTunes, and represents no selling-point for those of us who want non-proprietary, “just-works” mobile devices.
The perfect review… for me. The author’s “eyeing up the forthcoming Lenovo ThinkPad Tablet.” Can’t wait to read his review!
Posted by James on Jul 25, 2011
Because I have two young kids, I’ve read and thought a lot about education and learning over the past five years.
I can summarize my objective for my kids' elementary years as “developing a passion for learning and the capacity to learn independently.”
Any kid who enjoys learning and is equipped with skills and resources to pursue her/his interests and curiosities will thrive.
NCLB’s focus on test scores confuses cause with effect and doesn’t even aim for the right effect! Passing math and English tests is a side effect of real learning, and it’s a lousy measure of the success of our schools. Replacing a learning experience with intensive test prep may or may not boost test scores. But it certainly will stifle learning in the long term by artificially making learning a chore, rather than something exciting and valuable for its own sake.
Enthusiasm drives learning. A kid who carries a book with him/her everywhere he/she goes — a lifelong habit of mine; my parents dragged me around Canada one summer while I read a thick SAT vocabulary book — doesn’t need to copy by hand twenty dictionary definitions a week — as my 9th grade English teacher forced us to… though I refused, resulting in my English grade falling from a 1st quarter “A+” to a 4th quarter “F.”
We should teach in ways that leverage kids' natural enthusiasm for learning. For example, let students choose which books to read, and let’s teach math using (online and “offline”) games. Learning new things is intrinsically enjoyable and rewarding. Drills and worksheets, conversely, suck the fun out of learning.
My metric for judging an elementary school is simple: The proportion of kids smiling (because they’re playing with friends or excited by the science experiment they’re conducting) or entranced by some task that will expand their knowledge (like reading a book or observing a frog or watching a documentary on the Mayflower).
Schools with happy, engaged kids are fostering students' love of learning and building their capacity for lifelong learning. Test scores follow naturally. Conversely, schools that “drill and kill” fail students in the long-run and, probably, the short-run too. No school should be allowed to kill children’s natural enthusiasm for learning.
Posted by James on Jul 25, 2011