• Coding

    5 years of Test Driven Development, Visualized

    Here’s a 15 minute video covering nearly 5 years of active Mir development in C++. We (the original Mir team), started the project by reading “Growing Object-Oriented Software, Guided by Tests” by Steve Freeman and Nat Price (book site).  We followed the philosophy of test-driven development closely after that, really throughout the whole project. This is a video generated by the program ‘gource’. What you see is every file or directory is a node. Little avatars, one for every contributor zoom around the files and zap them when a change is made. If you watch closely, some contributors will fixate on a few files for a bit (bug hunting, maybe?)…

  • Coding,  mir,  Multimedia,  Ubuntu

    Mir and Vulkan Demo

    This week the Mir team got a Vulkan demo working on Mir! (youtube link to demo) I’ve been working on replumbing mir’s internals a bit to give more fine grained control over buffers, and my tech lead Cemil has been working on hooking that API into the Vulkan/Mir WSI. The tl;dr on Vulkan is its a recently finalized hardware accelerated graphics API from Khronos (who also proved the OpenGL APIs). It doesn’t surplant OpenGL, but can give better performance (esp in multithreaded environments) and better debug in exchange for more explicit control of the GPU. Some links: Khronos Vulkan page Wikipedia Vulkan entry short video from Intel at SIGGRAPH with…

  • Coding,  mir,  Ubuntu

    New Mir Release (0.18)

    If a new Mir release was on your Christmas wishlist (like it was on mine), Mir 0.18 has been released! I’ve been working on this the last few days, and its out the door now.  Full text of changelog. Special thanks to mir team members who helped with testing, and the devs in #ubuntu-ci-eng for helping move the release along. Graphics Internal preparation work needed for Vulkan, hardware decoded multimedia optimizations, and latency improvements for nested servers. Started work on plugin renderers. This will better prepare mir for IoT, where we might not have a Vulkan/GLES stack on the device, and might have to use the CPU. Fixes for graphics…

  • Coding

    Bjarne on C++11

    I saw this keynote quite a while ago, and I still refer to it sometimes, even though its almost 3 years old now. Its a good whirlwind tour of the advances in C++11.

  • Coding

    More Usable Code By Avoiding Two Step Objects

    Two step initialization is harmful to the objects that you write because it obfuscates the dependencies of the object, and makes the object harder to use. Harder to use Consider a header and some usage code: struct Monkey { Monkey(); void set_banana(std::shared_ptr const& banana); void munch_banana(); private: std::shared_ptr const& banana; }; int main(int argc, char** argv) { Monkey jim; jim.munch_banana(); ... } Now jim.munch_banana(); could be a valid line to call, but the reader of the interface isn’t really assured that it is if the writer wrote the object with two step initialization. If the implementation is: Monkey::Monkey() : banana{nullptr} { } void Monkey::set_banana(std::shared_ptr const& b) { banana = b;…

  • Coding

    Bad Metaphysics Costs Maintainability

    I find myself doing a lot of metaphysical thinking in my day to day work as a coder. Objects that are cohesive and are valid metaphysical analogues to common experiences make it much easier to read, understand, and fix existing code. Taking an example: struct ServiceQueue { void place_customer_at_back(); void service_front_customer(); }; This class maps well to a physical problem we encounter frequently in our day to day lives; customer service at a bank teller window, perhaps, or ordering a hamburger at fast food chain. Taking things to the realm of computers, ServiceQueue also maps to many computer problems pretty well as well. A packet arrives over the network, and…

  • Coding,  mir

    A few years of Mir TDD

    We started the Mir project a few years ago guided around the principles in the book, Growing Object Oriented Software Guided by Tests. I recommend a read, especially if you’ve never been exposed to “Test-driven development” Compared to other projects that I’ve worked on, I find that as a greenfield  TDD project Mir has really benefitted from the TDD process in terms of ease of development, and reliability. Just a few quick thoughts: I’ve found the mir code to be ready to ship as soon as code lands. There’s very little going back and figuring out how the new feature has caused regressions in other parts of the code. There’s…

  • Coding,  mir,  Ubuntu

    Mir Android-platform Multimonitor

    My latest work on the mir android platform includes multimonitor support! It should work with slimport/mhl; Mir happily sits at an abstraction level above the details of mhl/slimport. This should be available in the next release (probably mir 0.13), or you can grab lp:mir now to start tinkering.

  • Coding,  mir,  Open Source,  Ubuntu

    Friendly Mir Links

    Just a friendly reminder, but Mir is open! Here are some useful links. Documentation We’ve put effort into sharing as much as possible and lowering the knowledge-barrier to entry for the project. We want you to understand how your pixels will be painted under Mir. Here’s some good links: Mir documention: http://unity.ubuntu.com/mir/ This is all generated right from the trunk code (lp:mir’s doc/ folder) We also generate api documentation on same site: http://unity.ubuntu.com/mir/annotated.html Code The code is all available on launchpad: lp:mir The reviews are all done on out in the open: active reviews Our continuous integration is on jenkins like the rest of the Ubuntu projects: https://jenkins.qa.ubuntu.com/job/mir-ci/ Lastly there…

  • Coding,  mir,  Open Source,  Ubuntu

    Mir and Android GPU’s

    With Ubuntu Touch, (and mir/unity next) we’re foraying into a whole new world of android drivers. Given the community’s bad memories from the past about graphics, let’s clear up what’s going on, and how we’ll steer clear of the murky waters of new driver support and get rock-solid Ubuntu on mobile platforms. Android Driver Components and their Openness First let’s talk about openness. Driver ecosystems tend to be complex, and android is no exception. To get a driver to work on android, the gpu vendors provide:  a kernel module The kernel module must be GPL compatible and this part of the driver is always open. This part of the driver…