Aldonline

Domain dot... whatever?

Oops... this feels weird

The net's regulator, Icann, voted unanimously to relax the strict rules on so-called "top-level" domain names, such as .com or .uk.

http://news.bbc.co.uk/1/hi/technology/7475986.stm


What this means is that, sooner rather than later, you might run into urls like

http://i.am.aldo/

Scrum: From Theory to Practice




Overview ( theory )





Overview ( practice )







Backlog ( theory )






Backlog ( practice )







Product Owner ( theory )





Product Owner( practice )







Sprint ( theory )





Sprint ( practice )







Daily Standup ( theory )





Daily Standup ( practice )








Shippable Code ( theory )





Shippable Code ( practice )


Announcing SemanticFlash.org!


As some of you might know, we ( me and some colleagues ) have been regularly building Semantic Web applications for the last 4 years. Some of them have user interfaces in Flex.

This means that we have been experimenting with RDF in the Flash platform for quite a while.

Now, for strategic reasons we have remained ( almost ) totally silent on this issue. However, now that the Semantic Web is entering mainstream and I have closed some chapters in my life, I believe that it is time to share what we have learned with the Flex community and help create a social initiative that will hopefully be the home to one of the most powerful user interface platforms yet.

Initially, this community effort will consist of three tasks:

  1. Setup and manage the necessary infrastructure to sustain a community
  2. Contribute seed code, roadmaps and other material
  3. Attract talent from other areas
1. Infrastructure

I am going for free Google services here to keep things simple.
This is so basic that it is almost a non-task. But I still list it here so I can announce the following:

Most of them are being setup but empty at this point.

Next step?: Join the discussions

2. Content

We have a complete AS3 RDF stack ( parsers, model classes, utilities, query engines, communication services, reasoners, UI components, etc ). We considered opening a part right away, but after much debate we decided the best choice would be to hold on and try to resolve some fundamental issues first. There are also potential legal issues ( leftover code, app-specific comments, etc ) that might make things slower than we would like to. But those are not really relevant compared to the design issues.

One of the fundamental design issues we would like to resolve in this stage is figuring out just how deeply we want to integrate RDF into Flash. This is an extremely important topic, so let me develop it for a while.

2.1 RDF / AS3 integration ( how deep? )

RDF Abstract Syntax and Concepts defines a set of RDF concepts, the building blocks over which the rest of the Semantic Web Stack is built. Within these "concepts" you can find IRIs, Literals, BNodes and Triples.

Over the years we have experimented with several ways to implement the RDF Abstract Model in different languages. You can find a whole family of proposals if you take a look at the major established java APIs ( sesame, jena, rdf2go, etc ). They usually have a hierarchy of "model" classes representing each term.

However tempting it might seem to just copy the Java models ( rdf2go or sesame for example. Both widely used and with a second generation design ), we need to keep in mind that Flash is not Java and has some particularities ( both good and bad ).

First, we believe that values in the RDF value space ( and, by extension, the XSD value space ) should ideally translate directly to the AS3 value space. This means that we should be able to use native comparison operators to determine equality and operate with a native Strings, Numbers and other values directly instead of operating with a instances of x.rdf.RDFTypedLiteral classes, for example. If this is not possible, then a simple way to move back and forth should be provided.
We have already tried different approaches, and currently most of our model classes use Value-Singleton factories in order to allow identity based comparison and we have utilities to move from one value space to another ( codecs ). This works fine but has some GC issues and imposes some overhead.

Second, in Flash we need to design with limited resources in mind, both computationally and memory-wise ( if we look forward to OpenScreen and devices ). Therefore, we need to have special consideration when designing the abstract model implementation. For memory considerations, we must handle large lexical values for typed literals in a special way. One typed literal that represents the complete text of a book chapter cannot be managed in-memory in the same way that literal that represents the string "foo", for example. Therefore, we need an indirection layer ( a reference to the literal, but a way to keep its lexical value somewhere else if necessary... perhaps persisted in a database, accessible on demand from a remote service, or stored locally in a LSO ). This will probably jump into the "async" world. Not trivial because it might impact the simplicity of the API in a negative way.

Third, AS3 has the notion of QNames and Namespaces built-in. This obviously rings a bell, since RDF is based on similar web concepts. However, we haven't figured out a non-ambiguous way to use this capability, specifically using QName as a replacement for IRI, much less a way to retro-fit QName into an inheritance scheme ( derived from a shared abstract RDFTerm or implementing an interface which it should share with other model classes ).

Fourth, I believe that there is an extraordinary opportunity to build a subject oriented programming framework using native AS3 capabilities. Object accessors accept QNames and we have Flash Proxy available. We need more brilliant minds working on this to come up with a smart design. We have some prototypes but there is definitely room for improvement.
Subject orientation is the way to go when scripting over RDF ( to cope with multiple inheritance ).

Fifth, bindings, collections and MXML are Flex specific elements that we have used to some extent, but our use case universe is small so generalization of best practices is still hard. We welcome fresh ideas.

There are more issues... but as you can see, several of them go down to the very core of the framework and thus impact the whole stack. Putting these issues up for discussion in early stages with developers, Flash player engineers ( and hopefully people with insight into the AS roadmap ) is definitely a smart choice.
Personally, I would love to modify the player and extend AS3 to natively support RDF semantics. This is not possible in my current position, of course... but there have to be some tricks and workarounds.
I have already tried custom metadata ( to create Elmo-style annotations ) and it goes a long way. I have also experimented with some RDF path DSLs and created pre-compilers that generated MXML or runtime parsers to evaluate expressions.

But, again... these are just toys. We need more use cases to separate what's useful from what's getting in the way.


2.2 Historical Design Decisions

The second general reason for not opening the codebase right now is that we might be carrying outdated historical design decisions that were made years ago based on older versions of the SW specs or targeting old versions of the Flash/Flex APIs. This goes beyond the model and might extend into the parsers and query engines. It would be silly to rush in and waste the chance to review the design.


2.3 Collaboration from Day 1

Finally, I want this to be a collaborative project and get talented people involved in it from the beginning. This is not a fully developed area like Relational Databases, Compilers or even 3D Modeling. This is a paradigm breaking technological shift and I don't see it settling in he short term.
We need to get the technology out there and test it against real-world problems. Hopefully a lot of them.
Our way of doing things is not necessarily the best. AS3 is a special beast and has a much closer relation to Web technologies than, say, Java or Python. I can foresee that we will find a tight fit between RDF and AS3, but it's going to take a lot of experimentation and deep insight into the AVM.

In this context, I think that crowdsourcing the early steps will be beneficial to us all.
( depends on the crowd, I know... but we're working on it ;) )

3. Talent

The Semantic Web community is still small, and the Semantic Web UI community is even smaller. Therefore, right after we have defined a basic roadmap, finished the initial technical discussions and layed out some code ( model and io ) we will evangelize this project to other communities related to Semweb and, specifically, Semweb UI.

Flash is a very attractive platform so it will eventually be able to compete with Java and AJAX as a semweb UI platform. Time will tell...

Needless to say, I am very excited about this project. It has been a long, lonely road and I am eager to engage in some collaborative process to solve what I consider to be the most challenging problems I have ever faced. If you are reading this and you don't know what the Semantic Web is... then get ready to be blown away pretty soon! ( not by me... but by all of us working together ).

For now everyone's invited to join the semanticflash Google Group, but be warned that conversations will be sparse and won't be noob friendly for a couple of months ( until we get to a higher level API ).

I know there are a few out there with Flex and SW experience ( TopQuadrant ). I would be grateful if they could join the discussions ( to comment on the design issues ).

Finally, I would really like to hear Adobe's take on this subject ( RDF and AS3 integration ).

Best,
A

DISCLAIMER: I am an independent consultant and work on my OSS projects as time permits. I will obviously do my best, but until I find more collaborators/funding, don't panic if this goes silent every now and then.

Welcome to ADHD 2.0 ( Attention Deficit Hyperactivity Disorder 2.0 )

NOTE: This is just a random joke post. If you're looking for serious info on ADHD2.0... I wouldn't know if it even exists.


The Multi Tasking Man



Most of my life I have been struggling with some sort of ADHD, and this was even before the internet came along. Luckily, god gave me enough gray matter to survive and actually have some fun in the process.



I have, by now, seriously studied/practiced/enjoyed music, medicine, architecture, engineering, marketing, mountaineering, photography, design, free climbing, diving, martial arts, meditation and computer science ( might be forgetting something ). Years of obsessive dedication and in some cases even getting payed jobs. I can't remember a second of my life where I have been relaxed. Always busy, always running after something.



The Dark Side



Now, this might sound cool, but not everything that shines is gold. As you might anticipate, this kind of behavior has both a good and a bad side. The good side is that you are forced to integrate a lot of different areas and points of view into your perspective. The bad side is that you usually never get too far on any given area and you tend to become frustrated easily when things don't happen quickly.



This is why I never climbed the Aconcagua, won a major photography contest or created a successful internet startup ( yet ). Because by the time I was getting there, the task at hand got really hard, demanded too much attention and thus competed with my other sources of interest. So, even my best effort was not enough.



So. Lots of races, not so many medals.



Why does this Happen in the First Place?



In fact, no effort could have possibly been enough, because it's not about effort... it's about choice. There is a fundamental principle at conflict with this sort of behavior: With an infinite number of possibilities and a limited amount of resources you will never be able to accomplish everything, no matter how hard you try. Therefore, you must prioritize and let go what's not important, because attention is scarce. I have learned about this the hard way. I need to focus.





Of course this observation is not really a breakthrough. Actually, it has been around for quite some time in many different forms.





The Attention Economy:

"...in an information-rich world, the wealth of information means a dearth of something else: a scarcity of whatever it is that information consumes. What information consumes is rather obvious: it consumes the attention of its recipients. Hence a wealth of information creates a poverty of attention and a need to allocate that attention efficiently among the overabundance of information sources that might consume it" (Herbert Simon 1971, p. 40-41).


Solutions



I won't get into detail here, but life is not impossible for us with problems to focus. There are tools and techniqueis: Time management tools ( I love Tasktop ), Meditation, Sports and, for those who can afford it, building an organization around you.



Over the years I have actually come to understand this as a competitive advantage rather than a problem. I am more creative and curious. But it takes a while to get there and you really have to know your enemy.



That's why I can't help to notice that there is a new threat lurking around the corner...



ADHD - Reloaded



There is apparently a new version of this thing out there catching up like wildfire among people who were perfectly healthy before, killing forests of productive organizations. It is similar to the classic syndome, with the main difference being that this time it is caused by bacterial agents and spread by direct contact with electronic media and devices.



For my prelimiary obsevations, it shares most of the regular symptoms and adds some new ones... like sleep depravation, RSI, sore eyes, wife leave and obesity.



I am still catching up with the solution, and so far most of the old methods have proven only partially effective. I guess we will need new to get down to its level to fight it, bacteria versus bacteria: filtrbox, google reader, twine, etc.



Well, it's been too much rambling around, guess I am having an ADHD2.0 episode myself. I gotta get back to work. Focus.

God help us all in this new batlle.

For now, I am proud to publish the world's first microscopic photograph of the ADHD 2.0 bacteria:











These microbes come in all shapes and colors, usually have drop shadows or reflections, and they reproduce at lightning speeds. They are even more annoying than pokemons.

Blog URL Change: uiblog --> blog

To all of my 4 or 5 readers:

I have decided to change my blog's topic from UI to Generic ( meaning I will also talk about other stuff here ).
I set off to create one blog per subject/community. That would be like 5 different blogs for my expertise areas ( innovation, marketing, artificial intelligence, user interfaces, semantic web )... plus the usual "general ramblings".

Not a good idea...!
And I just redefined my strategy from niche blogging to personal blogging. I want to make this spot my home on the web.

So, better correct the mistake now that I am only one week in.

The new URL will be: blog.aldobucchi.com

Thanks!

Inversion of Control framework for the Flash Platform

For those of us who have been using the Spring Framework since the early days and have become strong advocates of IoC ( specifically, Dependency Injection ), the quest for Spring's Flash-based cousin is a recurrent topic.

In fact, after one single Google search, you can already get a preliminary list of suspects ( I am sure there are many many more out there ):

Prana, Indigo, Parsley and many others that are bundled in bigger libraries or frameworks.

I would love to give you some insight on the projects listed above, but the truth is I haven't used them at all... because there is a much better solution. Read on.

A long long time ago ( since flex 1.5 ) I found a Flex framework that provided the dependency injection functionality found in Spring core. It allowed me to declaratively instantiate collaborating classes within an XML document and inject dependencies. These are two core, necessary and sufficient features for DI support.

To my surprise, this framework went even further than spring in some aspects: It also allowed me to embed dynamic scripts and behavior in the XML document, swap dependencies at runtime, create live bindings to keep dependencies in sync, perform compile time checking for dependency types, hook classes and scripts to an event model and, through a development tool, I could even preview layouts visually ( when declaring visible collaborators and setting properties that affect layout/styling ).

So, with all this functionality at hand, you can see why I never even looked at the new-comers. In fact, this framework turned out to be so powerful and effective that I started finding it even more convenient than Spring for common tasks.

Its unprecedented flexibility has allowed me to develop new collaborator patterns ( adapters, pipelines, declarative DSLs, etc ) and architectural styles that I have later ported to my Spring projects ( when possible ).

All that sounds pretty good. But there is one problem.

Unfortunately, you won't be able to add this project to your tool base.

Yep. Sorry for that.
You won't be able to add it


... because it's already there!

It is called MXML, and it is one of the most flexible and powerful declarative Dependency Injection frameworks I have seen around.

But, of course, you can also try the other approaches or even build your own IoC frameworks. I am sure you can find very good reasons to do just that...

( Auto-wiring can be added non-intrusively using reflection and an extra tag to register instances, for example )

DISCLAIMER: Some frameworks may provide additional services and utilities. However, I am only questioning the need for replacing MXML with yet another XML dialect and workflow to achieve dependency injection.

Hans Rosling and his Dancing Bubbles


Old stuff, I know. But it never ceases to amaze me:

Hans Rosling: Debunking third-world myths with the best stats you've ever seen

This was the video that made me realize just how powerful a visualization can be and how much value it can add to the data ( or, rather, to our understanding of the data ). Tufte can't be all that crazy after all.

Infovis is all about codifying data in a language that can be decoded by our native human "hardware" with zero processing overhead.

And motion is a powerful part of the language. One that is so often overlooked!

Word is his software was bought by Google.
Hmm... any patents you think?

I wonder what insights I could get by running something like this on financial data.
Or on my own trends... perhaps I could even get to know myself. Finally.

Emulating Threads in Flash - The Simple Way

Recently I had to build a system that processed multi-megabyte files on Flex. Not having threads is a serious disadvantage in situations like this one.

Luckily, in most cases we don't really need multithreading per-se ( scheduling et Al )... we only need a way to split function calls and queue them.

The following util class provides a simple pattern and implementation to do just that ( supports recursion and nesting ):

com.aldobucchi.utils.AsyncRunner

Take a look at the source, read the wiki entry, and then download the SWC here

Notice that this class only takes care of queueing your method calls. You now need a way to dequeue your runner(s). One simple approach is to use an enterFrame event handler. However, if you need something more powerful ( scheduling algorithms ) or need to lock resources, then you're gonna have to wait for the second part of this article ;).

NOTE: The SWC is an early snapshot of a bigger library ( which is coming soon ) that contains only this class. Stay tuned, there is a lot more coming ( once I figure out how to layout the codebase in a way that makes sense ).

Kaboom!!!!

The Chaitén Volcano ( Chile ) during an anger management crisis some months ago.
Unlike him, I love my country ;)

FlashLR: Language Recognition Framework in AS3

I just finished porting part of an old codebase to a googlecode project space before it started to fade away.

FlashLR: A Simple Language Recognition Framework for Flash

It is not yet ready to roll, but pretty close ;)

You're invited to take a look and, if you know someone who loves compilers/parsers and the like, please show him the way. I don't have much time to run a project this size, but hopefully someone will find it useful.

Where's GoDaddy?

I knew I'd seen this interface before.



Why Blogger?

I know it's not the best choice in town.
I know I can't tweak it to the limit, or access the codebase, etc.

But then again, why should I. This is just a blog.

I'd rather have Google do the hard work so I can focus on using my limited brain to do something useful ( like spending more time on Facebook or simply space out).

Scroll pages by Moving your Head

Have you noticed the Deface AS3 project ?

Based on ideas from OpenCV and the well-known Viola and Jones face detection paper, but NOT associated with either. Deface uses XML encoded classifiers to visually detect and track objects (especially faces) in BitmapData. Compatible with classifiers from OpenCV.

There are many potential uses for such a framework. The most obvious being eye tracking for usability purposes ( though not necessarily the most valuable, because it can already be done with external software installed on the target machine ).

A really useful and realistic application could be scrolling pages with eye gestures ( looking at an area near the edge of the page ), head movements or blinking. This would be a really nice addition to flash based document readers ( I hate to keep a finger on my notebook or hold on to the mouse just to scroll! ).

Now, I know that there are other ways to scroll ( or even software that can turn gaze tracking into mouse gestures ). But you need to install stuff. And that automatically leaves many use cases outside.

To get your juices flowing let me tell you that, in an extremely optimistic scenario, we could even aim for something like this ( but without the glasses ).



Pretty cool huh ?
( the video I mean )

About six months ago I managed to achieve that 3D effect using marker tracking ( a green piece of cardboard ) and pv3d ( processing with hough transforms and the usual suspects ), but it required you to wear the marker on a pair of glasses or something. Not precisely un-intrusive.

( please print this image and glue it to your forehead )


But it looked really cool ( when it worked... even though things were jumpy at times ).

Now, the ideal situation should require you to only turn on your webcam ( most probably attached to your notebook screen ) and perform one minimal calibration process ( blink a couple of times and then align two dots in size and position on the screen by moving your head, for example ).

You might ask yourself: why bother?

Well, because it's cool... and because you could also apply it to enhance usability. Think about the deep 3D effect that could be achieved. You could slightly ( and intuitively ) tilt your head to reveal a bit more of something that lays in the back.

However, there are many technical challenges. In fact, it might even be impossible. Even if deface managed to implement the complex libraries required to support this kind of image processing, I don't even know if we could achieve acceptable performance since this would have to run in real-time and, to make it worse, inside the flash player.

I work on innovation, so problems like this don't usually make me stop. They just make me turn the problem on its head.

So, one crazy idea that I thought might work ( and when I say might I mean "if god is a reeeeally nice guy" ) but that I have not yet validated would be to create a 3D model of the head internally and use it to predict movement. It could receive some feedback at setup time ( as I said, we could use blinking to ease things up ) to modify proportions on a generic model and it could also try to figure out lightning conditions.

I have the feeling that this is possible ( using a 3D engine ), but "prediction" smells a bit like AI trouble and I can see it turning towards belief networks et Al. I am not sure if Haar classifiers can use this sort of prediction feedback or we need a different approach.

Perhaps we should save us some client-side trouble and send an initial image of the user over the wire ( to a service running on the cloud and powered by OpenCV ) for initial processing: estimate proportions, initial position, features ( beard, glasses ) and lightning conditions. We could then generate the model.

But there still is one problem to which I see no obvious solution: it is way too easy to get your head out of the narrow view-field of a pinhole webcam when moving around. And this would make any system go crazy ( right? ).

Anyway, I am way over my head here... perhaps someone can come out with a simpler solution.

Is anyone up to the challenge?
( not the 3D one, that's just me daydreaming )

If you know any student that needs a complex computer vision problem, please point him this way!

Tell him that, if he manages to get the simplest scroll-by-gesture part working and manages to get Adobe to throw it into the next flash based Adobe Reader ( if there is one ) I will be eternally grateful.

Me and my index finger.

Domain Specific Languages in AS3 ( part 1 )

In this multi-part article I will explore DSL ( Domain Specific Language ) basics and then introduce you to some concrete techniques and tools specific to AS3.

DSLs are all about

  • Creating an abstraction layer between definition and implementation so you can think in terms of the problem at hand rather than the tool at hand.
  • Reducing boilerplate code
  • Making more robust, readable and testable code
Sounds good right?

Yes, they are quite powerful, and chances are you already know their virtues first hand.

One basic and familiar example of a DSL for AS3 coders is E4X ( ECMAScript for XML ). While you can still do the same operations using the DOM API, E4X turns out to be much simpler to write, read, understand and maintain because it provides you with a specialized tool set and vocabulary to work with XML structures. It is worth noting that you cannot use it to work with display objects or plain strings: It is specific to a given domain. A very generic domain in this case ( working with XML ).

( note the tradeoff: generality VS effectiveness ).

I won't repeat what has been said elsewhere by some brilliant minds, so please go check this great video on the subject and then come back: Martin Fowler on DSLs.

( seriously, Fowler is a great speaker ).

Now, one interesting fact that Mr. Fowler points out is that you don't necessarily need to escape the language to work using a DSL approach.


Object Oriented languages already provide you with a set of elements and some basic structure over which you can create your own DSLs. In fact, you do it every day: You define objects, class hierarchies, methods, packages, constants, etc.

Intuitively it might seem that a set of collaborating classes does not qualify as a DSL... but it definitely does: it provides you with a specialized vocabulary to work on a specific problem domain. These native language DSLs are sometimes called dialects. But don't pay too much attention to this. There is no real value in recognizing them as DSLs other than to help you understand DSLs conceptually: They are a level of abstraction over which you can script specific operations easily.

You use these elements to model the domain one level at a time. If your modeling at each level is correct and your implementations are sound, then each iteration pushes you to a higher level of abstraction where you can hopefully do more with less. Each step brings you closer to the domain of the real problem: from functions to classes to libraries to modules to people to tasks, etc. ( the real problem is usually a business problem, and your modeling process tends to go in that direction ).


So, with this observation in mind, let me tell you a little secret:

A very powerful approach to creating your own DSLs in Flex is to create a set of classes ( maybe just simple value objects ) and assemble them using MXML. This technique goes a long way and is my personal favorite when it comes to the Flash Platform because it completely eliminates the need to manage a parsing workflow and you get enhanced readability, binding, events plus all that MXML magic for free. Degrafa uses this approach extensively. I don't think Ben thinks about this as a DSL. But, being a smart guy, he intuitively found his way to a very convenient solution.

See for yourself how MXML is used as a domain ( degrafa ) specific language to declare data in this sample Flex application.

Custom metadata can also be considered a DSL at some point ( for a formal definition of DSL google for "Fowler DSL". He's seriously into this are lately ).

There are some cases, though, when the tools provided by the base language not convenient, not expressive enough or their semantics differ from those of your problem domain in a radical manner. When this happens, you should definitely consider creating or implementing a DSL using a different toolset.

One common alternative is to use XML as a DSL framework. This is almost equivalent to using MXML but has some workflow differences.


Now, if XML is too verbose, then you could try to create short, string-based languages along with simple Regex-powered parsers. Most examples I can think of are path-related. For instance, one could create a simple multi-level CSS path language with array access that would accept expressions like Chart.markerStyle[3].labelColor = #ffffff. Compare that (mentally) to the AS3 equivalent, which could easily extend to 20 lines of code.

It is worth noting that the latter code is not only smaller. It is also easier to test, readable and more robust ( because the actual execution logic is encapsulated elsewhere ).
Finally, if you require a more expressive language you can always resort to traditional language recognition tools ( parsers, interpreters, etc ). We will dig into this i the next part of this article, coming later this week.

As a side note: some languages provide built-in ( or complementary ) features that make them easier to extend ( templates, overloading, aspects, etc ). While one can argue that AS3 is pretty limited in this sense, I personally think that MXML is one amazingly useful piece of technology.


Another invisible advantage of using ( or thinking in terms of ) DSLs is that you are compelled to model the problem in its own terms. This creates a better understanding and helps you keep an eye on the forest ( problem ) while working at the tree level ( code ).

Again, the CSS path mentioned before is a very good example. It makes you work on the actual problem, not on the boilerplate code.

For now, just watch Mr. Fowler's video over and over again while repeating the following mantra:

Coding is, in essence, a recursive modeling game. In every iteration you pick a starting level of abstraction and use the tools at hand to build on top.

It is important that you always keep this in mind.

If you don't then you will most likely miss the chance to pick ( or build ) "a better level of abstraction" to start from when appropriate.

Don't let the language impose restrictions on you. Extend it!

To blog or not to blog...

OK, OK... I surrender.

I've managed to keep my identity offline for over 10 years.

But I am becoming blurry. I am disappearing.

I tried to make a living out of the web without putting my life into the web.

But now that I can barely distinguish between what is inside and what is outside... why should I really care?