TwinTechs

Dream, Create, Deliver…

Evaluating the Quality of Designs

July 21st, 2009 Written by: Jesse Dailey · RIA, writings

One of the most important tasks that an engineer or architect is asked to do is evaluate the quality of a potential design.

I’d like to present here an informal framework for reasoning about what makes a good design.  I think these rules apply to all human-facing products: software, architecture, etc.

So, without further ado, I think the rule for good design is: taking something non-trivial, and providing a trivial user interface.

This applies not only to software, but the design of anything useful.

Take for an example, a bridge.  Given the non-trivial task of getting something heavy (that doesn’t float) across a river, a bridge provides a trivial interface.

To better formalize this, I propose the following formula, the Quality Quotient:

Q = 1 – (triviality of new interface / triviality of old interface)

For simplicity’s sake, I will use a scale of 1-10, where 1 is very easy, and 10 is very hard.

In the bridge example, if you are on one shore in a heavy truck, and need to get to the other side and have no bridge, I’d call that a 10.

With a bridge in place, the use case is as trivial as it gets: keep moving forward. I give that a 1 on the scale of Moving Things Around.

So, Q(bridge) = 1 – (1/10) = .90 = 90% awesome design.

No wonder they have stuck around. It could only get better if somehow we instantly teleported across.

Now, my claim is that the process of making anything complex involves the iterative process of choosing between competing designs for the system as whole, and subsequently for each component. Successfully making something that works and is useful and usable, involves only allowing your self to make choices that score highly.

Another example, this one from the software world.  What makes some code libraries stick, and others fade away?  Take the javascript library jQuery as an example. The initial problem is two fold: dealing with the variations among browsers, and finding a natural way to deal with so much tree-like data in a procedural language. On the scale of software annoyances, I give this problem a 6.  It’s been done several times, so it’s very doable, but you still don’t want to do it yourself.

Jquery takes this non-trivial problem and wraps it up in a safe and simple package where not only are the browser-dependent features smoothed out, but the actual language syntax is flexed to its limit to provide for a more natural way of finding and mapping operations over sets of DOM nodes.  I give it a 2 on my made-up scale… there is maybe room for improvement, as real-life software is always evolving and improving, but they have succeeded in hiding the most cumbersome pieces.

Q(jquery) = 1 – (2/6) = 66% awesome.

If you aren’t using any javascript library, here is a successful one.

This reasoning on many individual levels becomes, on a macro level, the definition of success or failure for a code library, or product.  If you wanted to compete with Jquery you would have to either tackle more complexity (solve a bigger problem), or solve the same problem with a simpler interface, or some combination of the two.

Another example, this time from the mobile world, and this one comes with a prediction (like all good pseudo-science).

The WebKit rendering engine. WebKit is the rendering engine used in the iPhone, Android OS, and the Palm Pre. The problem faced here is one of rendering degenerate HTML into what the author intended, and it is one of the trickiest problems in web software development today.  It’s so hard in fact that no one does it correctly, or even the same, not even WebKit.  On a scale of software challenges, that makes it a 10 in my book.

Because WebKit is open-source and has a rich community and it supports such a broad range of contexts, it’sthe kind of thing that an experienced programmer can get to render html in relatively short order.  Orders of magnitude faster than trying to render it yourself.  But it certainly is not as easy as possible (I think in order to get a 1, you have to be functional with a couple of lines of code), so I give it a 2.

Q(webkit) = 1 – (2/10) = 80% awesome.

My prediction here is that WebKit and other’s ability to render degenerate HTML has crossed the threshold of good enough, and the barriers to success are now more heavily weighted on ease of implementation and flexibility of context.  Since WebKit scores so much higher in these areas than other browser options, I think WebKit is going to become the reference HTML renderer, on mobile platforms and elsewhere.  Probably not an earth-shattering prediction, but there it is.

So far, all our examples have been positive-valued successful examples, but there are two other ranges of scores that are very interesting: near 0, and less than 0.

Scores near zero mean that you are just wasting time.  The Auto Industry is a good example of this:

Cupholders; taking a pretty trivial initial problem, and giving it a trivial solution.  No surprise that few people really care.

Q(Cupholders) = 1 – (1.5/2) = 25%

Vehicle Diagnostic Computers; diagnosing and correcting vehicle components is difficult and nuanced at best, but after a generation of adding expensive maintenance computers, we’ve just shifted the complexity to learning how to operate, diagnose, and correct the diagnostic computers.

Q(Vehicle Diagnostic Computers) = 1 – (8/9) = 11%

From the average consumer point of view, practically nothing has changed in 25 years with regard to getting their car serviced.

The lowest range, less than zero, represents those times when people over-think a problem, or over-engineer solutions.

The early years of the web are a good source of such things.  Take the success of Google, which hinged in large part on their streamlined interface.

The problem a search engine faces is certainly not trivial, and it comes in two parts: specifying what you want, and then finding it.

In 1999, when Google came out, Yahoo and AltaVista were the search engines I remember, and I remember them both looking like this:
Yahoo.com circa 1999

Now, we are looking at just the part of this task where you specify what you want, and Yahoo decided that a Taxonomy of Everything was the best solution.  Their idea was very Renaissance in a way: that they could file everything neatly into these categories, and users would naturally understand the categories they made and use them to find what they want.  But, the last several hundred years have not been kind to this idea that taxonomy alone can tackle complexity.

So, Yahoo starts with a problem that to the user (inside his own head) is quite easy; I know what I want, in some internal language.  So, to me, this is one of the easier things that people do: communicate what they want, once they know.  It’s not the easiest thing in the world, since we mess it up all the time; and Natural Language, while wonderfully nuanced, is often not precise enough.  So, all in all, I give it a 3; not that hard, but sometimes subtle or tricky.

Yahoo takes this problem of getting what I want out of my head, and they decide they are going to try and tease it out of me by asking a whole lot of hierarchical questions: “Is it an Automotive thing you want? An Entertainment thing?  How about one of these Quick Links, maybe they would be Quicker?”.  Once I answer that question, it asks slightly more refined questions, “Is it Dining, or Music related? etc.”  This process, as anyone who remembers the web of 1999, could take hours to find what you want, and you might have to answer hundreds of little questions along the way.

If expressing what you want is a 3, Yahoo gave us a solution that’s a 5; its do-able, in fact it might often succeed, but it is a painful and arduous journey with more missteps available then correct ones.

Q(Yahoo 1999) = 1 – (5/3) = -66%

Now, this doesn’t mean that the world got worse when Yahoo came around, we are only looking at the first half of their problem; and for this one specific facet, they didn’t “bring the machine to me”, they tried to force me to think like a machine, to sub-divide and re-divide the world in a way that is very un-natural.  So they did make this process of identifying what I want harder than it was.

Along comes Google with the absolute simplest interface you could possibly create.  It’s so simple you can even skip the results page. You do the same thing you would always have to do: condense your inner language to relevant Natural Language keywords.  So, Google replaces a 3 with a 3.

Q(Google 1999) = 1 – (3/3) = 0%

You can see where this is going.  Google did not try to solve a bigger problem, they just presented the simplest possible interface to the one at hand.  They let the natural work, that my brain had to do anyway, fall directly out onto the interface.  Now, they can focus on the technologically difficult part, the second part of the problem: actually finding what you want.

You can also see from this how far we have to go. We are stuck in a primitive world of text, with limited keywords, and a poor grasp on the conceptual structure of most problems, except bridge-building.  We got that one down now, only after several millennia of small improvements.

Whenever you are evaluating designs, you must ask yourself these questions: “Am I tackling a non-trivial problem?”, and “Am I providing a trivial interface to that problem?”.  If the balance of these questions is not right, you must bravely return to the drawing board.

→ No CommentsTags: ···

Automating meta-data extraction from video’s

June 29th, 2009 Written by: twintechs · LiveCycle, Mobile Devices, Security, Technical, Uncategorized, Web 3.0, writings

We recently had an internal project that required us to extract meta-data from video files.  We needed information such as the number of streams, length of the video, format, creator, encoding, and anything else we could gather.  This information was then stored in a database for the easy extraction and categorization of a large set of videos.

Twin has also recently started an internal streaming media framework using tools like Red5, Xuggler, and ffmpeg.  Using the expertise we gained with Xuggler, I decided to quickly write our own meta-data extractor. Later I decided on an even simpler solution.

The first method was to write our own meta-data extractor using Xuggler.  In order to use Xuggler, download and install it from http://www.xuggle.com/xuggler/downloads/.  In Linux, you will also need to add the XUGGLE_HOME/lib directory to the LD_LIBRARY_PATH environment variable so the native libraries are picked up by Java (Xuggler uses JNI to call its own C++ wrappers around ffmpeg).  The Windows installer does this automatically for you.

After Xuggler is installed, I cracked open the demos it had and modified one.  The code is very simple and required few changes.  The Java code is downloadable below.  Just make sure the xuggle-xuggler.jar (included in the XUGGLER_HOME/share/java/lib folder) is in your classpath before compiling and running it, and pass in a movie file as a command line parameter.  For example:

java com.twintechs.video.demo.GetMediaMetaData /path/to/your/video.mpg.

The output will be something along the lines of:
Opening video file: /home/dave/workspace/twin/MetaData/video/test.mpe
null (probesize):     32000
set mux rate (muxrate):     0
set packet size (packetsize):     0
null (fflags):     0x00000000
set the track number (track):     0
set the year (year):     0
how many microseconds are analyzed to estimate duration (analyzeduration):     3000000
decryption key (cryptokey):     §C,
max memory used for timestamp index (per stream) (indexmem):     1048576
max memory used for buffering real-time frames (rtbufsize):     3041280
print specific debug info (fdebug):     0x00000000
file "/home/dave/workspace/twin/MetaData/video/test.mpe": 2 streams; duration (ms): 53700; start time (ms): 149; file size (bytes): 11323804; bit rate: 1686972;
stream 0: type: CODEC_TYPE_VIDEO; codec: CODEC_ID_MPEG1VIDEO; duration: 4833000; start time: 13490; language: unknown; timebase: 1/90000; coder tb: 1/30; width: 432; height: 320; format: YUV420P; frame-rate: 30.00;
stream 1: type: CODEC_TYPE_AUDIO; codec: CODEC_ID_MP2; duration: 4810187; start time: 13490; language: unknown; timebase: 1/90000; coder tb: 1/90000; sample rate: 44100; channels: 2; format: FMT_S16

And a lot of other stuff.

The output is hard to make sense of, however, since it’s essentially in its rawest format.  Instead of painstakingly mapping each raw field to human-readable English, (for the record: not a good use of a consultant’s time!) I searched a little online for a pre-existing solution.  Not surprisingly, there were many.  The best one, which is also an open source project on SourceForge, was MediaInfo.

So, the second method of extracting data from source videos, which is a little easier but more limited because the program’s sole purpose is for info on media (e.g. you couldn’t play a video sample if you wanted), is to download and install MediaInfo.  The website is at http://mediainfo.sourceforge.net/en.  Download and install this on your platform, and then using either the GUI or the CLI (command line interface), you can see the available information of essentially any video.  For example, using the CLI, you can then type something like:

MediaInfo –Full “/path/to/your/video.mpg”

This will give a lot of information, most of which is human-readable. Then this information can be extracted using any of a number of methods, like Python or Perl text parsing, etc., and fed into a database for categorization.  And there you have it; two easy ways to extract every bit of information from a video file and categorize it for further use!

Here is a example file getmediametadata .

→ No CommentsTags:

A Star Trek Baptism

May 13th, 2009 Written by: David Ladd · Uncategorized, writings

 

I have always been a Star Wars guy.  I’m the type who could give you 5 generations of the Skywalker family tree.  But I’ve never been a Star Trek guy.  Sure I watched some of Deep Space 9 on WGN in my younger days when the Cubs were rained out but I always had a difficult time getting past the stuck-in-the-70’s lifesaver colored bridge shirts.startrekbridgesitting

 

After a long day driving software solutions to clients looking for immediate ROI and impact to their business </plug> … I decided to walk across the street from the office to catch the new Star Trek experience if only because JJ Abrams was attached to it.  Being a Lost fan I’ll pay a $10 thank you to JJ for a hundred hours of great Lost TV.

While the early plot was a little to diamond in the rough just needs polishing predictable; I cannot remember a better close the deal line to get the diamond (Kirk) out of the ground and polished up than Capt. Pike to a drunk Kirk, “Your father was captain for 12 minutes and saved 800 lives.  I dare you to do better.”

 

Revisiting the film & cast on Wikipedia the day after, I was pumped to confirm I saw Karl Urban + 50 lbs as Dr. Bones McCoy; he of the best one-liners in the film.  Karl’s one my underrated actors in film – as opposed to Eric Bana who always gives the same character and can’t escape his Aussie accent as easily as Russell Crowe or Hugh Jackman.  Bana’s loud monotone Nemo may as well have been Prince Hector, which was a dead ringer for his Bruce Banner, who sounded just like his King Henry III.  

 

Contrasting a Bana performance to an Urban performance is like taking in a Britney Spears show versus a Prince show.  The first is always the same and generally terrible while the second is always fresh and high quality.  Urban is that quality second tier that every great film needs.  Think of his performances in LOTR, Chronicles of Riddick or Bourne.  Karl Urban is a sci-fi smorgasbord.  We’ll just forget DOOM ever happened for his career.

 

Casting overall was very good for this film with Chekov and Scott being well played in particular and father Kirk looking exactly like his son James T.  This movie even got a great Sulu performance from the guy who starred in Harold & Kumar go to White Castle.  

 

Conclusion: Being in the producers target demographic (18-54 male with a job and a wife with an itchy credit card trigger finger) they will be pleased to hear there is now one more Trekker (Trekkie?  I’m new to the slang) on board the Enterprise and I will even throw down another $10 to see it a second time, all while anticipating whatever follow-up prequel they put together.  Well worth my time and any ridicule from my jock friends.  Not that I’ll get any from my co-workers or you the reader.  If you are here reading this you are more Gizmodo than ESPN.  

 

My only complaint was the music. How can Star Trek not have an anthem inducing theme a-la Star Wars, Indiana Jones, Bond or even LOTR?  But what should I expect from the sound guy who does all of JJ’s work and has more sound credits to video game work than cinema or TV.  But then, I did not walk into the theatre for the sound guy, I walked in for JJ.  There’s a reason they hand the sound guy Oscars out before the show begins while Best Director is one of the last awards.  I remain knelt at the altar of JJ.  Live Long and… keep making great stuff.

→ No CommentsTags:

Unlocking Android Sample Code

December 25th, 2008 Written by: Robi Sen · Android, Mobile Devices, books, writings

Charlie Collins, has setup a Google Code project with updated source for the Unlocking Android book here.  There are several really interesting projects in the source and all the code is running and working on the lattest 1.0 builds of the SDK.  Whats great is the authours will be actively updating the code and you can leave comments at the Manning forum if you find issues.

→ No CommentsTags: ····

Twin Technologies Adds Four New Members to Its Engineering and Marketing Team

December 5th, 2008 Written by: julie.colwell · News, Project Delivery, RIA, writings

To support its growing list of clients, Twin Technologies has increased its software engineering team to include Senior Consultants Nicholas Tunney, Scott Sayles, and Chris Turner, and build out the marketing team with the addition of Julie Colwell.

Previously the Vice President of Software Architecture at AboutWeb, Nic Tunney brings executive level experience leading teams in public, private, and federal sector engagements, building brand awareness, and developing partnerships. A sought after speaker and author, Nic is an Adobe Certified Instructor, Adobe Community Expert, and founder of the Capital Area Adobe LiveCycle user group, sponsored by AboutWeb.

Scott and Chris bring versatile backgrounds in object-oriented programming with extensive experience in the full lifecycle of software development including requirements gathering and definition, interface design, testing, and maintenance. Scott’s track record in Java development, troubleshooting, and creative web applications along with experience building solutions for federal agencies make him a resourceful addition to both Twin Technologies’ commercial and government projects. Chris’ experience in building customer facing web applications and solutions using an impressive list of best-breed technical tools make him an asset for the Twin Technologies’ team.

Julie has multiple years experience developing and implementing marketing communications and public relations programs for companies in high tech including SEO, SaaS, networking, enterprise software, servers and storage, and advertising optimization. At Twin, she is responsible for building strategic marketing plans and driving the tactical components of these plans from conception and vision to implementation.

“We are thrilled to introduce these new members of our team,” says Ben Elmore, founder and CEO of Twin Technologies. “And we’re excited about what this growth means for the services and solutions we can offer more customers.”

About Twin Technologies
Twin Technologies builds mission critical RIA software solutions. We’ve leveraged our decades of experience, extensive domain expertise, and RIA capacity to bring an elegant interface and enterprise usability to the web. Our applications increase your ability to share information, collaborate, and manage content online. Built with the rich, flexible, powerful technology that is the bedrock of today’s online business, Twin Technologies creatively links the intuitive, social, and collaborative interfaces of Web 2.0 with enterprise technology. We have advanced technical proficiency in Adobe Flex, LiveCycle, AIR, Java, AJAX and System Architecture.

→ No CommentsTags: ·······

Adobe Flex 2: Training from the Source

January 24th, 2008 Written by: Robi Sen · News, books, writings

If you are trying to learn Flex you should check out Adobe Flex 2: Training from the Source which was co-authored by Twin Technologies founder Ben Elmore.

→ No CommentsTags: ··

Twin Techs’ Robi Sen contributes to CF8 WACK

January 21st, 2008 Written by: Robi Sen · books, writings

We are always busy here at Twin Technologies even when we are not working helping our customers create some of the most innovative solutions to their problems we still find time to contribute back to the community. With that in mind I just wanted to announce that Ben Forta’s latest and greatest ColdFusion 8 Web Application Construction Kit (WACK) books are out. I was lucky that Twin Techs let me have the time to contribute to the 2nd and 3rd books and hopefully you will find their content as good as I did. Lots of great stuff in them and you can purchase them from the Amazon links below.

→ No CommentsTags: ···