April 9th, 2007
Damn, I promised myself I was going to finish the first draft of Refactoring HTML today come hell or high water, and I’m on track to do it; but a European gull I don’t have on my life list has showed up at the Soccer field in Gerritsen Beach, just a short bus ride away. What to do? What to do?
Read the rest of this entry »
Posted in Birding | No Comments »
April 8th, 2007
According to the Detroit News:
Credit Ford Motor Co. CEO Alan Mulally with saving the leader of the free world from self-immolation.
Mulally told journalists at the New York auto show that he intervened to prevent President Bush from plugging an electrical cord into the hydrogen tank of Ford’s hydrogen-electric plug-in hybrid at the White House last week. Ford wanted to give the Commander-in-Chief an actual demonstration of the innovative vehicle, so the automaker arranged for an electrical outlet to be installed on the South Lawn and ran a charging cord to the hybrid. However, as Mulally followed Bush out to the car, he noticed someone had left the cord lying at the rear of the vehicle, near the fuel tank.
“I just thought, ‘Oh my goodness!’ So, I started walking faster, and the President walked faster and he got to the cord before I did. I violated all the protocols. I touched the President. I grabbed his arm and I moved him up to the front,” Mulally said. “I wanted the president to make sure he plugged into the electricity, not into the hydrogen This is all off the record, right?”
OK. So our illustrious leaders are a few homeworks short of a gentleman’s C, and I’m not too surprised that a major CEO would think they can’t be trusted to figure out which end of the car to plug an extension cord into. However here’s my question:
Just what the hell is Ford doing building a car that can blow up and kill people if some random idiot (or the President of the United States) sticks the plug into the wrong hole?
Read the rest of this entry »
Posted in User Interface | 6 Comments »
April 6th, 2007
Is anyone aware of work on fundamentally safe database APIs for server side programs that completely avoid the possibility of SQL injection? What I envision is a somewhat limited API that does not execute raw SQL statements or provide any facility to do so. Instead you’d set up something like this:
Statement s = database.getSelectStatement();
s.setTable("customers");
s.addField("email");
s.addField("telephone");
s.addCondition(
new EqualsCondition("id", "p17")
);
ResultSet r = s.execute();
The library would turn this into the usual SQL statement
SELECT email, telephone FROM customers WHERE id = "p17"
The library could verify the individual parts of the query before submitting it to the database. If you passed a string like "id = \"p17\" OR true; DELETE * FROM customers; SELECT * FROM customers WHERE " to EqualsCondition() it would throw an exception.
Read the rest of this entry »
Posted in Databases | 13 Comments »
April 6th, 2007
1. Biodiesel is bad for the environment.
Sorry Willie. Rain forests are being torn up and plowed under to grow palm trees to be turned into biodiesel. However the emissions are shifted from mostly European, first world countries, to less developed third world countries. The net effect is an increase in global CO2. This enables Europe to come closer to meeting its Kyoto targets without actually having to reduce its power consumption. It’s a shell game, and one we’re losing.
And if that weren’t bad enough, it’s also diverting land and crops from food production. Increased usage of biodiesel may well increase starvation among the poorest people in the world.
Read the rest of this entry »
Posted in Economics | 4 Comments »
April 4th, 2007
I’ve upgraded the WordPress engine on this site to the latest version, 2.1.3. Initial results look positive, but holler (preferably via e-mail) if you notice anything going wrong.
Read the rest of this entry »
Posted in Blogging | 4 Comments »
April 4th, 2007
What if any tools are available for reading HTML, finding missing width and height attributes on img elements, and filling in the relevant values? So far all I’ve found is this Perl Script from Randal Schwartz circa 1999 and this Perl script based on ImageMagik from Marc Merlins. I haven’t been able to resolve the dependencies for Schwartz’s script yet. Merlins’ runs, but is not XHTML savvy. That may be easy to fix though.
BBEdit almost does this, but it replaces existing height and width attributes too, including ones you’ve deliberately set to a different size. I only want to fill in missing height and width attributes, not change existing ones.
I’d love to find a simple open source GUI tool that could pull this off for an entire site.
Posted in Web Development | 4 Comments »