Month: November 2008

MozMill 1.0RC2 w/ Test Recorder

Posted by on November 29, 2008

Last week we finished up the 1.0RC2 release of MozMill.

The biggest new feature was is the Test Recorder. You can now hit the Record button and use the Application normally and create a test outline. I say “test outline” because it’s usually necessary after creating a recorded test to go in and fill it up with a few conditional wait calls, like waitForElement and waitForPageLoad. If you don’t the test runs too fast and ends up failing pretty quickly. We’re working on some future code to pick up things like new page loads so that we can add those waits in a recorded test but for now you’ll have to do them by hand.

We also have significantly improved some of the documentation.

I’ll be writing some more blog entries this week on using MozMill for writing and running different kinds of tests.

Obama’s unacceptable position

Posted by on November 24, 2008

So, what do you do after “your guy” wins the presidency.

First you have a drink, then you start holding them to task for all those campaign promises and poisitons they took. If you’re a good activist, you’re always attacking the guy who’s in power, no matter who they are.

Unfortunately, I don’t even have to wait for Obama to be president to start attacking him. Now, and even during his campaign, Obama took up one position in particular that is completely unacceptable under any circumstances; his position on gay marriage.

At this time in our history, nearly the 30th anniversary of the assassination of Harvey Milk, anything less than unequivocal and complete support of gay rights is unacceptable. There is no excuse.

I disagree with Obama on a variety of issues, but on most of them I can see why it isn’t politically feasible for him to take my position. For example; Obama does not share my position on fundamental Palestinian human rights. But that’s my fault, and the fault of the movement for Palentine, in not convincing enough of the american public of our position on Palestine rather than AIPAC’s.

But gay rights is very different. Within popular American culture homosexuality is now almost universally accepted. In the last ten years homosexual persons have gone from a few stereotypical sitcom characters to a series of incredibly popular talk show hosts, political pundits, and positive sitcom characters. Many of which do not conform to traditional gay stereotypes and are well accepted in popular American culture. I don’t wanna harp on television as a pop culture barometer but it’s a good metric to what is easily accepted by the public.

In this climate, at this time in our history, there is no excuse for those in power who do not support gay rights. There is no compromise. No “civil union”. This is not a negotiation. There is only one word for any position less than universal gay rights in the United States; “Unacceptable”.

Mandatory Election Day Post

Posted by on November 4, 2008

Those that know me well know that I hold some fairly radical political beliefs. Regardless of what might be referred to as my “Utopian” beliefs suggest, I do partake regularly in main stream politics. But because I hold such radical beliefs I think of voting a little differently than most.

Most people think of their vote as a moral stake in the ground, declaring to the ballot machine that YOU BELIEVE IN THIS! It’s easy for me to detach myself from that because there isn’t a viable candidate that believes in all of my values. There are, however, candidates that will make things a little better than they are now. There are candidates that will be more malleable to social movements and changes in policy. And although I don’t believe that capitalism can ultimately provide equality to all people significantly less people would starve to death or die of preventable illnesses if we listened to Nobel prize winning economists like Joseph Stiglitz.

Ballot

I get an absentee ballot but I don’t mail it in. In California you can show up on election day and drop your absentee ballot in a locked box to be counted later. I do this so that I can fill out all of the local representatives and propositions from my home with all the information available on the internet about each issue. I don’t fill in some state representatives and the presidential pick until the day of the election for reasons that will be explained.

National

California is going to Obama, it’s 2pm on November 4th and it’s very clear I don’t have to worry about him winning my state. If I lived in Pennsylvania or Ohio I’d be concerned and I would be voting for Obama. On economic policy there are large differences between the candidates. These differences translate in to serious standard of living differences for poor and working people across the country.

I’m fortunate enough to live in a state where Obama doesn’t need my vote and I can easily support a third party. I’ve voted for Nadar in the past but I just can’t do it this year.

Nadar is a true American hero. Nadar did much more as a professional citizen than Obama can hope to accomplish as President. Just to name a few things; Safe Drinking Water Act, Occupational Safety and Health Administration (OSHA), Environment Protection Agency (EPA), Consumer Product Safety Administration, the recall of millions of defective motor vehicles, seat belts and air bags, and last but not least the Freedom of Information Act of 1974. Unfortunately, Nadar’s presidential bids have done nothing but marginalize him in a time where he should have been the strongest citizen voice in the country. The unbelievable corporate greed and economic failures of the last 7 years are issues in which Ralph Nadar should have been the first voice you would hear on news and television but instead he was on the road raising money for another Presidential bid or paying down his debt from the last. It’s time to move on.

I’ll be voting for Cynthia McKinney of the Green Party. The Green Party does a lot, and they are building a good third party from the ground up; a grass roots organization with lots of local representatives in seats of influence gaining momentum for better viability in higher electoral positions. The more votes they get this election the better for the Party and they need it more than Obama needs another California vote.

Propositions

I love California. California has the strongest ballot initiative program I know of in the country. I’m a strong believer in participatory democracy over representative democracy so the ability to take important issues directly to voters is a great thing to be a part of as a resident of this state.

As a resident of Seattle, Washington I voted NO on the building of 2 different sports stadiums in which I was in the majority. The elected representatives kindly told me and other majority voters that we can shove it up our ass and built the stadiums anyway. Certainly seems to have done a lot for those amazing Seattle sports teams everyone talks about :P

I always hear complaints about all the propositions on the ballot in California, mainly just complaints about the sheer number of them. And of course whenever there is an initiative you don’t agree you complain about it being an abuse of the process. This is what democracy looks like, and if you’re not in agreement with the majority of the electorate then you need to work towards a social movement that will change the minds of citizens, not complain about a more democratic process.

Prop 1A is a zero emissions rail line from SF to LA, a good idea at virtually any cost.

Prop 2 is a standard on confining farm animals, targeted mainly at chicken coops. Confining animals like this is a bad idea even if you don’t believe in animal rights, it’s not sanitary and leads to poor agricultural product and the spread of diseases among animals. It’s not rocket science why some free range chicken tests 0% for salmonella while Foster Farms tests 60%. The main argument against the proposition is primarily that agricultural standards like this don’t belong on the ballot, I disagree and think that direct democracy is a proper place for any law or standard.

Prop 3 is a bond for Children’s Hospital. Children’s Hospital is a for profit medical company and I don’t approve all the money I see for them on the ballot and in fact I voted against an Oakland initiative earlier in the year for construction of a new building. This measure is a bit different. 95% of Children’s Hospital patients are children on Medi-Cal (a wonderful state medical insurance program) of which all the poor children in Oakland are covered. The bond covers new equipment and what seems to be just enough money to keep things running at their current level. I’m voting YES.

Prop 4 is a waiting period and notification for parents of underage women who wish to have an abortion. I’m sorry but if a 16 year old girl gets pregnant I believe she has the right to her body and health and as such should be able to terminate the pregnancy even if her mother is Catholic.

Prop 5 is a measure championed by the Drug Policy Alliance. It’s a step toward further decriminalization of non-violent drug offenses. It has more money for treatment and limits court authority to incarcerate non-violent offenders. California already passed a measure like this before but the results haven’t been very good. In my opinion some of the previous measure’s failings were because courts were still allowed to incarcerate under a myriad of conditions and not only treatment was required of offenders but clean drug tests. We have atrocious drug policy in this country and an incarceration rate only rivaled by China. Non-Violent offenders shouldn’t be jailed by the hundreds of thousands and mandatory treatment will never immediately result in the recession of an addiction. Both my father and step-mother are chemical dependency counselors and happen to agree. I’m voting YES.

Prop 6 is one of two “tough on crime” propositions. I not only don’t agree with the premise of the bill (increased mandatory sentencing and the increase of certain offenses to new degrees) but it burdens California with a huge bill to pay for increased spending on the criminal system without a way to pay for it. Propositions that don’t dictate how they are paid for take money out of the general budget, which in California means decreases in federal employees and huge cuts to the already suffering California Public School system. Voting NO.

Prop 7 is an incredibly aggressive environmental proposition. It sets aside a bunch of money for renewable energy and more local production of energy as well as proposes some lofty emission goals. Critics have basically said that the targets aren’t reachable, which they probably aren’t. But it’s not like the voters will be throwing anyone in jail if the goals aren’t met, I actually find the aggressiveness of the goals a good thing and think the less the state relies on national energy conglomerates and foreign oil the better.

Obviously I’m voting NO on Prop 8, a California State Constitutional Amendment banning on gay marriage. The movement for Prop 8 has mostly consisted of a scare campaign that shows children being informed about the fact that gay people do in fact exist and start happy families together. The entire notion of children being informed about homosexuality as a moral slight is openly ignorant and I won’t dedicate too much time to arguing against it.

Prop 9 is the other “tough on crime” bill. It suffers from all the same problems Prop 6 suffers but this time in the name of “protecting victims” by making it more difficult for inmates to be released from prison.

Prop 10 is the first environmental measure I’ve ever voted AGAINST. It’s focused almost entirely on natural gas, and provides further state subsidy to buyers of low emission vehicles. At this point I think we can safely stop adding additional state giveaways for people who purchase hybrid vehicles, of which I am a member, there’s already enough of an incentive to buy one with current tax breaks and the cost of oil in general. Not to mention the obscene giveaways to natural gas companies, of which the promoter of the bill is a major owner.

Prop 11 is a no brainer. It takes away from elected officials one of the most undemocratic of privileges, the ability to redistrict voters based solely on improving electoral victories for oneself or party. Voting for the measure creates huge barriers to redistricting preventing things like…. Texas.

And finally, Prop 12 is a reinvestment in the Cal-Vet program in the form of a general bond. This program provides good money in to the right pockets helping veterans with rising costs and home foreclosures among other things.

Running Windmill tests from Django

Posted by on November 2, 2008

It’s usually a good idea to document cool features you write and tell people about them. I totally forgot about this one, which I wrote during DjangoCon a few months back.

A few years ago I wrote a patch for live server support in Django. The patch fell out of sync with trunk and was picked up a year or so later and substantially improved. But the patch didn’t end up making it in for 1.0 :( . Luckily the code is simple enough that I was able to use it windmill and add live server support to any Django 1.0 install by dynamically overriding and changing the classes that we need to start and stop a live test server for you django project.

After it’s all said and done this makes it dirt simple to bootstrap windmill tests from your Django unittests, all you need to do is define a single test class along side your other django unittests pointing to the directory of windmill tests you want to run and which browser you want to run them in and windmill’s django support will automatically start a live django server and run your windmill tests against it.

from os import path
from windmill.authoring import djangotest 
 
class WindmillTests(djangotest.WindmillDjangoUnitTest):
    test_dir = path.join(path.dirname(path.abspath(__file__)), 'windmilltests')
    browser = 'firefox'

This is also all written up on a wiki page along with some of the caveats.