From the category archives:

Uncategorized

Yahoo translation fail

by John on March 10, 2010

Allen from the Wave Behind blog translated my blog post Just in case versus just in time into Chinese. I appreciate that Allen went to the trouble of doing the translation. I can’t read Chinese, but people who can told me he did a good job.

Mark Biek pointed out the quality of the Google and Yahoo translations from Chinese back into English. The Google translation is awkward but understandable. The Yahoo translation, however, is a total failure. First of all, the translation is illegible in Firefox:

Using Internet Explorer 8, the text is legible, but it doesn’t make sense:

The two screen shots focus on different parts of the text. I chose a swatch near the top of the Firefox version where the text was most illegible. I chose the IE8 swatch to showcase the phrase “the smelly spicy jiao raccoon dog” that Mark had pointed out.

{ 3 comments }

A note to new subscribers

by John on March 9, 2010

Thank you for subscribing to my blog. I wanted to say a little about the blog for those of you who have just subscribed recently.

I post a little more than one article a day on average on a variety of topics. Here’s a list of some of the most popular posts by category.

This blog is also available as a podcast. The audio is automatically generated. The quality is good for ordinary prose but not as good for other content.

Here’s my contact info. If you submit a comment that never appears, please send me a note. I get thousands of spam comments, and so I filter spam aggressively. Sometimes a legitimate comment gets blocked. I enjoy hearing from you. I learn a lot from the comments.

I have several Twitter accounts, one personal account and six daily tip accounts. I keep the volume low on the daily tip accounts: one scheduled tip per day plus an occasional unscheduled tweet.

{ 2 comments }

Edward Tufte fans are understandably excited about President Obama’s announcement last Friday that Tufte has been asked to serve on the Recovery Independent Advisory Panel.

Tufte is a widely respected expert in data visualization. I attended one of his seminars years ago and thoroughly enjoyed it. I wish him well. I’m sure he will do a good job. However, there are limits on any statistician working for politicians.

I recommend listening to Ron Howard’s explanation for why he no longer consults for government. (Ron Howard the Stanford University professor, not Ron Howard the actor/director.) Howard  produced  a decision analysis of nuclear fuel reprocessing for the Carter administration, but his hands were tied for political reasons. He concludes

If this were the only case where I had this dispiriting result … perhaps I could treat it as an exception. But what I’ve found is every time I did a study like this … there was nobody home in terms of really wanting to know the result.

Howard’s interview is available from the here. The remarks above run from 5:00 to 8:15.

{ 1 comment }

Weekend miscellany

by John on March 6, 2010

Software development

Brilliant bipolar minds
Internet law on .NET Rocks
Whatever happened to programming?
PowerShell survival guide

Business and economics

Drawing the line between free and paid
Federal worker compensation

Math

Nicomachus’s theorem
63rd Carnival of Mathematics

Miscellaneous

Why heroes use checklists
Free online OCR (haven’t tried it, but it looks interesting)

Parody

{ 1 comment }

Weekend miscellany

by John on February 26, 2010

International

Israeli web design
North Korean propaganda

Computing

What really happens when you navigate a URL
Seven deadly sins of JavaScript implementation
Gallery of processor cache effects
The R type system

Math

Math symbols in HTML
How to solve quadratic congruences
(Thanks to Nemo for filling in a gap.)

Productivity and expertise

The myth of efficiency
Don’t become an expert

Miscellaneous

Linguistic pet peeves
The dentist and the statistician
Punching a friend in the face

{ 0 comments }

Weekend miscellany

by John on February 19, 2010

Music

The night I met Einstein

Copyright

Copyright reform act

Computing

Code Myopia
Probability distributions in Excel
Top 25 most dangerous programming errors
When open source is no longer the underdog
What does functional programming mean?

Math

Why sin(11) is approximately -1
Math teachers at play carnival#23
Calculator trick

Psychology

Suckers for irrelevancy
What happens when you get drunk?

Photo from Puerto Rico via morgueFile

{ 0 comments }

Weekend miscellany

by John on February 13, 2010

Design

Ideation and design thinking podcast
Arial versus Helvetica

Science

Photographic periodic table
An alternative to Occam’s razor

Computer science

Lessons from studying a few billion lines of code
50 free computer science courses online

Business

If your product is great, it doesn’t have to be good
Keep your crises small

“If you give a good idea to a mediocre group, they’ll screw it up. If you give a mediocre idea to a good group, they’ll fix it.” — Ed Catmull

{ 1 comment }

A little optimization and a challenge

by John on February 11, 2010

Waldir Pimenta asked me whether it is possible to test the condition

max(a,b) / min(a,b)  < r

without computing max(a, b) or min(a, b). Here a> 0, b> 0, and r > 1. (If r ≤ 1, the condition is always false.) The inequality has to be evaluated in an inner loop of a real-time image processing application and so the time saved by avoiding computing the max and min might matter.

We can multiply the original inequality by min(a, b) since a and b are positive. The condition becomes

max(a, b) < r min(a, b) = min(ra, rb).

We then expand this inequality into four simple inequalities:

a < ra
b < ra
a < rb
b < rb

Since r > 1, we know that a < ra and b < rb and so we only need to check a < rb and b < ra. In C notation we would evaluate

 ( a < r*b && b < r*a )

rather than

 ( max(a,b) / min(a,b) < r )

Whether this saves any time depends on context, though it’s plausible that the former might be more efficient. Some portion of the time the condition a < r*b will evaluate to false and the second half of the condition will not be evaluated.

(C evaluates an expression like (p && q) from left to right. If p is false, q is not evaluated since it is known at that point that the expression (p && q) will evaluate to false regardless of the value of q.)

Challenge: How often will the condition a < r*b evaluate to false? What are your assumptions? Leave your answers below.

Update: Combining the ideas of Carlos Santos and Christian Oudard in the comments below, you could implement the inequality as

a < b ? (b < r*a) : (a < r*b)

There are too many other good ideas in the comments for me to keep editing the blog post so I’ll just ask that you scroll down. I’m surprised at all the ideas that came out of evaluating a simple expression.

{ 32 comments }

Apple are evil?

by John on February 8, 2010

Mike Croucher wrote a post the other day explaining why he’s going to buy an iPad. He said that one of the objections to the iPad he’d heard was

Apple are evil because they take away control of how we use their devices.

I teased Mike that I would never say “Apple are evil.” On this side of the Atlantic we’d say “Apple is evil.” But in the UK it is accepted usage to say “Apple are evil.”

“Apple” is a collective noun when used to refer to Apple Inc. British English treats collective nouns as plural, but American English treats them as singular. Although the British usage sounds odd to my American ears, it makes sense just as much sense as the American convention. You could argue for plural verbs because corporations are made of individual people, or you could argue for singular verbs because the corporations act as a single entity. See Grammar Girl’s tip on collective nouns for more background.

By the way, I don’t believe Apple is evil. They’re just a company, no more or less virtuous than most other companies.

Apple posts:

I am not an operating system
Inside Steve Job’s brain
Protestant PCs, Catholic Macs

Grammar posts:

Important because it’s unimportant
English grammar
Finding grammatical errors in software

{ 3 comments }

Weekend miscellany

by John on February 6, 2010

Computing

Online diff tool
HTTP flowchart
Astroinformatics
Python propaganda
How to safely store a password
Google Docs dropping IE6 support
Why it’s hard to move Facebook off PHP
Keyboard shortcuts for Windows, Mac, and Linux

Math

Fundamental examples in math
Daily fact from algebra and number theory
62nd Carnival of Mathematics

Miscellaneous

Always wear your seatbelt
Space shuttle repaired with duct tape (lunar rover too)

How to peel a pummelo. YouTube video with nice soundtrack.

{ 1 comment }

Sleep debt and industrial accidents

by John on February 2, 2010

From The Power of Full Engagement:

… every one of the great industrial disasters of the past twenty years — Chernobyl, the Exxon Valdez, Bhopal, Three Mile Island — occurred in the middle of the night. For the most part, those in charge had worked very long hours and built up considerable sleep debt.

{ 0 comments }

Weekend miscellany

by John on January 29, 2010

Science

Diamond oceans
Plants put the bend in rivers
State of biology data integration

Programming

Developer town (little individual houses as offices)
.NET framework install base
Evolution of a Python programmer
How to recognize a good programmer

Miscellaneous

Crayola history
Visa restriction index
LaTeX search
The perverse economics of college construction
Odds that best potential chess player has never played chess
Paying more for information than for food

{ 2 comments }

Universal time

by John on January 28, 2010

Universal time (UTC) is the same as Greenwich Mean Time (GMT), give or take a second. It’s essentially the time in Greenwich, England except it ignores Daylight Savings Time.

The abbreviation UTC is an odd compromise. The French wanted to use the abbreviation TUC (temps universel coordonné) and the English wanted to use CUT (coordinated universal time). The compromise was UTC, which doesn’t actually abbreviate anything.

Sometimes a ‘Z’ is appended to a time to indicate it is expressed in UTC. The NATO phonetic alphabet code for ‘Z’ is ZULU, and so UTC is sometimes called “Zulu Time.”

It’s useful to know how your time zone relates to UTC. (You can look it up here.) For example, I live in the US Central time zone. Central Standard Time (CST) is UTC-6, i.e. we’re 6 hours behind Greenwich. Knowing your time relative to UTC makes international communication easier. It also helps you read computer time stamps since these almost always use UTC.

One of the advantages of UTC is that it avoids Daylight Savings Time. DST is surprisingly complicated when you look at it in detail.  Some countries observe DST and some do not. Countries that do observe DST may begin and end DST on different dates, and those dates can change from year to year. And inside countries that observe DST some regions are exceptions. For example, the United States generally observes DST, but Arizona does not. Actually, it’s even more complicated: The Navajo Nation inside Arizona does observe DST.

Related posts:

Mercator projection
Find distances using longitude and latitude
Visual Source Safe and time zones

{ 1 comment }

Engineering in the open

by John on January 26, 2010

From Herbert Hoover, mining engineer and 31st President of the United States:

The great liability of the engineer compared to men of other professions is that his works are out in the open where all can see them. His acts, step by step, are in hard substance. He cannot bury his mistakes in the grave like the doctors. He cannot argue them into thin air or blame the judge like the lawyers. He cannot, like the architects, cover his failures with trees and vines. He cannot, like the politicians, screen his sort-comings by blaming his opponents and hope the people will forget. The engineer simply cannot deny he did it. If his works do not work, he is damned.

Herbert Hoover photo

Related posts:

Architects versus engineers
Catalog engineering and reverse engineering

{ 3 comments }

Weekend miscellany

by John on January 15, 2010

Math and aesthetics

Beautiful architecture video.  No explicit math, but lots of math behind the scenes.

Some math and some great images:  3-DSpirographs

Advanced math with some pictures: algebraic topology books for download from J. P. May and Allen Hatcher. (Hatcher’s book has more pictures.)

Miscellaneous

There’s really nothing that cannot be innovatived

Failure insurance for students

Genes and patents

Why Donald Knuth does not use email

{ 0 comments }