Planet Wolves

February 19, 2012

Aq

There is a lesson here

A while back, my dad got an inkjet all-in-one scanner/printer. An Apollo, which are apparently rebranded HP things. And it was fine for a year or so, and then it developed a rather weird fault.

Every time you turned it on, it printed a test page.

I had a poke around, couldn't work out the problem. Tried resetting the printer to factory settings, removing it from Ubuntu and re-adding it, all that. Even looked in some sort of complex HP configuration utility thing in case he'd inadvertently ticked the "I have too much money, waste it all on ink, please" option or something. Nothing doing.

Secretly, I was scared that maybe it was an Ubuntu bug. Didn't want to say that to dad, though.

Anyway, time goes on; dad got used to printing a test page every time he turned it on, and started cutting the test pages in half and using the backs of them as scrap paper for taking notes on. Eventually, he got so annoyed by it that he bought a new printer -- a Kyocera Mita FS-1010, at my recommendation, because I've got one too and it's a brilliant little laser printer which works perfectly with Ubuntu and can be picked up for about forty quid on eBay. That's a laser printer, though, so it's only black-and-white; BW printing covers most of what he does (and all of the minuscule amount of printing that I do), so he only needed to turn on the Apollo when he needed a colour printout. At which point it would print a test page, print the page he wanted, and done.

A couple of weekends ago, after two years of this test-page nonsense, I thought: surely this must be fixable? Poor dad. I must try harder to fix it. So, up I went, turned on the printer, and it printed the test page. Which I then, for the first time in two years, actually looked at.

Turns out it's not a test page at all. When you put new ink cartridges in the printer, it prints one of these pages and then you're supposed to scan that same page; the printer uses it to re-align the printer heads, because it can see from the printout whether the lines are straight.

This "test page" explains all this, right there on the page, along with a set of diagrams explaining what to do for people who can't read. People who can read and just do not bother to do so are not catered for, however. So I scanned this page, and since then the printer's been stone-cold perfect.

There is a lesson here, but I don't know what it might be.

by sil at February 19, 2012 12:00 AM

February 17, 2012

David Goodwin

A week of fire fighting (aka why you should

I feel like I’ve spent most of this week debugging some PHP code, and writing unit tests for it. Thankfully I think this firefighting exercise is nearly over.

Perhaps the alarm bells should have been going off a bit more in my head when it was implied that the code was being written in a quick-and-dirty manner (“as long as it works….”) and the customer kept adding in additional requirements – to the extent it is no longer clear where the end of the project is.

“It’s really simple – you just need to get a price back from two APIs”

then they added in :

“Some customers need to see the cheapest, some should only see some specific providers …”

and then :

“We want a global markup to be applied to all quotes”

and then :

“We also want a per customer markup”

and so on….

And the customer didn’t provide us with any verified test data (i.e. for a quote consisting of X it should cost A+B+C+D=Y).

The end result is an application which talks to two remote APIs to retrieve quotes. Users are asked at least 6 questions per quote (so there are a significant number of variations).

Experience made me slightly paranoid about editing the code base – I was worried I’d fix a bug in one pathway only to break another. On top of which, I initially didn’t really have any idea of whether it was broken or not – because I didn’t know what the correct (£) answers were.

Anyway, to start with, it was a bit like :

Deploy through some weird copy+pasting manner due to Windows file permissions No unit test coverage No logging Apparently finished Apparently working (but the customer kept asking for more changes)

Now:

Deployment through git; Stupid Windows file permissions fixed. Merged in changes by third party graphics designer – should be much easier to track any changes he makes in the future ~80% test code coverage. I’ve had to modify the ‘real’ scripts to accept a new parameter, which would make them read a local XML file (rather than the remote API/service) – in order for the tests to be reproducible (and quick to run) Logging in place, so there’s some traceability Better error handing Calculations manually checked and confirmed.

Interesting things I didn’t like about the code :

Premature attempt at dependency injection – the few functions there are/were have a $db variable being passed in – but often don’t use it. There is significant duplication in the code base still. The code didn’t (and still doesn’t really) support testing particularly well – I’m having to retrieve output through a Zend_Http_Client call (i.e. mimicking a browser) – which means I can’t get code test coverage stats easily. In some places a variable was being set to 0 (e.g. $speed) which would be used to determine a special case (if $speed == 0). Having multiple meanings in/on the same variable makes it difficult to follow what’s going on – and is a pain when the customer requests it behaves a bit differently. Really a separate parameter should have been used.

by David Goodwin at February 17, 2012 02:47 PM

February 16, 2012

Jono Bacon

Ubuntu Accomplishments Update

The last time I posted about my little project I shared a video demo of the work so far. I am pleased to report that I have made some further progress.

A key part of the design of the accomplishments system is that it supports two types of accomplishment:

Local – these are things you can achieve on your computer. Examples of this could include: sending your first email in Thunderbird, configuring your chat client, changing your wallpaper etc). I have a small library applications can use for this. Machine Verifiable – these are things you can accomplish within the context of a community (e.g. becoming an Ubuntu Member, filing your first bug etc). These achievements are verified by a third party server to avoid people faking their trophies.

Although support for the former works, I have been really focusing on the latter Machine Verifiable accomplishments. I am pleased to report that this works fully end-to-end now. It works like this:

When you start the app we ask for your permission (as we are syncing data to a third-party machine). When you agree to this the app creates your trophies directory, creates an Ubuntu One share and syncs it with the server. I have written some scripts for the server that scans the shares and approves them. The app then runs the different accomplishments scripts and when you achieve something it is synced to the server, verified and then returned. It then appears in your list of trophies.

With the exception of some loose edges, this is all basically working, and even runs on someone else’s machine than mine. :-)

To get this rolling I wrote a bunch of additional accomplishments that use launchpadlib to give you a trophy if you have certain roles in the community (currently, Ubuntu Member, MOTU, core-dev, and a member of a LoCo Team).

A pretty cool feature here is that these accomplishments have dependencies. As an example, you need to complete the Register a Launchpad Account accomplishment before you can complete the File a Bug accomplishment (as you need a Launchpad account to file a bug). As such, accomplishments that you can’t access yet are listed as locked and unlocked when you have satisfied their dependencies. This helps us to develop a journey for how people learn new experiences and participate in the community.

You can now filter available opportunities by locked or unlocked – this makes it easier to see what you can do right now. I also prettified the interface somewhat and ripped out some of the clunky pieces of my very first implementation. With the addition of the extra accomplishments you can also see the additional categories.

This is how it looks so far:

[image]

I am hoping to release a video demo of this soon.

I will also be opening up a call for testing and accomplishment contributions when I nail a few final bugs. Stay tuned, folks!

Thanks to William Grant for his launchpadlib help recently.

by jono at February 16, 2012 05:07 AM

February 14, 2012

Jono Bacon

Ubuntu Accomplishments Lens

[image]Click here for full size.

Thanks to the always amazing David Callé who has created this lens for the Ubuntu Accomplishments system. David was also the first person to brave running the Ubuntu Accomplishments system other than me (complete with the server verification pieces). It worked!

This week I expect to have another update on Ubuntu Accomplishments. My evenings have been tied up with finishing The Art of Community but the deadline for that is tomorrow.

Stay tuned!

by jono at February 14, 2012 11:37 PM

Music Of Ubuntu

OK, fun little meme time. Simple question:

Which songs remind you of Ubuntu?

Think about the music…the vibe…the rhythm…what it makes you feel when you listen to the song. Which ones make you think of our goals of bringing Free Software to the world with Ubuntu?

Reply using your blog, Google+, Facebook, Twitter or wherever else (use the #musicofubuntu hashtag) and lets see what music gets our Ubuntu blood flowing. :-)

I have a few I want to present via the wonderful medium of embedded YouTube videos. What are yours?!

Queen: Don’t Stop Me Now

Can’t see it? Watch it here!

Twisted Sister: We’re Not Gonna Take It

Can’t see it? Watch it here!

AC/DC: Shoot To Thrill

Can’t see it? Watch it here!

Airbourne: Runnin’ Wild

Can’t see it? Watch it here!

Rush: Virtuality

Can’t see it? Watch it here!

Grave Digger: Rebellion (The Clans Are Marching)

Can’t see it? Watch it here!

Rage Against the Machine: Renegades of Funk

Can’t see it? Watch it here!

Bomfunk MC’s: Freestyler

Can’t see it? Watch it here!

by jono at February 14, 2012 06:17 AM

Canonical Community Team Weekly Meetings

Just a reminder…every Tuesday at 8am Pacific / 11am Eastern / 4pm UTC on #ubuntu-community-team on freenode IRC.

Everyone runs through a a list of the work they have been doing over the last week and you can ask questions. Feel free to join us; everyone is welcome!

by jono at February 14, 2012 05:51 AM


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser