andrewsomething@ubuntu:~$

Just another Ubuntu weblog

Posts Tagged ‘Ubuntu

Introducing StackBrowser (and random thoughts on the new Ubuntu SDK)

with 2 comments

StackBrowser

If you follow me on Google+, you already know about this, but it seems like it’s time to introduce this to a larger audience. Mostly an excuse to play with the new Ubuntu SDK, I’ve created StackBrowser. It allows you to explore the StackExchange network natively on Ubuntu Touch. It’s written in pure QML/ JavaScript.

Currently you can:

  • Browse and view recent questions
  • Search questions by tag
  • Browse, search, and view users

The roadmap for future releases includes a “convergence” layout (i.e tablet/desktop view) and accessing your global inbox.

StackBrowser is available in the Ubuntu Touch Software Center. It can be tested on a 13.10 Ubuntu desktop system, or on earlier releases if you have the SDK installed, by grabbing its source from Launchpad:

    bzr branch lp:stackbrowser
    cd stackbrowser
    qmlscene stackbrowser.qml

You can of course report bugs there as well.

Some random thoughts on the SDK and Ubuntu Touch apps

  • I’ve enjoyed working with Qml for the most part. It’s really quick and painless to build a nice UI. StackBrowser, admittedly not a very complex app, was built in a hour here and an hour there over the course of just a few days.
  • Though I think that I’ve still got a lot of learning to do about the “Qml way,” if such a thing exists. I guess maybe the term I’m looking for is  “declarative nature.”
  • I’d much rather write code in Python than JavaScript. Hopefully that will be possible.
  • Relatedly, it feels like once an app becomes sufficiently ambitious, you need to use C++.
  • There are some very simple things you can’t do in Qml/JS like write a file to disk.
  • There are places where there are strange holes in what you can do with Qml. For instance, you can take picturesrecord video, and play media all using pure QML. Yet, I can’t find any way to record audio with just QML. Maybe I’m missing something?
  • I’ve got an idea for a location aware app, but I’ve found the docs to be very wanting.
  • There’s a lot of great work going on in the core apps project, and it is very much a community effort.
  • The focus right now seems to be on the velocity of the development, but I’d like to see the core apps project become a more cohesive project (i.e. run more like say GNOME or KDE) and more integrated into Ubuntu governance.
  • I miss the larger collection of standard widgets available in Gtk.
  • Relate to the two above points, I’ve noticed a couple place where some core apps  have different implementations of the same thing (e.g. location selection) with different visual styles and different behaviors.
  • Maybe it’s just because most of my contributions to free software have been packaging things for Debian and Ubuntu, but the fact that people are being encouraged to bundle dependencies in click packages make me feel dirty.
  • That said, just clicking a button in QtCreator and attaching the result to a webform was extremely simple.
  • My app was available to install just a few hours after submission. Wonder how that will scale?

Wow, that was a bit stream of conscience like…

Written by andrewsomething

September 12, 2013 at 9:57 pm

Automation with Google Apps Script

with one comment

I maintain a GCal of the Ubuntu release schedule, and I just updated it to contain the proposed schedule for the Q-series. As you can imagine, adding all those events by hand can be annoying. Luckily you can use Google App Script, which is more or less JavaScript for the Google Cloud, to automate tasks like this.

I could have probably come up with something to automate the entire process start to finish, scrapping the wiki every few days and pushing out updates. But this isn’t something that I have to do all that often, so I just wanted to write something quick and simple. Here’s what I ended up with:


var EVENT_ADDED = "EVENT_ADDED";

function sheet2cal() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var startRow = 2;  // First row of data to process
  var numRows = sheet.getLastRow()-1;   // Number of rows to process
  var dataRange = sheet.getRange(startRow, 1, numRows, 5);
  var data = dataRange.getValues();
  var cal = CalendarApp.openByName("Ubuntu Release Schedule");
  for (var i = 0; i < data.length; ++i) {
    var row = data[i];
    var tstart = row[0]; 
    var title = row[1];
    var desc = row[2];
    var tstop = "";
    var eventAdded = row[4];
    if (eventAdded != EVENT_ADDED) {  // Prevents sending duplicates
      cal.createAllDayEvent(title, tstart, {description:desc});
      sheet.getRange(startRow + i, 5).setValue(EVENT_ADDED);
      SpreadsheetApp.flush();
    }
 }
}

This iterates through a spreadsheet where the first column is the event’s date, the second one is the title, and the third is the description. It also checks a fourth column to make sure the event hasn’t already been added, marking events added as it goes. It is closely based on the example of how to send emails from a spreadsheet.

To add a script like this, go to Tools > Script editor… in your spreadsheet. This will open an IDE where you can write, run, and debug your script. If you want, you can add a custom menu on your spreadsheet’s tool bar to trigger the script with something like:


function onOpen() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var menuEntries = [ {name: "Add to calendar", functionName: "sheet2cal"} ];
  ss.addMenu("Scripts", menuEntries);
}

You can also set scripts that will be triggered at specific time intervals, communicate with other services, and do things like parse JSON. This opens up a lot of possibilities.

For instance, I’m on a team that is using Trello for internal organization and task tracking. Kevin Pelgrims has a great example of integrating Trello and Google Docs to track project progress over time that I’ve started using.

Written by andrewsomething

March 11, 2012 at 7:56 pm

Posted in Ubuntu

Tagged with , , , ,

Wading upstream

with 3 comments

So I want to start making an effort to share more of the little tips, tricks, and scripts that I use in the course of Ubuntu development. Hopefully someone will find this stuff useful. On the other hand, I also hope someone will come along, look at what I use, and point out just how wrong it is and show me something simpler.

Potomac Wayside Falls Upstream

To start off with, here’s a function from my ~/.bashrc file. Gmail has an unfortunate insistence on forcing line breaks. This can be an issue when working with the Debian BTS as you need to interact with the control server through one line commands sent via email. The place where this is always the most painful for me has been in marking bugs as forwarded upstream. So I figured I’d make my life easier by just doing it on the command line:

function bts-forward () {
    if [[ "$1" == ${1//[^0-9]/} && "$2" == http* ]]; then
        echo "forwarded $1 $2" | \
        sendmail -f"$DEBEMAIL" control@bugs.debian.org;
    else
        echo "Usage: bts-forward DEBIAN_BUG UPSTREAM_URL"
    fi
    }

Written by andrewsomething

November 12, 2011 at 4:08 pm

Posted in Ubuntu

Tagged with , , ,

“Formalities are boring.”

with one comment

Old Faithful

I’ve been following the discussion around the potential switch from Banshee back to Rhythmbox for Precise, and I really don’t have all that much to add. Though I did come across an interesting post from an upstream Tomboy developer that deserves some wider attention. He argues that “upstreams would be more than happy to do a lot of stuff for Ubuntu if only Ubuntu actually let them know what they wanted in some sort of predictable fashion.”

 

Ubuntu either doesn’t know how important they’ve become, or they don’t care. Developers in upstream apps know that getting exposure in Ubuntu means an incredible influx of new users, which in turn leads to new bug reporters, which finally means new contributors. It’s well known that each of these groups is an order of magnitude smaller than the last, so making sure the user group is as big as possible is vital for an application. And because upstream knows this, they are willing to bend over backwards to accommodate Ubuntu’s wishes.

He also tells a story about Tomboy nearly being dropped last cycle due to depending on a number of libraries that the desktop team wanted to drop form the CD images. He goes on to suggest that formalizing the procedure around these sorts of things would reduce a lot of confusion and let upstreams know where they stand.

This seems entirely reasonable to me. The Banshee issue aside, it would be great if there was a formal announcement at some set point in the cycle where the targeted development goals for the platform are laid out in one place. If you follow closely this information is already announced, but it is in a trickle of different messages to the devel and desktop lists. The  idea would be to compile this information into one clear widely-publicized announcement. It would be early enough in the cycle that upstreams, derivatives, and other stake holders would have time to react. It would also make clear that any discussion before that point is just that, discussion not  decisions. The existing Feature Definition Freeze would probably make for a nice fit.

Written by andrewsomething

November 9, 2011 at 6:33 am

Posted in Ubuntu

Tagged with , ,

Fun with graphs

with one comment

For awhile now, I’ve felt like the ubuntu-motu mailing list has been a shadow of its former self. It turns out that empirical data backs up this feeling. I produced a histogram of mailinglist volume over time:

I also figured I should take a look at ubuntu-devel:

That graph raises the question what happened at the end of 2006. Of course, that was when ubuntu-devel-discuss was started:

I’m not sure what this all means, but I do find it interesting in the context of some recent discussion on the direction of the Ubuntu community.

—-

You can find the python code I used in a GitHub gist. It takes an mbox file and produces a histogram using matplotlib. It is shamelessly based off of code by Takafumi Arakaki that was designed to plot a histogram of the commit frequency of a Mercurial or Git repository by reading newline separated unix time via STDIN. I just rewrote the read_dates() function. If someone has a simpler way of doing the date conversion, I’d love to see it. What I did was a bit convoluted.

Written by andrewsomething

October 9, 2011 at 8:01 pm

Posted in Ubuntu

Tagged with , , ,

Ubuntu Developer Membership Board Election

with one comment

Voting Machine

An election for a recently opened spot on the DMB has just begun. While all the names of those nominated are familiar to me, I still need some more information to make a decision. All of the candidates are eminently qualified. Unfortunately, the call for votes didn’t include any statements of intent from the candidates. Votes will be accepted through 2011-09-06 12:00 (presumably UTC). So perhaps we’ll hear from the candidates themselves. Until then, to save others a little bit of Googling, here are their Launchpad profiles and Ubuntu wiki pages:

Written by andrewsomething

August 23, 2011 at 12:57 pm

Posted in Ubuntu

Tagged with , , , ,

Ubuntu Release Calendar

with 7 comments

CalendarOne thing I’ve been missing recently has been having the Ubuntu release schedule in my calendar. Steve Langasek used to provide one in ical format, but it wasn’t update for Natty nor Oneiric. The Fridge has a calandar containing a schedule of events for  #ubuntu-meeting, but that doesn’t include the release schedule. It’s also a bit too high volume for me to want to keep it in my main calendar view.

So without further adieu, I am announcing that I will be maintaining a public Google Calendar for the Ubuntu release schedule.

Please feel free to subscribe to it.

Written by andrewsomething

August 19, 2011 at 11:39 pm

Posted in Ubuntu

Tagged with , ,

UDS-L, Dallas Day One

with one comment

Well, I finally made it to a Ubuntu Developer Summit. It’s been great to put some faces on the names I interact with on mailing-lists and read in changelogs.

I don’t really have much to pontificate on so this will be quick, but there are a couple things to share.

My roommate ending up being Daniel Fore, designer of the elementary icon set that the Humanity icons are based on. So I was able to help get them up on a PPA.

You can grab packages based on the latests Bazaar trunk for Karmic.

I mostly focused on attending sessions on bug management and distributed development today. I saved copies of the gobby notes for each session I attended:  http://people.ubuntu.com/~andrewsomething/uds-l/notes/

The plenary session demoing Quickly made me excited to dive back into python. The videos aren’t up yet, but there are previous screen-casts showing it off.

Written by andrewsomething

November 17, 2009 at 4:56 am

Posted in Ubuntu

Tagged with , , , , ,

U.K. National Lottery Winner!

with 2 comments

Well, not really….

For some reason, my spam folder doesn’t contain the usual Viagra, porn, and Nigerian prince emails.  The most frequent spam I receive generally is letting me know that I just won £1,000,000 in the U.K. National Lottery. As I’ve only been in the U.K. once, and I certainly never played the lottery while there, I assume they are a scam. (Although, there might actually be some lottery official out there who doesn’t understand why I don’t want to collect my money.)

Well, the other day I opened an email from a British company that began: “Congratulations!” This time I’m pretty sure it wasn’t a scam. The good folks at Canonical accepted my sponsorship request for UDS Dallas! As this will be my first UDS, I’m incredibly excited. I just booked my tickets, and can’t wait to finally meet you all in meatspace.

See you in Dallas!

Written by andrewsomething

October 5, 2009 at 8:43 pm

Posted in Ubuntu

Tagged with , , ,

Ubuntu 9.10 Countdown Banners

with 7 comments

As I’m sure you all know by now, Ubuntu (and friends) 9.10 Beta images were released yesterday. What you might not know is that the countdown banners have also been released. You can grab them here.

Option 1 – “Stars” by Thorsten Wilms (thorwil)

<script type=”text/javascript” src=”http://www.ubuntu.com/files/countdown/display.js”></script&gt;

Option 2 – “The spotlight” by Andrew Higginson

<script type="text/javascript" src="http://www.ubuntu.com/files/countdown/display2.js"></script>

Option 3: Simple image (for those who can’t use javascript)

<a href="http://www.ubuntu.com/"><img src="http://www.ubuntu.com/files/countdown/static.png" width="180" height="150" alt="Ubuntu: For Desktops, Servers, Netbooks and in the cloud" border="0" /></a>

P.S. Dear lazy web. How does one go about properly posting code on a free wordpress.com blog where you can’t install any plugins?

Written by andrewsomething

October 2, 2009 at 5:15 pm

Posted in Ubuntu

Tagged with ,