ebay adds shipping column

Filed under: — Posted on 2005.09.13 @ 11:46

ebay has added a shipping column to their list display. It makes weeding out vendors charging $1 for a product and $50 shipping a bit quicker.

<update> - Seems this isn’t a “new” feature, but an option you can select. It magically appeared for me which is how I first found out about it…

Movie plot planning

Filed under: — Posted on 2005.09.08 @ 12:12

Bruce Schneier has written a great essay in Wired on what he calls “movie plot security”. He points out, as the folks at What the Hack did, that too often the focus of security is about treating the perception instead of actually increasing security.

The essay explains the finger pointing that’s going on over how the Katrina disaster was handled: organizations responsible for planning must spend limited resources looking forward, but end up being judged in hindsight. Security and disaster planning are about managing risks, which means priorities are set and resources allocated. Periodically a one-chance-in-a-200 event will occur that makes the decisions appear wrong. We must accept that it is impossible to plan for every scenario, or always have the resources in the right place at the right time to address every possibility. Laying blame is easy, the harder, and more important task, is to learn from current events to improve plans for the future. As someone said on another thread: “Learning how to deal with emergency response ALWAYS builds lessons on the backs of the dead.”

Canadians want cheap gas

Filed under: — Posted on 2005.09.05 @ 21:32

This is crazy. A good percentage of Canadians apparently think they’d be better off if petroleum resources and gas companies were nationalized. Tax subsisidized gas prices seem attactive at this point - we can afford to keep our SUVs on the road by having the government reach into our neighbours pockets to help us. It sure seems good when we power our air conditioners in the summer with subsidized electricity.

I have to wonder how much the respondents to the survey had actually thought about the issue prior to being asked. From the numbers, it would seem not too many. Then again, radio shows were calling on various levels of government to do something about gas prices last week.

Calling on the government to do something seems to tbe the Canadian way. When the Toronto police chief said communities needed to take charge of the gun violence problem in the city, one community took charge by holding a press conference calling for all three levels of government do something, and hold a summit on the problem within 30 days.

bashing octal numbers into decimal

Filed under: — Posted on 2005.09.01 @ 10:20

The bash shell has a quirk in how it recognizes numbers that caused my monthly mail archiving cron job to hiccup again this morning. Numbers preceded by a zero are assumed to be octal. My script stores the previous month in a variable as follows:
MTH=$((`date +%m` - 1))
This worked fine until last month when I got the following error in the cron output: value too great for base (error token is “08″). Instead of storing the archive as 2005-07, it stored it as 2005-00. The date command as above returns the month as two digits which fools bash into thinking it is working with octal numbers for the first nine months of the year. August and September (08 and 09) are invalid values in octal.

The problem is fixed in one of two ways. GNU date can be told not to zero pad the numbers by inserting a hyphen between the ‘%’ and ‘m’:
MTH=$((`date +%-m` - 1))
The bash shell can also be told the number is decimal by using the base#number notation as follows:
MTH=$((10#`date +%m` - 1))
For September this modifies the date output to be 10#09, which bash evaluates as a decimal instead of octal 9. This method can be applied more generally to anytime a script is returning zero padded values that should be interpreted as decimal numbers.

Creative Commons License
This work is licensed under a Creative Commons License.
Powered by WordPress