Posted tagged ‘Introspection’


February 5, 2012

Since it’s been a while since I last posted anything here, I thought that I’d briefly summarise what I’ve been doing over the past few months. If I get chance, I’ll probably follow up with more detailed posts, later.

I’ll also apologise in advance, if the quality of this post is below my usual standards – since I’m tired, and I’ll admit that it’s been quite a long time since I’ve produced any prose that’s more complex than one of my typical Tweets, e-mails, or IM/IRC sessions.

A Japanese Redux

As you can probably tell from this post’s title (Kon’nichi wa Wakusei/Hello, Planet), I’ve recently decided to resume learning Japanese using new techniques, after a multi-year hiatus – so that I can enjoy, and understand a multitude of content (music, blogs, and technical documentation, amongst other things); along with hopefully engaging in even more insightful and interesting conversations.

I’m already somewhat able to read and recognise text written in Katakana and Hiragana (providing that I’m undisturbed); and I seem to have a decent recall rate, according to the SayJack Hiragana listening quiz – although I’ll need to keep reading, listening and practising, in order to succeed in the long-term.

Obviously, I’m already capable of writing in Japanese using an Input Method Engine (I’m currently using Google’s – but I’ve also got a trial copy of ATOK in my “Downloads” folder), and can sort-of write a handful of characters on paper.  My listening skills are also constantly improving.

I also realise that my Japanese vocabulary leaves much to be desired for – although I’m acquiring words and phrases as I progress; and I guess that it’s something that I’ll continue to do, long after understanding the basics.

The Epiphany

At ~5:03 am GMT, I had an epiphany in comprehending the phrase 「僕は日本語を学んでいます」(Boku wa nihongo o manande imasu/”I have learned [the] Japanese“) , after reading comments on a Google+ greeting post that I addressed to the author of the hiro99ma blog, and looking up the meaning of  「を」 (wo – pronounced “o”).

Collectively concluding that 「は」(ha) is pronounced differently, depending upon the context (it is pronounced “wa”, when used as a particle) probably also helped.

With a hint of irony, I also had to learn the Japanese words for “learning” and “learn” . (「学んで」(mana-n-de), and 「学ぶ」(mana-bu), respectively), in order to actually state “I’m (trying to) learn Japanese”), beforehand.

That aside, I’ll move on to my…

Personal and Commercial Projects

After obtaining an ACS ACR122U RFID/NFC/smartcard reader, I have been performing research into various proprietary, and standardised smartcard protocols; and have discovered a useful hardware modification – which I’ll document at a later date. Some of my research has culminated in writing Wireshark dissectors for the USB CCID class, MiFare, and FeliCa application protocols – all of which have been accepted upstream.

Regular readers of my posts on the OMAP3530 board, who have probably observed that I haven’t said much about it, after my last aborted attempt at getting Symbian^3 running on it might be interested in knowing that I’ve partially succeeded in getting RISC OS running.

I’ve also been working on an Android application, as part of my first ever contacting position – although I can’t provide any more information, right now.


As far as university is concerned, my first year was fairly successful. However, I’m having to resit an exam for the Computer Architecture & Systems Software module – since I struggled with my initial attempt, and ultimately failed (despite trying extremely hard, and participating in class/tutorial sessions).

I partially blame a combination of stress and exhaustion – from having to wake up at 5:30am, and spending hours on travelling,  along with the  “rapid-fire” lecture delivery style provided by tutors in cramped theatres (whilst having to cope with aching knees, and inferior long-distance vision (compared to ~10 years ago)), for my failure.

Obviously, that problem was only exacerbated by having to transcribe handwriting in poorly-chosen colours (usually orange or lime green) from dimly-lit whiteboards in “real-time”, along with listening to the lecture content – which meant that my understanding of the rather complex subjects involved was hindered.

I’m tempted to see if I can adapt some of the techniques that I developed for learning Japanese, in order to to make revision easier, and surviving lectures more bearable – although computational mathematics is obviously more of a theoretical subject than language learning, or software development are.

I’m hoping to be more successful at this attempt – since I realise that failure isn’t an option, when my future hinges on the outcome of said exam.


Although I’ve got a lot to say, and I’ve over-egged the pudding a little, I’ll stop here. I hope that gives others a good idea of what I’m doing these days, though.


Thoughts on Distributed Window Systems

October 12, 2011


In this post, I’ll propose Amadeus – a design for an experimental highly-distributed, extensible, and network-transparent windowing system that supports resolution-independence through the use of vector graphics technology, and scales from a single PC (or other device) to a large cluster of devices.

This will hopefully be achieved via the meticulous usage of compression, and adaptive data structures; the adoption of a multicast/broadcast architecture, and orchestration from federated or standalone Registrars.

My decision to write this proposal was inspired by interesting discussions with a friend regarding implementations of other systems (Display PostScript, NeWS, and the many window servers of Symbian OS); and reading various tirades against X11, plus documentation regarding various proprietary systems (especially Photon).

However, the system itself has a brand-new design (as far as I’m aware) – and probably plenty of stupid design mistakes that were rectified by others in the past…

High-Level Architecture

The Amadeus architecture consists of 4 main components:

  • The Rendering Surface – responsible for accepting hardware events, and rendering graphics data received from Applications via private channels or network broadcasts.
  • The Registrar – responsible for coordinating the activities of the rest of the architecture.
  • Applications – either built directly against a library that generates vector graphics data, and sends it to the Rendering Surface; or against a ported GUI widget toolkit (or compatibility layer for an existing windowing system) designed to do so.
  • Hardware Event Providers – responsible for collecting and dispatching hardware events.
These roughly fit together, like so:

Responsibility for font rasterisation and management is either directly accounted for by the Rendering Surface implementation, and a suitable rasterisation library (e.g. FreeType or MonoType iType) – in the case where text is embedded in SVG data, or by applications designed to deliver pre-rendered text as vector shapes and paths.

Descriptions of other window system architectures, such as Microsoft’s GDI and various successors, X11, Apple’s Quartz, QNX’s Photon, NitPicker,’s Wayland, and variants of Display PostScript are best found elsewhere.

Authentication and Confidentiality

Authentication and confidentiality of signalling and graphical data network traffic is beyond the scope of this proposal – as other parties have more expertise in that area, and I feel that I cannot immediately improve upon existing designs. Those interested in such functionality should investigate IPSec (which should work with multicasting, according to this paper from Cisco), and SSL/TLS (or SSH) for private channels.

The Registrar

The Registrar announces its availability upon launch via network broadcasts (or multicasts); and tracks Rendering Surfaces, HWEPs and client applications interested in either listening for hardware events, or displaying windows on a per-machine, cluster, or network basis by unique name.

It also stores client configuration data (e.g. connected display resolutions, the characteristics of connected HIDs (keyboards, mice and game controllers), and preferred data structure widths), in addition to orchestrating the window management activities of machines within a cluster.

Whilst the intention is obviously to eventually support large-scale clusters and networks of “screens and machines”, with application windows freely distributed amongst them (in the case of X11-style invocation and display of applications installed on other machines); multiple Registrar instances (supporting multiple clusters or standalone PCs) shouldn’t conflict with each other, and it should always be possible for users to decide upon levels of isolation, and appropriate network topologies.

Multicast DNS (as implemented in Apple’s Bonjour/mDNSResponder, and Avahi), or D-BUS might be feasible technology options for implementing parts of this functionality.

The Rendering Surface

The Rendering Surface implementation accepts compressed SVG data from applications, and hardware events from HWEPs, received via either a private channel (e.g. a transient UDP socket with a port number known by the Registrar, a UNIX domain socket, or a platform-specific IPC mechanism), or a network broadcast/multicast transmission.

Instances thereof must register themselves using a unique name to the Registrar (and optionally specify a private channel), and accept any relevant events from Hardware Event Providers, such as mouse clicks and movements, and keystrokes.

The SVG data that applications generate should accurately render using any quality SVG implementation – regardless of its ultimate bitmap data destination (e.g. a raw framebuffer, or Qt’s SVG rendering widget), post decompression.

Compression Algorithms and Data Structures

Data structures used by Amadeus for signalling are designed to be extensible and easy to parse (explicitly identified using 64-bit field type IDs, and accompanied with content length fields); and capable of being dynamically resized to accommodate network connections with varying levels of quality (i.e. latency and bandwidth).

If so desired, it may be theoretically possible to adapt data structures from other protocols, to provide additional functionality – although in the case of some (e.g. the X11 Clipboard protocols), it would probably be a better idea to design new ones, in the long run.

Although it was originally intended that “plain” SVG 1.1 data be compressed according to the WBXML 1.3 specification from the Open Mobile Alliance, it should be possible to support alternative serialisations of an SVG data stream (e.g. transformed JSON), and additional compression algorithms (e.g. those implemented by ZLib/GZip) via the aforementioned extension mechanism.

An Open Source WBXML parsing and generation library (released under a variant of the BSD License, with a promotional clause), written in C++ is available from the Sybyx project on SourceForge. Although I haven’t attempted to use it (yet), I received the impression that its API is reasonably clean and well-designed.

Bilal Siddiqui’s article also provides a rough idea of a conversion technique, and an archive containing a set of  XML files in both encoded, and non-encoded forms.

I have attempted to register the SVG 1.1 XML Document Type Definition ID (-//W3C//DTD SVG 1.1//EN) with the OMA, using their online form – although the process failed, due to a configuration error of the Web server.

Compression – State of the Art

Whilst I’m unaware of other, entire window system architectures utilising SVG for drawing, the technology has been successfully utilised as a significant part of KDE’s Plasma family of desktop environments; for rendering icons in the AVKON/S60 user interface framework for Symbian OS (and its successors); and for a multitude of other applications.

However, most implementations tend to assume that graphics files are stored as plain text XML files within a local (or remote/removable) file system, and can be quickly accessed prior to rendering – which works well for most applications, but is likely to be extremely inefficient within Amadeus, due to its network-bound, distributed nature.

The most obvious solution to this problem would be to use one of the aforementioned compression techniques (or another) – which is reinforced by this paper (circa 2003) from the seemingly defunct developers of the X-Forge game development toolkit, concluding that their proprietary compression technology compares favourably to PNG and JPEG bitmaps, in terms of resulting file size.

X-Forge’s developers were also able to achieve a bitmap-equivalent level of apparent image quality for a static set of textured game graphics (and further size reductions when cramming all of their resources into a ZLib-compressed archive), in addition to resolution independence – although in the case of Amadeus, it is highly likely that graphics will consist of both vector widgets, and wrapped bitmap images (e.g. photographs, Web graphics, and pre-rendered widgets from applications built against non-native toolkits), which may affect efficiency.

From very brief testing with GZip’s -9 argument, I was able to compress a copy of the SVG file (exported from InkScape in “Plain SVG” format) corresponding to the architecture diagram to 1.00 KB (1,024 bytes), from 3.97 KB (4,075 bytes). The original, uncompressed version of the file, exported without optimisations to remove InkScape-specific metadata was 5.18 KB (5,314 bytes) in size.

As previously mentioned, I have not yet tested a WBXML implementation against these files, for comparison.

Bitmap Image Support

Through the use of data: URIs, and Base64-encoded image files, it is possible to embed bitmap graphics data into SVG content, so that the aforementioned common use cases (e.g. display of Web image content, and graphics from other windowing systems) can be supported.

This technique could be combined with a hybrid local-distributed image caching system that is integrated with the Registrar, delta encoding of SVG payloads, and checksum-based URIs for referencing extracted bitmap image data within the cache.

More sophisticated approaches to this problem are described in a technical reference document from NoMachine, related to their NX unicast display/window sharing architecture (which in turn is closely entwined with the X11 architecture).


In isolation, distributed windowing systems; multicast architecture-based distributed systems in general; and vector-based GUIs are nothing new, conceptually. What Amadeus brings to the table is an amalgamation of these disparate concepts in the form of a modern, flexible design, that should be suitable for supporting multiple high-resolution displays, and users with wildly varying requirements.

Whilst I’ve left issues related to high-performance rendering of 3D graphics and video content, latency, security, and various other architectural aspects unresolved; I’ve hopefully provided an interesting starting point for debate on the design of such systems.

Here We Go Again

January 13, 2011

As I compose this post, I realise that I’m extremely fortunate to have made it this far through life – especially when considering others living in developing countries, for instance.

After all – although I haven’t got the support of a wealthy, stable family, I’ve still got:

  • Food and potable drinking water
  • Heating, electricity and other necessities
  • A dry roof over my head
  • Broadband Internet connectivity
  • Good friends, and a handful of family members who mean well – even if I don’t always agree with them

In just over 6 months from now, I’ll have reached the 2 decades old milestone – which is somewhat worrying to contemplate; although I’m cautiously excited about future possibilities.

With that in mind, I’d like to reflect on the happenings of 2010, and the beginning of 2011.

In many aspects, 2010 was just another unspectacular, run-of-the-mill year – a monotonic continuation of 2009, to be blunt; although it brought change and progress in many ways.


From a positive perspective, it was a good year for academia, software development, travelling, and personal relationships, amongst other things.

  • I was able to return to London, shortly after my 19th birthday in order to spend some time volunteering at the Symbian Foundation – details of what I did are available as part of my LinkedIn profile.
  • I received a number of references from several people, which were fairly useful (thanks!)
  • I finally managed to obtain a part-time, intensive placement on a 4-5 year long Computer Science course at the University of Bradford – and completed my first semester, shortly before Christmas 2010.
  • I learned the fundamentals of Java, and managed to write a number of C++-based applications using Qt – some of which I published the source code for on BitBucket.
  • Towards the end of 2010, I released a modified version of Sebastian Reichel’s ISI dissector for Wireshark with support for USB-encapsulated packets. I have since refactored the USB handling code and integrated it into the main dissector, in addition to writing new dissectors for the SIM, GSM Stack Server and Supplementary Services resources; and worked with Sebastian on incorporating these changes into his version successfully.
  • I also managed to reconnect with several people whom I haven’t heard from in a while.


From a negative perspective, it was a bad year for older personal projects, family and financial-related issues, injuries, and the Symbian Foundation.

  • The server hosting DNS records for one of my domains ( and Web services for several projects, which Sjors Gielen generously provided access to for several years finally succumbed to hardware failure – so I’ve lost some old data, some of which was of dubious utility, and some of which was fairly useful.
  • In November, I was unfortunate enough to have been involved in a hit-and-run traffic accident, whilst returning home from the supermarket in Boroughbridge. Thankfully, I sustained only minor injuries (from which I later fully recovered); although the suspect was never identified, after filing a police report.
  • In December, as a result of the harsh realities of the current economic climate, and decisions from handset manufacturers to slowly withdraw from the Symbian Foundation, the decision was made to effectively cease operations – which left community members such as myself to pick up the pieces.

I remain pessimistically hopeful that things improve in 2011.

Thanks to everyone who’s helped in various ways; provided advice and interesting discussion points; and otherwise persisted with me so far.

Hopefully, I’ve been useful to others in some way, too – and I’m glad, if that’s the case.

It’s the End of an Era

June 25, 2010

Apologies for not updating things here as often as I’d have liked, since I’ve been very busy with other, more pressing issues as of late.

I also wanted to try and get this out sooner, rather than later – but I’ve been dealing with a cold, and trying to catch up on sleep; and ended up procrastinating as far as posting is concerned.

That aside, as of 23/06/2010, I’m no longer an FE student of Harrogate College – after spending roughly 3 years there.

But what does that mean for me, from a positive perspective?

  • I finally get a limited amount of time to relax, recover from stress, and contemplate future plans
  • As I now have more time to spare, I am now open to offers from people/organisations who may be interested in working with me
  • I can finally dedicate more time and attention to projects that I am involved with
  • I may even have slightly more time on my hands to blog – who knows?

On the flip-side, this now creates some brand-new issues for me:

  • I now have to reconsider my initial plans of attending my initial choice of university to study either computer science, or computer security; due to not quite managing to obtain 200 UCAS Points – which means that I’ll either have to plead my case, or go elsewhere
  • Due to the aforementioned problem, and the fact that I’m currently living in the middle of nowhere, and pretty much isolated from the rest of society; trying to find meaningful employment is next to impossible (I don’t care so much about pay, as much as not totally losing dignity, and going insane trying to cope with the menial crap involved with being a supermarket monkey, or a burger inversion specialist)
  • Since I can’t travel very far – at least not without being stranded somewhere else for ages, until another bus arrives, I’ll have to find some other way of occupying the next couple of months…

I hope that gives the curious an idea of what’s been going on, so far. Since this post is getting pretty long, I’ll discuss the college and university situation in greater detail in some follow-up posts.

Movin’ On Without You

February 27, 2010

I guess that after the failure of the Open Source project that I founded back in 2008, it’s time to disconnect from that project’s old brand and URL that have followed me around the Web for quite a long time (e.g. as the URL on my Twitter profile, and the URL that I provide when commenting on other blogs, so that BackType accredits comments to me). I’ve already started by creating this blog, and updating the URLs on my Twitter and FaceBook profiles – although making changes that are this far-reaching takes time.

I’ll probably discuss the old project in depth at a later date – but for now, I promise that the content of the project’s site will remain accessible for reference (at least for as long as my host is willing to keep my sites active, and as long as I continue to renew my domain name); although to reduce the load on the hosting server, it’ll be read-only, and most Drupal modules are disabled.