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