[07:04] <jono> [SLIDE 1]
[07:05] <jono> [SLIDE 1]
[07:05] <persia> jono: Please also advertise a URL of your slides for those not using lernid :)
[07:05] <jono> testing
[07:05] <persia> (or make lernid do this at class start)
[07:05] <jono> persia, will do
[07:05] <jono> just testing right now
[07:05] <jono> [SLIDE 1]
[07:05] <persia> Cool!
[07:06] <jono> [SLIDE 2]
[07:06] <jono> [SLIDE 3]
[07:06] <jono> [SLIDE 1]
[07:06] <jono> all seems to be working :-)
[14:01] <mhall119|work> test
[14:02] <sfsoc> mhall119|work: yes
[14:03] <mhall119|work> sorry, seeing if Lernid works
[14:03] <mhall119|work> I had to setup an SSH tunnel and change my /etc/hosts file
[14:04] <mhall119|work> but finally I can enjoy lernid from work
[14:04] <Wesss> Hi All, Ubuntu class had a session on Python for beginners last week, do you know where I can look at that session?
[14:05] <gotik_> http://irclogs.ubuntu.com/
[14:05] <gotik_> which day was the python session?
[14:06] <Wesss> no sure if it was last thursday or friday
[14:06] <mhall119|work> the 25th
[14:07] <gotik_> thanks
[14:08] <Wesss> found it.. tnx gotik
[14:16] <wharp> mhall119|work: what did you change your hosts file to get lernid to tunnel?
[14:19] <mhall119|work> wharp: I did ssh -L 6667:irc.freenode.net:6667 $myserver
[14:19] <mhall119|work> then I had to set 127.0.0.1 as irc.freenode.net in /etc/hosts
[14:20] <mhall119|work> so when Lernid connects to irc.freenode.net:6667, it connets to localhost:6667, which tunnels to the real irc.freenode.net:6667
[14:20] <wharp> huh, that's not how I've done it in the past, but then again, I can't get it working atm so what do I know
[14:22] <mhall119|work> because irc.freennode.net is hard coded in lernid, and port 6667 is assumed from somewhere (I couldn't figure out how to set a specific ip)
[14:22] <mhall119|work> I did it this was
[14:22] <mhall119|work> way
[14:23] <hemanth> Permission denied (publickey).!
[14:23] <mhall119|work> hemanth: you need to have ssh access to $myserver
[14:24] <mhall119|work> for that matter, you need to have a server, $myserver is a placeholder
[14:25] <hemanth> are there any open severs? yes i know abut that access, as my machine is an ssh server with dydns as of now
[14:25] <mhall119|work> I don't know of any open servers, no
[14:26] <mhall119|work> if you can ssh to your server, that would work
[14:26] <hemanth> mhall119|work,shh tunneling with gmail server worked for you?
[14:26] <mhall119|work> huh? ssh with gmail?
[14:27] <mhall119|work> I ssh into my webserver
[14:27] <wharp> ah, nice, it works, thanks mhall119|work
[14:28] <hemanth> mhall119|work, got it, but my asking another question like have you tried ssh to gmail
[14:28] <mhall119|work> nope
[14:29] <mhall119|work> I didn't think gmail offered that kind of access
[14:29] <hemanth> i had tried it once, but i do blv they have ssh thinge
[14:30] <mhall119|work> cool
[14:30] <mhall119|work> I had no idea
[14:32] <hemanth> 8001 can also be used ? like  ssh -L 8001:irc.freenode.net:8001 localhost, cos i m getting bind address already in use, as i'm connected to irc with another client
[14:32] <mhall119|work> not for the local port, Lernid assumes 6667
[14:33] <mhall119|work> but if freenode listens on port 8001, you should be able to do that
[14:33] <mhall119|work> unless you wanted to do some kind of iptables port forwarding
[14:34] <hemanth> what is achieved my tunnel actually ? in this scenario, i had tunneled to servers to achieve more stable connect for a longer duration
[14:34] <mhall119|work> but that would affect your other client too
[14:34] <mhall119|work> hemanth: at work I am behind a firewall that blocks IRC
[14:34] <mhall119|work> but the firewall doesn't block ssh
[14:34] <mhall119|work> so I can make an ssh tunnel to the outside of the firewall, and send IRC traffic over that tunnel
[14:35] <hemanth> mhall119|work, ha ha ok :) i missed the main part so was confused what was going on uber kool +1 to power of GNU/Linux
[14:36] <mhall119|work> yes, ssh==win all the time
[14:36] <hemanth> hacking==win==happy :)
[14:38] <hemanth> mhall119|work, found ssh for gmail ssh -g -L 5223:talk.google.com:5223 -N you@yourserver.com
[14:39] <mhall119|work> hemanth: I'll check that out, thanks
[14:39] <hemanth> mhall119|work, np :)
[15:12] <agbemenu> what's the topic
[15:12] <agbemenu> ?
[15:13] <mhall119|work> agbemenu: opening ceremonies start in ~ 45 minutes
[15:18] <keine-ahnung> test, if lernid opens every page, even if there is no session running: https://wiki.ubuntu.com/Lernid
[15:18] <keine-ahnung> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek
[15:31] <nonchipIRSSI> just testing irssi. http://www.google.de
[15:31] <nonchipIRSSI> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek
[15:56] <cjohnston|cell> Mornin
[15:56] <nonchipIRSSI> morning
[15:57] <cjohnston|cell> Me
[15:58] <jono> nearly there :)
[15:58] <cjohnston|cell> Hey jono
[15:59] <jono> :)
[16:00] <etrusco> nhandler_: hello. since you're in the Contacts page, what about adding a link in the wiki page to the irclogs of the sessions? ;)
[16:01] <jono> alright!
[16:01] <jono> lets just wait a min for late folks to join :)
[16:01] <jono> [SLIDE 1]
[16:01] <jono> Lernid folks, click on the Session tab to see the slides
[16:02] <jono> Lernid may go a little grey while it downloads the slides
[16:02] <jono> but it will come back :)
[16:03] <jono> ok, non Lernid folks can grab the slides at http://www.jonobacon.org/files/uodw-welcome.pdf
[16:03] <jono> welcome everyone to Ubuntu Opportunistic Developer Week! woooooooo!
[16:03] <jono> [SLIDE 1]
[16:04] <jono> click Session to see the slides folks
[16:04] <jono> I know a bunch of you, but some of you are new here, so let me first explain who I am
[16:04] <jono> my name is Jono Bacon and I am the Ubuntu Community Manager working at Canonical
[16:04] <jono> my job is to help grow a fun, productive and inspiring Ubuntu community: a place where we can all be together to celebrate an ethos, and work together to help build awesome software and community facilities around that ethos
[16:04] <jono> [SLIDE 2]
[16:04] <jono> Ubuntu is a way of life, a philosophy and an ideal: and being part of this incredible community is heaps of fun
[16:05] <jono> our community is a phenomenal place to be: this picture was taken at our Ubuntu Developer Summit (UDS) in Barcelona
[16:05] <jono> each UDS is where we get together to discuss, design and plan our next version of Ubuntu
[16:05] <jono> right now, we are working on this baby
[16:05] <jono> [SLIDE 3]
[16:05] <jono> Lucid.
[16:06] <jono> hehe I am cut and pasting to a part way through and then I start typig
[16:06] <jono> typing :)
[16:06] <jono> Ubuntu 10.04 Lucid Lynx will be the most exciting Ubuntu release in our history
[16:06] <jono> ...so far
[16:06] <jono> :)
[16:06] <jono> I think this release really defines who we are, where we have been and where we are going, and it packs some stunning features such as social networking build right into the desktop, incredible boot speed, refined look and feel, software center improvements, new apps and more
[16:07] <jono> so...Ubuntu Opportunistic Developer Week, let me explain the idea behind the event
[16:07] <jono> [SLIDE 4]
[16:07] <jono> Ubuntu is here to help people learn, create and interact
[16:07] <jono> when I first put these slides together, it was for a talk in LA that was doing at SCALE
[16:08] <jono> there I was throwing together a description of my talk, and the words "learn, create and interact" just popped into my head
[16:08] <jono> [SLIDE 5]
[16:08] <jono> I then realized that this is a process in which each word helps us define and learn from the next one
[16:08] <jono> we have all been passionate about build a system in which you can not only consume free software easily, but to also build a system, framework and tools that help you to collaborate
[16:09] <jono> if you can easily LEARN how to be creative, you can CREATE and that can help you INTERACT with those people who use your creations or other creators
[16:09] <jono> [SLIDE 6]
[16:09] <jono> Ubuntu Opportunistic Developer Week is all about kicking off a set of ideas that inspire you good folks to CREATE
[16:10] <jono> the whole point of the week is to break down the gap between having a cool idea and going ahead to implement it
[16:10] <jono> [SLIDE 7]
[16:10] <jono> this gets to the core of the Ubuntu philosophy - we are who we are because of who we all are
[16:10] <jono> if we can break down the barriers to people creating, we can all create together, continuing to build an incredible platform and set of tools that lets *everyone* create, irrespective of their interest or discipline
[16:11] <jono> [SLIDE 8]
[16:12] <jono> with this goal in mind, I have been working hard really to socialize the term "Opportunistic Developers"
[16:12] <jono> Opportunistic Developers are people like you and me: people who have cool ideas for software, but are not necessarily programmers by definition - we are people who have the ability to write code, but we write it for fun, often in our spare time, working on projects that are specifically interesting to us
[16:12] <jono> [SLIDE 9]
[16:13] <jono> the platform that really changed this was the iPhone - much as it niggles at our free software tendencies, Apple did an incredible job not only delivering a device that people loved, but also a platform that harnessed the create ideas from opportunistic developers
[16:13] <jono> developers have written everything from serious exercise apps to apps where you press a button and it makes a fart noise
[16:13] <jono> in the opportunistic developer world, all apps are welcome, irrespective of how specialized or niche: you want to write an app for a specific service or site? go ahead!
[16:13] <jono> the goal here is *enabling creativity*, irrespective of how it will manifest :-)
[16:14] <jono> Ubuntu provides an absolutely incredible platform for this: we have facilities for creating applications, using multimedia, networking, creating graphics, and all manner of other things
[16:14] <jono> while Ubuntu supports many languages and frameworks, we are particularly big fans of Python, and Python is simple, effective and can do pretty much anything you need it to do with the vast library of plug-ins and modules that we ship - this makes it a stunning platform for writing programs that are fun and interesting to you
[16:15] <jono> this week provides a week of sessions on a wide variety of topics that explain how you can get started with this platform
[16:15] <jono> now, to really get the most out of this week, I would recommend you each think of a program to write
[16:15] <jono> think of something fun and interesting and simple for you to focus your efforts on
[16:15] <jono> it could be a serious app that helps you life, or something silly and fun
[16:16] <jono> whatever it might be, think of something over the next hour and use that as your focus for making that happen this week
[16:16] <jono> I have also created a challenge this week for you all
[16:16] <jono> to think of an app, see how much progress you make on it and send me screenshots on Friday so I can blog about it and show it off
[16:16] <jono> more details on this are at http://www.jonobacon.org/2010/02/25/the-grand-app-writing-challenge/
[16:17] <jono> so, let's look at the collaborative development process
[16:17] <jono> [SLIDE 10]
[16:17] <jono> creating programs follows this broad four step process
[16:18] <jono> in this session I am going to talk about some of the work going on to help this process
[16:18] <jono> [SLIDE 11]
[16:18] <jono> we actually have an incredible platform for building software
[16:18] <jono> this diagram basically explains some of our key components
[16:18] <jono> firstly, we have a tonne of ideas
[16:19] <jono> you lovely people tell me your ideas every day, and it is part of my job to help you realize them and see them happen
[16:19] <jono> ideas are great, but we want to convert them into software that people can run
[16:19] <jono> so we have a bunch of development environments, with GNOME and KDE as good examples, which help this happen
[16:20] <jono> they both offer great facilities for writing integrated top-class apps
[16:20] <jono> personally I don't care which environment you use, just use at least one :)
[16:20] <jono> we then have Launchpad and Bazaar
[16:20] <jono> these tools provide facilities in which we can collaborate together on software
[16:20] <jono> bzr helps you share source code with each other
[16:21] <jono> and Launchpad provides facilities for hosting code, bug reports, answers and a wide range of other things
[16:21] <jono> so at this point you could create software, but software is pointless unless people use it
[16:21] <jono> so the Debian packaging system, which we use in Ubuntu, comes next
[16:22] <jono> with it you can create packages which are simple to install and install all of their dependencies too
[16:22] <jono> finally, how do we deliver these packages?
[16:22] <jono> Launchpad has a wicked-cool feature called Personal Package Archives
[16:22] <jono> this is basically your very own Debian package archive where you can publish your software
[16:22] <jono> and it can appear in the Ubuntu Software Center
[16:23] <jono> so...we have an end to end set of tools for making software and delivering it
[16:23] <jono> I now want to talk through some of the tools available and work going on which makes our four steps: imagine, create, collaborate and publish easier
[16:23] <jono> [SLIDE 12]
[16:24] <jono> the first thing we need to do is break down this insane idea that writing programs is for other people
[16:24] <jono> that "I am not smart enough" to write a program
[16:24] <jono> or that "only proper programmers write programs"
[16:24] <jono> I can assure you that you all have the ability to unlock an incredible world of creativity
[16:24] <jono> you just need to learn some key tools, and Python is an absolute doddle to use
[16:25] <jono> to help break this down I have organized this week and I have been blogging up a storm on Planet Ubuntu and Planet GNOME about this
[16:25] <jono> everyone *can* do it
[16:25] <jono> you just need to give it a shot: think of a cool app to write, use the sessions this week to have a go at writing it and do it :)
[16:26] <jono> you have nothing to lose
[16:26] <jono> [SLIDE 13]
[16:26] <jono> the next step is getting to the fun
[16:26] <jono> this was a term Rick Spencer said to me once that stuck with me
[16:26] <jono> the whole idea here is that we want to make software development so easy on Ubuntu that you don't need to suffer through the complexities that surround making software
[16:27] <jono> in the past, build systems, Makefiles and other crap complicated things
[16:27] <jono> all the things that did not involve writing code created a blocker for writing code
[16:27] <jono> so we are keen to fix this
[16:27] <jono> a great starting point here, and one encouraged throughout the week is Quickly
[16:27] <jono> [SLIDE 14]
[16:27] <jono> quickly is a tool which lets you create new apps easily
[16:28] <jono> it has a bunch of templates such as ubuntu-project that create apps for a particular environment or use case
[16:28] <jono> creating an app is simple:
[16:28] <jono> quickly create ubuntu-project mycoolapp
[16:28] <jono> bang that into a terminal and you have a new app
[16:29] <jono> (btw, you can install quickly from the software center or with: sudo apt-get install quickly)
[16:29] <jono> [SLIDE 15]
[16:29] <jono> editing code in quickly is simple
[16:29] <jono> inside the new directory you created (e.g. mycoolapp)
[16:29] <jono> whack in: quickly edit
[16:29] <jono> it loads all the code into GEdit
[16:29] <jono> simple
[16:30] <jono> [SLIDE 16]
[16:30] <jono> editing your user interface is simple with glade
[16:30] <jono> just type in:
[16:30] <jono> quickly glade
[16:30] <jono> and finally, if you want to run your app
[16:30] <jono> [SLIDE 17]
[16:30] <jono> type in: quickly run
[16:30] <jono> creating a new app and getting started is really quick and simple
[16:31] <jono> we recommend that you all create your new apps with quickly in this way
[16:31] <jono> Rick Spencer has a quickly session later today
[16:31] <jono> :)
[16:31] <jono> also, if you want to get started writing programs, when you have created your new app, inside the new directory it creates, just run: quickly tutorial
[16:31] <jono> it will show you how to create buttons, and have them do stuff :)
[16:32] <jono> [SLIDE 18]
[16:32] <jono> we have been really keen to help optimize how people collaborate together too
[16:32] <jono> we have some key tools which people use to work together, such as Launchpad and bzr
[16:32] <jono> let me explain broadly how this works and a new project which is making this whole process easier
[16:33] <jono> [SLIDE 19]
[16:33] <jono> imagine you want to fix a bug
[16:33] <jono> this is basically how it works
[16:33] <jono> 1. choose a bug to fix
[16:33] <jono> this usually involves looking at bug reports on Launchpad
[16:33] <jono> 2. download the code with bzr
[16:33] <jono> 3. work on the code you downloaded to fix it
[16:34] <jono> 4. commit the changes you made locally: this process basically generates a set of changes which represent your bug fix
[16:34] <jono> 5. you then "push" you code: this is where you upload your changes to your account on Launchpad
[16:34] <jono> 6. attach the branch with your bug fix in it to the original bug report
[16:35] <jono> 7. finally, you propose your bug fix to be merged into the original project so everyone can use it
[16:35] <jono> so it boils down to: decide what you want to fix, grab the code, fix it, identify the changes to share, upload them, propose them for inclusion in the main project
[16:35] <jono> while incredible flexible, this is quite complex to get your head around
[16:36] <jono> believe me, you get the hang of it, but it takes a few times to get used to it
[16:36] <jono> Martin Owens (doctormo on IRC) has been working on a tool to build this workflow into the desktop
[16:36] <jono> it is caled Ground Control
[16:36] <jono> let me explain how it works for fixing a bug
[16:36] <jono> [SLIDE 19]
[16:37] <jono> [SLIDE 20]
[16:37] <jono> you first identify a bug to fix
[16:37] <jono> like this one, which is a test bug I added to the groundcontrol project
[16:37] <jono> [SLIDE 21]
[16:38] <jono> now go to the file manager in Ubuntu, and groundcontrol when installed (which is not on a default Ubuntu) will have a Projects directory in your home directory
[16:38] <jono> when you view that directory it adds a few buttons to nautilus at the top
[16:38] <jono> if you click on the second button 'Fetch Project' you can select a project to work on
[16:38] <jono> [SLIDE 22]
[16:39] <jono> it then pops up this dialog box
[16:39] <jono> you can enter a project name, such as ground control, and it displays them in the dialog
[16:39] <jono> select it and click ok
[16:39] <jono> [SLIDE 23]
[16:39] <jono> this will then create a 'groundcontrol' directory in Projects
[16:39] <jono> now if you want to fix a bug, click the 'Fix Bug' button
[16:40] <jono> [SLIDE 24]
[16:40] <jono> here you can search for a bug: type in search terms or the bug number and it will list all the bugs that match your search
[16:40] <jono> [SLIDE 25]
[16:40] <jono> when you select  bug and click ok, the code is download into a folder called "bugfix-lp-<bugnumber>"
[16:41] <jono> this is the branch where you will fix the bug
[16:41] <jono> [SLIDE 26]
[16:41] <jono> now go into that folder where the code is and fix the bug
[16:41] <jono> imagine I just add some content to the README file as a test
[16:41] <jono> [SLIDE 27]
[16:41] <jono> when you have edited any of the files you will see an Upload Fix button appear
[16:41] <jono> when your bugfix is ready, just click the button
[16:42] <jono> [SLIDE 28]
[16:42] <jono> this dialog then pops up
[16:42] <jono> it asks you what changes you made: here summarize what you did to fix the bug
[16:42] <jono> this is the commit message
[16:42] <jono> [SLIDE 29]
[16:42] <jono> you then see this dialog
[16:43] <jono> this is where you can type in a message that the main project maintainers see when you propose your bug fix for merging - this gives you an opportunity to tell them your bugfix is good to be merged in
[16:43] <jono> [SLIDE 30]
[16:43] <jono> when you click OK, the bug fix is uploaded, attached to the bug report and the merge proposal is made
[16:44] <jono> you will now see a View Request button
[16:44] <jono> [SLIDE 31]
[16:44] <jono> click that and you can see the merge request that was made
[16:44] <jono> here it says that I am proposing a fix for this bug to the ground control project
[16:44] <jono> the owners of that project can now go and approve my fix if they like
[16:44] <jono> [SLIDE 32]
[16:44] <jono> and here you can see the bugfix branch added to my bug report
[16:45] <jono> as you can see, Ground Control merges the command line functionality right into bzr
[16:45] <jono> making development much easier
[16:45] <jono> [SLIDE 33]
[16:45] <jono> so the final element is visability
[16:45] <jono> visibility, rather :)
[16:45] <jono> making it really simple for people to access your software and use it
[16:46] <jono> this is all about packaging
[16:46] <jono> packaging is a complex art, and one that many people struggle with
[16:46] <jono> fortunately, Quickly makes it simple
[16:46] <jono> [SLIDE 34]
[16:46] <jono> if you want to create a local package, just run: quickly package
[16:47] <jono> quickly uses a tool called distutils-extra that will look at all the python modules you use and set them as dependencies for the package
[16:47] <jono> so if I have this in my program:
[16:47] <jono> import gstreamer
[16:47] <jono> quickly package will make sure my program has the gstreamer packages installed
[16:47] <jono> :)
[16:48] <jono> now, if you want to share your package with others, you can run: quickly release 0.1
[16:48] <jono> this will release a 0.1 version of your software and publish it to your PPA in Launchpad
[16:48] <jono> this makes it possible for anyone else to grab your software and use it
[16:48] <jono> and because it is a PPA, all future updates will be automatically delivered to them
[16:49] <jono> [SLIDE 35]
[16:49] <jono> something we have been working on in Lucid is to raise the visibility of PPAs
[16:49] <jono> and they are now displayed in the Ubuntu Software Center
[16:49] <jono> this means that you can use these awesome tools to make your software and publish it easily via the Ubuntu Software Center
[16:49] <jono> :)
[16:50] <jono> so
[16:50] <jono> [SLIDE 36]
[16:50] <jono> I am a bug fan of eating your own dog food
[16:50] <jono> so I have written some apps that highlight how this platform has enabled me, very much of a non-coder, to write software
[16:50] <jono> a few examples...
[16:50] <jono> [SLIDE 37]
[16:50] <jono> Acire
[16:51] <jono> so named after my wife, it is her name backwards: Erica
[16:51] <jono> this is a tool which provides a library of Python examples which you can use
[16:51] <jono> I just released a new version, see http://www.jonobacon.org/2010/02/26/acire-0-3-released/ for details
[16:51] <jono> [SLIDE 38]
[16:51] <jono> Lernid
[16:51] <jono> which many of you are using to view this week :)
[16:52] <jono> I was really keen to create an app which made connecting to events such as this really simple
[16:52] <jono> so I created Lernid, added the ability to show slides and websites, the local schedule etc
[16:52] <jono> now mbudde is maintaining Lernid as I am busy with other things, thanks Michael! :)
[16:52] <jono> finally
[16:52] <jono> [SLIDE 39]
[16:53] <jono> as some of you will know, I do a podcast called Shot Of Jaq
[16:53] <jono> you can check it out at http://www.shotofjaq.org
[16:53] <jono> Shot Of Jaq is a podcast which provides the first 10mins of a discussion and we encourage others to join us and continue the discussion on the website
[16:54] <jono> it is all about discussion, so I have been writing an app called App Of Jaq which specifically builds Shot Of Jaq into your desktop
[16:54] <jono> it is specific, and niche, but remember, that is cool for opportunistic developers :)
[16:54] <jono> so there we have it
[16:54] <jono> [SLIDE 40]
[16:54] <jono> a key resource which I set up for this is #ubuntu-app-devel on freenode
[16:55] <jono> this is a channel filled with folks who are writing software
[16:55] <jono> it is a great place to ask questions, share progress on your apps and more
[16:55] <jono> also, the very final session every day this week is a hacking party
[16:55] <jono> head over to that channel and spend a few hours hacking on your new app
[16:56] <jono> and you can be around others to ask questions and more
[16:56] <jono> hacking together is tonnes of fun :)
[16:56] <jono> [SLIDE 41]
[16:56] <jono> ok, we only have a few mins
[16:56] <jono> any questions?
[16:57] <jono> NilsR70, Do we have to share copyright with Canonical when we use Launchpad?
[16:57] <jono> no
[16:57] <jono> :)
[16:57] <jono> eviltwin44, Isn't Acire something which would be much better suited as a website where people can submit snippits and people comment on them?
[16:58] <jono> I deliberately made the library of snippets a separate project (http://www.launchpad.net/python-snippets) so you can provide any UI to thenm
[16:58] <jono> Acire is a desktop UI, and you could have a web UI if you like
[16:58] <jono> I am a desktop guy, and having it on the desktop is great for editing code, running snippets etc
[16:58] <jono> w1nGNUtz, QUESTION: Do you have plans to integrate quickly, glade in any of the existing IDEs so that the user doesn't need to swtich bettween command line and gedit?
[16:59] <jono> w1nGNUtz, most Linux hackers like using text editors and command line for running comands
[16:59] <jono> commands
[16:59] <jono> but there is no reason why someone could not create an IDE
[16:59] <jono> too many people don't get started developing on Linux because of an IDE: it is a false prophecy, there are great tools such as GEdit and Glade to provide the equivalent functionality
[16:59] <jono> ok, folks, thanks!
[17:00] <jono> I am done, next up is aquarius who will get you all started with CouchDB! :-)
[17:01] <aquarius> thanks very much, jono!
[17:01] <aquarius> Hi, all. Welcome to CouchDB support in your app with DesktopCouch.
[17:01] <aquarius> I'm Stuart Langridge, desktopcouch architect. Normally I'm in disguise as a cool guy, but today I'm going to drop that disguise and talk about databases.
[17:01] <aquarius> Over the next hour I'm going to explain what desktopcouch is, how to use it, who else is using it, and some of the things you will find useful to know about the project.
[17:01] <aquarius> [SLIDE 1]
[17:02] <aquarius> If you were part of Ubuntu Developer Week, you might find you know a lot of this!
[17:02] <aquarius> but this is *opportunistic* developer week :)
[17:02] <aquarius> I'll talk for a section, and then stop for questions.
[17:02] <aquarius> Please feel free to ask questions in #ubuntu-classroom-chat, and I'll look at the end of each section to see which questions have been posted. Ask at any time; you don't have to wait until the end of a section.
[17:02] <aquarius> You should prefix your question in #ubuntu-classroom-chat with QUESTION: so that I notice it :-)
[17:03] <aquarius> Since I'm talking about databases, some of this is necessarily a bit technical. Do please ask questions or ask me to go over something again.
[17:03] <aquarius> So, firstly, what's desktopcouch?
[17:03] <aquarius> Well, it's giving every Ubuntu user a CouchDB on their desktop.
[17:03] <aquarius> CouchDB is a "document-oriented database". If you're familiar with SQL databases, where you define a table and then a table has a number of rows and each row has the same columns in it...this is not like that.
[17:03] <aquarius> In fact, CouchDB spearheads the "NoSQL" movement, which is all about new database stuff that isn't mired in a mass of SQL that belongs in the 1980s.
[17:03] <aquarius> SQL was good for its time. Like, say, Purple Rain by Prince. Now, though...there's something better.
[17:04] <aquarius> [SLIDE 1]
[17:04] <aquarius> Instead of regimented tables and rows, in CouchDB you store "documents", where each document is a set of key/value pairs. Think of this like a Python dictionary, or a JSON document.
[17:04] <aquarius> So you can store one document like this:
[17:04] <aquarius> { "name": "Stuart Langridge", "project": "Desktop Couch", "hair_colour": "red" }
[17:05] <aquarius> and another document which is completely different:
[17:05] <aquarius> { "name": "Stuart Langridge",
[17:05] <aquarius>   "outgoings": [
[17:05] <aquarius>     { "shop": "In and Out Burger", "cost": "$12.99" } ,
[17:05] <aquarius>     { "shop": "Ferrari dealership", "cost": "$175000" }
[17:05] <aquarius>   ]
[17:05] <aquarius> }
[17:05] <aquarius> The interface to CouchDB is pure HTTP. Just like the web. It's RESTful, for those of you who are familiar with web development.
[17:05] <aquarius> This means that every programming language already knows how to speak it, at least in basic terms.
[17:05] <aquarius> [SLIDE 2]
[17:06] <aquarius> CouchDB also comes with an in-built in-browser editor, so you can look at and browse around and edit all the data stored in it.
[17:06] <aquarius> So, the desktopcouch project is all about providing these databases for every user, so each user's applications can store their data all in one place.
[17:07] <aquarius> You can have as many databases in your desktop Couch as you or your applications want, and storage is unlimited.
[17:07] <aquarius> well, assuming you have an infinitely large hard drive, anyway.
[17:07] <aquarius> Desktop Couch is built to do "replication", synchronizing your data between different machines. So if you have, say, Firefox storing your bookmarks in your desktop Couch on your laptop, those bookmarks could be automatically synchronized to your Mini 9 netbook, or to your desktop computer.
[17:08] <aquarius> They can also be synchronized to Ubuntu One, or another running-in-the-cloud service, so you can see that data on the web, or synchronize between two machines that aren't on the same network.
[17:08] <aquarius> [SLIDE 3]
[17:09] <aquarius> So you've got your bookmarks everywhere. Your own personal del.icio.us, but it's your data, not locked up solely on anyone else's servers.
[17:09] <aquarius> Imagine if your apps stored their preferences in desktop Couch. Santa Claus brings you a new laptop, you plug it in, pair it with your existing machine, and all your apps are set up. No work.
[17:10] <aquarius> But sharing data between machines is only half the win. The other half is sharing data between applications.
[17:10] <aquarius> I want all my stuff to collaborate. I don't want to have to "import" data from one program to another, if I switch from Thunderbird to Evolution to KMail to mutt.
[17:10] <aquarius> I want any application to know about my address book, to allow any application to easily add "send this to another person", so that I can work with people I know.
[17:11] <aquarius> I want to be able to store my songs in Banshee and rate them in Rhythmbox if I want -- when people say that the Ubuntu desktop is about choice, that shouldn't mean choosing between different incompatible data silos. I can choose one application and then choose another, you can choose a third, and we can all cooperate on the data.
[17:11] <aquarius> My choice should be how I use my applications, and how they work; I shouldn't have to choose between underlying data storage. With apps using desktopcouch I don't have to.
[17:11] <aquarius> All my data is stored in a unified place in a singular way -- and I can look at my data any time I want, no matter which application put it there! Collaboration is what the open source desktop is good at, because we're all working together. It should be easy to collaborate on data.
[17:11] <aquarius> That's a brief summary of what desktopcouch *is*: any questions so far before we get on to the meat: how do you actually Use This Thing?
[17:12] <aquarius> pecisk> QUESTION: How CouchDB stores data? Multiple files, or something else?
[17:12] <aquarius> each database is stored in a separate file, but you never, ever have to care about that :) Like how you don't have to care exactly how MySQL stores your databases
[17:12] <aquarius> brunogirin> QUESTION: how do you control what apps see what data?
[17:13] <aquarius> brunogirin, at the moment you can't limit which apps can see which databases, but it woul dbe possible to add that if there was a need for it -- authentication to desktopcouch is done with OAuth specifically for ths sort of thing
[17:14] <aquarius> osteenbergen> QUESTION: Which programs are supported today??
[17:14] <aquarius> any program that wants to use desktopcouch can do so!
[17:15] <aquarius> danielbell> QUESTION: is there any limits on what kind of data you can store in a couchdb? can you store whole paragraphs of text - will it retain formatting like linebreaks and stuff like that?
[17:15] <aquarius> no limit to what you can store. Line breaks will be retained.
[17:15] <aquarius> ab28> QUESTION: Data migration and replication is possible with CouchDB?
[17:16] <aquarius> yep. That's what I meant above by talking about how you can share data between machines
[17:16] <aquarius> alanbelll> QUESTION: can I share a desktop couch database with someone else?
[17:16] <aquarius> there's no built-in way to do that with desktopcouch at the moment. I have Plans, though. :)
[17:16] <aquarius> fredo> QUESTION: Is desktopcouch intended to replace gconf?
[17:17] <aquarius> no. gconf is about configuration. desktopcouch is about information. It ought to be possible to implement a desktopcouch back-end to gconf, though, and it's something that I've thought about and thought would be interesting
[17:17] <aquarius> titeuf_87> QUESTION: how well does it work on other systems like Windows when you try to make an app cross-platform?
[17:17] <ClassBot> titeuf_87 asked: how well does it work on other systems like Windows when you try to make an app cross-platform?
[17:17] <aquarius> shut up, classbot. :)
[17:18] <aquarius> there's an ongoing effort to port desktopcouch to Windows, led by mandel, who's doing an excellent job. I'm sure he'd be happy to get some help, though :)
[17:18] <aquarius> webwurst> QUESTION: could you put this link to te panel top left? ;) http://couchdb.apache.org/
[17:18] <aquarius> sure :)
[17:18] <aquarius> damo35> QUESTION: Who defines the standards for how a music player should store it's data, for example? Would Rhythmbox and Banshee each have plugins to convert to CouchDB?
[17:19] <aquarius> yes. there's a mailing list where this sort of thing is discussed; it's about rough consensus and running code, rather than schemas which are inscribed on stone tablets and Must Be Obeyed. What we want is for people to get together and talk through this stuff.
[17:20] <aquarius> OK, I'll carry on now
[17:20] <aquarius> The easiest way to use desktopcouch is from Python, using the desktopcouch.records module.
[17:20] <aquarius> [SLIDE 4]
[17:20] <aquarius> This is installed by default in Karmic and Lucid.
[17:20] <aquarius> An individual "document" in desktop Couch is called a "record", because there are certain extra things that are in a record over and above what stock CouchDB requires, and desktopcouch.records takes care of this for you.
[17:20] <aquarius> First, a bit of example Python code! This is taken from the docs at /usr/share/doc/python-desktopcouch-records/api/records.txt.
[17:20] <aquarius> >>> from desktopcouch.records.server import CouchDatabase
[17:20] <aquarius> >>> from desktopcouch.records.record import Record
[17:20] <aquarius> >>> my_database = CouchDatabase("testing", create=True)
[17:21] <aquarius> # get the "testing" database. In your desktop Couch you can have many databases; each application can have its own with whatever name it wants. If it doesn't exist already, this creates it.
[17:21] <aquarius> >>> my_record = Record({ "name": "Stuart Langridge", "project": "Desktop Couch", "hair_colour": "red" }, record_type='http://example.com/testrecord')
[17:21] <aquarius> # Create a record, currently not stored anywhere. Records must have a "record type", a URL which is unique to this sort of record.
[17:21] <aquarius> >>> my_record["weight"] = "too high!"
[17:21] <aquarius> # A record works just like a Python dictionary, so you can add and remove keys from it.
[17:22] <aquarius> >>> my_record_id = my_database.put_record(my_record)
[17:22] <aquarius> # Actually save the record into the database. Records each have a unique ID; if you don't specify one, the records API will choose one for you, and return it.
[17:22] <aquarius> >>> fetched_record = my_database.get_record(my_record_id)
[17:22] <aquarius> # You can retrieve records by ID
[17:22] <aquarius> >>> print fetched_record["name"]
[17:22] <aquarius> "Stuart Langridge"
[17:22] <aquarius> # and the record you get back is a dictionary, just like when you're creating it.
[17:23] <aquarius> That's some very basic code for working with desktop Couch; it's dead easy to save records into the database.
[17:23] <aquarius> You can work with it like any key/value pair database.
[17:23] <aquarius> And then desktopcouch itself takes care of things like replicating your data to your netbook and your desktop without you having to do anything at all.
[17:23] <aquarius> And the users of your application can see their data directly by using the web interface; no more grovelling around in dotfiles or sqlite3 databases from the command line to work out what an application has stored.
[17:24] <aquarius> You can get at the web interface by browsing to file:///home/aquarius/.local/share/desktop-couch/couchdb.html in a web browser, which will take you to the right place.
[17:24] <aquarius> I'll stop there for some questions about this section!
[17:24] <aquarius> (but first I'll fix the browser in lernid. Sorry about that, all. http://allaboutubuntu.files.wordpress.com/2008/02/bacon.jpg )
[17:25] <aquarius> azathothgr> why a url ?
[17:25] <aquarius> Two reasons: the first is that a URL is an easy way to ensure that record types are unique and don't clash (if you call your record type "recipe", someone else might independently pick that name)
[17:26] <aquarius> and secondly, because you are encouraged (but not required!) to write something about the fields you expect in the record at that URL, so when someone else thinks "I would like my app to collaborate with yours on data", they can look at the detail of the record to find out why it's like it is.
[17:26] <aquarius> virkang> QUESTION: can we store an entire file in a database record ?
[17:27] <aquarius> sure. I mean, I wouldn't just dump the whole file in, I'd store it in some sort of structured way, but you can do so.
[17:27] <aquarius> nadako70> QUESTION: how to configure the actual replication? :)
[17:27] <aquarius> replication between machines on your network is set up with desktopcouch-pair, which is in the desktopcouch-tools package
[17:27] <aquarius> replication to Ubuntu One is set up for you if you're an Ubuntu One user
[17:28] <aquarius> danielbell> QUESTION: does record type have to be a single "word" can you have spaces in record types?
[17:28] <aquarius> it needs to be a valid URL
[17:28] <aquarius> something you can visit in your web browser.
[17:28] <aquarius> brunogirin> QUESTION: can you limit replication to specific databases?
[17:29] <aquarius> yes. At the moment it's harder than it should be, though. You need to edit the paired-server records in the management database in desktopcouch and add to excluded_names.
[17:29] <aquarius> there's a Launchpad Answers question about this which should cover all the detail.
[17:29] <aquarius> nvsbl91> QUESTION: does it matter what that url is?
[17:30] <aquarius> nope, as long as it's unique to that record type.
[17:30] <aquarius> OK, I shall carry on!
[17:30] <aquarius> Next, on to views.
[17:30] <aquarius> Being able to retrieve records one at a time is nice, but it's not what you want to do most of the time.
[17:30] <aquarius> To get records that match some criteria, use views.
[17:30] <aquarius> Views are sort of like SQL queries and sort of not. Don't try and think in terms of a relational database.
[17:30] <aquarius> The best reference on views is the CouchDB book, available for free online (and still being worked on): the views chapter is at http://books.couchdb.org/relax/design-documents/views
[17:31] <aquarius> Basically, a view is a JavaScript function.
[17:31] <aquarius> When you request the records from a view, desktopcouch runs your view function against every document in the database and returns the results.
[17:32] <aquarius> So, to return all documents with "name": "Stuart Langridge", the view function would look like this:
[17:32] <aquarius> function(doc) { if (doc.name == "Stuart Langridge") emit(doc._id, doc) }
[17:32] <aquarius> This sort of thinking takes a little getting used to, but you can do anything you want with it once you get into it
[17:33] <aquarius> desktopcouch.records helps you create views and request them
[17:33] <aquarius> # creating a view
[17:33] <aquarius> >>> map_js = """function(doc) { emit(doc._id, null) }"""
[17:34] <aquarius> >>> db.add_view("name of my view", map_js, None, "name of the view container")
[17:34] <aquarius> # requesting the records that the view returns
[17:34] <aquarius> >>> result = db.execute_view("name of my view", "name of the view container")
[17:34] <aquarius> The "view container", called a "design doc", is a collection of views. So you can group your views together into different design docs.
[17:35] <aquarius> Advanced people who know about map/reduce should know that this is a map/reduce approach.
[17:35] <aquarius> You can also specify a reduce function (that's the None parameter in the add_view function above)
[17:35] <aquarius> The CouchDB book has all the information you'll need on views and the complexities of them.
[17:35] <aquarius> Questions on views? :-)
[17:35] <aquarius> hemanth> QUESTION: can CouchDB used for webbased apps, like different user different db with the same login page?
[17:36] <aquarius> It could be, yeah. That's a CouchDB question about running it on the server, which is a jolly useful thing to do, but desktopcouch isn't really about that; desktopcouch is about using the CouchDB technology to give people a cool DB on their desktop for their apps to use
[17:36] <aquarius> so, it's a good question, I'm just not going to go into it here ;)
[17:36] <aquarius> w1ngnutz> QUESTION:  You mentioned "record_type='http://example.com/testrecord". Does this need to be unique?
[17:36] <aquarius> it's unique for a *type* of record.
[17:37] <aquarius> so if you're writing an app which helps you remember recipes, and your app stores each recipe you want to remember as a record, then they'd all have the same record type
[17:37] <aquarius> if your app stores a few different kinds of record, each kind of record would have a different record type
[17:38] <aquarius> rovax31> QUESTION: is couchdb oython engine on for view parsing with desktop couch for js haters?
[17:38] <aquarius> er, Crovax31, that was
[17:38] <aquarius> it's not on by default (has mikeal finished writing it yet? :))
[17:38] <aquarius> there's no reason why you couldn't install it and use it for your apps, though.
[17:38] <aquarius> nadako70> QUESTION: oh, what about indexing, running a js function for every record seems not too optimal for frequent requests
[17:39] <aquarius> it doesn't *really* run it every go. Instead, couchdb keeps cached versions of the values around, sort of, and when new records are added, they're added to the result sets for views at the same time. Sort of. But this is deep techie stuff. The Couch book has all the detail you could want about this.
[17:39] <aquarius> osteenbergen> QUESTION: Why triple quotes?
[17:40] <aquarius> so I can be lazy and not care if my JS code has quotes in. ;)
[17:40] <aquarius> OK,I shall continue
[17:40] <aquarius> There is an Even Easier way to have applications use desktop Couch for data storage.
[17:40] <aquarius> One of the really cool things in karmic is Quickly: https://wiki.ubuntu.com/Quickly
[17:41] <aquarius> quickly helps you make applications...quickly. :-)
[17:41] <aquarius> and apps created with Quickly use desktopcouch for data storage.
[17:41] <aquarius> If you haven't seen Quickly, it's a way of easily handling all the boilerplate stuff you have to do to get a project going; "quickly create ubuntu-project myproject" gives you a "myproject" folder containing a Python project that works but doesn't do anything.
[17:41] <aquarius> So you can concentrate on writing the code to do what you want, rather than boilerplate to get started.
[17:41] <aquarius> Quickly is gonna come up a lot this week. It's designed for opportunistic programming.
[17:41] <aquarius> It's dead neat :)
[17:41] <aquarius> jono's already covered quickly a bit in his introduction, and there's a session on it later in the week
[17:41] <aquarius> Anyway, quickly projects are set up to save application preferences into desktop Couch by default. So you get the advantages of using desktop Couch (replication, browsing of data) for every quickly project automatically.
[17:42] <aquarius> The quickly guys have also contributed CouchGrid:
[17:42] <aquarius> >>> from desktopcouch.records.couchgrid import CouchGrid
[17:42] <aquarius> >>> keys=["key","another key"] # to label the columns
[17:42] <aquarius> >>> couchgrid = CouchGrid(db_name, record_type=record_type, keys=keys)
[17:42] <aquarius> >>> mywindow.pack_start(couchgrid)
[17:42] <aquarius> and then you have a CouchGrid, which is a data table where all the data is automatically retrieved from desktopcouch and stored back into desktopcouch when changed
[17:42] <aquarius> http://www.youtube.com/user/calorielookup#p/a/u/0/Vwr5Xw5ZrIE has a video demonstrating couchgrids
[17:43] <aquarius> oops, now everyone can hear rickspencer3 talking in the video ;)
[17:44] <aquarius> CouchGrid is moving out of the desktopcouch core and into quidgets, a cool set of widgets deliberately designed to work well in quickly apps and be just as cool as quickly itself
[17:44] <aquarius> You don't have to know anything about desktopcouch at all for this! Just use the widget and your data will be saved to the database and synced to your different machines with no effort or code on your part at all.
[17:44] <aquarius> "quickly tutorial ubuntu-project" has lots of information about CouchGrid and how to use it.
[17:45] <aquarius> Any questions about quickly? (I can't guarantee to be able to answer them, but #quickly is great for this.)
[17:45] <aquarius> (specifically, questions about using quickly with desktopcouch. If you have questions about quickly itself, you'll be best asking them in the Quickly session, next)
[17:46] <aquarius> So, who's already using desktopcouch?
[17:46] <aquarius> Quickly, as mentioned, uses desktopcouch for preferences in projects it creates.
[17:46] <aquarius> The Gwibber team are working on using desktopcouch for data storage
[17:47] <aquarius> and that's working in the latest lucid, which is way, way cool
[17:47] <aquarius> Bindwood (http://launchpad.net/bindwood) is a Firefox extension to store bookmarks in desktopcouch
[17:47] <aquarius> Macaco-contacts is transitioning to work with desktopcouch for contacts storage (http://www.themacaque.com/?p=248)
[17:48] <aquarius> Evolution can now, in the evolution-couchdb package, store all contacts in desktopcouch
[17:48] <aquarius> Akonadi, the KDE project's contacts and PIM server, can also store contacts in desktopcouch
[17:48] <aquarius> These last three are interesting, because everyone's collaborating on a standard record type and record format for "contacts", so Evolution and Akonadi and Macaco-contacts will all share information.
[17:48] <aquarius> So if you switch from Gnome to KDE, you won't lose your address book.
[17:48] <aquarius> I'm really keen that this happens, that applications that store similar data (think of mail clients and addressbooks, as above, or media players storing metadata and ratings, for example) should collaborate on standard formats.
[17:49] <aquarius> lamalex_2> Is this as an alternative to gconf?
[17:49] <aquarius>  no. gconf is about configuration. desktopcouch is about information. It ought to be possible to implement a desktopcouch back-end to gconf, though, and it's something that I've thought about and thought would be interesting
[17:49] <aquarius> rickspencer3> A wiki space with existing record types would be nice
[17:50] <aquarius> http://www.freedesktop.org/wiki/Specifications/desktopcouch has a few
[17:50] <aquarius> but I do not want to give the impression that you have to get "approval" or anything, or be listed in a central repository
[17:50] <aquarius> you can invent your own record types. Point them to whatever URL you choose. Get together with people and decide between yourselves.
[17:51] <aquarius> There's no overall control. It's all about enabling people to work together. You don't have to "register" with the desktopcouch team or anything.
[17:51] <aquarius> virkang> QUESTION: How are DesktopCouch and Ubuntu One related ?
[17:52] <aquarius> Ubuntu One provides a home in the cloud for your desktopcouch data. This makes it easy to synchronize data between machines that aren't on the same network. You don't need to use Ubuntu One to use desktopcouch, and you can synchronize data between desktopcouches on your network without using Ubuntu One at all.
[17:52] <aquarius> nilsr47> QUESTION: Any ideas for collaborating on record types?
[17:53] <aquarius> if you've got an idea for a record type that you think that your app would use, and you think that others might want the same record type so you can all collaborate, get in touch with them and talk it over
[17:53] <aquarius> the desktopcouch mailing list is a good place to have that discussion
[17:53] <aquarius> (link shortly :))
[17:53] <aquarius> [SLIDE 5]
[17:53] <aquarius> so, why use desktopcouch? This is what you should take away from this talk.
[17:54] <aquarius> It's an easy way to store data. You don't have to think about SQL statements. Just make a Python dictionary, which you already know how to do, and then store it.
[17:54] <aquarius> Storing your data in desktopcouch means that it's everywhere, on all your machines. That's no extra work at all; we take care of all of that for you.
[17:54] <aquarius> You get the web editor for free. It's so, so much easier to work with and play with and see what your application is doing if you can see all the data that it's storing.
[17:54] <aquarius> And, where should you find more out?
[17:54] <aquarius> [SLIDE 6]
[17:54] <aquarius> Details about the desktopcouch project can be found at http://www.freedesktop.org/wiki/Specifications/desktopcouch
[17:55] <aquarius> the documentation is also helpful (well, I hope it is), and http://www.freedesktop.org/wiki/Specifications/desktopcouch/Documentation#Iamadeveloper.2CandIwanttheapplicationsIwritetostoredatainandworkwithdesktopcouch is particularly relevant to this group
[17:55] <aquarius> There's a mailing list at http://groups.google.com/group/desktop-couchdb
[17:56] <aquarius> The code is developed in Launchpad: http://launchpad.net/desktopcouch
[17:56] <aquarius> The best place to ask questions generally is the #ubuntuone channel; all the desktopcouch developers are hanging out there
[17:56] <aquarius> The best place to ask questions that you have right now is...right now, so go ahead and ask in #ubuntu-classroom-chat, and I'll answer any other questions you have!
[17:56] <aquarius> I've got about 3 minutes before rickspencer3 blows us all away with the sheer coolness of quickly :)
[17:57] <aquarius> nilsr47> QUESTION: Do you have to do something special to run CouchDB?
[17:58] <aquarius> NilsR47, no. Just use desktopcouch.records and it gets run for you. You never have to start it up manually.
[17:58] <aquarius> titeuf_87> QUESTION if gconf is more for application configuration, why does quickly uses desktopcouch as default for storing settings?
[17:58] <aquarius> that's a quickly question, that is ;)
[17:58] <aquarius> there are benefits to using desktopcouch, like that you get the synchronization for free
[17:59] <aquarius> it would be great if gconf had that, but that's quite a lot of work -- as mentioned earlier, one way to do that would be to implement a desktopcouch backend for gconf
 mostly writing to gconf is too hard; writing to desktopcouch is dead simple; also, you get syncing
[18:00] <aquarius> evrick67> hmm how do you get desktoopcouch to sync between computers on a network?
[18:00] <aquarius> if you're not using Ubuntu One, then check out the desktopcouch-pair program in the desktopcouch-tools package
[18:01] <rickspencer3> aquarius, that was awesome!
[18:01] <rickspencer3> since desktopcouch has come on the scene, I hardly persist anything anywhere else
[18:01] <rickspencer3> it's so easy to use the records api
[18:01] <rickspencer3> anywho, quickly time
[18:01] <rickspencer3> ?
[18:02] <rickspencer3> I have my class notes here:
[18:02] <rickspencer3> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek/Quickly/Intro
[18:02] <rickspencer3> just in case it makes it easier to follow
[18:02] <rickspencer3> Shall I begin?
[18:03] <rickspencer3> let's roll
[18:03] <rickspencer3> so what is Quickly?
[18:03] <rickspencer3> first, Quickly is a community project that I started in my spare time
[18:03] <rickspencer3> however, didrocks is the true author
[18:04] <rickspencer3> I call Quickly, among other things, an "Application Templating System"
[18:04] <rickspencer3> the essence of the project is to provide you boiler plate for the kind of program you want to write
[18:05] <rickspencer3> so the code that you would have to write for every program of a certain type gets generated for you
[18:05] <rickspencer3> that part, I call the "boiler plate"
[18:05] <rickspencer3> but Quickly is also a set of commands
[18:05] <rickspencer3> the boiler plate is designed to integrate with the Ubuntu Application infrastructure
[18:05] <rickspencer3> thinks like bzr, launchpad, PPAs, etc...
[18:06] <rickspencer3> and the commands are what make all that work
[18:06] <rickspencer3> The moto of Quickly is "Easy and Fun"
[18:06] <rickspencer3> to install it, go:
[18:06] <rickspencer3> $sudo apt-get install quickly
[18:07] <rickspencer3> this may take a while, as there are lots of tools and dependencies that get installed for you
[18:07] <rickspencer3> Note that the current version is 0.2.5
[18:07] <rickspencer3> this is the first iteration of quickly and comes with 1 template
[18:08] <rickspencer3> it has support for PPAs and everything, but the launchpad integration is a bit brittle
[18:08] <rickspencer3> the next version is 0.4, and didrocks will deliver that very very soon
[18:08] <rickspencer3> it will be the version of Lucid
[18:08] <rickspencer3> and it will have at least 2 templates, but maybe 3
[18:09] <rickspencer3> the rest of the class will be in 4 parts:
[18:09] <rickspencer3> Creating your app
[18:09] <rickspencer3> Editing the UI
[18:09] <rickspencer3> Writing Code
[18:09] <rickspencer3> Packaging and PPAs
[18:09] <rickspencer3> before we go, any questions?
[18:09] <ClassBot> lamalex_2 asked: Is quickly always glade/python/etc., or is that template dependant
[18:10] <rickspencer3> that is template dependant
[18:10] <rickspencer3> since Ubuntu is a gnome based distro, the ubuntu-project template uses that
[18:10] <ClassBot> stefodestructo asked: how hard is it to integrate an existing project into quickly?
[18:11] <rickspencer3> there is no intrinsic importing system
[18:11] <rickspencer3> I "ported' bughugger to quickly so I could get PPA support and such
[18:11] <rickspencer3> since bughugger is python, I was able to generate a new quickly app, and then just start copying code over
[18:11] <rickspencer3> it took about 30 minutes, I guess
[18:12] <rickspencer3> there was a question about the new templates
[18:12] <rickspencer3> didrocks added a command line app template (ubuntu-cli), and I am working on a pygame template
[18:13] <rickspencer3> QUESTION: how much work would it be to create a kubuntu-project template?
[18:13] <rickspencer3> probably not much
[18:13] <rickspencer3> just write the boiler plate code
[18:13] <ClassBot> brunogirin asked: are there plans to merge PPA/bzr integration with what ground contolr does?
[18:14] <rickspencer3> all the launchpad commands and such could just inherit from the ubuntu-applcation template
[18:14] <rickspencer3> I am very interested in pursuing that
[18:14] <rickspencer3> I hope we have lots of productive sessions at UDS around the relationship between Quickly and Ground Control
[18:14] <rickspencer3> let's move on to creating a project
[18:15] <rickspencer3> in Karmic, to create an app, you do this:
[18:15] <rickspencer3> quickly create ubuntu-project appname
[18:15] <rickspencer3> where appname is a name you choose
[18:15] <rickspencer3> note that in 0.2.5 ubuntu-project template only support one word application names :(
[18:15] <rickspencer3> when you issue this command, an app will be generated for you
[18:16] <rickspencer3> after you create it and test it out, there will be a new directory named after your app
[18:16] <rickspencer3> so
[18:16] <rickspencer3> cd appname
[18:16] <rickspencer3> now you can run the app:
[18:16] <rickspencer3> quickly run
[18:16] <rickspencer3> or you can edit the code:
[18:16] <rickspencer3> quickly edit
[18:16] <rickspencer3> use tab completion to see all the commands you can do
[18:16] <rickspencer3> or try
[18:16] <rickspencer3> quickly help'
[18:16] <rickspencer3> or
[18:16] <rickspencer3> quickly tutorial
[18:17] <rickspencer3> on 0.4, it will be slightly different
[18:17] <rickspencer3> we changed the template name, so go:
[18:17] <rickspencer3> quickly create ubuntu-application appname
[18:17] <rickspencer3> also note that in .4 you'll be able to do multi-word names
[18:17] <rickspencer3> like app-name
[18:17] <rickspencer3> any questions about creating an app with quickly?
[18:18] <rickspencer3> QUESTION: can you rename a quickly project once you've created it?
[18:18] <ClassBot> danielbell asked: what are the other templates that might be in 0.4?
[18:18] <rickspencer3> this is hard to do
[18:18] <rickspencer3> sorry, I was very meant to cjohnston there :/
[18:18] <rickspencer3> so, if you've created a project, there is all kinds of string replacement that goes on, so renaming is a hard manual process
[18:19] <rickspencer3> maybe we should add a rename command
[18:19] <rickspencer3> for the other templates, I mentioned ubuntu-cli, and maybe ubuntu-pygame or something
[18:19] <rickspencer3> move on to editing the UI?
[18:20] <rickspencer3> so, for the ubuntu-project, you'll use glade to edit the UI
[18:20] <rickspencer3> Glade is a UI editing tool, that creates the XML you need to describe your windows and widgets
[18:20] <rickspencer3> don't worry because the quickly template totally handles keeping the code and the XML hooked up
[18:21] <rickspencer3> to start editing the UI in 0.2.5, use:
[18:21] <rickspencer3> quickly glade
[18:21] <rickspencer3> note that you MUST start glade this way
[18:21] <rickspencer3> otherwise the correct files won't be loaded into glade and it won't work
[18:21] <rickspencer3> in 0.4 we changed teh name of the command to:
[18:21] <rickspencer3> quickly design
[18:21] <rickspencer3> this is because perhaps other templates won't use glade
[18:22] <rickspencer3> like I assume Kubuntu would not use Glade, for example
[18:22] <rickspencer3> so here are some tips for using Glade if you are new to Glade
[18:22] <rickspencer3> first, adding widgets works like a fill tool
[18:23] <rickspencer3> you click the widget you want in the toolbox, and then click where you want it to be on the window
[18:23] <rickspencer3> the widgets will then fill the space alloted to it
[18:23] <rickspencer3> to layout the form, you use HBoxes and VBoxes
[18:23] <rickspencer3> an HBox handles Horizontal layout, and a VBox handles veritical
[18:24] <rickspencer3> so you will find yourself putting lots of boxes within boxes
[18:24] <rickspencer3> when you add a widget to a window, you can select it in the "inspector" tree if it is hard to select in the window itself'
[18:24] <rickspencer3> boxes can be hard to select in the window, for example
[18:25] <rickspencer3> if a widget is in a box, use the position property in the "Property editor" window in the "packing" tab to change the order
[18:25] <rickspencer3> you can also set the pack type to start or end to change the order
[18:25] <rickspencer3> Fill and Expand control sizing
[18:25] <rickspencer3> while Border and Padding control spacing
[18:26] <rickspencer3> whenever possible, you should use "Stock" widgets
[18:26] <rickspencer3> they get translated, the right icons, etc... automatically
[18:26] <rickspencer3> finally, if you want to add a dialog to your project
[18:26] <rickspencer3> you should:
[18:26] <rickspencer3> 1. close glade
[18:26] <rickspencer3> 2. go:
[18:26] <rickspencer3> $quickly dialog dialogname
[18:26] <rickspencer3> 3. quickly glade
[18:26] <rickspencer3> that's for 0.2.5 in karmic
[18:27] <rickspencer3> for 0.4 go
[18:27] <rickspencer3> 1. close glade
[18:27] <rickspencer3> 2. $quickly add dialog dialogname
[18:27] <rickspencer3> 3. $quickly design
[18:27] <rickspencer3> ok, that's the power trip through glade
[18:27] <rickspencer3> and using it with quickly
[18:27] <rickspencer3> any questions?
[18:28] <ClassBot> astyguy asked: is there a front end for quickly for use with launchpad
[18:29] <rickspencer3> quickly quite integrates with launchpad
[18:29] <rickspencer3> I'll cover that int eh PPA section soon
[18:29] <ClassBot> brunogirin asked: how much work would it be to create a kubuntu-project template?
[18:29] <rickspencer3> I thik I answered that one
[18:29] <rickspencer3> not too hard
[18:29] <rickspencer3> how about this one:
[18:29] <rickspencer3> QUESTION: do you have to use glade, or does quickly work with pygtk apps that don't use glade filez?
[18:30] <rickspencer3> so, you do have to use the generated glade files
[18:30] <rickspencer3> but if you want, you can just use good old python code to manipulate the contents
[18:30] <rickspencer3> I do this all the time
[18:30] <rickspencer3> so using Glade per say, is not required
[18:31] <rickspencer3> every window or dialog created with the ubuntu-project template has a builder object built in
[18:31] <rickspencer3> so you can easily go:
[18:31] <rickspencer3> self.builder.get_object("vbox1")
[18:31] <rickspencer3> and you have the main vbox for the window
[18:31] <rickspencer3> you can start packing and removing children like that
[18:32] <rickspencer3> let's talk coding a little
[18:32] <rickspencer3> I have a couple of points here
[18:32] <rickspencer3> oops
[18:32] <rickspencer3> I forgot to discuss signals
[18:32] <rickspencer3> signals are messages that your widgets send to your code
[18:33] <rickspencer3> they get hooked up automatically for you
[18:33] <rickspencer3> in glade, for an item in the editor, go to the signals tab of the editor for the widget
[18:33] <rickspencer3> choose the "event" in teh widget that you want to create a signal for
[18:33] <rickspencer3> then in the "handler" column, type the name for the handler that you want to use
[18:34] <rickspencer3> a handler is just a function in your code file
[18:34] <rickspencer3> it's a function that "handles" the signal
[18:34] <rickspencer3> for running a function when the user selects a certain menu item, for example
[18:35] <rickspencer3> create a handler in teh glade file for the "activated" signal
[18:35] <rickspencer3> then create a function of that same name in the code file for that window or dialog
[18:35] <rickspencer3> the handler signal should like this:
[18:35] <rickspencer3> def handlername(self, widget, data=None):
[18:36] <rickspencer3> so, some launchpad integration questions
[18:36] <rickspencer3> we'll get to that in a few minutes, but it is MUCH improved in 0.4
[18:36] <rickspencer3> anyway, a couple of notes about writing quickly code
[18:36] <rickspencer3> but first, questions about signal handlers?
[18:37] <rickspencer3> ok
[18:37] <rickspencer3> so a quick tip or two
[18:37] <rickspencer3> first, for Windows and Dialogs in the quickly template
[18:37] <rickspencer3> don't write code in the __init__ function
[18:38] <rickspencer3> rather, add your initialization code to the finish_initializing function
[18:38] <rickspencer3> similarly, don't create instances of windows or dialogs directly
[18:38] <rickspencer3> so, don't go
[18:38] <rickspencer3> window = MyNamedWindow()
[18:38] <rickspencer3> this will blow up
[18:39] <rickspencer3> rather use the New*Window() or New*Dialog() functions that come with each window or dialog
[18:40] <rickspencer3> for debugging, most people still just sprinkle print statements in their code
[18:40] <rickspencer3> we added logging code to the quickly template
[18:40] <rickspencer3> the idea being that you could use logging.debug(message) instead
[18:40] <rickspencer3> but this is busted atm
[18:40] <rickspencer3> we'll fix it before Lucid
[18:41] <rickspencer3> there is also a debugger called pdb (for python debugger)
[18:41] <rickspencer3> it works well, but is a bit complex
[18:41] <rickspencer3> note that $quickly edit
[18:41] <rickspencer3> will respect your default editor choices
[18:42] <rickspencer3> QUESTION: And what's the benefit of using logger instead of print?
[18:42] <rickspencer3> the advantage of logger is that you can cause it to only turn on using a command line switch
[18:42] <rickspencer3> so you can run your app like:
[18:42] <rickspencer3> $myapp -v
[18:42] <rickspencer3> and only with the "-v" will it print debug statements
[18:43] <rickspencer3> if you just use "print" and forget to delete them, whenever anyone runs the app they'll see your debug statements
[18:43] <rickspencer3> QUESTION: New* even for default dialogs like a simple message?
[18:43] <rickspencer3> use New* for Windows and Dialogs created by the ubuntu-project template
[18:44] <rickspencer3> this is necessary in order properly instantiate the window or dialog and cause it to use the UI definition from Glade
[18:44] <rickspencer3> this is a workaround for the way uibuilder works in pygtk atm
[18:44] <rickspencer3> any more questions about coding before we talk packaging and PPAs?
[18:45] <rickspencer3> QUESTION: any plans to include tasks for unit tests?
[18:45] <rickspencer3> yes, this would be sweet
[18:45] <rickspencer3> seems an easy matter to integrate trial into the templates
[18:45] <rickspencer3> would love to see that soon
[18:46] <rickspencer3> QUESTION so ground control is worth using with quickly ????
[18:46] <rickspencer3> atm the projects are not coordinated
[18:46] <rickspencer3> GC is really for the scenario of contributing to an existing project
[18:46] <rickspencer3> where as quickly is currently about you creating and sharing your own project'
[18:46] <rickspencer3> so for now, I would not mentally link them
[18:47] <rickspencer3> however, they both have a lot of Launchpad integration code
[18:47] <rickspencer3> and of course you would want folks to contribute to your project, right?
[18:47] <rickspencer3> so I think some convergence is in store for Lucid + 1
[18:47] <rickspencer3> also note that GC is very early stage development
[18:47] <rickspencer3> I don't know that it will even be in universe for Lucid
[18:48] <rickspencer3> but it's a very important project, so I would watch it closely
[18:48] <rickspencer3> but in the meantime, if you are trying to get started with development, I would not conflate it with quickly
[18:48] <rickspencer3> hth
[18:48] <rickspencer3> ok
[18:48] <rickspencer3> let'
[18:48] <rickspencer3> s talk packaging
[18:48] <rickspencer3> there is a command that goes:
[18:48] <rickspencer3> $quickly package
[18:49] <rickspencer3> it is very forgiving
[18:49] <rickspencer3> it will create a deb for you without anyu configuration or mucking with Launchpad
[18:49] <rickspencer3> a deb is suitable for testing on other computers and such
[18:49] <rickspencer3> but let's talk about getting set up for packaging real quick
[18:50] <rickspencer3> there are a few items to take care of first
[18:50] <rickspencer3> 1. add your name and email to the copyright file
[18:50] <rickspencer3> 2. $quickly license
[18:50] <rickspencer3> this will add GPLv3 liscense to your code'
[18:50] <rickspencer3> by default, your application is in the Applications -> Accessories category
[18:51] <rickspencer3> you can change this in your appname.desktop.in file
[18:51] <rickspencer3> finally, edit setup.py to add your name, email, a description, a long descriptions, etc...
[18:51] <rickspencer3> this will make your deb a little nicer
[18:51] <rickspencer3> then do
[18:51] <rickspencer3> $quickly package
[18:51] <rickspencer3> and you'll get a nice deb
[18:52] <rickspencer3> QUESTION: Is the license always gplv3 or can you chose any foss license?
[18:52] <rickspencer3> you can choose among a set of FOSS liscenses
[18:52] <rickspencer3> I don't recall which are supported, but I bet that tab completion would show you
[18:53] <rickspencer3> once you have a deb, you can double click on it, and it will install your app in your desktop
[18:53] <rickspencer3> but then if you want to update your app, folks who installed it will have to find your deb and reinstall it
[18:53] <rickspencer3> sux, right?
[18:53] <rickspencer3> that's where PPAs come in
[18:53] <rickspencer3> there are a couple of problematic areas here
[18:54] <rickspencer3> first, PPAs are supposed to be secure, so they use encryption
[18:54] <rickspencer3> encryption means "close is not close enough"
[18:54] <rickspencer3> you have to be very precise in your setup
[18:55] <rickspencer3> here is a quick set of steps:
[18:55] <rickspencer3> 1. create ssh keys as per launchpad instructions
[18:55] <rickspencer3> 2. create pgp keys as per launchpad instructions
[18:55] <rickspencer3> BUT
[18:55] <rickspencer3> be careful here
[18:55] <rickspencer3> Don't use a comment!
[18:55] <rickspencer3> after you have your keys set up, you want to tell your environment what it needs to know to use these keys
[18:56] <rickspencer3> set DEBEMAIL and DEBFULLNAME in .bashrc, the same as what was in your gpg key
[18:56] <rickspencer3> this should match what is in
[18:56] <rickspencer3> match gpg --list-secret-keys
[18:56] <rickspencer3> oops:
[18:56] <rickspencer3> $gpg --list-secret-keys
[18:56] <rickspencer3> so I add this to the end of my ~/.bashrc files:
[18:57] <rickspencer3> export DEBEMAIL=rick.spencer@canonical.com
[18:57] <rickspencer3> export DEBFULLNAME=Rick Spencer
[18:57] <rickspencer3> of course, you need to create a PPA
[18:57] <rickspencer3> if you are using karmic/quickly 0.2.5, name your PPA "ppa"
[18:57] <rickspencer3> any other name won't work
[18:57] <rickspencer3> with 0.4 you can choose the ppa to target
[18:57] <rickspencer3> after you have that set up:
[18:58] <rickspencer3> $quickly share
[18:58] <rickspencer3> that puts your latest code into your PPA
[18:58] <rickspencer3> or
[18:58] <rickspencer3> $quickly release
[18:58] <rickspencer3> does the same but also increments version and makes an announcement
[18:58] <rickspencer3> then folks can subscribe to your PPA
[18:58] <rickspencer3> also, don't forget to use:
[18:58] <rickspencer3> $quickly tutorial
[18:59] <rickspencer3> there is a good walkthrough there for getting an app going, and also some good links
[18:59] <rickspencer3> note that the tutorial is not updated yet for 0.4
[18:59] <rickspencer3> QUESTION: Why we shouldn't use comment when generating our gpg key?
[18:59] <rickspencer3> because the template is not smart enough
[19:00] <rickspencer3> it guesses what key to use based on your name and email
[19:00] <rickspencer3> and the comment confuses it :/
[19:00] <rickspencer3> ok, I guess that's my time
[19:00] <rickspencer3> thanks
[19:00] <rickspencer3> and head to #quickly for more questions!
[19:01] <qense> thank you rickspencer3!
[19:01] <qense> Hello everyone! I'm Sense Hofstede and during the next hour I hope to learn you a bit about using Application Indicators in your application.
[19:01] <qense> [SLIDE 1]
[19:01] <qense> The slides for this session are located at <https://people.ubuntu.com/~qense/appind-session.pdf>.
[19:01] <qense> If you've got a question, don't hesitate to ask in #ubuntu-classroom-chat. Start your question with 'QUESTION:' so it can be found.
[19:02] <qense> [SLIDE 2]
[19:02] <qense> First I'll talk a bit about what Indicator Application is and why you should use it.
[19:02] <qense> After that we'll take a look at an example in Python, which I'm going to use to tell you about the way AppInd works.
[19:02] <qense> Then I'll quickly explain the differences for other languages.
[19:02] <qense> At the end of the session there will be time for questions. If you want to port your or someone else's application to Application Indicator and got a question about that, please save those for then.
[19:03] <qense> It seems that I gave the wrong URL for the slides, people.ubuntu.comd eosn't suppoprt HTTPS, you want <http://people.ubuntu.com/~qense/appind-session.pdf> instead.
[19:03] <qense> Everyone can get the slides now?
[19:03] <qense> [SLIDE 3]
[19:04] <qense> The purpose of Indicator Application is to give you a clean and consistent system tray.
[19:04] <qense> This is done by taking the drawing of the status icon and its menu away from the applications and make them request the Indicator Application service to do it for them instead.
[19:04] <qense> We are very strict, the only action allowed at the moment is the left mouse click, which spawns a menu. That is all, although we might see support for scroll events in the future.
[19:05] <qense> For more information I would like to point you to the links some of you can already see at the slides:
[19:05] <qense> https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators
[19:05] <qense> That is the most important source of information.
[19:05] <qense> And you've got:
[19:05] <qense> https://wiki.ubuntu.com/CustomStatusMenuDesignGuidelines
[19:05] <qense> and https://launchpad.net/indicator-application
[19:07] <qense> [SLIDE 4]
[19:07] <qense> Why should you all use Indicator Application?
[19:07] <qense> One of the reasons is that the protocol we use is an implementation of the notification specification as proposed by KDE and as implemented in KNotify.
[19:07] <qense> This means that  KDE applications using KNotify will show up in GNOME with native GTK+ menus and that applications using Indicator Application will show up in KDE with native Qt menus.
[19:07] <qense> The most important thing, however, is that the tray is now under control of one application, which is much easier to configure and theme.
[19:08] <qense> The behaviour of the tray icons is now consistent so users know what to expect.
[19:08] <qense> If there are any questions about what I've just told, now is the time to ask.
[19:08] <qense> If I'm going too fast, please let me know as well. ;)
[19:09] <ClassBot> stefodestructo asked: does this work in windows and osx?
[19:10] <qense> No, this works only on Ubuntu at the moment, and it could be built on other Linuxes as well. However, there is no port for Windows or Mac OS X and there is nothing like that planned either.
[19:11] <ClassBot> titeuf_87 asked: is this an applet in the gnome-panel or does it actually use the "normal" system tray to display?
[19:11] <qense> titeuf_87: AppIndicator uses the Indicator Applet that was introduced in Ubuntu with the Karmic release.
[19:12] <ClassBot> PaulGit asked: If my application communicates with the indicator applet does it mean it will only run on Ubuntu and not other distros?
[19:13] <qense> PaulGit: Good question. AppIndicator uses the standard KDE proposed at FreeDesktop. This means that anything implementing that standard will support it. At the moment this just are KDE 4 and Ubuntu Lucid. For other distributions you'll need a fall-back, which is integrated in the library.
[19:14] <qense> one last question
[19:14] <ClassBot> liems asked: Is it expected that this will be integrated into other distros?
[19:15] <qense> This depends on the other distributions. The developers are actively working with GNOME upstream, so we'll have to wait what the outcome of that will be.
[19:15] <qense> more on fallback, categories and your other questions later this session
[19:15] <qense> [SLIDE 5]
[19:16] <qense> We're now going to take a closer look at the way Indicator Applications work.
[19:16] <qense> Karmic users wanting to see what's coming next in action need to install AppIndicator from a PPA: ppa:indicator-applet-developers/indicator-core-ppa
[19:16] <qense> https://launchpad.net/~indicator-applet-developers/+archive/indicator-core-ppa/
[19:17] <qense> We're going to walk through an example to get a better understanding of the applet.
[19:17] <qense> At the wiki there are several examples in different languages. I've taken the Python example, adapted it a bit and uploaded it to
[19:17] <qense> http://people.ubuntu.com/~qense/appind-example.py
[19:19] <qense> First we import appindicator module in Python:
[19:19] <qense> import appindicator
[19:19] <qense> The we start with initialising the indicator:
[19:19] <qense> ind = appindicator.Indicator ("example-simple-client", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS)
[19:19] <qense> The first argument is a unique identifier for the application. It is used in the file ~/.config/indicators/application/lru-file.json -- where a few details of the application are saved -- to identify it.
[19:20] <qense> The second argument is the name of the icon that's to be used.
[19:20] <qense> The third argument is a category that at the moment is just saved, but in the future Indicator Application could be extended to present the icons in a better way using that information.
[19:21] <qense> We could e.g. sort the icons on category. Since we communicate with the applet over DBus other applications can listen in as well and process the tray icons if they would wish to. The categories are a possible filter.
[19:21] <qense> However, at the moment the category not used.
[19:21] <qense> You can find a list of possible categories at the wiki page.
[19:22] <qense> The next line of code sets the status:
[19:22] <qense> ind.set_status (appindicator.STATUS_ACTIVE)
[19:22] <qense> There are three possible statuses, STATUS_ACTIVE, STATUS_PASSIVE and STATUS_ATTENTION, their meaning is: show, hide, show with the attention icon, which is set on the next line:
[19:22] <qense> ind.set_attention_icon ("indicator-messages-new")
[19:23] <qense> Again we're using an icon name, at the moment it is not yet possible to set the icon path in the Python bindings, but the developers are working on that bug.
[19:24] <qense> In C# you can provide a path as the fourth argument of the constructor, in C you use the function app_indicator_new_with_path() .
[19:24] <qense> By default we look in the icon theme for the icon.
[19:24] <qense> Next thing we do in the code is creating a GtkMenu, we will later give it to the indicator.
[19:25] <ClassBot> M58 asked: Does it support pixmaps for icons?
[19:25] <qense> M58: It does not, the design team has chosen not to do so in order to make sure the icons blend nicely with the theme.
[19:26] <qense> Again we're taking a bit power away from the application to make sure it integrates a bit nicer into the desktop.
[19:26] <qense> Back to the menu: we tell appindicator about our menu with the following line of code.
[19:26] <qense> ind.set_menu(menu)
[19:26] <qense> Simple, not?
[19:26] <qense> You can reuse existing menus if you want.
[19:27] <qense> Signals connected to the menu items will be sent to their handlers like they would do when the menu was a part of the application.
[19:28] <ClassBot> nadako70 asked: is gtkmenu actually used or is it only a sugar for creating some internal menu structure, so it can be recreated in qt by KDE applet?
[19:30] <qense> nadako70: The menu is sent to libappindicator as GtkMenu and there it is processed as a GtkMenu, but it is sent over DBus in a structure that is toolkit-agnostic so it is drawn by the native GUI toolkit in both GNOME and KDE.
[19:30] <qense> Don't forget to show() the menu items!
[19:31] <qense> The little code I've pasted in this channel are about all method calls you have to make in order to set up an icon in the tray.
[19:31] <qense> Are there any questions about what I've shown so far?
[19:31] <qense> No?
[19:32] <ClassBot> Fredo asked: Are there only two possible icons for an application?
[19:32] <qense> Fredo: Yes, you can chose a default icon and another icon for when you want attention from the user.
[19:33] <qense> There was some discussion about adding a basic function to the library for showing numbers, e.g. on the icon, but I'm not sure if that will get implemented.
[19:33] <ClassBot> dael99 asked: what about adding items and connecting them with functions?
[19:34] <qense> dael99: First you create just a regular GtkMenu like you would do for a GtkStatusIcon, you can often reuse the old menu when porting an application.
[19:34] <qense> You add items, connect signals and then add the menu to the indicator.
[19:35] <qense> [SLIDE 6]
[19:35] <qense> The use of AppInd in other languages is pretty much the same,
[19:35] <qense> in C you initialise the indicator with 'app_indicator_new(const gchar*, const gchar*, AppIndicatorCategory)', in C# with 'new ApplicationIndicator(string, string, AppIndicator.Category).
[19:36] <qense> or, if you want to provide an icon path, you can use app_indicator_new_with_path() in C
[19:36] <qense> You should be able to pass the icon path as the fourth argument of the C# constructor.
[19:36] <ClassBot> NilsR47 asked: Is user choice of having the tray icon or not built in, or do we have to code that ourselves?
[19:37] <qense> NilsR47: Good you mention this. The design guidelines for the use of the AppIndicator ( https://wiki.ubuntu.com/CustomStatusMenuDesignGuidelines ) say that it is preferable to give the user the possibility to hide the icon from the tray.
[19:38] <qense> However, this is not implemented in the applet.
[19:38] <qense> You're kindly asked to provide that option to the user by yourself.
[19:39] <qense> However, since the tray is now controlled by one application it shouldn't be too hard to make it possible for the user to block an application there.
[19:39] <qense> Back to the bindings in C and C#
[19:39] <qense> In C you need to include the following header file:
[19:39] <qense> #include <libappindicator/app-indicator.h>
[19:39] <qense> The pkg-config name of the C bindings is 'appindicator-0.1'.
[19:40] <qense> The package libappindicator-doc contains the documentation for the C library.
[19:40] <qense> In C# you need to import the AppIndicator assambly:
[19:40] <qense> 'using AppIndicator;'
[19:40] <qense> The pkg-config name of the C# bindings is 'appindicator-sharp-0.1'.
[19:40] <qense> Code examples for Python, C and C# -- the only three languages we're providing bindings for at the moment, work on Vala bindings is still ongoing -- can be found at the wiki page I mentioned a few times before already:
[19:40] <ClassBot> bananeweizen asked: I'd like to use the API from Java. What's my best chance to get that working? Implementing a JNI wrapper around the C library?
[19:41] <qense> bananeweizen: I'm not familiar with the procedure of generating Java bindings, so I'm afraid I can't help you with that. I do know that there is no one working on creating them at the moment.
[19:41] <ClassBot> dscassel asked: What's the relationship with the Indictator Applet? Are they going to be folded into Application Indicators? If I just want to say "Hey, there's new stuff!" should I use Indicator Applet or Application Indicators?
[19:43] <qense> dscassel: Although the the Indicator Applet listens to the Indicator Application service (and the users of KNotify) and is responsible for drawing the icons, we haven't put the tray in the indicator applet's envelope.
[19:43] <qense> They're drawn next to it, on the left.
[19:44] <qense> A great resource for all three available bindings for libappindicator is its main wiki page
[19:44] <qense> https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators
[19:44] <qense> it contains an example for all three bindings and an example of Autotools code you can add to your project's configure.ac
[19:45] <qense> Earlier I heard someone ask about the fallback support I mentioned earlier this hour.
[19:46] <qense> For the occasions where the Indicator Applet isn't reachable or when the user has chosen to remove it from her or his panel we provide a default fallback in two functions that can be overriden for those that want to implement a custom fallback.
[19:49] <qense> These functions are in C "fallback()" and "unfallback()" and in C# "ApplicationIndicator.Fallback()" and "ApplicationIndicator.Unfallback()"
[19:49] <qense> However, overriding the ApplicationClass in C# isn't possible at the moment. This is a known bug and we're working on it.
[19:49] <qense> [SLIDE 7]
[19:49] <qense> I've told everything I wanted to tell. Now I'm going to do a little Q&A. If your question doesn't get answered, or if you think of one later, please come to the #ayatana channel.
[19:51] <qense> If you want to use AppIndicator in your application, but need help, now is the time to ask. Later you can also ask in the #ayatana channel or in #ubuntu-app-devel . At 23.00 UTC every night this week there will be a hacking party on #ubuntu-app-devel, that is also a good place to ask.
[19:51] <ClassBot> liems asked: how long until the python bindings are feature-equivalent with the c/c# bindings?
[19:52] <qense> liems: Of course it is impossible to say when specific bugs are fixed and features are ready. However, when the Python bindings lack in comparison with the C/C# bindings that is a bug and I would like to ask you to file it whenever you come across such a thing.
[19:53] <ClassBot> nadako70 asked: offtop: was it inspired by osx? i remember there was some consistency in top panel indicators provided by ichat, their network manager, etc.
[19:55] <qense> nadako70: It is certainly possible that some individuals partaking in the design process were influenced by what they saw on the Mac. However, I'm not aware that this is based on Mac OS's tray or was heavily inspired by.
[19:56] <qense> The inspiration for this was the fact that the tray is too cluttered and doesn't go well with your theme, often.
[19:56] <ClassBot> liems asked: Specifically, I'm interested in knowing when we can expect to be able to specify an icon path in python, and override fallback functions
[19:57] <qense> liems: The goal is to fix as many of these bugs before the release of Lucid. I would recommend you to take a look at the indicator-application project on Launchpad. There is at least a bug report about the icon-theme-path not being supported by the Python bindings.
[19:57] <ClassBot> Fredo asked: So is something like Rhythmbox’ tray icon, with several states like play, pause, stop, etc. out of the scope of AppInd?
[19:58] <qense> Fredo: Rhythmbox is already using AppIndicators. There are different icons used to display the state of the player. For that we use the app_indicator_set_icon() function
[19:59] <qense> You can also call the app_indicator_set_menu() function again when you've updated the menu.
[19:59] <qense> My time's up!
[19:59] <qense> Thank you all for listening!
[19:59] <qense> And next is the incredible doctormo who will tell you more about Ground Control, you've heard a bit about that project already in the previous session.
[20:01] <doctormo> Hello everyone
[20:01] <doctormo> We're here today to talk about Ground Control
[20:01] <doctormo> So who here doesn't know what Ground Control is?
[20:02] <doctormo> OK
[20:02] <doctormo> So traditionally to get into Ubuntu development, where you can collaborate with other members of the community
[20:02] <doctormo> You'd have to set up a launchpad account, set up your ssh keys, learn bzr and do a lot of red tape in the launchpad website
[20:03] <doctormo> The ssh keys was actually the biggest barrier in userbillity studies
[20:03] <doctormo> So what I've done is I've created a project called Ground Control that intergrates into launchpad
[20:03] <doctormo> Sorts out your ssh keys, oauth tokens
[20:04] <doctormo> Automatically
[20:04] <doctormo> Then provides an interface in nautilus for dealing with launchpad projects and bzr branches
[20:04] <doctormo> You can see a demonstration video of the version 1.0 here: http://blip.tv/file/3141629
[20:05] <doctormo> In essence what we want to do is provide a way for _everyone_ to be able to use launchpad and the ubuntu desktop to create projects, get involved with existing projects and just feel more able to grab code and learn form it.
[20:06] <doctormo> Does everyone have ground control installed?
[20:06] <doctormo> https://launchpad.net/~doctormo/+archive/groundcontrol <- you can get it here
[20:07] <doctormo> So the problem right now is that launchpad just changed it's login protocal to openid and groundcontrol is broken.
[20:07] <doctormo> There isn't a lot we can do about that right now and since it's the configuration part, it's fairly useless without it.
[20:08] <doctormo> For those who already had it installed and already logged in, you should be fine.
[20:09] <doctormo> But I'm going to guess that we're all new here.
[20:11] <doctormo> Right, so you can't use it right now no.
[20:12] <doctormo> What we can do though is go through the work flow
[20:15] <doctormo> OK so I've given you guys a couple of mins to finish the video off
[20:16] <doctormo> When you first install GC (ground control), you will find a new menu item in your System > Preferences
[20:16] <doctormo> This ground control configuration allows you to input your launchpad email address and password
[20:16] <doctormo> and have the service activate everything required for development
[20:17] <doctormo> It will also create a ~/Projects directory for you to hold all your projects
[20:17] <doctormo> When you navigate to the Projects directory using nautilus file browser
[20:17] <doctormo> You will see a bar at the top which says that you can [Create Project], [Fix a Bug] or [Fetch Project]
[20:17] <doctormo> This allows you to step onto threee different workflows
[20:18] <doctormo> Creating a project will create the directories locally for setting up your new project.
[20:18] <doctormo> As well as a new trunk branch
[20:19] <doctormo> This you can then start filling in files, and making your project. Once your happy with it, you can commit the code and it will automatically create the project in launchpad.
[20:19] <doctormo> You then can invite other people to download your project and see what you've written
[20:20] <doctormo> Using the Fetch Project button
[20:20] <doctormo> This create a directory for the project and allows you to then download branches of code associated with the project.
[20:21] <doctormo> Don't worry if you don't see Create Project, it's a new feature so older stable releases don't have it yet.
[20:21] <doctormo> After downloading the code they can modify files and commit them back into launchpad under a different name from your trunk branch.
[20:22] <doctormo> Then ground control will offer them a merge request button
[20:22] <doctormo> which sends off a ticket to the original developer saying that this fix or addition is finished and needs to be submitted.
[20:23] <doctormo> If it's your project, then you won't want to merge in your own changes, but instead will be merging in other peopole's
[20:24] <doctormo> For that there is a button [Merge In] which allows you to see a list of all the merge requests and select from them which should be merged in and tested locally by you.
[20:24] <doctormo> Once your happy with the modifications someone els ehas made
[20:24] <doctormo> You can commit them like you usually would using the [Commit Changes] button.
[20:25] <doctormo> The [Fix Bug] button is a special workflow
[20:25] <doctormo> It allows you to select from a list of a project's open bug reports and have it download the trunk branch in preparation for you to try and fix it.
[20:26] <doctormo> When you've fixed it, it commits the code, attaches the branch to the bug report and uploads the code with a merge request all in one action.
[20:26] <doctormo> Any questions so far?
 QUESTION: Does [Fix Bug] install packages required to build the project?
[20:27] <doctormo> M58: No, not yet, but there are plans afoot for that.
 doctormo, I  already have a dir called ~/Projects, does this directory only have to have code for Ground Control or is it happy to co-exsist ?
[20:27] <doctormo> You can have an existing Projects directory, it won't interfere.
[20:28] <doctormo> It's based on context, so if you put the .groundcontrol file into another directory, you'll then be using that directory as your base of operations.
 QUESTION: When I hit [Fix Bug] is there anyone informed about my try to fix this bug? I mean, what happens if I just decide to leave it alone, will someone wait for me to fix this bug?
[20:30] <doctormo> doliomp95: There is no notification in the bug report that you've downloaded the code to fix the bug. Not until you've submitted the fix will it notify anyone.
 QUESTION: Is there any "sandbox" project for people wanting to try ground control for the first time? I really want to change typos, missing translation markers and other things in some projects but I'm afraid of making errors in the process.
[20:32] <doctormo> bananeweizen: Don't worry! when you upload your fix it goes into it's own seperate branch, no matter how baddly you foul it up in your first fix, the developers will let you know that _your_ branch is broken in some way and how to avoid it in future.
[20:33] <doctormo> bananeweizen: You can then redownload the branch and try and fix it again, or correct the problems in your first one
[20:33] <doctormo> Because the code your submitting is your own personal copy
[20:33] <doctormo> It doesn't interfere with the originals
[20:34] <doctormo> Only once your fix is good, working etc will the developers merge in your changes to their central development branch.
 Is there a KDE version?
[20:36] <doctormo> M58: Not yet, KDE is very different and if the project had been made to work on both it might not have been possible.
[20:36] <doctormo> M58: I don't know if a KDE version is possible, but the project would need a dedicated kde developer to kick it off.
 QUESTION: How long will it be until new users are able to log in, fo you think?
[20:37] <doctormo> wilsonliam: I'm hoping to get the bug fixed today or tomorrow and then put a release out of 1.6
[20:38] <doctormo> If you can all sign up to my blog http://doctormo.ubuntu-ma.us you'll get a notification when it's done.
[20:38] <doctormo> and I am sorry about that, it's a very recent change in launchpad and it just goes to show.
[20:40] <doctormo> OK so are there any other questions about workflow, bzr, launchpad or functionality?
 QUESTION: how developers merge code? Launchpad provide any tool for that you it is done via GC?
[20:43] <doctormo> w1nGNUtz: Developers can merge in code using the [Merge In] button that appears in your directory when you have commited all your changes and you own the branch (it's important thtat you own the branch)
 QUESTION: for more popular projects, what will happen if there are tons of branches from people messing around with it but abandon those branches? Will they just stay there?
[20:43] <doctormo> titeuf_87: All branches will stay, but most branches will get marked as abandoned and so won't appear in the listings.
 QUESTION: What if there is conflict during merge?
[20:45] <doctormo> M58: Currently you will have to resolve conflicts manually.
[20:46] <doctormo> But there is already an open bug report for it https://bugs.launchpad.net/groundcontrol/+bug/514531
 QUESTION: Is there any way to update the baseline like, svn update for svn?
[20:46] <doctormo> w1nGNUtz: There is an [Update] button that appears when you have no local changes, this allows you to re-pull to the parent.
[20:47] <doctormo> OK we got 10 more mins of questions, or I can worrble on about how great ground control is :-) ... will be when it's fixed.
[20:49] <doctormo> So what we're hopefully going to be able to do with ground control, is develop a real difference in the way we get people collborating
[20:49] <doctormo> Because we want graphics project, writing projects, all sorts of ubuntu projects that isn't just related to programming
[20:51] <doctormo> Now, one feature which I haven't explained yet, is for project managers. This allows you to specify script actions for your branches, so for isntance if you get the loco directory project code, it has a button to sync the database or run the server. These are configured in a .gcfunctions file int he code.
[20:51] <doctormo> You can see this explained here: http://doctormo.ubuntu-ma.us/2010/02/15/groundcontrol-1-5-%E2%80%93-custom-scripts-and-bug-fixes/
 QUESTION: Say if you and someone else are working on the same branch, and you both commit the changes at a similar time, would this cause a conflict, or would it merge the two together?
[20:52] <doctormo> wilsonliam: If you are both working on the same branch (which you shouldn't be) one of you will experence an error saying that your local copy isn't up to date
[20:53] <doctormo> wilsonliam: Then you will have to press the [Update] button to merge back in all changes just made and hopefully you won't get any conflicts. But it's the Update section is where you will experence those.
[20:53] <doctormo> Once your up to date, you can commit and push as you normally would.
[20:54] <doctormo> OK, 5 more minutes.
[20:55] <doctormo> I think we're done here then. Thank you all for coming and asking such good questions
[20:55] <doctormo> I'm sorry about the breakage, hopefully when it's fixed you'll give it a go and let me know what you think.