We'll see | Matt Zimmerman

a potpourri of mirth and madness

Posts Tagged ‘Technology

QCon London 2010: Day 3

without comments

The tracks which interested me today were “How do you test that?”, which dealt with scenarios where testing (especially automation) is particularly challenging, and “Browser as a Platform”, which is self-explanatory.

Joe Walker: Introduction to Bespin, Mozilla’s Web Based Code Editor

I didn’t make it to this talk, but Bespin looks very interesting. It’s “a Mozilla Labs Experiment to build a code editor in a web browser that Open Web and Open Source developers could love”.

I experimented briefly with the Mozilla hosted instance of Bespin. It seems mostly oriented for web application development, and still isn’t nearly as nice as desktop editors. However, I think something like this, combined with Bazaar and Launchpad, could make small code changes in Ubuntu very fast and easy to do, like editing a wiki.

Doron Reuveni: The Mobile Testing Challenge

Why Mobile Apps Need Real-World Testing Coverage and How Crowdsourcing Can Help

Doron explained how the unique testing requirements of mobile handset application are well suited to a crowdsourcing approach. As the founder of uTest, he explained their approach to connecting their customers (application vendors) with a global community of testers with a variety of mobile devices. Customers evaluate the quality of the testers’ work, and this data is used to grade them and select testers for future testing efforts in a similar domain. The testers earn money for their efforts, based on test case coverage (starting at about $20 each), bug reports (starting at about $5 each), and so on. Their highest performers earn thousands per month.

uTest also has a system, uTest Remote Access, which allows developers to “borrow” access to testers’ devices temporarily, for the purpose of reproducing bugs and verifying fixes. Doron gave us a live demo of the system, which (after verifying a code out of band through Skype) displayed a mockup of a BlackBerry device with the appropriate hardware buttons and a screenshot of what was displayed on the user’s screen. The updates were not quite real-time, but were sufficient for basic operation. He demonstrated taking a picture with the phone’s camera and seeing the photo within a few seconds.

Dylan Schiemann: Now What?

Dylan did a great job of extrapolating a future for web development based on the trend of the past 15 years. He began with a review of the origin of web technologies, which were focused on presentation and layout concerns, then on to JavaScript, CSS and DHTML. At this point, there was clear potential for rich applications, though there were many roadblocks: browser implementations were slow, buggy or nonexistent, security models were weak or missing, and rich web applications were generally difficult to engineer.

Things got better as more browsers came on the scene, with better implementations of CSS, DOM, XML, DHTML and so on. However, we’re still supporting an ancient implementation in IE. This is a recurring refrain among web developers, for whom IE seems to be the bane of their work. Dylan added something I hadn’t heard before, though, which was that Microsoft states that anti-trust restrictions were a major factor which prevented this problem from being fixed.

Next, there was an explosion of innovation around Ajax and related toolkits, faster javascript implementations, infrastructure as a service, and rich web applications like GMail, Google Maps, Facebook, etc.

Dylan believes that web applications are what users and developers really want, and that desktop and mobile applications will fall by the wayside. App stores, he says, are a short term anomaly to avoid the complexities of paying many different parties for software and services. I’m not sure I agree on this point, but there are massive advantages to the web as an application platform for both parties. Web applications are:

  • fast, easy and cheap to deploy to many users
  • relatively affordable to build
  • relatively easy to link together in useful ways
  • increasingly remix-able via APIs and code reuse

There are tradeoffs, though. I have an article brewing on this topic which I hope to write up sometime in the next few weeks.

Dylan pointed out that different layers of the stack exhibit different rates of change: browsers are slowest, then plugins (such as Flex and SilverLight), then toolkits like Dojo, and finally applications which can update very quickly. Automatically updating browsers are accelerating this, and Chrome in particular values frequent updates. This is good news for web developers, as this seems to be one of the key constraints for rolling out new web technologies today.

Dylan feels that technological monocultures are unhealthy, and prefers to see a set of competing implementations converging on standards. He acknowledged that this is less true where the monoculture is based on free software, though this can still inhibit innovation somewhat if it leads to everyone working from the same point of view (by virtue of sharing a code base and design). He mentioned that de facto standardization can move fairly quickly; if 2-3 browsers implement something, it can start to be adopted by application developers.

Comparing the different economics associated with browsers, he pointed out that Mozilla is dominated by search through the chrome (with less incentive to improve the rendering engine), Apple is driven by hardware sales, and Google by advertising delivered through the browser. It’s a bit of a mystery why Microsoft continues to develop Internet Explorer.

Dylan summarized the key platform considerations for developers:

  • choice and control
  • taste (e.g. language preferences, what makes them most productive)
  • performance and scalability
  • security

and surmised that the best way to deliver these is through open web technologies, such as HTML 5, which now offers rich media functionality including audio, video, vector graphics and animations. He closed with a few flashy demos of HTML 5 applications showing what could be done.

Written by Matt Zimmerman

12 March, 2010 at 17:14

QCon London 2010: Day 2

without comments

I was talk-hopping today, so none of these are complete summaries, just enough to capture my impressions from the time I was there. I may go back and watch the video for the ones which turned out to be most interesting.

Yesterday, I noted a couple of practices employed by the QCon organizers which I wanted to note, to consider trying them out with Canonical and Ubuntu events:

  • As participants leave each talk, they pass a basket with a red, a yellow and a green square attached to it. Next to the wastebasket are three small stacks of colored paper, also red, yellow and green. There are no instructions, indeed no words at all, but the intent seemed clear enough: drop a card in the basket to give feedback.
  • The talks were spread across multiple floors in the conference center, which I find is usually awkward. They mitigated this somewhat by posting a directory of the rooms inside each lift.

Chris Read: The Cloud Silver Bullet

Which calibre is right for me?

Chris offered some familiar warnings about cloud technologies: that they won’t solve all problems, that effort must be invested to reap the benefits, and that no one tool or provider will meet all needs. He then classified various tools and services according to their suitability for long or short processing cycles, and high or low “data sensitivity”.

Simon Wardley: Situation Normal, Everything Must Change

I actually missed Simon’s talk this time, but I’ve seen him speak before and talk with him every week about cloud topics as a colleague at Canonical. I highly recommend his talks to anyone trying to make sense of cloud technology and decide how to respond to it.

In some of the talks yesterday, there was a murmur of anti-cloud sentiment, with speakers asserting it was not meaningful, or they didn’t know what it was, or that it was nothing new. Simon’s material is the perfect antidote to this attitude, as he makes it very clear that there is a genuinely important and disruptive trend in progress, and explains what it is.

Jesper Boeg: Kanban

Crossing the line, pushing the limit or rediscovering the agile vision?

Jesper shared experiences and lessons learned with Kanban, and some of the problems it addresses which are present in other methodologies. His material was well balanced and insightful, and I’d like to go back and watch the full video when it becomes available.

Here again was a clear and pragmatic focus on matching tools and processes to the specific needs of the team, business and situation.

Ümit Yalcinalp: Development Model for the Cloud

Paradigm Shift or the Same Old Same Old?

Ümit focused on the PaaS (platform as a service) layer, and the experience offered to developers who build applications for these platforms. An evangelist from Salesforce.com, she framed the discussion as a comparison between force.com, Google App Engine and Microsoft Azure.

Eric Evans: Folding Design into an Agile Process

Eric tackled the question of how to approach the problem of design within the agile framework. As an outspoken advocate of domain-driven design, he presented his view in terms of this school and its terminology.

He emphasized the importance of modeling “when the critical complexity of the project is in understanding and communicating about the domain”. The “expected” approach to modeling is to incorporate an up-front analysis phase, but Eric argues that this is misguided. Because “models are distilled knowledge”, and teams are relatively ignorant at the start of a project, modeling in this way captures that ignorance and makes it persist.

Instead, he says, we should employ to a “pull” approach (in the Lean sense), and decide to work on modeling when:

  • communications with stakeholders deteriorates
  • when solutions are more complex than the problems
  • when velocity slows (because completed work becomes a burden)

Eric illustrated his points in part by showing video clips of engineers and business people engaged in dialog (here again, the focus on people rather than tools and process). He used this material as the basis for showing how models underlie these interactions, but are usually implicit. These dialogs were full of hints that the people involved were working from different models, and the software model needed to be revised. An explicit model can be a very powerful communication tool on software projects.

He outlined the process he uses for modeling, which was highly iterative and involves identifying business scenarios, using them to develop and evaluate abstract models, and testing those models by experimenting with code (“code probes”). Along the way, he emphasized the importance of making mistakes, not only as a learning tool but as a way to encourage creative thinking, which is essential to modeling work. In order to encourage the team to “think outside the box” and improve their conceptual model, he goes as far as to require that several “bad ideas” are proposed along the way, as a precondition for completing the process.

Eric is working on a white paper describing this process. A first draft is available on his website, and he is looking for feedback on it.

Modeling work, he suggested, can be incorporated into:

  • a stand up meeting
  • a spike
  • an iteration zero
  • release planning

He pointed out that not all parts of a system are created equal, and some of them should be prioritized for modeling work:

  • areas of the system which seem to require frequent change across projects/features/etc.
  • strategically important development efforts
  • user experiences which are losing coherence

This was a very compelling talk, whose concepts were clearly applicable beyond the specific problem domain of agile development.

Written by Matt Zimmerman

11 March, 2010 at 17:43

QCon London 2010: Day 1

with 2 comments

For the first time in several years, I had the opportunity to attend a software conference in the city where I lived at the time. I’ve benefited from many InfoQ articles in the past couple of years, and watched recordings of some excellent talks from previous QCon events, so I jumped at the opportunity to attend QCon London 2010. It is being held in the Queen Elizabeth II Conference Center, conveniently located a short walk away from Canonical’s London office.

Whenever I attend conferences, I can’t help taking note of which operating systems are in use, and this tells me something about the audience. I was surprised to notice that in addition to the expected Mac and Windows presence, there was a substantial Ubuntu contingent and some Fedora as well.

Today’s tracks included two of particular interest to me at the moment: Dev and Ops: A single team and the unfortunately gendered Software Craftsmanship.

Jason Gorman: Beyond Masters and Apprentices

A Scalable, Peer-led Model For Building Good Habits In Large & Diverse Development Teams

Jason explained the method he uses to coach software developers.
I got a bad seat on the left side of the auditorium, where it was hard to see the slides because they were blocked by the lectern, so I may have missed a few points.

He began by outlining some of the primary factors which make software more difficult to change over time:

  • Readability: developers spend a lot of their time trying to understand code that they (or someone else) have written
  • Complexity: as well as making code more difficult to understand, complexity increases the chance of errors. More complex code can fail in more ways.
  • Duplication: when code is duplicated, it’s more difficult to change because we need to keep track of the copies and often change them all
  • Dependencies and the “ripple effect”: highly interdependent code is more difficult to change, because a change in one place requires corresponding changes elsewhere
  • Regression Test Assurance: I didn’t quite follow how this fit into the list, to be honest. Regression tests are supposed to make it easier to change the code, because errors can be caught more easily.

He then outlined the fundamental principles of his method:

  • Focus on Learning over Teaching – a motivated learner will find their own way, so focus on enabling them to pull the lesson rather than pushing it to them (“there is a big difference between knowing how to do something and being able to do it”)
  • Focus on Ability over Knowledge – learn by doing, and evaluate progress through practice as well (“how do you know when a juggler can juggle?”)

…and went on to outline the process from start to finish:

  1. Orientation, where peers agree on good habits related to the subject being learned. The goal seemed to be to draw out knowledge from the group, allowing them to define their own school of thought with regard to how the work should be done. In other words, learn to do what they know, rather than trying to inject knowledge.
  2. Practice programming, trying to exercise these habits and learn “the right way to do it”
  3. Evaluation through peer review, where team members pair up and observe each other. Over the course of 40-60 hours, they watch each other program and check off where they are observed practicing the habits.
  4. Assessment, where learners practice a time-boxed programming exercise, which is recorded. The focus is on methodical correctness, not speed of progress. Observers watch the recording (which only displays the code), and note instances where the habit was not practiced. The assessment is passed only if less than three errors are noticed.
  5. Recognition, which comes through a certificate issued by the coach, but also through admission to a networking group on LinkedIn, promoting peer recognition

Jason noted that this method of assessing was good practice in itself, helping learners to practice pairing and observation in a rigorous way.

After the principal coach coaches a pilot group, the pilot group then goes on to coach others while they study the next stage of material.

To conclude, Jason gave us a live demo of the assessment technique, by launching Eclipse and writing a simple class using TDD live on the projector. The audience were provided with worksheets containing a list of the habits to observe, and instructed to note instances where he did not practice them.

Julian Simpson: Siloes are for farmers

Production deployments using all your team

After a brief introduction to the problems targeted by the devops approach, Julian offered some advice on how to do it right.

He began with the people issues, reminding us of Weinberg’s second law, which is “no matter what they tell you, it’s always a people problem”.

His people tips:

  • In keeping with a recent trend, he criticized email as a severely flawed communication medium, best avoided.
  • respect everyone
  • have lunch with people on the other side of the wall
  • discuss your problems with other groups (don’t just ask for a specific solution)
  • invite everyone to stand-ups and retrospectives
  • co-locate the sysadmins and developers (thomas allen)

Next, a few process suggestions:

  • Avoid code ownership generally (or rather, promote joint/collective ownership)
  • Pair developers with sysadmins
  • It’s done when the code is in production (I would rephrase as: it’s not done until the code is in production)

and then tools:

  • Teach your sysadmins to use version control
  • Help your developers write performant code
  • Help developers with managing their dev environment
  • Run your deploy scripts via continuous integration (leading toward continuous deployment)
  • Use Puppet or Chef (useful as a form of documentation as well as deployment tools, and on developer workstations as well as servers)
  • Integrate monitoring and continuous integration (test monitoring in the development environment)
  • Deliver code as OS packages (e.g. RPM, DEB)
  • Separate binaries and configuration
  • Harden systems immediately and enable logging for tuning security configuration (i.e. configure developer workstations with real security, making the development environment closer to production)
  • Give developers access to production logs and data
  • Re-create the developer environment often (to clear out accumulated cruft)

I agreed with a lot of what was said, objected to some, and lacked clarity on a few points. I think this kind of material is well suited to a multi-way BOF style discussion rather than a presentation format, and would have liked more opportunity for discussion.

Lars George and Fabrizio Schmidt: Social networks and the Richness of Data

Getting distributed webservices done with Nosql

Lars and Fabrizio described the general “social network problem”, and how they went about solving it. This problem space involves the processing, aggregation and dissemination of notifications for a very high volume of events, as commonly manifest in social networking websites such as Facebook and Twitter which connect people to each other to share updates. Apparently simple functionality, such as displaying the most recent updates from one’s “friends”, quickly become complex at scale.

As an example of the magnitude of the problem, he explained that they process 18 million events per day, and how in the course of storing and sharing these across the social graph, some operations peak as high as 150,000 per second. Such large and rapidly changing data sets represent a serious scaling challenge.

They originally built a monolithic, synchronous system called Phoenix, built on:

  • LAMP frontends: Apache+PHP+APC (500 of them)
  • Sharded MySQL multi-master databases (150 of them)
  • memcache nodes with 1TB+ (60 of them)

They then added on asynchronous services alongside this, to handle things like Twitter and mobile devices, using Java (Tomcat) and RabbitMQ. The web frontend would send out AMQP messages, which would then be picked up by the asynchronous services, which would (where applicable) communicate back to Phoenix through an HTTP API call.

When the time came to re-architect their activity , they identified the following requirements:

  • endless scalability
  • storage- and cloud-independent
  • fast
  • flexible and extensible data model

This led them to an architecture based on:

  • Nginx + Janitor
  • Embedded Jetty + RESTeasy
  • NoSQL storage backends (no fewer than three: Redis, Voldemort and Hazelcast)

They described this architecture in depth. The things which stood out for me were:

  • They used different update strategies (push vs. pull) depending on the level of fan-out for the node (i.e. number of “friends”)
  • They implemented a time-based activity filter which recorded a global timeline, from minutes out to days. Rather than traversing all of the user’s “friends” looking for events, they just scan the most recent events to see if their friends appear there.
  • They created a distributed, scalable concurrent ID generator based on Hazelcast, which uses distributed locking to assign ranges to nodes, so that nodes can then quickly (locally) assign individual IDs
  • It’s interesting how many of the off-the-shelf components had native scaling, replication, and sharding features. This sort of thing is effectively standard equipment now.

Their list of lessons learned:

  • Start benchmarking and profiling your app early
  • A fast and easy deployment keeps motivation high
  • Configure Voldemort carefully (especially on large heap machines)
  • Read the mailing lists of the NoSQL system you use
  • No solution in docs? – read the sources
  • At some point stop discussing and just do it

Andres Kitt: Building Skype

Learnings from almost five years as a Skype Architect

Andres began with an overview of Skype, which serves 800,000 registered users per employee (650 vs. 521 million). Their core team is based in Estonia. Their main functionality is peer-to-peer, but they do need substantial server infrastructure (PHP, C, C++, PostgreSQL) for things like peer-to-peer supporting glue, e-commerce and SIP integration. Skype uses PostgreSQL heavily in some interesting ways, in a complex multi-tiered architecture of databases and proxies.

His first lesson was that technical rules of thumb can lead us astray. It is always tempting to use patterns that have worked for us previously, in a different project, team or company, but they may not be right for another context. They can and should be used as a starting point for discussion, but not presumed to be the solution.

Second, he emphasized the importance of paying attention to functional architecture, not only technical architecture. As an example, he showed how the Skype web store, which sells only 4 products (skype in, skype out, voicemail, and subscription bundles of the previous three) became incredibly complex, because no one was responsible for this. Complex functional architecture leads to complex technical architecture, which is undesirable as he noted in his next point.

Keep it simple: minimize functionality, and minimize complexity. He gave an example of how their queuing system’s performance and scalability were greatly enhanced by removing functionality (the guarantee to deliver messages exactly once), which enabled the simplification of the system.

He also shared some organizational learnings, which I appreciated. Maybe my filters are playing tricks on me, but it seems as if more and more discussion of software engineering is focusing on organizing people. I interpret this as a sign of growing maturity in the industry, which (as Andres noted) has its roots in a somewhat asocial culture.

He noted that architecture needs to fit your organization. Design needs to be measured primarily by how well they solve business problems, rather than beauty or elegance.

He stressed the importance of communication, a term which I think is becoming so overused and diluted in organizations that it is not very useful. It’s used to refer to everything from roles and responsibilities, to personal relationships, to cultural norming, and more. In the case of Skype, what Andres learned was the importance of organizing and empowering people to facilitate alignment, information flow and understanding between different parts of the business. Skype evolved an architecture team which interfaces between (multiple) business units and (multiple) engineering teams, helping each to understand the other and taking responsibility for the overall system design.

Conclusion

Overall, I thought the day’s talks gave me new insight into how Internet applications are being developed and deployed in the real world today. They affirmed some of what I’ve been wondering about, and gave me some new things to think about as well. I’m looking forward to tomorrow.

Written by Matt Zimmerman

10 March, 2010 at 17:44

Fix broken Android permissions by re-installing apps

with 3 comments

I run the CyanogenMod derivative of Android on my G1, and somehow managed to get it into a state where it had withdrawn the security permissions from my installed applications. I think this happened when I attempted to upgrade the 1GB microSD to a 4GB one, but the phone failed to boot.

I first noticed the problem when trying to refresh in NewsRob would hang the application, and adb logcat showed:

W/dalvikvm( 540): threadid=3: thread exiting with uncaught exception (group=0x4001e170)
E/NewsRob ( 540): Caught the following exception:
E/NewsRob ( 540): java.lang.SecurityException: Neither user 10039 nor current process has android.permission.WAKE_LOCK.

NewsRob clearly had had this permission before, to prevent the phone from sleeping during a sync. The Manage Applications screen still showed that it did (“System tools: prevent phone from sleeping”). Watching adb logcat while the phone was booting showed what was going on, and that many other applications had the same problem:


W/PackageManager( 138): Not granting permission android.permission.INTERNET to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.WAKE_LOCK to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.ACCESS_NETWORK_STATE to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.VIBRATE to package com.newsrob because it was previously installed without
W/PackageManager( 138): Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.newsrob because it was previously installed without

/data/system/packages.xml, which seems to record which applications are installed and which permissions they have, showed:

<package name="com.newsrob" codePath="/data/app/com.newsrob.apk" system="false" ts="1264200476000" version="353" userId="10039" installer="com.google.android.feedback">
<sigs count="1">
<cert index="25" key="..." />
</sigs>
<perms />
</package>

i.e. the permissions block was empty. It should have looked more like this:

<perms>
<item name="android.permission.VIBRATE" />
<item name="android.permission.WRITE_EXTERNAL_STORAGE" />
<item name="android.permission.ACCESS_NETWORK_STATE" />
<item name="android.permission.WAKE_LOCK" />
<item name="android.permission.INTERNET" />
</perms>

I tried manually hacking it, and also moving and replacing the .apk file on the phone, but packages.xml always returned to this state. Maybe it’s not the master copy of that data.

What finally fixed it for me was to re-install the applications using the package manager, by running:

cd /data/app
for app in *.apk; do pm install -r $app; done

I hadn’t known about the pm command until then, and discovered it by accident when invoking an adb command told me about it. The phone chugged along for quite a while, but eventually re-installed all of the applications, and the problem was fixed.

Web searches showed that I was not the only person to find themselves in this predicament, and did not reveal an obvious solution, so I’m documenting mine here.

Written by Matt Zimmerman

31 January, 2010 at 12:28

linux.conf.au 2010: Day 5 (afternoon)

without comments

This will be the end of the series, as I’m leaving for the airport this afternoon.

Rusty Russell: FOSS fun with a Wiimote

Rusty told an entertaining story about his journey to produce geeky toys for his daughter, who is too young to use a keyboard or other standard human-computer interface. I always enjoy hearing about the intermediate steps of invention, and this was no exception. After five design iterations and several long distractions, Rusty produced a couple of working applications using Python and libcwiid, and demonstrated one of them.

Ariel Waldman: Space hacks

Ariel’s talk explained the (surprisingly numerous) ways in which geeks can get actively involved in advancing space science and exploration. With budgets of zero, hundreds or thousands of USD, there are projects which are accessible to individuals and schools which offer not only fun and education opportunities, but actually contribute something to the human study of outer space.

I didn’t note them down, so please watch the talk if you’re interested.

Written by Matt Zimmerman

22 January, 2010 at 03:44

linux.conf.au 2010: Day 4

with 3 comments

Lindsay Holmwood: Flapjack

Lindsay introduced Flapjack, which is a monitoring system designed to meet the scalability and extensibility requirements of cloud deployments. It shares the Nagios plugin interface, and so can use the same checks. It uses beanstalkd as a central message queue to coordinate the work of executing checks, recording results and making the appropriate notifications. Each of its components (worker, notifier, database) can be extended or replaced using an API, providing a great deal of flexibility.

Jeremy Allison: Microsoft and Free Software

Jeremy took us through Microsoft’s recognition of, and response to, the threat of free software to their monopoly position. After reviewing the major legal battles of this ongoing war (and the metaphor is apt), he says that Microsoft is turning to patents in an attempt to split the free software community and to earn revenue from the use of free software. Jeremy predicts that the outcome will be a never-ending conflict.

The key conflicts are likely to be around netbooks, mobile phones and appliances. How should the free software community respond?

We could ignore it, and keep making free software under copyleft licenses. Jeremy points out that this is perhaps our most effective strategy in the long run, to stay focused on the vision of a free software world.

We can continue to pressure governments and corporations to adopt truly open standards, and to investigate and challenge monopolies. Transparency is key to these efforts, as “elephants like to work in the dark” (Microsoft being “the elephant in the room”).

By lobbying against software patents, we can hope to contain the US software patent system from the rest of the world. Otherwise, the rapidly accumulating software patents in the US can suddenly and dramatically spread.

We might even convince the likes of Microsoft that patents, and patent trolls, represent a greater harm than good.

In response to direct patent attacks, we should search for prior art and attempt to undermine unjust patents. He also suggests calling out Microsoft employees on the company’s actions, to promote awareness particularly in the context of free software conferences.

He closed with a hope that Microsoft could change, citing IBM as having been “as feared and hated as Microsoft is today”.

Neil Brown:Digging for Design Patterns

Neil explored various design patterns in the kernel in order to illustrate how they are discovered, what their important attributes are, and how to use them effectively.

His examples were a binary search, “goto err”, accessor functions and kref. Naming patterns is important, especially getting that name into the code itself, so that it helps to cross-reference use, implementation and documentation of the pattern (e.g. uses of the kref pattern are sprinkled with the word “kref”). A successful pattern can both help to find bugs (this binary search doesn’t look the same as that one…why?) and to avoid bugs (by getting it right the first time).

Written by Matt Zimmerman

21 January, 2010 at 03:46

linux.conf.au 2010: day 3 (morning)

without comments

Benjamin Mako Hill: Antifeatures (keynote)

Mako delivered an entertaining and inspirational talk on antifeatures, those oddities which intentionally make technology less useful to its consumers (think DRM, though he provided a wide range of examples). Mako explained the main reasons why antifeatures exist, and how they are endemic to the business of proprietary software.

Mako offered a potential upside to antifeatures, which is that they can help the free software community to focus on fundamental concerns like autonomy, rather than (for example) the mechanics of licensing. Antifeatures can be used to explain to the uninitiated why software freedom is important to everyday folks, not just hackers.

Denise Paolucci and Mark Smith: Build Your Own Contributors, One Part At A Time

Denise and Mark provided a practical list of “dos” and “don’ts” for building a successful community based on respect, empowerment and collaboration. Much of this was elementary from an Ubuntu perspective, but they offered a variety of examples from Dreamwidth which were illustrative.

Their list of “three things to start right now”:

  1. appoint a “welcomer” and laud newcomers’ first contributions
  2. stop timing out on communication when people need responses from you
  3. Have words with “that person” and let them know their behavior is not okay

Chris Double: Implementing HTML5 video in Firefox

I knew I liked this idea, but I didn’t realize how much I liked it until I watched Chris’ very informative talk. The promise of an open standard for embedding video is exciting enough, but the standard offers much more than basic embedding and playback controls. Chris demonstrated javascript-driven subtitles loaded from an SRT file, custom controls, copying and analysis of pixel data, replacing the background in a video using a chroma key technique, and even more impressive real-time special effects.

The initial implementation used the xiph.org reference libraries (libogg, libtheora, libvorbis) and PortAudio, but had some problems, including poor A/V synchronization. The second iteration used higher level libraries liboggz, libfishsound, liboggplay and libsydneyaudio, and was included in Firefox 3.1 alpha and beta, but some limitations in liboggplay (a/v sync, chained oggs, etc.) led to difficulty. There were also proof of concept implementations which used GStreamer on Linux, DirectShow on Windows, and QuickTime on MacOS, but these were hampered by codec plugin complications. In the end, they’ve gone back to using the xiph.org reference libraries (but with libsydneyaudio), though the GStreamer backend is still actively developed. Chris has published a series of articles on his blog on reading, decoding and synchronizing A/V streams using various libraries.

There are still some kinks to work out: the lack of indexes and the like in Ogg complicates seeking, calculating duration and so on, and there is no satisfactory solution for cross-platform audio. Rendering is not hardware accelerated yet because the video element is part of the HTML rendering pipeline.

It will be very powerful when it’s ready, though. Theora playback is supported in Chrome, Firefox and Opera today, and Daily Motion, Wikipedia and Archive.org are using it. I can’t wait to see the full API working well on a massive scale.

Written by Matt Zimmerman

19 January, 2010 at 23:11

linux.conf.au 2010: Day 2 (morning)

with one comment

Julius Roberts: ZFS

This talk was a tour through the main features of the ZFS filesystem, showing how to work with storage pools and snapshots. It was useful to see the example commands and behavior in the context of a live command line session, as I haven’t got around to playing with it in an OpenSolaris VM yet.

Mark Atwood: memcached

I ended up in this talk in between other sessions I was attending. It outlined the sorts of places where memcached can be useful in applications. Beyond the obvious caching scenarios, Mark suggested using it to store an application’s working set (key/value dictionaries), user sessions and distributed rate limiting scoreboards.

Josh Berkus: Relational vs. Non-relational

I’ve followed with interest the NOSQL movement, and was interested to hear from Josh (of PostgreSQL Experts Inc.) what I expected would be a “relationalist” point of view.

He began by addressing some database myths. He stated that the “revolutionary new database designs” lauded by the non-relationalists are actually just new implementations of old ideas (e.g. CouchDB vs. Pick). He dismissed the “NoSQL” moniker as the wrong distinction to make: there are much more important and basic differences between database implementations than whether or not they use SQL. He explained that the relational model is orthogonal to support for ACID transactions, though I didn’t realize that was an active misconception. He also reminded us that we do not need to choose a single database for all of our possible needs, and should focus on choosing the system which fits our current application goals, or choosing multiple databases (e.g. MySQL and memcached, or [interestingly] PostgreSQL and CouchDB).

Relational OLTP databases tend to have more mature implementations of transactions, the ability to enforce data constraints and consistency, support complex reporting, and vertical scaling (but not horizontal).

SQL itself doesn’t map very well to many programming languages, but promotes application portability and enables the management of schema changes over time. “No-SQL” provides a more natural mapping, and allows programmers to act as DBAs.

His main reason to use an SQL-RDBMS was when the data will outlive current application implementations, because having a looser coupling between the database and application helps support a migration to a new implementation.

He compared the applicability of embedded key-value, distributed key-value, flat file, object, and document databases but I wasn’t able to take notes quickly enough through this segment.

His conclusion was to reiterate that “relational vs. non-relational” is the wrong way to look at the problem, and that we should instead choose the right tool for the job.

Written by Matt Zimmerman

19 January, 2010 at 01:15

Excellent adventures in free software

with 3 comments

Debian swirl
After maintaining an ad hoc Linux distribution for myself for several years, I replaced it with Debian and have never looked back. One of the main reasons for this has been the mind-boggling quantity of applications and tools which are available from its repositories. Given couple of keywords, or a good guess at the name of the application, APT fetches and installs the necessary packages in a matter of seconds. After years of compiling free software programs from source code, this profoundly changed the way I thought about finding and obtaining software.

Over 10 years later, the speed and convenience of this system still occasionally leaves me awestruck. As a typical example, on one occasion, I was using a pastebin to share the output of a program I was discussing with someone online by copying and pasting it.. The output was fairly long, and it was inconvenient to copy and paste, so I wanted a tool which would read the output from a pipe and upload it directly to the pastebin, without a human in the middle.

Before I fired up an editor to write such a tool, I did a quick search to check if any such thing existed already, and found Stéphane Graber’s pastebinit, which did exactly what I wanted (and more). Not only had someone else had the idea first, they had implemented, released and packaged it over a year earlier. The end result, for me, was that within 30 seconds of discovering that I needed such a tool, I had it installed and working.

Experiences like the above still make me feel like I’m living a scene from the 1989 film Bill & Ted’s Excellent Adventure, where the protagonists discover that they have already traveled back in time to anticipate their own needs. They merely think about what they need, and there it is. The fact that I am still amazed by this probably makes me sound like a dinosaur to other free software enthusiasts, but this kind of instant gratification is something which is only just beginning to emerge in proprietary systems like the iPhone. The web was designed from the start to work this way, of course, but there is much I can do with free software that I can’t do with web applications (at least for now). The web also doesn’t give me that feeling of personal connection with the creator of the software, or (generally) the opportunity to tailor it for my needs.

Written by Matt Zimmerman

26 December, 2009 at 15:47

Ubuntu 10.04 LTS: How we get there

with 11 comments

The development of Ubuntu 10.04 has been underway for nearly two months now, and will produce our third long-term (LTS) release in April. Rick Spencer, desktop engineering manager, summarized what’s ahead for the desktop team, and a similar update will be coming soon from Jos Boumans, our new engineering manager for the server team.

What I want to talk about, though, is not the individual projects we’re working on. I want to explain how the whole thing comes together, and what’s happening behind the scenes to make 10.04 LTS different from other Ubuntu releases.

Changing the focus

Robbie Williamson, engineering manager for the foundations team, has captured the big picture in the LTS release plan, the key elements of which are:

Merge from Debian testing

By merging from Debian testing, rather than the usual unstable, we aim to avoid regressions early in the release cycle which tend to block development work. So far, Lucid has been surprisingly usable in its first weeks, compared to previous Ubuntu releases.

Add fewer features

By starting fewer development projects, and opting for more testing projects over feature projects, we will free more time and energy for stabilization. This approach will help us to discover regressions earlier, and to fix them earlier as well. This doesn’t mean that Ubuntu 10.04 won’t have bugs (with hundreds of millions of lines of source code, there is no such thing as a bug-free system), but we believe it will help us to produce a system which is suitable for longer-term use by more risk-averse users.

Avoid major infrastructure changes

We will bring in less bleeding-edge code from upstream than usual, preferring to stay with more mature components. Where a major transition is brewing upstream, we will probably opt to defer it to the next Ubuntu cycle. While this might delay some new functionality slightly, we believe the additional stability is well worth it for an LTS release.

Extend beta testing

With less breakage early in the cycle, we plan to enter beta early. Traditionally, the beta period is when we receive the most user feedback, so we want to make the most of it. We’ll deliver a usable, beta-quality system substantially earlier than in 9.10, and our more adventurous users will be able to upgrade at that point with a reasonable expectation of stability.

Freeze with Debian

With Debian “squeeze” expected to freeze in March, Ubuntu and Debian will be stabilizing on similar timelines. This means that Debian and Ubuntu developers will be attacking the same bugs at the same time, creating more opportunities to join forces.

Staying on course

In addition, we’re rolling out some new tools and techniques to track our development work, which were pioneered by the desktop team in Ubuntu 9.10. We believe this will help us to stay on course, and make adjustments earlier when needed.  Taking some pages from the Agile software development playbook, we’ll be planning in smaller increments and tracking our progress using burn-down charts As always, we aim to make Ubuntu development as transparent as possible, so all of this information is posted publicly so that everyone can see how we’re doing.

Delivering for users

By making these changes, we aim to deliver for our users the right balance of stability and features that they expect from an Ubuntu LTS release. In particular, we want folks to feel confident deploying Ubuntu 10.04 in settings where it will be actively maintained for a period of years.

Written by Matt Zimmerman

23 December, 2009 at 09:00