Shallow Thoughts : tags : speaking

Akkana's Musings on Open Source, Science, and Nature.

Wed, 21 Jul 2010

Writing scripts for your Canon camera with CHDK

On Linux Planet yesterday: an article on how to write scripts for chdk, the Canon Hack Development Kit -- Part 3 in my series on CHDK.

Time-Lapse Photography with your Inexpensive Canon Camera (CHDK p. 3)

I found that CHDK scripting wasn't quite as good as I'd hoped -- some of the functions, especially the aperture and shutter setting, were quite flaky on my A540 so it really didn't work to write a bracketing script. But it's fantastic for simple tasks like time-lapse photography, or taking a series of shots like the Grass Roots Mapping folk do.

If you're at OSCON and you like scripting and photos, check out my session on Thursday afternoon at 4:30: Writing GIMP Plug-ins and Scripts, in which I'll walk through several GIMP scripts in Python and Script-Fu and show some little-known tricks you can do with Python plug-ins.

Tags: , , , , , ,
[ 09:31 Jul 21, 2010    More photo | permalink to this entry ]

Sun, 20 Jun 2010

Scaling HTML slides for different projectors with full-page zoom

Regular readers probably know that I use HTML for the slides in my talks, and I present them either with Firefox in fullscreen mode, or with my own Python preso tool based on webkit.

Most of the time it works great. But there's one situation that's always been hard to deal with: low-resolution projectors. Most modern projectors are 1024x768, and have been for quite a few years, so that's how I set up my slides. And then I get asked to give a talk at a school, or local astronomy club, or some other group that has a 10-year-old projector that can only handle 800x600. Of course, you never find out about this ahead of time, only when you plug in right before the talk. Disaster!

Wait -- before you object that HTML pages shouldn't use pixel values and should work regardless of the user's browser window size: I completely agree with you. I don't specify absolute font sizes or absolute positioning on web pages -- no one should. But presentation slides are different: they're designed for a controlled environment where everyone sees the same thing using the same software and hardware.

I can maintain a separate stylesheet -- that works for making the font size smaller but it doesn't address the problem of pictures too large to fit (and we all like to use lots of pictures in presentations, right?) I can maintain two separate copies of the slides for the two sizes, but that's a lot of extra work and they're bound to get out of sync.

Here's a solution I should have thought of years ago: full-page zoom. Most major browsers have offered that capability for years, so the only trick is figuring out how to specify it in the slides.

IE and the Webkit browsers (Safari, Konqueror, etc.) offer a wonderful CSS property called zoom. It works like this:

body {
  zoom: 78.125%;
}

78.125% is the ratio between an 800-pixel projector and a 1024-pixel one. Just add this line, and your whole page will be scaled down to the right size. Lovely!

Lovely, except it doesn't work on Firefox (bug 390936). Fortunately, Firefox has another solution: the more general and not yet standardized CSS transform, which Mozilla has implemented as the Mozilla-specific property -moz-transform. So add these lines:

body {
  position: absolute; left: 0px; top: 0px;
  -moz-transform: scale(.78125, .78125);
}

The position: absolute is needed because when Firefox scales with -moz-transform, it also centers whatever it scaled, so the slide ends up in the top center of the screen. On my laptop, at least, it's the upper left part of the screen that gets sent to the projector, so slides must start in the upper left corner.

The good news is that these directives don't conflict; you can put both zoom and -moz-transform in the same rule and things will work fine. So I've added this to the body rule in my slides.css:

  /* If you get stuck on an 800x600 projector, use these:
  zoom: 78.125%;
  position: absolute; left: 0px; top: 0px;
  -moz-transform: scale(.78125, .78125);
   */

Uncomment in case of emergency and all will be well. (Unless you use Opera, which doesn't seem to understand either version.)

Tags: , , , , ,
[ 11:14 Jun 20, 2010    More tech/web | permalink to this entry ]

Fri, 05 Mar 2010

Adding video to an OpenOffice Impress presentation

(and how to convert MPEG video to animated GIF)

I gave an Ignite talk this week at Ignite Silicon Valley. It was a great event! Lots of entertaining talks about all sorts of topics.

I'd always wanted to do an Ignite speech. I always suspected the kicker would be format: O'Reilly's guidelines specified PowerPoint format.

Of course, as a Linux user, my only option for creating PowerPoint slides is OpenOffice. Historically, OpenOffice and I haven't gotten along very well, and this slide show was no exception. Happily, Ignite needs only 20 slides ... how hard can that be, right? Most of my slides were very simple (a few words, or one picture), with one exception: I had one simulation I wanted to show as a video. (When I give this presentation on my own machine, I run the simulation live, but that's not an option on someone else's machine.

Impress woes

First I wrestled with Open Office to create the non-animated slides. It was harder than I'd expected. I just loved having to go back and un-capitalize words that OO kept helpfully re-capitalizing for me. And the way it wouldn't let me change text format on any word that triggered the spellchecker, because it needed to show me the spellcheck context menu instead. And the guessing game clicking around trying to find a place where OO would let me drag to move the text to somewhere where it was approximately centered.

And when I finally thought I had everything, I saved as .ppt, re-loaded and discovered that it had lost all my formatting, so instead of yellow 96 point centered text I had white 14-point left-aligned, and I had to go in and select the text on each slide and change three or four properties on each one.

And I couldn't use it for an actual presentation. In slideshow mode, it only showed the first slide about one time out of six. The other times, it showed a blank slide for the first 15 seconds before auto-advancing to the second one. The auto-advance timing was off anyway (see below). Fortunately, I didn't need use OpenOffice for this presentation; I only needed it to create the PPT file. I ended up making a separate version of the slides in HTML to practice with.

Inserting a movie

But I did eventually have all my static slides ready. It was time to insert my movie, which I had converted to MPEG1 on the theory that it works everywhere. With the mpeg added, I saved one copy to OpenOffice's native format of .odp, plus the .ppt copy I would need for the actual presentation.

Then I quit and opened the .ppt -- and the video slide was blank. A bit of searching revealed that this was a long-known issue, bug 90272, but there seems to be no interest in fixing it. So I was out of luck if I wanted to attach an MPEG, unless I could find someone with a real copy of PowerPoint.

Plan B: Animated GIF

Next idea: convert my 15-second video to an animated GIF. But how to do that? Google found me quite a few web pages that claimed to give the recipe, but they all led to the same error message: ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb24.

So what? Just add -pix_fmt rgb24 to the commandline, right? But the trick turns out to be where to add it, since ffmpeg turns out to be highly picky about its argument order. Here's the working formula to convert a movie to animated GIF:

$ ffmpeg -i foo.mpeg -pix_fmt rgb24 foo.gif

This produced a huge file, though, and it didn't really need to be 1024x768, so I scaled it down with ImageMagick:

convert -depth 8 -scale 800x600 flock-mpeg.gif flock-mpeg-800.gif
which brought the file size from 278M down to a much more reasonable 1.9M.

Happily, OpenOffice does seem to be able to import and save animated GIFs, even to .ppt format. It has trouble displaying them -- that's bug 90272 -- so you wouldn't want to use this format for a presentation you were actually going to give in OpenOffice. But as I mentioned, OpenOffice was already out for that.

If you do this, make sure all your static slides are finished first. Once I loaded the animated GIF, OpenOffice slowed to a crawl and it was hard to do anything at all. Moving text on a slide turned into an ordeal of "hover the mouse where you think a move cursor might show up, and wait 45 seconds ... cursor change? No? Okay, move a few pixels and wait again." Nothing happened in real time. A single mouse click wouldn't register for 30 seconds or more. And this was on my fast dual-core desktop with 4G RAM; I don't even want to think what it would be like on my laptop. I don't know if OOo is running the animations continuously, or what -- but be sure you have everything else finished before you load any animations.

The moment of truth

I never found out whether my presentation worked in real Microsoft Powerpoint. As it turned out, at the real event, the display machine was a Mac running Keynote. Keynote was able to import the .ppt from OpenOffice, and to display the animation. Whew!

One curiosity about the display: the 15 seconds per slide auto-advance failed on the animated slide. The slide showed for 30 seconds rather than 15. I had written this off as another OpenOffice bug, so I wasn't prepared when Keynote did the same thing in the live presentation, and I had to extemporize for 15 seconds.

My theory, thinking about it afterward, is that the presentation programs don't start the counter until the animation has finished playing. So for an Ignite presentation, you might need to set the animation to play for exactly 15 seconds, then set that slide to advance after 0 seconds. If that's even possible.

Or just use HTML. The great irony of this whole story is that some of the other presenters used their own laptops, so I probably could have used my HTML version (which had none of these problems) had I asked. I will definitely remember that for the next Ignite! Meanwhile, I suppose it's good for me to try OO Impress every few years and remind myself why I avoid it the rest of the time.

Tags: , , , ,
[ 15:36 Mar 05, 2010    More speaking | permalink to this entry ]

Sat, 20 Feb 2010

Grub2 lightning talk at SCALE 8x Ubucon

I gave a lightning talk at the Ubucon -- the Ubuntu miniconf -- at the SCALE 8x, Southern California Linux Expo yesterday. I've been writing about grub2 for Linux Planet but it left me with some, well, opinions that I wanted to share.

A lightning talk is an informal very short talk, anywhere from 2 to 5 minutes. Typically a conference will have a session of lightning talks, where anyone can get up to plug a project, tell a story or flame about an annoyance. Anything goes. I'm a lightning talk junkie -- I love giving them, and I love hearing what everyone else has to say.

I had some simple slides for this particular talk. Generally I've used bold or other set-offs to indicate terms I showed on a slide.

SCALE 8x, by the way, is awesome so far, and I'm looking forward to the next two days.

Grub2 3-minute lightning talk

What's a grub? A soft wriggly worm.

But it's also the Ubuntu Bootloader. And in Karmic, we have a brand new grub: grub2!

Well, sort of. Karmic uses Grub 2 version 1.97 beta4. Aside from the fact that it's a beta -- nuff said about that -- what's this business of grub TWO being version ONE point something? Are you hearing alarm bells go off yet?

But it must be better, right? Like, they say it cleans up partition numbering.

Yay! So that confusing syntax in grub1, where you have to say [SLIDE] (hd0,0) that doesn't look like anything else on Linux, and you're always wanting to put the parenthesis in the wrong place -- they finally fixed that?

Well, no. Now it looks like this: (hd0,1) THEY KEPT THE CONFUSING SYNTAX BUT CHANGED THE NUMBER! Gee, guys, thanks for making things simpler! [boring ubuntu boot screen]

But at least grub2 is better at graphics, right? Like what if you want to add a background image under that boring boot screen? A dark image, because the text is white.

Except now Ubuntu changes the text color to black. So you look in the config file to find out why ...

if background_image `make_system_path_relative...
  set color_normal=black/black

... there it is! But why are there two blacks? Of course, there's no documentation. They can't be fg/bg -- black on black wouldn't make any sense, right?

Well, it turns out it DOES mean foreground and background -- but the second "black" doesn't mean black. It's a special grub2 code for "transparent". That's right, they wrote this brand new program from scratch, but they couldn't make a parser that understands "none" or "transparent".

What if you actually want text with a black background? I have no idea. I guess you're out of luck.

Okay, what about dual booting? grub's great at that, right? I have three distros installed on this laptop. There's a shared /boot partition. When I change something, all I have to do is edit a file in /boot/grub. It's great -- so much better than lilo! Anybody remember what a pain lilo was?

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

Oops, wait -- not with grub2. Now I'm not supposed to edit that file. Instead, I edit files in TWO places, /etc/grub.d and /etc/default/grub.conf, and then run a program in a third place, /usr/bin/update-grub. All this has to be done from the same machine where you installed grub2 -- if you're booted into one of your other distros, you're out of luck.

grub2 takes us back to the bad old days of lilo. FAIL

Grub2 really is a soft slimy worm after all.

But I have some ideas for workarounds. If you care, watch my next few articles on LinuxPlanet.com.

Tags: , , , ,
[ 10:29 Feb 20, 2010    More linux | permalink to this entry ]

Wed, 11 Nov 2009

Building a Py-Webkit-GTK presentation tool

I almost always write my presentation slides using HTML. Usually I use Firefox to present them; it's the browser I normally run, so I know it's installd and the slides all work there. But there are several disadvantages to using Firefox:

Last year, when I was researching lightweight browsers, one of the ones that impressed me most was something I didn't expect: the demo app that comes with pywebkitgtk (package python-webkit on Ubuntu). In just a few lines of Python, you can create your own browser with any UI you like, with a fully functional content area. Their current demo even has tabs.

So why not use pywebkitgtk to create a simple fullscreen webkit-based presentation tool?

It was even simpler than I expected. Here's the code:

#!/usr/bin/env python
# python-gtk-webkit presentation program.
# Copyright (C) 2009 by Akkana Peck.
# Share and enjoy under the GPL v2 or later.

import sys
import gobject
import gtk
import webkit

class WebBrowser(gtk.Window):
    def __init__(self, url):
        gtk.Window.__init__(self)
        self.fullscreen()

        self._browser= webkit.WebView()
        self.add(self._browser)
        self.connect('destroy', gtk.main_quit)

        self._browser.open(url)
        self.show_all()

if __name__ == "__main__":
    if len(sys.argv) <= 1 :
        print "Usage:", sys.argv[0], "url"
        sys.exit(0)

    gobject.threads_init()
    webbrowser = WebBrowser(sys.argv[1])
    gtk.main()

That's all! No navigation needed, since the slides include javascript navigation to skip to the next slide, previous, beginning and end. It does need some way to quit (for now I kill it with ctrl-C) but that should be easy to add.

Webkit and image buffering

It works great. The only problem is that webkit's image loading turns out to be fairly poor compared to Firefox's. In a presentation where most slides are full-page images, webkit clears the browser screen to white, then loads the image, creating a noticable flash each time. Having the images in cache, by stepping through the slide show then starting from the beginning again, doesn't help much (these are local images on disk anyway, not loaded from the net). Firefox loads the same images with no flash and no perceptible delay.

I'm not sure if there's a solution. I asked some webkit developers and the only suggestion I got was to rewrite the javascript in the slides to do image preloading. I'd rather not do that -- it would complicate the slide code quite a bit solely for a problem that exists only in one library.

There might be some clever way to hack double-buffering in the app code. Perhaps something like catching the 'load-started' signal, switching to another gtk widget that's a static copy of the current page (if there's a way to do that), then switching back on 'load-finished'.

But that will be a separate article if I figure it out. Ideas welcome!

Tags: , , , ,
[ 16:12 Nov 11, 2009    More programming | permalink to this entry ]

Sat, 03 Oct 2009

Toastmasters manuals I'd like to see: Speaking at Conferences

Now and then I idly exchange ideas with some Toastmasters friends about manuals we wish Toastmasters would offer. Sometimes we come up with "meta-manuals", projects which can be done by collecting projects from existing manuals.

Here's a manual I'd like to see. The projects are arranged in approximate order of difficulty and cover most of the skills needed by speakers at technical conferences. Each project includes suggestions for which existing Toastmasters manual could be used.

Speaking at Conferences

Projects:

  1. Give a technical speech (15-20 min, longer if club schedule allows)
    Give a detailed talk on some technical aspect of your field, for specialists in the field. Use demos, slides and other visual aids effectively. Handle questions (and perhaps heckling) from the audience.
    (Speaking to Inform: any, or Technically Speaking: 1 or 4.)
  2. Give a Lightning Talk (2-3 min)
    Give a short talk for the whole conference audience. Any topic related to the field: describe a project, teach a technique, generate enthusiasm, air a gripe.
    (Use the basic manual or Speaking to Inform, depending on subject.)
  3. Give a beginner talk (15-20 min, longer if club schedule allows)
    Introduce your subject to beginners in the field, or outsiders who may not know much about it. Use visual aids and demos to create interest and explain the topic without using jargon.
    (Speaking to Inform: any, or Technically Speaking: 3.)
  4. Give an Ignite talk (5 min)
    Give a five minute talk on any topic, using 20 slides that advance automatically every 15 seconds, as described at ignite.oreilly.com.
    Pecha Kucha also counts.
    (Many choices, depending on subject.)
  5. Give a keynote address (15-20 min, longer if club schedule allows)
    Give a speech suitable to be the keynote for a conference.
    (The Professional Speaker: 1, or basic manual: 9.)
  6. Bonus project: Speak about speaking
    Explain to your audience how to give a good conference speech.
    (Speaking to Inform: 1-3, or Better Speaker: any.)
  7. Update bonus project: Dealing with heckers
    Give a speech and have people in the audience try to disrupt your talk, interrupt, contradict or sidetrack you.
    (Public Relations has "Speaking under fire" but that's not really the same thing.)

Tags: ,
[ 10:09 Oct 03, 2009    More speaking | permalink to this entry ]

Fri, 06 Feb 2009

Widescreen laptop for presentations

I've written before about how I'd like to get a netbook like an Asus Eee, except that the screen resolution puts me off: no one makes a netbook with vertical resolution of more than 600. Since most projectors prefer 1024x768, I'm wary of buying a laptop that can't display that resolution.

(What was wrong with my beloved old Vaio? Nothing, really, except that the continued march of software bloat means that a machine that can't use more than 256M RAM is hurting when trying to run programs (*cough* Firefox *cough) that start life by grabbing about 90M and goes steadily up from there. I can find lightweight alternatives for nearly everything else, but not for the browser -- Dillo just doesn't cut it.)

Ebay turned out to be the answer: there are lots of subnotebooks there, nice used machines with full displays at netbook prices. And so a month before LCA I landed a nice Vaio TX650 with 1.5G RAM, Pentium M, Intel 915GM graphics and Centrino networking. All nice Linux-supported hardware.

But that raised another issue: how do widescreen laptops (the TX650 is 1366x768) talk to a projector? I knew it was possible -- I see people presenting from widescreen machines all the time -- but nobody ever writes about how it works.

The first step was to get it talking to an external monitor at all. I ran a VGA cable to my monitor, plugged the other end into the Vaio (it's so nice not to need a video dongle!) and booted. Nothing. Hmm.

But after some poking and googling, I learned that with Intel graphics, xrandr is the answer:

xrandr --output VGA --mode 1024x768
switches the external VGA signal on, and
xrandr --auto
switches it back off.

Update, April 2010: With Ubuntu Lucid, this has changed and now it's
xrandr --output VGA1 --mode 1024x768
-- in other words, VGA changed to VGA1. You can run xrandr with no arguments to get a list of possible output devices and find out whether X sees the external projector or screen correctly.

Well, mostly. Sometimes it doesn't work -- like, unfortunately, at the lightning talk session, so I had to give my talk without visuals. I haven't figured that out yet. Does the projector have to be connected before I run xrandr? Should it not be connected until after I've already run xrandr? Once it's failed, it doesn't help to run xrandr again ... but a lot of fiddling and re-plugging the cable and power cycling the projector can sometimes fix the problem, which obviously isn't helpful in a lightning talk situation.

Eventually I'll figure that out and blog it (ideas, anyone?) but the real point of today's article is resolution. What I wanted to know was: what happened to that wide 1366-pixel screen when I was projecting 1024 pixels? Would it show me some horrible elongated interpolated screen? Would it display on the left part of the laptop screen, or the middle part?

The answer, I was happy to learn, is that it does the best thing possible: it sends the leftmost 1024 pixels to the projector, while still showing me all 1366 pixels on the laptop screen.

Why ... that means ... I can write notes for myself, to display in the rightmost 342 screen pixels! All it took was a little bit of CSS hacking in my HTML slide presentation package, and it worked fine. Now I have notes just like my Mac friends with their Powerpoint and their dual-head video cards, only I get to use Linux and HTML. How marvellous! I could get used to this widescreen stuff.

Tags: , , , , , ,
[ 21:12 Feb 06, 2009    More linux/laptop | permalink to this entry ]

Thu, 22 Jan 2009

LCA 2009: Thursday

The highlight of Thursday morning was a filler: one of the speakers had to cancel, so Paul Fenwick filled in with a combination of two short talks: "The Art of Klingon Programming" and "What's new in Perl 5.10?" I'm not a Perl programmer (at least not when I have a choice) but his talks were entertaining and even educational. What struck me most was that showmanship and humor don't have to detract from technical content. I'd had a discussion the previous day about the balance of offering lots of technical content versus entertaining the audience and not overwhelming them. Most technical talks are either dry, content heavy and so jam packed with information that you can't possibly remember everything, or lighter weight and glitzy but with not much real technical content and a "watered down" feeling. Paul's Klingon talk was one of the most content-full presentations I've seen at a conference, with lots of code examples, yet it kept the audence laughing, listening and grokking (to mix SF metaphors) all the way through. Showmanship can make it easier, not harder, to remember technical content.

In the afternoon, I'd been very much looking forward to the Arduino tutorial (Jonathan Oxer and Hugh Blemings) but it was a bit of a disappointment. The acoustics of the room and the handheld microphone, combined with the interactive nature of the presentation, meant that I could barely understand a word High Blemings said, and only some of what Jon Oxer said. (I've heard Jon Oxer talk before and never had trouble, so I primarily blame the room.)

Partway through, I skipped out to go check Donna Benjamin's "The Joy of Inkscape." It had been moved from its original lecture hall to a much smaller room with tables. The smaller room was Standing Room Only, a raucous and enthusiastic bunch who (the sitting ones, at least) were nearly all tapping away on laptops exploring either the demo Donna was showing or other Inkscape projects.

It was clearly a hugely successful and fun tutorial and I wanted to stay, but I couldn't find a place to sit where I could both see the screen and hear Donna, so I made my way back to Arduino. The second half, when they demoed various interesting sensors and a few unusual Arduino applications, was better than the first. But talking to folks later, a number of us were surprised because we expected a more interactive tutorial (the prep had encouraged us to bring or buy Arduino hardware).

The hot talk of the day was one I missed, after the tea break. I went to a talk on Spring, a robotics library (Clinton Roy), which was interesting enough and certainly popular (lots of people sitting by the door because all the seats were full) but afterward all I heard was people enthusing about Jeff Arnold's amazing Ksplice talk. He demonstrated a system of updating kernels in place, with no reboot required. People couldn't say enough about the talk, and I'm looking forward to downloading the video and seeing what I missed.

Tags: , , ,
[ 13:41 Jan 22, 2009    More conferences/lca2009 | permalink to this entry ]

Sat, 09 Aug 2008

GetSET: Teaching Javascript to high school girls

Every summer I volunteer as an instructor for a one-day Javascript programming class at the GetSET summer technology camp for high school girls. GetSET is a great program run by the Society of Women Engineers. it's intended for minority girls from relatively poor neighborhoods, and the camp is free to the girls (thanks to some great corporate sponsors). They're selected through a competitive interview process so they're all amazingly smart and motivated, and it's always rewarding being involved.

Teaching programming in one day to people with no programming background at all is challenging, of course. You can't get into any of the details you'd like to cover, like style, or debugging techniques. By the time you get through if-else, for and while loops, some basic display methods, the usual debugging issues like reading error messages, and typographical issues like "Yes, uppercase and lowercase really are different" and "No, sorry, that's a colon, you need a semicolon", it's a pretty full day and the students are saturated.

I got drafted as lead presenter several years ago, by default by virtue of being the only one of the workshop leaders who actually programs in Javascript. For several years I'd been asking for a chance to rewrite the course to try to make it more fun and visual (originally it used a lot of form validation exercises), and starting with last year's class I finally got the chance. I built up a series of graphics and game exercises (using some of Sara Falamaki's Hangman code, which seemed perfect since she wrote it when she was about the same age as the girls in the class) and it went pretty well. Of course, we had no idea how fast the girls would go or how much material we could get through, so I tried to keep it flexible and we adjusted as needed.

Last year went pretty well, and in the time since then we've exchanged a lot of email about how we could improve it. We re-ordered some of the exercises, shifted our emphasis in a few places, factored some of the re-used code (like windowWidth()) into a library file so the exercise files weren't so long, and moved more of the visual examples earlier.

I also eliminated a lot of the slides. One of the biggest surprises last year was the "board work". I had one exercise where the user clicks in the page, and the student has to write the code to figure out whether the click was over the image or not. I had been nervous about that exercise -- I considered it the hardest of the exercises. You have to take the X and Y coordinates of the mouse click, the X and Y coordinates of the image (the upper left corner of the <div> or <img> tag), and the size of the image (assumed to be 200x200), and turn that all into a couple of lines of working Javascript code. Not hard once you understand the concepts, but hard to explain, right?

I hadn't made a slide for that, so we went to the whiteboard to draw out the image, the location of the mouse click, the location of the image's upper left corner, and figure out the math ... and the students, who had mostly been sitting passively through the heavily slide-intensive earlier stuff, came alive. They understood the diagram, they were able to fill in the blanks and keep track of mouse click X versus image X, and they didn't even have much trouble turning that into code they typed into their exercise. Fantastic!

Remembering that, I tried to use a lot fewer slides this year. I felt like I still needed to have slides to explain the basic concepts that they actually needed to use for the exercises -- but if there was anything I thought they could figure out from context, or anything that was just background, I cut it. I tried for as few slides as possible between exercises, and more places where we could elicit answers from the students. I think we still have too many slides and not enough "board work" -- but we're definitely making progress, and this year went a lot better and kept them much better engaged. We're considering next year doing the first several exercises on the board first, then letting them type it in to their own copies to verify that it works.

We did find we needed to leave code examples visible: after showing slides saying something like "Ex 7: Write a loop that writes a line of text in each color", I had to back up to the previous slide where I'd showed what the code actually looked like. I had planned on their using my "Javascript Quick Reference" handout for reference and not needing that information on the slides; but in fact, I think they were confused about the quickref and most never even opened it. Either that information needs to be in the handout, or it needs to be displayed on the screen as they work, or I have to direct them to the quickref page explicitly ("Now turn to page 3 in ...") or put that information in the exercises.

The graphical flower exercises were a big hit this year (I showed them early and promised we'd get to them, and when we did, just before lunch, several girls cheered) and, like last year, some of the girls who finished them earlier decided on their own that they wanted to change them to use other images, which was also a big hit. Several other girls decided they wanted more than 10 flowers displayed, and others hit on the idea of changing the timeout to be a lot shorter, which made for some very fun displays. Surprisingly, hardly anyone got into infinite loops and had to kill the browser (always a potential problem with javascript, especially when using popups like alert() or prompt()).

I still have some issues I haven't solved, like what to do about semicolons and braces. Javascript is fairly agnostic about them. Should I tell the girls that they're required? (I did that this year, but it's confusing because then when you get to "if" statements you have to explain why that's different.) Not mention them at all? (I'm leaning toward that for next year.)

And it's always a problem figuring out what the fastest girls should do while waiting for the rest to finish. This year, in addition to trying to make each exercise shorter, we tried having the girls work on them in groups of two or three, so they could help each other. It didn't quite work out that way -- they all worked on their own copies of the exercises but they did seem to collaborate more, and I think that's the best balance. We also encourage the ones who finish first to help the girls around them, which mostly they do on their own anyway.

And we really do need to find a better editor we can use on the Windows lab machines instead of Wordpad. Wordpad's font is too small on the projection machine, and on the lab machines it's impossible for most of us to tell the difference between parentheses, brackets and braces, which leads to lots of time-wasting subtle bugs. Surely there's something available for Windows that's easy to use, freely distributable, makes it easy to change the font, and has parenthesis and brace matching (syntax highlighting would be nice too). Well, we have a year to look for one now.

All in all, we had a good day and most of the girls gave the class high marks. Even the ones who concluded "I learned I shouldn't be a programmer because it takes too much attention to detail" said they liked the class. And we're fine with that -- not everybody wants to be a programmer, and the point isn't to force them into any specific track. We're happy if we can give them an idea of what computer programming is really like ... then they'll decide for themselves what they want to be.

Tags: , , ,
[ 11:54 Aug 09, 2008    More education | permalink to this entry ]

Thu, 06 Mar 2008

Review of Toastmasters manuals

With all the zillions of Toastmasters club web pages, very few people seem to write about them. A conversation in our club today about the advanced manuals made me realize that I'd never seen a review of the various Toastmasters advanced manuals -- which ones are useful, which ones are fun, which ones are poorly written or contain gotchas that makes it hard to complete their projects?

So I wrote one: a Review of Toastmasters manuals.

Tags: ,
[ 20:16 Mar 06, 2008    More speaking | permalink to this entry ]

Tue, 23 Oct 2007

She's Geeky tech unconference

I just got back from She's Geeky. What a rush! It'll take me a while to wind down from this fabulous all-women meeting.

I have to admit, I was initially dubious. A conference for geeky women sounded great, but it struck me as kind of expensive -- $175 (with a $125 early-bird rate). That's very cheap as tech conferences go, but for a two-day "unconference", it was enough to turn off most local techie women I know: nearly all of them knew about She's Geeky and said "I'd love to go but I can't afford it." Full disclosure: I said the same thing, and wouldn't have gone myself had I not gotten a "scholarship", for which I am immensely grateful. (In retrospect, considering how well run it was, it probably would have been worth the early-bird price. But that's not easy to tell ahead of time.)

Monday consisted of lunch and informal discussion followed by two sessions of scheduled talks. I particularly liked the afternoon schedule, which included two different sessions of speaker training: the theory being that one factor holding women back in technology jobs is that we don't make ourselves visible by public speaking as much as we could. I went to the "Lightening (sic) Talks" session, headed by Danese Cooper. It didn't make me lighter, but we got some great advice at giving conference talks (lightning and otherwise) plus two rounds of practice at three minute talks. I'm not sure what I enjoyed more, the practice and useful feedback or the chance to listen to so many great short talks on disparate and interesting subjects.

Tuesday started way before normal geek time, with bagels and espresso and an explanation by conference organizer Kaliya Hamlin on how we'd use the Open Space process. Sessions would be an hour long, and we had eight rooms to work with, all charted on a huge grid on the wall. Anyone could run a session (or several). Write it (and your name) on a card, get up and tell the group about it, then find a time and space for it and tape it on the grid. Rules for sessions were few. For session leaders, Whoever comes to your session is the right audience, and whatever happens is what should have happened. For people attending a session there's the Rule of Two Feet: if you're not getting anything out of the session you're in, you should get up and get yourself to somewhere where you're contributing and/or learning. Not hard when there are seven other sessions to choose from.

This all worked exactly as described. Whatever hesitance many women may feel toward public speaking, there was no lack of volunteer session leaders on a wide variety of topics, both technical and social. I signed up to give a GIMP session before lunch; then in a morning session on server and firewall configuration given by fellow LinuxChix Gloria W. and Gaba, I noticed a few people having a lot of general Linux questions, in particular command-line questions, so I ran back to the wall grid and added an afternoon session on "Understanding the Linux command line".

Easily my favorite session of the conference was the Google Maps API talk by Pamela Fox of Google. I've been meaning to experiment with Google Maps and KML for a long time. I even have books on it sitting on my shelf. But I never seem to get over the hump: find a project and a specific task, then go RTFM and figure out how to write a KML file from scratch to do something fun and useful. Pamela got me over that in a hurry -- she showed us the "My Maps" tab in Google Maps (you have to be signed on to a Google account to use it). It includes tools for generating some starter KML interactively, and it even has a polygon editor, all implemented in AJAX (Javascript) and running in a browser. Wow! What a great way to get a running start on map mashups. There's also a whole open source Javascript API and set of libraries for writing creative web mapping apps. I'm sure I'll be experimenting with this a lot more and writing about it separately. Just this talk alone made the conference worthwhile, even without all the other great sessions.

But I didn't get a chance to experiment right away with any of that cool mapping stuff, because right after that session was one by speaker and comedian Heather Gold. Heather had given Saturday night's evening entertainment, and I am very sorry to have had to miss the show to go to a night class. The session was on self confidence, getting over fear of speaking, and connecting with the audience. Since the allotted space was noisy (the same one I'd ended up with for my GIMP talk, and the noise was definitely a problem), Heather led our small group out onto the balcony to enjoy the warm weather. The group was diverse and included women at very different levels of speaking, but Heather had great tips for all of us. She has great presence and a lot of useful things to say, and she's funny -- I'd love to see her on stage.

Everybody had a really positive attitude. At the Lightning Talks session on Saturday, Danese stressed "No whinging" as a general rule to follow (in talks or anywhere else), and I'd say the whole conference followed it. While we heard about lots of serious topics women face, I didn't hear any whining or "men are keeping us down" or that sort of negativism. There were some bad experiences shared as well as good ones, but the point was in finding solutions and making progress, not dwelling on problems. This was a group of women doing things.

There are only two changes I can think of that could have improved the conference at all. First, I already mentioned the cost. While it was fair considering the fantastic organization, great people, plus catered meals, it still lets out some of the women who could have benefitted the most: students and the un- and under-employed. A few of us LinuxChix talked about how much we'd love to see a similar conference held at a cheaper facility, without the handouts or the catered meals. Maybe some day we'll be able to make it happen.

Second (and this is a very minor point), it might have been helpful to have runners reminding people when sessions were ending, and perhaps making the sessions 55 minutes instead of an hour to encourage getting to the next session and starting on promptly.

Even without that, people mostly stuck to the schedule and Tuesday finished right on time: pretty amazing for a conference whose agenda had been made that morning with cardboard, tape and marking pens. I've seen unconferences before, and they're usually a disorganized mess. This one ran better than most scheduled conferences. Kaliya and her fellow organizers clearly know how to make this process work.

We all pitched in to clean up the room, and I braved the rush-hour freeway. And arrived home to find that my husband had cooked dinner and it was just about ready. What a nice ending to the day!

Tags: , , ,
[ 23:01 Oct 23, 2007    More misc | permalink to this entry ]

Thu, 15 Feb 2007

Logitech Cordless Presenter

I got a nifty new toy: a Logitech Cordless Presenter.

I've been watching some of the videos from LCA2007, and I like how some of the speakers made their presentations smoother, and avoided being tied to standing next to their computer, by using remote slide-changing gizmos. It wouldn't help for my GIMP presentations, since those are usually live demos, but I do give other types of talks.

I didn't find much on the web about remote presenters and Linux, and wasn't at all sure whether or how they worked. As usual with hardware, the only way to find out is to buy one and try it.

As it turns out, it works just fine, so I wrote up a review with details.

Tags: ,
[ 14:34 Feb 15, 2007    More linux | permalink to this entry ]

Tue, 25 Apr 2006

Firefox for Presentations: Hiding the URLbar

I've long been an advocate of making presentations in HTML rather than using more complex presentation software such as PowerPoint, Open Office Presenter, etc. For one thing, those presentation apps are rather heavyweight for my poor slow laptop. For another, you can put an HTML presentation on the web and everyone can see it right away, without needing to download the whole presentation and fire up extra software to see it.

The problem is that Mozilla's fullscreen mode doesn't give you an easy way to get rid of the URL/navigation bar, so your presentations look like you're showing web pages in a browser. That's fine for some audiences, but in some cases it looks a bit unpolished.

In the old Mozilla suite, I solved the problem by having a separate profile which I used only for presentations, in which I customized my browser to show no urlbar. But having separate profiles means you always have to specify one when you start up, and you can't quickly switch into presentation mode from a running browser. Surely there was a better way.

After some fruitless poking in the source, I decided to ask around on IRC, and Derek Pomery (nemo) came up with a wonderful CSS hack to do it. Just add one line to your chrome/userChrome.css file.

In Firefox:

#toolbar-menubar[moz-collapsed=true] + #nav-bar { display: none !important; }

In Seamonkey:

#main-menubar[moz-collapsed=true] + #nav-bar { display: none !important; }

This uses a nice CSS trick I hadn't seen before, adjacent sibling selectors, to set the visibility of one item based on the state of a sibling which appears earlier in the DOM tree.

(A tip for using the DOM Inspector to find out the names of items in fullscreen mode: since the menus are no longer visible, use Ctrl-Shift-I to bring up the DOM Inspector window. Then File->Inspect a Window and select the main content window, which gets you the chrome of the window, not just the content. Then you can explore the XUL hierarchy.)

This one-line CSS hack turns either Firefox or Seamonkey into an excellent presentation tool. If you haven't tried using HTML for presentations, I encourage you to try it. You may find that it has a lot of advantages over dedicated presentation software.

Addendum: I probably should have mentioned that View->Toolbars->Navigation Controls turns off the toolbar if you just need it for a one-time presentation or can't modify userChrome.css. You have to do it before you flip to fullscreen, of course, since the menus won't be there afterward, and then again when you flip back. I wasn't happy with this solution myself because of the two extra steps required every time, particularly because the steps are awkward since they require using the laptop's trackpad.

Tags: , , ,
[ 16:59 Apr 25, 2006    More tech/web | permalink to this entry ]