This week, two “quickies”: rounding up and down to the next power of two, and converting efficiently a value to exactly 0 or 1.
Suggested Reading: Zen Cat
24/01/2009Judith Adler, Paul Coughlin —Zen Cat— Rodale, 2003, 112 pp. ISBN 0-8759-6923-2
I love all solitary places, where we taste the pleasure of believing what we see is boundless, as we wish our souls to be.
— Percy Bysshe Shelly
The longer I live, the more beautiful life becomes
— Frank Lloyd Wright
This short book cointains about sixty short proverbs, quotations, sayings and poems, each accompagnied by an à propos picture of a cat. As many poetry books, to be read in a meditative mood.
Suggested Reading: Google’s PageRank and Beyond: The Science of Search Engine Rankings
24/01/2009Amy N. Langville, Carl D. Meyer —Google’s PageRank and Beyond: The Science of Search Engine Rankings— Princeton University Press, 2006, 224 pp. ISBN 0-691-12202-4.
Langville and Meyer presents us the mathematics behind Page Rank, Google’s method of rank prioritization as well as other similar methods. If the first few chapters are concerned with the history of search engines and search methods, the remainder of the text is clearly mathematical in nature.
Throwing in More Hardware?
20/01/2009In a recent blog entry, Jeff Atwood makes the case that “hardware is Cheap, Programmers are Expensive”, basically arguing that in a lot of cases, it’s cost-efficient to add cheap, faster, hardware to a performance problem rather than investing time to actually enhance the code at the algorithmic and implementation level.
I do, however, disagree with him on many points.
Honni soit le Hongrois
13/01/2009The original Hungarian notation is due to Charles Simonyi who invented it sometimes while he was working at Xerox Palo Alto Research Center—the Xerox PARC that gave us the mouse and the first graphical user interfaces. The basic principle of Hungarian naming convention is to prefix the variables with one or many particles, encoding alternatively its type or its intend. This lets programmer write prgszNames as a variable name, which is perfectly legible to one well versed in Hungarian; however, but looks mostly like gibberish to just anyone else.
I recently changed my mind about the Hungarian naming convention. I don’t think it’s that stupid anymore.
Cleaning LCD screens
05/01/2009I’m sure that, like me, you’ve tried all kinds of chemical cleaners to clean LCDs. But, like me, also, you’ve noticed most of them leave smudges that you can’t get rid of. Window Cleaners are also rather bad at this, and they may be too rough for the coating of your LCD screens.
However, I think I finaly found what it takes: 50% isopropyl alcohol. That’s right, common rubbing alcohol you can get for 3$ at your local drugstore. Even better, they sell it with a spray cap, for your convenience. Just spray alcohol on a clean, soft, non-linting rag (like a paper towel) and clean your screen gently. Do not spray at the screen directly, because it may cause some of it to leak into the electronics and cause much mayhem. It may take a few application to remove all of the previous chemical cleaner’s residues… but I haven’t seen my screens that clean in a long time.