/srv/irclogs.ubuntu.com/2010/10/01/#ubuntu-classroom.txt

=== Mrokii_ is now known as Mrokii
=== zumbi is now known as _
=== _ is now known as Guest45422
=== zumbi_ is now known as zumbi
jonasfawhere can I find this channel's history?12:01
jpds!logs12:01
ubot2For Ubuntu Classroom logs, please visit http://irclogs.ubuntu.com12:01
jonasfathank you very much :)12:02
akgranerTwo minutes til start time...14:58
=== 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: Ubuntu App Developer Week - Current Session: When and how to schedule releases using Launchpad - Instructors: mterry
mterryLooks like 14:00 UTC.  Welcome to the "When and how to schedule releases using Launchpad" talk!15:00
mterryI've got some prepared notes that I'll go through, but feel free to ask questions in #ubuntu-classroom-chat15:01
mterryFirst a quick background of who I am.  I'm Michael Terry, I work in the Desktop team at Canonical.  But more relevant for this talk, I've maintained several projects in the past.  I have maintained some small apps (xpad, gmult) as well as an app that has become more popular (deja-dup).15:01
mterrySo I'll talk a bit about release management, different ways of scheduling releases, and a bit about how to use Launchpad to help with that15:01
mterryThere are two common release strategies: feature based and time based.  I've used both, sometimes on the same project at different times.15:02
mterryFeature based tends to be the strategy most application developers use when starting personal projects.  You're just hacking away by yourself until it's functional.  Then you release.15:02
mterryMaybe next you get some bug reports or an idea for a feature, and you hack away again until that new feature is done or some common crash bug is fixed.  Then you release.15:03
mterryThis is a pretty common cycle and is very good for getting stuff out the door.  It's simple, easily understood, and only requires that you be able to decide what features or bugs a release will wait on.15:03
mterryOf course, you need agreement about what the release criteria are, but I'll get to that later15:03
mterryAnother popular method is a time based release schedule.  This is where you say, I'm going to make a new release every month, or every 3 months, or whatever.15:04
mterryThis method is in vogue for many of the big open source projects, like Ubuntu, Fedora, and GNOME.15:04
mterryIt makes it easy to plan releases with lots of moving parts and developers, since the schedule and release criteria are obvious to everyone.15:05
mterryLots of joiners.  Were you all interested in this talk?  Should I briefly recap?15:05
mterryOK, moving on until I see some complaints15:06
mterryAs for pros and cons...15:06
mterryI find that when I'm using a feature based schedule, I have a habit of making changes until the last minute and potentially introducing bad bugs.  This tends to happen because the release can happen any time after the last feature gets committed15:06
mterryThat's when I end up making 'brown paper bag' followup bug fix releases (i.e. you were a brown paper bag over your head in shame).15:07
mterryThat's one benefit of the time based schedule: you can plan 'baking' time into your schedule and say, "no more feature work during the last month.  Just bug fixes."15:07
mterryOf course, you can do this with feature releases too and just say that after the last feature is done, you'll just sit on the code for a month.  But in practice, I find that doesn't happen.15:08
mterryBut feature schedules are useful too.  I generally prefer feature based releases for the first 6 months or year of a project.  That's when the most churn happens and you have less users affected by potentially less careful releases.15:08
mterryIt lets you iterate very fast on often incomplete code.  I recommend it for most starting/small/personal projects.15:09
mterryIf you do choose a time based schedule, don't make it stressful one.  Most projects seem to use 6 months, and that's about right.  Maybe with monthly checkpoint releases.  And most of the feature work front-loaded.15:10
mterryBut whatever, it's a matter of personal preference and what works for you.  I've got a link to a really fascinating Ph.D paper studying how different projects have used different schedules, analyzing optimal cycle lengths for time based projects, and the like.  http://www.cyrius.com/publications/michlmayr-phd.html15:11
mterryAny questions?  Or is 14:00 UTC too early?  :)15:11
mterryI've used feature releases early on several of my projects then switched to time based as it became popular, more polished15:13
mterryTime releases are very good for making sure regressions don't appear (easier for testers to plan on releases)15:13
mterryAnd generally good for a project in 'maintenance mode'.  You can still add big features, it may just take more than one cycle to finish landing it15:14
mterryEspecially once you get more contributors than just yourself, it really helps to have a common schedule15:14
mterryIt can be frustrating as a maintainer to be holding a release for a feature from someone else in this inherently asynchronous development style that FOSS projects have15:15
mterryWith time releases, they either get it in on time or not, but the release can go forward15:15
mterryAlso, I highly recommend the Ph.D paper link I gave earlier if you're interested in this stuff.  It's very interesting reading (once you get to the findings part)15:16
mterryOK, on to a quick introduction of Series and Milestones!15:17
mterryHowever you decide to release, Launchpad has some simple tools to make keeping track of planned work.  Namely, Series and Milestones.15:17
mterrySeries are just separate 'branches' of development.  Say you release version 14 of your software and start work on version 15.  Now you need to be able to separate maintenance work on 14 from new feature work in 15.15:18
mterryIf a critical bug is found in 14, you want to be able to keep track of that fact and keep a snapshot of 14's code around to make it easy to make further bug fix releases from it.15:18
mterryThat's what Series do.  They're a place to keep code and bugs separate from other series.15:19
mterryIf you want to play around with Launchpad's series or milestones, open https://staging.launchpad.net/15:19
mterryIt's a testing version of launchpad where they throw away any modifications each day15:19
mterrySo you can screw around and create a project, add series and milestones, etc.15:20
mterryJust to get a feel for it15:20
mterryAnyway15:20
mterryMilestones are just planned releases.  You may create a milestone for release 15 ahead of time and then you can mark bugs to be fixed by that release.  Milestones are associated with a particular series.15:20
mterryI usually find it most convenient to keep a trunk series always around where I do development, and when I release a new stable version, to create a new series for its maintenance lifecycle.15:21
mterryThis is called a trailing series.  Each release gets spun off after I finish it in trunk.15:21
mterryYou can also have leading series, where you create a separate unique series for your next release ahead of time.15:22
mterryI don't find this nearly as convenient, as a developer, but your mileage may vary15:22
mterryYou can also mark series as obsolete once you're really done with them (say, you've released a newer stable release)15:23
mterryThat way they won't show up in the UI.  Otherwise, you'd be drowning in series15:23
mterryYou can see an example of a more complicated series layout with my project deja-dup (https://launchpad.net/deja-dup/+series).  You can also see that I used to use feature releases until version 14, when I switched to track GNOME's time based releases.15:24
mterryAnd right now, trunk is where the next version (18) is being developed15:24
mterryIf you're using feature releases, you don't *need* to take full advantage of milestones.  You really probably just care about the next unstable and next stable releases.  So one 'future' milestone fore each series is fine.15:25
mterryBut if you've got big plans and a whole project roadmap based around features (like 1.0 will have X, Y, and Z, but along the way, 0.5 will mean X is done, 0.7 will mean Y is done, etc), that can be useful15:26
mterryThe projects I've seen try to do that never hit their targets and always push features back.  Again, it's a lot more reliable to use time based releases, if you're going to be doing all that release planning overhead anyway.15:27
mterryFeatures still get pushed back, but you didn't promise features, only a timely release.  ;)15:27
mterryFor time based releases, I like to set up all the releases ahead of time as milestones so it's easy to keep track.  I'll often assign bugs that I know I want to finish during this cycle to the last milestone, and adjust that milestone when I actually implement it to the actual release in which it got fixed.15:28
mterryMilestone pages on Launchpad are very nice.  They tell you what bugs were/are targeted for the release and what their status is.  Let me dig up a URL15:28
mterryhttps://launchpad.net/deja-dup/16/15.9215:28
mterrySo here you can see that there were 6 bugs I targeted for the release, the release notes, etc.  Also useful when planning a future milestone, so the whole team can see what bugs the maintainer wants to see fixed for that release15:29
mterryFor a nice overview of some of this same material, there's actually a nice LP help page:  https://help.launchpad.net/Projects/SeriesMilestonesReleases  It talks about leading/trailing series and how to set milestones up too.15:30
mterryThat's all the prepared material I had.  I've got *so* much time for your questions about the exciting field of release management!15:31
mterryJoin #ubuntu-classroom-chat and ask questions like "QUESTION: what's the meaning of life, the universe, and everything?"15:32
mterryAgain, I just want to pimp the case study done on several FOSS projects and their release methodologies.  It's fascinating stuff!  http://www.cyrius.com/publications/michlmayr-phd.html15:33
mterryI'll hang around a bit, in case anyone wakes up.  If you see this talk in your chat logs later and want to talk release-shop, just grab me on IRC sometime or in person at UDS in Orlando15:34
mterryjledbetter_ just reiterated in the chat room that coding up to release can be dangerous.  One way to mitigate that is automated tests.  Which is a whole 'nother talk.  But...15:39
mterryIf you do have test-driven coding, so that features and tests land at the same time, you can be slightly more confident with feature-releases15:39
mterryOf course that requires good discipline, and even tiny changes that you don't think need a full test can break things unexpectedly right before a release15:40
mterryOne thing you could do if you really like feature releases is do a 'testing/alpha release' before each release to let people test it and report back15:41
mterryBut generally, smaller projects don't have enough of a community to do that.  So I'd say if you're project is small/new, just pump out dangerous feature releases while you are energized and coding like a monkey, until you stabilize, then use time based releases15:42
ClassBotjledbetter_ asked: Just to be clear, I can do all kinds of experimentation with https://staging.launchpad.net/ and it'll go away nightly?15:46
mterryjledbetter_, Yup.  It's pretty neat.  I don't know when the cutoff is.  00:00 UTC?  But it resyncs from the main instance every day or so15:47
mterryIt's also pretty slow...15:47
mterryBut it's a good way to experiment with some Launchpad button if you don't know what it will do first.  :)15:48
mterryAlright, thanks everyone.  Hope it was useful!  I expect to see many more well-released projects keeping track of things using proper series and milestones!  :)15:52
=== 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: Ubuntu App Developer Week - Current Session: Pollka and the Ubuntu Women Mentoring Partnerships - Instructors: elky, nigelb
elkyHi folks!16:01
* nigelb waves16:02
AlanBellhi all16:03
elkySome of you might remember earlier this year when the Ubuntu Women team ran some competitions.16:05
elkyThese competitions involved voting, and that voting was collected by a little bit of php that I whipped up over the course of a few mornings.16:06
elkyThis code is what has become Pollka, and which was also used recently by AlanBell for the Ubuntu-UK logo selectoin16:07
elkyCurrently the code resides on Launchpad, https://launchpad.net/pollka16:08
elkyPollka is a relatively new project and we only have a few active committers. The aim of making pollka a project is to facilitate mentoring, using launchpad tools, etc.16:09
AlanBellok, so pollka is a php application as elky said16:11
AlanBellit stores some information in a database, we are using mysql, but other databases should also work or be fairly easy to plug in16:11
AlanBellas it is a voting application on a set of images these also need to be stored somewhere, and we store them on the filesystem16:12
AlanBellthere are both full size images and thumbnails16:12
AlanBelllets take a quick look at a running pollka instance16:12
AlanBellhttp://pollka.libertus.co.uk/16:12
AlanBellthis is the voting system we used in the UK loco for our new logo16:12
AlanBellwe put up an assortment of design proposals and voted on the one we liked the best16:13
AlanBellI had a bit of fun hacking about with the code, thus the options were "full of win" for pictures you like and "meh" for those you don't like16:13
AlanBellpart of the point of Pollka is a learning project to hack about with, not a shiny packaged solution where you don't look under the covers16:14
AlanBellso installing Pollka starts with getting the code, it is stored on Launchpad in a bzr repository16:14
AlanBelllaunchpad and Ubuntu work really really well together (unsurprisingly)16:14
AlanBellso to get the code you would run16:15
AlanBellbzr branch lp:pollka16:15
AlanBellyou might need to install bzr first with sudo apt-get install bzr16:15
AlanBellanother way to get the code is to use the most awesome groundcontrol project by doctormo16:16
AlanBellthis is also in the repositories so you can look up groundcontrol in the software centre16:16
AlanBellthen in /home/myname/Projects in nautilus you can get a project and it will download a copy of pollka for you16:17
AlanBellthe file db.sql in the repository is a kind of starting database structure16:18
AlanBellyou can import that into mysql to create a bunch of tables in the right places16:18
AlanBellI installed phpmyadmin and imported it through that because I suck at command line stuff16:18
AlanBellphpmyadmin is a web based interface to mysql and it makes things really easy16:19
AlanBelllets see, I wonder if I can let you have a play with it . . .16:19
AlanBellyes, OK16:20
AlanBellso I am going to let you log on to my server (which is sitting on top of the bookshelf behind me)16:20
AlanBellyou will be logging in as the pollka user, so I don't think you will be able to damage anything other than the already closed logo vote16:21
AlanBellhttp://pollka.libertus.co.uk/phpmyadmin16:21
AlanBellusername polka16:21
AlanBellnope16:21
AlanBellusername is pollka16:21
AlanBellpassword is dmQdLQwsbunjtqwj116:21
AlanBellyou might want to copy and paste that one16:21
AlanBellon the left you can click the pollka database and see the tables16:22
AlanBelleveryone there?16:22
AlanBellright, everyone is poking about successfully16:23
AlanBellif you click on the browse icon next to the conf table you can see various bits of configuration16:24
AlanBellfeel free to tweak bits, like the site status or the poll name16:24
AlanBellhave a look at what it dose16:25
AlanBelldoes16:25
AlanBelloh noes some hacker has hacked it :)16:25
AlanBellhave a look at the questions table16:26
AlanBellhere we list the options available16:26
AlanBellI kinda misused the question_author field16:26
AlanBellas my poll didn't really have different authors for the 'photos'16:27
AlanBellI also hacked about with the image field because the thumbnails are .png files and you click to get the .svg which wasn't in the original poll design16:27
AlanBellok, prevotes16:28
AlanBellso, flip back to the front of the site and cast your vote16:28
AlanBellwhat this does is populate the prevote table with a random key and the options you selected16:28
AlanBellyou will then get an email (from me because of what is set in the conf table)16:29
AlanBellon that email will be a link with the random token in it16:29
AlanBellwhen you go to the token URL in the mail the token.php.active page will look up the votes in the prevote page and copy them to the votes table16:30
AlanBellthere is a certain amount of anonymisation, in the voter table we have the timestamps and IP addresses and email addresses, these don't link directly to the votes cast16:31
AlanBellwhich is kinda good in some ways to voting geeks, but a bit of a drawback if you want to deal with someone who voted twice or something16:31
AlanBellit does check on submit that the email is unique16:32
AlanBellok, lets go prod some code now16:33
AlanBellhttps://code.launchpad.net/~pollka-devs/pollka/trunk16:33
elkyof course if you have ideas on how to improve this, we're happy to help you implement16:33
AlanBellon that page you can see a summary of the bzr repostitory16:34
AlanBellat the bottom you can see that 8 revisions have been made by different people16:34
AlanBellbzr keeps all the versions in check and deals with branches and merges so you can have multiple people working on the code and they don't get in each others way too much16:34
AlanBellas nigelb mentioned in the chat, to commit to the repository you need to be in the pollka-devs launchpad team16:35
AlanBellanyone can read and take a branch of the repository though16:35
AlanBellthe great thing about bzr is that you don't have to be scared of breaking anything.16:36
AlanBellyou can poke about in the code, change things in a way that *you* like and it is easy to maintain your code or push it back to the core project if it is generally useful16:37
AlanBellsome of my modifications (such as the .png/.svg image pairs) are probably of little interest outside of this particular instance16:37
AlanBellothers however (like a security patch to prevent SQL injection hacks) are of general interest so got pushed back16:38
elkyQUESTION from daker: i see two conf keys, site_status and fave_status, what do they mean ?16:38
AlanBelldaker: the fave_status controls the second vote you have at the bottom16:39
AlanBellso for each image you can give it +1 or +016:39
elkyThe site can be enabled or disabled for voting, thats site_status16:39
AlanBelland then at the end you can give your absolute mostest favouritest picture an extra +116:39
AlanBellor turn that feature off16:39
AlanBellhttp://bazaar.launchpad.net/~pollka-devs/pollka/trunk/files16:40
elkythe main pollka branch has a basic admin panel, i dunno if AlanBell's mutant does or not though16:40
AlanBellmy mutant has that removed16:40
AlanBellgood point though, the admin.php was there so you don't have to go tweak too much directly in mysql16:41
AlanBellok, so looking further into the repostory at the link above we can see the files that make up the application16:42
AlanBellthere is admin.php which is the admin console16:42
AlanBellthe main site is the index.php files (the site has two modes, index.php.active and index.php.inactive)16:43
AlanBellthere are the results pages16:43
AlanBellhttp://pollka.libertus.co.uk/results.php16:43
AlanBella stylesheet which I tweaked to fit with the new ubuntu branding, I think the default pollka one is less ubuntuish16:44
AlanBelland there are the token.php files for processing votes16:44
AlanBellin the includes folders there are some other files including the one that connects the php files to the mysql database16:45
AlanBellhttp://bazaar.launchpad.net/~pollka-devs/pollka/trunk/annotate/head:/includes/dbcon1234567890.php16:45
AlanBellwhich includes the classic elky code "die('Could not connect to the database. No pony for you: ' . mysql_error());"16:45
AlanBellit is also the file in which you edit to add the mysql username and password you want it to use when talking to the database16:46
AlanBellhttp://bazaar.launchpad.net/~pollka-devs/pollka/trunk/annotate/head:/index.php.active16:47
AlanBellthat is the main file that does the work of presenting the list of options to the user16:47
AlanBellthe observant will spot several places where there are hard coded references to the original competition16:48
AlanBell3816:48
AlanBell $subject = "Your World Play Day 2010 Photo Competition Vote";16:48
AlanBellfor example16:48
AlanBellthese should all be recoded as stuff to go in the conf table16:48
elkyheh, i really should finish fixing all that some time16:48
AlanBellthere are plenty of things that need doing with this code, which is fine16:48
elky(note, hardcoding is bad. this was done in a hurry :P)16:49
AlanBellthe project is now a mentoring and learning testbed16:49
AlanBellor sandpit16:49
AlanBellthe project is kinda small, with little bugs here and there, ideal as a starter project to get to grips with php16:50
AlanBelland bzr16:50
AlanBelland relational databases16:50
AlanBelland ubuntu packaging16:50
elkywe should probably close up the tutorial bit now and move on to explaining the UW mentoring partnership program16:50
AlanBelland launchpad bug system16:50
AlanBellyup16:50
AlanBellso it is a lovely little project with lots of stuff to do on it16:50
AlanBellstarted in the Ubuntu-Women project and it is now a mentoring subject for that project16:51
AlanBellhttp://wiki.ubuntu-women.org/MentoringFAQ16:51
elkyPollka is like a proof of concept project for the mentoring framework we're trying to morph ^that in to16:52
elkyhttps://blueprints.launchpad.net/ubuntu-women.org/+spec/community-n-ubuntu-women-mentor-partnerships16:52
elkyI'll be talking with people later this month at the Ubuntu Developer Summit on the topic of refining the mentoring partnershps blueprint16:53
elkyI'd love to see feed back from people on the wikipage linked from there. What do you want from mentoring, etc.16:54
elkyWe're also open to hearing from other applications who may want to partner with us to provide clear pathways for the UW team to guide its members along.16:54
elkyOk, any questions for the next 5 mins or so?16:56
AlanBellwhere can we find out more elky?16:57
elkysbout?16:57
AlanBellpollka16:57
elkypollka.net16:57
AlanBellyay, a wiki, so anyone can contribute to the documentation as well as the code16:58
elkythanks for helping host this session AlanBell. its been much more coherent than my cold-addled brain would have managed16:58
AlanBell:)16:58
AlanBellI will be changing the mysql password on that database later16: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 ||
Braber01QUESTION: where can I learn more about TCSH?17:20
=== MSK61 is now known as MAfifi
=== 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: Ubuntu App Developer Week - Current Session: Posting into social networks from your app - Instructors: kenvandine
kenvandineok, so lets get started here18:02
kenvandineI am Ken VanDine, an engineer on the Ubuntu Desktop team and a Gwibber developer.  Today we'll talk about desktop integration with social networks, by adding social features to desktop applications.18:03
kenvandinean introduction to libgwibber18:04
kenvandineWhat is libgwibber?18:04
kenvandinelibgwibber is a library to provide applications access to the gwibber desktop service.  It is very important to us to be able to integrate a wide variety of desktop applications with gwibber.  The end goal being as transparent as possible, and simplifying the social experence on the desktop.  We want the users to be able to easily interact with their friends via social networks while be contextually relevant.  For example w18:04
kenvandinehen you are browsing photos of your kids 1st birthday party in shotwell, you might want to tag some of your friends that attended the party.  Instead of going to the facebook website, uploading photos and then tagging, you should be able to do it right there while you are already viewing or even while importing the photos from your camera.18:04
kenvandineLet me give you a concrete example to help illustrate why you should care.18:05
kenvandine*you* being an application developer18:05
kenvandineWouldn't this just rock?18:05
kenvandine * Plug in your camera18:05
kenvandine * shotwell (or your favorite photo library tool) pops up and prompts you to import photos18:06
kenvandine * You select the photos you want to import into your library18:06
kenvandine * Add comments below the previews18:06
kenvandine * Tag friends in the photos18:06
kenvandine * And choose to share or not automatically after importing (sharing being uploading to some default online album, like facebook)18:06
kenvandinein that scenario, the user is already doing something with their photos, so it makes sense to integrate other things they might want to do in the work flow18:07
kenvandineOk, enough talking about why we want to do this... chances are if you are here you probably already understand.18:08
kenvandineLets talk about how you can use libgwibber in your application.18:08
kenvandineUnfortunately the gtk-doc generated docs aren't very useful yet, and if someone wants to help get the annotations in the vala code to make it into the generated C code so gtk-doc can pick it up, please let me know :)18:08
kenvandinewe really need to figure out how to generate developer docs for the API for C, vala, mono and python18:09
kenvandinetricky :)18:09
kenvandineThere is libgwibber, and libgwibber-gtk.  I think most people will just use libgwibber-gtk, which provides gtk widgets you can just drop into your application.18:10
kenvandineCurrently libgwibber-gtk only includes an Entry widget, which includes:18:10
kenvandine * text input box18:11
kenvandine * character counter18:11
kenvandine * account target bar with toggle buttons for accounts18:11
kenvandine * send button18:11
kenvandine * url shortening18:11
kenvandine * and online/offline detection18:11
kenvandineto answer rooligan's question, libgwibber is written in vala which builds a shared library18:11
kenvandinewhich works with C, and we include mono bindings and with introspection python18:12
kenvandinemoving on18:12
kenvandineScreenshot of the entry widget in use:18:12
kenvandinehttp://blogs.gnome.org/kenvandine/files/2010/08/libgwibber-entry-1.png18:12
kenvandinethat is just a simple gtk window with the entry widget18:13
kenvandineThis can be embedded anywhere you could put a VBox (Gwibber.Entry is based on Gtk.VBox).18:14
kenvandineyou'll notice it looks very similar to the input on the bottom of the gwibber client UI18:15
kenvandinethe goal has been to replace the python one with this one to consolidate the code base18:15
kenvandinebut it didn't play too well with the gwibber client for some reason, related to introspection and gtk18:16
kenvandineit'll happen for gwibber 3.0 though18:16
kenvandinelets look at some snippets of code18:17
kenvandineembedding the gtk widget should be simple, and as we add more widgets we will make sure we keep it just as simple18:17
kenvandineVala:18:17
kenvandinevar entry = new Gwibber.Entry ();18:17
kenvandineyour_container.add (entry);18:17
kenvandineC:18:18
kenvandineinclude <gwibber-gtk.h>18:18
kenvandine...18:18
kenvandineGwibberEntry* entry = gwibber_entry_new ();18:18
kenvandinegtk_container_add ((GtkContainer*) your_container, (GtkWidget*) entry);18:18
=== harrisonk is now known as harrisonk_away
kenvandineand for getting the CFLAGS and all, if you are using autotools just added a pkgconfig check for gwibber-gtk18:19
kenvandineMono:18:19
kenvandineGwibber.Entry entry = new Gwibber.Entry ();18:19
kenvandineYourContainer.Add (entry);18:19
kenvandineand18:19
kenvandinePython:18:19
kenvandinefrom gi.repository import GwibberGtk18:19
kenvandine...18:19
kenvandineentry = GwibberGtk.GwibberEntry()18:19
kenvandineyour_container.add(entry)18:19
kenvandinein these examples, "your_container" could be anything gtk container18:20
kenvandinea window, etc18:20
kenvandineso could nest it in your app so it automatically shows/hides based on either what the user does or even if the gwibber service is available and configured18:21
kenvandineso you could hide it if there are no accounts available18:21
kenvandinethis is what the MeMenu in Ubuntu does, that posting entry is only displayed if you have accounts configured in gwibber18:22
kenvandineso users that don't use gwibber won't even see it18:22
kenvandinelibgwibber provides a signal to watch18:22
kenvandinefor some complete examples, you can look in the examples directory in a bzr checkout of lp:gwibber/libgwibber18:23
kenvandineor18:23
kenvandinehttp://bazaar.launchpad.net/~gwibber-committers/gwibber/libgwibber/annotate/head%3A/examples/entry-vala.vala18:23
kenvandinehttp://bazaar.launchpad.net/~gwibber-committers/gwibber/libgwibber/annotate/head%3A/examples/entry-mono.cs18:23
kenvandinehttp://bazaar.launchpad.net/~gwibber-committers/gwibber/libgwibber/annotate/head%3A/examples/entry-c.c18:23
kenvandinehttp://bazaar.launchpad.net/~gwibber-committers/gwibber/libgwibber/annotate/head%3A/examples/entry-python.py18:23
kenvandinehopefully this is helpful18:24
kenvandinei think for most developers, embedding the entry widget will accomplish the goal18:24
kenvandineand add value to your application as well as helping us make ubuntu more social18:25
kenvandinefor the natty cycle, we will be adding more widgets18:25
kenvandinei hope pieces needed to add the experience i described earlier to shotwell18:25
kenvandinewe need image uploading added to gwibber and some sort of contact selector that aggregates sources for picking friends18:26
kenvandinethere will also be account/stream selector widgets as well as stream view widgets18:26
kenvandinethe stream view is what you see in the current gwibber client, where it renders the posts18:27
kenvandineand the navigation on the left is the stream selector18:27
kenvandinewe'll make those into libgwibber-gtk widgets and then then client will just consume those widgets18:27
kenvandinehopefully that will come with a fresh new look to the client :)18:28
kenvandinenow on to libgwibber18:29
kenvandineIf you want to use the gwibber service without using the Entry widget, you can use libgwibber for more direct access.18:29
kenvandinei'll talk about a few of the most common tasks you might want in libgwibber18:30
kenvandineGwibber.Service object includes:18:30
kenvandine * version() # returns the version of the currently running gwibber-service18:31
kenvandine * refresh() # triggers a refresh18:31
kenvandine * quit() # shuts down gwibber-service18:31
kenvandine * send_message("Some string to post") # posts a message to all account that have send_enabled = True18:31
kenvandine * is_available # signal you can connect to so you can find out when the service comes online (sends a bool)18:31
kenvandineGwibber.Accounts object includes:18:32
kenvandine * list() # lists accounts18:32
kenvandine * send_enabled("account_id") # toggles send_enabled state of the given account18:32
kenvandine * lookup_by_id("account_id") # returns account attributes for a given account18:32
kenvandine * account_updated # signal which sends an account when it has been changed18:32
kenvandineGwibber.Service is about interacting with the service, making it do things for you for example18:33
kenvandineGwibber.Accounts is for retrieving or manipulating accounts18:34
kenvandinefor example, if you want to show/hide a posting widget (like the entry widget we talked about earlier)18:35
kenvandineyou would connect to the Gwibber.Service.is_available signal18:35
kenvandinewhen you get a True from that signal, you would query Gwibber.Accounts.list() and find accounts that are enabled18:35
kenvandineif there are any, then display it18:36
kenvandineon the converse, after you show the entry18:36
kenvandineif you get a False from Gwibber.Service.is_available, you can hide it18:36
kenvandineor destroy18:36
kenvandinewhatever18:36
kenvandinealso, you could connect to the account_updated signal, so you can see when accounts change and hide/destroy when there are no longer any accounts enabled18:37
kenvandinefor example18:37
kenvandinelibgwibber uses GObject introspection for python support,  which is still quite new and some of the libgwibber methods don't behave well.  Fortunately the Gwibber.Service methods, which are generally what most application developers will want, work fine.  This will improve for natty.18:37
kenvandineso for example if you use python and want to get a list of accounts, it will crash :/18:38
kenvandineit isn't handling the conversion of the resulting data type18:38
kenvandinea known problem area with python and gobject introspection18:39
kenvandinehowever, all the methods interacting with the service work18:39
kenvandinewhich is what you will most like care about18:39
kenvandineHere are some examples:18:40
kenvandinehttp://bazaar.launchpad.net/~gwibber-committers/gwibber/libgwibber/annotate/head%3A/examples/example-vala.vala18:40
kenvandinehttp://bazaar.launchpad.net/~gwibber-committers/gwibber/libgwibber/annotate/head%3A/examples/example-mono.cs18:40
kenvandineagain, you can find those in a bzr checkout in the examples folder18:40
ClassBotrooligan asked: For which programming language is libgwibber?18:40
kenvandinewhoops18:40
kenvandinerooligan asked "How to install libgwibber?"18:41
kenvandinelibgwibber0 is included in maverick by default, to get the gtk widgets just install libgwibber-gtk018:41
kenvandineactually to build against it, you'll want libgwibber-gtk-dev or libgwibber-dev18:42
kenvandineto use it with python you'll need gir1.0-gwibber-gtk-0.0 and/or gir1.0-gwibber-0.018:43
kenvandinefor mono you'll need libgwibber-gtk0.0-cil-dev and/or libgwibber0.0-cil-dev18:43
kenvandineany more questions?18:44
kenvandineor does anyone have applications in mind they might want to hack on adding social features?18:44
kenvandinei would love to find areas people are interested, especially if they might require adding functionality to gwibber/libgwibber that isn't already there18:45
kenvandineor maybe if anyone wants to work on shotwell :)18:45
kenvandineok, no more questions then...18:47
kenvandinei'll post the bulk of the content from here on my blog later today, which you can find on planet.ubuntu.com18:47
kenvandineyou can find me most anytime in #ubuntu-desktop18:48
kenvandineplease feel free to ping me anytime with questions or suggestions18:48
kenvandineor if you want to contribute to gwibber, libgwibber or any other application18:49
kenvandinethanks everyone for your time!18:50
=== 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: Ubuntu App Developer Week - Current Session: Automating tasks with Launchpad, Tarmac and Source Package Recipes - Instructors: rockstar
rockstarHi folks.  My name is Paul Hummer.  I'm a contributer to the Launchpad project, and I happen to also get paid for it, so that works out nicely.19:02
rockstarFirst, give me a second to read about this new-fangled ClassBot thing.19:02
rockstarOkay, let's get started.19:03
rockstarToday, I'm going to talk to you about automating the really menial tasks that come as part of working on a free software project.s19:03
rockstarThe less time you spend working on menial things, the more time you can use to write code and do awesome things.19:04
rockstarDISCLAIMER: Date math is hard. It turns out that I signed up for a time that overlaps when I want to eat.19:04
rockstarThis means that if I paused for a bit, it's because I'm attempting to force food into my mouth.  Feel free to ask questions during this time.  It makes me look not quite as bad.  :)19:04
rockstarI'm assuming everyone here has a bit of understanding with regards to Launchpad.19:06
rockstarIf you don't have any idea what Launchpad is, well, you might be a little lost.19:06
rockstarSome of the features of Launchpad that I'm going to talk about today are relatively new, and we still consider them either "in beta" or "we're just barely talking about making them."19:07
rockstarRest assured, those features are coming.19:07
rockstarDoes anyone here have a project they've got in mind as I talk about automating tasks with Launchpad?19:08
rockstar(I ask because most of my projects already use a lot of these practices, so it's kinda hard to walk through the transition)19:09
rockstarOkay, well, I guess we'll move ahead with a hypothetical project.19:10
rockstarLet's say that Sarah Jane is an opportunistic hacker who used Quickly to set up her project.19:12
rockstarShe didn't realize that there would be so many contributors to her little project, but it becomes very popular.19:13
rockstarPoor Sarah Jane spends more time reviewing code from merge proposals and merging the code than she does actually coding.19:13
rockstarSarah Jane will (not might) eventually get burned out playing gatekeeper.  She likes to code (and she's better at that anyway).19:14
rockstarCode reviews themselves can't be automated.  They NEED a person to look at the code.19:14
rockstar(This is because code is for people, not for computers.)19:15
rockstarHowever, once the code has been approved by Sarah Jane, she doesn't want to futz with it anymore.19:15
rockstarSometimes she forgets to run the tests or check that the build is working before committing.19:16
rockstarSide note: We live in a DVCS world. The days of having a broken trunk are over.  If your trunk is broken, you are doing it wrong.19:16
rockstarOkay, so Sarah Jane has a list of reviews she needs to do.  She goes through, votes on them, and the ones that she approves can be set to "Approved."19:17
rockstarEnter Tarmac, which you can find at http://launchpad.net/tarmac, with the code being found at lp:tarmac.19:18
rockstarTarmac is a really simple script that will automate merges for you.19:18
rockstarQUESTION: Merges might still introduce a broken trunk, no?19:19
rockstarNo.  They shouldn't.  I will show you why.19:19
rockstarAlso, this ClassBot thing seems to be really helpful if you'll preface your questions with QUESTION.19:19
rockstarSo Sarah Jane sets up Tarmac to manage all the merges against lp:project.19:20
rockstarWhen run manually, tarmac can be invoked like this: `tarmac land lp:project`19:21
rockstarIf you're going to manage multiple branches, you'll want to configure tarmac to know a bit more about the branches, which you can find out about in the documentation.19:22
rockstarThe docs can be found here: http://bazaar.launchpad.net/~rockstar/tarmac/main/annotate/head:/docs/introduction.txt19:23
rockstarI have this on a cron job currently, and it runs every 5 minutes.19:24
rockstarTarmac self hosts itself too.19:24
rockstarIn this case, when Sarah Jane runs tarmac, it looks for all the branch merge proposals in a "Approved" status that ALSO have a commit message set, and will merge them all automatically, one by one.19:25
rockstarBut wait!  What if these merges cause breaks in the trunk?19:25
rockstarTarmac can be configured to run a command AFTER the merge but before a commit.19:25
rockstarFor instance, let's say you want to make sure `make` completes.  You can configure Tarmac to run make, and if everything is successful, it'll merge the branch.  Otherwise, it'll kick it out and comment on the merge proposal, saying something like "Dude, your branch is broken. Get your act together."19:26
=== zumbi_ is now known as zumbi
rockstarTarmac itself has a small suite of tests that we never want to break, so when Tarmac does it's own merges, it makes sure to run the tests.  If the tests fail, the branch fails, and doesn't get merged.19:27
rockstarRobots are MUCH better at doing these menial things than we are.  We get bored merging and make-ing and testing and all the things you have to do to maintain a pristine trunk.19:28
rockstarThere's also something else really awesome about this.19:28
rockstarWhen I upgrade the Tarmac instance's OS from Lucid to Maverick, the tests underneath broke, so trunk was technically "broken"19:29
rockstarTarmac worked fine on Maverick, but the tests didn't.  This meant that no branches could be merged until the tests were fixed.19:30
rockstarIt's kind of a "Stop the line" situation.19:30
rockstarSarah Jane pointed Tarmac at her branches and then went back to coding and reviewing code.  Everything is automated.19:30
rockstarCAVEAT: The system Tarmac uses to merge branches wasn't really meant for what Tarmac does to it.19:31
rockstarBecause of this, in the next little while, Launchpad will be gaining a feature called "merge queues."  Basically, when you're ready for the branch to be merged, you stick it in the queue.19:31
rockstarThen tarmac just looks at the queue and merges that way.19:32
rockstarThis is what I'm currently spending my days working on, so I'm quite excited about the feature.19:32
rockstarOkay, so tarmac is merging branches automatically.19:33
rockstarHow does Sarah Jane get her software into the hands of people that use it.19:33
rockstarAs a practice now, I personally NEVER do `make install` or `setup.py install` or whatever.  If it's not packaged, I'm not installing it.19:33
rockstarSo Sarah Jane needs to get it packaged.19:34
rockstarSarah Jane has some packaging data, but she doesn't want to keep that data in trunk, because it's very OS specific.19:35
rockstarWhat she needs to do then is create a branch of trunk, and add the debian/ folder to that branch.19:36
rockstarHas anyone here used the source package recipe feature in Launchpad?19:36
rockstarOr maybe a better question, has anyone here even HEARD of the source package recipe feature in Launchpad?19:36
* rockstar fails19:37
rockstarSource package recipes are "recipes" that allow you to say "hey, I have these branches that all need to go together.  Whatever working tree that makes needs to be made into a package."19:38
rockstarSo Sarah Jane can go to her trunk page and click the link that says "Create source package recipe."19:39
rockstarShe's then confronted with a bunch of options, including the ability to build her package every day (!).19:39
rockstarAt the bottom, she's given a default recipe, which is basically the trunk branch.19:39
rockstarThe trunk branch doesn't have the debian/ folder there, so we need to merge in Sarah Jane's packaging branch.19:40
rockstarSo the recipe will be something like this:19:40
rockstarlp:project19:40
rockstarmerge lp:~sarah-jane/project/packaging19:40
=== You're now known as ubuntulog
rockstarThe working tree that is created is then sent to the PPA builders.19:41
rockstarSarah Jane didn't necessarily want to build the package every day, but did want to build the package after Tarmac makes a merge run.19:41
rockstarShe can configure Tarmac to request a build of her package recipe after Tarmac merges all the branches from a single run of `tarmac land`19:43
rockstarOh snap.  I should mention that, as it currently stands, you'll need to be on the "edge" servers in order to create and edit source package recipes.  This is because they are still technically "beta."19:43
rockstarSo let's look at what Sarah Jane's little project is doing now.19:45
rockstarSomeone proposes a merge into her trunk branch.19:45
rockstarSarah Jane looks at the merge, and she's glad to have the patch.  She votes "Approve" and sets the merge proposal to "Approved."19:46
rockstar10 minutes later, when the tarmac cron job is invoked, Tarmac finds the approved merge and merges it.19:46
rockstarIt then runs all the tests to make sure that there's nothing fundamentally broken about the merge.19:46
rockstarTarmac is happy with the merge, and commits.19:46
rockstarTarmac continues on, merging and committing other approved merges.19:47
rockstarAfter Tarmac is finished on the branch, it requests a build of Sarah Jane's source package recipe.19:48
rockstar30 minutes later, Bob gets an update alert for the new package that's available in Sarah Jane's PPA.19:48
rockstarHe installs the updated version and finds some new features in the app he's testing out.19:49
rockstarSo in a matter of a few hours, you have your bleeding edge features into the hands of your most loyal users, through a package management system that allows them to downgrade should they find a heinous bug.19:50
rockstarAnd even when they do find a heinous bug, the update is only a few hours away from the approved merge.19:50
rockstarAny questions?19:50
rockstarAlright, thanks everyone!19:52
mattiI hope that people are sitting comfortably.19:58
matti:-)19:58
mattiHello everyone!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 || Event: Ubuntu App Developer Week - Current Session: Infinity and beyond - gentle introduction to Ruby - Instructors: matti
mattiMy name is Krzysztof Wilczynski20:00
mattiAnd I will talk today about Ruby.20:00
mattiA little bit about the history of the language, a little bit about community that surrounds it and a little bit about the language itself.20:01
mattiYet, this talk is not really a complete language tutorial.20:01
mattiPlease, feel free to ask any question as we go forward ;-)20:02
mattiWhat is Ruby?20:02
mattiRuby is a modern general purpose language.20:03
mattiFairly young too.20:03
mattiRuby is often referred as "scripting language" - which to some extend is true, nevertheless it is a turing-complete full-blown programming language.20:03
mattiWritten completely in C.20:03
mattiRuby offers multiple you as the author to chose between functional, structural and object-oriented programming techniques.20:04
mattiThis allow you to create from a very small script which you need to solve particular problem i.e. parse some log etc.20:05
mattiTo a complex web applications interacting with multiple systems and providing extensive API etc.20:05
mattiRuby has rapid development model and its relese cyclce is less strict and more relaxed that what some other languages have, for example Python.20:06
mattiAs quite mature project right now, you can enjoy Ruby on multiple platforms even that its development is mainly on Linux.20:07
mattiThere are version for UNIX, Mac OS X, BeOS even OS/2 and much more :)20:07
mattiRuby is fully object-oriented and one of its principles is that everything is an object.20:08
mattiIncluding all the primitive types like Integer and String etc20:08
mattiWe have automatic memory management and garbage collection (which uses a mark-and-sweep implementation of the garbage collector).20:09
mattiRuby also offers exception handling, operator overloading.20:10
mattiBy design Ruby does not allow for multiple inheritance -- like Java for example -- but this can be solved by using Mixins -- more about that later.20:10
mattiAnother great principle that can be found in Ruby is minimalism -- code less do more.20:11
mattiAnd Ruby -- as well as other dynamic languages -- really allows you to save time and effort.20:12
mattiAs a dynamic language, Ruby is interpreted during the run-time, therefore not compiled.20:13
mattiBeing dynamic language, Ruby lacks strong types declaration in favour of duck-typing and there is not explicit scope declariation too.20:13
mattiRuby is excellent at text processing thanks to build in support for regular expressions -- it is build into the language core, not as a separate library. This is similar to what Perl offers.20:14
mattiA little bit about Ruby's heritage, so we can understand the language better :)20:15
mattiRuby was influenced by Perl -- idea for build-in regular expression engine and amazing flexibility, Lisp -- functional programming, Eiffel, Ada, Smalltalk -- most of Object-Oriented principles and closures and CLU -- iterators.20:16
mattiThanks to all the wealth that Ruby inherited from other great languages, I sometimes say that "Ruby is Python for Perl developers".20:18
mattiAs the author of Ruby describes it: "Ruby is simple in appearance, but is very complex inside, just like our human body."20:18
mattiSome other people have said similar things too :)20:18
matti"Ruby > (Smalltalk + Perl) / 2" by Michael Neumann20:19
matti"Ruby is two parts Perl, one part Python, and one part Smalltalk" by Colin Steele20:19
mattiSo, how Ruby compares to other languages?20:19
mattiQuite often people refer to Ruby as being not "fast enough" or "slow" etc.20:20
mattiThere is a grain of truth it this statement.20:20
mattiRuby of course as dynamic language will always be slower than Java or C, for that matter.20:20
mattiNevertheless the core of the language was written in C.20:21
mattiFor example, Ruby does not pre-compile to byte code like Python does -- the famous .pyc files.20:22
mattiThis is not entirely true -- but I will talk about that later.20:22
mattiRuby was design to be used for scripting and small applications.20:23
mattiWhich do not have long life-span in general.20:23
mattiThis can be seen in the way how Ruby manages memory and how its gargabe collector works.20:23
mattiQuite similar to Perl in fact.20:23
mattiFor anyone who is interested in some real tests considering Ruby's perfomance in terms of how Ruby stands next to other languages, please take a look on: http://shootout.alioth.debian.org/.20:25
mattiThere is of course a flip side.20:25
mattiSpeed vs Productivity -- the good old "apple vs oranges" problem, so to speak.20:25
mattiRuby might not be the most perfoment langauge.20:26
mattiOr the easiet one.20:26
mattiOr the most popular one.20:26
mattiBut most certainly it does contribute to the way how you and other people using it work.20:26
mattiMost often it will shorten the create-edit-compile-debug cycle.20:26
mattiWhich allows people to create software quicker and with less hassle.20:27
mattiThis is because Ruby is highly dynamic and has very open nature.20:28
mattiYet, everything comes with the price -- dynamic languages can be unpredictable. This is also true for Python :)20:28
mattiEverything happens in the run-time, therefore you will find out about potential issues only when you application will stumble into them.20:29
mattiWhen many people look at Ruby for the very first time, they will most certainly notice its unique syntax.20:30
mattiThings like the BEGIN {} and END {} blocks also known from awk and Perl.20:31
mattiThe infamous "begin" and "end" plus "do" and "end" which look like our good old friend Pascal a little :)20:31
mattiActually, some people do not like that sort of thing, hence they think that Ruby is ugly :-(20:32
mattiWe also have { } to denote code blocks which you have seen in C and Java and many others.20:32
mattiAmong many things unique to Ruby few may stand-out.20:33
mattiOne would be Ruby's license.20:33
mattiRuby is a Free Software, with a GPL and Artistic License. Quite the same as Perl.20:34
mattiI was wondering myself whether Perl's influence on Ruby has anything to do with that :)20:34
mattiAnother interesting principle that Ruby tends to follow is "POLS".20:34
mattiThe "Principle of least surprise" -- aslo know as "LOLA" :-D or "Law of least astonishment".20:35
mattiWhat is basically means is simple in its nature: what you see and what you think your code will do and how it will behave is probably what you will get.20:35
mattiThere are also the famouns method suffixes ? and !.20:36
matti? - is usually used for methods that test for something and/or for particular condition and they should return boolean (true/false) back to us.20:37
matti! - denotes a "destructive" method which will modify the content of the variable on which the method was called.20:37
mattiRuby lacks ++ and -- for the pre and post incrementation of numeric values.20:38
mattiTherefore we have to use these operators explicitly: a = a + b or a += b.20:39
mattiThat is the Ruby way.20:39
mattiRuby will pass everything as reference to object, therefore there is no such thing as concept of Perl's scalar.20:39
mattiThere is also the "splat" operator denoted as * which allows to work or lists (arrays) and pass variable length parameters to methods.20:41
mattiRuby also has symbols -- an immutable strings that are initialized only once when defined. They are said to be frozen.20:41
mattiQuite useful when used in conjuction with associative arrays.20:42
mattiRuby itself comes in different shapes and forms...20:42
mattiMost popular implementations of Ruby interpeter are:20:42
mattiMRI (for the 1.8 family) also know as "Matz's Ruby Interpreter"20:43
mattiIt is the most stable version of Ruby sometimes called CRuby.20:43
mattiYARV (1.9 family) also known as "Yet another Ruby VM" and/or KRI "Koichi's Ruby Interpeter" after the author of new Ruby Virtual Machine implementation.20:44
mattiGoing back to the Ruby perfomance here.20:44
mattiMRI vs YARV -- YARV optimizes a lot by compiling everything into internal byte-code - almost like Python and mentioned .pyc files (although, Ruby does not create .rbc files as a side effect :-]).20:45
mattiYARV also supports native operating-systems threads on the contrary to Green Threads that MRI has. Unfortunately, similarly to Python, YARV suffers from GIL issues :-(20:46
mattiThere is also REE (based on MRI) "Ruby Enterprise Edition" maintained by a company called Phusion.20:47
mattihttp://www.rubyenterpriseedition.com/ -- more about REE and Phusion and what they did to Ruby and its community.20:47
mattiJRuby -- an implementation of Ruby interpreter in Java http://jruby.org/20:48
mattiIronRuby -- Ruby for the .NET platform http://ironruby.net/20:48
mattiMacRuby - very cutting-edge version which has a lot of experimental features. Maintained mainly for Mac OS X. http://www.macruby.org/20:49
mattiRubinius -- a completely different implementation of the Ruby Virtual Machine http://rubini.us/.20:49
mattiAnd there is also Cardinal which is a Ruby interpreter ported for the Parrot Virtual Machine http://cardinal2.rubyforge.org/20:50
mattiLittle bit about the history of the language itself.20:50
mattiRuby was born on the February 24, 1993 and it was created by Yukihiro Matsumoto.20:51
mattihttp://deadbeef.info/tmp/talk/matz.jpg -- a picture of Yukihiro also known as Matz in the community.20:51
mattiAs he puts it: "I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python".20:51
mattiSo in more or less chronological order:20:52
matti1993 - on February 24 the language was born and the first "Hello World" in Ruby was created20:52
matti1994 - in December the first alpha version was released to public20:52
matti1995 - in December the first public release version 0.9520:52
matti1996 - in December version 1.0 was released20:52
matti1999 - version 1.4 was released20:53
mattiBy this time, Ruby was used mostly in Japan...20:53
matti2000 - the "Programming Ruby" book published and the comp.lang.ruby was created on Usenet -- after this Ruby gained more popularity outside Japan20:53
matti2001 - version 1.6 was released and the "Ruby in a Nutshell" book published20:53
matti2002 - the "Ruby Developer's Guide" book was published20:53
matti2007 - on December 26, YARV by Koichi Sasada was officially merged into main Ruby code tree making 1.9 faster and better20:53
mattiAnd as we can see... by the 2010 Ruby is very much alive and well :)20:54
mattiThis nicely reflects the popularity of Ruby:20:54
mattiIn terms of users...20:54
matti1993 - 1 -- before first public release of Ruby20:54
mattiHere, the only user was Matz :)20:54
matti1995 - 100  -- after first public release mainly local to Japan20:54
matti2000 - 10 000 -- after first book about Ruby was published20:55
mattiFirst book helped Ruby gain momentum...20:55
mattiEspecially, after first translation to English was published.20:55
matti2005 - approximately 100 000 -- when Ruby On Rails was born by David Heinemeier Hansson20:55
mattiNow.20:55
mattiIn 2005 when Ruby on Rails was introducted to the World.20:55
mattiRuby suddenly picked up a lot of attention world-wide.20:56
mattiSo then...20:56
matti2008 - approximately 1 000 00020:56
matti2013 - approximately 4 000 000 and more ... this is the estimation made by Gartner :)20:56
mattiI stronly believe that there is more than 4 mln Ruby users world-wide already.20:56
mattiWe can also look at how popular Ruby is on some web sites used by many people on every-day basis.20:57
mattiRuby is the most popular language on http://refactormycode.com/20:57
mattiRuby is the most popular on http://snippets.dzone.com/, almost 2115 snippets to date!20:57
mattiRuby was tagged 13994 times on Stack Overflow -- with Ruby on Rails being tagged 20766 times :)20:57
mattiHolding the 10th position on TIOBE Programming Community Index20:57
mattiListed 10th on the Programming Language Popularity web site20:58
mattiWhich is nice.20:58
mattiSince Ruby is quite young and might not be as established as other languages like Java, Python, etc.20:58
mattiYet.20:58
mattiWhat makes Ruby so amazing.20:58
mattiIs of course the community.20:58
mattiAll the people using it and behind it.20:59
mattiThere is this famous acronym: "MINSWAN".20:59
mattiWhat it means is "Matz is nice, so we are nice". And it was first used by Dave Thomas, one of the Ruby hackers.20:59
mattiAnd this spirit is what drives Ruby community.21:00
mattiI would actually dare to say that Ruby community is a bit like a big family.21: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 ||
mattiAnd most of the users are like a true care-bears.21:00
mattiOh dear.21:00
matti:)21:01
mattiI am half-way my talk and its already the time to end it.21:01
mattiWell.21:01
mattiI don't see anything else scheduled, so I will just keep on talking ;p21:01
mattiAs I said, the Ruby community is very nice, friendly and open.21:02
mattiEven Matz is extremely open towards other ideas and especially towards other languages too.21:02
mattiHe is a Python user for example :)21:02
mattihttp://deadbeef.info/tmp/talk/matz_python.jpg21:02
mattiThere are mailing lists to chose from. Official Forum.21:03
mattiOf course the IRC channels #ruby and #ruby-lang (including #rvm) on Freenode network.21:03
mattiThere are some very nice and friendly people always keen to help.21:04
mattiSo, please if you want to know something and/or you struggle with something by all means join these channels and ask for help :)21:04
mattiAnd... don't ask to ask, just ask :)21:04
mattiYou can of course use Google too ;)21:05
mattiThere are some conferences being organized now and again by Ruby community all 'round the World.21:05
mattiMost famous are:21:05
mattiEuruko is the biggest in Europe :) Yay!21:05
matti"Ruby Conference" is the biggest in the USA.21:06
mattiAnd there is of course the BIGGEST conference called "Ruby Kaigi" held in Japan.21:06
mattiRuby community welcomes everyone.21:06
mattiAnd every idea.21:06
mattiThere is no such thing like "stupid question" or "dumb idea".21:07
mattiRuby folks are forward-thinking and most of them are type of "doers".21:07
mattiWhat is very important.21:07
mattiWhat what makes me personally proud of being part of the community.21:07
mattiIs that Ruby does not discriminate and welcomes women!21:08
mattiAnd we have some amazing women in the community already.21:08
mattiElise Huard -- http://jabberwocky.eu/21:08
mattiSarah Mei -- http://www.sarahmei.com/21:08
mattiSarah is a great coder and fantastic person looking after Ruby community in San Francisco USA :)21:08
mattiNow.21:09
mattiWho is using Ruby the most?21:09
mattiBy the popularity of Ruby on Rais and similar projects.21:09
mattiThis would be all the web developers.21:09
mattiThey also have Sinatra, Camping and many others web frameworks made in Ruby to chose from.21:10
mattiBut.21:10
mattiWhat is very nice.21:10
mattiIs that Ruby is gaining popularity among systems people.21:10
mattiSystems administrators in particular as a worthy replacement for Perl.21:10
mattiMay system administrator have been using Perl for many years and they pick-up Ruby because of all the nice features it has, plus to them quite often it feels and looks like Perl21:11
mattiWell, Ruby was influenced by Perl :)21:11
mattiProjects like Puppet and Chef -- a configuration management and deployment systems greatly improve every-day life of a system administrator.21:13
mattiThese projects push forward aspects of automation and instrumentation nowadays.21:13
mattiAlso worth mentioning is mcollective.21:13
mattiAmazing project allowing for working with multiple systems and manage them from single node -- it uses meta-infomration provided by for example Puppet allowing for some amaznig things :)21:14
mattiThere are scientists using Ruby too!21:14
mattiThe Monterey Bay Aquarium Research Institute (MBARI) uses Ruby extensively.21:15
mattiBrent Roman who works there also provides patches that greatly speed-up Ruby and add more features :)21:15
mattiThere is this standing joke in the community that Brent uses Ruby to drive these little sub-marines :P21:15
mattiI am not sure whether this is true or not ;p21:16
mattiWho is using Ruby in the "industry" so to speak :)21:16
mattiMultiple companies... like Amazon, BBC, Cisco Systems, IBM, Oracle, NASA, Siemens, Yahoo! and many more...21:17
mattiAlso the well-known projects and web pages like http://twitter.com/, http://github.com/, http://slideshare.net/, http://www.scribd.com/, http://yellowpages.com/ (yes, them too :D), http://www.alistapart.com/, http://www.hulu.com/ and many more ;)21:18
mattiLet's talk about the every-day use of Ruby...21:19
mattiInstalling Ruby is really easy.21:19
mattiEspecially when your distribution provides binary packages -- like Ubuntu, Debian, Fedora and others.21:19
mattiIf you need to be on the cutting-edge, a project called "Ruby Version Manager" (RVM) comes to the rescue :)21:20
mattiRVM was created by Wayne E. Seguin to solve problem of having multiple version of Ruby running multiple modules in the same time in production.21:20
mattiRVM allows you to do exactly that :)21:21
mattiPlus it is extremely easy to use.21:21
mattiCross-platform -- available for Mac OS X, BSD family and more.21:21
mattiAnd it allows you to install all the required rubies without a need for an access to a super-user privileges.21:22
mattiEverything can be done as user (you) in your local home directory :)21:22
mattiI personally run RVM with few rubies on my notebook for development and testing ;)21:23
mattikrzysztof@samsung:~$ rvm list21:23
matti;]21:23
mattirvm rubies21:23
mattiree-1.8.7-2010.02 [ i386 ] ruby-1.8.7-p302 [ i386 ] ruby-1.9.2-p0 [ i386 ]21:23
mattikrzysztof@samsung:~$ ruby -v21:23
mattiruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]21:23
mattikrzysztof@samsung:~$ rvm ree21:23
mattikrzysztof@samsung:~$ ruby -v21:23
mattiruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.0221:23
mattiQuick, nice and easy.21:24
matti;]21:24
mattihttp://rvm.beginrescueend.com/ -- more about RVM :)21:24
mattiRuby has many modules to chose from.21:24
mattiThey are called "gems".21:24
mattiA gem is a special boundle.21:25
mattiMore alike .deb package in Ubuntu or Debian.21:25
mattiGetting some numbers here...21:25
mattiAlmost 17 000 gems in almost 25 GB worth of data hosted on http://rubygems.org/21:25
mattiWorth mentioning that on August 31st 2010, Ruby Gems passed the mark of 50th million gems downloaded21:26
mattiWell done for them!21:26
matti:-)21:26
mattiAlmost 9 000 gems on http://rubyforge.org/.21:26
mattiSo there is plenty of modules to chose from in Ruby ;]21:27
mattiMeaning that you may save some time on development :)21:27
mattiAnother interesting project which will help you out tremendously is "Bundler".21:28
mattiBundler allows for stress-free deployment of Ruby application by including all the required and relevant gems together with it.21:28
mattiSo, deployment of remote systems will be way less complex with Bundler.21:29
mattiThis also add value when you want to upgrade existing application.21:29
mattiDefinitely worth looking at :)21:29
mattiMany people ask about editors and IDEs ... which ones are the best for Ruby?21:30
mattiWell, there are quite a few out there.21:30
mattiTo begin with we have Interactive Ruby (IRB).21:31
mattiExcellent for testing and quick proof-of-concept and quick prototyping.21:31
mattiNot really an editor. More alike command line interface (CLI) that Ruby offers -- similar to what you'll see after executing Python :)21:31
mattiWe have well known VI and VIM -- oldie but goodie ... :)21:32
mattiGeany -- quite nice editor, I personally like it.21:32
mattigedit and Kate -- part of Gnome and KDE.21:32
mattigedit is very nice and often not really appreciated.21:32
rooliganwhich editor do you use?21:32
mattiEspecially for what this little editor can do.21:33
mattirooligan: That depends.21:33
mattirooligan: On my desktop at home and work I use Ruby.21:33
mattiOps.21:33
mattiHehe.21:33
mattiI mean I use Geany.21:33
mattiSorry ;p21:33
rooligan:D lol21:33
mattiWith the dark colour scheme ;p21:33
mattiI can make a screen shot in a second.21:33
mattiOn remote systems I prefer VIM over emacs for instance.21:34
mattiSome of my colleagues are using TextMate -- but that is OS X.21:34
rooliganTextmate looks strange for me... without any buttons. Just the code and tabs21:35
mattiIndeed.21:37
mattiA lot of web developers working on OS X prefer it.21:37
mattiI am not an OS X user so I can't really tell whether it is "that awesome" as they describe it ;]21:37
mattiHehe.21:38
mattiNetBeans can do Ruby too.21:38
mattiSome new kids on the block like Aptana and Redcar are nice.21:38
mattiI've seen people working with notepad.exe ;p21:38
rooligan:O21:39
mattiTwo commercial ones are hightly rated too: RubyMine and Komodo.21:39
mattiRight...21:39
mattiRuby and the docummentation :)21:39
mattiFor all the people who want to try it out.21:39
mattiTry Ruby is a nice alternative.21:40
mattihttp://tryruby.org/21:40
mattiA wealth of examples can be found on "Programming Language Examples Alike Cookbook" http://pleac.sourceforge.net/.21:40
mattiFor peolpe keen on learning about "The Ruby Way" and how to make their code more idiomatic.21:41
mattiI recommend Ruby Koans -- http://github.com/edgecase/ruby_koans21:41
mattiThere is also help from the Ruby itself.21:41
mattihelp -- in IRB.21:41
mattiAnd console command ri.21:42
mattiBoth require Ruby Docummentation to be installed.21:42
mattiThere is the Ruby Standard Library Documentation http://www.ruby-doc.org/ and http://www.ruby-doc.org/stdlib/21:42
mattiProgramming Ruby The Pragmatic Programmer's Guide -- http://www.ruby-doc.org/docs/ProgrammingRuby/21:42
mattiAmazing introduction to the languge: Why's (poignant) Guide to Ruby -- http://viewsourcecode.org/why/21:43
mattiRuby Programming -- http://en.wikibooks.org/wiki/Ruby_Programming21:43
mattiSome books that I can recommend:21:43
matti"The Ruby Programming Language" by David Flanagan and Yukihiro Matsumoto21:43
matti"Ruby In A Nutshell" by Yukihiro Matsumoto21:43
matti"Programming Ruby: The Pragmatic Programmers' Guide" by Dave Thomas, Chad Fowler and Andy Hunt21:43
matti"The Ruby Way" by Hal Fulton21:43
matti"Ruby Developers Guide" by Lyle Johnson, Jonothon Ortiz, Robert Feldt and Michael Neumann21:44
rooliganmatti: What do you think about Python?21:44
mattirooligan: Almost three years ago I was a heavy Python user.21:44
mattirooligan: At some point I had to work more and more with Ruby.21:44
mattirooligan: And this amazing spring day... a time for lovers...21:45
mattirooligan: I have simple fallen in love with Ruby.21:45
matti;]21:45
rooligan:)21:45
mattirooligan: And since then... I work mainly with it on day-to-day basis.21:45
mattiI also work with other languages like Python (still have a lot of respect), Perl, Java and C.21:46
rooliganbut for Perl, Java and C you haven't respect?21:46
mattiI do.21:46
mattiYet for instance I seldom use C nowadays.21:47
mattiWhen I do, it was usualy to extend Python and/or Ruby.21:47
mattiFor the "extra speed" that C offers.21:47
mattiPerl mainly for small scripts and one-off one-liners.21:47
mattiJava because of the core application that may company develops,21:47
rooliganI don't think C is much faster than Python. There is no notable difference.21:47
mattirooligan: In terms of byte code execution, there isn't any.21:48
mattirooligan: Yet quite often a pure-Python and/or pure-Ruby libraries are not performent enough.21:48
mattirooligan: There is a factor of memory usage here too.21:48
mattirooligan: Imagine... A YAML parser in pure-Ruby is way behind C implementation.21:49
mattiOn that note.21:49
mattiRuby MRI (1.8) tends to be a little bit slower than Python.21:49
mattiRuby YARV (1.9) tends to match Python's speed and sometimes over-take it.21:50
mattiYet MRI and YARV are not fully compatible with each other.21:50
mattiGoind back to finding-out things in Ruby.21:51
mattiIf you don't have access to the web and/or documentation...21:51
mattiYou can try to figure-out how to use some objects and classes by calling some of these methods:21:51
matti.singleton_methods, .public_methods -- static class methods use with parameter false, .private_methods, .instance_methods -- instance methods, .class_variables, .instance_variables, .ancestors -- all modules included in this module.21:52
mattiThey are sometimes very handy.21:52
mattiWhen it goes to coding, Ruby on that matter almost like Perl.21:53
mattiMore than way one to solve a problem (more than one way to do this ...).21:53
mattiAnd the things like...21:53
mattiThe "TABWTDI"  -- "There is a better way to do it"21:53
mattiThe "TMTOWTDI" -- "There is more than one way to do it"21:53
mattiAnd also "The Ruby Way".21:53
mattiHow you code is completely up-to-you as a developer.21:53
mattiYet Ruby allows you to create both... amazing code... and ugly as hell code.21:54
mattiOn the contrary to Python whom enforces some good coding practices more stronger.21:54
rooliganmatti: There is no language you can't write ugly code on ;)21:54
mattiRuby has a lot of syntactic sugar in it....21:55
mattirooligan: I agree :)21:55
mattirooligan: Yet Ruby does not have this brilliant PEP8.21:55
mattirooligan: Which would help people be more consistent etc.21:55
mattiSome sugar for instance: %w(a b c).join(',') vs %w(a b c) * ','21:56
rooliganBut most of Python programers don't know about PEP8 :(21:56
mattiThere is more, and sadly allows for serious abouse in terms of code clarity etc.21:56
mattirooligan: Hehe.21:56
rooliganwhat would %w(a b c).join(',') do?21:57
mattiTry it :)21:57
mattiEither in IRB or in the Try Ruby ;]21:57
mattiThe web site.21:57
mattihttp://tryruby.org/21:57
matti%w() is a short-hand way of creating array in Ruby.21:59
mattiYet another Perl influence.21:59
rooliganok22:00
matti.join will iterate over the list and join all the elements with ,.22:00
matti(main):001:0> %w(a b c).join(',')22:00
matti=> "a,b,c"22:00
rooliganI know join already from Python :)22:00
matti;]22:00
mattirooligan: Ruby is very similar to Python :)22:00
rooliganIs there a good online resource for learning Ruby?22:01
mattiYes.22:01
mattiI pasted some of the good links.22:01
matti+ Try Ruby -- http://tryruby.org/22:02
matti+ Programming Language Examples Alike Cookbook -- http://pleac.sourceforge.net/22:02
matti+ Ruby Koans -- http://github.com/edgecase/ruby_koans22:02
matti+ Ruby Standard Library Documentation -- http://www.ruby-doc.org/ and http://www.ruby-doc.org/stdlib/22:02
matti+ Programming Ruby The Pragmatic Programmer's Guide -- http://www.ruby-doc.org/docs/ProgrammingRuby/22:02
matti+ Why's (poignant) Guide to Ruby -- http://viewsourcecode.org/why/22:02
mattiWhy's (poignant) Guide to Ruby -- http://viewsourcecode.org/why/22:02
matti+ Ruby Programming -- http://en.wikibooks.org/wiki/Ruby_Programming22:02
mattiIs for absolute begginers.22:02
mattiIf you know Python already.22:02
mattiYou'll probably pick-up Ruby in no time.22:03
mattiRuby is really easy to learn.22:03
mattiAnd I bet you, you'll appreciate Ruby Blocks straight-away.22:03
rooliganThat Why's poignant Guide is really good, much people say22:03
mattiIndeed.22:04
matti_why -- guy who made it.22:04
mattiAt some point left the community.22:04
mattiWe do not know why.22:04
mattiHe just went missing...22:04
mattiHe deleted most of his work etc etc.22:04
mattiYet, _why was a true genius.22:04
mattiRuby gained a lot because of him.22:05
mattiGoing back... not much of my talk have left ;]22:05
mattiRuby projects tend to be hosted mainly on github.22:06
mattiAnd a lot of Ruby Hackers use git.22:06
mattiWhich is like BitBucket for Python.22:06
mattiSome of the companies which offer project hosting for Ruby and/or Ruby on Rails.22:06
mattiEngine Yard -- http://www.engineyard.com/22:06
mattiHeroku -- http://heroku.com/22:06
mattisite522:06
mattibluehost22:06
mattiDreamHost22:07
mattiOVH -- if you want to maintain your own systems22:07
mattiAmazon EC2 -- worth mentioning are new micro-instances22:07
mattiQuickly about Ruby code and synatx :)22:07
mattiFile extension .rb in most of the cases.22:07
mattiTypical hashbang is #!/usr/bin/ruby or better #!/usr/bin/env ruby22:07
mattiThe code layout most likely will be done with two spaces for indentation -- a standard among Ruby projects.22:08
mattiKeywords and language elements will be separated by new lines and/or by semicolons.22:08
mattiVariables are separated by commas -- same rule applies to passing parameters to methods.22:08
mattiMost of the code can be short-handed to an in-line instruction i.e. puts "Hello, Bob" if name == "Bob" -- like in Perl :)22:09
mattiThe new-linea and semicolons style sometimes is mixed.22:09
matti        n = 122:09
matti        if n > 022:09
matti          puts "Yes"22:09
matti        else; puts "No"; end22:09
mattiComments...22:09
matti# -- can be span across multiple lines22:09
matti"=begin" and "=end" -- everything in-between these lines will be ignored by Ruby interpreter22:09
matti        #22:09
matti        # A comment ...22:09
matti        #22:09
matti        =begin22:09
matti          A comment too ...22:09
matti        =end22:10
matti;]22:10
mattiNow...22:10
mattiMy talk goes deeper into some Ruby syntax.22:10
mattiBut since I have already talked to much.22:10
mattiI will end it ;]22:10
mattiThank you all for listening to me.22:10
matti:)22:11
mattiI can tell you a little bit about syntax and why Ruby is so popular in terms of meta-programming (which is what makes it so great) when you folks are interested in that :)22:11
mattiBut, by all means. Please give it a try and perhaps you will fall in love too, as I did ;]22:12
rooligan:)22:13
mattirooligan: Look at blocks in Ruby.22:13
mattirooligan: And meta-programming in it.22:13
mattirooligan: It is absolutely amazing what you can do.22:13
mattirooligan: Plus, Ruby flexibility is great.22:13
mattirooligan: Python for instance does not allow you to extend (monkey-patch) its primitive types.22:14
mattirooligan: There is no limit to what you can do in Ruby.22:14
mattirooligan: You can even remove/unset some of the core if you feel like so ;]22:14
mattirooligan: Python community believes that this is really ugly, dangerous and you should not do it. Period.22:15
mattiWell, they do have a point... but so far Ruby is all good and well with it ;p22:15
mattirooligan: For example...22:15
mattikrzysztof@samsung:~$ irb22:16
mattiFri Oct 01 22:15:54 +0100 201022:16
matti(main):001:0> 'rooligan'.encrypt22:16
mattiNoMethodError: undefined method `encrypt' for "rooligan":String from (irb):122:16
matti(main):002:0>22:16
mattiHa!22:16
mattiNo method... yet! :)22:16
mattiLet's quickly extend the String class...22:16
mattiOne of the primitive types in Ruby... Also full-blown objects.22:16
matti(main):002:0> class String; def decrypt; tr 'b-za', 'a-z'; end; end22:16
matti=> nil22:16
mattiAnd...22:17
matti(main):004:0> class String; def encrypt; tr 'a-z', 'b-za'; end; end22:17
matti=> nil22:17
matti(main):005:0> 'rooligan'.encrypt22:17
matti=> "sppmjhbo"22:17
matti;]22:17
mattiTADA.wav22:17
matti(main):006:0> 'rooligan'.encrypt.decrypt22:17
matti=> "rooligan"22:17
rooligan:)22:17
mattiAnyway.22:17
mattiI have to stop talking ;p22:18
rooliganok22:18
* matti hugs rooligan 22:18
matti:)22:18
rooligan:)22:18
mattirooligan: Pop-in #ruby and #ruby-lang ;p22:19
mattiI should actually say...22:19
mattiCome to the Dark Side.22:19
matti;p22:19
rooligan:D22:19
rooliganOk, bb22:20
=== kdrx-[-_-]\ is now known as kuadrosx
=== yofel_ is now known as yofel
=== kdrsx is now known as kuadrosx

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!