[06:05] <kayve> I am having a hard time knowing how to proceed with the installation of this facility called libdap which is a data transfer add on for Matlab
[06:18] <persia> kayve: Have you tried asking in #ubuntu?
[14:08] <mhall119|work> nice
[14:30] <cjohnston> hey mhall119|work
[14:31] <cjohnston> did you see the identi.ca and twitter accounts?
[14:45] <mhall119|work> nope
[14:45] <mhall119|work> what are they?
[14:46] <mhall119|work> @ubuntuclassroom?
[15:09] <cjohnston> yes
[15:09] <cjohnston> mhall119|work: http://chrisjohnston.org/2010/ubuntu-classroom-identi-ca-twitter
[16:01] <kirkland> howdy all
[16:01] <kirkland> anyone here to hear about Testdrive for the Opportunistic Developer Week?
[16:02] <kirkland> alrighty
[16:02] <kirkland> couple people, good enough for me
[16:02] <kirkland> so my name is Dustin Kirkland, an Ubuntu Core Developer on the Server Team
[16:02] <kirkland> in particular, I look after Ubuntu's virtualization and cloud computing packages
[16:03] <kirkland> but I'd also like to think of myself as an opportunistic developer too ;-)
[16:03] <kirkland> this session is about Testdrive, which I hope is interesting to you for two reasons ...
[16:03] <kirkland> 1) it was totally developed opportunistically ;-)
[16:03] <kirkland> 2) it can be used to help you test/develop your own opportunistic apps
[16:04] <kirkland> so who here has some helper scripts that they wrote or borrowed from someone else, living in their $HOME/bin dir?
[16:04] <kirkland> well, those are often good targets of opportunity for sharing, IMHO
[16:04] <kirkland> and that's sort of how Testdrive came about
[16:05] <kirkland> kvm is a really powerful program
[16:05] <kirkland> with lots and lots and lots of options
[16:05] <kirkland> http://manpages.ubuntu.com/manpages/lucid/en/man1/kvm.1.html
[16:05] <kirkland> but i tended to use the same ones over and over again
[16:05] <kirkland> for a few reasons ...
[16:05] <kirkland> they made my VMs run faster, better, etc.
[16:06] <kirkland> so i wrote a little shell script i called mykvm that added those options automatically for me
[16:06] <kirkland> as turned out, though, this could be really useful for other people
[16:07] <kirkland> particularly people who don't terribly want to learn lots and lots about virtualization and kvm
[16:07] <kirkland> but just want to quickly launch a throwaway VM
[16:07] <kirkland> perhaps boot a live cd in a vm, test something, then discard it
[16:07] <kirkland> about the same time, lots and lots of people started complaining about karmic
[16:07] <kirkland> "omg the colors are ugly... this is broken... that is broken... etc. etc. etc."
[16:08] <kirkland> but this stuff had been in the pipeline for months
[16:08] <kirkland> anyone of those very vocal individuals could have tried Ubuntu any time in the last 6 months
[16:08] <kirkland> reported bugs
[16:08] <kirkland> and perhaps gotten some of them fixed
[16:08] <kirkland> so Testdrive was born
[16:09] <kirkland> as a way to "testdrive" the latest daily Ubuntu ISOs
[16:09] <kirkland> using rsync/zsync to incrementally download the day's image
[16:09] <kirkland> run it in a vm
[16:09] <kirkland> perhaps install, perhaps not
[16:09] <kirkland> and throw it away when done!
[16:10] <kirkland> what started out as a way to scratch my own itch ended up helping lots of people
[16:10] <kirkland> and solving a different problem
[16:10] <kirkland> and after Lucid releases, you'll be able to continue testdriving MM, OO, PP, etc. while still running Lucid ;-)
[16:11] <kirkland> so there's a couple of steps along the way ...
[16:11] <kirkland> of course i created a project and a team in Launchpad
[16:11] <kirkland> http://launchpad.net/testdrive
[16:11] <kirkland> http://launchpad.net/~testdrive
[16:11] <kirkland> loaded the source code up into bzr
[16:11] <kirkland> pushed to a public branch, GPLv3
[16:11] <kirkland> packaged it (this is important if you want people to install your program!)
[16:12] <kirkland> pushed to PPAs (backported to Hardy, Intrepid, Jaunty, Karmic, Lucid)
[16:12] <kirkland> and eventually got it into Ubuntu universe for Lucid
[16:12] <kirkland> (PPAs for the rest)
[16:12] <kirkland> now, shortly after I released the initial version working with KVM, people came along and said
[16:12] <kirkland> "I like it, but I can't use KVM ..."
[16:13] <kirkland> and thus it grew arms and legs
[16:13] <kirkland> to use VirtualBox and Parallels
[16:13] <kirkland> and there's a VMWare patch under development
[16:13] <kirkland> this is community driven efforts, now
[16:14] <kirkland> with people like popey and others contributing bugs, features, patches, fixes, etc.
[16:14] <kirkland> so that's a bit about the history of the development of testdrive so far
[16:14] <kirkland> i see a question ....
 QUESTION: What % of Karmic bugs were hardware support vs strictly software?
[16:15] <kirkland> I have no idea what the percentage is, but I'll address the spirit of your question ....
[16:15] <kirkland> obviously there are limitations to what can be tested in a VM
[16:15] <kirkland> but there are tons of things that still can be tested in a VM!
[16:16] <kirkland> actually, when I demo'd testdrive at UDS Dallas, sconklin of the Ubuntu kernel team said ...
[16:16] <kirkland> "crap dude, if this testdrive thing takes off, people aren't going to test on their real hardware as much any more"
[16:16] <kirkland> i reckon that's true to some extent
[16:16] <kirkland> so at the end of running testdrive, there's now a question that ask you:
[16:17] <kirkland> Launch USB Startup Disk Creator for further testing of this ISO? [y/N]
[16:17] <kirkland> :-)  which was sconklin's suggestion
 QUESTION: "...testdriving MM, OO, PP etc." what those stand for?
[16:17] <kirkland> MM, OO, PP are whatever the releases after Lucid Lynx might be ;-)
[16:18] <kirkland> multimorphing minataur
[16:18] <kirkland> um
[16:18] <kirkland> meh, whatever mark comes up with :-)
 QUESTION: How successful is a VM for testing strictly hardware bugs?
[16:19] <kirkland> a VM can be used for some things
[16:19] <kirkland> like USB devices
[16:19] <kirkland> you can "passthrough" USB devices to VMs
[16:19] <kirkland> like a web cam
[16:19] <kirkland> or a 3G modem
[16:20] <kirkland> i often pass my Palm Pre cell phone through to a vm
[16:20] <kirkland> so ... using Testdrive to do your development/testing ...
[16:20] <kirkland> if you're already on Lucid, it's just "sudo apt-get install testdrive"
[16:21] <kirkland> if you're on Jaunty/Karmic, grab it from the PPA at http://launchpad.net/testdrive
[16:21] <kirkland> if you're on Hardy/Intrepid, well, it'll work, but there's a few limitations
[16:21] <kirkland> basically, the linux virtualization stack has evolved rapidly in the last ~1 year
[16:22] <kirkland> so ... get testdrive installed
[16:22] <kirkland> you'll need run either kvm or virtualbox
[16:22] <kirkland> i tend to recommend kvm if you have hardware that can run kvm
[16:22] <kirkland> and fall back to VB only if you have to
[16:23] <kirkland> once testdrive is installed, you can run either from the command line or from the Applications -> System Tools -> Testdrive menu
[16:23] <kirkland> if you run with no options, you should be prompted with a menu of Ubuntu releases
[16:23] <kirkland> this is just a concise list of perhaps the most popular ISOs
[16:23] <kirkland> (arguably)
[16:23] <kirkland> you can choose one of these
[16:24] <kirkland> or enter your own url
[16:24] <kirkland> actually, from the command line, you can use:
[16:24] <kirkland> testdrive -u any_iso
[16:24] <kirkland> where any_iso can be a local path
[16:24] <kirkland> or http, ftp, or rsync
[16:24] <kirkland> and it doesn't have to be ubuntu
[16:24] <kirkland> it can be debian, fedora, windows, whatever
[16:25] <kirkland> well, i don't much about windows
[16:25] <kirkland> but it should theoretically work :-)
 QUESTION: How much RAM is recommended for VM to use testdrive?
[16:26] <kirkland> if you have >1G of memory, testdrive will give 512M to the guest
[16:26] <kirkland> else if you have > 750MB, testdrive will give 384M to the guest
[16:26] <kirkland> else it will give 256M to the guest
[16:26] <kirkland> which is basically what's required to run a live cd iso
[16:27] <kirkland> so i'd say you need >256M of memory :-)
[16:27] <kirkland> actually, this was one of the first reasons i created that old mykvm script
[16:27] <kirkland> kvm defaults to 128M of memory
[16:27] <kirkland> which ain't much :-)
[16:27] <kirkland> i *always* gave my VM's 512M
[16:28] <kirkland> so i created a bash alias, which eventually turned into a script to add virtio networking and virtio disk
[16:28] <kirkland> oh, another thing about the evolution of that code ...
[16:28] <kirkland> it started out as shell script
[16:28] <kirkland> which is fine and dandy for prototyping
[16:28] <kirkland> but if you want to do something more complex
[16:28] <kirkland> and you want to work with other people on the code
[16:28] <kirkland> ie, "collaborate"
[16:29] <kirkland> shell can be difficult ;-)
[16:29] <kirkland> so I re-wrote it in python
[16:29] <kirkland> i'm sure you've heard a lot about python this week
[16:29] <kirkland> i'm no expert, but it's easy to learn, and a very friendly language
 QUESTION: What exactly do you expect users to test?
[16:29] <kirkland> well, it's both a test and a development tool, actually
[16:30] <kirkland> from a test perspective ...
[16:30] <kirkland> some of you probably saw the new ubuntu theme posts this week?
[16:30] <kirkland> new colors and windows and stuff like that?
[16:30] <kirkland> great for testdriving
[16:31] <kirkland> or perhaps packages in ppas
[16:31] <kirkland> that you're not willing to put on your primary desktop
[16:31] <kirkland> which might even be running Lucid, as in my case
[16:31] <kirkland> there's some stuff that even core developers are risk adverse too :-)
[16:32] <kirkland> but  you can also install to the vm's disk
[16:32] <kirkland> reboot the vm, etc.
[16:32] <kirkland> we use that for server testing all the time
[16:32] <kirkland> i'd say software wise, you should be able to test almost anything
[16:32] <kirkland> you know, the stuff people are going to complain about after release :-)
[16:32] <kirkland> its actually *really* easy to test it now, before release, in a vm
 kirkland: I thought testdrive was meant to test hardware, drivers and other stuff
[16:33] <kirkland> not really ....
[16:33] <kirkland> are you thinking of checkbox?
 QUESTION: When updating a testdrive snapshot, is the entire distro downloaded or diff files?
[16:33] <kirkland> testdrive tries its best to download incrementally
[16:34] <kirkland> if the url is a rsync:// url (all of the ones in the default menu are), it uses rsync against the iso
[16:34] <kirkland> which can really improve your download by incrementally downloading the parts of the iso that have changed
[16:34] <kirkland> if you use http or ftp, it tries to use zsync
[16:34] <kirkland> which requires a zsync file on the server end
[16:34] <kirkland> ubuntu images are typically published with a zsync file
[16:35] <kirkland> but if you're pulling images from else, they may or may not be there
 kirkland: as a programmer i thought it would have some automated tests included in testdrive, like in grid computing, use users' computing power to run more tests quickier.. I didn't realize it would be used to test virtually anything.
[16:35] <kirkland> possibly a flaw in the naming of the package ...
[16:35] <kirkland> it's really meant as an easy way to "take the next ubuntu release out for a test drive"
[16:36] <kirkland> in the same way you might roll up to the chevy dealership and ask to take the new Corvette out for a spin ;-)
[16:36] <kirkland> so from a development perspective, i often use testdrive for a pristine environment
[16:36] <kirkland> of course there are other ways of doing this
[16:37] <kirkland> chroots, etc.
[16:37] <kirkland> but for various reasons, a VM can be advantageous
[16:37] <kirkland> it more closely mimics the end user's environment
 QUESTION: How much KVM do we need to know? Can you recommend a quick start guide for KVM?
[16:37] <kirkland> to use testdrive?  none at all, hopefully
[16:38] <kirkland> that's the goal of testdrive, to mask the creation and tear down of the VM from you entirely
[16:38] <kirkland> you just tell testdrive where your target ISO is, and it puts that into a VM for you to play with
[16:38] <kirkland> if you want to learn about KVM, well that's a different story
[16:38] <kirkland> :-)
[16:39] <kirkland> https://help.ubuntu.com/community/KVM
[16:39] <kirkland> that's as good of a starter as anywhere
[16:39] <kirkland> http://manpages.ubuntu.com/manpages/lucid/en/man1/kvm.1.html
[16:39] <kirkland> manpages are good too
[16:39] <kirkland> but, for instance ...
[16:39] <kirkland> i'm testdriving an iso right now
[16:39] <kirkland> ps -ef | grep kvm
[16:40] <kirkland> kirkland 31434 31433 78 10:38 pts/11   00:00:54 kvm -m 1024 -cdrom /home/kirkland/.cache/testdrive/iso/lucid-desktop-amd64.iso -drive file=/home/kirkland/.cache/testdrive/img/testdrive-disk-Aw769k.img,if=virtio,index=0,boot=on -usb -usbdevice tablet -net nic,model=virtio -net user -soundhw es1370
[16:40] <kirkland> if you know the kvm magic, you could easily construct that line yourself
[16:40] <kirkland> -m 1024 -> give the vm a gig of memory
[16:40] <kirkland> -cdrom is the path to the locally cachced iso image
[16:40] <kirkland> -drive ...virtio... loads a virtio disk
[16:40] <kirkland> which is really fast, by the way
[16:40] <kirkland> this is a sparse qcow2 image
[16:41] <kirkland> created by kvm-img create -f qcow2
[16:41] <kirkland> which testdrive also did for you
[16:41] <kirkland> -usbdevice tablet improves the mouse experience, letting you move in and out of the window a bit better
[16:41] <kirkland> virtio networking
[16:41] <kirkland> and a sound card, so that you can hear the vm's sound
[16:41] <kirkland> there's similar work done for virtualbox too
[16:42] <kirkland> makes the experience similar
 QUESTION: When somebody has installed with Testdrive to virtual HDD and there is a new image available. So is that possible to extract the image and place binaries at their respective locations without going through the whole setup thing again? (probably stupid but sounds good to me)
[16:42] <kirkland> hmm, it would be much better to just boot the existing installed virtual HDD and sudo apt-get dist-upgrade ;-)
 QUESTION: Can testdrive be used for testing/benchmarking server edition and server applications?
[16:43] <kirkland> absolutely!
[16:43] <kirkland> well, testing
[16:43] <kirkland> benchmarking is a little tougher in a vm
[16:43] <kirkland> though it can be done, with certain caveats
 QUESTION: For instance, if I want to test apps from Hardy to Lucid?
[16:44] <kirkland> well, a couple of things ...
[16:44] <kirkland> you could start by testdriving a Hardy server iso
[16:44] <kirkland> install to the virtual hard disk, add your apps
[16:44] <kirkland> verify that they install there
[16:44] <kirkland> then live upgrade from Hardy -> Lucid in the vm
[16:44] <kirkland> (that'll take a while, depending on your bandwidth)
[16:45] <kirkland> then see if your apps are still working as they were in Hardy
[16:45] <kirkland> oh, and you could save your hardy image off to the side
[16:45] <kirkland> or use qemu snapshot
[16:45] <kirkland> so that you can roll back and forth
 Almost like cloud computing.
[16:46] <kirkland> well, similar, i suppose
[16:46] <kirkland> in that cloud computing builds on virtualization
[16:46] <kirkland> Ubuntu Enterprise Cloud is really just a collection of KVM vm's
[16:46] <kirkland> (and a lot of management software that makes that work)
[16:47] <kirkland> stuff much more complicated than testdrive, I assure you ;-)
[16:47] <kirkland> and it's good for that
[16:47] <kirkland> so you can branch the testdrive source code very easily
[16:47] <kirkland> bzr branch lp:testdrive
[16:47] <kirkland> it's just a relatively simple python script
[16:48] <kirkland> you're welcome to hack on it, submit bugs, and branches and patches :-)
[16:48] <kirkland> scratch your itch
[16:48] <kirkland> or model your own project on bits and pieces of testdrive if you like
 QUESTION: Can you save state in a snapshot? (like a suspend/hibernate)
[16:48] <kirkland> you sure can!
[16:48] <kirkland> here's how ...
[16:48] <kirkland> if you're running a kvm
[16:49] <kirkland> click inside of it
[16:49] <kirkland> and press
[16:49] <kirkland> ctrl-alt-2
[16:49] <kirkland> this will put you into the qemu monitor
[16:49] <kirkland> it's like a little shell running below the vm
[16:49] <kirkland> you can talk to the hypervisor here
[16:50] <kirkland> in there, type:
[16:50] <kirkland> savevm /tmp/path_to_snapshot.img
[16:50] <kirkland> this will take a few minutes to complete
[16:50] <kirkland> well, depending on the size of your memory and delta from the last state
 QUESTION: I want to experiment with XEN VM on one of my machines.  Will testdrive work with XEN?
[16:51] <kirkland> not currently
[16:52] <kirkland> no plans to do so (by me)
[16:52] <kirkland> good patches accepted :-)
 QUESTION: (not a question) you should also advertise Testdrive to developers as a way to test their apps on OLDER releases which many end users use :)
[16:52] <kirkland> thanks
[16:53] <kirkland> guys, i think that's about all from me
[16:53] <kirkland> scratch your itch ;-)
[18:50] <sebsebseb> Hi
[19:02] <jono> ahh!
[19:02] <jono> hey all!
[19:02] <jono> sorry some nick problems there
[19:02] <jono> I am a numpty!
[19:03] <jono> ok folks, if in Lernid and on Lucid - click Event -> Tweet this session :)
[19:03] <jono> ok lets get started
[19:03] <jono> how is everyone today?!
[19:04] <jono> hi all! my name is Jono Bacon and I am the Ubuntu Community Manager
[19:04] <jono> welcome to my Lernid showcase session
[19:04] <jono> the aim of this session is to tell the story behind Lernid, to explain how it came about, what technical decisions were made to produce it and to help provide some background that might help you good folks make your own apps
[19:04] <jono> so, what is Lernid?
[19:05] <jono> many of you are using Lernid to connect to this and other online learning sessions, but for some of you, you will have no idea what Lernid is
[19:05] <jono> who is using Lernid to view this now?
[19:05] <jono> give me a o/ in the chat channel if you
[19:05] <jono> are
[19:06] <jono> sweet! :)
[19:06] <jono> that makes me smile
[19:06] <jono> ok, in a nutshell, Lernid is an online learning to tool that helps people have an interactive experience when participating in online learning events - the homepage for Lernid is at https://wiki.ubuntu.com/Lernid
[19:07] <jono> click the Session tab to see the web pages as I post them
[19:07] <jono> about 3 1/2 years ago when I joined Canonical as the Ubuntu Community Manager, I was trying to think of ways in which we could spread best practise - methods in which we could help more people in the community learn the skills and processes to join us to make Ubuntu better
[19:07] <jono> to do this I created Ubuntu Open Week: a set of IRC tuition sessions in which people joined #ubuntu-classroom and #ubuntu-classroom-chat - I asked a bunch of my fellow community members to deliver sessions in #ubuntu-classroom and questions could be asked in #ubuntu-classroom-chat
[19:07] <jono> it went down really well and lots of new folks joined our community
[19:08] <jono> we then created Ubuntu Developer Week: a similar event but more specifically aimed at technical topics and packaging work in Ubuntu
 QUESTION: How much beer did it cost you?
[19:08] <jono> none :)
 QUESTION: How much beer did it cost you?
[19:08] <jono> oops
[19:08] <jono> we have done this every cycle for three years, but a few things niggled me about it - namely:
[19:09] <jono> (1) IRC is complex for a lot of new users - you need to know how to what an IRC client is, how to connect and which channels to join
[19:09] <jono> (2) the times are a pain to convert to your loca timezone - we provided the times in UTC - a universal time standard for confusing everyone about what UTC actually is :P
[19:09] <jono> (3) IRC is very static - it is just text, and delivering other content, particularly visual content is difficult
[19:10] <jono> for a little while I was thinking it could be cool to have a simple Python app that solved these problems and at the last Ubuntu Developer Summit I shared my idea for this app in a session
[19:10] <jono> on the flight back from Dallas to California I decided to start writing it, created a first version and blogged it at http://www.jonobacon.org/2009/11/25/introducing-lernid/
[19:11] <jono> I created Lernid using Quickly, and this first cut literally just solved the problem (1) above - it provided a window divided into three sessions where you could see the web page for the event and two embedded chat channels - one for #ubuntu-classroom (in the interface as Classroom) and one for #ubuntu-classroom-chat (in the interface as Chatroom)
[19:11] <jono> this early version already made it really easy to connect - when you connect in Lernid you see the connect dialog as in http://farm5.static.flickr.com/4059/4409336396_dfe1636ae3_o.jpg
[19:12] <jono> what this does it grab a .lernid config file from the server (currently set to jonobacon.org) and this config file has a series of details about a given event - this includes:
[19:12] <jono>  * the name of the event
[19:13] <jono>  * a link to an ical file which contains the details about each event
[19:13] <jono>  * the start and end times for the event
[19:13] <jono> * the classroom IRC channel
[19:13] <jono>  * the chat IRC channel
[19:13] <jono> and.....
[19:13] <jono> *drum roll*
[19:13] <jono>  * a webpage that describes the event
[19:14] <jono> this config file is downloaded using the urllib python module and then the config is parsed using the ConfigParser python module - this then gives us some data about the event and tells us which IRC channels to connect to
[19:14] <jono> the window was divided into the three areas and embedded three webkit widgets - this is a module you can use to display web pages
[19:15] <jono> at first I embedded the freenode web IRC interface and pointed it at the relevant IRC channels
[19:15] <jono> the next step was to provide support to display the scheduled set of events in Lernid - such as in http://farm5.static.flickr.com/4003/4409336490_ba709363d3_o.jpg
[19:15] <jono> to do this I created a Google Calendar for the events and added a bunch of events and then used the urllib Python module to download the ical file and the vobject Python library to parse it and grab the interesting bits of data - vobject is a great way to grab data out of calendar feeds
[19:16] <jono> I then used the time and datetime Python modules to convert the events (which had their times specified in UTC) and convert them to the local timezone (in my case GMT-8) - I then created a gtk.TreeView widget to display this list of events, complete with the local timezone times
[19:17] <jono> this instantly made Lernid a useful app - now you could connect to an event by simply selecting it from a combo box, see the IRC channels instantly and see what events were schedule with your local timezone applied
[19:17] <jono> I then added notification bubble support so a little notify-osd bubble pops up when an event is starting and 10mins before an event started
[19:18] <jono> to do this I used the pynotify Python module and set the times for when the bubbles should pop using the idle_time() function in PyGTK - this lets you schedule something to happen
[19:18] <jono> the next step in my head was to add support for slides
[19:19] <jono> my thinking was that if we could deliver slides in a session it could really raise the interactivity of a given session
[19:19] <jono> I was really keen to make it really simple for session leaders to provide slides, so I wanted them to be able to provide a .pdf
[19:19] <jono> then ideally Lernid could display the slides one at a time
[19:20] <jono> the way this works is that a slide can be triggered in lernid by the session leader typing in [SLIDE 1]
[19:20] <jono> this will then display the very first slide
[19:20] <jono> the session leader then just specifies the slide number and slides appear in real-time in Lernid
[19:20] <jono> for this to work, a 'Slides' line is added to the ical feed
[19:20] <jono> this points to a location where the pdf lives
[19:21] <jono> please folks, don't flood -chat
[19:21] <jono> I will wait until the spamming stops
[19:23] <jono> so the slides are on a server, we then use the urllib module to download the slides and the poppler module takes the pdf and breaks them into a collection of .jpg files - I then added a listener to the IRC window that listens for the [SLIDE] line and displays the relavent .jpg in the window
[19:23] <jono> simple as that
[19:24] <jono> I forgot to mention that in the meantime I wanted to make the IRC panes a lot more native - embedded freenode webchat pages sucked
[19:24] <jono> so, I had a chat with the telepathy folks (they make the telepathy framework which powers empathy and is seen as the next gen GNOME messaging backend) and they have IRC support
[19:25] <jono> so I used this module to have a native widget - telepathy dealt with making the connection and getting the content, and then I just displayed it in the widget
[19:25] <jono> at this point I kicked out a release and people started using Lernid for actual events
[19:26] <jono> I then wanted to have real-time webpages load
[19:26] <jono> we already had an embedded web browser, so I just added a listener for websites that start in http
[19:26] <jono> this would then grab the URL and feed it to the webkit based webbrowser
[19:27] <jono> I added an additional combo box and reload and back buttons to allow people to look at previous pages and controls them a little
[19:27] <jono> with this, I kicked out a release
[19:27] <jono> I now considered Lernid mostly completed for what I wanted
[19:27] <jono> the next step was to make it available in everyone's language
[19:28] <jono> David Planella on my team helped add support for translations to the code, and when this support is in there, translators across the internet can use rosetta to translate the app and the translations are automatically imported into Lernid
[19:28] <jono> I added this functionality and tweeted a call for translators
[19:29] <jono> within a few hours it was fully translated into 16 languages
[19:29] <jono> you can see the list of translations at https://translations.edge.launchpad.net/lernid
[19:30] <jono> Rosetta is an absolutely stunning tool for this - any app can benefit from this - you add support for translations and then open it up to a bunch of people who have never needed to or want to write code, but love to translate
[19:30] <jono> David gave a session a few days back on how to hot rod your app for translations, so I recommend you check out the log
[19:30] <jono> now the project was moving along swiftly
[19:31] <jono> people were really interested in it and it was used for real events
[19:31] <jono> we then had a patch to add a terminal view - http://farm5.static.flickr.com/4049/4409336512_cc6c658a6e_o.jpg
[19:31] <jono> with Lernid being used a lot for computer-related events, it made sense
[19:31] <jono> the terminal is embedded using the python-vte module
[19:32] <jono> it is really simple to use - there is a great example in Acire if you want to use it
[19:32] <jono> more details on Acire and Python Snippets are at https://wiki.ubuntu.com/PythonSnippets
[19:32] <jono> at this point I was busy with a few other tools and I had got Lernid to the point where I wanted it, so it was time for me to do the right thing and hand over leadership of the project to someone else
[19:33] <jono> I am a firm believer that good leaders step down when they know they cannot commit the time needed, so I evaluated the Lernid developer community and there was a clear candidate for a replacement
[19:33] <jono> Michael Budde
[19:33] <jono> mbudde to us all
[19:33] <jono> that man is a total, total rock star
[19:34] <jono> he brought so much quality and value to Lernid, and taken much of my shonky code and written it right :)
[19:34] <jono> mbudde has brought a new level of detail and polish to the app and done a great job
[19:34] <jono> if you would like to contribute to Lernid, be sure to ping him, I am sure he would love to talk to you
[19:35] <jono> the final feature I asked mbudde to add for the current release which I didn't have time to work on due to travel is the tweeting feature found in the event menu - http://farm5.static.flickr.com/4013/4408570373_367df728da_o.jpg
[19:35] <jono> I had this idea that when a session is running there should be a one click way to tweet, dent, Facebook it etc
[19:35] <jono> fortunately, Lucid ships with the rocking Gwibber API
[19:36] <jono> this makes microblogging from your app *really* simple
[19:36] <jono> again, there is a snippet that explains how to do this in Acire - see https://wiki.ubuntu.com/PythonSnippets for details
[19:36] <jono> it is literally about three lines of Python
[19:36] <jono> this is a great way to spread the word about events and much more
[19:37] <jono> so there we have it, that is the story of Lernid - I hope it provided some useful tips and insight on making an app, scratching an itch and sharing some cool Python modules you may have not heard of
[19:37] <jono> any questions?
 QUESTION: is lernid used outside of Ubuntu Weeks?
[19:38] <jono> quappa1, it sure can be, and is :)
 QUESTION: for Lernid, how much did you use Glade,and how much GUI code did you have to write yourself?
[19:39] <jono> mhall119: it uses Glade extensively - some GUI code that needs to be written (such as the treeviews) is in there
 QUESTION: Does Learnid have special tools to session leaders?
[19:39] <jono> w1ngnutz, not yet, but it is planned I believe
 QUESTION: PLans to add audio and video?
[19:40] <jono> w1ngnutz, no idea, I think it is technically possible, but incredibly complex
[19:41] <jono> in my view, Lernid is awesome because it is low bandwidth
[19:41] <jono> so people in developing nations as an example, can connect
 Does acire have a simple text search to look for say "gwibber" in python-snippets?
[19:42] <jono> not yet, it is planned - but it does list snippets by category
 QUESTION: How long is development time for an app such as this? In other words, how long did it take for you to push it for widespread use following the time you started writing it on the plane?
[19:42] <jono> raven_99, I wrote the first cut in a few days
[19:42] <jono> to get it to where it is - I would say a few months of spare time work
[19:42] <jono> not a lot of time by any stretch
 QUESTION: How many coding hours (roughly) are spent on Lernid so far?
[19:43] <jono> difficult to tell, I would say up until the point where slides were added (including slides) - probably about 20 hours
 QUESTION: How many lines of code in Lernid so far?
[19:43] <jono> no idea, mbudde can let you know that
 QUESTION: you have more ideas for e-learning/e-teaching stuff like this?
[19:44] <jono> w1ngnutz, indeed, but most of my key ideas are now in Lernid
[19:44] <jono> one of the challenges that Lernid will face is that it is a haven for ideas, but we should never comprimise the simplicity of Lernid
[19:44] <jono> the whole point is that it is really easy to use
[19:44] <jono> :)
[19:46] <jono> before I finish
[19:46] <jono> one final thing
[19:46] <jono> when I announced Ubuntu Opportunistic Developer Week, I announced a challenge too
[19:47] <jono> http://www.jonobacon.org/2010/02/25/the-grand-app-writing-challenge/
[19:47] <jono> the basic goal is to write some apps this week and I am writing up a blog entry to report progress
[19:47] <jono> I am writing this blog today, so if you have app you wrote this week that you want features, email me ASAP with the details
[19:47] <jono> jono AT ubuntu DOT com
[19:47] <jono> I am writing the blog in the next few hours
 QUESTION: did you get a lot of entries already?
[19:48] <jono> yep, some great entries :)
[19:48] <jono> and finally, don't forget that a great place to join the opportunistic developer community in Ubuntu in #ubuntu-app-devel on freenode
[19:48] <jono> come and join us, unlock your creativity with writing cool apps and have lots of fun too :)
[19:48] <jono> ok, folks, thanks for joining me!
[19:49] <jono> have a wonderful weekend!
[20:01] <seg|ars> Hello!
[20:01] <seg|ars> I'm going to be discussing application development with WebKit
[20:02] <seg|ars> For those who don't already know, WebKit is an HTML rendering engine that is developed by Apple. It was originally based on KDE's KHTML renderer
[20:02] <seg|ars> WebKit is lightweight and easy to embed, which makes it useful for integrating HTML rendering capabilities into conventional desktop applications
[20:03] <seg|ars> There is a Gtk+ variant of WebKit that uses Cairo for drawing and can be used seamlessly in standard Gtk+ and GNOME programs
[20:04] <seg|ars> It's really easy to use if you want to display a web page in your application
[20:04] <seg|ars> but it's also increasingly useful for building rich user interfaces
[20:05] <seg|ars> If you want to present content in more dynamic way in your application, HTML can sometimes be a very compelling shortcut
[20:05] <seg|ars> Making a custom Gtk+ widget can be hard, but writing HTML is very easy
[20:06] <seg|ars> Gwibber, my open source microblogging client, uses WebKit and HTML for several aspects of its user interface
[20:06] <seg|ars> http://s3.amazonaws.com/scrnshots.com/screenshots/225884/gwibber-230png
[20:07] <seg|ars> The main message stream in Gwibber is rendered with HTML, allowing us to have sophisticated theming
[20:07] <seg|ars> But that's not the only part that's HTML. The new sidebar and the target bar at the bottom of the window are also rendered with WebKit
[20:08] <seg|ars> WebKit supports some really sophisticated CSS features that make it conducive to interface design
[20:09] <seg|ars> For example, it supports CSS gradients, transparency, reflections, and even animated transitions
[20:09] <seg|ars> You can see several of those features in the previous screenshot
[20:11] <seg|ars> The Gtk+ port of WebKit is maintained by the WebKitGtk+ developers: http://webkitgtk.org/
[20:11] <seg|ars> the port is under very heavy active development and is gaining new features with every release
[20:12] <seg|ars> Some of the key stakeholders in the porting effort recently gathered for a hackfest where they worked on some key improvements
[20:12] <seg|ars> You can find more details about the hackfest here: http://arstechnica.com/open-source/news/2010/01/webkitgtk-hackfest-improves-html-renderer-for-gnome-apps.ars
[20:13] <seg|ars> They are adding a lot of great HTML5 features, such as HTML5 video playback via GStreamer.
[20:14] <seg|ars> You can use WebKitGtk+ in several different programming languages thanks to the availability of bindings
[20:14] <seg|ars> Python is my programming language of choice, so that's what we will be using for the code examples during this session
[20:15] <seg|ars> The Python bindings are available through the PyWebKitGtk project: http://code.google.com/p/pywebkitgtk/
[20:16] <seg|ars> The lead developer behind that project recently halted activate maintenance, so those bindings will not be used much in the future
[20:16] <seg|ars> PyGi, which provides Python bindings to Gtk+ libraries through GObject-introspection, will be used in the future
[20:16] <seg|ars> PyGi is already largely usable, but it wasn't quite mature enough yet for us to use in an LTS release
[20:17] <seg|ars> As such, Gwibber still uses the conventional PyWebKitGtk+ bindings in Lucid but will be using PyGi in the next major release
[20:17] <seg|ars> Fortunately, it's not that difficult to switch from one to the other. In fact, you can write code that supports both, as I will demonstrate later
[20:18] <seg|ars> In our first code example, you can see how to instantiate a WebKit widget and embed it into a Gtk+ application: http://gist.github.com/323077
[20:19] <seg|ars> The line "web = webkit.WebView()" will create the WebKit renderer
[20:19] <seg|ars> You can use the WebView widget's "open" method to cause it to load a web page
[20:20] <seg|ars> in the example, the WebView is embedded in a ScrolledWindow so that the user can scroll around the content
[20:20] <seg|ars> Notice the gtk.gdk.threads_init() call at the beginning of the script. You need to do that *before* you instantiate a WebView, otherwise the program will crash
[20:21] <seg|ars> That code snippet is all you need if you just want to embed a web page in your application
[20:21] <seg|ars> But there are also many cases where you want to generate the HTML yourself, like we do in Gwibber
[20:21] <seg|ars> to make the WebKit renderer display your own HTML, you use the load_html_string method.
[20:22] <seg|ars> web = webkit.WebView(); web.load_html_string("<p>test</p>", "file:///")
[20:22] <seg|ars> The first parameter is an HTML string that you want to display in the renderer
[20:22] <seg|ars> The second parameter is the base path that you want to use for the html content
[20:23] <seg|ars> specifying a specific base path can be useful if you want to include images or other content in the html using relative paths
[20:23] <seg|ars> When you use WebKit to make a user interface, there are several tricks that you can use to make the experience more seamless
[20:23] <seg|ars> This code example demonstrates several of those tricks: http://gist.github.com/323080
[20:24] <seg|ars> By default, an image that is embedded in a WebView widget can be dragged around the screen and out of the program
[20:24] <seg|ars> You can actually see this in action if you open up the software center and start dragging the big icons in the main pane
[20:24] <seg|ars> That's obviously an undesirable behavior in a regular user interface
[20:24] <seg|ars> Fortunately, WebKit has a custom CSS attribute for controlling that behavior
[20:25] <seg|ars> if you set "-webkit-user-drag: none;" on your images, they will not be draggable
[20:25] <seg|ars> we had to do that to avoid issues in the Gwibber navigation bar
[20:25] <seg|ars> Another similar issue is that all content in a WebView is selectable, just like text content in a browser
[20:26] <seg|ars> that might not be desirable on something like a button label
[20:26] <seg|ars> when you want to inhibit text selection of content in a WebView, you can apply "-webkit-user-select: none" in the css
[20:27] <seg|ars> You can see both of those in the code example that I pasted
[20:27] <seg|ars> If you run that code, it will display a button with a shiny gradient and an icon
[20:27] <seg|ars> The user-select and user-drag CSS attributes are used to make it so that the icon can't be dragged or text-selected
[20:29] <seg|ars> When you use WebKit in a Gtk+ application, you will probably want to make it use colors from the user's Gtk+ theme
[20:29] <seg|ars> we do that for the navigation elements in Gwibber so that they fit better with the rest of the program
[20:29] <seg|ars> for example, it's really important to make sure that the background of the web page matches the color of the user's gtk window background
[20:29] <seg|ars> You can see how to do that in the last code example
[20:30] <seg|ars> In the HTML, we use string interpolation so we can programmatically set a custom value for the page "background" attribute
[20:30] <seg|ars> In the Python part of the code, you can see a line where we get the background color and assign it to the "bgcolor" variable
[20:31] <seg|ars> You can extract style information from any gtk widget by using w.get_style()
[20:31] <seg|ars> to get the background, we do "w.get_style().bg[gtk.STATE_NORMAL]"
[20:31] <seg|ars> The state part tells Gtk+ what state you want to get the color from
[20:31] <seg|ars> if you wanted to get the selection color, for example, you could use gtk.STATE_SELECTED
[20:32] <seg|ars> In addition to "bg" you can also get the foreground ("fg") and text colors ("text")
[20:32] <seg|ars> QUESTION: What does WebView refer to exactly? Rendering of any url, or any piece of html code? I'm confused.
[20:33] <seg|ars> The WebView is a WebKit rendering widget. It's like an HTML renderer that you can plop into a Gtk+ application
[20:33] <seg|ars> you can use it to load either a remote url or to display any specified html content
[20:34] <seg|ars> ok, back to the color setting
[20:34] <seg|ars> In the code example, we use "%s" as a placeholder in the html code to denote the place where we are going to insert the color data
[20:35] <seg|ars> when we apply the html, we use "html % bgcolor", which will replace that "%s" with the actual value of the bgcolor variable
[20:36] <seg|ars> if you were going to programmatically set multiple values in various places in the html, you can use a more sophisticated approach like Python's string "Format" method. It will let you do more complex interpolation and value replacement
[20:36] <seg|ars> In Gwibber, we needed even more control over the html
[20:36] <seg|ars> we use a template engine called Mako that lets you generate HTML with bits of code interspersed
[20:36] <seg|ars> You can learn more about Mako here: http://www.makotemplates.org/
[20:37] <seg|ars> Mako is really great for theming because you can create a set of programmable templates that can be inherited and overridden
[20:37] <seg|ars> In Gwibber, we supply a base template that defines functions for rendering all of the items in the message stream. Each theme inherits that base template and overrides parts of it to create their own desired look and feel
[20:38] <seg|ars> This is what the Gwibber base template looks like: http://bazaar.launchpad.net/~gwibber-committers/gwibber/trunk/annotate/head%3A/ui/templates/base.mako
[20:39] <seg|ars> You can also do some programming in the HTML itself
[20:39] <seg|ars> in Gwibber, for example, we use the jquery library to make it so that the user can expand grouped messages. It has a nice animated transition
[20:39] <seg|ars> Using jquery in embedded HTML can be really useful for building a rich UI
[20:40] <seg|ars> One of the big challenges of using an embedded HTML renderer in a Gtk+ application is facilitating communication between the contents of the HTML and the outside program
[20:40] <seg|ars> you want your program to be able to respond to click events inside of the html
[20:41] <seg|ars> In our code example (http://gist.github.com/323080) we use navigation events to do that
[20:41] <seg|ars> You can see that the button in the html is wrapped in an "a" tag that points to "program:/test" as its URL
[20:42] <seg|ars> What I tend to do when I want to detect a click event in WebKit is intercept all navigation events and filter the ones that have a pre-determined prefix
[20:42] <seg|ars> in the code example, the on_click_link function gets bound to the "navigation-requested" event
[20:43] <seg|ars> web.connect("navigation-requested", on_click_link)
[20:43] <seg|ars> what this means is that any time something causes a navigation action in the WebView, like if somebody clicks a link, that Python function will be called
[20:44] <seg|ars> In the Python function, we analyze the URI to see if it starts with "program:/"
[20:44] <seg|ars> when it does, we look at what the rest of it says and then we perform whatever action
[20:44] <seg|ars> you could have a set of if/elif checks on the value of the rest of the URI after "program:/" to determine exactly what the program should do
[20:45] <seg|ars> for example, in Gwibber, clicking the reply icon in a message bubble will load the url "gwibber:/reply?msg=${msgid}"
[20:46] <seg|ars> The template library is used to replace the ${msgid} part with the actual id of the individual message
[20:47] <seg|ars> when the user clicks that icon, the python side of the program will detect it and then execute gwibber's reply function with the specified id value as a parameter
[20:47] <seg|ars> QUESTION: navigation-requested is a webkit event, right?
[20:47] <seg|ars> yes, navigation-requested is a webkit event
[20:47] <seg|ars> By default, if you don't set a function to the navigation-requested signal, clicking a link will cause the url to load inside of the WebView
[20:48] <seg|ars> in most cases where we are using WebKit for a user interface, we want to capture those clicks to perform an event and we want regular links to load in the user's external browser
[20:49] <seg|ars> You can see that in action in the code example. When the URI doesn't match "program:/" or anything else we are tracking, we just pass the whole thing to python's "webbrowser.open" method so that it will launch in the user's browser
[20:50] <seg|ars> As you can see, using WebKit makes interaction a little bit more complex, but you get a tremendous amount of control over how content is presented
[20:50] <seg|ars> and it's great for rapid development because it's often easier to write HTML than to build a real Gtk+ UI
[20:50] <seg|ars> now for some questions before we finish up
[20:50] <seg|ars> QUESTION: How do I refresh a webkit display?  Say a website pane that displays the weather.
[20:51] <seg|ars> The WebView has a reload method that you can use to get it to refresh the current contents
[20:51] <seg|ars> If you wanted to do it on an interval, you would use something like gtk.timeout_add
[20:51] <seg|ars> and then you could just call the refresh every time the timeout hits
[20:52] <seg|ars> If you are setting the HTML yourself, refreshing will cause the contents to disappear
[20:52] <seg|ars> so if you are using your own html, you just have to set the content with load_html_string every time you want to refresh it
[20:53] <seg|ars> QUESTION: can you embed JS too? You mentioned JQuery, what about JS?
[20:54] <seg|ars> Yes, it works just like JavaScript in a regular web page
[20:54] <seg|ars> if you are generating your own html, you can include a script block that defines JavaScript functions
[20:54] <seg|ars> you can also externally cause the WebView to run any arbitrary JavaScript code by using the "execute_script" method
[20:54] <seg|ars> if you pass it javascript code in a string, it will just work
[20:55] <seg|ars> You can seen an example of how I use JavaScript with Mako in the Gwibber navigation bar: http://bazaar.launchpad.net/~gwibber-committers/gwibber/trunk/annotate/head%3A/ui/templates/navigation.mako
[20:56] <seg|ars> QUESTION: In Gwibber for example, how do you attach the latest content? Reload everything or you just add the new info to the end? Is the 2nd option possible?
[20:56] <seg|ars> In Gwibber, we regenerate the entire stream. We do that primarily because we need to update the timestamps in addition to adding new messages
[20:57] <seg|ars> if you wanted to just add a new bit of content at the top, for example, you could actually do that with javascript
[20:57] <seg|ars> in the very early days of gwibber, we would take the message data and convert it into a json string which was then passed to a JavaScript function in the HTML
[20:57] <seg|ars> the JavaScript function would process the json, generate the HTML for the message blocks, and then inject that directly into the page
[20:58] <seg|ars> That approach proved to be a bit difficult and slow with highly complex data, but I think it would probably work better now
[20:58] <seg|ars> WebKitGtk+ was quite brittle a few years ago when I first started using it
[20:58] <seg|ars> it's a lot more robust today and it's javascript handling is more reliable
[20:58] <seg|ars> QUESTION: Since all these frameworks are undergoing rapid development, how do I keep my new application from breaking in a month?
[20:59] <seg|ars> that can be very difficult. One of the biggest problems we have had in Gwibber is that WebKitGtk+ is a moving target and different versions render things in slightly different ways
[20:59] <seg|ars> if you are going to be targeting a wide range of distros including some with very old webkit, you will need to keep the html VERY simple and avoid using scripting
[20:59] <seg|ars> it has stabilized a lot, so it's not as much of a problem as it used to be
[21:19] <Edwin_ACH> hi jcastro do you know if there is exist a irc log about past classes?
[21:19] <ausimage> yes
[21:20] <ausimage> there are linked from the schedule
[21:20] <Edwin_ACH> thanx ausimage!! Where can I find them?
[21:20] <ausimage> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek
[21:20] <ausimage> click on the session and it takes you to a log
[21:22] <Edwin_ACH> thank you ausimage!!! I have found them :)
[21:22] <ausimage> cool
[22:55] <Edwin_ACH> thank you for the links ausimage!!!
[22:55] <ausimage> np
[22:55] <Edwin_ACH> for people like you, Ubuntu is going on growing!!! :)
[22:55] <Edwin_ACH> bye...
[22:55] <ausimage> :D