Ubuntu Opportunistic Developers Week March 2010 - SHOWCASE: Lernid - Jono Bacon - Mar 5 2010

(02:02:31 PM) jono: ahh!
(02:02:37 PM) jono: hey all!
(02:02:48 PM) jono: sorry some nick problems there
(02:02:52 PM) jono: I am a numpty!
(02:03:11 PM) jono: ok folks, if in Lernid and on Lucid - click Event -> Tweet this session :)
(02:03:31 PM) jono: ok lets get started
(02:03:35 PM) jono: how is everyone today?!
(02:04:08 PM) jono: hi all! my name is Jono Bacon and I am the Ubuntu Community Manager
(02:04:16 PM) jono: welcome to my Lernid showcase session
(02:04:33 PM) 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
(02:04:49 PM) jono: so, what is Lernid?
(02:05:06 PM) 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
(02:05:37 PM) jono: who is using Lernid to view this now?
(02:05:47 PM) jono: give me a o/ in the chat channel if you
(02:05:51 PM) jono: are
(02:06:21 PM) jono: sweet! :)
(02:06:26 PM) jono: that makes me smile
(02:06:36 PM) 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
(02:07:03 PM) jono: click the Session tab to see the web pages as I post them
(02:07:08 PM) 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
(02:07:30 PM) 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
(02:07:57 PM) jono: it went down really well and lots of new folks joined our community
(02:08:07 PM) jono: we then created Ubuntu Developer Week: a similar event but more specifically aimed at technical topics and packaging work in Ubuntu
(02:08:31 PM) jono: <tgalati4> QUESTION: How much beer did it cost you?
(02:08:33 PM) jono: none :)
(02:08:40 PM) jono: <tgalati4> QUESTION: How much beer did it cost you?
(02:08:41 PM) jono: oops
(02:08:46 PM) jono: we have done this every cycle for three years, but a few things niggled me about it - namely:
(02:09:04 PM) 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
(02:09:23 PM) 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
(02:09:44 PM) jono: (3) IRC is very static - it is just text, and delivering other content, particularly visual content is difficult
(02:10:09 PM) 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
(02:10:40 PM) 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/
(02:11:20 PM) 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)
(02:11:54 PM) 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
(02:12:28 PM) 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:
(02:12:48 PM) jono:  * the name of the event
(02:13:08 PM) jono:  * a link to an ical file which contains the details about each event
(02:13:16 PM) jono:  * the start and end times for the event
(02:13:24 PM) jono: * the classroom IRC channel
(02:13:33 PM) jono:  * the chat IRC channel
(02:13:42 PM) jono: and.....
(02:13:45 PM) jono: *drum roll*
(02:13:48 PM) jono:  * a webpage that describes the event
(02:14:17 PM) 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
(02:14:42 PM) 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
(02:15:06 PM) jono: at first I embedded the freenode web IRC interface and pointed it at the relevant IRC channels
(02:15:38 PM) 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
(02:15:59 PM) 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
(02:16:40 PM) 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
(02:17:14 PM) 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
(02:17:49 PM) 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
(02:18:14 PM) 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
(02:18:43 PM) jono: the next step in my head was to add support for slides
(02:19:11 PM) jono: my thinking was that if we could deliver slides in a session it could really raise the interactivity of a given session
(02:19:34 PM) 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
(02:19:45 PM) jono: then ideally Lernid could display the slides one at a time
(02:20:03 PM) jono: the way this works is that a slide can be triggered in lernid by the session leader typing in [SLIDE 1]
(02:20:14 PM) jono: this will then display the very first slide
(02:20:33 PM) jono: the session leader then just specifies the slide number and slides appear in real-time in Lernid
(02:20:51 PM) jono: for this to work, a 'Slides' line is added to the ical feed
(02:20:59 PM) jono: this points to a location where the pdf lives
(02:21:36 PM) jono: please folks, don't flood -chat
(02:21:45 PM) jono: I will wait until the spamming stops
(02:23:27 PM) 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
(02:23:31 PM) jono: simple as that
(02:24:15 PM) 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
(02:24:47 PM) 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
(02:25:27 PM) 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
(02:25:54 PM) jono: at this point I kicked out a release and people started using Lernid for actual events
(02:26:06 PM) jono: I then wanted to have real-time webpages load
(02:26:27 PM) jono: we already had an embedded web browser, so I just added a listener for websites that start in http
(02:26:42 PM) jono: this would then grab the URL and feed it to the webkit based webbrowser
(02:27:04 PM) 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
(02:27:16 PM) jono: with this, I kicked out a release
(02:27:34 PM) jono: I now considered Lernid mostly completed for what I wanted
(02:27:46 PM) jono: the next step was to make it available in everyone's language
(02:28:26 PM) 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
(02:28:59 PM) jono: I added this functionality and tweeted a call for translators
(02:29:08 PM) jono: within a few hours it was fully translated into 16 languages
(02:29:23 PM) jono: you can see the list of translations at https://translations.edge.launchpad.net/lernid
(02:30:03 PM) 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
(02:30:29 PM) 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
(02:30:51 PM) jono: now the project was moving along swiftly
(02:31:02 PM) jono: people were really interested in it and it was used for real events
(02:31:11 PM) jono: we then had a patch to add a terminal view - http://farm5.static.flickr.com/4049/4409336512_cc6c658a6e_o.jpg
(02:31:29 PM) jono: with Lernid being used a lot for computer-related events, it made sense
(02:31:53 PM) jono: the terminal is embedded using the python-vte module
(02:32:08 PM) jono: it is really simple to use - there is a great example in Acire if you want to use it
(02:32:19 PM) jono: more details on Acire and Python Snippets are at https://wiki.ubuntu.com/PythonSnippets
(02:32:57 PM) 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
(02:33:28 PM) 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
(02:33:31 PM) jono: Michael Budde
(02:33:35 PM) jono: mbudde to us all
(02:33:41 PM) jono: that man is a total, total rock star
(02:34:00 PM) jono: he brought so much quality and value to Lernid, and taken much of my shonky code and written it right :)
(02:34:23 PM) jono: mbudde has brought a new level of detail and polish to the app and done a great job
(02:34:39 PM) jono: if you would like to contribute to Lernid, be sure to ping him, I am sure he would love to talk to you
(02:35:15 PM) 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
(02:35:40 PM) jono: I had this idea that when a session is running there should be a one click way to tweet, dent, Facebook it etc
(02:35:58 PM) jono: fortunately, Lucid ships with the rocking Gwibber API
(02:36:11 PM) jono: this makes microblogging from your app *really* simple
(02:36:32 PM) jono: again, there is a snippet that explains how to do this in Acire - see https://wiki.ubuntu.com/PythonSnippets for details
(02:36:41 PM) jono: it is literally about three lines of Python
(02:36:58 PM) jono: this is a great way to spread the word about events and much more
(02:37:47 PM) 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
(02:37:53 PM) jono: any questions?
(02:38:28 PM) jono: <quappa1> QUESTION: is lernid used outside of Ubuntu Weeks?
(02:38:38 PM) jono: quappa1, it sure can be, and is :)
(02:38:47 PM) jono: <mhall119> QUESTION: for Lernid, how much did you use Glade,and how much GUI code did you have to write yourself?
(02:39:14 PM) jono: mhall119: it uses Glade extensively - some GUI code that needs to be written (such as the treeviews) is in there
(02:39:30 PM) jono: <w1ngnutz> QUESTION: Does Learnid have special tools to session leaders?
(02:39:37 PM) jono: w1ngnutz, not yet, but it is planned I believe
(02:40:38 PM) jono: <w1ngnutz> QUESTION: PLans to add audio and video?
(02:40:51 PM) jono: w1ngnutz, no idea, I think it is technically possible, but incredibly complex
(02:41:03 PM) jono: in my view, Lernid is awesome because it is low bandwidth
(02:41:14 PM) jono: so people in developing nations as an example, can connect
(02:41:54 PM) jono: <tgalati4> Does acire have a simple text search to look for say "gwibber" in python-snippets?
(02:42:05 PM) jono: not yet, it is planned - but it does list snippets by category
(02:42:21 PM) jono: <raven_99> 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?
(02:42:33 PM) jono: raven_99, I wrote the first cut in a few days
(02:42:43 PM) jono: to get it to where it is - I would say a few months of spare time work
(02:42:48 PM) jono: not a lot of time by any stretch
(02:43:00 PM) jono: <KennethP88> QUESTION: How many coding hours (roughly) are spent on Lernid so far?
(02:43:32 PM) jono: difficult to tell, I would say up until the point where slides were added (including slides) - probably about 20 hours
(02:43:42 PM) jono: <tgalati4> QUESTION: How many lines of code in Lernid so far?
(02:43:47 PM) jono: no idea, mbudde can let you know that
(02:43:55 PM) jono: <w1ngnutz> QUESTION: you have more ideas for e-learning/e-teaching stuff like this?
(02:44:08 PM) jono: w1ngnutz, indeed, but most of my key ideas are now in Lernid
(02:44:32 PM) 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
(02:44:38 PM) jono: the whole point is that it is really easy to use
(02:44:39 PM) jono: :)
(02:46:20 PM) jono: before I finish
(02:46:23 PM) jono: one final thing
(02:46:54 PM) jono: when I announced Ubuntu Opportunistic Developer Week, I announced a challenge too
(02:47:00 PM) jono: http://www.jonobacon.org/2010/02/25/the-grand-app-writing-challenge/
(02:47:18 PM) jono: the basic goal is to write some apps this week and I am writing up a blog entry to report progress
(02:47:39 PM) 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
(02:47:44 PM) jono: jono AT ubuntu DOT com
(02:47:59 PM) jono: I am writing the blog in the next few hours
(02:48:07 PM) jono: <titeuf_87> QUESTION: did you get a lot of entries already?
(02:48:12 PM) jono: yep, some great entries :)
(02:48:36 PM) jono: and finally, don't forget that a great place to join the opportunistic developer community in Ubuntu in #ubuntu-app-devel on freenode
(02:48:53 PM) jono: come and join us, unlock your creativity with writing cool apps and have lots of fun too :)
(02:48:58 PM) jono: ok, folks, thanks for joining me!
(02:49:03 PM) jono: have a wonderful weekend!

MeetingLogs/OpWeek1003/Lernid (last edited 2010-03-05 20:46:29 by pool-71-182-100-128)