07/31/10

Akkana Peck

Bogus statistics on drug use among drivers

The "Roadshow" column in yesterday's Merc had some pretty ... odd ... statistics involving marijuana and driving.

It quotes "an NHTSA report" as saying:

contrary to popular belief, marijuana has been found to play a significant role in car accidents across the United States, with as much as 33 percent of drivers arrested at the scene of the accident being positive for marijuana and another 12 percent testing positive for marijuana and cocaine. Every year, 28 percent of drivers in the U.S. will attempt to drive within two hours after ingesting alcohol or illicit drugs. Marijuana is the drug used most often — 70 percent — by drivers who drove after drug use and is a major factor why crashes are the leading cause of death for American young people.

Whoa. Let's play that back again: 45 percent of all drivers arrested at accident scenes (33 plus another 12) test positive for marijuana? Nearly half?

Mr. Roadshow, you don't really believe that number, do you?

I didn't. So I did some searching, looking for the NTHSA source.

When I searched for large portions of the quoted phrase, I didn't find anything from the NHTSA. The Roadshow quote appears to come from an article on friendsdrivesober.org (I'm sure that's an unbiased source). Here's their MS Word file or Google's cached HTML version). The same article is also available as a PDF at prevnet.org and there are lots of other pages making reference to it.

The friendsdrivesober.org article cites "Brookoff, Cook & Mann, 1994; Sonderstrom, Dischinger, Kerns & Trillis, 1995." for the 33% number. There's no citation offered for the "28% will attempt to drive...". They credit "NHTSA, 2000" for "Marijuana is the drug used most often ... by drivers who drove after drug use", but that one's not important because it says nothing about prevalence in accidents, merely that it's used more often than other drugs (no surprise there).

The NHTSA weighs in

Googling on a more general set of terms, I found my way to a October 2000 NHTSA report, Field Test of On-Site Drug Detection Devices. It's a roundup of many different studies, with drug use numbers all over the map, though none larger than the 33% figure and certainly nothing near 45%. That 33% figure is near the bottom:

Brookoff et al. (1994) used on-site testing devices in a study that found a 58% prevalence rate for drugs in subjects arrested for reckless driving (who were not found to be impaired by alcohol). The Brookoff team found that 33% of their sample tested positive for marijuana, 13% for cocaine, or 12% for both. (Because of sampling flaws in the study, these drug test rates should not be interpreted as drug prevalence rates for reckless drivers.) Interestingly, the on-site device (Microline) used by Brookoff and his colleagues generated a significant false positive rate for marijuana when compared to GC/MS results.

The horse's mouth

So what about the original study? I wasn't able to find Dischinger, Kerns & Trillis, but here's Brookoff et al. at the New England Journal of Medicine: Testing Reckless Drivers for Cocaine and Marijuana (cookies required).

A couple of important notes on the study: the figures represent percentage of drivers arrested for "reckless driving that would constitute probable cause to suspect intoxication by drugs", who were not considered to be under the influence of alcohol, and who were suspected of being under the influence of marijuana or cocaine ("all patrol officers were told that they could summon [the testing van] if they stopped a person suspected of driving recklessly under the influence of cocaine or marijuana"). Morover, not all drivers consented to be tested, and the percentages are only for those who were tested.

Seems like a perfectly valid study, as far as it goes (though there's been some mild criticism of the test they used). It's mostly interesting as a study of how marijuana and cocaine use correlate with visible intoxication and sobriety test results. It's not a study of the prevalence of drugs on the road: the NHTSA report is right about that. The numbers it reports are useless in that context.

So the jump from that study to what friendsdrivesober.org and Roadshow implied -- that 45% of people involved in car accidents test positive for marijuana -- is quite a leap, and attributing that leap to the NHTSA seems especially odd since they explicitly say the study shouldn't be used for those purposes.

What really happened here?

So what happened here? Brookoff, Cook, Williams and Mann publish a study on behavior of reckless drivers under the influence of drugs.

NHTSA makes a brief and dismissive reference to it in a long survey paper.

Then friendsdrivesober.org writes an article that references the study but entirely misinterprets the numbers. This study gets picked up and referenced by other sites, out of context.

Then somehow the paragraph from friendsdrivesober.org shows up in Roadshow, attributed to the NHTSA. How did that happen?

If you look at the friendsdrivesober.org article, the paragraph cites Brookoff in its first sentence, then goes on to other unrelated claims, citing an NHTSA study at the end of the paragraph. I suppose it's possible (though hard to understand) that one could miss the first reference, and take the NHTSA reference at the end of the paragraph as the reference for the whole paragraph. That's the best guess I can come up with. Just another example of the game of telephone.

Nobody with any sense thinks it's a good idea to drive under the influence of marijuana or other intoxicants. But bogus statistics don't help make your point. They just cast doubt on everything else you say.

31 July 2010 20:33:00

07/30/10

Elizabeth Krumbach

Second San Francisco Ubuntu Hour

On Tuesday I hosted the second San Francisco Ubuntu Hour. We had four people in attendance (thanks for dropping by James, Grant and Michelle!).

It ended up being quite an evening for gadgets. As is typical, I brought along my mini9 and Grant showed up with his ever popular OLPC laptop.

Then Michelle showed up with a couple awesome toys! She had her HP Compaq TC1100, a tablet PC from 2005 that she has a couple of. The one she brought along was running Ubuntu 10.04 and she showed us screen rotation, how well the stylus worked and the nice docking station that goes with it. She writes a great post comparing it to an iPad on her blog: Meet Paddy-Pad, the new tablet in town.

She also brought along a Pandigital Novel, a $169 Android touchscreen device that’s sold at Bed Bath & Beyond. It was hacked back to a default Android navigation screen, the default one on the Novel being a bit slow. It’s a really cute 7″ full color device, and a default 800 x 600 resolution. I have to admit, after seeing it I was very tempted to head down to the store and pick one up for myself! But I think I’ll hold off until more of these cheap touchscreen devices start hitting the market. My planned use for it? Perfect RSS (and pdfs, and maybe even an e-book or two?) reading device.

In all, a very fun Ubuntu Hour, and I wish it could have gone longer! The coffee shop I selected for this is only open until 7, which really makes it so that our hour can’t go beyond that. There are a few other coffee shops in the area so I’ll be scouting those over the next few weeks to see if I want to alter the monthly Hour location.

What’s this Ubuntu Hour thing anyway? Check out more info over on the Ubuntu wiki, including how to plan your own (hint: it’s very, very simple!)

https://wiki.ubuntu.com/Hour

30 July 2010 02:49:48

Akkana Peck

How to save on modeling fees

[Terrible's ad] At the Terrible's Sands Regency in Reno, Dave noticed this ad on the table in the room. "Wait -- isn't that the same guy, twice?"

Sure enough -- not just the same person, but the same photo, with different hair and neck pixeled in.

I guess Photoshop/GIMP artists are cheaper than photo models these days.

We spotted the same model in other ads around the hotel, sometimes masquerading as other races as well.

30 July 2010 00:28:00

07/29/10

Nightrose

in need of some love and dedication

When walking in a big group of people you have to check every now and then for the slower ones so you don’t leave them behind and lose them. It’s the same in a community like KDE. Every now and then you have to check if everyone can still keep up and if not take the necessary steps. That’s why for the second time now I’ve asked KDE developers to tell me which parts of KDE they think really needs some new blood or more helping hands. This is the list of answers I got:

  • KDE bindings needs a maintainer for PHPQt and some helping hands for Qyoto/Kimono (the C# bindings). – contact kde-bindings@kde.org
  • KDEPIM looking for someone to work on Akgregator and the Kontact shell. – contact the kde-pim mailing list
  • Juk could benefit from a port to actual KDE Platform 4 technologies (away from KDE3 Support and possibly port Bangarang’s Nepomuk storage to Juk). – contact the kde-multimedia list
  • KOffice is in need of people poking Karbon and Kivio. – contact the koffice mailing list
  • KCalc, KFloppy, Kdf, KTimer and Sweeper from kdeutils do not have maintainers at the moment. Most of these applications are almost unused, but they haven’t been excluded from the module and might at least provide some fun to newcomers. – contact kde-utils-devel@kde.org
  • Okular could use some help fixing crashes and finishing features. – contact aacid@kde.org
  • UserBase is looking for people to help improve documentation. Tasks and guidelines are available on http://userbase.kde.org/Tasks_and_Tools. – contact annew@kde.org

Quite the mix – surely there’s something exciting in there for everyone. So if you are someone who wants to contribute to KDE and looking for a place to start or an experienced contributor looking for a new project, this is where your help would be really appreciated. Choose your direction and get your hands dirty ;-)

street sign in china town

29 July 2010 23:11:23

Amber Graner

Ubuntu News Team – Needs You!!

Do you want to be part of the Ubuntu News Team?  Do you want to be part of a long standing and growing part of the Ubuntu Community?  Looking for a place to contribute. Then the Ubuntu News Team is for you!

The Ubuntu News Team via the Ubuntu Weekly Newsletter boasts of bringing more than 200 Issues full of what’s happening in and with Ubuntu and the community that surrounds it. This happens as we gather and summarize those happenings a week at a time to record as well as report how Ubuntu matures through all it’s growing pains and we want you to be part of the team!

First let me say we have some wonderful people who continue to donate many weekend hours to producing the Ubuntu Weekly Newsletter but we could always use more help.

In a perfect world we would have all the summaries written by Friday afternoon and all that would need to happen on Sunday would be adding the Stats, Updates and Security portions along with the editing.  As it is right now myself and a few others spend upwards of 10-15 hours each Sunday to get UWN out the door. In the case of weekends when I’m traveling on Sundays then there are times when the newsletter often goes out a day or two later than our announced published dates. (Sorry about that by the way)

Take a look at Issue 200, 201, 202, and 203 to get an idea of what we are writing about and in the meantime let me tell you a little about each section and how you can help.

We often get asked about people writing original content for the newsletter.  The newsletter right now reports and summarizes posts that have been added other places.  However in the near future you will be able to submit original content to the Fridge.  - More about the Fridge in another post though.

LoCo News – Do you like to find out what is happening with all the LoCo Teams.  Would you like to report and summarize what the various teams are writing about?  This section is just as it sounds – we report on what the LoCo Teams are doing.

Launchpad News – This comes from the Launchpad (LP) Team blog.  Most of the time these posts are short enough to include in there entirety sometimes we have to summarize them, but Matthew Revell and the other LP team members usually write very clear and concise items to share with the world about what’s going on with LP.  So if you want to check for Launchpad news and be responsible for adding it to the news letter lets talk.

The Planet - This section is a little tricky but we’re all smart so it’s easy to figure out.  Depending on what people are writing about this could be added to The Planet, General Community News, Blogosphere, or even In Other News sections of the newsletter.  However If you feel like you want to search Planet Ubuntu each week and add the summaries to the planet section we can work it all out.

In The Press – This section is where we post those articles that have been written about Ubuntu in the Press.  This usually means those print publications that also have a web presence.  However there are some exceptions and again  - if it’s a good story then we can figure out where it needs to go :-)

In the Blogosphere – these are blogs that are main stream but may not have a print publication, or commercial backing behind it.  However, blogs from the planet often get included here as well.

In Other News – this is about those items that are related to Ubuntu  - such as great Linux Stories, Canonical press releases, Canonical Partners who write about Ubuntu or other Corporations that discuss Ubuntu.  However, those really quirky and fun stories that are related to Ubuntu in some for or fashion that doesn’t really fit in any other area can go here as well.

Featured Podcasts – this is summaries of podcasts/videocasts such as the Ubuntu UK Podcast, Full Circle Magazine Podcasts, Ubuntu Podcasts, At Home with Jono Bacon Community Q&A UStream TV casts.  If there are other Ubuntu related casts that should be on the list we need to know that as well.  So if you are interested making sure these casts get included in the newsletter that would be great!

Weekly Ubuntu Development Team Meetings – We try to offer the meeting minutes for the Development teams that are list on the Fridge Calendar.  While some teams don’t really have formal meeting minutes some teams do.  If you would like to verify the links each week and make sure we aren’t missing any teams then this the section for you!

Xubuntu, Kubuntu, Edubuntu - If you are on one of these teams we could always use your help to make sure we include the current news about these derivatives as well.

Currently we have people working on summarizing links or posting to some of the areas but it is the same people giving up part of their precious weekends and while all of us enjoy and like being part of bringing this to the community – the quote – “many hands make light work” really rings true here and if we could get a couple dedicated people per section then people could trade off what weeks they can cover and make the whole process an even more enjoyable one for everyone.

We are also looking at adding an HTML version of the newsletter to be sent to folks via a mail service like mail chimp.  Right now we don’t have true matrix for what people are reading or clicking on 1st for the newsletter.  It would be nice to have those figures.  So if you are interested in being part of this test HTML newsletter please email me and let me know   – akgraner * ubuntu * com.  This will also allow us to include photo’s, videos and some formating that the current plain text version does not.  The plain text, and the wiki versions will still be available.  If you want to help with this process please let me know that as well.

I have to thank all those folks who currently give of their time to make the newsletter what it is – Lizar Siri, J. Scott Gwin, Penelope Stowe, Mike Holstein, Nigel Babu, Daniel Caleb, Jonathan Carter, Nathan Handler, and all the folks who continue to write about Ubuntu so we can bring you UWN each week!

Here are some links to help you learn even more about the Ubuntu Weekly Newsletter.  Thanks in advance for your continued support and help in making this an even better source of information for the busy Ubuntu user/contributor/developer.

Ubuntu Weekly Newsletter Wiki – https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/

Checklist and Editing Policy Wiki – https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/EditingPolicies

HowTo Guide for the Newsletter – https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/EditingPolicies/HowToEdit

Newsletter Publication Schedule – https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Schedule

Section Guidelines and Suggestions – https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/SectionGuidelines

We also have a googledoc, wiki page and ietherpad areas for you to work on the newsletter at as I am aware that some people prefer to work on UWN in places other than the wiki.  This also keeps editing conflicts down to a minimum on Sundays when everyone is working together on UWN.

So stop by #ubuntu-news on freenode or email me and lets get you started on your way to contributing to UWN.  Looking forward to hearing from you!  Many Thanks!

29 July 2010 03:11:24

07/28/10

Akkana Peck

The Case of the Missing Gooseberry

Traveling always comes with risks. Aside from the risks you may encounter along the way, there are the worries of what you left behind. Will the house burn down? Will the mail pile up, signalling to thieves that the home is empty? Will the server stay up? On a more prosaic note ... Will the plants in the garden all die from lack of water?

Shortly before traveling to Oregon for OSCON, I acquired a cute little Cape Gooseberry seedling (courtesy of Mark Terranova at the south bay Geeknic). That's a new plant to me -- I'd never seen one before. But it was a cute little thing, and seemed to be flourishing. I had it in a pot on a little shelf where it would get morning sun but wouldn't get too hot in the afternoon, and was looking forward to planting it when it got big enough to withstand our marauding local seedling-loving snails.

[ Missing Cape Gooseberry ] To get it through my planned week-and-a-half absence, I had one of those glass watering bulbs they sell in drugstores. They're supposed to last several weeks, though they don't work that reliably in practice. Still, I saturated the soil with water the morning I left, then filled the bulb and crossed my fingers for no long heat waves.

I wasn't prepared for what I saw when I got back. Something had dug out my little gooseberry and taken it!

I still have no idea what got it. We certainly have some local squirrels who love to dig, and young squirrels (still learning their digging skills) love potted plants. But I wouldn't think a squirrel would have much use for a gooseberry seedling -- they just like the act of digging.

I wonder if cape gooseberry leaves are particularly tasty to rodents?

Ironically, the soil was still quite damp. The little plant probably would have made it through just fine.

28 July 2010 21:17:00

Catherine Devlin

PyOhio: photos plz

We have 138 PyOhio registrants so far - that's greater than the total number of attendees last year. I'm excited!

Is there a shutterbug in the house? I'm always envious of the photos taken at some conferences, like this one of Python core sprinters at EuroPython. (Hi, guys! Our contribu-palooza-ers will be joining you soon!) I want to join the fun. Our PyOhio attendees are just as pretty as any of them!

So if you enjoy taking pictures, and you're coming to PyOhio (and who wouldn't?), please don't forget your camera! Get some group shots, and let me know about them afterward. Thanks!

See you Saturday!

28 July 2010 15:15:19

07/26/10

Mackenzie Morgan

The Next HOPE

Last weekend was The Next HOPE (following from The Last HOPE) in New York City. HOPE stands for Hackers on Planet Earth and is a biennial conference put on by 2600: The Hacker Quarterly. The Wikileaks guy may or may not have shown up. Some online say he didn't. Someone else told me "oh yeah, he was sitting behind the Tesla stage drinking Club Mate all day Friday," so who knows. Apparently his keynote timeslot resulted in everything being timeshifted by one hour though. The physical security folks said he ran long. Though maybe it was a substitute who did so? I don't know. Kaminsky had another of the keynote slots, talking about SQL injection and the difference between programmer ways of thinking ("I'll just concatenate these strings here…") and programming-language-developer thinking ("We'll parameterize these, so they don't break anything…"). He made the very good point that the reason programmers ignore that parameterization stuff is that it's a pain in the neck to have to jump all around as you try to read the code figuring out "ok now insert first parameter…back up to code…second parameter…wait which one's the seventh parameter?" and outlined some ideas he has to make syntax programmers won't hate that can still fix the problem. And yeah, let's face it. Trying to escape every bad character is total Whack-A-Mole.

A group of librarians were here talking about how to get FOSS into libraries. They had a very important tip: brush your teeth. If you show up looking like a caricature of a hacker, it's a bit hard for the librarians to take you seriously. So, look like you've bathed since last Tuesday and know what a toothbrush is. Yes, they mentioned Evergreen.

Deb "freedeb" Nicholson from the Free Software Foundation spoke about why diversity is important to the growth of Free Software (hint: more diversity = more people!) and how to get there. In a similar vein, Nikki Neulist had a talk called "Hey, Don't Call That Guy A Noob: Toward a More Welcoming Hacker Community." She was talking about how new people provide new perspectives and if you're willing to just be helpful early on, they can end up really useful later. I think this is something we've tried to exemplify in the Ubuntu world, though I do still occasionally see some unwelcoming behaviour on IRC. Unfortunately, during her talk's Q&A, some guy thought it made sense to say tough cookies, this is our hacker culture and if your skin's not thick enough, you don't belong here. C4BL3FL4M3 and I started yelling at him from opposite sides of the room. How on Earth could "if you don't like our bad attitude, GTFO" fit in in a conversation about being welcoming? Why did he even attend if that's his attitude? Troll!

The Vintage Computing talk ended in me dragging a 14 year old I was showing around to the Borders across the street to buy her a copy of Hackers: Heroes of the Computer Revolution to give her more context about things like the Altair and the PDP-11.

There were talks on "Color, Light, and Perception" and "Cooking for Geeks." In the former, I learned that magenta does not exist as part of the white light spectrum. You will not find it with a prism. It's not a single wavelength of light but rather a trick in our brains when red and blue wavelengths overlap. I also learned about additive colours, which is what the RGB colour model we use for defining colours on a computer screen is based on. The reason I see white captions on a black background as red/blue-split (like when you look at 3D stuff without the glasses) when seeing it at an angle out of my glasses was also explained. Neat! The latter was about food science, a basic introduction to it, and a reference to there being more in the speaker's new book of the same title. Apparently the temperatures we're taught in food safety courses assume you're not hitting the coldest part of the meat, that your thermometer's wrong, and a bit more, so they're overestimated by a good 15°. Not that I eat meat or am interested in testing that. Time at temperature was brought up as well—the fact that reaching a temperature doesn't matter as much as maintaining that temperature for a decent amount of time. Various enzymes take various times to break down into something tasty. I think he said brussels sprouts were in the category of things that need to spend a good amount of time at high temperature to taste good. Someone should tell my mum this. Hers are too bitter.

I missed much of the "Simpson's Did It" talk, but I caught Mouse's segment where she talked about Mozart. Apparently "Miserere" by Gregorio Allegri was well-loved by the pope of his time. So well-loved, that he had analogue DRM on it! That is, no copies of the sheet music could be made without the pope's permission, period. Only two copies ever were, and they were for princes who had to promptly return them as soon as they finished. Additionally, the song could only be played during Easter week. What did Mozart do, knowing he couldn't get sheet music? Showed up, listened, memorised, and transcribed from memory. DRM broken! Thanks, Mozart!

If you want to write online about controversial topics and you find that your free speech is being harmed by those who do not want you to be heard sending false DMCA notices, you should know about Project DoD, a web host who is willing to send a counter-notice in response (apparently unlike most others). You still have the mandatory 10-day offline period while the counter-notice goes through, but at least it's not a permanent offline period. They're willing to fight for their clients. Lawyer Tiffany Rad (who was my carpool for the trip) and Chris Mooney were talking about this project of theirs.

I mentioned earlier taking a 14 year old around. She's a smart kid named Johannah, so I was introducing her to the other LinuxChix and other assorted cool people. I explained public key cryptography (the practical, not the mathematical theory) to her and showed her how to generate a GPG key. She's an Ubuntu user, so I got her uncle to pick up a copy of How Linux Works for her. It looks like an excellent book for her skill level. It starts out with basic command line stuff and goes on all the way through explaining bootloaders and system internals. Cool!

We attended a LinuxChix Lunch on Saturday, where the women who'd been there in 2002 for H2K2 were expressing surprise at how many women were present, saying LinuxChix would soon be obsolete. They said H2K2 had somewhere between 10 and 30 women total. Improvement was obvious. And by the way, yes, the hacking community does seem to have more women than the Free Software community. There was definitely a higher percentage of women here than even at SELF, which I've already said has more than I remember seeing at any other Linux event (uh, outside of LinuxChix events, obviously). Funny enough, when we got back, I ended up talking to some woman I'd never met who saw my panoramas on my screen and wanted to know how I took them. I told her about Hugin and Free Software and Ubuntu. Anyway, the "funny" bit is that one of the first things she said when asked how she liked the con (she'd never been to a hacker thing before, but her son was a speaker, so she showed up) was (paraphrased) "this is all very interesting, but I notice it's mostly male, and mostly Caucasian." Yeah…still got a ways to go.

I had a duty while I was there too. I was handing out postcards for Ohio LinuxFest to everyone I saw with a Tux, GNU, or distro logo on their shirt, laptop, or tattoo. There were a lot of Ubuntu users. At one point I thought I saw an Ubuntu laptop in front of me, but it was actually OSX.

26 July 2010 23:30:59

Nightrose

KDE SC 4.5 release parties – let’s get them started!

I’m back from conference touring (which was awesome btw – more about that later) and Tom reminded me that the release parties for 4.5 are not planned yet. And the release is planned for August 4th, so in a bit more than a week. OMG!

Clearly it is time to fix this situation and give the world a chance to meet some cool KDE people. So go to the 4.5 release party planning page and check if there is one near you already. If there is one then sign up for it and have fun. If there is none yet it’s time to start one. Pick a date and time (preferably within 3 weeks of release) and reserve a place in a local restaurant, bar, meeting room, university, whateverelsefits. Add it to the wiki page, spread the word and then have lots of fun.

Of course it’s my pleasure to announce the first of hopefully many release parties: Stuttgart, Germany on 7th of August. Exact place and time is still to be determined. Check the wiki page every now and then for updates.

For those who have never planned or attended a release party: You can do pretty much everything you want from simply getting together for a beer and chatting to full day event with talks, workshops and so on. It’s up to you. You can find a few tips on the community wiki. Everyone is welcome from active contributor to interested user. Just let the person organizing it know you’re coming so they can plan better.

26 July 2010 23:06:06

07/25/10

Vid Ayer

patches and packaging toolchain

Background assumptions::
o. A clean ubuntu hardy installation.
o. Some familiarity with command-line basics.
o. Have installed pbuilder, where from I continue...

What is PACKAGING?

If you have ever used the apt-get or aptitude {Aaron has a nice writeup on aptitude Vs. apt-get} command : "sudo aptitude install <packagenames>"  on your Debian/Ubuntu system you used a tool that automatically installs a packaged software on your system. This would automatically pull all the dependencies for your Linux system to run smoothly. It saves you the pain of having to install software manually by pulling code in a tar.gz folder, extracting, etc...

Secondly, when you download a source package from a Debian/Ubuntu "deb-src" repo, its already a debian package.i.e the source files have been placed in a suitable directory tree, appropriate configuration files have been added, and the package contains scripts to help with the building and installation of the package. This is what allows you to just install from source with "apt-get -b source some-package-name" as mentioned before.

This post is different. As in, its not a path of least resistance (packaging an existing debianized package for Ubuntu). This is about creating a binary package from a source package, with customization, modification, or other tedious trouble. To do so, you do the following :

Wikipedia says,

The Debian build toolchain is a collection of software utilities used to create Debian source packages (.dsc) and Debian binary packages (.deb files) from upstream source tarballs.

These tools are used in the Debian project and also in Debian-based distributions such as Ubuntu.

One of the first steps was creating a .dsc as outlined at  https://wiki.ubuntu.com/PackagingGuide/Python

I had already pulled the stable source from LP [bzr branch lp:systers] but noticed that none of the files had copyright or license notices. I also had a number of questions on patching the current systers stable branch for releases and one of that was to work with the MM 3.0 port team. So I requested an upstream MM core-dev to comment on the following:

Q0. Currently systers runs only on Ubuntu-Hardy with python2.5 and systers has the habit of working only with ubuntu- LTS releases, hence Lucid could be the porting target.  I feel the tasks involved are -- convert  all .py programs compatible to python  2.6 or 2.7;  carry out code changes if any on the 2.6 or 2.7 .py files to make them work on lucid or Hardy , make package and test the package.

Q1. Currently systers code uses python2.5 and I'd like to know if it has to run/port compatibly on Lucid would that involve converting code to python2.7 (or python2.6)? That seems like a large task so I'd like to hear your comments.

Q2. Would it involve making these python programs of systers which is currently compatible with 2.1.10 to be made compatible to mailman 3.0-- I'm not sure how different MM-2.1.10 is from MM-3.0 and assume this involves changes in code.  So what does working with the MM 3.0 port team entail?

Q3. According to the debian manuals the existing stable branch should contain licences for all files, to be packaged since GNU-Mailman would require this. Currently none of the stable branches or code fixes pulled from the systers repo have any license files. Am I supposed to contact the individual authors (I dont know them all) or should I just ask Jennifer/Robin ?

The reply I got was lucid (could not resist a pun) and I'd heard some of the packaging stuff before (in Debian? or was it in Ubuntu?):

o. Core-devs dont usually work on maintaining non-mainline stuff unless it's their own. So if you want your "feature-changes-patch" included in upstream, you'd have to be willing to maintain them long-term and that would involve a large commitment. If its not in mainline upstream, there is nobody to coordinate packaging or patches. As the developer of your "feature-changes-patch", its your baby which you should be willing to test and maintain each time mainline changes.

o. Ubuntu packaging of Mailman 2.1 introduces some bugs -- best compiled from source. Bringing another package (mailman-systers?) for an existing upstream package within Ubuntu could be an issue.

o. Mailman 2.1 and Mailman 3.0 are *entirely* different code bases. That means these wonderful systers feature changes would have to be re-implemented, not ported. Porting (as I asked above in Q0, Q1,Q2) would involve moving between python versions and this changes so many things when you are moving between two OS releases (in this case, Ubuntu hardy and lucid). Besides MM3.0 (in alpha stage) was an entirely different code base compared to 2.1 which is in feature freeze.

o. While it would be better to contribute code directly to MM3.0 ...BUT... using the existing code raises the license issues in Q3 above. This is something I cant answer as "legalese" is beyond me. Technically, all GPL code requires authors be willing to assign their work to the free software foundation, as explained in the gnu-licenses page: http://www.gnu.org/licenses/why-assign.html. IIRC, Ubuntu and Debian would require the license.txt file for packaging too.

25 July 2010 19:07:00

selenium remote control python client

Selenium is quite a famous testing tool and has a lot of documentation (so I wont bother to repeat stuff from there). I'll just focus on the bits where I feel the documentation could improve.

STEP#0.After downloading selenium remotecontrol change to the directory. {to install selenium on you local machine, download selenium from here.}

~$ cd selenium-remote-control-1.0.3/
~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar selenium-server.jar
09:03:05.618 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:05.638 INFO - OS: Linux 2.6.24-28-generic i386
09:03:05.722 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:06.304 INFO - RemoteWebDriver instances should connect to: http://192.168.1.5:4444/wd/hub
09:03:06.307 INFO - Version Jetty/5.1.x
09:03:06.311 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:06.324 INFO - Started HttpContext[/selenium-server,/selenium-server]
09:03:06.324 INFO - Started HttpContext[/,/]
09:03:06.381 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:06.382 INFO - Started HttpContext[/wd,/wd]
09:03:06.399 INFO - Started SocketListener on 0.0.0.0:4444
09:03:06.400 INFO - Started org.openqa.jetty.jetty.Server@228a02

I wanted to run the python script from the console and each time it would stop here and I'd be waiting and nothing would happen.....How do I run the script without a command prompt. So then, I'd interrupt it with 'ctrl C' to get a  "09:03:17.439 INFO - Shutting down...12:39:08.573 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]

That "shutting down" message was odd -- how would you run a process if it was shutting down? What the logs above dont say is "The selenium server must be running so keep that process open. Open ANOTHER terminal window and run your python script there". The documentation didnt explicitly mention that localhost must keep the server running in the background-- Its one of the most basic client-server concepts but when you are running stuff on localhost, your client and server are one and the same. Being explicit with this trivia in the documentation would have helped me not waste hundreds of hours searching the selenium website and reading irrelevant blogs which google threw up, irc, emails, etc... So, in TerminalOne,


:~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar selenium-server.jar
09:03:05.618 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:05.638 INFO - OS: Linux 2.6.24-28-generic i386
09:03:05.722 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:06.304 INFO - RemoteWebDriver instances should connect to: http://192.168.1.5:4444/wd/hub
09:03:06.307 INFO - Version Jetty/5.1.x
09:03:06.311 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:06.324 INFO - Started HttpContext[/selenium-server,/selenium-server]
09:03:06.324 INFO - Started HttpContext[/,/]
09:03:06.381 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:06.382 INFO - Started HttpContext[/wd,/wd]
09:03:06.399 INFO - Started SocketListener on 0.0.0.0:4444
09:03:06.400 INFO - Started org.openqa.jetty.jetty.Server@228a02
09:03:17.439 INFO - Shutting down...
mom@drga:~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar selenium-server.jar
09:03:36.248 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:36.252 INFO - OS: Linux 2.6.24-28-generic i386
09:03:36.270 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:36.486 INFO - RemoteWebDriver instances should connect to: http://192.168.1.5:4444/wd/hub
09:03:36.489 INFO - Version Jetty/5.1.x
09:03:36.491 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:36.493 INFO - Started HttpContext[/selenium-server,/selenium-server]
09:03:36.493 INFO - Started HttpContext[/,/]
09:03:36.523 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:36.523 INFO - Started HttpContext[/wd,/wd]
09:03:36.533 INFO - Started SocketListener on 0.0.0.0:4444
09:03:36.533 INFO - Started org.openqa.jetty.jetty.Server@228a02
09:04:30.236 INFO - Checking Resource aliases
09:04:30.260 INFO - Command request: getNewBrowserSession[*firefox, http://localhost:4444, ] on session null
09:04:30.283 INFO - creating new remote session
09:04:30.614 INFO - Allocated session 7cba6a7dadb243618c046ee7fb6c6bc9 for http://localhost:4444, launching...
09:04:30.778 INFO - Preparing Firefox profile...
09:04:34.676 INFO - Launching Firefox...
09:04:38.697 INFO - Got result: OK,7cba6a7dadb243618c046ee7fb6c6bc9 on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.715 INFO - Command request: open[/selenium-server/tests/html/test_click_page1.html, ] on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.854 INFO - Got result: XHR ERROR: URL = http://localhost:4444/selenium-server/tests/html/test_click_page1.html Response_Code = 404 Error_Message = Not+found on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.863 INFO - Command request: testComplete[, ] on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.863 INFO - Killing Firefox...
09:04:38.933 INFO - Got result: OK on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:09:28.085 INFO - Command request: getNewBrowserSession[*firefox, http://www.irian.at, ] on session null
09:09:28.086 INFO - creating new remote session
09:09:28.088 INFO - Allocated session 97dec9f0b53545acbc9ca3624fc6cbd4 for http://www.irian.at, launching...
09:09:28.165 INFO - Preparing Firefox profile...
09:09:31.873 INFO - Launching Firefox...
09:09:35.599 INFO - Got result: OK,97dec9f0b53545acbc9ca3624fc6cbd4 on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:35.604 INFO - Command request: open[http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html, ] on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.698 INFO - Got result: XHR ERROR: URL = http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html Response_Code = 404 Error_Message = Not Found on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.707 INFO - Command request: testComplete[, ] on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.707 INFO - Killing Firefox...
09:09:41.740 INFO - Got result: OK on session 97dec9f0b53545acbc9ca3624fc6cbd4
10:18:38.252 INFO - Command request: getNewBrowserSession[*firefox, http://www.google.com/, ] on session null
10:18:38.253 INFO - creating new remote session
10:18:38.254 INFO - Allocated session c4b9c7f35ea34d428b50f2f31a6181c2 for http://www.google.com/, launching...
10:18:38.322 INFO - Preparing Firefox profile...
10:18:41.921 INFO - Launching Firefox...
10:18:45.741 INFO - Got result: OK,c4b9c7f35ea34d428b50f2f31a6181c2 on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:45.800 INFO - Command request: open[http://www.google.com/, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.204 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.211 INFO - Command request: type[q, hello world] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.277 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.282 INFO - Command request: click[btnG, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.334 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.340 INFO - Command request: waitForPageToLoad[5000, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.359 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.365 INFO - Command request: getTitle[, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.411 INFO - Got result: OK,hello world - Google Search on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.416 INFO - Command request: testComplete[, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.417 INFO - Killing Firefox...
10:18:48.434 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2


ALL this happens on TerminalOne, so keep that window open to check for the above while you are doing steps below.

STEP#1. In TerminalTwo, Change directory to the 'python-client' to run your scripts. Lets test the selenium.py script first. Btw, note that your bash file must contain the PYTHONPATH for all the directories that you run .py scripts from.

:~/selenium-remote-control-1.0.3$ ls
README.txt  selenium-php-client-driver-1.0.1  selenium-dotnet-client-driver-1.0.1  selenium-python-client-driver-1.0.1
selenium-java-client-driver-1.0.1  selenium-ruby-client-driver-1.0.1  selenium-perl-client-driver-1.0.1    selenium-server-1.0.3

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python selenium.py

If it returns silently (read, No errors), it means your selenium server is working.

STEP#2
. Try testing another script, test_google.py or test_default_server.py

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ ls
doc    test_ajax_jsf.py  test_google.py~    selenium.py  test_ajax_jsf.pyc  test_google.pyc selenium.pyc                     test_default_server.py   test_i18n.py  selenium_test_suite_headless.py  test_default_server.pyc  test_i18n.pyc
selenium_test_suite.py  test_google.py

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python test_default_server.py
Using selenium server at localhost:4444
E
======================================================================
ERROR: testLinks (__main__.TestDefaultServer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_default_server.py", line 36, in testLinks
    selenium.open("/selenium-server/tests/html/test_click_page1.html")
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 764, in open
    self.do_command("open", [url,])
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 215, in do_command
    raise Exception, data
Exception: XHR ERROR: URL = http://localhost:4444/selenium-server/tests/html/test_click_page1.html Response_Code = 404 Error_Message = Not+found

----------------------------------------------------------------------
Ran 1 test in 8.852s

FAILED (errors=1)

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python test_ajax_jsf.py
Using selenium server at localhost:4444
E
======================================================================
ERROR: testKeyPress (__main__.TestAjaxJSF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ajax_jsf.py", line 39, in testKeyPress
    selenium.open("http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html")
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 764, in open
    self.do_command("open", [url,])
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 215, in do_command
    raise Exception, data
Exception: XHR ERROR: URL = http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html Response_Code = 404 Error_Message = Not Found

----------------------------------------------------------------------
Ran 1 test in 13.663s

FAILED (errors=1)

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python test_google.py
.
----------------------------------------------------------------------
Ran 1 test in 10.190s

OK

When you are running the above scripts you would see Selenium throw a browser with messages but this is too fast and disappears. In the second terminal,   run your scripts from the directory you've stored them in.

 

25 July 2010 06:46:00