Archive for July, 2007

Code Like a Pythonista: Idiomatic Python

Monday, July 30th, 2007

A great tutorial on how to code the Python way.

In the tutorial I presented at PyCon 2006 (called Text & Data Processing), I was surprised at the reaction to some techniques I used that I had thought were common knowledge. But many of the attendees were unaware of these tools that experienced Python programmers use without thinking.

Downloads: Secure Login (Firefox Extension)

Monday, July 30th, 2007

This Firefox extension makes the saved passwords feature of Firefox safer by forcing you to click on the Secure Login button in order to fill in your login name and password on forms. This helps prevent cross-site scripting attacks on malicious sites that try to steal your passwords.

Secure Login provides you with a number of Security enhancements and helps protecting you from phishing:

Disabling the prefilling of login forms prevents malicious JavaScript code to automatically steal your login data.
This is due to the fact that no login data is inserted in form fields before the user clicks on the login button or logs in using the keyboard shortcut.
To make sure you login to the right website, the second level domain of the login url is compared to the second level domain of the current page.
If they do not match a dialog prompt is displayed before login.

Secure Login provides you with an optional setting to protect you from all JavaScript code during login.
This can prevent cross-site scripting (XSS) attacks without having to deactivate JavaScript completely.
If you enable this option, your login data will never be inserted in any form fields nor will the login form be submitted.
Instead your credentials will be sent to the login page using internal Firefox methods.
Not all login forms will work this way, e.g. not those using JavaScript routines. Therefore, you can add such websites to an exception list.

Satellites solve mystery of low gravity over Canada

Thursday, July 19th, 2007

Well this is the first time I’ve ever heard of this.

If it seems Canadians weigh less than their American neighbours, they do – but not for the reasons you might think. A large swath of Canada actually boasts lower gravity than its surroundings.

Researchers have puzzled for years over whether this was due to the crust there rebounding slowly after the end of the last ice age or a deeper issue involving convection in the Earth’s mantle – or some combination of the two.

Now, ultra-precise measurements taken over four years by a pair of satellites known as GRACE (Gravity Recovery and Climate Experiment) reveal that each effect is equally responsible for Canada’s low gravity. The work could shed light on how continents form and evolve over time.

Laws of Software Development

Wednesday, July 18th, 2007

This site has collected a large list of laws related to software development.

Inspired by Phil Haack’s article 19 Eponymous Laws of Software Development, I decided to collect laws, axioms and rules pertaining to mainstream software development and put them in a nice, easy-to-read table.

Laws of Software Development

The Origin of Everyday Punctuation Marks

Friday, July 13th, 2007

Read this article on Neatorama to find out how some of our punctuation symbols came to be.

Question Mark

Origin: When early scholars wrote in Latin, they would place the word questio - meaning “question” - at the end of a sentence to indicate a query. To conserve valuable space, writing it was soon shortened to qo, which caused another problem - readers might mistake it for the ending of a word. So they squashed the letters into a symbol: a lowercased q on top of an o. Over time the o shrank to a dot and the q to a squiggle, giving us our current question mark.

Images That Changed The World

Friday, July 6th, 2007

A collection of the most powerful photos ever taken.

Some people might be offended or upset by these images but this isn’t my intentions I just want it to be thought provoking and enlightening, and for people to talk about the past and to never forget, because we need to learn from past events other wise we will keep repeating history.

Update: linked to original source

Book: Uncle Tungsten

Wednesday, July 4th, 2007

Uncle Tungsten
Uncle Tungsten: Memories of a Chemical Boyhood
by Oliver Sacks
Alfred A. Knopf, 2001

Neurologist Oliver Sacks gives us a memoir of his childhood and, at the same time, a brief history of chemistry. Oliver describes how he became interested in science and chemistry through the inspiration of his relatives. As the book moves through Oliver’s early life and his fascination with scientific experiments, we get to follow his path, learning about famous scientists and their importance in history. This is both a personal and an educational account of a perpetually curious experimenter.

Rating: 7/10

Links:

Swarm Theory

Tuesday, July 3rd, 2007

National Geographic has published an interesting article on how swarm behaviour models can help create smart, distributed problem-solving systems.

Where this intelligence comes from raises a fundamental question in nature: How do the simple actions of individuals add up to the complex behavior of a group? How do hundreds of honeybees make a critical decision about their hive if many of them disagree? What enables a school of herring to coordinate its movements so precisely it can change direction in a flash, like a single, silvery organism? The collective abilities of such animals—none of which grasps the big picture, but each of which contributes to the group’s success—seem miraculous even to the biologists who know them best. Yet during the past few decades, researchers have come up with intriguing insights.

Spinning Silhouette Optical Illusion

Monday, July 2nd, 2007

Cool visual illusion. It may be difficult to make the mental switch at first, but it is quite intriguing.

If you look at the spinning girl’s silhouette below, you will think it is spinning clockwise, probably. When you check her shadow below, momentarily the spinning direction changes in your mind, and now the girl is spinning counter-clockwise. It can be quite hard at the beginning to notice switch of the spinning direction, but eventually you’ll manage.