The Fridge: Ubuntu 12.04 Development update

Development Update

It is the week of Ubuntu 12.04 Alpha 2 which is to be released in just a few hours. Everybody has been getting their good work into Ubuntu, so it is a great opportunity for everyone to go check it out and test it. If you are excited by 12.04, just check out our testing pages and report back your results. The earlier we get them, the better!

Currently there is also a test rebuild of the whole archive going on, which will hopefully identify all the build errors early enough. In two weeks time Feature Freeze will be reached, at which point we stop introducing new features, packages, and APIs, and concentrate on fixing bugs in the development release.

Jeremy Bicha, a great contributor to the Desktop team, wrote up a nice explanation of how the components of the Ubuntu Desktop were chosen this cycle. It shows how much consideration goes into putting the release together and how coordination between Ubuntu and its upstreams is important.

Events

It is Ubuntu Developer Week, the event for getting involved, learning more, peeking behind the scences, and learning more from experience developers. Day 1 and Day 2 have already passed, but if you couldn't make it to the sessions, read the following summaries to find out what happened. They contain links to the logs of the sessions.

Ubuntu Developer Week will only still be today, Thursday 2nd February 2012.

Things which need to get done

If you want to get involved in packaging and bug fixing, there's still a lot of bugs that need to get fixed:

<if teams ask us to add more stuff to this list, we're of course happy to do it>

First timers!

We had two new contributors to Ubuntu who got their first upload in: Jean-Michel Vourgere and Sébastien Ramage. Great work! Both helped keeping Debian and Ubuntu in sync and good fixes into Ubuntu.

New contributor: Simon Steinbeiß

Benjamin Kerensa talked to Simon Steinbeiß, here’s what he has to say:


Simon SteinbeißHow did you get involved?
I got involved in Ubuntu by starting to use Xubuntu and then hanging out in its IRC channels. I engaged in discussions about Xubuntu’s artwork and default application set. After a while I started bringing in proposals and my own ideas. The developer team was really helpful and that’s how I got involved in the Xubuntu artwork team.

What was your experience like?
Well generally positive. Obviously there are always compromises to be made. When doing a gtk-theme for yourself or a panel-layout you apply different criteria then when doing it for an unkown amount of anonymous users. But I’d say it’s a rewarding job and the reviews of Xubuntu’s artwork have been pretty good since I’ve been involved (*brag* )

What did you like most about it?
The fact that there was a good community and everyone wanted to make Xubuntu better. I have “converted” quite a few friends of mine who formerly used Windows, so I got personally interested in making Xubuntu better. It seemed easier to improve things in Xubuntu itself than going around after each release and fixing things for my all my friends I also liked the fact that my artwork could be seen and used by so many people, it’s always great for an artist to have such a wide audience.

Is there anything that should have been easier? What do you recommend to other contributors who think about starting to get involved?
That is difficult to tell. I have the feeling that with many open-source or community-driven projects it’s about building relationships to people initially and that depends on the structure of the team you want to be a part of. If it’s a good team with good leadership it obviously might be easier to get involved. But it also depends on other factors like your personal motivation – no-one should be trusted with important tasks right from the start, so hanging in there for a bit is a necessary step to build trust.

What do you do in your other spare time?
I’m currently doing a PhD in the humanities. I finished my MAs in Philosophy and Religious Studies (no, not Theology!) and I’m currently conducting research projects in both fields at my university.


Get Involved

  1. Read the Introduction to Ubuntu Development. It's a short article which will help you understand how Ubuntu is put together, how the infrastructure is used and how we interact with other projects.
  2. Follow the instructions in the Getting Set Up article. A few simple commands, a registration at Launchpad and you should have all the tools you need, and you're ready to go.
  3. Check out our instructions for how to fix a bug in Ubuntu, they come with small examples that make it easier to visualise what exactly you need to do.

Find something to work on

Pick a bitesize bug. These are the bugs we think should be easy to fix. Another option is to help out in one of our initiatives.

In addition to that there are loads more opportunities over at Harvest.

Getting in touch

There are many different ways to contact Ubuntu developers and get your questions answered.



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Jim Kielman: Ubuntu Forums Ubuntu +1 update for February 3/2012

It’s that time again. Alpha 2 was released yesterday, here is one members experience:

http://ubuntuforums.org/showthread.php?t=1919854

There have also been several threads on kernel panics with the 3.2 version:

http://ubuntuforums.org/showthread.php?t=1913073

http://ubuntuforums.org/showthread.php?t=1896087

http://ubuntuforums.org/showthread.php?t=1910857

My own problem was solved by removing an SD card from the card reader, but that really is only a work around.  The  problem looks to be solved with the next kernel release.

The classroom session effenberg0x0 and I put on at UDW went well, but we found we had to much information for the length of the session. We are in discussion about doing some sessions using the Community Learning Project.



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Marco Ceppi: Free Advertisement for Open Source Projects and Events!

One of the great things Stack Exchange provides the community with is free advertising for projects and events that affect the Ubuntu community. The ads are rotated though and displayed on Ask Ubuntu pages. It’s a great way to get the word out about your projects.

Here’s a sample of events and projects that have submitted ads for this Quarter.

Are you looking for outreach? Looking to advertise your Local Team? It’s easy, just create a 220×250 image of your event and post it in this meta thread  following the described format. Once the post gets at least six upvotes from the community, the ad will automagically be added to the rotation of existing network ads. (Users withing to vote on ads will need at least 15 reputation to cast an upvote)

Want to support these events and ads on your own blog? Then check out George Edison’s Stack Ad, which will let you run these ads on your own blog!



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Marco Ceppi: Bugs are not questions

It’s been a long standing policy that bugs are off-topic for Ask Ubuntu and for good reason, we have Launchpad which is the best  place for bugs in Ubuntu to end up. Before I dive too deeply into the history of this issue and what we’re doing to fix this, if you have a bug please see here on how to report it!  Despite having formed the “No bugs on Ask Ubuntu” policy over a year and a half ago we’ve ended up being too lax in how we identified and handled bugs. As a result the site is swimming with “Questions” that have no answer and likely never will because they are bugs.

We can improve Ask Ubuntu by just pointing the user to bug filing advice and promptly closing the question. -  Martin Pool

To combat this we’ve mobilized the community to weed out, flag, and close these buggy questions which means a lot of questions will end up closed as off-topic. This isn’t a bad thing – in fact it’s quite a good thing. With each question getting a sign post saying “This is a bug, report your bug to Launchpad” any future users who stumble on to these questions from search engines will now know where to look, instead of finding disappointment in an  answer-less  ”question”.

We need more help! If you happen to come across a question on Ask Ubuntu that’s a duplicate of an existing bug report, or clearly should be submitted as a bug report, click the “flag” button at the bottom of the post and let us know! The sooner we prune and notify users these are actually bugs the quicker we can get them logged against the appropriate Launchpad project/package. The result will be a more fluid experience for new users and future users (since all these bugs will be fixed!). If you have questions about whether a question is a bug you can join the Ask Ubuntu chat or ask on the Ask Ubuntu Meta site.



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Ubuntu Classroom: Developer Week: Summary Day 3

It’s sad news, yes – Ubuntu Developer Week for the 12.04 cycle is over. It’s been three fantastic days full of action-packed sessions. If you couldn’t attend, check out the logs of the sessions, all of them are posted on the UDW page.

Here’s what happened on day 3, yesterday:

  1. Fixing Desktop bugsseb128Sébastien Bacher kicked off our last day. At first he took some time to explain how the Desktop team works and how they go about fixing bugs, then he took a quite recent example and explained how to work all the individual packaging bits to fix a Desktop bug in Ubuntu. For bonus points he explained how to get Wanda the Fish working in Ubuntu.
  2. Triaging Desktop bugsom26erNext up was Omer Akram, who first gave us an update about his personal life, then quickly dived into triaging bugs. He explained all the actors involved, what to bear in mind and general things to make sure when you are reviewing bug reports. Omer, who started out by triaging bugs himself, did a great job explaining how to get involved and why it’s so important.
  3. Simple Lenses with Singletmhall119Michael Hall, an unstoppable force throughout UDW, provided a great session about how to write lenses for Unity using Singlet. For developers who have used Python in the past, this might be an even easier (and more pythonic way) to interact with Unity and Desktop bits.
  4. Building locally with pbuildertumbleweed
    Those of you venturing into the land of Ubuntu development will have to deal with packaging and it’s good to do it in a safe, clean and reproducible manner. Stefano Rivera explained a lot of options for doing that including some advanced features useful if you want to debug builds. Great work.
  5. Writing Crisp Changelogscoolbhavi
    Again for those of you interested in package maintenance: it’s important to document your work properly. You don’t want anybody (including yourself) having to go back in a few months or years and dive into the archaelogy of a package to understand what exactly was changed and why. Bhavani Shankar shared his experience in writing crisp changelog entries.
  6. Getting started with contributing to Ubuntu Documentationjbicha
    The Ubuntu Documentation project is of vital importance to everyone who is new to Ubuntu. Also is it a great way to get involved with Ubuntu, as Jeremy Bicha showed. He explained how to the team works generally and how to actually go and contribute improvements.
  7. Adding Ubuntu One to your applicationsaquarius
    If you want to allow you application to sync data to the internet, it never was easier. Stuart Langridge showed and explained some easy examples which demoed how to tie in Ubuntu One services into your app.
  8. Pair Programming and Code Review in the Cloud!kirkland
    Dustin Kirkland did an impressive live demo of how to use EC2 to do pair programming, review of code and builds. He used tmux and byobu and explained in detail how to drive the infrastructure. Unfortunately the log is a bit colourless without the live demo right next to it.
  9. Syncing your app data everywhere with U1DBaquarius
    Nothing stops Stuart Langridge when he’s on a roll. He delivered his second session all about the new Ubuntu One Database. For those of you new to the initiative: “U1DB is for syncing data — that is, something structured — to every device you want”. The session is short, has lots of good information in it and a nice example of how to work with it.
  10. Automated packaging with pkgmejames_w
    James Westby gave a great introduction to the pkgme project he has been working on and it’s fantastic to see that a lot of repetitive tasks are done by a tool. It was nice to see pkgme package itself. Give it a whirl and let James know how it works out for you.
  11. Fixing internationalisation bugskelemengabor
    Gábor Kelemen is one of the heroes of Ubuntu’s internationalisation. Keeping all packages translatable and translations in shape matters deeply to him and he gave a nice overview over how common problems can easily be resolved. Köszönöm Gábor!
  12. How to fix small bugs in Ubuntuwarp10
    Andrea Colangelo took over and quickly ran us through a couple of examples of fixed bugs and explained how exactly they were fixed. By the end of the session it was clear that in a lot of cases it’s no rocket science to go and fix a bug. Grazie mille, Andrea – I hope many will find your session as encouraging as we did.
  13. Problem Lifecycle in Ubuntucprofitt
    Charles Profitt delivered the last session of the event and explained how all teams in Ubuntu work together to go from problem to solution, involving the lifecycle of a bug report, which was a big enough topic on its own already. Throughout the session he showed how you can join each of the teams and make a difference. Awesome!

What a fantastic day. Thanks a lot to all the speakers who made this Ubuntu Developer Week possible. Thanks a lot to everyone who attended as well. It was great to see a lot of interaction, questions and interest. Until next time! :-)




Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Tony Whitmore: Ubuntu Podcast, Season 5

We’re going out for the Planning Curry for season five of the Ubuntu Podcast  this week.  Over the years, it has become a tradition for all the presenters to go out for a curry before the start of the season. It’s a time to catch up in person, as we haven’t seen much of each other since the end of the last season. But it’s also a chance to discuss any changes we want to make to the show and throw ideas for new segments around. So, if there’s anything you’d like to see in the new season, whether it’s an idea for a segment or a change to something we already do, please let us know. You can leave a comment on this blog post or get in touch using any of the methods on the show website. Thanks! :)

Ubuntu Podcast



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Ubuntu Kernel Team: [Precise] linux kernel 3.2.0-14.23 uploaded (ABI Bump)

We have uploaded a new Precise linux kernel. Please note the ABI bump. The most notable changes are as follows:

* Rebase to upstream stable v3.2.3 and essentially v3.2.4

The full changelog can be seen at:

https://launchpad.net/ubuntu/+source/linux/3.2.0-14.23



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Stuart Langridge: It's cold outside

You're gonna catch a cold
From the ice inside your soul
Christina Perri — Jar of Hearts

I bet at four o'clock this morning you weren't in a police station.

Or, at least, if you were I bet you were drunk and I bet it wasn't voluntary.

After the usual Friday night poor showing from my local pub (people who follow me on twitter will be aware that the torture of watching a hundred people think they're affirming their lives by singing Mr Brightside at the top of their voices is a regular part of my balanced weekly diet), I walked home, on a cold and cloudless night. I live about ten minutes walk from town, so the walk's no hardship, except that I was dressed in shirt and no coat and it was, as mentioned, cold.

I need to be clear about this. Ten degrees below zero, Celsius, is seriously chilly when you're standing in it in shirt-sleeves. I'm sure people in actually cold places like Canada or Minneapolis or Refrigeration, North Dakota will be laughing mockingly at this point, but firstly, bugger off, secondly I bet you lot bother to put a coat on when you go out, thirdly it's not two in the morning for you, and fourthly bugger off.

Anyway, I get home and... no door key in my pocket.

You know that feeling when the Fist of Fear grabs your balls when you realise something disastrous has happened? (I don't know what the Fist grabs for women. Feel free to fill me in, or actually maybe not.) Anyway: yeah, that. I went through the usual search-all-pockets-and-then-search-them-all-again routine, just in case a mischievous cold-tolerant leprechaun hid my key from the first search and then put it back, and... no door key. Oh dear.

I'll tell you this; the walk back to the pub again seems a much longer trek. Nowhere near as long as the second return to the house without my key, though, after it turned out no-one had handed it in. And now, what the hell to do, eh? I'm not prescient enough to hide a key in the garden, especially since that's a damned good way to come home one night and find no television where a television used to be, so... locksmith? Do they have 24-hour locksmiths? I can't be the first moron to have done this.

If you're bored today, I have a suggestion for you. Go and find a dude who claims to be a 24-hour locksmith and punch him in his stupid lying face.

Incidentally, how in Jah's name did anyone manage in this situation five years ago without a smartphone, huh?

Not that the internet helps when no-one frigging answers their supposedly-24-hour phone. Also, it turns out that about four of the local 24-hour locksmith companies are actually the same company, who did answer their phone, agreed to send someone, and then after an hour of me standing in the freezing bloody freezing cold confessed that they didn't actually have anyone to send.

It's now half three in the morning, and the shivering is starting to get on my nerves, and I can't get into my house without destroying something like a double-glazed plate glass window which will cost me hundreds of pounds to fix and my hands are shaking enough that I can barely light a cigarette, let alone throw a brick through a door that probably wouldn't break anyway, and I'd like to avoid the police showing up since I have no way of proving that I actually live here except for being able to describe where all the broken bits of skirting-board are, and everywhere is closed and the doors are all locked and it's really spectacularly bone-shudderingly mightily arse-clenchingly ridiculously psychopathically cold, and what to do? I tried sleeping in the shed. Now, cold is not like wind. Being inside a thin empty wooden building does not protect you from it. I was shivering like a jackhammer on a bouncy castle and it was becoming clear, even in my not-very-operational brain state, that lying on the floor at minus ten with only a shirt on could quite possibly lead to me actually freezing to death for real.

Well, if the police came, either I'd get into the house or they'd arrest me, and being arrested would at least make me warm, and right now I'd cut my right hand off if Pol Pot showed up as long as he brought a pair of gloves and some soup.

And then, through the frozen and frosty neurons came the sparkling thought that the police station would be open, wouldn't it?

I actually felt warmer just at the thought. Not much warmer, though.

Anyway, that's how I came to be sitting in the cop shop voluntarily at four am. One lovely copper even made me a cup of tea after I poured out my tale of woe in one long sentence, breaking only for my teeth to chatter together like I was trying to bite through the world.

Police stations: while I appreciate that you're generally there to deal with miscreants and so on, it wouldn't kill you to get rid of two screwed-to-the-ground plastic chairs and put in, say, a chaise longue. After switching my phone to airplane mode I managed to eke out enough battery life that I could sit and read while huddled up against the radiator for five hours until nine o'clock this morning, whereupon I went and fetched the spare key from my estate agent after the longest and coldest and most sleepless night I have ever experienced.

So, tips, for surviving a similar situation.

  1. Have a spare key. Note: I do not have a spare key hidden in my garden, burglars, so don't go looking for it. I do not know how to have a spare key somewhere where you can get at it but thieves cannot; suggestions welcomed.
  2. Have a girlfriend so that there's someone to let you back in.
  3. Next time you see a policeman, be nice to him.

I think I might have a nap now.



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Guy Van Sanden: Why does the upgrade-manager in precise insist on removing skype?

After upgrading to Precise, I noticed that Skype was uninstalled.  But it was easily fixed by downloading the deb from Skype's site.

But now, at each update via-update manager, it says the skype package should have been removed and I need to remove it before proceeding?

Is this a bug?  Any workaround?



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Ubuntu Release blog: Precise Pangolin Alpha 2 available

12.04 (Precise Pangolin) Alpha 2 is now available for those developers and testers interested in helping find and fix bugs before we beta.

More details can be found at: https://wiki.ubuntu.com/PrecisePangolin/TechnicalOverview/Alpha2



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Victor Tuson Palau: Going Agile: Scrum or Kanban?

I have been using Scrum for a while. Back at my previous role, we tried using Scrum within the integration team that was creating the nightly builds and our bi-weekly releases. It brought good results, the team specially liked the visibility of the task board and the daily stand-ups.

We did found a bit artificial to have a cadence. We were suppose to put out a release every two weeks but we end up doing it as often as we could (or made sense), as we were not in control of when the new software was landing in our plate.

Since then, I’ve this nagging thought that Scrum might not be appropriated to service teams or teams with a large portion of maintenance/customer support work. I have found iterations shorter than 2 weeks, can be over burden by the demo, planning and sizing overheads. In the other hand, two weeks is too much time for teams with Service Level Agreements of days or hours. It also seems a bit cumbersome for short project (~1 month), were you end up with 2 or 1 iterations… What to do!?

In Canonical several teams have used Kanban in order to improve their development processes, so I started reading up on it when I stumbled on this excellent article on Kanban vs Scrum.

The author won me over straight away by not trying to decide which of the two practices is best but instead doing a great job at remaining impartial.

Looking back at the Symbian Foundation’s integration team it seems that Kanban would have been better suited. It retains the focus on making information visible while concentrating on reducing WIP.   It seems better suited to a “specialist” team, where most members share the same skills and work on similar tasks. Scrum seems to work better for cross-discipline project teams.

Also, the emphasis on managing constant flow of work is one that resonates with teams that have a work “currency” measured in days of effort (bugs?) rather in large projects lasting months at the time.

While Scrum has been very successfully adopted by the Certification team at Canonical, My previous experience with the Integration team had stopped me from cheering on Scrum in teams that have a constant flow of work. Now, we are thinking on going Kanban! Don’t get me wrong, we are going to continue using Scrum. It is just a case of using the right tool for each job. I will keep you posted on how it goes.

If you have any advice, tips or gotchas that you could share with us, I would be most grateful if you could drop your comments here!

Time to try something new (by theonlyanla)

 




Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Aurélien Gâteau: PyQt+WebKit experiments part 2: debugging

(This is part 2 of the PyQt+WebKit experiments series)

In Part 1 I described how to embed WebKit in a PyQt application and how to expose PyQt objects in WebKit and manipulate them with JavaScript.

Even if you are a great JavaScript master, you can’t avoid the occasional typo while writing JavaScript code in your application. This can be quite frustrating with QtWebKit because it likes to stay quiet: it won’t tell you about any error.

Let’s have a look at an example.

First here is loader.py, a simple Python script which loads a block of HTML:

import sys

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

class Window(QWidget):
    def __init__(self):
        super(Window, self).__init__()
        self.view = QWebView(self)

        layout = QVBoxLayout(self)
        layout.setMargin(0)
        layout.addWidget(self.view)

def main():
    app = QApplication(sys.argv)
    window = Window()
    html = open(sys.argv[1]).read()
    window.show()
    window.view.setHtml(html)
    app.exec_()

if __name__ == "__main__":
    main()

And here is “broken.html”, our broken HTML code:

<html>
<head>
<script>
function brokenFunction(arg1, arg2) {
    var result;
    result = arg1 * 2;
    result += arg2;
    resul /= 4;
    return result;
}
</script>
</head>
<body>
Complex computation:
<script>
document.write(brokenFunction(2, 3));
</script>
</body>
</html>

Notice the missing ‘t’ in “resul /= 4″?

The last-resort, grandpa-debugged-js-this-way, debugging tool is still there: the mighty alert() function. Just stuff your code with calls to alert() and be happy… Anyone ever wrote code like that?

<html>
<head>
<script>
function brokenFunction(arg1, arg2) {
    var result;
    result = arg1 * 2;
    alert("1");
    result += arg2;
    alert("2");
    resul /= 4;
    alert("3");
    return result;
}
</script>
</head>
<body>
Complex computation:
<script>
document.write(brokenFunction(2, 3));
</script>
</body>
</html>

Easy enough, no? With the great alert() function we can quickly pinpoint the bug in our brokenFunction() is between alert(“2″) and alert(“3″).

Can we do better?

alert()-style debugging gets old very fast. Clicking that “OK” button is a pain. Fortunately, there is a way to get more useful feedback from our PyQt application.

The job of the QWebView class is to show the content of a QWebPage instance. By default QWebView creates its own instance of QWebPage, but it is possible to replace this instance with our own QWebPage. The QWebPage class has a few virtual methods. Among them, the javaScriptConsoleMessage() method is the one we are looking for: it is called every time console.log() is called from JavaScript.

Here is an implementation of WebPage which uses Python logging module to get JavaScript console messages out:

import logging

from PyQt4.QtWebKit import *

class WebPage(QWebPage):
    """
    Makes it possible to use a Python logger to print javascript console messages
    """
    def __init__(self, logger=None, parent=None):
        super(WebPage, self).__init__(parent)
        if not logger:
            logger = logging
        self.logger = logger

    def javaScriptConsoleMessage(self, msg, lineNumber, sourceID):
        self.logger.warning("JsConsole(%s:%d): %s" % (sourceID, lineNumber, msg))

And here is “loader-log.py”, a loader which uses this class:

import os
import sys

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

from webpage import WebPage

class Window(QWidget):
    def __init__(self):
        super(Window, self).__init__()
        self.view = QWebView(self)
        self.view.setPage(WebPage())

        layout = QVBoxLayout(self)
        layout.setMargin(0)
        layout.addWidget(self.view)

def main():
    app = QApplication(sys.argv)
    window = Window()
    html = open(sys.argv[1]).read()
    window.show()
    window.view.setHtml(html)
    app.exec_()

if __name__ == "__main__":
    main()

If we load “broken.html” with “loader-log.py” we get the following on stderr:

$ python loader-log.py broken.html
WARNING:root:JsConsole(undefined:0): ReferenceError: Can't find variable: resul

That should make it easier to find and fix our bug, even if we don’t get very useful file names or line numbers.

javaScriptConsoleMessage() receives all console messages. This means our logger will also print out calls to console.log(). Here is “console-log.html”:

<html>
<head>
<script>
function chattyFunction(arg1, arg2) {
    var result;
    result = arg1 * 2;
    console.log("result" + result);
    result += arg2;
    console.log("result" + result);
    result /= 4;
    console.log("result" + result);
    return result;
}
</script>
</head>
<body>
Complex computation:
<script>
document.write(chattyFunction(2, 3));
</script>
</body>
</html>

When loaded with “loader-log.py”, we get this output:

$ python loader-log.py console-log.html
WARNING:root:JsConsole(about:blank:5): result: 4
WARNING:root:JsConsole(about:blank:5): result: 7
WARNING:root:JsConsole(about:blank:5): result: 1.75

Not good enough?

Getting the output of console.log() is nice, but modern browsers have much more efficient tools: if you open “broken.html” with Rekonq and look at the output in the Web Inspector Console, you can not only see console output, but you can also easily inspect your HTML tree and many other things.

Like us, Rekonq uses QtWebKit, so is there a way to get a similar tool?

It is actually possible. Rekonq uses a class named QWebInspector. All that is necessary to get a nice inspector tool for our application is to:

  1. Get the QWebView page
  2. set the QWebSettings.DeveloperExtrasEnabled attribute on this page
  3. Instantiate a QWebInspector
  4. Pass the view page to the inspector

Here is “loader-webinspector.py”, a new HTML loader which can show a web inspector when one presses F12:

import os
import sys

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

from webpage import WebPage

class Window(QWidget):
    def __init__(self):
        super(Window, self).__init__()
        self.view = QWebView(self)

        self.setupInspector()

        self.splitter = QSplitter(self)
        self.splitter.setOrientation(Qt.Vertical)

        layout = QVBoxLayout(self)
        layout.setMargin(0)
        layout.addWidget(self.splitter)

        self.splitter.addWidget(self.view)
        self.splitter.addWidget(self.webInspector)

    def setupInspector(self):
        page = self.view.page()
        page.settings().setAttribute(QWebSettings.DeveloperExtrasEnabled, True)
        self.webInspector = QWebInspector(self)
        self.webInspector.setPage(page)

        shortcut = QShortcut(self)
        shortcut.setKey(Qt.Key_F12)
        shortcut.activated.connect(self.toggleInspector)
        self.webInspector.setVisible(False)

    def toggleInspector(self):
        self.webInspector.setVisible(not self.webInspector.isVisible())

def main():
    app = QApplication(sys.argv)
    window = Window()
    html = open(sys.argv[1]).read()
    window.show()
    window.view.setHtml(html)
    app.exec_()

if __name__ == "__main__":
    main()

The four steps I described are done in the “setupInspector()” method.

And here is “console-webinspector.html”:

<html>
<head>
<script>
function chattyFunction(arg1, arg2) {
    var result;
    result = arg1 * 2;
    console.log("result: %d", result);
    result += arg2;
    console.warn("result: %d", result);
    result /= 4;
    console.error("result: %d", result);
    return result;
}
</script>
</head>
<body>
Complex computation:
<script>
document.write(chattyFunction(2, 3));
</script>
</body>
</html>

It is similar to “console-log.html” but takes advantage of two new features which do not work with the previous approach:

  • printf-style formatting: that is, printing the value of result with "result: %d", result, not "result: " + result
  • log categorization: you can use console.warn() and console.error() to get different type of output. These methods worked with the previous approach, but the categorization was lost.

Loading “console-webinspector.html” with “loader-webinspector.py” and pressing F12 we get this:

Closing words

These two approaches should help you track down the nastiest bugs in your embedded JavaScript code. The Web Inspector approach is probably the most powerful one, but the Python logging approach can also be useful when tracking down bugs where it is more practical to have one single log output for both the PyQt and the JavaScript sides.


Flattr this




Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Launchpad News: Faster deployments

CheetahBack in September, we announced  our first fastdowntime  deployment. That was a new way to do deployment involving DB changes. This meannt less downtime for you the user, but we were also hoping that it would speed up our development by allowing us to deliver changes more often.

How can we evaluate if we sped up development using this change? The most important metric we look at when making this evaluation is cycle time. That’s the time it takes to go from starting to make a change to having this change live in production.  So before fastdowntime, our cycle time was about 10 days, and it is now about 9 days. So along the introduction of this new deployment process, we cut 1 day off the average, or a 10% improvement. That’s not bad.

But comparing the cumulative frequency distribution of the cycle time with the old process and the new will give us a better idea of the improvement.

Cycle time chart

On this chart, the gap between the orange (fastdowntime deployment) and blue (original process) lines shows the improvement to us.  We can see that more changes were completed sooner. For example, under the old process about 60% of the changes were completed in less than 9 days whereas about 70% were completed under the same time in the new process.  It’s interesting to note that for changes that took less than 4 days to complete or that took more than 3 weeks to complete, there is no practical difference between the two distributions. We can explain that by the fact that things that were fast before are still fast, and things that takes more than 3 weeks would usually have also encountered a deployment point in the past.

That’s looking at the big picture. Looking at the overall cycle time is what gives us confidence that the process as a whole was improved. For example, the gain in deployment could have been lost by increased development time. But the closer picture is more telling.

Deployment cycle time chart

The cycle time charted in this case is from the time a change is ready to be deployed until it’s actually live. It basically excludes the time to code, review, merge and test the changes. In this case, we can see that 95% of the changes had to wait less than 9 days to go live under the new process whereas it would take 19 days previously to get the same ratio. So an
improvement of 10 days! That’s way more nice.

Our next step on improving our cycle time is to parallelize our test suite. This is another major bottleneck in our process. In the best case, it usually takes about half a day between the time a developer submits their branch for merging until it is ready for QA on qastaging. The time in between is passed waiting and  running the test suite. It takes about 6 hours to our buildbot to validate a set of revisions. We have a project underway to run the tests in parallel. We hope to reduce the test suite time to under an hour with it. This means that it now would be possible for a developer to merge and QA a change on the same day! With this we expect to shave another day maybe two from the global cycle time.

Unfortunately, there are no easy silver bullets to make a dent in the time it takes to code a change. The only way to be faster there would be to make the Launchpad code base simpler. That’s also under way with the services oriented architecture project. But that will take some time to complete.

Photo by Martin Heigan. Licence: CC BY NC ND 2.0.



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Jorge Castro: Taking a different tack when it comes to growth.

One of the "good problems" I think we have is there's always things to do. As Charlie Kravetz points out, this can be a bad thing too.

I wanted to post this on Planet to get a better feel for what other people think.

I see my own participation in Xubuntu and Ubuntu development slowing down. Too many events, scheduled on top or close to each other, making it impossible to participate easily.

We are either scheduling too many things, or not checking calendars any more. In past years, it was quite easy to attend all the events held and still participate in development testing.

So for certain things I think we're doing too much, which is why we've streamlined some of the IRC workshops to be shorter. However as I thought of a more detailed answer to Charlie's concern I came up with the answer (I think).

I don't think we have too many events, in fact, as we grow the number of events will grow, and our community will need to scale to match that. I am starting to realize that it's not a bad thing that people can't find the time to participate in everything.

The real problem isn't that Charlie doesn't scale, it's that someone needs to have his back. So perhaps when events do clash we should look at which teams have what coverage in what events. For example, Charlie clearly needs to do ISO testing, but at the same time Xubuntu should have coverage in developer week because it's really one of the best places to find new contributors that can .... help Charlie do ISO testing. Catch 22.

So maybe from a team level instead of an individual level we should be focusing on finding people who can jump in when a team is overtaxed for a week. For example, in hindsight maybe we could have done a better job helping Charlie find someone to cover developer week for Xubuntu. A forum thread, a planet post, a tweet, a mention on our Facebook page?

These are all things we could do to help the creaking an overburdened person might face. It's a bummer that one person can't scale, but at the same time having different people focusing on different individual things will probably be healthier in the long run.

Discuss!



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Aaron Toponce: DISCLAIMER

DISCLAIMER: By sending me email, you agree to the following:

  • I am, by definition, “the intended recipient”.
  • All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it where I please.
  • I may take the contents as representing the views of your company.
  • This disclaimer overrides any disclaimer or statement of confidentiality that may be included on your message.


Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Ronnie Tucker: Another Special Edition – this time, Scribus!

FCM reader Brian has pulled together my Scribus tutorials from the early issues of FCM and even added updated screenshots to it. So, if you’re thinking of creating a publication of any kind, you might want to check out this special edition.

http://fullcirclemagazine.org/scribus-special-edition/



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Launchpad News: How to do Juju – Charming oops-tools

Recently the Launchpad Red Squad and Product Team started working on a new cloud project. As part of that project we’ll be using Juju, a tool that helps you easily deploy services on the cloud.

As an opportunity to learn more about how Juju works, I wrote a charm to deploy oops-tools, an open source Django application that helps visualize and aggregate error reports from Launchpad, on Amazon’s EC2 and Canonical’s private Openstack cloud.

You might be asking, what’s a charm? Charms are basically instructions on how  to deploy services, that can be shared and re-used.

Assuming you already have a bootstrapped juju environment, deploying  oops-tools using this charm is as easy as:

$ juju deploy --repository=. local:oops-tools
$ juju deploy --repository=. local:postgresql
$ juju add-relation postgresql:db oops-tools
$ juju expose oops-tools

That’s it! With just a few commands, I have an instance of oops-tools  up and running in a few minutes.

Under the hood, the oops-tools charm:

  • starts two Ubuntu instances in the chosen cloud provider, one  for the webserver and another for the database server
  • downloads the latest trunk version of oops-tools and its  dependencies from Launchpad
  • configures oops-tools to run under Apache’s mod_wsgi
  • configures oops-tools to use the database server

There’s still work to do, like add support for  RabbitMQ  (oops-tools uses rabbit to provide real-time error reports), but this initial iteration proved useful to learn about Juju and how to write a charm. As it is, it can be used by developers who want to hack on oops-tools and can be easily changed to deploy oops-tools in a production environment.

If you’d like to give it a try, you can get the charm here:  https://code.launchpad.net/~charmers/charms/oneiric/oops-tools/trunk

Enjoy!

 

 

("Harry Potter’s The Standard Book of Spells”  by Craig Grobler,  licensed under a CC BY-NC-ND license)


Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Kubuntu: Precise Alpha Released

The alpha release for our development version, codenamed Precise, is available for download. Early testers can try it to provide feedback and bug reports. This is the first alpha for Kubuntu in the Precise series but the second from the Ubuntu family.



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Paul Tagliamonte: Mapping the Ubuntu Community

In playing with some tools I've run into at $work, I've tried loading in some Ubuntu datasets in some fun and interesting ways.

Today, I've chosen to map all Ubuntu Members with a public lat/lon, sized by Karma.

The sizes relate to if the Karma is greater then:

1: 10

2: 50

3: 100

4: 500

5: 1000

6: 2000

7: 7000

8: 15000

9: 25000

10: 50000

So, without further adieu, here're some maps!

UK

US

EU

EEU

SA

Globe



Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu
Dustin Kirkland: bootmail encryption and shutdown messages now supported


I've made two pretty cool changes to the bootmail utility...

  1. Bootmail now sends a message on both boot, and shutdown, using an upstart job.  Big thanks to Clint Byrum for a bit of help on that one!
  2. Bootmail has always sent GPG-signed email.  But now, it will actually send GPG-encrypted email too!  All you need to do is set the RECIPIENT_KEYID variable in /etc/bootmail/gpg.conf to your GPG key id, and bootmail will send you GPG encrypted AND signed boot and shutdown messages!
Now, perhaps you wondering why, or how one would use this...

Actually, I have all of my EC2 instances set to install and use bootmail.  With this, I get an email when I start, reboot, and shutdown an instance.  I find it helps me remember what instances I have have running at any one time, by keeping the email in my Inbox (I practice Inbox Zero).

Moreover, I use cr-gpg with Gmail, so that I can read GPG encrypted email and verify GPG signatures within my Gmail web interface.  Check out this post for more information on how to set that up!

:-Dustin


Categories: Computers | Linux | nix | Planet Ubuntu | Ubuntu