=== ghostcube_ is now known as ghostcube [09:15] (ping) [09:30] pong === _jmp__ is now known as _jmp_ [14:23] quit === raju1 is now known as genupulas === Guest47819 is now known as tviking [15:54] hi all, is everyone ready for the first day of Ubuntu App Developer Week? [15:54] Yes! [15:54] :) [15:55] yess :) [15:55] Yep!! === dmitry is now known as Guest95437 [15:56] awesome :) [15:59] Let's give a warm welcome to Jonathan Lange (jml), who'll be opening the UADW with a talk about the app developer strategy for Ubuntu [15:59] Hello and welcome to App Developer Week! [15:59] As dpm said, my name's Jonathan Lange. [15:59] I work at Canonical. [15:59] For most of the last five years I've been working on Launchpad, but recently I've started working on the Ubuntu developer programme [15:59] Which has been really fun. [16:00] We believe that to get Ubuntu from 20 million to 200 million users, we need more and better apps on Ubuntu [16:00] And in fact, more than that, that we need a thriving ecosystem of applications on Ubuntu [16:00] skype:johnoxton.co.uk [16:00] skype:elachuni [16:00] Two simple goals: [16:00] 1. More and better apps on Ubuntu [16:00] dpm: hello :) [16:00] 2. Thriving ecosystem === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: App Developer Week - Current Session: Making Ubuntu a Target for App Developers - Instructors: jml [16:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/05/%23ubuntu-classroom.html following the conclusion of the session. [16:01] *ahem* [16:01] I guess I started early [16:01] anyway, for those that turned up late, my name is Jonathan Lange and I work at Canonical trying to make it possible to have many more and better apps on Ubuntu [16:02] so we can get a heap more users :) [16:02] To get more and better apps, we need to have more developers -- the kind who are writing apps for Windows, OS X, iOS and Android -- to think of Ubuntu as a platform to develop for. [16:02] There are a lot of bits to that. [16:02] One is actually making some place that app developers can go to in order to learn how to develop for Ubuntu === david is now known as Guest1487 [16:02] A bunch of folk at Canonical are working on that now, and you'll see their results on developer.ubuntu.com in the next few weeks. [16:03] Also, on Thursday, there's a talk about how they are doing the work [16:03] see the schedule in the topic for more details [16:03] (btw, ask questions on #ubuntu-classroom-chat and I'll answer at the end of the talk) [16:03] Another part is actually *defining* some sort of platform for developers to target. [16:03] Which is really, really hard. [16:04] Part of the glory of Linux is that there are so many choices at practically every level of the stack. [16:04] Roll your own daemon? Use upstart? Use launchd? Use systemd? [16:04] Want a GUI? Use Qt or GTK+? Is that Qt with QML or standard Qt? PyGTK or PyGI? [16:04] Oh, you want an IDE? What, isn't vim good enough for you? Well, I guess there's umm... [16:04] Eclipse, and Anjuta maybe. [16:04] Lots and lots of choices. [16:04] Also, neither Ubuntu nor Canonical really has any control over them [16:05] We "just" import the best open source software and integrate it really well. [16:05] So that's a really tough problem, and if you've got any great ideas I'd love to hear them. :) [16:05] Hmm. This is getting rambly. [16:05] Time for a list [16:06] To make Ubuntu a proper, first-class developer platform, we need three things: [16:06] a) a place -- developer.ubuntu.com [16:06] b) a definition -- ??? [16:06] c) a channel [16:06] By "channel", I mean a smooth, short, safe path from developers to their users and back again. [16:06] At one end of the path is a developer who has just released a gold version of their app (or game or what-have-you) [16:06] At the other end is a user who has just installed that app and is happily running it for the first time [16:07] As a developer, I want to get from the first end to the second end as quickly as possible [16:07] This is for two reasons [16:07] The first is that a large part of the reason I write software is to have people _enjoy_ it. They can't do that until it's installed and running on their system. [16:07] True fact. [16:07] The second is that they probably won't give me any money until then, and I need money to fund my software writing habit. [16:07] As a user, I want the same things, sort of. [16:08] I want to get the latest apps and the latest updates for apps as soon as they are available. I don't want to wait. [16:08] Also, if I have to pay for software, then I want it to be smooth, easy and safe, and I most definitely want it to go to the right person. [16:08] And it's around this channel that a lot of exciting work is taking place [16:09] Trying to make it smoother, shorter & safer both ways. [16:09] Let's be more specific [16:09] At the user end, we have the Software Center. [16:09] [16:09] There are a bunch of people working on this (mvo, tremolux, achuni, noodles, mpt, etc.) [16:09] And it's a huge part of what we need to make Ubuntu a more attractive target for developers. [16:10] If people can't figure out how to find the app they want, install it and run it, then there's no point in writing apps that they want, is there? [16:10] There's also a bunch of associated stuff like ratings and reviews that fit in here. [16:10] On the other end, the developer end, things are (to me) a little more interesting [16:10] First up, Ubuntu's release cycle means that it takes between three to nine months to go from "released application" to "application in released Ubuntu" [16:11] And if the Software Center only has apps that are in the released Ubuntu, that means 3-9 months before I can get *any* feedback from users [16:11] Which is rubbish. [16:11] (Well, thinking only as a developer who wants people using their app. The full picture is somewhat more nuanced.) [16:11] Luckily, there are ways to get applications into the Software Center more quickly than that. [16:11] If it's a paid app, then they can be submitted through . [16:11] That can be if they're libre or proprietary. We don't care, as long as they are charged. [16:12] More info tomorrow at 1900 UTC. [16:12] If it's a free, libre app, then they can be submitted through the Ubuntu Application Review board [16:12] I don't have a URL for that -- they are elusive folk [16:12] (maybe someone else here does?) [16:12] But you can get more info tomorrow at 2000 UTC [16:13] All of this gets us the "short" part of that "smooth, short, safe" path I talked about [16:13] url for ARB -- https://wiki.ubuntu.com/AppReviews [16:14] But before *any* software can be installed from the Ubuntu Software Center, it has to be packaged. [16:14] And frankly, many developers have neither the time nor the inclination to do so. [16:14] ali1234 asked: What about unpaid, proprietary apps? [16:15] ali1234: They are a special case, and generally the authors of those have to speak directly to Canonical. I *think* (but am not 100% sure) that Skype is an example of this. [16:15] Andy80 asked: are you already in touch with Rovio guys? I'd like to have Angry Birds in Ubuntu. I can ask one of them if you want or make them and Canonical be in touch. [16:16] Andy80: thanks. I'm pretty sure that Canonical has already been in touch with them. That'd be a great question to ask John Pugh in his session on Friday. [16:16] ali1234: I think the partner repo is the current mechanism for getting unpaid, proprietary apps into Ubuntu [16:16] ali1234: and if there are plans to change that, no one has told me. [16:17] fwiw, Canonical's interest is in paid stuff, because we keep some of that money, and libre stuff, because we love open source and think it's vital to a sustainable platform. [16:18] (he says, very broadly, as an informed engineer who doesn't make business decisions) [16:18] anyway, where was I [16:18] packaging! [16:18] Lots of developers never ever want to do it. [16:19] The Angry Birds guys, for example, probably never want to read the Debian policy manual [16:19] (which has twelve chapters and seven appendices, just so you know) [16:19] This makes that "smooth, short, safe" path I mentioned earlier a lot more rough and full of potholes [16:19] Most of the work that I am doing currently is in making that smoother. [16:20] I've been taking the great work that james_w has done on pkgme (http://pkgme.net) [16:20] and have been making it automatically package binary tarballs [16:21] since that's what we're getting when most people submit their apps to us [16:21] We've got the proof-of-concept done [16:21] ... and written up a spec: https://wiki.ubuntu.com/AutomagicBinaryPackaging [16:21] And achuni's team have started adding hooks into myapps.developer.ubuntu.com [16:22] so the idea will be that people can submit binary tarball over the web, and then they'll be automatically packaged, put into a PPA and queued for testing [16:22] without the developer having to know anything about it [16:23] pkgme is pretty generic, so we're also hoping (slightly longer range) to allow more "backends" than just binary tarball [16:23] Python apps, Ruby apps, HTML 5 apps etc. [16:23] for commercial apps, there's currently a very short turn-around time to getting them reviewed & approved [16:24] for gratis+libre apps, it's a bit longer, but the ARB is working on that. [16:24] (More info tomorrow at 2000 UTC w/ stgraber) [16:24] There's a whole bunch of questions that will need to be answered [16:25] A big one is safety [16:25] * jml decides about answering questions [16:26] OK. But I really want to talk about safety and other controversial subjects :) [16:26] Andy80 asked: to make developers life easier, what do you think about preparing a better documentation for "Ubuntu API" ? I make you a clear example: without the suggestion from Andrea Azzarone I would never know that there was an "EmptyTrash" d-bus method exposed by Nautilus 3 :P luckly he told me about it and I was able to work on a bug in few hours. [16:26] Andy80: heck yes. [16:26] Andy80: we're hoping to start that sort of documentation with developer.ubuntu.com in the next few weeks [16:26] Andy80: there are some things that make it complicated though [16:27] 1. We have to make opinionated choices about what to document [16:27] e.g. the ayatana notification bubble thingy is an obvious thing to document and call part of the "Ubuntu API" [16:28] but when we pick Nautilus, we're implicitly saying that KDE isn't part of that Ubuntu API [16:28] which is maybe fair enough [16:28] the more options we provide, the more documentation we need to write *and* the more confusing that documentation becomes [16:28] 2. There's a *lot* of stuff to document [16:29] So it's going to have to be a Canonical + community effort. It's just too big a challenge. [16:29] 3. It's got to be well coordinated and curated [16:30] The last thing we want is a wiki full of docs that are of dubious quality & currency, and aren't findable. We want something that's better than MSDN, the Java docs, Android docs etc. [16:30] 4. It's hard to guarantee such an API long term [16:31] since we don't write the libraries, often. === Kroosec is now known as Mipixal [16:31] As an example, my friend & colleague ev has been porting a bunch of stuff from PyGTK to PyGI recently [16:31] not because he wants to, or because it's fun, or even because it will provide a better user experience [16:32] it's because PyGTK isn't supported any more for GTK3+ and PyGI is. [16:32] That's a change in API that's beyond our control [16:32] Ok, and last one... [16:33] 5. To document something you have to figure it out [16:33] and that can often take some time. e.g. rickspencer3's recent posts to planet about how to copy and paste in GTK+ apps, or drag and drop. [16:34] Andy80: so yes, we'd love to do it, and in a few weeks when the new d.u.c is up, that will be the very beginning. [16:34] and we'll need your help. [16:34] OK. [16:34] So we talked about how we're smoothing the path from user to developer by automatically packaging [16:35] And how we're shortening it by enabling app authors to get their app onto stable versions of Ubuntu [16:35] through either the ARB or myapps.developer.ubuntu.com [16:35] I want to say a very little about how we're going to make it safe(r) [16:35] Hmm. [16:35] How do I put this [16:36] If there's one thing we can learn from Windows, it's that it is a bad idea to let people download random crap from the Internet and then run it. === AMedOs_ is now known as AMedOs [16:36] And if we allow app authors to just write stuff and get it into the software center, then we have that problem [16:37] "Review" and "testing" can't be the answer [16:37] Some random website I looked at, which is therefore totally trustworthy, said that the iPhone app store gets over 1000 new apps submitted per day [16:38] I want Ubuntu to be that popular for app authors [16:38] But I also want Ubuntu to be the stable, trusty, well-integrated system that I know and love today. [16:39] there's always going to be a lot of tension here [16:39] but there's some technical stuff we can do to reduce that tension [16:39] which is application isolation [16:40] What we'd like to do (and this is all very vague atm) is have some way of automatically (maybe?) wrapping applications up in some sort of container so we can trust them to not do damage to the system [16:40] Either accidentally or intentionally [16:40] (actually, "accidentally" is probably the best thing to aim for. It's almost impossible to stop someone messing with your computer deliberately if you are running their code and they want it badly enough) [16:41] Arkose (https://launchpad.net/arkose) by stgraber has made some great strides here [16:41] I'm looking forward to playing with it (shamefully, I haven't yet), and maybe integrating it into pkgme or something similar [16:41] Which would go some way to making that path safer. [16:42] Andy80 asked: don't you think that "isolating" apps could make applications only compatible with Ubuntu? For example if someone makes an application that works on 99% distro BUT it requires more coding to be compatible with Ubuntu, the developer would say: ok.. I don't release it for Ubuntu. [16:42] Andy80: hmm. possibly. [16:43] Andy80: I think there are a couple of things that would help there. [16:43] first is that no one seems to have a problem with open source apps running uncontained [16:43] because there's a chance to figure out what they are doing [16:43] and so, I doubt anyone would push too hard for a mandatory containment policy for open source apps [16:44] second, I think we can make it very little work [16:44] just specifying what the app needs. [16:45] third, to some extent, if you want to write a desktop app for linux *and* you want users, you probably want to make it work for Ubuntu [16:45] but we can't rely on that. [16:46] fourth, I hope that the benefits would be really obvious and that the idea wouldn't be too unfamiliar. [16:46] I don't have an iPhone, but my Android phone has already made this concept pretty familiar to me. [16:46] Mipixal asked: Isn't AppArmor an answer to wrapping applications ? [16:46] Mipixal: yes. Or rather, it's part of the answer. [16:47] Mipixal: the security folks I've spoken seem to be leaning towards some combination of AppArmor and Arkose [16:47] spoken *to*, rather [16:47] hmm. [16:48] I think that's pretty much it. [16:48] The idea is that with all of these pieces in place -- software center, developer portal, a defined platform, automagic packaging, safe mechanisms for distributing new apps & paying developers -- then Ubuntu becomes something that developers can seriously start to target [16:48] Any more questions? [16:49] mohammedalieng asked: what about making an Ubuntu IDE, that's the default IDE for creating Ubuntu apps ? [16:49] There isn't currently a default IDE. [16:50] It would be a great thing to have something that is to Ubuntu what Xcode is to OS X [16:50] However, I'm not going to write one :) [16:50] And I don't know of anyone with serious plans along these lines. [16:50] There are 10 minutes remaining in the current session. [16:50] I would suggest that the best place to start is by making one of the existing IDEs better. [16:51] Right, eclipse would be a great place to start. [16:51] samtay asked: What about adding a donate button on open source projects in Ubuntu Software Center? [16:51] +1 We want that so badly. [16:51] But I don't know where it sits on the roadmap [16:51] ali1234 asked: What is the revenue split for paid apps? [16:52] Canonical passes on 80% to the application author. [16:53] I guess one thing I'd add, reminded by bUbu87's comment [16:53] is that if we want way more apps [16:53] we need way more developers [16:53] and they will probably be people who are new to Ubuntu and the UNIX way of doing things [16:54] people who look at me funny when I say I use emacs [16:54] and make jokes about whether I bang rocks together to make fire also [16:55] so part of who we're trying to appeal to now are the developers who are not yet using or even thinking of Ubuntu [16:55] Anyway, that's it from me. [16:55] Oh. Crap. [16:55] One more thing [16:55] There are 5 minutes remaining in the current session. [16:55] If you want, you can sell your libre application on the software center [16:55] rickspencer3 is doing this with photobomb [16:56] the code is fully available, there's a public ppa [16:56] and that's one hack you can do if you want donations [16:56] OK. That's really it. [16:56] Ciao [16:56] [] === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: App Developer Week - Current Session: Introducing Bazaar Explorer: Version Control for your Apps - Instructors: Riddell [17:00] Thanks jml for a great session! [17:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/05/%23ubuntu-classroom.html following the conclusion of the session. [17:01] Next up is Jonathan Riddell, the Kubuntu rockstar who's on his way of becoming a bzr rockstar this cycle too [17:01] good day everyone [17:02] I'm going to give an introduction to Bazaar Explorer [17:02] and convince you it's a developer tool everyone should use [17:02] you can follow along by following the images at http://ec2-184-72-177-203.compute-1.amazonaws.com/owncloud/ [17:02] access with guest/guest [17:03] Bazaar is the world's finest revision control system [17:03] if you're coding on files, or even have any non coding files you should use it to keep track of them [17:03] it's fully distributed so you can use it to collaborate with others very easily [17:04] you don't need a fancy server to use it, it works locally fine [17:04] but it's also easy to put on a server, http or ssh is all you need [17:04] if you don't want it distributed you don't have to [17:04] and it's designed to be easy to use for people familiar with CVS or Subversion [17:05] it gives the full power of tools like git but it's understandable to people other than Linus [17:05] it's used everywhere in ubuntu [17:05] to store all our packaging and code [17:05] and it's used in large projects like mysql [17:06] most people will be familiar with Bazaar through bzr, the command line interface [17:06] command line interfaces are great for those of use who are comfortable with command lines [17:07] but as Ubuntu spreads out amongst non-geeks we need it to be available to everyone [17:07] and besides sometimes GUIs are just better even for hardcore geeks [17:07] so Bazaar Explorer is the GUI for Bazaar [17:07] well I should say it's /a/ GUI for Bazaar [17:07] but it is by far the most complete [17:08] bulldog98 asked: what toolkit is it written in? [17:08] it's written in Qt with Python [17:08] an excellent choice for writing any GUI application [17:09] Qt means its cross platform so it runs anywhere [17:09] Python means its easy to fix and improve [17:09] you can install it from any package manager [17:09] sudo apt-get install bzr-explorer will do it [17:10] and run it from the application menu where it's listed as Bazaar Explorer [17:10] or from a command line as: bzr explorer [17:11] when you start it, it'll look like the image 01 on that owncloud server or http://www.flickr.com/photos/jriddell/6116796188/in/photostream [17:11] actually if you've never used Bazaar before it'll probably prompt you for your name and e-mail first [17:13] bulldog98 asked: what toolkit is it written in? [17:13] bulldog98 asked: why does the oneiric package depends on tango? Can’t oxygen be used? [17:13] hmm, this bot is fiddly [17:13] it uses Tango icons, there's not currently an option to use Oxygen icons I'm afraid [17:13] fixes welcome :) [17:14] let's use bzr explorer to get some code [17:14] http://www.flickr.com/photos/jriddell/6116252311/in/photostream shows us going to the "Get project sources from elsewhere" tab [17:15] I want to branch a project to make a change to it [17:15] so I click on the Branch button and enter into the address box lp:ubuntu-cdimage [17:15] http://www.flickr.com/photos/jriddell/6116802008/in/photostream [17:15] you can host Bazaar branches anywhere but one of the most common places to do so is in Launchpad [17:16] which hosts any free software project for free, how very generous [17:16] Launchpad branches have a nice shortcut to their location which is lp: [17:16] and in this case I'm wanting the trunk from the ubuntu-cdimage project [17:16] so I tell it to branch that code [17:17] http://www.flickr.com/photos/jriddell/6116257777/in/photostream [17:17] ah but wait, what's this, which I like to initialise a shared repository? [17:17] bzr is so good at making branches that it's common to make a new branch for any notable change [17:18] then you can edit the branch with out worrying about mistakes [17:18] and merge it into the main branch when you're happy [17:18] this leaves a load of branch directories around on your hard disk [17:18] which might be wasteful of disk space [17:19] so a shared repository will share all the history which is the same in your branches [17:19] so yes we do want to make the shared repository [17:19] a new dialogue box pops up http://www.flickr.com/photos/jriddell/6116801334/in/photostream/ [17:20] we let it do its initialisation then we get the branch we want http://www.flickr.com/photos/jriddell/6116800620/in/photostream/ [17:20] an voila, bzr explorer is ready to work on this branch http://www.flickr.com/photos/jriddell/6116800344/in/photostream/ [17:20] I can’t see a pic in the owncloud server [17:21] well just use the flickr images, they're the same [17:21] if you look in a file manager it will have made a ubuntu-cdimage/ directory and within it a trunk/ directory [17:22] the ubuntu-cdimage/ directory is our shared repository and the trunk/ directory is our branch we just made [17:23] in the bottom right of Bazaar Explorer is the working tree, you can open files from there to edit them if you wish [17:23] or open the whole directory in a file manager or an IDE [17:23] today I'm going to add a new Ubuntu flavour [17:23] Bazaarbuntu! [17:23] it's going to be the distro to take over the world [17:24] so I'll edit the file in ubuntu-cdimage to start making those CD images http://www.flickr.com/photos/jriddell/6116800100/in/photostream/ [17:25] having made the edit the Bazaar Explorer page will refresh to note that I have changes [17:25] (if it doesn't automatically refresh then you have a version without my automatic refresh patch, you can click the "refresh" button) [17:25] if I want to see my changes I can click on Diff http://www.flickr.com/photos/jriddell/6116255747/in/photostream/ [17:26] and if I want to save the change to the Bazaar repository I can click on commit http://www.flickr.com/photos/jriddell/6116804398/in/photostream [17:27] this will save the change to my local branch [17:27] but now I want to publish the change to the wider world so I need to push it to another location which is publically available [17:27] http://www.flickr.com/photos/jriddell/6116803820/in/photostream/ [17:27] there I'm pushing it to a branch on Launchpad [17:29] so now anyone can see my branch on the web https://code.launchpad.net/~jr/+junk/bazaarbuntu [17:29] and anyone can download it or review the change [17:29] Bazaar Explorer can access most of the functions of bzr, such as looking at the log of commits [17:29] http://www.flickr.com/photos/jriddell/6116803174/in/photostream/ [17:30] http://www.flickr.com/photos/jriddell/6116258943/in/photostream/ [17:30] infact it can access all the functions of bzr because if there's a bzr command without a gui you can use the "All" option to run it [17:31] if I want to make more complex changes I probably want to make a new local branch http://www.flickr.com/photos/jriddell/6116802386/in/photostream/ [17:32] and work on that, then merge it in to trunk when I'm happy [17:33] of course you don't always care about having branches [17:34] you might prefer to work more like subversion or cvs where you just checkout directly from the server [17:34] and commit directly back [17:34] Bazaar and Bazaar Explorer support this [17:34] back on the welcome page i click Checkout http://www.flickr.com/photos/jriddell/6116798884 [17:35] here I checkout the ubuntu seeds [17:35] I make my change (adding bzr-explorer) [17:35] and commit directly back http://www.flickr.com/photos/jriddell/6116798624/ [17:35] that's working with existing projects [17:36] but we are App Developers and we want to make our own projects! [17:36] the Welcome page has a "Start a new Project" tab [17:36] http://www.flickr.com/photos/jriddell/6116798364 [17:37] I initialise a new project [17:37] there's a few options for what sort of branch you want, Feature Branches is the best sort for most cases [17:37] that'll make a shared repository and a trunk branch inside it [17:38] http://www.flickr.com/photos/jriddell/6116798064 [17:38] this takes us to a new page which lists the available branches [17:38] from here we can open a branch or make a new one [17:39] as a new project working on trunk is expected so we can add our files http://www.flickr.com/photos/jriddell/6116254211 [17:39] and commit them http://www.flickr.com/photos/jriddell/6116253927 [17:39] http://www.flickr.com/photos/jriddell/6116797120 [17:39] and if I wanted I could push it to Launchpad or anywhere else [17:40] bazaar explorer is awesome! [17:40] why thank you trinikrono, free hugs to you [17:40] now I said that Bazaar is used throughtout Ubuntu [17:41] we now have (almost) every ubuntu package kept in a Bazaar branch [17:41] so you can use Bazaar Explorer to branch any Ubuntu package if you feel the need to fix it or otherwise look at the source code [17:41] http://www.flickr.com/photos/jriddell/6116796880 [17:42] here I'm getting the code to Ubuntu's choqok package [17:42] by branching ubuntu:choqok [17:42] which gives me the code to work on http://www.flickr.com/photos/jriddell/6116796608 [17:42] bUbu87 asked: so upstream development just maps to pull requests on the package's launchpad branch? [17:43] bUbu87: you're talking about the Ubuntu package branches? Those are imports of packages in Ubuntu so they're not the upstream development branch [17:43] so if you want to fix a problem which is specific to ubuntu then use those [17:44] if it's a general problem in the program then use the normal upstream code whereeever that is kept [17:45] Bazaar Explorer is a nice GUI which works along with your IDE or file manager/text editor for working with code in Bazaar branches [17:45] there is a half way between the GUI and command line interfaces [17:46] which is to launch QBzr commands directly from the command line [17:46] so if you're into using command lines but want an easier way to, say, browse a branch history you can run [17:46] bzr qlog [17:46] instead of bzr log [17:46] which will give you a GUi to look at the log [17:47] I use this a lot whenever the history is more complex than straight commits [17:48] the same goes for bzr qcommit or bzr qbranch [17:48] it's a nice alternative for when the command line is showing its limitations [17:48] dpm asked: are there Bazaar Explorer packages for platforms other than Ubuntu? (e.g. Win, Mac...) [17:49] if you install Bazaaron Windows the installer comes with explorer [17:49] same for Mac I'm sure [17:49] so it's actually the main UI for non-Linux users [17:50] which is why if you follow the Take the Tour link on http://bazaar.canonical.com/en/ it shows you Bazaar Explorer [17:50] that's all I have prepared, any other questions? [17:50] There are 10 minutes remaining in the current session. [17:51] bulldog98 asked: will there be a port to freedesktop icon usage? [17:51] I see this is an important issue for you :) [17:52] I think when Bazaar Explorer was started Tango was the obvious choice [17:52] since then Oxygen has come along and the freedesktop icon standard is more available [17:52] but I don't think freedesktop icons are built into Qt so there's a little bit of code needed there [17:53] do file a bug if it's something you want done and hopefully we'll get round to iy [17:53] it [17:53] dpm asked: apart from Bazaar Explorer, are there other recommended graphical tools? I.e. I know there's qbzr and bzr-gtk, but I don't know if picking one over the other is a matter of choice or whether there is a recommended one to use [17:53] qbzr is the GUi for individual commands [17:53] e.g. bzr qlog [17:54] when you ask Bazaar Explorer to show you the branch log it will run QBzr's qlog [17:54] you can also tell Bazaar Explorer to run bzr-gtk commands instead of QBzr if you really want [17:54] but QBzr is generally better maintained and is the default [17:55] the other main graphical tool is Loggerhead which is the web UI [17:55] There are 5 minutes remaining in the current session. [17:55] elite Bazaar hackers recently changed that from spitting out HTML directly to spitting out JSON so it's now a lot more flexible as a way of making UIs [17:56] e.g. Launchpad can now show you a recent changes diff for merge proposals [17:56] there's some other UIs such as my own Dolphin Bazaar plugin for KDE's file manager [17:56] and there's even some experimental integration with Qt Creator [17:57] bulldog98 asked: is there a graphical way to see my bazaar config, eg what bazaar plugins are run after a commit (cia-client?) [17:57] The settings menu lets you change your Bazaar config [17:58] but it doesn't do everything from a GUI [17:58] User Configuration has your user setup [17:58] but stuff like cia plugin config can only be done with editing a text file for now (Settings -> Locations) [17:59] Bazaar Explorer is extendable so it should be possible for the bzr-cia plugin to add that [17:59] Mipixal asked: What about Bazaar branches that are mirrored from other sources (not hosted on Launchpad). Does pushing commits make them available only on Launchpad or to original sources too ? [18:00] it depends where you push them [18:00] if you push them back to where you got it from then it'll be available in the same place [18:00] if you push it to Launchpad it'll be available on Launchpad [18:00] there's no fixed tie in between bzr and Launchpad [18:00] it's just that Launchpad has been designed to work very well with Bazaar === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: App Developer Week - Current Session: Your App and Launchpad best practices - Instructors: jderose [18:00] time up! [18:00] Thanks Riddell for a really awesome session - even with pictures! [18:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/05/%23ubuntu-classroom.html following the conclusion of the session. [18:01] Next up is Jason DeRose, of Novacut fame, who'll be talking about how to make the best use of Launchpad for your project [18:01] jderose, the floor is yours! [18:01] dpm: thanks! [18:01] Hello everyone! My name is Jason Gerard DeRose. [18:02] True story: I include my middle name so I'm not confused with the Jason DeRose who is a reporter for NPR :P [18:02] I'm the lead Novacut developer: https://wiki.ubuntu.com/Novacut [18:02] The Novacut project uses Launchpad extensively. [18:02] I also think Novacut uses Launchpad rather well, thanks to rockstar (aka Paul Hummer): https://launchpad.net/~rockstar [18:02] About 8 months ago, rockstar was kind enough to spend a few hours schooling me on Launchpad best practices. [18:03] rockstar gave me an opinionated recipe that allowed Novacut to use Launchpad well from the start. [18:03] So that's what this session is about: Launchpad best practices, boiled down into a step-by-step recipe that you can use in your own project. [18:03] rockstar's advice is too good not to share, plus I'm going to share some of my own lessons. [18:03] I have the session split into 3 sections: [18:04] (1) Why host your upstream app on Launchpad? [18:04] (2) Setting up your app on Launchpad [18:04] (3) Using Launchpad to engage developers [18:04] Please feel free to ask questions at any time in #ubuntu-classroom-chat, plus I'll have some time at the end devoted to questions. [18:04] Okay, here we go! [18:04] == Why host your upstream app on Launchpad? == [18:05] Question: why host on Launchpad instead of, say, github? [18:05] Answer: PPAs, Daily Builds, and tens of millions of Ubuntu users! [18:05] I'm a firm believer in getting reality checks from your target users as often as possible. [18:05] You don't want to do too much development before getting that software into your target users hands. [18:06] Otherwise you're almost certain to get off track. [18:06] And assuming your target user isn't "geeky developers", it needs to be easy for your users to install your app and get updates. [18:06] PPAs (Personal Package Archives) are fantastic for this. [18:06] PPAs are easy enough to add that I think whoever your target user is, a decent percentage will be comfortable adding your PPA and using your app that way. [18:07] For example, Novacut has a Stable Releases PPA where we publish our monthly releases: [18:07] https://launchpad.net/~novacut/+archive/stable [18:07] Novacut also has a Daily Builds PPA where we publish automated daily builds of all our components: [18:07] https://launchpad.net/~novacut/+archive/daily [18:08] We do our daily builds using the amazing and totally fantastic Source Package Recipes! [18:08] Which are a relatively new Launchpad feature: https://help.launchpad.net/Packaging/SourceBuilds [18:08] For example, this is the recipe for the dmedia daily build: [18:08] https://code.launchpad.net/~novacut/+recipe/dmedia-daily [18:09] Now you don't need (nor want) your entire user base using your daily builds. You just need a representative sample. [18:09] And, again, I feel PPAs are easy enough to add to the software center that you get that representative sample [18:10] Daily builds are also a great convenience for developers and in my experience are quite effective developer outreach. [18:10] Daily builds also help keep your trunk in a high-quality, releasable state. [18:10] Thanks to something I learned from Barry Warsaw during the previous Ubuntu App Developer Week, we even run our Python unit tests during the daily builds. [18:10] (See the IRC logs: https://wiki.ubuntu.com/MeetingLogs/appdevweek1104/RockSolidPython) [18:11] == Setting up your app on Launchpad == [18:11] I'm going to walk you through setting up a project, a team, and PPAs for your app. [18:11] I recommend you walk through these steps with me using the Launchpad sandbox: https://qastaging.launchpad.net/ [18:12] paglia_s asked: do you advise launchpad for project not related to Ubuntu? Why to use it instead of github for example for my new web app? [18:12] paglia_s: well, i'd say it depends first of all on whether you like using bzr + Launchpad or git + Github [18:13] obviously a webapp doesn't benefit from daily builds [18:13] one think i well say about launchpad is i think it has a better team workflow than anything else right now [18:14] personally, i'd use launchpad, but that's because git kinda drives me crazy :P [18:14] not that git isn't a fantastic tool, mind you [18:14] okay... [18:14] I recommend you walk through these steps with me using the Launchpad sandbox: https://qastaging.launchpad.net/ [18:14] Changes in the sandbox aren't permanent, don't affect the "real" Launchpad. [18:15] One quick digression: when you do this for real, take the time to pick a good name for your app! [18:15] Pick a name that is easy to spell, easy to remember. [18:15] Pick a name that you can build a strong brand around! [18:15] But in the sandbox, you'll just have to pick a project & group name that doesn't exist yet. [18:15] We wont judge anyone based on bad app names in the sandbox :P [18:15] For my example, I'm going to use one of *my* personal favorite projects on Launchpad. [18:15] But granted, I'm rather biased :-D [18:16] ** Step1, register a project: https://qastaging.launchpad.net/projects/+new [18:16] // Name: Novacut [18:16] // URL: novacut [18:16] // Title: Novacut Video Editor [18:16] // Summary: Novacut is a collaborative video editor... [18:16] Now something to point out about these fields is that you cannot change the URL after you create the project. [18:16] The URL is really your app name, as far as Launchpad goes, and so this is permanent. [18:17] The Name, Title, and Summary fields can all be changed. [18:17] If possible, I recommend the URL (Launchpad name) be what you use to namespace your app everywhere. [18:17] For example, "novacut" is the name of the Novacut Python package, and its Debian source package. [18:17] Okay, now click "Continue" and Launchpad will likely show you a list of similar sounding projects, to help make sure the same project doesn't get registered twice. [18:17] If this happens, click "No, this is a new project". [18:17] Now you'll be at the "Step 2 (of 2) Registration details" page. [18:18] The only thing you must do here is indicate the license(s) your software uses. [18:18] Launchpad provides free project hosting for open-source software, but not for proprietary software. [18:18] (Although there is paid hosting available for proprietary software.) [18:18] When in doubt, I go with GNU GPL v3, but that's just me ;) [18:19] Anyway, pick at least one license, and the click "Complete Registration". [18:19] ** Step2, register a team: https://qastaging.launchpad.net/people/+newteam [18:19] // Name: novacut [18:19] // Display Name: Novacut Dev [18:19] On the team page, the "Name" is the Launchpad name of the team, the thing that can't be changed. [18:20] The team will be the owner of the PPAs you use for your app, and that's why you want a team name that matches the project name (more on that in a moment). [18:20] Leave the rest of the fields as they are, and then click on "Create Team". [18:20] ** Step3, create PPAs [18:21] You'll create two PPAs, one for daily builds and another for stable releases. [18:21] On the page for the team you just created, you'll see a "Personal package archives" section. [18:21] Click "Create a new PPA": [18:21] // URL: daily [18:21] // Display name: Novacut Daily Builds [18:22] Check "I have read and accepted the PPA Terms of Use", and the click "Activate". [18:22] You'll be at the page for the PPA you just created. Click "Overview" to go back to the team page. [18:22] Click on "Create a new PPA" again, this time you'll create the stable releases PPA: [18:22] // URL: stable [18:22] // Display name: Novacut Stable Release [18:22] And then click on "Activate". [18:23] Now the shortcut-URI used to add a PPA into the Ubuntu Software Center is: [18:23] ppa:team-name/ppa-name [18:23] That's the reason I recommend you create a team with the same name as the project... consistent, easy to remember branding. [18:24] So in the Novacut example, we have two PPAs: [18:24] ppa:novacut/daily [18:24] ppa:novacut/stable [18:25] In terms of spreading awareness of these PPAs, it's good that their ppa:novacut/* instead of ppa:jasons-awesome-team/* [18:25] :-D [18:25] I've seen the "daily" and "stable" PPA names used a lot on Launchpad, and I'm personally on a mission to have more projects adopt the convention. [18:25] The reason is it makes Launchpad easier to use, and I believe strengthens it as an ecosystem. [18:26] Say you learn about PPAs via Novacut, but then get interested in the "foo" project. [18:26] Wouldn't it be nice if there were familiar ppa:foo/daily and ppa:foo/stable PPAs? [18:27] ## So in summary... ## [18:27] Create a project: https://launchpad.net/novacut [18:27] Create a team with the same name: https://launchpad.net/~novacut [18:27] Create daily PPA like ppa:novacut/daily [18:27] Create a stable PPA like ppa:novacut/stable [18:28] So I pause a moment... does anyone have any questions before we switch gears a bit? [18:28] okay, moving on... [18:29] == Using Launchpad to engage developers == [18:29] Now this last section is really all rockstar's advice. [18:29] I could have called this section "day to day Launchpad workflow"... [18:29] But as long as you're developing out in the open, it might as well have the side effect of attracting new developers! [18:30] ** Plan releases using bugs and milestones [18:30] Novacut does monthly release of all our components, and each month has a corresponding milestone in Launchpad. [18:30] For example, the 11.09 `novacut` milestone: https://launchpad.net/novacut/+milestone/11.09 [18:30] Or the 11.09 `microfiber` milestone: https://launchpad.net/microfiber [18:31] Based on rockstar's advice, we plan our features using bugs rather than blueprints. [18:31] (rockstar said that aside from planning Ubuntu Developer Summits, blueprints aren't used that much.) [18:32] rockstar didn't go into all the details as to why he recommended using bugs over blueprints, but i trust him on this... plus [18:32] in my experience bugs seems more "actionable" than blueprints... and i'm an action oriented person, so i like that :) [18:33] At the start of each monthly cycle, we have an idea of what bugs we'd like to land in that release, and they're targeted to that milestone. [18:33] When release day comes, bugs that haven't landed just get re-targeted to the next milestone. [18:33] I usually target what I consider the highest priority bugs to the current milestone, and lower priority to the next. [18:34] Odd-rationale asked: Is that retargeting automatic? [18:34] Odd-rationale: no, it isn't, at least not through the web interface... you can do it through the launchpad API, although I haven't played with this myself [18:35] this is something i'd like to see improved in launchpad... more automation through the web interface, especially along these best practice workflows [18:36] The milestone gives interested people a way to see what's going on in the near term, where they might get involved should the be interested. [18:36] There are also several people that follow the progress by subscribing to the bug mail. [18:38] Which I was rather surprised by, actually... but it means there are some people that know the software quite well, even though they've never tackled a bug or code review [18:38] which is awesome :) [18:38] ** Have a ready supply of Bite Size bugs [18:38] "Bite size" bugs are small features or fixes that should be rather easy for a new developer to take on. [18:38] I recommend following the same convention that Ubuntu does and tagging these bugs "bitesize". [18:39] For example: https://bugs.launchpad.net/novacut/+bugs?field.tag=bitesize [18:39] I've also started putting [BiteSize] in the bug summary. [18:40] After my experience the last year mentoring on bitesize bugs, I'd say the most important thing is just to get people through the bzr + Launchpad workflow steps. [18:40] People might be new to these tools, so you want the actual bug to be very simple. [18:40] In my experience, you'll get a lot better response if you promote new bitesize bugs as you file them, for example on Twitter, Google+, etc [18:41] Now bitesize bug are interesting critters in that you never know what bug someone will bite on :) [18:41] People will surprise you [18:42] But this also means... if a bitesize but is blocking other work, you don't want to let it sit out there for too long [18:42] At least in my experience, if someone is going to take on a bitsize bug, they usually do so shortly after it's filed [18:43] So if it's been a week or more, don't feel bad about doing the bitsize bug yourself to keep the pace high [18:43] ** Do code reviews [18:43] I think bzr + Launchpad provide a fantastic team workflow, and part of that workflow are code reviews. [18:43] In my mind, the most import part of doing code reviews is to make sure that at least 2 people are familiar with every bit of code. [18:44] Yes, bugs may be found, design issues might be critiqued. [18:44] But more often, it's just one developer explaining the change to another. [18:44] Code reviews are also a way to get new developers engaged in the project. [18:44] In my personal experience, new devs have started with bitesize bugs more often than code reviews, but the code reviews are priceless all the same. [18:45] Also, Launchpad is quite generous with Karma for code reviews... and people like that :) [18:46] Like with bitesize bugs, you'll get a more responses on your code reviews if you promote them on Twitter, Google+, etc [18:46] ** Make sure your Launchpad project page is useful! [18:46] paglia_s asked: i've noticed that launchpad is quit slow loading pages... there are plan to improve the load time? [18:47] paglia_s: well, i'm not a launchpad developer, so i can't answer definitively... but i know performance improvements are always a priority [18:48] but i do agree that slow load times are the biggest problem with launchpad [18:48] overall things seemed to have improved a lot over say the past year [18:48] but sometime it still feels to slow [18:48] ** Make sure your Launchpad project page is useful! [18:49] The "Description" field is a good place to put links to useful things. [18:49] I think you would always link to your Daily and Stable PPAs from here, and also have a link to bitesize bugs and active-reviews. [18:49] To use my favorite example again: https://launchpad.net/novacut [18:49] Also, if there is developer or user documentation on the web, please link to that also! [18:49] This is a place where my favorite project gets and F right now :( [18:50] A place we need to improve, and are working on it [18:50] == Okay, Questions? == [18:50] There are 10 minutes remaining in the current session. [18:51] Odd-rationale asked: Can you explain what is a code review? Is it like a merge request? [18:51] Odd-rationale: yeah, exactly... i mean a merge request, should have made that clear [18:51] now, rockstar had great advice here for me: [18:52] even if you made the merge request, and it's for your project, try to get someone from the community to approve the merge [18:52] obviously you don't need permission to merge into your own project :) [18:53] but this is an opportunity to build knowledge of the code :) [18:53] but like bitesize bugs... i wouldn't let reviews block you for too long [18:54] if no one is interested after a few weeks, just self approve it :) [18:54] although these days there are enough novacut regulars that i pester one of them into doing the review if no newcomers have taken interest [18:54] any other questions? [18:55] There are 5 minutes remaining in the current session. [18:56] BTW, the merge request + review is a big part of why I think launchpad has such an effective team workflow [18:56] And one last thing, if anyone has any questions about any of this later, you can always find me in #novacut :-D [18:56] And rockstar generally lurks in #novacut too, so you can go to the source [18:57] Well, the time is running down.... I'll try to think of something awesome to say... [18:58] And in the mean time, I hope everyone has a great App Developer Week! There is always so much to learn... and great people to meet [18:59] awesome thing: let's turn the design rigor up to 11 and make apps that exceed everything else in the industry... because that sounds more fun than playing catch up :-D === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: App Developer Week - Current Session: Getting Started With Python: a Hello World App - Instructors: AlanBell [19:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/05/%23ubuntu-classroom.html following the conclusion of the session. [19:01] good morning/afternoon/evening all [19:01] welcome to this Application Developer week session on Python [19:02] so after jderose turning things up to 11 we are going to go back and start with 1 2 3 [19:02] This session is an introduction to Python from the very very beginning, I going to do my best to assume no prior knowledge at all. [19:02] just so I can see who is here say hi in the #ubuntu-classroom-chat channel o/ [19:03] great, I love to have an audience :) [19:03] so Python is a programming language, but not a scary hard one. [19:03] Python is kind of like BASIC, except you don't have to be embarrassed about saying you are a Python programmer! [19:04] we are going to write a computer program, which is a set of instructions to the computer to tell it to do some interesting stuff for us. [19:04] Lets get set up first, we are going to need a text editor to write the instructions in and a terminal to tell the computer to do the instructions. [19:05] hopefully you will find them next to each other in the Applications-Accessories menu [19:05] or if you are using unity hit the super key and type gedit and return for the editor [19:05] and terminal for the terminal [19:06] they are also somewhere to be found in the apps lens, but that is another story altogether [19:06] so open both of them now and get comfortable with the three windows on screen, IRC, terminal and gedit [19:06] are we sitting comfortably? [19:07] plain old text editor is perfect, none of your fancy IDEs for this session [19:08] Traditionally the first program you should write in any language is one to get the computer to say hello to the world! so lets do that. [19:08] in the text editor type the following: [19:08] print "Hello, World!" [19:09] that is it, your first program, now lets save it and run it (I did tell you it looked like BASIC) [19:09] file-save as and call it hello.py [19:09] this will save it into your home directory by default, fine for now, but you would probably want to be a bit more organised when doing something serious [19:10] feel free to be more organised right now if you like :) [19:10] ok, now in the terminal lets run the program [19:10] python hello.py [19:10] did it say hello to you? [19:12] as I saved it in the home directory and terminal starts there by default it should just work, if you are putting things in folders you might need to navigate to it with the cd command or specify the path to the program [19:13] ok, so that was running the program by running python then the name of our application, but we can do it a different way, by telling Ubuntu that our program is executable [19:13] What we are going to do now is try to make our program directly executable, in the terminal we are going to CHange the MODe of the program to tell Ubuntu that it is eXecutable [19:13] so at the $ prompt of the terminal type: [19:13] chmod +x hello.py [19:14] now we can try to run it [19:14] again at the $ prompt [19:14] ./hello.py [19:14] oh noes!!! [19:14] Warning: unknown mime-type for "Hello, World!" -- using "application/octet-stream" [19:14] everyone get that? [19:16] ubuntu doesn't know how to run this application yet, we need to add some extra magic at the top of our program to help it understand what to do with it. [19:16] back in the editor, above the print "Hello, World!" add the following line [19:16] #!/usr/bin/env python [19:16] so the /usr/bin/env bit is some magic that helps it find stuff, and the thing it needs to run this application is python [19:16] now you should be able to save that and flip back to the terminal and run your program [19:17] ./hello.py [19:17] that should now run :) [19:18] as has been pointed out in python 3 you need to put brackets round the string so [19:18] print ("hello world") === mohammed is now known as Guest99895 [19:19] which works in all versions of python [19:20] OK, lets go on to the next concept, giving our program some structure [19:20] back to the editor, and between the two lines we have already add a new line [19:20] while 2+2==4: [19:20] and on the next line put four spaces before the print ("Hello, World!") [19:20] and save that [19:21] Moshanator asked: can i just ./hello.py? [19:21] lunzie asked: ​ are the quote brackets proper form? [19:21] the brackets round the quotes are better form as they work on python 3 [19:22] so the while statement we added starts a loop, in this instance it will carry on until 2+2 is equal to something other than 4 [19:22] the double equals means "is equal to" a single equals is used to assign a value to something (more on that later) [19:23] the colon at the end is an important part of the while statement [19:23] There is no "until" "wend" "end while" type statement at the end, as you might expect to find in lesser languages :) === yofel_ is now known as yofel [19:23] the indentation of the print statement is not just cosmetic and for our benefit [19:23] the indentation level is part of the language, when the indentation stops that is the end of the loop (or other structure that you might expect to have an end) [19:24] this means that python always looks neat and tidy (or it doesn't work) [19:24] Always use four spaces to indent, not three, not five and certainly not a tab. [19:24] Other indentations will work, but if you ever have to work with anyone else you must always be using the same indentation, so we all get in the habit of using four spaces. [19:24] in gedit you can set it up to use 4 spaces instead of a tab [19:25] edit-preferences, on the editor tab choose tab width 4 and insert spaces instead of tabs [19:25] many other editors and IDEs have a similar option [19:25] Lets run our new program, just save it in the editor and run it again in the terminal with ./hello.py [19:26] and that is 4 spaces per level of indentation you want so if you have a loop in a loop then the inner one will be 8 spaces indented [19:26] now we can wait for 2+2 to be something other than 4 [19:26] * AlanBell taps fingers [19:27] or, if you are in a hurry, you can press ctrl+c [19:28] ok, so ctrl+c is handy for breaking in to an out-of-control python program [19:28] you can do other fun stuff with the print statement, if you change it to read: [19:28] print "Ubuntu totally rocks! ", [19:28] and run it again (note the comma at the end) [19:29] print ("Ubuntu totally rocks! "), <- for the python 3 contingent I should think [19:30] it should fill the terminal with text [19:30] the comma prevents it doing a newline [19:31] ctrl+c again to break out of it [19:31] lets do something different now [19:31] in the terminal, type python at the $ prompt and hit return [19:31] you should have a >>> prompt and a cursor [19:32] this is the interactive python console [19:32] you can type print("hello") here if you want [19:32] or do some maths like: [19:32] print 2**1000 [19:32] which will show you the result of 2 multiplied by itself a thousand times [19:33] python is kinda good at maths [19:33] you don't need the print statement here either [19:33] so 2**1000 should work in python 2.7 or 3 [19:34] you could even try 2**100000 it won't take long, and you can always stop it with ctrl+c [19:35] while we are on the subject of maths, lets get the value of pi [19:36] print pi won't do anything useful (but feel free to try it) [19:36] we need more maths ability than the python language has built in [19:37] so we need to get a library of specialist maths stuff, so type [19:37] import math [19:37] it will look like it did nothing, but don't worry [19:37] now type [19:37] math.pi [19:37] >>> import math [19:37] >>> math.pi [19:37] 3.141592653589793 [19:38] So we have seen here how to import a library of functions to do something, and called one of the functions from the library (to return the value of pi) [19:39] ok, so what is in the math package, apart from pi? [19:39] try typing dir(math) at the python console [19:39] ['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'exp', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'hypot', 'isinf', 'isnan', 'ldexp', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc'] [19:40] you can also look at http://docs.python.org/library/math.html [19:40] callaghan asked: Is there a way to see which functions are in the imported library? [19:40] yes :) [19:41] and to get more descriptive help on each one try help(math) [19:41] so dir() lists the names and help() lists names, parameters and a little bit of help text [19:43] TheOpenSourcerer asked: is help() a python function useful for anything else? [19:43] try help(help) [19:44] it is a function that could be used, I can't off hand think of any particularly useful use of it other than for getting help [19:44] Mipixal asked: Your favourite IDE for dev with Python, on bigger projects. (In before IDE flame wars :p ) [19:45] honestly my favourite is gedit [19:45] I have used eclipse and pydev [19:45] and I liked stani's python editor (SPE) for a bit [19:46] but all I really want is a text editor with syntax highlighting [19:46] and normally several terminal windows open across a couple of monitors [19:46] All this command line stuff is all very well, but we want to do applications that have pretty windows and stuff! [19:47] In the interactive console type or paste the following [19:47] import gtk [19:47] which will load a library full of stuff to do with the gtk toolkit that powers the gnome desktop [19:47] now type [19:47] foo=gtk.Window(gtk.WINDOW_TOPLEVEL) [19:47] that assigns a window object to a variable called foo [19:47] (the name doesn't matter, the single equals does) [19:48] but nothing much seems to have happened yet, so type: [19:48] foo.show() [19:48] yay, a real live little window should be on screen now! [19:49] lets see what we can do to it with dir(foo) [19:49] quite a lot! lets try: [19:49] foo.set_title("my little window") [19:49] go ahead and change the title a few times [19:50] so if you type "foo.show" [19:50] [19:50] There are 10 minutes remaining in the current session. [19:51] you get printed out a reference to where the code for the show function is [19:51] you need to do foo.show() to actually call the function [19:51] ahayzen asked: In gedit is there anyway of adding code completion for python programming, like pydev in eclipse, via a plugin? [19:51] teemperor asked: is there any naming convention in python? (because of set_title) [19:52] ahayzen: I believe there are some plugins for that, last time I tried one it was rubbish though [19:53] if anyone has any good ones I would be interested to know of them [19:53] teemperor: http://www.python.org/dev/peps/pep-0008/ here is the python style guide [19:54] many projects have their own more detailed conventions for object names [19:54] everyone agrees on the indentation levels though :) [19:54] Alliancemd asked: In a program changelog I saw a developer saying that he ported the code from python to java to make it faster and he said "because java is sometimes x10-x100 times faster than python". We know that java is very slow, does python have this big impact on speed? [19:55] this is a myth [19:55] There are 5 minutes remaining in the current session. [19:55] sometimes java does take a while to start if it has to launch a JVM, this gave applets a reputation for being slow [19:56] once up and running it is not particularly slow [19:56] unless you are doing something massively time sensitive (where every nanosecond counts) then any language will do any task [19:57] the performance problem is never the language, it is always the algorithm [19:57] normally rewriting code so that it does fewer disk or database accesses will speed it up thousands of times more than changing the language it is implemented in [19:58] Alliancemd asked: What do u think of PyQt? Is it that good how people say? [19:58] mohammedalieng asked: what about python performance compared to Java ? [19:58] callaghan asked: will there be a follow-up lesson, or where should unexperienced python-devs go from here? [19:59] not played with Qt much [19:59] there are some great books [19:59] snake wrangling for kids is excellent [20:00] and the dive into python book is in the repos, you can install it from software centre [20:00] I believe there are other python classes in this channel so check the schedule [20:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/05/%23ubuntu-classroom.html [20:00] ok, think I am out of time [20:00] thanks everyone o/ === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || [20:01] the schedule: https://wiki.ubuntu.com/UbuntuAppDeveloperWeek